Class InstanceAPI

Hierarchy

  • InstanceAPI

Constructors

Properties

$element: App<Element>
$i18n: Composer<{}, {}, {}, string, never, string>
$vApp: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>

The instance of Vue R4MP application controlled by this InstanceAPI.

Memberof

InstanceAPI

_isFullscreen: boolean
event: EventAPI
fixture: FixtureAPI
geo: GeoAPI
panel: PanelAPI
startRequired: boolean = false
ui: {
    maptip: MaptipAPI;
}

Type declaration

Accessors

  • get animate(): boolean
  • The current animation status.

    Memberof

    InstanceAPI

    Returns boolean

  • get isFullscreen(): boolean
  • Whether the app is fullscreen.

    Memberof

    InstanceAPI

    Returns boolean

  • get language(): string
  • The current locale string for the app.

    Memberof

    InstanceAPI

    Returns string

  • get screenSize(): null | string
  • The 'screen' size for the app. Returns the largest screen class on the element; 'lg', 'md', 'sm' or 'xs'.

    Memberof

    InstanceAPI

    Returns null | string

  • get started(): boolean
  • Whether the app has been started.

    Memberof

    InstanceAPI

    Returns boolean

Methods

  • Retrieves a global Vue component by its id.

    Memberof

    InstanceAPI

    Parameters

    • id: string

    Returns any

  • Registers a global Vue component given an id and a constructor.

    Memberof

    InstanceAPI

    Type Parameters

    • VC extends ComponentPublicInstanceConstructor<{
          $: ComponentInternalInstance;
          $attrs: Data;
          $data: {};
          $el: any;
          $emit: ((event, ...args) => void);
          $forceUpdate: (() => void);
          $nextTick: (<T>(this, fn?) => Promise<void>);
          $options: ComponentOptionsBase<Readonly<ExtractPropTypes<{}>>, {}, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}> & MergedComponentOptionsOverride;
          $parent: null | ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>;
          $props: {
              class?: unknown;
              key?: string | number | symbol;
              onVnodeBeforeMount?: VNodeMountHook | VNodeMountHook[];
              onVnodeBeforeUnmount?: VNodeMountHook | VNodeMountHook[];
              onVnodeBeforeUpdate?: VNodeUpdateHook | VNodeUpdateHook[];
              onVnodeMounted?: VNodeMountHook | VNodeMountHook[];
              onVnodeUnmounted?: VNodeMountHook | VNodeMountHook[];
              onVnodeUpdated?: VNodeUpdateHook | VNodeUpdateHook[];
              ref?: VNodeRef;
              ref_for?: boolean;
              ref_key?: string;
              style?: unknown;
          };
          $refs: Data;
          $root: null | ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}>;
          $slots: Readonly<InternalSlots>;
          $watch<T>(source, cb, options?) => WatchStopHandle;
      } & Readonly<ExtractPropTypes<{}>> & ShallowUnwrapRef<{}> & ExtractComputedReturns<ComputedOptions> & MethodOptions & ComponentCustomProperties & {}, any, any, any, ComputedOptions, MethodOptions> & ComponentOptionsBase<Readonly<ExtractPropTypes<{}>>, {}, {}, ComputedOptions, MethodOptions, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {}, {}, string, {}, VC> & VNodeProps & AllowedComponentProps & ComponentCustomProps

    Parameters

    • id: string
    • vueConstructor: any

    Returns VC

  • Gets the [cloned] config linked to the current language of the app.

    Memberof

    InstanceAPI

    Returns any

  • Private

    Initializes a Vue R4MP instance with the given config and options

    Parameters

    • Optional configs: RampConfigs

      language-keyed R4MP config

    • Optional options: RampOptions

      startup options for this R4MP instance

    Returns void

  • Reloads Vue R4MP instance with a new config

    Parameters

    • Optional configs: RampConfigs

      language-keyed R4MP config

    • Optional options: RampOptions

      startup options for this R4MP instance

    Returns void

  • Sets the language of the app to the specified string (e.g. 'en' or 'fr').

    Memberof

    InstanceAPI

    Parameters

    • language: string

      The locale string to switch to

    Returns void

  • Toggles fullscreen for the app.

    Memberof

    InstanceAPI

    Returns void

  • Updates the screen reader alert. Use this to inform screen reader users of visual changes in the app (pieces of ui appearing/leaving).

    Memberof

    InstanceAPI

    Parameters

    • alert: string

      the alert to make available to screen readers

    Returns void

  • Returns the pinia store of the specified id, if it exists, else returns undefined.

    Memberof

    InstanceAPI

    Type Parameters

    • T

    Parameters

    • id: string

      the id of the store to return

    Returns undefined | Readonly<T>

Generated using TypeDoc