MAIDR JavaScript API
    Preparing search index...

    Abstract base class for view models that manage UI state and store interactions.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    store: EnhancedStore
    disposables: Disposable[]

    Accessors

    Methods

    • Moves the selection to an explicit index (WAI-ARIA Home/End support). Clamps to [0, targets.length]; targets.length is the virtual search option, mirroring moveDown()'s upper bound so any valid position is addressable.

      Parameters

      • index: number

        The target selection index.

      Returns void

    • Closes the dialog and navigates the active trace to a chosen target.

      The only way into the model from the dialog, so every selection path — a click, an Enter in the listbox, the hotkey — closes and moves in the same order and gets the same guard. A trace can advertise extrema support without implementing the jump (the base navigateToExtrema throws), which would otherwise leave the reader in the GO_TO_EXTREMA scope with the dialog open and nothing announced.

      Parameters

      Returns void

    • Closes the dialog and moves the active trace to a chosen X value.

      The search half of selectTarget, guarded the same way so a trace that cannot honour the move cannot strand the reader in the dialog.

      Parameters

      • value: XValue

        The raw X value to move to.

      Returns boolean

      True when the trace could be moved, false when it offers no X-value navigation and the dialog was therefore left alone.

    • Get available X values paired with their display label. value is the raw XValue (navigation matches on it); label is the x-axis formatted string so the search options read the same as the terse layer text and the extrema target labels (e.g. "Nov 3" rather than the raw "2019-11-03"). Falls back to String(value) only when no formatter was injected or the active layer has no id — every known layer is formatted, configured or not.

      Returns XValueOption[]

      Array of {value, label} options for the search combobox.

    • Check if a trace supports extrema navigation

      Parameters

      • trace: unknown

        The trace to check

      Returns boolean

      True if the trace supports extrema navigation