A base class for anything requiring access to the InstanceApi and instance of Vue app controlled by it.

APIScope

Hierarchy (view full)

Constructors

Properties

The instance of RampMap API scoped to a single Vue R4MP application.

APIScope

panelStore: Store<"panel", _UnwrapAll<Pick<PanelStore,
    | "pinned"
    | "priority"
    | "stackWidth"
    | "remWidth"
    | "mobileView"
    | "reorderable"
    | "items"
    | "regPromises"
    | "orderedItems"
    | "teleported"
    | "visible">>, Pick<PanelStore, "getRemainingWidth">, Pick<PanelStore,
    | "open"
    | "close"
    | "move"
    | "remove"
    | "getVisible"
    | "getRegPromises"
    | "openPanel"
    | "closePanel"
    | "movePanel"
    | "removePanel"
    | "setStackWidth"
    | "setMobileView"
    | "updateVisible"
    | "registerPanel"
    | "addRegPromise">> = ...

Accessors

  • get $element(): App<Element>
  • Returns App<Element>

  • get $vApp(): ComponentPublicInstance
  • The instance of Vue R4MP application controlled by this InstanceAPI. This is just a shorthand for this.$iApi.$vApp.

    Returns ComponentPublicInstance

    APIScope

Methods

  • Expands/collapses the expand state of the panel. Toggles whether the panel expands if no expand value is given.

    Parameters

    • value: string | PanelInstance
    • Optionalexpand: boolean

      Optional. Whether the panel should expand, toggles the value if not set

    Returns undefined | PanelInstance

    the panel instance if the panel is currently registered, undefined otherwise.

    PanelAPI

  • Provides a promise that resolves when the panel(s) have finished registration.

    Type Parameters

    • T extends string | string[]

    Parameters

    • panelId: T

      the panel ID(s) for which the promise is requested

    Returns Promise<T extends string
        ? PanelInstance
        : PanelInstance[]>

    PanelAPI

  • Minimizes the panel specified, mechanically the same as closing however it does not emit the close event so that temporary appbar buttons stay.

    Parameters

    Returns undefined | PanelInstance

    the panel instance if the panel is currently registered, undefined otherwise.

    PanelAPI

  • Moves the specifed visible panel to the left or right.

    Parameters

    • value: string | PanelInstance
    • direction: PanelDirection

      the direction of movement, either "left" or "right".

    Returns undefined | PanelInstance

    the panel instance if the panel is currently registered, undefined otherwise.

    PanelAPI

  • Opens a registered panel in the panel stack.

    • rInstance.panel.open('panel-id') -- opens the 'panel-id' panel on the first screen in the set
    • rInstance.panel.open(<PanelInstance>) -- opens the provided PanelInstance object on the first screen in the set
    • rInstance.panel.open({ id: 'panel-id', screen: 'screen-id' }) -- opens the 'panel-id' panel on the 'screen-id' screen
    • rInstance.panel.open({ id: 'panel-id', screen: 'screen-id', props: {... } }) -- opens the 'panel-id' panel on the 'screen-id' screen passing supplied props to it

    Parameters

    • value: string | PanelInstance | PanelInstancePath

      a panel id, a PanelInstance object or an object of the form { id: <panel-id>, screen: <id>, props: <object> }.

    Returns undefined | PanelInstance

    the panel instance if the panel is currently registered, undefined otherwise.

    PanelAPI

  • Pin/unpin/toggle (if no value provided) pin status of the provided panel. When pinning, automatically unpins any previous pinned panel if exists.

    Parameters

    Returns undefined | PanelInstance

    the panel instance if the panel is currently registered, undefined otherwise.

    PanelAPI

  • Registers a provided panel object and returns the resulting PanelInstance objects. When the panel is registered, all its screens are added to the Vue as components right away.

    Parameters

    Returns PanelInstance

    PanelAPI

  • Registers a set of provided panel objects and returns the resulting PanelInstance object set. When the panel is registered, all its screens are added to the Vue as components right away.

    Parameters

    • value: PanelConfigSet

      a set of PanelConfig objects in the form of { [name: string]: PanelConfig } where keys assumed to be ids

    • Optionaloptions: PanelRegistrationOptions

      a set of options that will apply to all the panel in the set

    Returns PanelInstanceSet

    PanelAPI

  • Registers a new panel containing a screen of HTML content and returns the PanelInstance

    Parameters

    • htmlPanel: HTMLPanelInstance

      a HTMLPanelInstance object corresponding to the new html panel

    Returns PanelInstance

    PanelAPI

  • Sets the styles of the specified panel by using a provided CSS styles object.

    Parameters

    • value: string | PanelInstance
    • style: object
    • Optionalreplace: boolean = false

      merge with existing styles if false; replace if true

    Returns undefined | PanelInstance

    the panel instance if the panel is currently registered, undefined otherwise.

    PanelAPI

  • Sets route to the specified screen id and pass props to the panel screen components.

    Parameters

    Returns undefined | PanelInstance

    the panel instance if the panel is currently registered and the specified screen exists, undefined otherwise.

    PanelAPI

  • Toggle panel.

    Parameters

    • Optionalvalue: string | PanelInstance | PanelInstancePath
    • Optionaltoggle: boolean

      Optional param. True forces a panel open, false forces the panel to close.

    Returns undefined | PanelInstance

    the panel instance if the panel is currently registered, undefined otherwise.

    PanelAPI

  • Toggle panel's minimized state

    Parameters

    • Optionalvalue: string | PanelInstance | PanelInstancePath
    • Optionaltoggle: boolean

      Optional param. True forces a panel open, false forces the panel to minimize.

    Returns undefined | PanelInstance

    the panel instance if the panel is currently registered, undefined otherwise.

    PanelAPI

  • Updates the content of a specific HTML-based screen of a panel, using HTML content

    Parameters

    • panel: string | PanelInstance

      The PanelInstance object, or its respective id, that corresponds to the panel whose content is to be updated.

    • html: {
          [key: string]: string | HTMLElement;
      }

      keyed language object containing HTML content for each language, represented as an HTMLElement object or a string.

      • [key: string]: string | HTMLElement
    • OptionalscreenId: string

      id of the screen to be updated. If not provided, it will update the first screen in the panel

    Returns void

    PanelAPI