Options
All
  • Public
  • Public/Protected
  • All
Menu

This class allows you to control the UI state and the Unblu individual UI.

Hierarchy

  • UnbluUiApi

Index

Events

UI_ACTIVE_INDIVIDUAL_UI_VIEW_CHANGE: "uiActiveIndividualUiViewChange" = 'uiActiveIndividualUiViewChange'

Event emitted every time individual UI view changes.

NOTE: This event is also triggered when an individual UI view change happens, but the UI isn't visible, for example, because it's collapsed.

see

on for listener registration

see

UiActiveIndividualUiViewChangeListener

UI_STATE_CHANGE: "uiStateChange" = 'uiStateChange'

Event emitted every time the state of the individual UI is changed.

see

on for listener registration

see

UiStateChangeListener

Methods

  • collapseIndividualUi(): Promise<void>
  • Collapses the individual UI if it was open. - Does nothing if it was already collapsed.

    Returns Promise<void>

  • Get the active individual UI view.

    NOTE: The view being active doesn't necessarily mean it's visible to the user. The UI as a whole may be collapsed, for instance.

    see

    getIndividualUiState

    Returns Promise<ActiveIndividualUiView>

    A promise that resolves to the ActiveIndividualUiView of the individual UI.

  • Get the state of the individual UI.

    Returns Promise<IndividualUiState>

    A promise that resolves to the IndividualUiState of the individual UI.

  • maximizeIndividualUi(): Promise<void>
  • Maximize the individual UI - Does nothing if it is already maximized or popped out.

    Returns Promise<void>

  • minimizeIndividualUi(): Promise<void>
  • Minimize the individual UI - Does nothing if it is already minimized.

    Returns Promise<void>

  • off(event: GeneralEventType, listener: Listener): boolean
  • Removes a previously registered listener

    Parameters

    • event: GeneralEventType

      The event to unregister from.

    • listener: Listener

      The listener to remove.

    Returns boolean

  • openIndividualUi(): Promise<void>
  • Opens the individual UI if it was collapsed. - Does nothing if it was already open.

    Returns Promise<void>

  • openOverviewUi(): Promise<void>
  • Navigates the individual UI to the overview UI.

    Be aware that this method will force to close any currently open conversation. Depending on the conversation's configuration and the activity in it a prompt may be displayed that has to be accepted by the visitor before the navigation to the overview can happen.

    NOTE: calling this method will NOT automatically open the Unblu UI if it is collapsed. Use openIndividualUi if this is needed.

    Returns Promise<void>

  • openPinEntryUi(): Promise<void>
  • Navigates the individual UI to the PIN entry UI.

    NOTE: calling this method will NOT automatically open the Unblu UI if it is collapsed. Use openIndividualUi if this is needed.

    Returns Promise<void>

  • popinIndividualUi(): Promise<void>
  • Pop-in the individual UI when it is in POPPED_OUT state.

    The pop-out window will automatically close and the individual UI will be displayed in the original window again.

    Returns Promise<void>

  • popoutIndividualUi(): Promise<void>
  • Pop-out the individual UI into a separate window.

    NOTE: this has to be called in a click-event in order to be able to open the pop-up window without being blocked by the browser!

    Returns Promise<void>

  • toggleIndividualUi(): Promise<void>
  • Opens the individual UI if it is collapsed and collapses it if it is open.

    Returns Promise<void>