@everymatrix/nuts-inbox-widget 1.85.11 → 1.85.13

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.
@@ -42450,22 +42450,22 @@ const NutsNotification = class {
42450
42450
  };
42451
42451
  this.notificationActionHandler = () => {
42452
42452
  var _a, _b, _c;
42453
- if (this.notificationAction == 'default' || !this.notificationAction) {
42454
- if (this.redirectUrl.length > 0) {
42455
- window.location.href = this.redirectUrl;
42456
- }
42453
+ if (((_a = this.displayedContent) === null || _a === void 0 ? void 0 : _a.length) !== ((_b = this.content) === null || _b === void 0 ? void 0 : _b.length) && this.displayedContent !== this.content) {
42454
+ this.displayedContent = this.content;
42455
+ this.dropdownArrowRef.classList.add('FlipX');
42456
+ return;
42457
+ }
42458
+ if ((this.notificationAction === 'default' || !this.notificationAction) && this.redirectUrl.length > 0) {
42459
+ window.location.href = this.redirectUrl;
42460
+ return;
42457
42461
  }
42458
- if (this.notificationAction == 'postMessage') {
42462
+ if (this.notificationAction === 'postMessage') {
42459
42463
  window.postMessage({ type: 'NotificationRedirect', url: this.redirectUrl }, window.location.href);
42464
+ return;
42460
42465
  }
42461
42466
  const fullyStrippedContent = DOMPurify.sanitize(this.content, { ALLOWED_TAGS: [] });
42462
42467
  if ((fullyStrippedContent === null || fullyStrippedContent === void 0 ? void 0 : fullyStrippedContent.length) <= this.maxTextLength &&
42463
- (((_a = this.content) === null || _a === void 0 ? void 0 : _a.match(/<br\s*\/?>|<\/p>|<\/h[1-6]>/gi)) || []).length <= this.maxLines) {
42464
- return;
42465
- }
42466
- if (((_b = this.displayedContent) === null || _b === void 0 ? void 0 : _b.length) !== ((_c = this.content) === null || _c === void 0 ? void 0 : _c.length) && this.displayedContent !== this.content) {
42467
- this.displayedContent = this.content;
42468
- this.dropdownArrowRef.classList.add('FlipX');
42468
+ (((_c = this.content) === null || _c === void 0 ? void 0 : _c.match(/<br\s*\/?>|<\/p>|<\/h[1-6]>/gi)) || []).length <= this.maxLines) {
42469
42469
  return;
42470
42470
  }
42471
42471
  this.displayedContent = truncate(this.content, this.maxTextLength, this.maxLines);
@@ -42617,11 +42617,11 @@ const NutsNotification = class {
42617
42617
  'blockquote'
42618
42618
  ]
42619
42619
  });
42620
- return (index.h("div", { key: 'c905144a812a9a4bd5f4a1b99f27fb948ec11744', class: "Wrapper", onClick: this.toggleNotificationRead }, index.h("div", { key: '29b7c942a3393fd12429a41ae5d34ac7ae96688f', class: 'NotificationContainer' + (this.messageSeen ? '' : ' Unseen'), ref: this.assignRefToStylingContainer, onClick: this.notificationActionHandler }, this.badge ? (index.h("div", { class: "AvatarContainer" }, index.h("div", { class: "Avatar" }, ((_a = systemIcons[this.badge]) === null || _a === void 0 ? void 0 : _a.icon) ? (index.h("div", { innerHTML: systemIcons[this.badge].icon })) : (index.h("img", { class: "AvatarImage", src: this.badge }))))) : (''), index.h("div", { key: '773a581c740f05b8a8c88dd9a7a83a5a181cb744', class: "ContentContainer" }, index.h("div", { key: 'ec901b6489042dc93c0aa16e9fe2de008f57a9eb', innerHTML: sanitizedNotificationBody }), index.h("p", { key: '8ed8ab29167220cdec0efcc862e91466944920ef', class: "Date" }, formatDistanceToNow(new Date(this.date), {
42620
+ return (index.h("div", { key: '533d85d34f0a1edba04e0e5e5095c303b52cae0d', class: "Wrapper", onClick: this.toggleNotificationRead }, index.h("div", { key: '5de9c75576d858516e26ec54a6e886b46bb5bd86', class: 'NotificationContainer' + (this.messageSeen ? '' : ' Unseen'), ref: this.assignRefToStylingContainer, onClick: this.notificationActionHandler }, this.badge ? (index.h("div", { class: "AvatarContainer" }, index.h("div", { class: "Avatar" }, ((_a = systemIcons[this.badge]) === null || _a === void 0 ? void 0 : _a.icon) ? (index.h("div", { innerHTML: systemIcons[this.badge].icon })) : (index.h("img", { class: "AvatarImage", src: this.badge }))))) : (''), index.h("div", { key: 'c67135050a2fc6910c97c2b3026f92933cc17ff3', class: "ContentContainer" }, index.h("div", { key: '058c86dc00a1a4d262e351163f70414fb9074b69', innerHTML: sanitizedNotificationBody }), index.h("p", { key: '3bfa0ef911a6e48146ced485c33ee7b7e4be6e57', class: "Date" }, formatDistanceToNow(new Date(this.date), {
42621
42621
  addSuffix: true,
42622
42622
  locale: dateFnsLocale(this.language)
42623
- }))), index.h("div", { key: 'a7ca9c08eb2526705ffd623932c806f8cd50e517', class: "RightActionsContainer" }, index.h("div", { key: '30ad1c0862b402074599da3032adf2d58ce7d068', class: "Settings", onClick: this.toggleSettingsModal }, index.h("svg", { key: '594c25ec9c11cad5a41a318aad72b69bbbd49fb6', width: "24", height: "24", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: '0cfdf4f39b2ef578e3d7cb0f809466a989fa00ca', 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 = DOMPurify.sanitize(this.content, { ALLOWED_TAGS: [] })) === null || _b === void 0 ? void 0 : _b.length) > this.maxTextLength ||
42624
- (((_c = this.content) === null || _c === void 0 ? void 0 : _c.match(/<br\s*\/?>|<\/p>|<\/h[1-6]>/gi)) || []).length > this.maxLines) && (index.h("div", { key: '7a8a16279b913ee3fffcc223ceed07d2dc144bd9', class: "AccordionArrow", innerHTML: systemIcons.arrowDown.icon, ref: this.assignRefToDropdownArrow })))), this.showSettingsModal ? (index.h("div", { class: "SettingsDropdown" }, index.h("button", { onClick: this.toggleNotificationRead }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("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)), index.h("button", { onClick: this.deleteNotification }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("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)))) : ('')));
42623
+ }))), index.h("div", { key: '18a7875d73dc8fa38af9e41e5659ffbf819c98bf', class: "RightActionsContainer" }, index.h("div", { key: '25c4464ce247905c472e795b627592a923cf6f57', class: "Settings", onClick: this.toggleSettingsModal }, index.h("svg", { key: '58afa316f03d21b069e2ed1ff51e83bedc95df99', width: "24", height: "24", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { key: 'b23efed4ce00daec9ea20a5eb858b3287978a0c3', 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 = DOMPurify.sanitize(this.content, { ALLOWED_TAGS: [] })) === null || _b === void 0 ? void 0 : _b.length) > this.maxTextLength ||
42624
+ (((_c = this.content) === null || _c === void 0 ? void 0 : _c.match(/<br\s*\/?>|<\/p>|<\/h[1-6]>/gi)) || []).length > this.maxLines) && (index.h("div", { key: '086655633f049e20c89972401378bba2b6167d75', class: "AccordionArrow", innerHTML: systemIcons.arrowDown.icon, ref: this.assignRefToDropdownArrow })))), this.showSettingsModal ? (index.h("div", { class: "SettingsDropdown" }, index.h("button", { onClick: this.toggleNotificationRead }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("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)), index.h("button", { onClick: this.deleteNotification }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("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)))) : ('')));
42625
42625
  }
42626
42626
  get el() { return index.getElement(this); }
42627
42627
  static get watchers() { return {
@@ -98,22 +98,22 @@ export class NutsNotification {
98
98
  var _a, _b, _c;
99
99
  if (!Build.isBrowser)
100
100
  return;
101
- if (this.notificationAction == 'default' || !this.notificationAction) {
102
- if (this.redirectUrl.length > 0) {
103
- window.location.href = this.redirectUrl;
104
- }
101
+ if (((_a = this.displayedContent) === null || _a === void 0 ? void 0 : _a.length) !== ((_b = this.content) === null || _b === void 0 ? void 0 : _b.length) && this.displayedContent !== this.content) {
102
+ this.displayedContent = this.content;
103
+ this.dropdownArrowRef.classList.add('FlipX');
104
+ return;
105
+ }
106
+ if ((this.notificationAction === 'default' || !this.notificationAction) && this.redirectUrl.length > 0) {
107
+ window.location.href = this.redirectUrl;
108
+ return;
105
109
  }
106
- if (this.notificationAction == 'postMessage') {
110
+ if (this.notificationAction === 'postMessage') {
107
111
  window.postMessage({ type: 'NotificationRedirect', url: this.redirectUrl }, window.location.href);
112
+ return;
108
113
  }
109
114
  const fullyStrippedContent = DOMPurify.sanitize(this.content, { ALLOWED_TAGS: [] });
110
115
  if ((fullyStrippedContent === null || fullyStrippedContent === void 0 ? void 0 : fullyStrippedContent.length) <= this.maxTextLength &&
111
- (((_a = this.content) === null || _a === void 0 ? void 0 : _a.match(/<br\s*\/?>|<\/p>|<\/h[1-6]>/gi)) || []).length <= this.maxLines) {
112
- return;
113
- }
114
- if (((_b = this.displayedContent) === null || _b === void 0 ? void 0 : _b.length) !== ((_c = this.content) === null || _c === void 0 ? void 0 : _c.length) && this.displayedContent !== this.content) {
115
- this.displayedContent = this.content;
116
- this.dropdownArrowRef.classList.add('FlipX');
116
+ (((_c = this.content) === null || _c === void 0 ? void 0 : _c.match(/<br\s*\/?>|<\/p>|<\/h[1-6]>/gi)) || []).length <= this.maxLines) {
117
117
  return;
118
118
  }
119
119
  this.displayedContent = truncate(this.content, this.maxTextLength, this.maxLines);
@@ -265,11 +265,11 @@ export class NutsNotification {
265
265
  'blockquote'
266
266
  ]
267
267
  });
268
- return (h("div", { key: 'c905144a812a9a4bd5f4a1b99f27fb948ec11744', class: "Wrapper", onClick: this.toggleNotificationRead }, h("div", { key: '29b7c942a3393fd12429a41ae5d34ac7ae96688f', class: 'NotificationContainer' + (this.messageSeen ? '' : ' Unseen'), ref: this.assignRefToStylingContainer, onClick: this.notificationActionHandler }, this.badge ? (h("div", { class: "AvatarContainer" }, h("div", { class: "Avatar" }, ((_a = systemIcons[this.badge]) === null || _a === void 0 ? void 0 : _a.icon) ? (h("div", { innerHTML: systemIcons[this.badge].icon })) : (h("img", { class: "AvatarImage", src: this.badge }))))) : (''), h("div", { key: '773a581c740f05b8a8c88dd9a7a83a5a181cb744', class: "ContentContainer" }, h("div", { key: 'ec901b6489042dc93c0aa16e9fe2de008f57a9eb', innerHTML: sanitizedNotificationBody }), h("p", { key: '8ed8ab29167220cdec0efcc862e91466944920ef', class: "Date" }, formatDistanceToNow(new Date(this.date), {
268
+ return (h("div", { key: '533d85d34f0a1edba04e0e5e5095c303b52cae0d', class: "Wrapper", onClick: this.toggleNotificationRead }, h("div", { key: '5de9c75576d858516e26ec54a6e886b46bb5bd86', class: 'NotificationContainer' + (this.messageSeen ? '' : ' Unseen'), ref: this.assignRefToStylingContainer, onClick: this.notificationActionHandler }, this.badge ? (h("div", { class: "AvatarContainer" }, h("div", { class: "Avatar" }, ((_a = systemIcons[this.badge]) === null || _a === void 0 ? void 0 : _a.icon) ? (h("div", { innerHTML: systemIcons[this.badge].icon })) : (h("img", { class: "AvatarImage", src: this.badge }))))) : (''), h("div", { key: 'c67135050a2fc6910c97c2b3026f92933cc17ff3', class: "ContentContainer" }, h("div", { key: '058c86dc00a1a4d262e351163f70414fb9074b69', innerHTML: sanitizedNotificationBody }), h("p", { key: '3bfa0ef911a6e48146ced485c33ee7b7e4be6e57', class: "Date" }, formatDistanceToNow(new Date(this.date), {
269
269
  addSuffix: true,
270
270
  locale: dateFnsLocale(this.language)
271
- }))), h("div", { key: 'a7ca9c08eb2526705ffd623932c806f8cd50e517', class: "RightActionsContainer" }, h("div", { key: '30ad1c0862b402074599da3032adf2d58ce7d068', class: "Settings", onClick: this.toggleSettingsModal }, h("svg", { key: '594c25ec9c11cad5a41a318aad72b69bbbd49fb6', width: "24", height: "24", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '0cfdf4f39b2ef578e3d7cb0f809466a989fa00ca', 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 = DOMPurify.sanitize(this.content, { ALLOWED_TAGS: [] })) === null || _b === void 0 ? void 0 : _b.length) > this.maxTextLength ||
272
- (((_c = this.content) === null || _c === void 0 ? void 0 : _c.match(/<br\s*\/?>|<\/p>|<\/h[1-6]>/gi)) || []).length > this.maxLines) && (h("div", { key: '7a8a16279b913ee3fffcc223ceed07d2dc144bd9', class: "AccordionArrow", innerHTML: systemIcons.arrowDown.icon, ref: this.assignRefToDropdownArrow })))), this.showSettingsModal ? (h("div", { class: "SettingsDropdown" }, h("button", { onClick: this.toggleNotificationRead }, h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("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(this.messageRead ? 'markAsUnread' : 'markAsRead', this.language)), h("button", { onClick: this.deleteNotification }, h("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("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('removeMessage', this.language)))) : ('')));
271
+ }))), h("div", { key: '18a7875d73dc8fa38af9e41e5659ffbf819c98bf', class: "RightActionsContainer" }, h("div", { key: '25c4464ce247905c472e795b627592a923cf6f57', class: "Settings", onClick: this.toggleSettingsModal }, h("svg", { key: '58afa316f03d21b069e2ed1ff51e83bedc95df99', width: "24", height: "24", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'b23efed4ce00daec9ea20a5eb858b3287978a0c3', 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 = DOMPurify.sanitize(this.content, { ALLOWED_TAGS: [] })) === null || _b === void 0 ? void 0 : _b.length) > this.maxTextLength ||
272
+ (((_c = this.content) === null || _c === void 0 ? void 0 : _c.match(/<br\s*\/?>|<\/p>|<\/h[1-6]>/gi)) || []).length > this.maxLines) && (h("div", { key: '086655633f049e20c89972401378bba2b6167d75', class: "AccordionArrow", innerHTML: systemIcons.arrowDown.icon, ref: this.assignRefToDropdownArrow })))), this.showSettingsModal ? (h("div", { class: "SettingsDropdown" }, h("button", { onClick: this.toggleNotificationRead }, h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("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(this.messageRead ? 'markAsUnread' : 'markAsRead', this.language)), h("button", { onClick: this.deleteNotification }, h("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("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('removeMessage', this.language)))) : ('')));
273
273
  }
274
274
  static get is() { return "nuts-notification"; }
275
275
  static get originalStyleUrls() {
@@ -42446,22 +42446,22 @@ const NutsNotification = class {
42446
42446
  };
42447
42447
  this.notificationActionHandler = () => {
42448
42448
  var _a, _b, _c;
42449
- if (this.notificationAction == 'default' || !this.notificationAction) {
42450
- if (this.redirectUrl.length > 0) {
42451
- window.location.href = this.redirectUrl;
42452
- }
42449
+ if (((_a = this.displayedContent) === null || _a === void 0 ? void 0 : _a.length) !== ((_b = this.content) === null || _b === void 0 ? void 0 : _b.length) && this.displayedContent !== this.content) {
42450
+ this.displayedContent = this.content;
42451
+ this.dropdownArrowRef.classList.add('FlipX');
42452
+ return;
42453
+ }
42454
+ if ((this.notificationAction === 'default' || !this.notificationAction) && this.redirectUrl.length > 0) {
42455
+ window.location.href = this.redirectUrl;
42456
+ return;
42453
42457
  }
42454
- if (this.notificationAction == 'postMessage') {
42458
+ if (this.notificationAction === 'postMessage') {
42455
42459
  window.postMessage({ type: 'NotificationRedirect', url: this.redirectUrl }, window.location.href);
42460
+ return;
42456
42461
  }
42457
42462
  const fullyStrippedContent = DOMPurify.sanitize(this.content, { ALLOWED_TAGS: [] });
42458
42463
  if ((fullyStrippedContent === null || fullyStrippedContent === void 0 ? void 0 : fullyStrippedContent.length) <= this.maxTextLength &&
42459
- (((_a = this.content) === null || _a === void 0 ? void 0 : _a.match(/<br\s*\/?>|<\/p>|<\/h[1-6]>/gi)) || []).length <= this.maxLines) {
42460
- return;
42461
- }
42462
- if (((_b = this.displayedContent) === null || _b === void 0 ? void 0 : _b.length) !== ((_c = this.content) === null || _c === void 0 ? void 0 : _c.length) && this.displayedContent !== this.content) {
42463
- this.displayedContent = this.content;
42464
- this.dropdownArrowRef.classList.add('FlipX');
42464
+ (((_c = this.content) === null || _c === void 0 ? void 0 : _c.match(/<br\s*\/?>|<\/p>|<\/h[1-6]>/gi)) || []).length <= this.maxLines) {
42465
42465
  return;
42466
42466
  }
42467
42467
  this.displayedContent = truncate(this.content, this.maxTextLength, this.maxLines);
@@ -42613,11 +42613,11 @@ const NutsNotification = class {
42613
42613
  'blockquote'
42614
42614
  ]
42615
42615
  });
42616
- return (h("div", { key: 'c905144a812a9a4bd5f4a1b99f27fb948ec11744', class: "Wrapper", onClick: this.toggleNotificationRead }, h("div", { key: '29b7c942a3393fd12429a41ae5d34ac7ae96688f', class: 'NotificationContainer' + (this.messageSeen ? '' : ' Unseen'), ref: this.assignRefToStylingContainer, onClick: this.notificationActionHandler }, this.badge ? (h("div", { class: "AvatarContainer" }, h("div", { class: "Avatar" }, ((_a = systemIcons[this.badge]) === null || _a === void 0 ? void 0 : _a.icon) ? (h("div", { innerHTML: systemIcons[this.badge].icon })) : (h("img", { class: "AvatarImage", src: this.badge }))))) : (''), h("div", { key: '773a581c740f05b8a8c88dd9a7a83a5a181cb744', class: "ContentContainer" }, h("div", { key: 'ec901b6489042dc93c0aa16e9fe2de008f57a9eb', innerHTML: sanitizedNotificationBody }), h("p", { key: '8ed8ab29167220cdec0efcc862e91466944920ef', class: "Date" }, formatDistanceToNow(new Date(this.date), {
42616
+ return (h("div", { key: '533d85d34f0a1edba04e0e5e5095c303b52cae0d', class: "Wrapper", onClick: this.toggleNotificationRead }, h("div", { key: '5de9c75576d858516e26ec54a6e886b46bb5bd86', class: 'NotificationContainer' + (this.messageSeen ? '' : ' Unseen'), ref: this.assignRefToStylingContainer, onClick: this.notificationActionHandler }, this.badge ? (h("div", { class: "AvatarContainer" }, h("div", { class: "Avatar" }, ((_a = systemIcons[this.badge]) === null || _a === void 0 ? void 0 : _a.icon) ? (h("div", { innerHTML: systemIcons[this.badge].icon })) : (h("img", { class: "AvatarImage", src: this.badge }))))) : (''), h("div", { key: 'c67135050a2fc6910c97c2b3026f92933cc17ff3', class: "ContentContainer" }, h("div", { key: '058c86dc00a1a4d262e351163f70414fb9074b69', innerHTML: sanitizedNotificationBody }), h("p", { key: '3bfa0ef911a6e48146ced485c33ee7b7e4be6e57', class: "Date" }, formatDistanceToNow(new Date(this.date), {
42617
42617
  addSuffix: true,
42618
42618
  locale: dateFnsLocale(this.language)
42619
- }))), h("div", { key: 'a7ca9c08eb2526705ffd623932c806f8cd50e517', class: "RightActionsContainer" }, h("div", { key: '30ad1c0862b402074599da3032adf2d58ce7d068', class: "Settings", onClick: this.toggleSettingsModal }, h("svg", { key: '594c25ec9c11cad5a41a318aad72b69bbbd49fb6', width: "24", height: "24", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '0cfdf4f39b2ef578e3d7cb0f809466a989fa00ca', 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 = DOMPurify.sanitize(this.content, { ALLOWED_TAGS: [] })) === null || _b === void 0 ? void 0 : _b.length) > this.maxTextLength ||
42620
- (((_c = this.content) === null || _c === void 0 ? void 0 : _c.match(/<br\s*\/?>|<\/p>|<\/h[1-6]>/gi)) || []).length > this.maxLines) && (h("div", { key: '7a8a16279b913ee3fffcc223ceed07d2dc144bd9', class: "AccordionArrow", innerHTML: systemIcons.arrowDown.icon, ref: this.assignRefToDropdownArrow })))), this.showSettingsModal ? (h("div", { class: "SettingsDropdown" }, h("button", { onClick: this.toggleNotificationRead }, h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("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)), h("button", { onClick: this.deleteNotification }, h("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("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)))) : ('')));
42619
+ }))), h("div", { key: '18a7875d73dc8fa38af9e41e5659ffbf819c98bf', class: "RightActionsContainer" }, h("div", { key: '25c4464ce247905c472e795b627592a923cf6f57', class: "Settings", onClick: this.toggleSettingsModal }, h("svg", { key: '58afa316f03d21b069e2ed1ff51e83bedc95df99', width: "24", height: "24", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'b23efed4ce00daec9ea20a5eb858b3287978a0c3', 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 = DOMPurify.sanitize(this.content, { ALLOWED_TAGS: [] })) === null || _b === void 0 ? void 0 : _b.length) > this.maxTextLength ||
42620
+ (((_c = this.content) === null || _c === void 0 ? void 0 : _c.match(/<br\s*\/?>|<\/p>|<\/h[1-6]>/gi)) || []).length > this.maxLines) && (h("div", { key: '086655633f049e20c89972401378bba2b6167d75', class: "AccordionArrow", innerHTML: systemIcons.arrowDown.icon, ref: this.assignRefToDropdownArrow })))), this.showSettingsModal ? (h("div", { class: "SettingsDropdown" }, h("button", { onClick: this.toggleNotificationRead }, h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("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)), h("button", { onClick: this.deleteNotification }, h("svg", { width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("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)))) : ('')));
42621
42621
  }
42622
42622
  get el() { return getElement(this); }
42623
42623
  static get watchers() { return {