@samatawy/diagrams
    Preparing search index...

    Class DiagramInspector

    Diagram-specific inspector that wires editor sections to the active diagram selection.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    diagram: DiagramView
    inspectorConfig: DiagramInspectorConfig
    host: HTMLElement
    config: Required<InspectorConfig>
    readonly: boolean = false
    definitions: { [key: string]: InspectorPropertyDefinition } = {}
    adapters: Map<string, InspectorAdapter> = ...
    syncingAdapters: boolean = false
    cells: Map<string, HTMLElement> = ...

    Methods

    • Evaluates every row's isVisible() callback and toggles the 'is-hidden' CSS class on its label and value cells. Also hides sections whose every row is hidden. Subclasses may override to apply additional visibility rules.

      Returns void

    • Reads a value from a flat or nested record using the registered adapter for the key. Falls back to dot-path traversal if no adapter is registered.

      Parameters

      • record: EditableRecord

        The source data record.

      • key: string

        The property key, supporting dot-separated paths.

      Returns unknown

      The resolved value, or undefined if not found.

    • Compares two objects using only first-level keys and values.

      Parameters

      • a: Record<string, unknown>
      • b: Record<string, unknown>

      Returns boolean

    • Creates a collapsible section element with a heading and a two-column property grid inside. Returns the section root and the inner grid so rows can be appended to it.

      Parameters

      • heading: string
      • state: "expanded" | "collapsed"

      Returns { section: HTMLElement; grid: HTMLElement }