@everymatrix/nuts-inbox-widget 1.77.0 → 1.77.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nuts-inbox-widget.cjs.js +1 -1
- package/dist/cjs/nuts-inbox-widget_3.cjs.entry.js +55 -15
- package/dist/collection/components/nuts-notification/constants.js +1 -0
- package/dist/collection/components/nuts-notification/nuts-notification.js +79 -12
- package/dist/collection/components/nuts-popover/nuts-popover.js +2 -2
- package/dist/collection/utils/utils.js +10 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/nuts-inbox-widget.js +1 -1
- package/dist/esm/nuts-inbox-widget_3.entry.js +55 -15
- package/dist/nuts-inbox-widget/nuts-inbox-widget.esm.js +1 -1
- package/dist/nuts-inbox-widget/nuts-inbox-widget_3.entry.js +1 -1
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/tools/plugins/index.d.ts +1 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
- package/dist/types/components/nuts-notification/constants.d.ts +1 -0
- package/dist/types/components/nuts-notification/nuts-notification.d.ts +8 -0
- package/dist/types/components.d.ts +16 -0
- package/dist/types/utils/utils.d.ts +1 -1
- package/hydrate/index.js +53 -12
- package/hydrate/index.mjs +53 -12
- package/package.json +1 -1
|
@@ -76,6 +76,14 @@ export declare class NutsNotification {
|
|
|
76
76
|
* Clienty styling passed as a string
|
|
77
77
|
*/
|
|
78
78
|
clientStyling: string;
|
|
79
|
+
/**
|
|
80
|
+
* Max length of notification text before truncating
|
|
81
|
+
*/
|
|
82
|
+
maxTextLength: number;
|
|
83
|
+
/**
|
|
84
|
+
* Max number of lines before truncating
|
|
85
|
+
*/
|
|
86
|
+
maxLines: number;
|
|
79
87
|
showSettingsModal: boolean;
|
|
80
88
|
messageSeen: boolean;
|
|
81
89
|
messageRead: boolean;
|
|
@@ -99,6 +99,14 @@ export namespace Components {
|
|
|
99
99
|
* Language code of the content
|
|
100
100
|
*/
|
|
101
101
|
"language": string;
|
|
102
|
+
/**
|
|
103
|
+
* Max number of lines before truncating
|
|
104
|
+
*/
|
|
105
|
+
"maxLines": number;
|
|
106
|
+
/**
|
|
107
|
+
* Max length of notification text before truncating
|
|
108
|
+
*/
|
|
109
|
+
"maxTextLength": number;
|
|
102
110
|
/**
|
|
103
111
|
* Unique ID of the notification content
|
|
104
112
|
*/
|
|
@@ -364,6 +372,14 @@ declare namespace LocalJSX {
|
|
|
364
372
|
* Language code of the content
|
|
365
373
|
*/
|
|
366
374
|
"language"?: string;
|
|
375
|
+
/**
|
|
376
|
+
* Max number of lines before truncating
|
|
377
|
+
*/
|
|
378
|
+
"maxLines"?: number;
|
|
379
|
+
/**
|
|
380
|
+
* Max length of notification text before truncating
|
|
381
|
+
*/
|
|
382
|
+
"maxTextLength"?: number;
|
|
367
383
|
/**
|
|
368
384
|
* Unique ID of the notification content
|
|
369
385
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const truncate: (str: string, n: number) => string;
|
|
1
|
+
export declare const truncate: (str: string, n: number, l: number) => string;
|
package/hydrate/index.js
CHANGED
|
@@ -44398,12 +44398,21 @@ function renderAbstractNodeToSVGElement(node, options) {
|
|
|
44398
44398
|
}
|
|
44399
44399
|
|
|
44400
44400
|
const MAX_NOTIFICATION_TEXT_LENGTH = 200;
|
|
44401
|
+
const MAX_NOTIFICATION_LINES = 5;
|
|
44401
44402
|
|
|
44402
|
-
const truncate = (str, n) => {
|
|
44403
|
+
const truncate = (str, n, l) => {
|
|
44403
44404
|
if (!str || n < 0) {
|
|
44404
44405
|
return;
|
|
44405
44406
|
}
|
|
44406
|
-
|
|
44407
|
+
if (str.length > n) {
|
|
44408
|
+
return str.slice(0, n - 1) + '...';
|
|
44409
|
+
}
|
|
44410
|
+
const matches = [...str.matchAll(/<br\s*\/?>|<\/p>/gi)];
|
|
44411
|
+
if (matches.length >= l) {
|
|
44412
|
+
const cutoffIndex = matches[l - 1].index;
|
|
44413
|
+
return str.slice(0, cutoffIndex) + '...';
|
|
44414
|
+
}
|
|
44415
|
+
return str;
|
|
44407
44416
|
};
|
|
44408
44417
|
|
|
44409
44418
|
const nutsNotificationCss = ":host{display:block}p{display:block;margin-block-start:0em;margin-block-end:0em;margin-inline-start:0px;margin-inline-end:0px}.NotificationContainer{animation:show 600ms 100ms cubic-bezier(0.38, 0.97, 0.56, 0.76) forwards;transform-origin:top center;padding:15px;position:relative;display:flex;line-height:20px;justify-content:space-between;align-items:flex-start;border-radius:7px;margin:10px 15px;color:var(--emw--color-white, rgb(255, 255, 255));background:var(--emw--color-gray-400, rgb(35, 35, 43));font-weight:400;font-size:14px;gap:8px;cursor:pointer}@keyframes show{100%{opacity:1;transform:none}}.NotificationContainer .AvatarContainer{margin-right:10px;width:40px;min-width:40px;height:40px;border-radius:50%;display:flex;justify-content:center;align-items:center;font-size:40px;border:1px solid var(--emw--color-gray-200, rgb(82, 82, 102));overflow:hidden}.NotificationContainer .AvatarContainer .Avatar{box-sizing:border-box;position:relative;display:flex;user-select:none;overflow:hidden;width:38px;min-width:38px;height:38px;border-radius:32px;text-decoration:none;border:0px;background-color:transparent;padding:0px;justify-content:center;align-items:center}.NotificationContainer .AvatarContainer .Avatar .AvatarImage{object-fit:cover;width:100%;height:100%;display:block}.NotificationContainer .AvatarContainer .Avatar svg{object-fit:cover;display:block}.NotificationContainer .ContentContainer{display:flex;flex-direction:column;word-break:break-word;text-align:justify}.NotificationContainer .RightActionsContainer{display:flex;flex-direction:column}.NotificationContainer .FlipX{transform:rotateX(180deg) translate(0, 4px)}.NotificationContainer .AccordionArrow{margin-left:4px;transition-duration:0.2s;transition-property:transform}.NotificationContainer .Date{min-width:55px;font-size:12px;font-weight:400;opacity:0.5;line-height:14.4px;color:var(--emw--color-gray-200, rgb(82, 82, 102))}.NotificationContainer .Settings{opacity:0.5;display:inline;cursor:pointer}.Unseen::before{content:\"\";position:absolute;inset:0px;width:5px;border-radius:7px 0px 0px 7px;background:linear-gradient(0deg, var(--emw--color-secondary-20, rgb(255, 81, 47)) 0%, var(--emw--color-secondary, rgb(221, 36, 118)) 100%)}.Unseen:hover .UnseenButton{display:none}.SettingsDropdown{z-index:999;position:absolute;background:var(--emw--color-gray-400, rgb(41, 41, 51));box-shadow:var(--emw--color-gray-20, rgba(0, 0, 0, 0.2)) 0px 5px 20px;border-radius:7px;padding:4px;border:none;transition-property:opacity;transition-duration:150ms;transition-timing-function:ease;opacity:1;width:max-content;display:flex;flex-direction:column;right:50px;top:50px}.SettingsDropdown svg{margin-right:10px}.SettingsDropdown button{font-family:inherit;border:0px;background-color:transparent;outline:0px;width:100%;text-align:left;text-decoration:none;box-sizing:border-box;padding:10px 12px;cursor:pointer;border-radius:7px;display:flex;align-items:center;color:var(--emw--color-white, rgb(255, 255, 255));font-weight:400;font-size:14px}.SettingsDropdown button:hover{background:var(--emw--color-gray-300, rgb(61, 61, 77));transition:300ms}.Wrapper{position:relative}";
|
|
@@ -44547,6 +44556,8 @@ class NutsNotification {
|
|
|
44547
44556
|
this.clientStylingUrl = undefined;
|
|
44548
44557
|
this.translationUrl = '';
|
|
44549
44558
|
this.clientStyling = '';
|
|
44559
|
+
this.maxTextLength = MAX_NOTIFICATION_TEXT_LENGTH;
|
|
44560
|
+
this.maxLines = MAX_NOTIFICATION_LINES;
|
|
44550
44561
|
this.showSettingsModal = false;
|
|
44551
44562
|
this.messageSeen = false;
|
|
44552
44563
|
this.messageRead = false;
|
|
@@ -44591,6 +44602,8 @@ class NutsNotification {
|
|
|
44591
44602
|
// end custom styling area
|
|
44592
44603
|
}
|
|
44593
44604
|
async componentWillLoad() {
|
|
44605
|
+
this.maxTextLength = Number(this.maxTextLength);
|
|
44606
|
+
this.maxLines = Number(this.maxLines);
|
|
44594
44607
|
if (this.translationUrl.length > 2) {
|
|
44595
44608
|
await getTranslations(this.translationUrl);
|
|
44596
44609
|
}
|
|
@@ -44598,23 +44611,49 @@ class NutsNotification {
|
|
|
44598
44611
|
connectedCallback() {
|
|
44599
44612
|
this.messageSeen = this.seen;
|
|
44600
44613
|
this.messageRead = this.read;
|
|
44601
|
-
this.displayedContent = truncate(this.content,
|
|
44614
|
+
this.displayedContent = truncate(this.content, this.maxTextLength, this.maxLines);
|
|
44602
44615
|
this.baseUrl = `${this.backendUrl}/v1/${this.operatorId}`;
|
|
44603
44616
|
}
|
|
44604
44617
|
render() {
|
|
44605
|
-
var _a, _b;
|
|
44618
|
+
var _a, _b, _c;
|
|
44606
44619
|
const sanitizedNotificationBody = DOMPurify.sanitize(this.displayedContent, {
|
|
44607
44620
|
ALLOW_UNKNOWN_PROTOCOLS: true,
|
|
44608
44621
|
ADD_ATTR: ['target', 'rel'],
|
|
44609
|
-
ALLOWED_TAGS: [
|
|
44610
|
-
'
|
|
44611
|
-
'
|
|
44622
|
+
ALLOWED_TAGS: [
|
|
44623
|
+
'b',
|
|
44624
|
+
'u',
|
|
44625
|
+
'i',
|
|
44626
|
+
'br',
|
|
44627
|
+
'a',
|
|
44628
|
+
'em',
|
|
44629
|
+
'h1',
|
|
44630
|
+
'h2',
|
|
44631
|
+
'h3',
|
|
44632
|
+
'h4',
|
|
44633
|
+
'h5',
|
|
44634
|
+
'h6',
|
|
44635
|
+
'strong',
|
|
44636
|
+
'p',
|
|
44637
|
+
'i',
|
|
44638
|
+
'small',
|
|
44639
|
+
'mark',
|
|
44640
|
+
'del',
|
|
44641
|
+
'b',
|
|
44642
|
+
's',
|
|
44643
|
+
'ins',
|
|
44644
|
+
'sub',
|
|
44645
|
+
'sup',
|
|
44646
|
+
'var',
|
|
44647
|
+
'cite',
|
|
44648
|
+
'q',
|
|
44649
|
+
'blockquote'
|
|
44612
44650
|
]
|
|
44613
44651
|
});
|
|
44614
|
-
return (hAsync("div", { key: '
|
|
44652
|
+
return (hAsync("div", { key: 'a74957d743897164ff0f3b3d17707a8db5f433fd', class: "Wrapper" }, hAsync("div", { key: '7dd78a87e080e8ca578620356b2cff9acc9fd64c', class: 'NotificationContainer' + (this.messageSeen ? '' : ' Unseen'), ref: this.assignRefToStylingContainer, onClick: this.notificationActionHandler }, this.badge ? (hAsync("div", { class: "AvatarContainer" }, hAsync("div", { class: "Avatar" }, ((_a = systemIcons[this.badge]) === null || _a === void 0 ? void 0 : _a.icon) ? (hAsync("div", { innerHTML: systemIcons[this.badge].icon })) : (hAsync("img", { class: "AvatarImage", src: this.badge }))))) : (''), hAsync("div", { key: 'ea80f329d9994c429bc6c66f2f414daf7e0771b0', class: "ContentContainer" }, hAsync("div", { key: 'b817eecb9732eeb3b19c438c0fbe6398c822dcf0', innerHTML: sanitizedNotificationBody }), hAsync("p", { key: 'cb2c821ba968bb6e95c5703e94c296857822ae77', class: "Date" }, formatDistanceToNow(new Date(this.date), {
|
|
44615
44653
|
addSuffix: true,
|
|
44616
44654
|
locale: dateFnsLocale(this.language)
|
|
44617
|
-
}))), hAsync("div", { key: '
|
|
44655
|
+
}))), hAsync("div", { key: 'd35902296022dff85e84d2484846a724f4b098af', class: "RightActionsContainer" }, hAsync("div", { key: 'b3f4f5d0452d89e58bf64a10d42140ad0d000f98', class: "Settings", onClick: this.toggleSettingsModal }, hAsync("svg", { key: 'f5dab069aeb97ed7e7055277518b9850e47aa017', width: "24", height: "24", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { key: '79398e37d9fa8fa5fb856d739caaa6b3e343c79a', d: "M20.625 15.5C20.625 16.5547 21.4453 17.375 22.5 17.375C23.5156 17.375 24.375 16.5547 24.375 15.5C24.375 14.4844 23.5156 13.625 22.5 13.625C21.4453 13.625 20.625 14.4844 20.625 15.5ZM9.375 15.5C9.375 14.4844 8.51562 13.625 7.5 13.625C6.44531 13.625 5.625 14.4844 5.625 15.5C5.625 16.5547 6.44531 17.375 7.5 17.375C8.51562 17.375 9.375 16.5547 9.375 15.5ZM16.875 15.5C16.875 14.4844 16.0156 13.625 15 13.625C13.9453 13.625 13.125 14.4844 13.125 15.5C13.125 16.5547 13.9453 17.375 15 17.375C16.0156 17.375 16.875 16.5547 16.875 15.5Z", fill: "currentColor" }))), (((_b = this.content) === null || _b === void 0 ? void 0 : _b.length) > this.maxTextLength ||
|
|
44656
|
+
(((_c = this.content) === null || _c === void 0 ? void 0 : _c.match(/<br\s*\/?>|<\/p>/gi)) || []).length > this.maxLines) && (hAsync("div", { key: 'a75570887a9b7441b38c7cacf63ba525a17e795c', class: "AccordionArrow", innerHTML: systemIcons.arrowDown.icon, ref: this.assignRefToDropdownArrow })))), this.showSettingsModal ? (hAsync("div", { class: "SettingsDropdown" }, hAsync("button", { onClick: this.toggleNotificationRead }, hAsync("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { d: "M14.9434 5.17969C14.2109 4.59375 13.625 4.125 10.1387 1.60547C9.64062 1.25391 8.67383 0.375 8 0.375V0.404297C7.9707 0.404297 7.9707 0.375 7.9707 0.375C7.29688 0.375 6.33008 1.25391 5.83203 1.60547C2.3457 4.125 1.75977 4.59375 1.02734 5.17969C0.675781 5.44336 0.5 5.85352 0.5 6.26367V13.9688C0.5 14.7598 1.11523 15.375 1.90625 15.375H14.0938C14.8555 15.375 15.5 14.7598 15.5 13.9688V6.26367C15.5 5.85352 15.2949 5.44336 14.9434 5.17969ZM9.37695 11.1562C8.9668 11.4785 8.46875 11.6543 8 11.6543C7.50195 11.6543 7.00391 11.4785 6.59375 11.1562L2.375 7.8457V6.49805C2.99023 6 3.72266 5.44336 6.94531 3.12891C7.0332 3.04102 7.15039 2.95312 7.26758 2.86523C7.41406 2.74805 7.73633 2.48438 8 2.33789C8.23438 2.48438 8.55664 2.74805 8.70312 2.86523C8.82031 2.95312 8.9375 3.04102 9.02539 3.12891C12.2188 5.44336 12.9805 6 13.625 6.49805V7.8457L9.37695 11.1562Z", fill: "currentColor" })), translate$1(this.messageRead ? 'markAsUnread' : 'markAsRead', this.language)), hAsync("button", { onClick: this.deleteNotification }, hAsync("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { d: "M4.375 15.4375C4.375 16.1758 4.94922 16.75 5.6875 16.75H13.5625C14.2734 16.75 14.875 16.1758 14.875 15.4375V6.25H4.375V15.4375ZM11.8125 8.4375C11.8125 8.21875 12.0039 8 12.25 8C12.4688 8 12.6875 8.21875 12.6875 8.4375V14.5625C12.6875 14.8086 12.4688 15 12.25 15C12.0039 15 11.8125 14.8086 11.8125 14.5625V8.4375ZM9.1875 8.4375C9.1875 8.21875 9.37891 8 9.625 8C9.84375 8 10.0625 8.21875 10.0625 8.4375V14.5625C10.0625 14.8086 9.84375 15 9.625 15C9.37891 15 9.1875 14.8086 9.1875 14.5625V8.4375ZM6.5625 8.4375C6.5625 8.21875 6.75391 8 7 8C7.21875 8 7.4375 8.21875 7.4375 8.4375V14.5625C7.4375 14.8086 7.21875 15 7 15C6.75391 15 6.5625 14.8086 6.5625 14.5625V8.4375ZM15.3125 3.625H12.25L11.9219 2.99609C11.8398 2.85938 11.7031 2.75 11.5391 2.75H7.68359C7.51953 2.75 7.38281 2.85938 7.30078 2.99609L7 3.625H3.9375C3.69141 3.625 3.5 3.84375 3.5 4.0625V4.9375C3.5 5.18359 3.69141 5.375 3.9375 5.375H15.3125C15.5312 5.375 15.75 5.18359 15.75 4.9375V4.0625C15.75 3.84375 15.5312 3.625 15.3125 3.625Z", fill: "currentColor" })), translate$1('removeMessage', this.language)))) : ('')));
|
|
44618
44657
|
}
|
|
44619
44658
|
get el() { return getElement(this); }
|
|
44620
44659
|
static get watchers() { return {
|
|
@@ -44646,6 +44685,8 @@ class NutsNotification {
|
|
|
44646
44685
|
"clientStylingUrl": [513, "client-styling-url"],
|
|
44647
44686
|
"translationUrl": [513, "translation-url"],
|
|
44648
44687
|
"clientStyling": [1537, "client-styling"],
|
|
44688
|
+
"maxTextLength": [514, "max-text-length"],
|
|
44689
|
+
"maxLines": [514, "max-lines"],
|
|
44649
44690
|
"showSettingsModal": [32],
|
|
44650
44691
|
"messageSeen": [32],
|
|
44651
44692
|
"messageRead": [32],
|
|
@@ -44654,7 +44695,7 @@ class NutsNotification {
|
|
|
44654
44695
|
},
|
|
44655
44696
|
"$listeners$": [[8, "allNotificationsRead", "allNotificationsReadHandler"], [8, "settingsOpened", "settingsOpenedHandler"], [8, "click", "clickOutsideHandle"]],
|
|
44656
44697
|
"$lazyBundleId$": "-",
|
|
44657
|
-
"$attrsToReflect$": [["badge", "badge"], ["content", "content"], ["date", "date"], ["showSettings", "show-settings"], ["read", "read"], ["seen", "seen"], ["language", "language"], ["sessionId", "session-id"], ["subscriberId", "subscriber-id"], ["userId", "user-id"], ["messageId", "message-id"], ["operatorId", "operator-id"], ["token", "token"], ["backendUrl", "backend-url"], ["redirectUrl", "redirect-url"], ["notificationAction", "notification-action"], ["clientStylingUrl", "client-styling-url"], ["translationUrl", "translation-url"], ["clientStyling", "client-styling"]]
|
|
44698
|
+
"$attrsToReflect$": [["badge", "badge"], ["content", "content"], ["date", "date"], ["showSettings", "show-settings"], ["read", "read"], ["seen", "seen"], ["language", "language"], ["sessionId", "session-id"], ["subscriberId", "subscriber-id"], ["userId", "user-id"], ["messageId", "message-id"], ["operatorId", "operator-id"], ["token", "token"], ["backendUrl", "backend-url"], ["redirectUrl", "redirect-url"], ["notificationAction", "notification-action"], ["clientStylingUrl", "client-styling-url"], ["translationUrl", "translation-url"], ["clientStyling", "client-styling"], ["maxTextLength", "max-text-length"], ["maxLines", "max-lines"]]
|
|
44658
44699
|
}; }
|
|
44659
44700
|
}
|
|
44660
44701
|
|
|
@@ -44844,8 +44885,8 @@ class NutsPopover {
|
|
|
44844
44885
|
extraSVGAttrs: { width: '30px', height: '30px', fill: '#A1A1B2' }
|
|
44845
44886
|
}) })) : ((_b = this.notifications) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (this.notifications.map((item) => {
|
|
44846
44887
|
var _a;
|
|
44847
|
-
return (hAsync("nuts-notification", { "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, key: item.id, "user-id": this.userId, "operator-id": this.operatorId, content: item.content, "message-id": item.id, badge: ((_a = item.actor) === null || _a === void 0 ? void 0 : _a.data) || '', sessionId: this.sessionId, date: item.createdAt, read: item.read, seen: item.seen, language: this.language, "notification-action": this.notificationAction, token: this.token, "backend-url": this.backendUrl, "redirect-url": item.cta.data.url, "translation-url": this.translationUrl }));
|
|
44848
|
-
})) : (hAsync("div", { class: "NoMessages" }, hAsync("svg", { width: "120", height: "108", viewBox: "0 0 120 108", fill: "none" }, hAsync("circle", { cx: "11.3191", cy: "30.7872", r: "6.31915", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("ellipse", { cx: "60.117", cy: "27.9787", rx: "5.96809", ry: "5.61702", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M79.5424 49.4934C79.5424 44.1598 77.6437 39.0446 74.2641 35.2732C70.8844 31.5017 66.3006 29.3829 61.5211 29.3829C56.7415 29.3829 52.1578 31.5017 48.7781 35.2732C45.3985 39.0446 43.4998 44.1598 43.4998 49.4934C43.4998 72.9557 34.4892 79.6592 34.4892 79.6592H88.553C88.553 79.6592 79.5424 72.9557 79.5424 49.4934Z", fill: "#292933" }), hAsync("path", { d: "M68.8995 81.7552C68.1496 83.551 67.0731 85.0417 65.778 86.0779C64.4828 87.1141 63.0144 87.6595 61.5198 87.6595C60.0252 87.6595 58.5568 87.1141 57.2617 86.0779C55.9665 85.0417 54.8901 83.551 54.1401 81.7552", fill: "#292933" }), hAsync("path", { d: "M81.2976 50.2203C81.2976 68.2545 87.2222 76.7327 90.2814 79.9083C90.7671 80.4126 90.3802 81.4764 89.68 81.4764C88.0927 81.4764 86.5488 81.4764 85.0422 81.4764M68.5814 82.946C67.6854 84.8068 66.3993 86.3513 64.8518 87.425C63.3044 88.4987 61.5499 89.0638 59.7641 89.0638C57.9783 89.0638 56.2239 88.4987 54.6765 87.425C53.129 86.3513 51.8429 84.8068 50.9468 82.946M79.712 42.3723C78.6394 39.8192 77.0439 37.4727 74.991 35.4861C70.953 31.5783 65.4763 29.3829 59.7656 29.3829C54.055 29.3829 48.5783 31.5783 44.5403 35.4861C43.3681 36.6205 42.345 37.8722 41.4832 39.2127C40.4958 40.7487 39.7202 42.4013 39.1747 44.1276C38.5563 46.0847 38.2337 48.1364 38.2337 50.2203C38.2337 53.2503 38.0665 56.0106 37.7737 58.5212M34.8401 70.7608C32.9874 75.4551 30.7688 78.331 29.2526 79.9055C28.767 80.4099 29.155 81.4764 29.8551 81.4764C47.1962 81.4764 59.3571 81.4764 74.1593 81.4764", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M55.6345 59.0737C55.1665 59.7144 54.4949 60.2462 53.6868 60.6159C52.8787 60.9855 51.9625 61.1801 51.0299 61.1801C50.0973 61.1801 49.1811 60.9855 48.373 60.6159C47.5649 60.2462 46.8933 59.7144 46.4254 59.0737", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M73.1877 59.0737C72.7197 59.7144 72.0481 60.2462 71.24 60.6159C70.4319 60.9855 69.5157 61.1801 68.5831 61.1801C67.6506 61.1801 66.7344 60.9855 65.9263 60.6159C65.1182 60.2462 64.4465 59.7144 63.9786 59.0737", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("circle", { cx: "107.511", cy: "56.0638", r: "7.02128", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("circle", { cx: "16.4252", cy: "58.1703", r: "4.21277", fill: "#3D3D4D" }), hAsync("ellipse", { cx: "59.9573", cy: "104.511", rx: "25.2766", ry: "2.80851", fill: "#3D3D4D" }), hAsync("path", { d: "M81.5317 18.1489H88.553L81.5317 25.1702H88.553", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M96.6807 2H106.51L96.6807 11.8298H106.51", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" })), hAsync("p", null, translate$1('noMessages', this.language)))))), !this.isLoading && (hAsync("div", { key: '
|
|
44888
|
+
return (hAsync("nuts-notification", { "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, key: item.id, "user-id": this.userId, "operator-id": this.operatorId, content: item.content, "message-id": item.id, badge: ((_a = item.actor) === null || _a === void 0 ? void 0 : _a.data) || '', sessionId: this.sessionId, date: item.createdAt, read: item.read, seen: item.seen, language: this.language, "notification-action": this.notificationAction, token: this.token, "backend-url": this.backendUrl, "redirect-url": item.cta.data.url, "translation-url": this.translationUrl, "max-text-length": 200, "max-lines": 5 }));
|
|
44889
|
+
})) : (hAsync("div", { class: "NoMessages" }, hAsync("svg", { width: "120", height: "108", viewBox: "0 0 120 108", fill: "none" }, hAsync("circle", { cx: "11.3191", cy: "30.7872", r: "6.31915", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("ellipse", { cx: "60.117", cy: "27.9787", rx: "5.96809", ry: "5.61702", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M79.5424 49.4934C79.5424 44.1598 77.6437 39.0446 74.2641 35.2732C70.8844 31.5017 66.3006 29.3829 61.5211 29.3829C56.7415 29.3829 52.1578 31.5017 48.7781 35.2732C45.3985 39.0446 43.4998 44.1598 43.4998 49.4934C43.4998 72.9557 34.4892 79.6592 34.4892 79.6592H88.553C88.553 79.6592 79.5424 72.9557 79.5424 49.4934Z", fill: "#292933" }), hAsync("path", { d: "M68.8995 81.7552C68.1496 83.551 67.0731 85.0417 65.778 86.0779C64.4828 87.1141 63.0144 87.6595 61.5198 87.6595C60.0252 87.6595 58.5568 87.1141 57.2617 86.0779C55.9665 85.0417 54.8901 83.551 54.1401 81.7552", fill: "#292933" }), hAsync("path", { d: "M81.2976 50.2203C81.2976 68.2545 87.2222 76.7327 90.2814 79.9083C90.7671 80.4126 90.3802 81.4764 89.68 81.4764C88.0927 81.4764 86.5488 81.4764 85.0422 81.4764M68.5814 82.946C67.6854 84.8068 66.3993 86.3513 64.8518 87.425C63.3044 88.4987 61.5499 89.0638 59.7641 89.0638C57.9783 89.0638 56.2239 88.4987 54.6765 87.425C53.129 86.3513 51.8429 84.8068 50.9468 82.946M79.712 42.3723C78.6394 39.8192 77.0439 37.4727 74.991 35.4861C70.953 31.5783 65.4763 29.3829 59.7656 29.3829C54.055 29.3829 48.5783 31.5783 44.5403 35.4861C43.3681 36.6205 42.345 37.8722 41.4832 39.2127C40.4958 40.7487 39.7202 42.4013 39.1747 44.1276C38.5563 46.0847 38.2337 48.1364 38.2337 50.2203C38.2337 53.2503 38.0665 56.0106 37.7737 58.5212M34.8401 70.7608C32.9874 75.4551 30.7688 78.331 29.2526 79.9055C28.767 80.4099 29.155 81.4764 29.8551 81.4764C47.1962 81.4764 59.3571 81.4764 74.1593 81.4764", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M55.6345 59.0737C55.1665 59.7144 54.4949 60.2462 53.6868 60.6159C52.8787 60.9855 51.9625 61.1801 51.0299 61.1801C50.0973 61.1801 49.1811 60.9855 48.373 60.6159C47.5649 60.2462 46.8933 59.7144 46.4254 59.0737", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M73.1877 59.0737C72.7197 59.7144 72.0481 60.2462 71.24 60.6159C70.4319 60.9855 69.5157 61.1801 68.5831 61.1801C67.6506 61.1801 66.7344 60.9855 65.9263 60.6159C65.1182 60.2462 64.4465 59.7144 63.9786 59.0737", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("circle", { cx: "107.511", cy: "56.0638", r: "7.02128", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("circle", { cx: "16.4252", cy: "58.1703", r: "4.21277", fill: "#3D3D4D" }), hAsync("ellipse", { cx: "59.9573", cy: "104.511", rx: "25.2766", ry: "2.80851", fill: "#3D3D4D" }), hAsync("path", { d: "M81.5317 18.1489H88.553L81.5317 25.1702H88.553", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M96.6807 2H106.51L96.6807 11.8298H106.51", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" })), hAsync("p", null, translate$1('noMessages', this.language)))))), !this.isLoading && (hAsync("div", { key: 'ac051bc217b20856ee2fbb05c164740a2ce15034', class: "Pagination" }, hAsync("div", { key: '4103c2541b1534674f4a395782b57cb7f412e635', class: "Button" }, hAsync("button", { key: 'b5ea8a82ad305692ba6b7e27de3156df8755b41a', disabled: this.isNotificationsLoading || this.currentPage <= 0, onClick: this.prevPage }, hAsync("svg", { key: '84a373abf56f161f2f566c617c2227d713bfbad5', class: "svg-icon", viewBox: "0 0 20 20" }, hAsync("path", { key: 'a8c8e4d65eb525f98db3a9f3770c64a4cff44b0e', d: "M8.388,10.049l4.76-4.873c0.303-0.31,0.297-0.804-0.012-1.105c-0.309-0.304-0.803-0.293-1.105,0.012L6.726,9.516c-0.303,0.31-0.296,0.805,0.012,1.105l5.433,5.307c0.152,0.148,0.35,0.223,0.547,0.223c0.203,0,0.406-0.08,0.559-0.236c0.303-0.309,0.295-0.803-0.012-1.104L8.388,10.049z" })), translate$1('prev', this.language))), hAsync("div", { key: '20b18543fe251fe1f2b67e002fa07ec9be8146e7', class: "Button" }, hAsync("button", { key: '797168392bd58e443953ccac835e33660956ea27', disabled: this.isNotificationsLoading || !this.hasMore, onClick: this.nextPage }, translate$1('next', this.language), hAsync("svg", { key: '3602fbc69f946074355405ec83075069bb3787c1', class: "svg-icon", viewBox: "0 0 20 20" }, hAsync("path", { key: '679cc4531c96fe91bbdc027acfee1eb71240495d', d: "M11.611,10.049l-4.76-4.873c-0.303-0.31-0.297-0.804,0.012-1.105c0.309-0.304,0.803-0.293,1.105,0.012l5.306,5.433c0.304,0.31,0.296,0.805-0.012,1.105L7.83,15.928c-0.152,0.148-0.35,0.223-0.547,0.223c-0.203,0-0.406-0.08-0.559-0.236c-0.303-0.309-0.295-0.803,0.012-1.104L11.611,10.049z" }))))))));
|
|
44849
44890
|
}
|
|
44850
44891
|
static get watchers() { return {
|
|
44851
44892
|
"unseenCount": ["unseenCountHandler"],
|
package/hydrate/index.mjs
CHANGED
|
@@ -44394,12 +44394,21 @@ function renderAbstractNodeToSVGElement(node, options) {
|
|
|
44394
44394
|
}
|
|
44395
44395
|
|
|
44396
44396
|
const MAX_NOTIFICATION_TEXT_LENGTH = 200;
|
|
44397
|
+
const MAX_NOTIFICATION_LINES = 5;
|
|
44397
44398
|
|
|
44398
|
-
const truncate = (str, n) => {
|
|
44399
|
+
const truncate = (str, n, l) => {
|
|
44399
44400
|
if (!str || n < 0) {
|
|
44400
44401
|
return;
|
|
44401
44402
|
}
|
|
44402
|
-
|
|
44403
|
+
if (str.length > n) {
|
|
44404
|
+
return str.slice(0, n - 1) + '...';
|
|
44405
|
+
}
|
|
44406
|
+
const matches = [...str.matchAll(/<br\s*\/?>|<\/p>/gi)];
|
|
44407
|
+
if (matches.length >= l) {
|
|
44408
|
+
const cutoffIndex = matches[l - 1].index;
|
|
44409
|
+
return str.slice(0, cutoffIndex) + '...';
|
|
44410
|
+
}
|
|
44411
|
+
return str;
|
|
44403
44412
|
};
|
|
44404
44413
|
|
|
44405
44414
|
const nutsNotificationCss = ":host{display:block}p{display:block;margin-block-start:0em;margin-block-end:0em;margin-inline-start:0px;margin-inline-end:0px}.NotificationContainer{animation:show 600ms 100ms cubic-bezier(0.38, 0.97, 0.56, 0.76) forwards;transform-origin:top center;padding:15px;position:relative;display:flex;line-height:20px;justify-content:space-between;align-items:flex-start;border-radius:7px;margin:10px 15px;color:var(--emw--color-white, rgb(255, 255, 255));background:var(--emw--color-gray-400, rgb(35, 35, 43));font-weight:400;font-size:14px;gap:8px;cursor:pointer}@keyframes show{100%{opacity:1;transform:none}}.NotificationContainer .AvatarContainer{margin-right:10px;width:40px;min-width:40px;height:40px;border-radius:50%;display:flex;justify-content:center;align-items:center;font-size:40px;border:1px solid var(--emw--color-gray-200, rgb(82, 82, 102));overflow:hidden}.NotificationContainer .AvatarContainer .Avatar{box-sizing:border-box;position:relative;display:flex;user-select:none;overflow:hidden;width:38px;min-width:38px;height:38px;border-radius:32px;text-decoration:none;border:0px;background-color:transparent;padding:0px;justify-content:center;align-items:center}.NotificationContainer .AvatarContainer .Avatar .AvatarImage{object-fit:cover;width:100%;height:100%;display:block}.NotificationContainer .AvatarContainer .Avatar svg{object-fit:cover;display:block}.NotificationContainer .ContentContainer{display:flex;flex-direction:column;word-break:break-word;text-align:justify}.NotificationContainer .RightActionsContainer{display:flex;flex-direction:column}.NotificationContainer .FlipX{transform:rotateX(180deg) translate(0, 4px)}.NotificationContainer .AccordionArrow{margin-left:4px;transition-duration:0.2s;transition-property:transform}.NotificationContainer .Date{min-width:55px;font-size:12px;font-weight:400;opacity:0.5;line-height:14.4px;color:var(--emw--color-gray-200, rgb(82, 82, 102))}.NotificationContainer .Settings{opacity:0.5;display:inline;cursor:pointer}.Unseen::before{content:\"\";position:absolute;inset:0px;width:5px;border-radius:7px 0px 0px 7px;background:linear-gradient(0deg, var(--emw--color-secondary-20, rgb(255, 81, 47)) 0%, var(--emw--color-secondary, rgb(221, 36, 118)) 100%)}.Unseen:hover .UnseenButton{display:none}.SettingsDropdown{z-index:999;position:absolute;background:var(--emw--color-gray-400, rgb(41, 41, 51));box-shadow:var(--emw--color-gray-20, rgba(0, 0, 0, 0.2)) 0px 5px 20px;border-radius:7px;padding:4px;border:none;transition-property:opacity;transition-duration:150ms;transition-timing-function:ease;opacity:1;width:max-content;display:flex;flex-direction:column;right:50px;top:50px}.SettingsDropdown svg{margin-right:10px}.SettingsDropdown button{font-family:inherit;border:0px;background-color:transparent;outline:0px;width:100%;text-align:left;text-decoration:none;box-sizing:border-box;padding:10px 12px;cursor:pointer;border-radius:7px;display:flex;align-items:center;color:var(--emw--color-white, rgb(255, 255, 255));font-weight:400;font-size:14px}.SettingsDropdown button:hover{background:var(--emw--color-gray-300, rgb(61, 61, 77));transition:300ms}.Wrapper{position:relative}";
|
|
@@ -44543,6 +44552,8 @@ class NutsNotification {
|
|
|
44543
44552
|
this.clientStylingUrl = undefined;
|
|
44544
44553
|
this.translationUrl = '';
|
|
44545
44554
|
this.clientStyling = '';
|
|
44555
|
+
this.maxTextLength = MAX_NOTIFICATION_TEXT_LENGTH;
|
|
44556
|
+
this.maxLines = MAX_NOTIFICATION_LINES;
|
|
44546
44557
|
this.showSettingsModal = false;
|
|
44547
44558
|
this.messageSeen = false;
|
|
44548
44559
|
this.messageRead = false;
|
|
@@ -44587,6 +44598,8 @@ class NutsNotification {
|
|
|
44587
44598
|
// end custom styling area
|
|
44588
44599
|
}
|
|
44589
44600
|
async componentWillLoad() {
|
|
44601
|
+
this.maxTextLength = Number(this.maxTextLength);
|
|
44602
|
+
this.maxLines = Number(this.maxLines);
|
|
44590
44603
|
if (this.translationUrl.length > 2) {
|
|
44591
44604
|
await getTranslations(this.translationUrl);
|
|
44592
44605
|
}
|
|
@@ -44594,23 +44607,49 @@ class NutsNotification {
|
|
|
44594
44607
|
connectedCallback() {
|
|
44595
44608
|
this.messageSeen = this.seen;
|
|
44596
44609
|
this.messageRead = this.read;
|
|
44597
|
-
this.displayedContent = truncate(this.content,
|
|
44610
|
+
this.displayedContent = truncate(this.content, this.maxTextLength, this.maxLines);
|
|
44598
44611
|
this.baseUrl = `${this.backendUrl}/v1/${this.operatorId}`;
|
|
44599
44612
|
}
|
|
44600
44613
|
render() {
|
|
44601
|
-
var _a, _b;
|
|
44614
|
+
var _a, _b, _c;
|
|
44602
44615
|
const sanitizedNotificationBody = DOMPurify.sanitize(this.displayedContent, {
|
|
44603
44616
|
ALLOW_UNKNOWN_PROTOCOLS: true,
|
|
44604
44617
|
ADD_ATTR: ['target', 'rel'],
|
|
44605
|
-
ALLOWED_TAGS: [
|
|
44606
|
-
'
|
|
44607
|
-
'
|
|
44618
|
+
ALLOWED_TAGS: [
|
|
44619
|
+
'b',
|
|
44620
|
+
'u',
|
|
44621
|
+
'i',
|
|
44622
|
+
'br',
|
|
44623
|
+
'a',
|
|
44624
|
+
'em',
|
|
44625
|
+
'h1',
|
|
44626
|
+
'h2',
|
|
44627
|
+
'h3',
|
|
44628
|
+
'h4',
|
|
44629
|
+
'h5',
|
|
44630
|
+
'h6',
|
|
44631
|
+
'strong',
|
|
44632
|
+
'p',
|
|
44633
|
+
'i',
|
|
44634
|
+
'small',
|
|
44635
|
+
'mark',
|
|
44636
|
+
'del',
|
|
44637
|
+
'b',
|
|
44638
|
+
's',
|
|
44639
|
+
'ins',
|
|
44640
|
+
'sub',
|
|
44641
|
+
'sup',
|
|
44642
|
+
'var',
|
|
44643
|
+
'cite',
|
|
44644
|
+
'q',
|
|
44645
|
+
'blockquote'
|
|
44608
44646
|
]
|
|
44609
44647
|
});
|
|
44610
|
-
return (hAsync("div", { key: '
|
|
44648
|
+
return (hAsync("div", { key: 'a74957d743897164ff0f3b3d17707a8db5f433fd', class: "Wrapper" }, hAsync("div", { key: '7dd78a87e080e8ca578620356b2cff9acc9fd64c', class: 'NotificationContainer' + (this.messageSeen ? '' : ' Unseen'), ref: this.assignRefToStylingContainer, onClick: this.notificationActionHandler }, this.badge ? (hAsync("div", { class: "AvatarContainer" }, hAsync("div", { class: "Avatar" }, ((_a = systemIcons[this.badge]) === null || _a === void 0 ? void 0 : _a.icon) ? (hAsync("div", { innerHTML: systemIcons[this.badge].icon })) : (hAsync("img", { class: "AvatarImage", src: this.badge }))))) : (''), hAsync("div", { key: 'ea80f329d9994c429bc6c66f2f414daf7e0771b0', class: "ContentContainer" }, hAsync("div", { key: 'b817eecb9732eeb3b19c438c0fbe6398c822dcf0', innerHTML: sanitizedNotificationBody }), hAsync("p", { key: 'cb2c821ba968bb6e95c5703e94c296857822ae77', class: "Date" }, formatDistanceToNow(new Date(this.date), {
|
|
44611
44649
|
addSuffix: true,
|
|
44612
44650
|
locale: dateFnsLocale(this.language)
|
|
44613
|
-
}))), hAsync("div", { key: '
|
|
44651
|
+
}))), hAsync("div", { key: 'd35902296022dff85e84d2484846a724f4b098af', class: "RightActionsContainer" }, hAsync("div", { key: 'b3f4f5d0452d89e58bf64a10d42140ad0d000f98', class: "Settings", onClick: this.toggleSettingsModal }, hAsync("svg", { key: 'f5dab069aeb97ed7e7055277518b9850e47aa017', width: "24", height: "24", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { key: '79398e37d9fa8fa5fb856d739caaa6b3e343c79a', d: "M20.625 15.5C20.625 16.5547 21.4453 17.375 22.5 17.375C23.5156 17.375 24.375 16.5547 24.375 15.5C24.375 14.4844 23.5156 13.625 22.5 13.625C21.4453 13.625 20.625 14.4844 20.625 15.5ZM9.375 15.5C9.375 14.4844 8.51562 13.625 7.5 13.625C6.44531 13.625 5.625 14.4844 5.625 15.5C5.625 16.5547 6.44531 17.375 7.5 17.375C8.51562 17.375 9.375 16.5547 9.375 15.5ZM16.875 15.5C16.875 14.4844 16.0156 13.625 15 13.625C13.9453 13.625 13.125 14.4844 13.125 15.5C13.125 16.5547 13.9453 17.375 15 17.375C16.0156 17.375 16.875 16.5547 16.875 15.5Z", fill: "currentColor" }))), (((_b = this.content) === null || _b === void 0 ? void 0 : _b.length) > this.maxTextLength ||
|
|
44652
|
+
(((_c = this.content) === null || _c === void 0 ? void 0 : _c.match(/<br\s*\/?>|<\/p>/gi)) || []).length > this.maxLines) && (hAsync("div", { key: 'a75570887a9b7441b38c7cacf63ba525a17e795c', class: "AccordionArrow", innerHTML: systemIcons.arrowDown.icon, ref: this.assignRefToDropdownArrow })))), this.showSettingsModal ? (hAsync("div", { class: "SettingsDropdown" }, hAsync("button", { onClick: this.toggleNotificationRead }, hAsync("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { d: "M14.9434 5.17969C14.2109 4.59375 13.625 4.125 10.1387 1.60547C9.64062 1.25391 8.67383 0.375 8 0.375V0.404297C7.9707 0.404297 7.9707 0.375 7.9707 0.375C7.29688 0.375 6.33008 1.25391 5.83203 1.60547C2.3457 4.125 1.75977 4.59375 1.02734 5.17969C0.675781 5.44336 0.5 5.85352 0.5 6.26367V13.9688C0.5 14.7598 1.11523 15.375 1.90625 15.375H14.0938C14.8555 15.375 15.5 14.7598 15.5 13.9688V6.26367C15.5 5.85352 15.2949 5.44336 14.9434 5.17969ZM9.37695 11.1562C8.9668 11.4785 8.46875 11.6543 8 11.6543C7.50195 11.6543 7.00391 11.4785 6.59375 11.1562L2.375 7.8457V6.49805C2.99023 6 3.72266 5.44336 6.94531 3.12891C7.0332 3.04102 7.15039 2.95312 7.26758 2.86523C7.41406 2.74805 7.73633 2.48438 8 2.33789C8.23438 2.48438 8.55664 2.74805 8.70312 2.86523C8.82031 2.95312 8.9375 3.04102 9.02539 3.12891C12.2188 5.44336 12.9805 6 13.625 6.49805V7.8457L9.37695 11.1562Z", fill: "currentColor" })), translate$1(this.messageRead ? 'markAsUnread' : 'markAsRead', this.language)), hAsync("button", { onClick: this.deleteNotification }, hAsync("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, hAsync("path", { d: "M4.375 15.4375C4.375 16.1758 4.94922 16.75 5.6875 16.75H13.5625C14.2734 16.75 14.875 16.1758 14.875 15.4375V6.25H4.375V15.4375ZM11.8125 8.4375C11.8125 8.21875 12.0039 8 12.25 8C12.4688 8 12.6875 8.21875 12.6875 8.4375V14.5625C12.6875 14.8086 12.4688 15 12.25 15C12.0039 15 11.8125 14.8086 11.8125 14.5625V8.4375ZM9.1875 8.4375C9.1875 8.21875 9.37891 8 9.625 8C9.84375 8 10.0625 8.21875 10.0625 8.4375V14.5625C10.0625 14.8086 9.84375 15 9.625 15C9.37891 15 9.1875 14.8086 9.1875 14.5625V8.4375ZM6.5625 8.4375C6.5625 8.21875 6.75391 8 7 8C7.21875 8 7.4375 8.21875 7.4375 8.4375V14.5625C7.4375 14.8086 7.21875 15 7 15C6.75391 15 6.5625 14.8086 6.5625 14.5625V8.4375ZM15.3125 3.625H12.25L11.9219 2.99609C11.8398 2.85938 11.7031 2.75 11.5391 2.75H7.68359C7.51953 2.75 7.38281 2.85938 7.30078 2.99609L7 3.625H3.9375C3.69141 3.625 3.5 3.84375 3.5 4.0625V4.9375C3.5 5.18359 3.69141 5.375 3.9375 5.375H15.3125C15.5312 5.375 15.75 5.18359 15.75 4.9375V4.0625C15.75 3.84375 15.5312 3.625 15.3125 3.625Z", fill: "currentColor" })), translate$1('removeMessage', this.language)))) : ('')));
|
|
44614
44653
|
}
|
|
44615
44654
|
get el() { return getElement(this); }
|
|
44616
44655
|
static get watchers() { return {
|
|
@@ -44642,6 +44681,8 @@ class NutsNotification {
|
|
|
44642
44681
|
"clientStylingUrl": [513, "client-styling-url"],
|
|
44643
44682
|
"translationUrl": [513, "translation-url"],
|
|
44644
44683
|
"clientStyling": [1537, "client-styling"],
|
|
44684
|
+
"maxTextLength": [514, "max-text-length"],
|
|
44685
|
+
"maxLines": [514, "max-lines"],
|
|
44645
44686
|
"showSettingsModal": [32],
|
|
44646
44687
|
"messageSeen": [32],
|
|
44647
44688
|
"messageRead": [32],
|
|
@@ -44650,7 +44691,7 @@ class NutsNotification {
|
|
|
44650
44691
|
},
|
|
44651
44692
|
"$listeners$": [[8, "allNotificationsRead", "allNotificationsReadHandler"], [8, "settingsOpened", "settingsOpenedHandler"], [8, "click", "clickOutsideHandle"]],
|
|
44652
44693
|
"$lazyBundleId$": "-",
|
|
44653
|
-
"$attrsToReflect$": [["badge", "badge"], ["content", "content"], ["date", "date"], ["showSettings", "show-settings"], ["read", "read"], ["seen", "seen"], ["language", "language"], ["sessionId", "session-id"], ["subscriberId", "subscriber-id"], ["userId", "user-id"], ["messageId", "message-id"], ["operatorId", "operator-id"], ["token", "token"], ["backendUrl", "backend-url"], ["redirectUrl", "redirect-url"], ["notificationAction", "notification-action"], ["clientStylingUrl", "client-styling-url"], ["translationUrl", "translation-url"], ["clientStyling", "client-styling"]]
|
|
44694
|
+
"$attrsToReflect$": [["badge", "badge"], ["content", "content"], ["date", "date"], ["showSettings", "show-settings"], ["read", "read"], ["seen", "seen"], ["language", "language"], ["sessionId", "session-id"], ["subscriberId", "subscriber-id"], ["userId", "user-id"], ["messageId", "message-id"], ["operatorId", "operator-id"], ["token", "token"], ["backendUrl", "backend-url"], ["redirectUrl", "redirect-url"], ["notificationAction", "notification-action"], ["clientStylingUrl", "client-styling-url"], ["translationUrl", "translation-url"], ["clientStyling", "client-styling"], ["maxTextLength", "max-text-length"], ["maxLines", "max-lines"]]
|
|
44654
44695
|
}; }
|
|
44655
44696
|
}
|
|
44656
44697
|
|
|
@@ -44840,8 +44881,8 @@ class NutsPopover {
|
|
|
44840
44881
|
extraSVGAttrs: { width: '30px', height: '30px', fill: '#A1A1B2' }
|
|
44841
44882
|
}) })) : ((_b = this.notifications) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (this.notifications.map((item) => {
|
|
44842
44883
|
var _a;
|
|
44843
|
-
return (hAsync("nuts-notification", { "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, key: item.id, "user-id": this.userId, "operator-id": this.operatorId, content: item.content, "message-id": item.id, badge: ((_a = item.actor) === null || _a === void 0 ? void 0 : _a.data) || '', sessionId: this.sessionId, date: item.createdAt, read: item.read, seen: item.seen, language: this.language, "notification-action": this.notificationAction, token: this.token, "backend-url": this.backendUrl, "redirect-url": item.cta.data.url, "translation-url": this.translationUrl }));
|
|
44844
|
-
})) : (hAsync("div", { class: "NoMessages" }, hAsync("svg", { width: "120", height: "108", viewBox: "0 0 120 108", fill: "none" }, hAsync("circle", { cx: "11.3191", cy: "30.7872", r: "6.31915", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("ellipse", { cx: "60.117", cy: "27.9787", rx: "5.96809", ry: "5.61702", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M79.5424 49.4934C79.5424 44.1598 77.6437 39.0446 74.2641 35.2732C70.8844 31.5017 66.3006 29.3829 61.5211 29.3829C56.7415 29.3829 52.1578 31.5017 48.7781 35.2732C45.3985 39.0446 43.4998 44.1598 43.4998 49.4934C43.4998 72.9557 34.4892 79.6592 34.4892 79.6592H88.553C88.553 79.6592 79.5424 72.9557 79.5424 49.4934Z", fill: "#292933" }), hAsync("path", { d: "M68.8995 81.7552C68.1496 83.551 67.0731 85.0417 65.778 86.0779C64.4828 87.1141 63.0144 87.6595 61.5198 87.6595C60.0252 87.6595 58.5568 87.1141 57.2617 86.0779C55.9665 85.0417 54.8901 83.551 54.1401 81.7552", fill: "#292933" }), hAsync("path", { d: "M81.2976 50.2203C81.2976 68.2545 87.2222 76.7327 90.2814 79.9083C90.7671 80.4126 90.3802 81.4764 89.68 81.4764C88.0927 81.4764 86.5488 81.4764 85.0422 81.4764M68.5814 82.946C67.6854 84.8068 66.3993 86.3513 64.8518 87.425C63.3044 88.4987 61.5499 89.0638 59.7641 89.0638C57.9783 89.0638 56.2239 88.4987 54.6765 87.425C53.129 86.3513 51.8429 84.8068 50.9468 82.946M79.712 42.3723C78.6394 39.8192 77.0439 37.4727 74.991 35.4861C70.953 31.5783 65.4763 29.3829 59.7656 29.3829C54.055 29.3829 48.5783 31.5783 44.5403 35.4861C43.3681 36.6205 42.345 37.8722 41.4832 39.2127C40.4958 40.7487 39.7202 42.4013 39.1747 44.1276C38.5563 46.0847 38.2337 48.1364 38.2337 50.2203C38.2337 53.2503 38.0665 56.0106 37.7737 58.5212M34.8401 70.7608C32.9874 75.4551 30.7688 78.331 29.2526 79.9055C28.767 80.4099 29.155 81.4764 29.8551 81.4764C47.1962 81.4764 59.3571 81.4764 74.1593 81.4764", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M55.6345 59.0737C55.1665 59.7144 54.4949 60.2462 53.6868 60.6159C52.8787 60.9855 51.9625 61.1801 51.0299 61.1801C50.0973 61.1801 49.1811 60.9855 48.373 60.6159C47.5649 60.2462 46.8933 59.7144 46.4254 59.0737", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M73.1877 59.0737C72.7197 59.7144 72.0481 60.2462 71.24 60.6159C70.4319 60.9855 69.5157 61.1801 68.5831 61.1801C67.6506 61.1801 66.7344 60.9855 65.9263 60.6159C65.1182 60.2462 64.4465 59.7144 63.9786 59.0737", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("circle", { cx: "107.511", cy: "56.0638", r: "7.02128", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("circle", { cx: "16.4252", cy: "58.1703", r: "4.21277", fill: "#3D3D4D" }), hAsync("ellipse", { cx: "59.9573", cy: "104.511", rx: "25.2766", ry: "2.80851", fill: "#3D3D4D" }), hAsync("path", { d: "M81.5317 18.1489H88.553L81.5317 25.1702H88.553", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M96.6807 2H106.51L96.6807 11.8298H106.51", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" })), hAsync("p", null, translate$1('noMessages', this.language)))))), !this.isLoading && (hAsync("div", { key: '
|
|
44884
|
+
return (hAsync("nuts-notification", { "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, key: item.id, "user-id": this.userId, "operator-id": this.operatorId, content: item.content, "message-id": item.id, badge: ((_a = item.actor) === null || _a === void 0 ? void 0 : _a.data) || '', sessionId: this.sessionId, date: item.createdAt, read: item.read, seen: item.seen, language: this.language, "notification-action": this.notificationAction, token: this.token, "backend-url": this.backendUrl, "redirect-url": item.cta.data.url, "translation-url": this.translationUrl, "max-text-length": 200, "max-lines": 5 }));
|
|
44885
|
+
})) : (hAsync("div", { class: "NoMessages" }, hAsync("svg", { width: "120", height: "108", viewBox: "0 0 120 108", fill: "none" }, hAsync("circle", { cx: "11.3191", cy: "30.7872", r: "6.31915", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("ellipse", { cx: "60.117", cy: "27.9787", rx: "5.96809", ry: "5.61702", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M79.5424 49.4934C79.5424 44.1598 77.6437 39.0446 74.2641 35.2732C70.8844 31.5017 66.3006 29.3829 61.5211 29.3829C56.7415 29.3829 52.1578 31.5017 48.7781 35.2732C45.3985 39.0446 43.4998 44.1598 43.4998 49.4934C43.4998 72.9557 34.4892 79.6592 34.4892 79.6592H88.553C88.553 79.6592 79.5424 72.9557 79.5424 49.4934Z", fill: "#292933" }), hAsync("path", { d: "M68.8995 81.7552C68.1496 83.551 67.0731 85.0417 65.778 86.0779C64.4828 87.1141 63.0144 87.6595 61.5198 87.6595C60.0252 87.6595 58.5568 87.1141 57.2617 86.0779C55.9665 85.0417 54.8901 83.551 54.1401 81.7552", fill: "#292933" }), hAsync("path", { d: "M81.2976 50.2203C81.2976 68.2545 87.2222 76.7327 90.2814 79.9083C90.7671 80.4126 90.3802 81.4764 89.68 81.4764C88.0927 81.4764 86.5488 81.4764 85.0422 81.4764M68.5814 82.946C67.6854 84.8068 66.3993 86.3513 64.8518 87.425C63.3044 88.4987 61.5499 89.0638 59.7641 89.0638C57.9783 89.0638 56.2239 88.4987 54.6765 87.425C53.129 86.3513 51.8429 84.8068 50.9468 82.946M79.712 42.3723C78.6394 39.8192 77.0439 37.4727 74.991 35.4861C70.953 31.5783 65.4763 29.3829 59.7656 29.3829C54.055 29.3829 48.5783 31.5783 44.5403 35.4861C43.3681 36.6205 42.345 37.8722 41.4832 39.2127C40.4958 40.7487 39.7202 42.4013 39.1747 44.1276C38.5563 46.0847 38.2337 48.1364 38.2337 50.2203C38.2337 53.2503 38.0665 56.0106 37.7737 58.5212M34.8401 70.7608C32.9874 75.4551 30.7688 78.331 29.2526 79.9055C28.767 80.4099 29.155 81.4764 29.8551 81.4764C47.1962 81.4764 59.3571 81.4764 74.1593 81.4764", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M55.6345 59.0737C55.1665 59.7144 54.4949 60.2462 53.6868 60.6159C52.8787 60.9855 51.9625 61.1801 51.0299 61.1801C50.0973 61.1801 49.1811 60.9855 48.373 60.6159C47.5649 60.2462 46.8933 59.7144 46.4254 59.0737", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M73.1877 59.0737C72.7197 59.7144 72.0481 60.2462 71.24 60.6159C70.4319 60.9855 69.5157 61.1801 68.5831 61.1801C67.6506 61.1801 66.7344 60.9855 65.9263 60.6159C65.1182 60.2462 64.4465 59.7144 63.9786 59.0737", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("circle", { cx: "107.511", cy: "56.0638", r: "7.02128", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("circle", { cx: "16.4252", cy: "58.1703", r: "4.21277", fill: "#3D3D4D" }), hAsync("ellipse", { cx: "59.9573", cy: "104.511", rx: "25.2766", ry: "2.80851", fill: "#3D3D4D" }), hAsync("path", { d: "M81.5317 18.1489H88.553L81.5317 25.1702H88.553", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), hAsync("path", { d: "M96.6807 2H106.51L96.6807 11.8298H106.51", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" })), hAsync("p", null, translate$1('noMessages', this.language)))))), !this.isLoading && (hAsync("div", { key: 'ac051bc217b20856ee2fbb05c164740a2ce15034', class: "Pagination" }, hAsync("div", { key: '4103c2541b1534674f4a395782b57cb7f412e635', class: "Button" }, hAsync("button", { key: 'b5ea8a82ad305692ba6b7e27de3156df8755b41a', disabled: this.isNotificationsLoading || this.currentPage <= 0, onClick: this.prevPage }, hAsync("svg", { key: '84a373abf56f161f2f566c617c2227d713bfbad5', class: "svg-icon", viewBox: "0 0 20 20" }, hAsync("path", { key: 'a8c8e4d65eb525f98db3a9f3770c64a4cff44b0e', d: "M8.388,10.049l4.76-4.873c0.303-0.31,0.297-0.804-0.012-1.105c-0.309-0.304-0.803-0.293-1.105,0.012L6.726,9.516c-0.303,0.31-0.296,0.805,0.012,1.105l5.433,5.307c0.152,0.148,0.35,0.223,0.547,0.223c0.203,0,0.406-0.08,0.559-0.236c0.303-0.309,0.295-0.803-0.012-1.104L8.388,10.049z" })), translate$1('prev', this.language))), hAsync("div", { key: '20b18543fe251fe1f2b67e002fa07ec9be8146e7', class: "Button" }, hAsync("button", { key: '797168392bd58e443953ccac835e33660956ea27', disabled: this.isNotificationsLoading || !this.hasMore, onClick: this.nextPage }, translate$1('next', this.language), hAsync("svg", { key: '3602fbc69f946074355405ec83075069bb3787c1', class: "svg-icon", viewBox: "0 0 20 20" }, hAsync("path", { key: '679cc4531c96fe91bbdc027acfee1eb71240495d', d: "M11.611,10.049l-4.76-4.873c-0.303-0.31-0.297-0.804,0.012-1.105c0.309-0.304,0.803-0.293,1.105,0.012l5.306,5.433c0.304,0.31,0.296,0.805-0.012,1.105L7.83,15.928c-0.152,0.148-0.35,0.223-0.547,0.223c-0.203,0-0.406-0.08-0.559-0.236c-0.303-0.309-0.295-0.803,0.012-1.104L11.611,10.049z" }))))))));
|
|
44845
44886
|
}
|
|
44846
44887
|
static get watchers() { return {
|
|
44847
44888
|
"unseenCount": ["unseenCountHandler"],
|