Hierarchy

  • ComposerState

Constructors

Properties

body: Object

The dynamic component being shown inside the composer.

A reference to the text editor that allows text manipulation.

fields: undefined | {
    content: Stream<string>;
}

Type declaration

  • content: Stream<string>
height: number

The composer's intended height, which can be modified by the user (by dragging the composer handle).

mounted: boolean

If the composer was loaded and mounted.

onExit: undefined | null | {
    callback: (() => boolean);
    message: string;
}

Type declaration

  • callback: (() => boolean)
      • (): boolean
      • Returns boolean

  • message: string
position: {
    FULLSCREEN: string;
    HIDDEN: string;
    MINIMIZED: string;
    NORMAL: string;
}

The composer's current position.

Type declaration

  • FULLSCREEN: string
  • HIDDEN: string
  • MINIMIZED: string
  • NORMAL: string
Position: {
    FULLSCREEN: string;
    HIDDEN: string;
    MINIMIZED: string;
    NORMAL: string;
}

Type declaration

  • FULLSCREEN: string
  • HIDDEN: string
  • MINIMIZED: string
  • NORMAL: string

Methods

  • Determine whether the body matches the given component class and data.

    Parameters

    • type: object

      The component class to check against. Subclasses are accepted as well.

    • data: object = {}

    Returns boolean

  • Computed the composer's current height, based on the intended height, and the composer's current state. This will be applied to the composer content's DOM element.

    Returns string | number

  • Determine whether or not the Composer is covering the screen.

    This will be true if the Composer is in full-screen mode on desktop, or if we are on a mobile device, where we always consider the composer as full-screen..

    Returns boolean

  • Determine whether or not the Composer is visible.

    True when the composer is displayed on the screen and has a body component. It could be open in "normal" or full-screen mode, or even minimized.

    Returns boolean

  • Configure when / what to ask the user before closing the composer.

    The provided callback will be used to determine whether asking for confirmation is necessary. If the callback returns true at the time of closing, the provided text will be shown in a standard confirmation dialog.

    Parameters

    • callback: (() => boolean)
        • (): boolean
        • Returns boolean

    • message: string

    Returns void

Generated using TypeDoc v0.24.8