turbodombuilder - v0.9.22
    Preparing search index...

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

    TurboProxiedElement

    TurboProxiedElement class, similar to TurboElement but containing an HTML element instead of being one.

    Type Parameters

    • ElementTag extends ValidTag = ValidTag
    • 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.

    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) =
            | "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)
      • ViewType extends TurboView<
            object,
            TurboModel<
                any,
                any,
                any,
                "map"
                | "array",
                TurboDataBlock<any, any, any, any, any>,
            >,
            TurboEmitter<
                TurboModel<
                    any,
                    any,
                    any,
                    "map"
                    | "array",
                    TurboDataBlock<any, any, any, any, any>,
                >,
            >,
        > = TurboView<
            any,
            any,
            TurboEmitter<
                TurboModel<
                    any,
                    any,
                    any,
                    "map"
                    | "array",
                    TurboDataBlock<any, any, any, any, any>,
                >,
            >,
        >
      • DataType extends object = object
      • ModelType extends TurboModel<
            any,
            any,
            any,
            "map"
            | "array",
            TurboDataBlock<any, any, any, any, any>,
        > = TurboModel<
            any,
            any,
            any,
            "map"
            | "array",
            TurboDataBlock<any, any, any, any, any>,
        >
      • EmitterType extends TurboEmitter<
            TurboModel<
                any,
                any,
                any,
                "map"
                | "array",
                TurboDataBlock<any, any, any, any, any>,
            >,
        > = TurboEmitter<any>

      Returns TurboProxiedElement<ElementTag, ViewType, DataType, ModelType, EmitterType>

    Properties

    selected: boolean

    Whether the element is selected or not.

    initialized: boolean

    Whether the element was initialized already or not.

    view: ViewType

    The view (if any) of the element.

    model: ModelType

    The model (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).

    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.

    config: any = ...

    Static configuration object.

    The HTML (or other) element wrapped inside this instance.

    mvc: Mvc<
        TurboProxiedElement<
            ElementTag,
            ViewType,
            DataType,
            ModelType,
            EmitterType,
        >,
        ViewType,
        DataType,
        ModelType,
        EmitterType,
    > = ...

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

    Methods

    • Protected Function

      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.

    • 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).

    • Parameters

      • value: any

        The object containing the new configurations.

      Returns void

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

    • Returns void

    • Returns void

    • Returns void

    • Returns void