@uportal/notification-icon
v1.0.4
Published
[](https://www.npmjs.com/package/@uportal/notification-icon) [.
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-icon>
takes the following attributes:
notification-api-url
Url to connect notification-endpoint. Defaults to /NotificationPortlet/api/v2/notifications
.
<notification-icon
notification-api-url="/NotificationPortlet/api/v2/notifications"
></notification-icon>
user-info-api-url
Url to connect to oidc. The default for this value is /uPortal/api/v5-1/userinfo
.
<notification-icon user-info-api-url="/uPortal/api/v5-1/userinfo"></notification-icon>
see-all-notifications-url
Path to a page in uportal to navigate to for "see all notifications" link.
<notification-icon see-all-notifications-url="/uPortal/p/notification"></notification-icon>
count-all-notifications
Flag to tell component to count all notifications vs unread notifications in alert icon.
<notification-icon count-all-notifications="true"></notification-icon>
navigation-strategy
A flag to tell the component to navigate to an external link from data or a provided uPortal page (likely the notification-list).
Options: list, link
<notification-icon navigation-strategy="list"></notification-icon>
debug
Skips oidc call for api token.
<notification-icon debug></notification-icon>
Project setup
npm install
Compiles and hot-reloads for development
npm run start
Compiles and minifies for production
npm run build
Run your tests
npm run test
Lints and fixes files
npm run lint
Options
count-all-notifications
(optional, boolean): by default the notifications icon will display a count of unread items,true
will display a count of all (read and unread) items for the user.