Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Classes

Interfaces

Type Aliases

Variables

Functions

Type Aliases

AdminRoutes: { edit?: string; new?: string; page?: string; provider?: string; q?: string; sort?: string; tab?: string }

Route methods used in Admin UI

Type declaration

  • Optional edit?: string
  • Optional new?: string
  • Optional page?: string
  • Optional provider?: string
  • Optional q?: string
  • Optional sort?: string
  • Optional tab?: string
AdminStore: { adminLinks: LinkInfo[]; adminUsers: AdminUsersInfo; api: ApiResult<AuthenticateResponse> | null; auth: AuthenticateResponse | null; authLinks: LinkInfo[]; authPermissions: any; authProfileUrl: string | null; authRoles: string[]; baseUrl: string; copied: boolean; debug: boolean; displayName: null; filter: string; isAdmin: boolean; link: LinkInfo; SignIn: any; adminLink: any; cachedFetch: any; init: any; login: any; logout: any }

App's primary reactive store maintaining global functionality for Admin UI

Type declaration

ApiState: { api: any; apiLoading: boolean; apiResult: any; apiState: ApiState; client: any; error: ResponseStatus; errorSummary: string | null; formLayout: any; model: any; op: MetadataOperationType; title: string | null; apiForm: any; apiSend: any; createModel: any; createRequest: any; field: any; fieldError: any }

Create a new state for an API that encapsulates its invocation and execution

Type declaration

  • Readonly api: any
  • apiLoading: boolean
  • apiResult: any
  • apiState: ApiState
  • client: any
  • Readonly error: ResponseStatus
  • Readonly errorSummary: string | null
  • formLayout: any
  • model: any
  • op: MetadataOperationType
  • title: string | null
  • apiForm:function
    • apiForm(formData: FormData, queryArgs?: Record<string, any>): any
    • Parameters

      • formData: FormData
      • Optional queryArgs: Record<string, any>

      Returns any

  • apiSend:function
    • apiSend(dtoArgs: Record<string, any>, queryArgs?: Record<string, any>): any
    • Parameters

      • dtoArgs: Record<string, any>
      • Optional queryArgs: Record<string, any>

      Returns any

  • createModel:function
    • createModel(args: any): any
  • createRequest:function
    • createRequest(args: any): any
  • field:function
    • field(propName: string, f?: ((args: { id: string; input: InputInfo; rowClass: string }) => void)): any
    • Parameters

      • propName: string
      • Optional f: ((args: { id: string; input: InputInfo; rowClass: string }) => void)
          • (args: { id: string; input: InputInfo; rowClass: string }): void
          • Parameters

            • args: { id: string; input: InputInfo; rowClass: string }

            Returns void

      Returns any

  • fieldError:function
    • fieldError(id: string): string
App: { events: Bus; petite: any; reactive: Identity; build: any; component: any; components: any; createApp: any; directive: any; import: any; nextTick: any; onStart: any; prop: any; props: any; start: any; template: any; templates: any; unsubscribe: any }

High-level API encapsulating client PetiteVue App

