Skip to content

Notifications

Orbee provides customers with the option to push Notifications to their users. The Notifications will be contained under an ORB element and will have predefined HTML template and styles associated with it.

Notification styles can be overridden through the configuration parameter.

Installation

Installing the Notifications feature requires the Orbee TMS to be installed on your website.

Install before continuing

The main component to enabling notifications on your website is the Notifications Container.

Notifications Container

<orb
  id="orb-notifications-container"
  data-type="widget"
  data-widget="notifications"
  class="orb-notifications-container"
  style="display:none; zIndex: 5000;"
></orb>

Styling

The Notifications Container can be styled by passing in a styles prop to the configuration parameter. The format for this styles prop follows the same specification as the HTML global style object.

Type aliases

Configuration

This plugin provides the following configuration variables:

Variable Type Required Description
maxDisplay number no Max number of notifications to display
position Position no Position of where on the web page the Notifications will be displayed
timeout number (in milliseconds) no Determines how long to show hte notification for.
styles StyleObject no Styles for the notification container

Methods

renderNotifications

renderNotifications (): void

Renders all notifications to the DOM

push

push ( message: string, config: object ): void

Adds a notification to the list of notifications as well as append it to the Notifications Container

pop

pop (): void

Removes the last notification from the list and removes the associated node from the Notifications Container

findActiveNotificationIndex

findActiveNotificationIndex ( notificationId: string ): void

Gets the index of an actie notification by its id

closeNotification

closeNotification ( notificationId: string ): void

Removes a notification from the list by its id

hideNotifications

hideNotifications (): void

Hides all notifications on the web page

showNotifications

showNotifications (): void

Shows all notifications on the web page

Events

Generated

This plugin does not generate any events.

Listening

This plugin does not listen for any events.

Dependencies

This plugin does not depend on any other services or plugins.