@samatawy/diagrams
    Preparing search index...

    Class InspectorAdapterAbstract

    Base contract for inspector field editors that map between UI controls and property values.

    Hierarchy (View Summary)

    Index

    Constructors

    • Mounts the adapter into the given value cell element.

      Parameters

      • cell: HTMLElement

        The DOM element that will host the adapter's input control.

      • mixedClassName: string

        CSS class applied to the cell when showing a mixed-value placeholder.

      Returns InspectorAdapter

    Properties

    cell: HTMLElement
    mixedClassName: string
    returnKey?: string

    Methods

    • Toggles the mixed-value visual state on the cell element. Mixed state is shown when the selection contains more than one distinct value.

      Parameters

      • mixed: boolean

        True to enter mixed state, false to clear it.

      Returns void

    • Toggles the unset/empty visual state on the cell element.

      Parameters

      • unset: boolean

        True when the current value is undefined or null.

      Returns void

    • Registers the callback invoked whenever the user changes the control value. Pass null to disconnect the handler.

      Parameters

      • handler: ((value: unknown) => void) | null

        The callback to invoke, or null to clear.

      Returns void

    • Fires the registered change handler with the new value. No-op when no handler is registered.

      Parameters

      • value: unknown

        The new value produced by the control.

      Returns void

    • Extracts a key-value pair from a record, optionally by explicit key. Falls back to the first entry in the record when no key is given.

      Parameters

      • record: EditableRecord

        The source record.

      • Optionalkey: string

        Optional explicit key override.

      Returns { key: string; value: unknown }

      An object containing the resolved key and its value.