@uportal/notification-list
v1.0.4
Published
[](https://www.npmjs.com/package/@uportal/notification-list) [.
Notice
We have a /proxy/ leading the oidc-url attribute. This is a developer convenience to be able to query against your local running instance of uPortal. The proxy is configured in package.json:
"proxy": {
"/proxy": {
"target": "http://localhost:8080",
"changeOrigin": true,
"pathRewrite": {
"^/proxy": "/"
}
}
},Attributes
<notification-list> takes the following attributes:
notification-api-url
Url to connect notification-endpoint. Defaults to /NotificationPortlet/api/v2/notifications.
<notification-list oidc-url="/NotificationPortlet/api/v2/notifications"></notification-list>oidc-url
Url to connect to oidc. The default for this value is /uPortal/api/v5-1/userinfo.
<notification-list oidc-url="/uPortal/api/v5-1/userinfo"></notification-list>color-map
A map of colors associated with notification categories. The component will choose the first category defined to determine this.
<notification-list
color-map='{
"Announcement": "#6649bb",
"Holds": "#487df9",
"To-Do": "#c85a89"
}'
></notification-list>debug
Skips oidc call for api token.
<notification-list debug></notification-listTheming
Currently this component supports CSS Variables for overriding button colors. Defining the following variables will change the colors for the component accordingly. They will fall back to the colors described below.
You should define this in your custom stylesheet.
fg = foreground (text) bg = background
:root {
--notif-list-icon-ph-color: #999; /* color of list icon (category) default color */
--notif-unread-bg-color: aliceblue; /* background color of unread notifications */
--notif-read-bg-color: white; /* background color of read notifications */
--notif-highlight-bg-color: honeydew; /* background color of highlighted notifications */
--notif-list-item-dd-width: 12px; /* size of ellipsis-v icon trigger for dropdown */
--notif-list-item-dd-height: 28px; /* size of ellipsis-v icon trigger for dropdown */
}