furo-ui5-notification #

@furo/ui5 v1.18.0
import '@furo/ui5/src/furo-ui5-notification.js';
exports FuroUi5Notification js
exports <furo-ui5-notification> custom-element-definition
superclass LitElement

Summary: trigger component for notifications

Description #

furo-ui5-notification should be used together witch furo-ui5-notification-list-display or furo-ui5-notification-group-display. you can place those two components into different places. best place the furo-ui5-notification-list(or group)-display on the main site. then you only need one furo-ui5-notification-list(or group)-display. it can work with n furo-ui5-notification.

Example with defaults #

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details.



Attributes and Properties #

dismissButtonText #

default: 'dismiss'

text #

text String

banner text content. Use word to mark as strong. Use \n to insert a line break.

HTML tags will be stripped out.

payload #

payload Object

payload. can be a GRPC error or a notification message collection.

Events #

open-furo-ui5-notification-requested #

at-open-furo-ui5-notification-requested{Object} this

Fired when value open banner is requested

open-furo-ui5-notification-group-requested #

at-open-furo-ui5-notification-group-requested{Object} this

Fired when value open banner is requested

notification-closed. #

at-notification-closed.{Object} payload

Fired when notification is closed.

notification-custom-action #

at-notification-custom-action{Object} payload

Fired when notification custom action is triggered. this is a general action event.

notification-custom-action-commandName #

at-notification-custom-action-commandName{Object} payload

Fired when notification custom action is triggered.

Methods #

parseGrpcStatus #

parseGrpcStatus(status *s* ) ⟹ void


inject a grpc status object parse grpc status object and set the label according to the LocalizedMessage in status. https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto .

  • status
  • s

injectNotificationCollection #

injectNotificationCollection(c `` ) ⟹ void

`` fn-inject-notification-collection

inject an array of notification messages. the notification message should be an array of the following object signature: { “id”: 1, “display_name”: “”, “heading”: “heading 1”, “message_priority”: “High”, “category”: “warning”, “category_priority”: “High”, “actions”: [ { “icon”:“accept”, “command”:“accept”, “text”: “accept” }, { “icon”:“message-error”, “command”:“reject”, “text”: “Reject” } ], “message”: “Markdown | Less | Pretty\n— | — | —\nStill | renders | nicely\n1 | 2 | 3” }

  • c

parseFieldValidityMessages #

parseFieldValidityMessages(fieldViolations `` ) ⟹ void

`` fn-parse-field-validity-messages

Parses the output of dataObject.getValidityMessages and transforms the incoming data into a google.rpc.Status message of type google.rpc.BadRequest with a list of field violations as content

  • fieldViolations