turbodombuilder - v0.9.5
    Preparing search index...

    Class TurboHeadlessElement<ViewType, DataType, ModelType, EmitterType>

    TurboHeadlessElement

    TurboHeadlessElement class, similar to TurboElement but without extending HTMLElement.

    Type Parameters

    • ViewType extends TurboView = TurboView<any, any>

      The element's view type, if initializing MVC.

    • DataType extends object = object

      The element's data type, if initializing MVC.

    • ModelType extends TurboModel = TurboModel

      The element's model type, if initializing MVC.

    • EmitterType extends TurboEmitter = TurboEmitter<any>

      The element's emitter type, if initializing MVC.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    selected: boolean

    Whether the element is selected or not.

    initialized: boolean
    view: ViewType

    The view (if any) of the element. Only when initializing MVC.

    model: ModelType

    The model (if any) of the element. Only when initializing MVC.

    data: DataType

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

    dataId: string

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

    dataIndex: number

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

    dataSize: number

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

    config: any = {}

    Static configuration object.

    The MVC handler of the element. If initialized, turns the element into an MVC structure.

    Methods

    • Protected

      getPropertiesValue

      Type Parameters

      • Type

      Parameters

      • propertiesValue: Type

        The actual value; could be null.

      • OptionalconfigFieldName: string

        The field name of the associated value in the static config. Will be returned if the actual value is null.

      • OptionaldefaultValue: Type

        The default fallback value. Will be returned if both the actual and config values are null.

      Returns Type

      Returns the value with some fallback mechanisms on the static config field and a default value.

    • initialize

      Returns void

      Initializes the element.

    • Parameters

      • value: any

        The object containing the new configurations.

      Returns void

      Update the class's static configurations. Will only overwrite the set properties.