turbodombuilder - v0.9.66
    Preparing search index...

    Class TurboButtonPopup<ElementTag, ViewType, DataType, ModelType, EmitterType>

    TurboButtonPopup

    Button class for creating Turbo button elements.

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    • Type Parameters

      • ElementTag extends
            | "symbol"
            | "animate"
            | "animateMotion"
            | "animateTransform"
            | "circle"
            | "clipPath"
            | "defs"
            | "desc"
            | "ellipse"
            | "feBlend"
            | "feColorMatrix"
            | "feComponentTransfer"
            | "feComposite"
            | "feConvolveMatrix"
            | "feDiffuseLighting"
            | "feDisplacementMap"
            | "feDistantLight"
            | "feDropShadow"
            | "feFlood"
            | "feFuncA"
            | "feFuncB"
            | "feFuncG"
            | "feFuncR"
            | "feGaussianBlur"
            | "feImage"
            | "feMerge"
            | "feMergeNode"
            | "feMorphology"
            | "feOffset"
            | "fePointLight"
            | "feSpecularLighting"
            | "feSpotLight"
            | "feTile"
            | "feTurbulence"
            | "filter"
            | "foreignObject"
            | "g"
            | "image"
            | "line"
            | "linearGradient"
            | "marker"
            | "mask"
            | "metadata"
            | "mpath"
            | "path"
            | "pattern"
            | "polygon"
            | "polyline"
            | "radialGradient"
            | "rect"
            | "set"
            | "stop"
            | "svg"
            | "switch"
            | "text"
            | "textPath"
            | "tspan"
            | "use"
            | "view"
            | (keyof HTMLElementTagNameMap)
            | (keyof MathMLElementTagNameMap)
            | (keyof TurboElementTagNameMap) = any
      • ViewType extends TurboView<
            object,
            TurboModel<any, any, any, any, any>,
            TurboEmitter<TurboModel<any, any, any, any, any>, KeyType>,
        > = TurboView<any, any, TurboEmitter<TurboModel<any, any, any, any, any>, KeyType>>
      • DataType extends object = object
      • ModelType extends TurboModel<DataType, any, any, any, any> = TurboModel<any, any, any, any, any>
      • EmitterType extends TurboEmitter<TurboModel<any, any, any, any, any>, KeyType> = TurboEmitter<TurboModel<any, any, any, any, any>, KeyType>

      Returns TurboButtonPopup

    Properties

    defaultProperties: TurboRichElementProperties = ...

    Default properties assigned to a new instance.

    childrenOrder: readonly [
        "leftCustomElements",
        "leftIcon",
        "prefixEntry",
        "element",
        "suffixEntry",
        "rightIcon",
        "rightCustomElements",
    ] = ...
    elementTag: ElementTag

    The tag of the text element in the button

    popupClasses: string | string[]
    selected: boolean

    Whether the element is selected or not.

    initialized: boolean

    Whether the element was initialized already or not.

    defaultFeedforwardProperties: TurboElementProperties
    view: ViewType

    The view (if any) of the element.

    model: ModelType

    The model (if any) of the element.

    emitter: TurboEmitter

    The emitter (if any) of the element.

    data: DataType

    The main data block (if any) attached to the element, taken from its model (if any).

    dataId: string

    The ID of the main data block (if any) of the element, taken from its model (if any).

    dataIndex: number

    The numerical index of the main data block (if any) of the element, taken from its model (if any).

    dataSize: number

    The size (number) of the main data block (if any) of the element, taken from its model (if any).

    operators: TurboOperator<
        object,
        TurboView<
            any,
            any,
            TurboEmitter<TurboModel<any, any, any, any, any>, KeyType>,
        >,
        TurboModel<any, any, any, any, any>,
        TurboEmitter<TurboModel<any, any, any, any, any>, KeyType>,
    >[]

    The operators (if any) attached to the element's MVC structure.

    handlers: TurboHandler<TurboModel<any, any, any, any, any>>[]

    The handlers (if any) attached to the element's model. Returns an empty array if no model is set.

    interactors: TurboInteractor<
        object,
        TurboView<
            any,
            any,
            TurboEmitter<TurboModel<any, any, any, any, any>, KeyType>,
        >,
        TurboModel<any, any, any, any, any>,
        TurboEmitter<TurboModel<any, any, any, any, any>, KeyType>,
    >[]

    The interactors (if any) attached to the element's MVC structure.

    tools: TurboTool<
        object,
        TurboView<
            any,
            any,
            TurboEmitter<TurboModel<any, any, any, any, any>, KeyType>,
        >,
        TurboModel<any, any, any, any, any>,
        TurboEmitter<TurboModel<any, any, any, any, any>, KeyType>,
    >[]

    The tools (if any) attached to the element's MVC structure.

    enforcers: TurboEnforcer<
        object,
        TurboView<
            any,
            any,
            TurboEmitter<TurboModel<any, any, any, any, any>, KeyType>,
        >,
        TurboModel<any, any, any, any, any>,
        TurboEmitter<TurboModel<any, any, any, any, any>, KeyType>,
    >[]

    The enforcers (if any) attached to the element's MVC structure.

    unsetDefaultClasses: boolean

    Whether to set the default CSS classes defined in the static config on the element or not. Setting it will accordingly add/remove the CSS classes from the element.

    shadowDOM: boolean
    defaultSelectedClasses: string | string[]
    defaultClasses: string | string[]
    onAttach: Delegate<() => void> = ...

    Delegate fired when the element is attached to DOM.

    onDetach: Delegate<() => void> = ...

    Delegate fired when the element is detached from the DOM.

    onAdopt: Delegate<() => void> = ...

    Delegate fired when the element is adopted by a new parent in the DOM.

    tagName: string

    Accessors

    • set leftCustomElements(value: Element | Element[]): void

      Parameters

      Returns void

      The custom element(s) on the left. Can be set to new element(s) by a simple assignment.

    • get leftIcon(): TurboIcon

      Returns TurboIcon

    • set leftIcon(
          value:
              | string
              | TurboIcon<
                  TurboView<
                      any,
                      any,
                      TurboEmitter<TurboModel<any, any, any, any, any>, KeyType>,
                  >,
                  object,
                  TurboModel<any, any, any, any, any>,
                  TurboEmitter<TurboModel<any, any, any, any, any>, KeyType>,
              >,
      ): void

      Parameters

      Returns void

      The left icon element. Can be set with a new icon by a simple assignment (the name/path of the icon, or a Turbo/HTML element).

    • get prefixEntry(): HTMLElement

      Returns HTMLElement

    • set prefixEntry(value: string | HTMLElement): void

      Parameters

      Returns void

      The left icon element. Can be set with a new icon by a simple assignment (the name/path of the icon, or a Turbo/HTML element).

    • get text(): string

      Returns string

      The text element. Can be set to a new element by a simple assignment. Setting the value to a new string will update the text's textContent with the given string.

    • set text(value: string): void

      Parameters

      • value: string

      Returns void

    • get suffixEntry(): HTMLElement

      Returns HTMLElement

    • set suffixEntry(value: string | HTMLElement): void

      Parameters

      Returns void

      The left icon element. Can be set with a new icon by a simple assignment (the name/path of the icon, or a Turbo/HTML element).

    • get rightIcon(): TurboIcon

      Returns TurboIcon

    • set rightIcon(
          value:
              | string
              | TurboIcon<
                  TurboView<
                      any,
                      any,
                      TurboEmitter<TurboModel<any, any, any, any, any>, KeyType>,
                  >,
                  object,
                  TurboModel<any, any, any, any, any>,
                  TurboEmitter<TurboModel<any, any, any, any, any>, KeyType>,
              >,
      ): void

      Parameters

      Returns void

      The right icon element. Can be set with a new icon by a simple assignment (the name/path of the icon, or a Turbo/HTML element).

    • set rightCustomElements(value: Element | Element[]): void

      Parameters

      Returns void

      The custom element(s) on the right. Can be set to new element(s) by a simple assignment.

    • set popup(value: HTMLElement): void

      The dropdown's popup element.

      Parameters

      Returns void

    Methods

    • Protected Function

      setupUIListeners

      Returns void

      Setup method to initialize and define all input/DOM event listeners of the element. Called on initialize().

    • Function

      destroy

      Returns this

      Itself, allowing for method chaining.

      Destroys the node by removing it from the document and removing all its bound listeners.

    • Function

      initialize

      Returns void

      Initializes the element. It sets up the UI by calling the methods setupUIElements, setupUILayout, setupUIListeners, and setupChangedCallbacks (in this order, if they are defined). This function is called automatically in .setProperties() and when instantiating an element via element(). It is called only once per element (as it checks with the reflected initialized flag).

    • Protected Function

      setupChangedCallbacks

      Returns void

      Setup method intended to initialize change listeners and callbacks. Called on initialize().

    • Protected Function

      setupUIElements

      Returns void

      Setup method intended to initialize all direct sub-elements attached to this element, and store them in fields. Called on initialize().

    • Protected Function

      setupUILayout

      Returns void

      Setup method to create the layout structure of the element by adding all created sub-elements to this element's child tree. Called on initialize().

    • Function

      connectedCallback

      Returns void

      function called when the element is attached to the DOM.

    • Function

      disconnectedCallback

      Returns void

      function called when the element is detached from the DOM.

    • Function

      adoptedCallback

      Returns void

      function called when the element is adopted by a new parent in the DOM.