Skip to main content

FDC3 Interop.IO notifications listener

This is a utility element that pipes notifications to Interop.io notifications Use cases:

  • Display notifications in the Interop.io Notifications panel

Examples

Declaration

<rapid-interop-notification-listener></rapid-interop-notification-listener>

Usage

@customElement({
name: 'my-element',
template: html`
<rapid-interop-notification-listener
resource-name="ALL_NOTIFY_ALERT_RECORDS"
:toastButtons="${(): ToastButton[] => [
{
condition: ({details}) => details.NOTIFY_SEVERITY !== 'Warning',
action: ({details, buttonElement, toastElement}) => {
console.log({details, buttonElement, toastElement});
toastElement.close();
},
appearance: 'secondary-orange',
placeholder: 'Dismiss',
},
]}"
></rapid-interop-notification-listener>
`,
})
export class MyElement extends GenesisElement {}

DOM API

Property and attribute binding examples for Genesis Component syntax. Closing tag omitted.

Attributes

AttributeTypeUseExample
resource-namestringThe name of the server resource that pushes notifications to the client
    <rapid-interop-notification-listener resource-name="ALL_NOTIFY_ALERT_RECORDS">

Properties

PropertyTypeUseExample
toastButtons

ToastButton[]

An array of configs for showing buttons. Buttons appear in notifications when the condition callback returns true. The action callback is called when the corresponding button is clicked
    <rapid-interop-notification-listener :toastButtons=${() => [
{
condition: ({details}) => details.NOTIFY_SEVERITY !== 'Warning',
action: ({details, buttonElement, toastElement}) => {
console.log({details, buttonElement, toastElement});
toastElement.close();
},
appearance: 'secondary-orange',
placeholder: 'Dismiss',
},
]}>

Slots

This component has no slots.

Parts

This component has no parts.

Fired Events

This component doesn't fire any events.

Listened Events

This component doesn't listen to any events.