Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "state"

Index

Functions

Const getAuthenticationToken

  • getAuthenticationToken(flowKey: string): string
  • Get the authentication token for the current user

    Parameters

    • flowKey: string

    Returns string

Const getComponent

  • Get the state of a specific component

    Parameters

    • id: string

      Id of the component

    • flowKey: string

    Returns IComponentValue

Const getComponents

Const getLocation

  • getLocation(flowKey: string): any
  • Return the users current location. Updated with setLocation

    Parameters

    • flowKey: string

    Returns any

Const getPageComponentInputResponseRequests

Const isAllValid

  • isAllValid(flowKey: string): boolean
  • Call isValid on every components local state. Returns true if every component is valid

    Parameters

    • flowKey: string

    Returns boolean

Const isValid

  • Get the validation result for a components local state

    Parameters

    • id: string

      The component id

    • flowKey: string

    Returns IValidationResult

Const refreshComponents

  • refreshComponents(models: any, flowKey: string): void
  • Reset the local state of each component defined in the models.

    Parameters

    • models: any
    • flowKey: string

    Returns void

Const remove

  • remove(flowKey: string): void
  • Remove the local state for this flow

    Parameters

    • flowKey: string

    Returns void

Const setAuthenticationToken

  • setAuthenticationToken(token: string, flowKey: string): void
  • Update the active authentication token for the current user

    Parameters

    • token: string
    • flowKey: string

    Returns void

Const setComponent

  • setComponent(id: string, value: IComponentValue, flowKey: string, push: boolean): void
  • Update the state of a single component. If clientside validation is enabled the new state will be validated first

    Parameters

    • id: string
    • value: IComponentValue
    • flowKey: string
    • push: boolean

      Set to true to call Collaboration.push after updating the component

    Returns void

Const setComponentError

  • setComponentError(componentId: string, error: any | string, flowKey: string): void
  • Set the error property on a component to an object with message and id properties. If the error argument is a string it will populate the message property

    Parameters

    • componentId: string
    • error: any | string
    • flowKey: string

    Returns void

Const setComponentLoading

  • setComponentLoading(componentId: string, data: any, flowKey: string): void
  • Set the loading property of the component's state to data

    Parameters

    • componentId: string
    • data: any
    • flowKey: string

    Returns void

Const setComponents

  • setComponents(values: any, flowKey: string): void
  • Overwrite the existing state of every component

    Parameters

    • values: any

      The state of each component

    • flowKey: string

    Returns void

Const setLocation

  • setLocation(flowKey: string): void
  • Set the current location to the running users navigator.geolocation if the location.isTrackingEnabled setting is true

    Parameters

    • flowKey: string

    Returns void

Const setState

  • setState(id: string, token: string, mapElementId: string, flowKey: string): void
  • Update the id, token, and map element id of the current state

    Parameters

    • id: string

      The state id

    • token: string
    • mapElementId: string

      Id of the map element the state is currently on

    • flowKey: string

    Returns void

Const setUserTime

  • setUserTime(flowKey: string): void
  • Set the location.time property specifically based on the running users time. Optionally override timezone using the i18n.timezoneOffset setting

    Parameters

    • flowKey: string

    Returns void

Generated using TypeDoc