map.apps Bundle APIs 4.20.0
    Preparing search index...

    Interface TextLabelActionDefinition

    An action definition that provides a text label.

    interface TextLabelActionDefinition {
        icon?: string;
        id: string;
        isVisibleForItem(item: TocItem): boolean | Promise<boolean>;
        label?: string;
        labelMore?: string;
        trigger(item: TocItem): void;
        truncationThreshold?: number;
        type: "text-label";
        valueOf(item: TocItem): undefined | string;
    }

    Hierarchy (View Summary)

    Index

    Properties

    icon?: string

    Icon of the menu entry.

    id: string

    This action's unique id.

    label?: string

    A textual label (or title) for this action.

    labelMore?: string

    Label for the "show more" link.

    truncationThreshold?: number

    Threshold that defines when to auto shorten the text and provide a "show more" link instead.

    If set to -1 text is never truncated.

    type: "text-label"

    The type of this action.

    Methods

    • Returns true if the action shall be available for the given item. Should return false otherwise.

      Note that this method may be asynchronous (i.e. return a Promise<boolean>).

      Parameters

      Returns boolean | Promise<boolean>

    • Called when the "show more" link is clicked. Must be implemented if truncationThreshold is used.

      Parameters

      Returns void

    • Returns a text representation for the given item.

      Parameters

      Returns undefined | string