MessagingService

Source: MessagingService.ts:8

Service for displaying messages and notifications to the user.


Constructor

new MessagingService(): MessagingService

Instance Methods

subscribe(key: string, handler: function)

Subscribe a handler for message display.

Parameters

  • key (string) — Unique key for the handler
  • handler (function) — Function to handle message display

_showMessage(message: string, options: Object): Promise

Show a generic message with options.

Parameters

  • message (string) — The message to display
  • options (Object) — Options for the message display

Returns

  • Promise

showInfo( message: string, title: string | null, options?: Object, ): Promise

Show an info message.

Parameters

  • message (string) — The message to display
  • title (string | null, default: null) — The title of the message (optional)
  • options (Object, optional) — Options for the message display

Returns

  • Promise

showSuccess( message: string, title?: string | null, options?: Object, ): Promise

Show a success message.

Parameters

  • message (string) — The message to display
  • title (string | null, optional, default: null) — The title of the message
  • options (Object, optional) — Options for the message display

Returns

  • Promise

showError( message: string, title?: string | null, options?: Object, ): Promise

Show an error message.

Parameters

  • message (string) — The error message to display
  • title (string | null, optional, default: null) — The title of the error message
  • options (Object, optional) — Options for the message display

Returns

  • Promise

showWarning( message: string, title?: string | null, options?: Object, ): Promise

Show a warning message.

Parameters

  • message (string) — The warning message to display
  • title (string | null, optional, default: null) — The title of the warning message
  • options (Object, optional) — Options for the message display

Returns

  • Promise