Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "component"

Index

Functions

Const appendFlowContainer

  • appendFlowContainer(flowKey: string): HTMLElement
  • Adds a div element as the React target for the flow to the element targetted by the containerSelector setting

    Parameters

    • flowKey: string

    Returns HTMLElement

Const focusInput

  • focusInput(flowKey: string): void
  • Focus the first input or textarea control on larger screen devices i.e. width > 768px

    Parameters

    • flowKey: string

    Returns void

Const get

  • get(model: any): any
  • Get the previously registered component based on the models componentType or containerType

    Parameters

    • model: any

    Returns any

Const getByName

  • getByName(name: string): any
  • Get the previously registered component by name

    Parameters

    • name: string

      Name of the component

    Returns any

Const getChildComponents

  • getChildComponents(children: any[], id: string, flowKey: string): DetailedReactHTMLElement<object, HTMLElement>[]
  • Transform the child models into the relevant components

    Parameters

    • children: any[]
    • id: string
    • flowKey: string

    Returns DetailedReactHTMLElement<object, HTMLElement>[]

Const getDisplayColumns

  • getDisplayColumns(columns: any[]): any[]
  • Get the columns that have isDisplayValue set to true, or contain a property with a developer name of isDisplayValue and a content value of true

    Parameters

    • columns: any[]

    Returns any[]

Const getOutcomes

  • getOutcomes(outcomes: any[], flowKey: string): any[]
  • Transform the outcome models into outcome components

    Parameters

    • outcomes: any[]
    • flowKey: string

    Returns any[]

Const getPageSize

  • getPageSize(model: any, flowKey: any): number
  • Using data from the model and settings to calculate the page size.

    Parameters

    • model: any
    • flowKey: any

    Returns number

    Page limit size

Const getSelectedRows

  • getSelectedRows(model: any, selectedIds: string[]): any[]
  • Get the ObjectData items from the model that match the selected ids

    Parameters

    • model: any
    • selectedIds: string[]

      The internal ids of the selected items

    Returns any[]

Const handleEvent

  • handleEvent(component: Component | React.SFC, model: any, flowKey: any, callback: function): void
  • If the model hasEvents = true perform an Engine.sync then re-render the flow and forceUpdate on the component

    Parameters

    • component: Component | React.SFC
    • model: any
    • flowKey: any
    • callback: function

      Callback that is called after Engine.sync returns

        • (): void
        • Returns void

    Returns void

Const onOutcome

  • onOutcome(outcome: any, objectData: any[], flowKey: string): JQueryDeferred<any>
  • Calls Engine.move then Engine.flowOut if the outcome.isOut is true. Will open a new window instead if the uri or uriTypeElementPropertyId attributes are defined

    Parameters

    • outcome: any
    • objectData: any[]
    • flowKey: string

    Returns JQueryDeferred<any>

    Deffered result from Engine.move

Const register

  • register(name: string, component: Component | React.SFC, alias?: string[]): void
  • Register a React component, that can be fetched later by Name. Optionally provide aliases that will return the same component

    Parameters

    • name: string

      Name to register the component with

    • component: Component | React.SFC
    • Optional alias: string[]

      Extra names that can also be used to fetch the component later

    Returns void

Const registerAlias

  • registerAlias(alias: string, name: string): void
  • Add an alias for a name

    Parameters

    • alias: string
    • name: string

      Name of a previously registered component

    Returns void

Const registerContainer

  • registerContainer(name: string, component: Component | React.SFC): void
  • Register a React component as a container, the name will be prepended with mw-

    Parameters

    • name: string
    • component: Component | React.SFC

    Returns void

Const registerItems

  • registerItems(name: string, component: Component | React.SFC): void
  • Register a React component, the name will be prepended with mw-. An alias of mw-items-container will also be added

    Parameters

    • name: string
    • component: Component | React.SFC

    Returns void

Const scrollToTop

  • scrollToTop(flowKey: string): void
  • Scrolls the window to the top of the flow container

    Parameters

    • flowKey: string

    Returns void

Object literals

Const contentTypes

contentTypes: object

Enum of the supported content types

boolean

boolean: string = "CONTENTBOOLEAN"

content

content: string = "CONTENTCONTENT"

datetime

datetime: string = "CONTENTDATETIME"

encrypted

encrypted: string = "CONTENTENCRYPTED"

list

list: string = "CONTENTLIST"

number

number: string = "CONTENTNUMBER"

object

object: string = "CONTENTOBJECT"

password

password: string = "CONTENTPASSWORD"

string

string: string = "CONTENTSTRING"

Generated using TypeDoc