Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils"

Index

Functions

Const contains

  • contains(collection: any[], id: string, key: string): boolean
  • Check if an array contains item where the key property is equal to id

    Parameters

    • collection: any[]
    • id: string
    • key: string

    Returns boolean

Const convertToArray

  • convertToArray(obj: any): any[]
  • Returns an array with an entry for each property value of the passed in object

    Parameters

    • obj: any

    Returns any[]

Const debounce

  • debounce(func: Function, wait: number, immediate: boolean): (Anonymous function)

Const extractElement

  • extractElement(flowKey: string): string
  • Get the element from a flow key

    Parameters

    • flowKey: string

    Returns string

Const extractFlowId

  • extractFlowId(flowKey: string): string
  • Get the flow id from a flow key

    Parameters

    • flowKey: string

    Returns string

Const extractFlowVersionId

  • extractFlowVersionId(flowKey: string): string
  • Get the flow version id from a flow key

    Parameters

    • flowKey: string

    Returns string

Const extractStateId

  • extractStateId(flowKey: string): string
  • Get the state id from a flow key

    Parameters

    • flowKey: string

    Returns string

Const extractTenantId

  • extractTenantId(flowKey: string): string
  • Get the tenant id from a flow key

    Parameters

    • flowKey: string

    Returns string

Const get

  • get(collection: any[], id: string, key: string): any
  • Get an item from an array where the key property of the item is equal to id

    Parameters

    • collection: any[]
    • id: string
    • key: string

    Returns any

Const getFlowKey

  • getFlowKey(tenantId: string, flowId: string, flowVersionId: string, stateId: string, element: string): any
  • Construct a new flow key

    Parameters

    • tenantId: string
    • flowId: string
    • flowVersionId: string
    • stateId: string
    • element: string

    Returns any

Const getLookUpKey

  • getLookUpKey(flowKey: string): string
  • Get a key in the format of tenantid_stateid derived from the flowKey

    Parameters

    • flowKey: string

    Returns string

Const getNumber

  • getNumber(value: any): number
  • Return value parsed as a number or zero

    Parameters

    • value: any

    Returns number

Const getObjectDataProperty

  • getObjectDataProperty(properties: any[], propertyName: string): any
  • Returns the property where its developerName is equal to the propertyName argument

    Parameters

    • properties: any[]
    • propertyName: string

    Returns any

Const getValueByPath

  • getValueByPath(obj: any, path: string): any

Const guid

  • guid(): string

Const isEmbedded

  • isEmbedded(): boolean
  • Check if the flow is running in an embedded scenario by checking if the documentElement has the manywho class applied

    Returns boolean

Const isEmptyObjectData

  • isEmptyObjectData(model: any): boolean
  • Check if the models objectdata is empty

    Parameters

    • model: any

    Returns boolean

Const isEqual

  • isEqual(value1: string, value2: string, ignoreCase: boolean): boolean
  • Check equality for two strings

    Parameters

    • value1: string
    • value2: string
    • ignoreCase: boolean

    Returns boolean

Const isNullOrEmpty

  • isNullOrEmpty(value: string): boolean
  • Check if a string is null or ""

    Parameters

    • value: string

    Returns boolean

Const isNullOrUndefined

  • isNullOrUndefined(value: any): boolean
  • Check if a value is null or undefined

    Parameters

    • value: any

    Returns boolean

Const isNullOrWhitespace

  • isNullOrWhitespace(value: string): boolean
  • Check if a string is null or only contains whitespace

    Parameters

    • value: string

    Returns boolean

Const isPlaceholderObjectData

  • isPlaceholderObjectData(objectData: any[]): boolean
  • Returns true if the objectdata is a single item and all of its properties content values are null or whitespace

    Parameters

    • objectData: any[]

    Returns boolean

Const isSmallScreen

  • isSmallScreen(flowKey: any): boolean
  • Returns true if the clientWidth is smaller than 768px

    Parameters

    • flowKey: any

    Returns boolean

Const parseQueryString

  • parseQueryString(queryString: string): any

Const removeFlow

  • removeFlow(flowKey: string): void
  • Remove all traces of the flow from the model, settings, state, social, callbacks and DOM. Then inform collaboration the user has left.

    Parameters

    • flowKey: string

    Returns void

Const removeFlowFromDOM

  • removeFlowFromDOM(flowKey: any): void
  • Unmount the flow from the DOM then remove the containing element

    Parameters

    • flowKey: any

    Returns void

Const removeURIParam

  • removeURIParam(uri: any, key: any): string
  • Remove param with the provided key from a url

    Parameters

    • uri: any
    • key: any

    Returns string

Const replaceBrowserUrl

  • replaceBrowserUrl(response: any): void
  • Update the url in the browser to the join url

    Parameters

    • response: any

    Returns void

Const setObjectDataProperty

  • setObjectDataProperty(properties: any[], propertyName: string, value: string | number | boolean): void
  • Set the contentValue of a property that matches the propertyName

    Parameters

    • properties: any[]
    • propertyName: string
    • value: string | number | boolean

    Returns void

Const setURIParam

  • setURIParam(uri: any, key: any, value: any): string
  • Update a url with provided key and value

    Parameters

    • uri: any
    • key: any
    • value: any

    Returns string

Const whenAll

  • whenAll(deferreds: JQueryDeferred<any[]>[]): JQueryDeferred<any>

Generated using TypeDoc