Type declaration

  • events: Bus

    Publish/Subscript to App events

  • Readonly petite: any

    PetiteVue App instance

  • reactive: Identity

    PetiteVue.reactive - create a reactive store

  • build:function
    • build(args: Record<string, any>): any
    • Build PetiteVue App instance

      Parameters

      • args: Record<string, any>

      Returns any

  • component:function
    • component(name: string, component: string | Function): void
    • Register single component

      Parameters

      • name: string
      • component: string | Function

        Auto Component template HTML or Component Function

      Returns void

  • components:function
    • components(components: Record<string, Object | Function>): void
    • Register map of PetiteVue components using key as Components Name

      Parameters

      • components: Record<string, Object | Function>

      Returns void

  • createApp:function
    • createApp(args: any): any
    • PetiteVue.createApp - create PetiteVue instance

      Parameters

      • args: any

      Returns any

  • directive:function
    • directive(name: string, fn: Function): void
    • Register PetiteVue directive

      Parameters

      • name: string
      • fn: Function

      Returns void

  • import:function
    • import(arg0: string): Promise<any>
    • Dynamically load external script src

      Parameters

      • arg0: string

      Returns Promise<any>

  • nextTick:function
    • nextTick(f: Function): void
    • PetiteVue.nextTick - register callback to be fired afterA next async loop

      Parameters

      • f: Function

      Returns void

  • onStart:function
    • onStart(f: Function): void
    • Register callback to invoke after App has started

      Parameters

      • f: Function

      Returns void

  • prop:function
    • prop(name: string, val: any): void
    • Register (non-reactive) global App state property

      Parameters

      • name: string
      • val: any

      Returns void

  • props:function
    • props(props: Record<string, any>): void
    • Register multiple (non-reactive) global App state props

      Parameters

      • props: Record<string, any>

      Returns void

  • start:function
    • start(): void
  • template:function
    • template(name: string, $template: string): void
    • Register Auto Component with $template contents

      Parameters

      • name: string
      • $template: string

      Returns void

  • templates:function
    • templates(templates: Record<string, string>): void
    • Register map of Auto Components using key as Components Name

      Parameters

      • templates: Record<string, string>

      Returns void

  • unsubscribe:function
    • unsubscribe(): void
    • App function for unsubscribing 'sub' subscription in Component instance

      Returns void

Breakpoints: Record<"2xl" | "xl" | "lg" | "md" | "sm", boolean>

Tailwind Responsive Breakpoints { 2xl:1536, xl:1280, lg:1024, md:768, sm:640 }

Bus: { publish: any; subscribe: any }

Publish/Subscribe to App Events

Type declaration

  • publish:function
    • publish(eventType: string, arg: any): void
  • subscribe:function
    • subscribe(type: string, callback: Function): { unsubscribe: any }
    • Parameters

      • type: string
      • callback: Function

      Returns { unsubscribe: any }

CreateComponent: ((args: CreateComponentArgs) => Record<string, any>)

Type declaration

CrudApisState: { apiCreate: ApiState | null; apiDelete: ApiState | null; apiPatch: ApiState | null; apiQuery: ApiState | null; apiUpdate: ApiState | null; opCreate: MetadataOperationType | null; opDelete: MetadataOperationType | null; opPatch: MetadataOperationType | null; opQuery: MetadataOperationType | null; opUpdate: MetadataOperationType | null }

All CRUD API States available for this operation

Type declaration

CrudApisStateProp: CrudApisState & { callback: Function; dataModel: MetadataType; opName: string; prop: MetadataPropertyType; viewModel: MetadataType; viewModelColumns: MetadataPropertyType[]; createPrefs: any; selectedColumns: any }
DocComponent: ((args: DocComponentArgs) => Record<string, any>)

Type declaration

EditComponent: ((args: EditComponentArgs) => Record<string, any>)

Type declaration

ExplorerRoutes: { body?: string; detailSrc?: string; doc?: string; form?: string; lang?: string; op?: string; preview?: string; provider?: string; response?: string; tab?: string }

Custom route params used in API Explorer

Type declaration

  • Optional body?: string
  • Optional detailSrc?: string
  • Optional doc?: string
  • Optional form?: string
  • Optional lang?: string
  • Optional op?: string
  • Optional preview?: string
  • Optional provider?: string
  • Optional response?: string
  • Optional tab?: string
ExplorerRoutesExtend: { queryHref: any }

Route methods used in API Explorer

Type declaration

ExplorerStore: { activeDetailSrc: string; activeLangSrc: string | null; api: ApiResult<AuthenticateResponse>; auth: AuthenticateResponse; authLinks: LinkInfo[]; authPermissions: string[]; authProfileUrl: string | null; authRoles: string[]; baseUrl: string; copied: boolean; debug: boolean; detailSrcResult: {}; displayName: string | null; filter: string; filteredSideNav: { expanded: boolean; operations: MetadataOperationType[]; tag: string }[]; isServiceStackType: boolean; op: MetadataOperationType | null; opName: string; opTabs: {}; previewCache: { lang: string; preview: string; url: string } | null; previewResult: string | null; previewSrc: string; sideNav: { expanded: boolean; operations: MetadataOperationType[]; tag: string }[]; useLang: string; SignIn: any; cachedFetch: any; getTypeUrl: any; hasRole: any; init: any; invalidAccess: any; langCache: any; loadDetailSrc: any; loadLang: any; loadPreview: any; login: any; logout: any; toggle: any }

