Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "model"

Index

Functions

Const addNotification

  • addNotification(flowKey: string, notification: INotification): void

Const deleteFlowModel

  • deleteFlowModel(flowKey: string): void
  • Remove the local cache of the model for this state

    Parameters

    • flowKey: string

    Returns void

Const getChildren

  • getChildren(containerId: string, flowKey: string): any[]
  • Get an ordered array of all the child models of a container

    Parameters

    • containerId: string
    • flowKey: string

    Returns any[]

Const getComponent

  • getComponent(componentId: string, flowKey: string): any
  • Get a component by id

    Parameters

    • componentId: string
    • flowKey: string

    Returns any

Const getComponentByName

  • getComponentByName(name: string, flowKey: string): any
  • Get a component by name

    Parameters

    • name: string
    • flowKey: string

    Returns any

Const getComponents

  • getComponents(flowKey: string): any
  • Get all the components

    Parameters

    • flowKey: string

    Returns any

Const getContainer

  • getContainer(containerId: string, flowKey: string): any
  • Get a container by id

    Parameters

    • containerId: string
    • flowKey: string

    Returns any

Const getDefaultNavigationId

  • getDefaultNavigationId(flowKey: string): string
  • Get the first navigation model configured for this flow

    Parameters

    • flowKey: string

    Returns string

Const getItem

  • getItem(id: string, flowKey: string): any
  • Search the model for a matching container, component, outcome or navigation (in that order) for the given id

    Parameters

    • id: string
    • flowKey: string

    Returns any

Const getLabel

  • getLabel(flowKey: string): any
  • Get the label of the current page

    Parameters

    • flowKey: string

    Returns any

Const getNavigation

  • getNavigation(navigationId: string, flowKey: string): any
  • Get the model for a configured navigation by id

    Parameters

    • navigationId: string
    • flowKey: string

    Returns any

Const getNotifications

  • getNotifications(flowKey: string, position: string): INotification[]
  • Get currently active notifications for a given position

    Parameters

    • flowKey: string
    • position: string

      center, left, right

    Returns INotification[]

Const getOutcome

  • getOutcome(id: string, flowKey: string): any
  • Get an outcome by id

    Parameters

    • id: string
    • flowKey: string

    Returns any

Const getOutcomes

  • getOutcomes(id: string, flowKey: string): any[]
  • Get all the outcomes for a container / component

    Parameters

    • id: string

      Id of the component or container that the outcomes are associated with

    • flowKey: string

    Returns any[]

Const initializeModel

  • initializeModel(flowKey: string): void
  • Create a new empty model for this state

    Parameters

    • flowKey: string

    Returns void

Const isContainer

  • isContainer(item: any): boolean
  • Check if an item has the property containerType

    Parameters

    • item: any

    Returns boolean

Const parseEngineResponse

  • parseEngineResponse(engineInvokeResponse: any, flowKey: string): void
  • Parse the engine response into the model for this state from a FORWARD invoke request. This will setup the model for things like: components, containers, outcomes, faults, votes, etc

    Parameters

    • engineInvokeResponse: any
    • flowKey: string

    Returns void

Const parseEngineSyncResponse

  • parseEngineSyncResponse(response: any, flowKey: string): void
  • Parse the engine response into the model for this state from a SYNC invoke request

    Parameters

    • response: any

      Response from Ajax.invoke

    • flowKey: string

    Returns void

Const parseNavigationResponse

  • parseNavigationResponse(id: string, response: any, flowKey: string, currentMapElementId: string): void
  • Parse the navigation response from Ajax.getNavigation into the model for this state

    Parameters

    • id: string

      Id of the navigation configuration in the flow

    • response: any

      Navigation response returned by Ajax.getNavigation

    • flowKey: string
    • currentMapElementId: string

    Returns void

Const removeNotification

  • removeNotification(flowKey: string, notification: INotification): void

Const setComponents

  • setComponents(flowKey: string, components: any[], data: any): void
  • Set this flow models components property by iterating through the components array merge with the matching container data in data

    Parameters

    • flowKey: string
    • components: any[]
    • data: any

    Returns void

Const setContainers

  • setContainers(flowKey: string, containers: any[], data: any, propertyName?: string): void
  • Set this flow models containers property by iterating through the containers array merge with the matching container data in data

    Parameters

    • flowKey: string
    • containers: any[]
    • data: any
    • Optional propertyName: string

    Returns void

Generated using TypeDoc