Skip to content

vue-mvvm / toast / InfoToastControl

InfoToastControl ​

A specialized ToastControl for displaying informational messages that automatically disappear.

Extends ​

Constructors ​

Constructor ​

ts
new InfoToastControl(options): InfoToastControl;

Parameters ​

options ​

InfoToastOptions

Returns ​

InfoToastControl

Inherited from ​

ToastControl.constructor

Properties ​

ctx ​

ts
protected readonly ctx: ReadableGlobalContext;

Represents a readonly global context that provides features like DI

Inherited from ​

ToastControl.ctx


description ​

ts
readonly description: string;

Inherited from ​

ToastControl.description


destroyed ​

ts
readonly destroyed: boolean;

Inherited from ​

ToastControl.destroyed


duration ​

ts
protected readonly duration: number;

options ​

ts
protected readonly options: InfoToastOptions;

Inherited from ​

ToastControl.options


title ​

ts
readonly title: string;

Inherited from ​

ToastControl.title


type ​

ts
readonly type: "error" | string & object | "info" | "warning";

Inherited from ​

ToastControl.type


DEFAULT_DURATION ​

ts
static DEFAULT_DURATION: number = 5000;

The default duration (in milliseconds) before the toast is automatically destroyed.

Methods ​

activated() ​

ts
protected activated(): void | Promise<void>;

Hook for Vue's onActivated

Returns ​

void | Promise<void>

Inherited from ​

ToastControl.activated


beforeMount() ​

ts
protected beforeMount(): void | Promise<void>;

Hook for Vue's onBeforeMount

Returns ​

void | Promise<void>

Inherited from ​

ToastControl.beforeMount


beforeUnmount() ​

ts
protected beforeUnmount(): void | Promise<void>;

Hook for Vue's onBeforeUnmount

Returns ​

void | Promise<void>

Inherited from ​

ToastControl.beforeUnmount


beforeUpdate() ​

ts
protected beforeUpdate(): void | Promise<void>;

Hook for Vue's onBeforeUpdate

Returns ​

void | Promise<void>

Inherited from ​

ToastControl.beforeUpdate


computed() ​

Call Signature ​

ts
protected computed<T>(getter): T;
Type Parameters ​
T ​

T

Parameters ​
getter ​

ComputedGetter<T>

Returns ​

T

Inherited from ​

ToastControl.computed

Call Signature ​

ts
protected computed<T>(options): T;
Type Parameters ​
T ​

T

Parameters ​
options ​
get ​

ComputedGetter<T>

set ​

ComputedSetter<T>

Returns ​

T

Inherited from ​

ToastControl.computed


deactivated() ​

ts
protected deactivated(): void | Promise<void>;

Hook for Vue's onDeactivated

Returns ​

void | Promise<void>

Inherited from ​

ToastControl.deactivated


destroy() ​

ts
destroy(): Promise<void>;

Destroys the toast and removes it from the screen.

Returns ​

Promise<void>

Inherited from ​

ToastControl.destroy


getUserControl() ​

ts
protected getUserControl<T>(ref): T | null;

Collect UserControl that are bound to the View using a Vue.js template ref

Type Parameters ​

T ​

T extends | UserControl | UserControl[]

Parameters ​

ref ​

string

The Vue.js Template ref

Returns ​

T | null

UserControl of the bounded UI Element

Inherited from ​

ToastControl.getUserControl


mounted() ​

ts
protected mounted(): void;

Hook for Vue's onMounted

Returns ​

void

Overrides ​

ToastControl.mounted


onDestroy() ​

ts
protected onDestroy(): void | Promise<void>;

Called when the toast is being destroyed.

Returns ​

void | Promise<void>

Inherited from ​

ToastControl.onDestroy


readonly() ​

ts
protected readonly<T>(value): T;

Type Parameters ​

T ​

T

Parameters ​

value ​

T

Returns ​

T

Inherited from ​

ToastControl.readonly


ref() ​

ts
protected ref<T>(initial): T;

Type Parameters ​

T ​

T

Parameters ​

initial ​

T

Returns ​

T

Inherited from ​

ToastControl.ref


runAction() ​

ts
protected runAction<T>(action): Promise<ActionResult<T>>;

Executes an MVVM Action and returns its result as a promise.

Notes

  • The action body may be synchronous or asynchronous; both are supported.
  • If the action tries to complete/fail more than once, a Vue warning is emitted and further attempts are ignored.

Type Parameters ​

T ​

T

Parameters ​

action ​

Action<T>

The action object implementing Action interface.

Returns ​

Promise<ActionResult<T>>

A promise that resolves with an ActionResult carrying either the data on success or an error on failure.

Inherited from ​

ToastControl.runAction


unmounted() ​

ts
protected unmounted(): void;

Hook for Vue's onUnmounted

Returns ​

void

Overrides ​

ToastControl.unmounted


updated() ​

ts
protected updated(): void | Promise<void>;

Hook for Vue's onUpdated

Returns ​

void | Promise<void>

Inherited from ​

ToastControl.updated


watch() ​

ts
protected watch(
   source, 
   cb, 
   options?): WatchHandle;

Sets up a watch on a reactive source and registers the watch handle. Allows tracking and managing the lifecycle of the watch handle within the class.

Additionally, watchers are automatically disposed after the component is unmounted and all lifecycle hooks have finished executing.

Parameters ​

source ​

WatchSource

The reactive source to watch.

cb ​

WatchCallback

The callback function that gets triggered when the source changes.

options? ​

WatchOptions<boolean>

Optional configuration object for the watcher (e.g., deep, immediate).

Returns ​

WatchHandle

A custom watch handle with methods to stop, pause, and resume the watcher.

Inherited from ​

ToastControl.watch