App's primary reactive store maintaining global functionality for Admin UI

Type declaration

  • Readonly activeDetailSrc: string
  • Readonly activeLangSrc: string | null
  • api: ApiResult<AuthenticateResponse>
  • auth: AuthenticateResponse
  • Readonly authLinks: LinkInfo[]
  • Readonly authPermissions: string[]
  • Readonly authProfileUrl: string | null
  • Readonly authRoles: string[]
  • baseUrl: string
  • copied: boolean
  • debug: boolean
  • detailSrcResult: {}
    • Readonly displayName: string | null
    • filter: string
    • Readonly filteredSideNav: { expanded: boolean; operations: MetadataOperationType[]; tag: string }[]
    • Readonly isServiceStackType: boolean
    • Readonly op: MetadataOperationType | null
    • Readonly opName: string
    • Readonly opTabs: {}
      • [p: string]: string
    • Readonly previewCache: { lang: string; preview: string; url: string } | null
    • previewResult: string | null
    • Readonly previewSrc: string
    • sideNav: { expanded: boolean; operations: MetadataOperationType[]; tag: string }[]
    • Readonly useLang: string
    • SignIn:function
      • SignIn(opt: any): Function
    • cachedFetch:function
      • cachedFetch(url: string): Promise<string>
    • getTypeUrl:function
      • getTypeUrl(types: string): string
    • hasRole:function
      • hasRole(role: string): boolean
    • init:function
      • init(): void
    • invalidAccess:function
      • invalidAccess(): string
    • langCache:function
      • langCache(): { lang: string; op: string; url: string }
      • Returns { lang: string; op: string; url: string }

        • lang: string
        • op: string
        • url: string
    • loadDetailSrc:function
      • loadDetailSrc(): void
    • loadLang:function
      • loadLang(): void
    • loadPreview:function
      • loadPreview(): void
    • login:function
      • login(args: any, $on?: Function): void
      • Parameters

        • args: any
        • Optional $on: Function

        Returns void

    • logout:function
      • logout(): void
    • toggle:function
      • toggle(tag: string): void
    Forms: { Lookup: {}; Meta: Meta; Server: AppMetadata; formClass: string; gridClass: string; theme: ThemeInfo; apiValue: any; colClass: any; complexProp: any; fetchLookupValues: any; forAutoForm: any; forCreate: any; forEdit: any; formValues: any; format: any; getFieldError: any; getFormProp: any; getGridInput: any; getGridInputs: any; getId: any; getPrimaryKey: any; getType: any; groupTypes: any; inputId: any; inputProp: any; isRequired: any; kvpValues: any; lookupLabel: any; opTitle: any; populateModel: any; refInfo: any; relativeTime: any; relativeTimeFromDate: any; relativeTimeFromMs: any; resolveFormLayout: any; supportsProp: any; typeProperties: any; useLabel: any; usePlaceholder: any }

    Utility class for managing Forms UI and behavior

    Type declaration

    Identity: (<T>(args: T) => T)

    Type declaration

      • <T>(args: T): T
      • Return self or reactive proxy of self

        Type Parameters

        • T

        Parameters

        • args: T

        Returns T

    LocodeRoutes: { body?: string; doc?: string; edit?: string; new?: string; op?: string; preview?: string; provider?: string; skip?: string; tab?: string }

    Custom route params used in Locode

    Type declaration

    • Optional body?: string
    • Optional doc?: string
    • Optional edit?: string
    • Optional new?: string
    • Optional op?: string
    • Optional preview?: string
    • Optional provider?: string
    • Optional skip?: string
    • Optional tab?: string
    LocodeRoutesExtend: { onEditChange: any; uiHref: any; update: any }

    Route methods used in Locode

    Type declaration

    • onEditChange:function
      • onEditChange(any: any): void
    • uiHref:function
      • uiHref(any: any): string
    • update:function
      • update(): void
    LocodeSettings: { events: { lookup: any; op: any; opProp: any }; clearPrefs: any; hasPrefs: any; lookup: any; op: any; opProp: any; saveLookup: any; saveOp: any; saveOpProp: any }

    Manage users query & filter preferences in the Users browsers localStorage

    Type declaration

    • events: { lookup: any; op: any; opProp: any }
      • lookup:function
        • lookup(op: string): string
      • op:function
        • op(op: string): string
      • opProp:function
        • opProp(op: string, name: string): string
    • clearPrefs:function
      • clearPrefs(op: string): void
    • hasPrefs:function
      • hasPrefs(op: string): boolean
    • lookup:function
      • lookup(op: string): any
    • op:function
      • op(op: string): any
    • opProp:function
      • opProp(op: string, name: string): any
    • saveLookup:function
      • saveLookup(op: string, fn: Function): void
    • saveOp:function
      • saveOp(op: string, fn: Function): void
    • saveOpProp:function
      • saveOpProp(op: string, name: string, fn: Function): void
      • Parameters

        • op: string
        • name: string
        • fn: Function

        Returns void

    LocodeStore: { api: ApiResult<AuthenticateResponse>; auth: AuthenticateResponse; authLinks: LinkInfo[]; authPermissions: string[]; authProfileUrl: string | null; authRoles: string[]; baseUrl: string; copied: boolean; debug: boolean; detailSrcResult: any; displayName: string | null; filter: string; filteredSideNav: { expanded: boolean; operations: MetadataOperationType[]; tag: string }[]; isServiceStackType: boolean; modalLookup: any | null; op: MetadataOperationType; opDataModel: string; opDesc: string; opName: string; opViewModel: string; previewResult: string | null; sideNav: { expanded: boolean; operations: MetadataOperationType[]; tag: string }[]; useLang: string; SignIn: any; cachedFetch: any; hasRole: any; init: any; invalidAccess: any; login: any; logout: any; toggle: any }

    Type declaration

    • api: ApiResult<AuthenticateResponse>
    • auth: AuthenticateResponse
    • Readonly authLinks: LinkInfo[]
    • Readonly authPermissions: string[]
    • Readonly authProfileUrl: string | null
    • Readonly authRoles: string[]
    • baseUrl: string
    • copied: boolean
    • debug: boolean
    • detailSrcResult: any
    • Readonly displayName: string | null
    • filter: string
    • Readonly filteredSideNav: { expanded: boolean; operations: MetadataOperationType[]; tag: string }[]
    • Readonly isServiceStackType: boolean
    • modalLookup: any | null
    • Readonly op: MetadataOperationType
    • Readonly opDataModel: string
    • Readonly opDesc: string
    • Readonly opName: string
    • Readonly opViewModel: string
    • previewResult: string | null
    • sideNav: { expanded: boolean; operations: MetadataOperationType[]; tag: string }[]
    • Readonly useLang: string
    • SignIn:function
      • SignIn(opt: any): Function
    • cachedFetch:function
      • cachedFetch(url: string): Promise<string>
    • hasRole:function
      • hasRole(role: string): boolean
    • init:function
      • init(): void
    • invalidAccess:function
      • invalidAccess(): string
    • login:function
      • login(args: any, $on?: Function): void
      • Parameters

        • args: any
        • Optional $on: Function

        Returns void

    • logout:function
      • logout(): void
    • toggle:function
      • toggle(tag: string): void
    Meta: { CACHE: {}; FullTypesMap: Record<string, MetadataType>; HttpErrors: Record<number, string>; OpsMap: Record<string, MetadataOperationType>; Server: AppMetadata; TypesMap: Record<string, MetadataType>; operations: MetadataOperationType[]; tags: string[]; enumValues: any; getIcon: any; getOp: any; getType: any; isEnum: any; locodeUrl: any; urlWithState: any }

    Generic functionality around AppMetadata

    Type declaration

    • CACHE: {}

      Global Cache

      • FullTypesMap: Record<string, MetadataType>

        Map of DTO namespace + names to MetadataType

      • HttpErrors: Record<number, string>

        HTTP Errors specially handled by Locode

      • OpsMap: Record<string, MetadataOperationType>

        Map of Request DTO names to MetadataOperationType

      • Server: AppMetadata

        Server Metadata

      • TypesMap: Record<string, MetadataType>

        Map of DTO names to MetadataType

      • operations: MetadataOperationType[]

        Get list of Request DTOs

      • tags: string[]

        Get list of unique API tags

      • enumValues:function
        • enumValues(type: string): { key: string; value: string }[]
        • Get Enum Values of an Enum Type

          Parameters

          • type: string

          Returns { key: string; value: string }[]

      • getIcon:function
      • getOp:function
      • getType:function
        • getType(typeRef: string | { name: string; namespace?: string }): MetadataType
        • Find MetadataType by DTO name

          Parameters

          • typeRef: string | { name: string; namespace?: string }

          Returns MetadataType

      • isEnum:function
        • isEnum(type: string): boolean
        • Check whether a Type is an Enum

          Parameters

          • type: string

          Returns boolean

      • locodeUrl:function
        • locodeUrl(op: string): string
      • urlWithState:function
        • urlWithState(url: string): string
        • Get URL with initial queryString state

          Parameters

          • url: string

          Returns string

      Routes: { page: string; state: Record<string, any>; href: any; set: any; to: any }

      Reactive store to manage page navigation state and sync with history.pushState

      Type declaration

      • page: string

        The arg name that's used to identify the page name

      • state: Record<string, any>

        Snapshot of the current route state

      • href:function
        • href(args: Record<string, any>): string
        • Return URL of current route state

          Parameters

          • args: Record<string, any>

          Returns string

      • set:function
        • set(args: Record<string, any>): void
        • Populate Route state

          Parameters

          • args: Record<string, any>

          Returns void

      • to:function
        • to(args: Record<string, any>): void
        • Navigate to new route state

          Parameters

          • args: Record<string, any>

          Returns void

      Transition: ((prop: string, enter: boolean) => boolean)

      Type declaration

        • (prop: string, enter: boolean): boolean
        • Invoke a Tailwind Definition Rule

          Parameters

          • prop: string
          • enter: boolean

          Returns boolean

      Variables

      Crud: { AnyRead: string[]; AnyWrite: string[]; Create: string; Delete: string; Patch: string; Update: string; isCreate: ((arg0: any) => any); isCrud: ((arg0: any) => boolean | null); isDelete: ((arg0: any) => any); isPatch: ((arg0: any) => any); isQuery: ((arg0: any) => boolean | null); isUpdate: ((arg0: any) => any) }

      API around CRUD APIs

      Type declaration

      • AnyRead: string[]
      • AnyWrite: string[]
      • Create: string
      • Delete: string
      • Patch: string
      • Update: string
      • isCreate: ((arg0: any) => any)
          • (arg0: any): any
          • Parameters

            • arg0: any

            Returns any

      • isCrud: ((arg0: any) => boolean | null)
          • (arg0: any): boolean | null
          • Parameters

            • arg0: any

            Returns boolean | null

      • isDelete: ((arg0: any) => any)
          • (arg0: any): any
          • Parameters

            • arg0: any

            Returns any

      • isPatch: ((arg0: any) => any)
          • (arg0: any): any
          • Parameters

            • arg0: any

            Returns any

      • isQuery: ((arg0: any) => boolean | null)
          • (arg0: any): boolean | null
          • Parameters

            • arg0: any

            Returns boolean | null

      • isUpdate: ((arg0: any) => any)
          • (arg0: any): any
          • Parameters

            • arg0: any

            Returns any

      Files: Files
      Server: AppMetadata

      Server Metadata containing App capabilities and APIs used to dynamically render the UI

      Types: Types

      Functions

      • apiForm(createClient: Function, requestDto: any, formData: FormData, queryArgs?: any): any
      • High-level API to invoke an API Request by Request DTO, FormData and optional queryString args

        Parameters

        • createClient: Function
        • requestDto: any
        • formData: FormData
        • Optional queryArgs: any

        Returns any

      • apiSend(createClient: Function, requestDto: any, queryArgs?: any): any
      • High-level API to invoke an API Request by Request DTO and optional queryString args

        Parameters

        • createClient: Function
        • requestDto: any
        • Optional queryArgs: any

        Returns any

      • attachment(url: string): string
      • Create HTML Link for file attachment

        Parameters

        • url: string

        Returns string

      • bytes(val: number): string
      • Format bytes into human-readable file size

        Parameters

        • val: number

        Returns string

      • createApp(PetiteVue: { reactive: Identity; createApp: any; nextTick: any }): App
      • App to register and build a PetiteVueApp

        Parameters

        • PetiteVue: { reactive: Identity; createApp: any; nextTick: any }
          • reactive: Identity
          • createApp:function
            • createApp(initialData?: any): any
          • nextTick:function
            • nextTick(fn: Function): void

        Returns App

      • createDto(name: string, obj: any): any
      • Create Request DTO from API Name and map of args

        Parameters

        • name: string
        • obj: any

        Returns any

      • currency(val: number): string
      • Format number into USD currency

        Parameters

        • val: number

        Returns string

      • hasItems(arr: any[]): boolean
      • Check if array is not null or empty

        Parameters

        • arr: any[]

        Returns boolean

      • hasModifierKey(e: KeyboardEvent): boolean
      • Whether any modifier keys were pressed

        Parameters

        • e: KeyboardEvent

        Returns boolean

      • hidden(o: any): string
      • Hides field from being displayed in search results

        Parameters

        • o: any

        Returns string

      • highlight(src: string, language: string): string
      • High-level API around highlight.js to add syntax highlighting to language source cde

        Parameters

        • src: string
        • language: string

        Returns string

      • htmlTag(tag: string, child?: string, attrs?: any): string
      • HTML Tag builder

        Parameters

        • tag: string
        • Optional child: string
        • Optional attrs: any

        Returns string

      • icon(url: string): string
      • Create HTML IMG Icon from URL

        Parameters

        • url: string

        Returns string

      • iconFallbackSrc(src: string, fallbackSrc?: string): string
      • Create icon with fallback

        Parameters

        • src: string
        • Optional fallbackSrc: string

        Returns string

      • iconOnError(img: HTMLImageElement, fallbackSrc?: string): void
      • Handle IMG onerror to populate fallback icon

        Parameters

        • img: HTMLImageElement
        • Optional fallbackSrc: string

        Returns void

      • iconRounded(url: string): string
      • Create rounded HTML IMG Icon from URL

        Parameters

        • url: string

        Returns string

      • indentJson(o: any): string
      • inputClass(invalid?: boolean, cls?: string): string
      • Tailwind CSS classes for standard Input controls

        Parameters

        • Optional invalid: boolean
        • Optional cls: string

        Returns string

      • invalidAccessMessage(op: MetadataOperationType, auth: { permissions: string[]; roles: string[] }): string
      • Return error message if Auth Session cannot access API

        Parameters

        • op: MetadataOperationType
        • auth: { permissions: string[]; roles: string[] }
          • permissions: string[]
          • roles: string[]

        Returns string

      • isAdminAuth(session?: { roles: string[] }): boolean
      • Parameters

        • Optional session: { roles: string[] }
          • roles: string[]

        Returns boolean

      • isInput(e: any): boolean
      • link(href: string, opt?: { cls?: string; rel?: string; target?: string }): string
      • Create formatted HTML A URL links

        Parameters

        • href: string
        • Optional opt: { cls?: string; rel?: string; target?: string }
          • Optional cls?: string
          • Optional rel?: string
          • Optional target?: string

        Returns string

      • linkMailTo(email: string, opt?: { body?: string; cls?: string; rel?: string; subject?: string; target?: string }): string
      • Create formatted HTML A mailto: links

        Parameters

        • email: string
        • Optional opt: { body?: string; cls?: string; rel?: string; subject?: string; target?: string }
          • Optional body?: string
          • Optional cls?: string
          • Optional rel?: string
          • Optional subject?: string
          • Optional target?: string

        Returns string

      • linkTel(tel: string, opt?: { cls?: string; rel?: string; target?: string }): string
      • Create formatted HTML A tel: links

        Parameters

        • tel: string
        • Optional opt: { cls?: string; rel?: string; target?: string }
          • Optional cls?: string
          • Optional rel?: string
          • Optional target?: string

        Returns string

      • map<T, V>(o: T, f: ((T: any) => V)): V
      • Alt solution to optional chaining by only executing fn accessor if object is not null

        example

        let a = b()?.c // equivalent to: let a = map(b(), x => x.c)

        Type Parameters

        • T

        • V

        Parameters

        • o: T
        • f: ((T: any) => V)
            • (T: any): V
            • Parameters

              • T: any

              Returns V

        Returns V

      • parseCookie(str: string): Record<string, string>
      • Parse cookie string into Map

        Parameters

        • str: string

        Returns Record<string, string>

      • setBodyClass(obj: {}): void
      • Set class on document.body if truthy otherwise set no{class}

        Parameters

        • obj: {}
          • [key: string]: any

        Returns void

      • setFavIcon(icon: ImageInfo, defaultSrc: string): void
      • setFavIconSrc(src: string): void
      • Set the browser's page fav icon by src

        Parameters

        • src: string

        Returns void

      • setStyleProperty(props: any): void
      • styleProperty(name: string): string
      • Get CSS style property value

        Parameters

        • name: string

        Returns string

      • toAppUrl(url: any): any | string
      • Return absolute URL from relative URL

        Parameters

        • url: any

        Returns any | string

      • Returns a reactive store that maintains different resolution states:

        remarks

        Events: breakpoint:change - the browser width changed breakpoints

        defaultvalue

        { 2xl:1536, xl:1280, lg:1024, md:768, sm:640 }

        example

        E.g. at 1200px: { 2xl:false, xl:false, lg:true, md:true, sm:true }

        Parameters

        • App: App
        • options: any

        Returns Breakpoints & { current: Breakpoints; previous: Breakpoints; snap: any }

      • usePageRoutes<T>(App: App, ,extend?:T}}: { extend?: T; handlers?: { init?: any; nav?: any; to?: any }; page: string; queryKeys: string[] }): T & Routes
      • remarks

        Events: route:init - loaded from URL route:to - navigated by to() route:nav - fired for both

        Type Parameters

        • T extends unknown

          Maintain page route state:

          • /{pageKey}?{queryKeys}

        Parameters

        • App: App
        • ,extend?:T}}: { extend?: T; handlers?: { init?: any; nav?: any; to?: any }; page: string; queryKeys: string[] }

          opt

          • Optional extend?: T
          • Optional handlers?: { init?: any; nav?: any; to?: any }
            • init?:function
              • init(args: any): void
            • nav?:function
              • nav(args: any): void
            • to?:function
              • to(args: any): void
          • page: string
          • queryKeys: string[]

        Returns T & Routes

      • useTransitions(App: App, transitions: Record<string, boolean>): Transition
      • Implements https://tailwindui.com transition states by encoding in data-transition attr

        example

        data-transition="{ entering: { cls:'transition ease-in-out duration-300 transform', from:'-translate-x-full', to:'translate-x-0'}, leaving: { cls:'transition ease-in-out duration-300 transform', from:'translate-x-0', to:'-translate-x-full' } }" data-transition-for="sidebar"

        Parameters

        • App: App
        • transitions: Record<string, boolean>

        Returns Transition

      Generated using TypeDoc