Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @okikio/native

Index

Type aliases

TypeAdvancedManager

TypeAdvancedManager: AdvancedManager<any, ManagerItem>

TypeAllEvents

TypeAllEvents: "REQUEST_ERROR" | "TIMEOUT_ERROR" | "ANCHOR_HOVER" | "HOVER" | "ANCHOR_CLICK" | "CLICK" | "PREFETCH" | "POPSTATE" | "POPSTATE_BACK" | "POPSTATE_FORWARD" | "HISTORY_NEW_ITEM" | "GO" | "NAVIGATION_START" | "PAGE_LOADING" | "PAGE_LOAD_COMPLETE" | "NAVIGATION_END" | "TRANSITION_START" | "TRANSITION_END" | "BEFORE_TRANSITION_OUT" | "AFTER_TRANSITION_OUT" | "CONTENT_INSERT" | "CONTENT_REPLACED" | "BEFORE_TRANSITION_IN" | "AFTER_TRANSITION_IN" | "READY" | "ready" | "SCROLL" | "scroll" | "RESIZE" | "resize"

TypeAppListenerCallback

TypeAppListenerCallback: (...args: TypeEmitArgs) => void

Type declaration

TypeAsyncFn

TypeAsyncFn: (value?: any) => void

Type declaration

    • (value?: any): void
    • The async function type, allows for smooth transition between Promises

      Parameters

      • Optional value: any

      Returns void

TypeConfigKeys

TypeConfigKeys: keyof typeof CONFIG_DEFAULTS | string

TypeEmitArgs

TypeEmitArgs: ((ITransitionData & { href: string; oldHref: string; transitionName: string }) | TypeStateEvent | Error | void | any)[]

TypeIgnoreURLsList

TypeIgnoreURLsList: (RegExp | string)[]

TypeLinkEvent

TypeLinkEvent: MouseEvent | TouchEvent

TypeRouteMethod

TypeRouteMethod: (...args: any) => any

Type declaration

    • (...args: any): any
    • Parameters

      • Rest ...args: any

      Returns any

TypeRoutePath

TypeRoutePath: (IRouteToFrom & ({ to: TypeRouteStyle } | { from: TypeRouteStyle })) | TypeRouteStyle

TypeRouteStyle

TypeRouteStyle: string | RegExp | boolean | TypeRouteStyle[]

TypeStateEvent

TypeStateEvent: TypeLinkEvent | PopStateEvent

TypeTrigger

TypeTrigger: HTMLAnchorElement | "HistoryManager" | "popstate" | "back" | "forward"

Variables

CONFIG_DEFAULTS

CONFIG_DEFAULTS: ICONFIG = ...

PARSER

PARSER: DOMParser = ...

Parses strings to DOM

TRANSITION_REPLACE

TRANSITION_REPLACE: ITransition = ...

The Default Transition, it replaces the container with the new page container

Functions

Const changeState

  • changeState(action: "replace" | "push", state: IState, item: object): void
  • Either push or replace history state

    Parameters

    • action: "replace" | "push"
    • state: IState
    • item: object

    Returns void

Const clean

  • clean(url: string | URL): string
  • Removes the hash from the full URL for a clean URL string

    Parameters

    • url: string | URL

    Returns string

Const equal

  • equal(a: string | URL, b: string | URL): boolean
  • Compares two URLs to each other

    Parameters

    • a: string | URL
    • b: string | URL

    Returns boolean

Const getHash

  • getHash(url: string | URL): string
  • Returns the actual hash without the hashtag

    Parameters

    • url: string | URL

    Returns string

Const getHashedPath

  • getHashedPath(url: string | URL): string
  • Returns the pathname with the hash at the end

    Parameters

    • url: string | URL

    Returns string

Const hashAction

  • Auto scrolls to an elements position if the element has an hash

    Parameters

    • Optional coords: ICoords
    • hash: string = ...

    Returns ICoords

Const ignoreURLs

  • Check if url is supposed to be ignored

    Parameters

    Returns boolean

Const methodCall

  • methodCall(manager: Manager<any, any>, method: string, ...args: any): void
  • Calls the method of a certain name for all items that are currently installed

    Parameters

    • manager: Manager<any, any>
    • method: string
    • Rest ...args: any

    Returns void

Const newConfig

  • Parameters

    Returns ICONFIG

Const newCoords

  • newCoords(x?: number, y?: number): ICoords
  • A quick snapshot of page scroll coordinates

    Parameters

    • x: number = ...
    • y: number = ...

    Returns ICoords

Const newState

  • Creates a state; a state represents the current status of the page consisting of properties like: url, transition, and data

    Parameters

    Returns IState

Const newURL

  • newURL(url?: string | URL | Location): URL
  • Parameters

    • url: string | URL | Location = ...

    Returns URL

Const toAttr

  • Converts config properties into properly formatted data attributes

    Parameters

    Returns any

Generated using TypeDoc