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

alertName: string
button: any
controls: any
expanded: boolean

Whether the panel expands to fill empty space.

PanelInstance

id: string

ID of this panel.

PanelInstance

route: PanelConfigRoute

Specifies which panel screen to display and optional props to be passed to the screen panel component.

PanelConfig

screens: PanelConfigScreens

A collection of panel screens to be displayed inside the panel.

PanelInstance

style: PanelConfigStyle

The style object applied to the panel.

PanelInstance

The config for the element to render the panel screen in (instead of its usual spot in the panel stack).

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

  • get isLeftMostPanel(): boolean
  • Checks if this panel is the leftmost visible and not-teleported panel.

    Returns boolean

    PanelInstance

  • get isRightMostPanel(): boolean
  • Checks if this panel is the rightmost visible and non-teleported panel. Note that a traditional for each loop is used due to reverse traversal of the array.

    Returns boolean

    PanelInstance

  • get width(): undefined | number
  • Returns the width of the panel in pixels or undefined if not set.

    Returns undefined | number

    PanelInstance

Methods

  • Close this panel. This is a proxy to InstanceAPI.panel.close(...).

    Returns this

    PanelInstance

  • Expands/collapses/toggles the expand state of the panel. Panels set to expand fill empty space. This is a proxy to InstanceAPI.panel.expand(...).

    Parameters

    • Optionalexpand: boolean

      Optional. Whether the panel should expand. Toggles if no value is given.

    Returns this

    PanelInstance

  • Checks if a given screen component id is already loaded and ready to render.

    Parameters

    • id: string

    Returns boolean

    PanelInstance

  • Minimize this panel. This is a proxy to InstanceAPI.panel.minimize(...).

    Returns this

    PanelInstance

  • Move this panel left or right in the stack. This is a proxy to InstanceAPI.panel.move(...).

    Parameters

    • direction: PanelDirection

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

    Returns this

    PanelInstance

  • Opens a registered panel in the panel stack. This is a proxy to InstanceAPI.panel.open(...).

    • somePanel.open() -- opens the panel on the first screen in the set
    • somePanel.open('screen-id') -- opens the panel on the 'screen-id' screen
    • somePanel.open({ screen: 'screen-id', props: {... } }) -- opens the panel on the 'screen-id' screen passing supplied props to it

    Parameters

    • Optionalvalue: string | {
          props?: object;
          screen: string;
      }

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

    Returns this

    PanelInstance

  • Pin/unpin/toggle (if no value provided) pin status of this panel. When pinning, automatically unpins any previous pinned panel if exists. This is a proxy to InstanceAPI.panel.pin(...).

    Parameters

    • Optionalvalue: boolean

    Returns this

    PanelInstance

  • Loads and register panel screen components. This function should be called just before the screen is to be shown; this will avoid needlessly loading components upfront (sometimes certain screens might not get used at all).

    Parameters

    • id: string

    Returns void

    PanelInstance

  • Remove this panel. This is a proxy to InstanceAPI.panel.remove(...).

    Returns this

    PanelInstance

  • Sets the styles of the specified panel by using a provided CSS styles object. This is a proxy to InstanceAPI.panel.setStyles(...).

    Parameters

    • style: object
    • Optionalreplace: boolean = false

    Returns this

    PanelInstance

  • Sets route to the specified screen id and pass props to the panel screen components. This is a proxy to InstanceAPI.panel.route(...).

    Parameters

    • value: string | PanelConfigRoute

    Returns this

    PanelInstance

  • Toggle panel. This is a proxy to InstanceAPI.panel.toggle(...).

    Parameters

    • Optionalvalue: boolean | {
          props?: object;
          screen: string;
          toggle?: boolean;
      }

    Returns this

    PanelInstance

  • Toggle panel's minimize state. This is a proxy to InstanceAPI.panel.toggleMinimize(...).

    Parameters

    • Optionalvalue: boolean | {
          props?: object;
          screen: string;
          toggle?: boolean;
      }

    Returns this

    PanelInstance