@everymatrix/nuts-inbox-widget 1.73.2 → 1.73.21

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.
Files changed (32) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/nuts-inbox-widget.cjs.js +1 -1
  3. package/dist/cjs/nuts-inbox-widget_3.cjs.entry.js +155 -65
  4. package/dist/collection/api/methods/index.js +31 -12
  5. package/dist/collection/components/nuts-inbox-widget/nuts-inbox-widget.js +17 -7
  6. package/dist/collection/components/nuts-notification/nuts-notification.css +2 -1
  7. package/dist/collection/components/nuts-notification/nuts-notification.js +39 -30
  8. package/dist/collection/components/nuts-popover/nuts-popover.css +87 -4
  9. package/dist/collection/components/nuts-popover/nuts-popover.js +106 -13
  10. package/dist/collection/utils/locale.utils.js +18 -7
  11. package/dist/esm/loader.js +1 -1
  12. package/dist/esm/nuts-inbox-widget.js +1 -1
  13. package/dist/esm/nuts-inbox-widget_3.entry.js +155 -65
  14. package/dist/nuts-inbox-widget/nuts-inbox-widget.esm.js +1 -1
  15. package/dist/nuts-inbox-widget/nuts-inbox-widget_3.entry.js +1 -1
  16. package/dist/types/api/methods/index.d.ts +8 -4
  17. package/dist/types/api/methods/types.d.ts +3 -1
  18. package/dist/types/components/nuts-inbox-widget/nuts-inbox-widget.d.ts +1 -0
  19. package/dist/types/components/nuts-notification/nuts-notification.d.ts +2 -0
  20. package/dist/types/components/nuts-popover/nuts-popover.d.ts +10 -0
  21. package/dist/types/components.d.ts +4 -0
  22. package/dist/types/types/nuts-inbox-widget.types.d.ts +1 -12
  23. package/package.json +1 -1
  24. /package/dist/types/Users/{adrian.pripon/Documents/Work → StefanO/Desktop/Proj}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
  25. /package/dist/types/Users/{adrian.pripon/Documents/Work → StefanO/Desktop/Proj}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.d.ts +0 -0
  26. /package/dist/types/Users/{adrian.pripon/Documents/Work → StefanO/Desktop/Proj}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.dev.d.ts +0 -0
  27. /package/dist/types/Users/{adrian.pripon/Documents/Work → StefanO/Desktop/Proj}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/storybook/main.d.ts +0 -0
  28. /package/dist/types/Users/{adrian.pripon/Documents/Work → StefanO/Desktop/Proj}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/storybook/preview.d.ts +0 -0
  29. /package/dist/types/Users/{adrian.pripon/Documents/Work → StefanO/Desktop/Proj}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/tools/plugins/index.d.ts +0 -0
  30. /package/dist/types/Users/{adrian.pripon/Documents/Work → StefanO/Desktop/Proj}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  31. /package/dist/types/Users/{adrian.pripon/Documents/Work → StefanO/Desktop/Proj}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  32. /package/dist/types/Users/{adrian.pripon/Documents/Work → StefanO/Desktop/Proj}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index-6a331097.js';
2
2
 
3
3
  const DEFAULT_LANGUAGE = 'en';
4
- const SUPPORTED_LANGUAGES = ['hu', 'en'];
4
+ const SUPPORTED_LANGUAGES = ['hu', 'en', 'tr'];
5
5
  const TRANSLATIONS = {
6
6
  en: {
7
7
  notifications: 'Notifications',
@@ -10,8 +10,20 @@ const TRANSLATIONS = {
10
10
  markAsRead: 'Mark as read',
11
11
  markAsUnread: 'Mark as unread',
12
12
  removeMessage: 'Remove the message',
13
+ deleteAllMessages: 'Delete all messages',
13
14
  next: 'Next',
14
- prev: 'Previous',
15
+ prev: 'Previous'
16
+ },
17
+ tr: {
18
+ notifications: 'Bildirimler',
19
+ noMessages: 'Burada henüz görülecek yeni bir şey yok',
20
+ markAllAsRead: 'Hepsini okunmuş olarak işaretle',
21
+ markAsRead: 'Okunmuş olarak işaretle',
22
+ markAsUnread: 'Okunmamış olarak işaretle',
23
+ removeMessage: 'Bu mesajı sil',
24
+ deleteAllMessages: 'Tüm mesajları sil',
25
+ next: 'Sonraki',
26
+ prev: 'Önceki'
15
27
  },
16
28
  hu: {
17
29
  notifications: 'értesítéseket',
@@ -20,15 +32,14 @@ const TRANSLATIONS = {
20
32
  markAsRead: 'Jelöld olvasottként',
21
33
  markAsUnread: 'Megjelölés olvasatlanként',
22
34
  removeMessage: 'Távolítsa el az üzenetet',
35
+ deleteAllMessages: 'Delete all messages',
23
36
  next: 'Következő',
24
- prev: 'Előző',
25
- },
37
+ prev: 'Előző'
38
+ }
26
39
  };
27
40
  const translate$1 = (key, customLang, values) => {
28
41
  const lang = customLang;
29
- let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang)
30
- ? lang
31
- : DEFAULT_LANGUAGE][key];
42
+ let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
32
43
  if (values !== undefined) {
33
44
  for (const [key, value] of Object.entries(values.values)) {
34
45
  const regex = new RegExp(`{${key}}`, 'g');
@@ -4099,25 +4110,25 @@ const initializeSession = async ({ baseUrl, body, sessionId }) => {
4099
4110
  });
4100
4111
  return {
4101
4112
  token: newToken,
4102
- unseenCounter,
4113
+ unseenCounter
4103
4114
  };
4104
4115
  }
4105
4116
  catch (error) {
4106
4117
  console.log(error);
4107
4118
  return {
4108
4119
  token: null,
4109
- unseenCounter: 0,
4120
+ unseenCounter: 0
4110
4121
  };
4111
4122
  }
4112
4123
  };
4113
- const getUnseenCount = async ({ baseUrl, token, }) => {
4124
+ const getUnseenCount = async ({ baseUrl, token }) => {
4114
4125
  var _a;
4115
4126
  const url = new URL(`${baseUrl}/widgets/notifications/unseen?limit=100`);
4116
4127
  const headers = new Headers();
4117
4128
  headers.append('Widget-Authorization', `Bearer ${token}`);
4118
4129
  const options = {
4119
4130
  method: 'GET',
4120
- headers,
4131
+ headers
4121
4132
  };
4122
4133
  try {
4123
4134
  const res = await fetch(url.href, options);
@@ -4130,13 +4141,13 @@ const getUnseenCount = async ({ baseUrl, token, }) => {
4130
4141
  return 0;
4131
4142
  }
4132
4143
  };
4133
- const deleteMessage = async ({ baseUrl, token, messageId, }) => {
4144
+ const deleteMessage = async ({ baseUrl, token, messageId }) => {
4134
4145
  const url = new URL(`${baseUrl}/widgets/messages/${messageId}`);
4135
4146
  const headers = new Headers();
4136
4147
  headers.append('Widget-Authorization', `Bearer ${token}`);
4137
4148
  const options = {
4138
4149
  method: 'DELETE',
4139
- headers,
4150
+ headers
4140
4151
  };
4141
4152
  try {
4142
4153
  await fetch(url.href, options);
@@ -4147,7 +4158,7 @@ const deleteMessage = async ({ baseUrl, token, messageId, }) => {
4147
4158
  return true;
4148
4159
  }
4149
4160
  };
4150
- const markAsRead = async ({ baseUrl, body, token, unread, }) => {
4161
+ const markAsRead = async ({ baseUrl, body, token, unread }) => {
4151
4162
  const url = new URL(`${baseUrl}/widgets/messages/markAs`);
4152
4163
  const headers = new Headers();
4153
4164
  headers.append('Widget-Authorization', `Bearer ${token}`);
@@ -4155,7 +4166,7 @@ const markAsRead = async ({ baseUrl, body, token, unread, }) => {
4155
4166
  const options = {
4156
4167
  method: 'POST',
4157
4168
  headers,
4158
- body: JSON.stringify(body),
4169
+ body: JSON.stringify(body)
4159
4170
  };
4160
4171
  try {
4161
4172
  const res = await fetch(url.href, options);
@@ -4163,7 +4174,7 @@ const markAsRead = async ({ baseUrl, body, token, unread, }) => {
4163
4174
  return {
4164
4175
  messageSeen: data.data[0].seen,
4165
4176
  messageRead: data.data[0].read,
4166
- showSettingsModal: false,
4177
+ showSettingsModal: false
4167
4178
  };
4168
4179
  }
4169
4180
  catch (err) {
@@ -4171,7 +4182,7 @@ const markAsRead = async ({ baseUrl, body, token, unread, }) => {
4171
4182
  return {
4172
4183
  messageSeen: unread,
4173
4184
  messageRead: unread,
4174
- showSettingsModal: true,
4185
+ showSettingsModal: true
4175
4186
  };
4176
4187
  }
4177
4188
  };
@@ -4182,7 +4193,7 @@ const getNotifications = async ({ baseUrl, page, token }) => {
4182
4193
  headers.append('Widget-Authorization', `Bearer ${token}`);
4183
4194
  const options = {
4184
4195
  method: 'GET',
4185
- headers,
4196
+ headers
4186
4197
  };
4187
4198
  try {
4188
4199
  const res = await fetch(url.href, options);
@@ -4191,6 +4202,7 @@ const getNotifications = async ({ baseUrl, page, token }) => {
4191
4202
  isLoading: false,
4192
4203
  numberOfNotifications: data.totalCount,
4193
4204
  notifications: data.data,
4205
+ hasMore: data.hasMore
4194
4206
  };
4195
4207
  }
4196
4208
  catch (error) {
@@ -4199,10 +4211,11 @@ const getNotifications = async ({ baseUrl, page, token }) => {
4199
4211
  isLoading: false,
4200
4212
  numberOfNotifications: 0,
4201
4213
  notifications: [],
4214
+ hasMore: undefined
4202
4215
  };
4203
4216
  }
4204
4217
  };
4205
- const markAllAsRead = async ({ baseUrl, token, }) => {
4218
+ const markAllAsRead = async ({ baseUrl, token }) => {
4206
4219
  const url = new URL(`${baseUrl}/widgets/messages/read`);
4207
4220
  const headers = new Headers();
4208
4221
  headers.append('Widget-Authorization', `Bearer ${token}`);
@@ -4221,6 +4234,23 @@ const markAllAsRead = async ({ baseUrl, token, }) => {
4221
4234
  return false;
4222
4235
  }
4223
4236
  };
4237
+ const deleteAll = async ({ baseUrl, token }) => {
4238
+ const url = new URL(`${baseUrl}/widgets/messages`);
4239
+ const headers = new Headers();
4240
+ headers.append('Widget-Authorization', `Bearer ${token}`);
4241
+ const options = {
4242
+ method: 'DELETE',
4243
+ headers
4244
+ };
4245
+ try {
4246
+ await fetch(url.href, options);
4247
+ return true;
4248
+ }
4249
+ catch (error) {
4250
+ console.log(error);
4251
+ return false;
4252
+ }
4253
+ };
4224
4254
 
4225
4255
  const nutsInboxWidgetCss = ":host{display:block;font-family:\"Roboto\", \"Arial\", sans-serif}.BellIconWrapper{width:100%;height:40px;display:flex}.BellIconWrapper :hover{cursor:pointer}.BellIcon{width:40px;height:40px;display:flex;justify-content:center;align-items:center}";
4226
4256
  const NutsInboxWidgetStyle0 = nutsInboxWidgetCss;
@@ -4296,10 +4326,11 @@ const NutsInboxWidget = class {
4296
4326
  initializeSession({
4297
4327
  baseUrl: this.baseUrl,
4298
4328
  body: this.initializeSessionBody,
4299
- sessionId: this.sessionId,
4329
+ sessionId: this.sessionId
4300
4330
  }).then((initializeSessionResult) => {
4301
4331
  this.token = initializeSessionResult.token;
4302
4332
  this.unseenCount = initializeSessionResult.unseenCounter;
4333
+ window.postMessage({ type: 'nuts-new-notifications', value: this.unseenCount }, window.location.href);
4303
4334
  this.setupSocket();
4304
4335
  });
4305
4336
  }
@@ -4317,6 +4348,9 @@ const NutsInboxWidget = class {
4317
4348
  this.unseenCount = 0;
4318
4349
  window.postMessage({ type: 'all-notifications-read', value: true }, window.location.href);
4319
4350
  }
4351
+ closePopoverHandler() {
4352
+ this.popoverVisible = false;
4353
+ }
4320
4354
  positionIcon() {
4321
4355
  if (this.bellIconPosition == 'left') {
4322
4356
  this.bellIconRef.style.justifyContent = 'flex-start';
@@ -4333,8 +4367,8 @@ const NutsInboxWidget = class {
4333
4367
  reconnectionAttempts: 10,
4334
4368
  transports: ['websocket'],
4335
4369
  auth: {
4336
- token: `${this.token}`,
4337
- },
4370
+ token: `${this.token}`
4371
+ }
4338
4372
  });
4339
4373
  this.socketRef.on('connect_error', (error) => {
4340
4374
  console.error('WebSocket error', error);
@@ -4347,8 +4381,7 @@ const NutsInboxWidget = class {
4347
4381
  });
4348
4382
  this.socketRef.on('unseen_count_changed', (data) => {
4349
4383
  this.unseenCount = data.unseenCount;
4350
- this.unseenCount > 0 &&
4351
- window.postMessage({ type: 'nuts-new-notifications', value: this.unseenCount }, window.location.href);
4384
+ window.postMessage({ type: 'nuts-new-notifications', value: this.unseenCount }, window.location.href);
4352
4385
  });
4353
4386
  }
4354
4387
  }
@@ -4361,6 +4394,7 @@ const NutsInboxWidget = class {
4361
4394
  });
4362
4395
  this.token = initializeSessionResult.token;
4363
4396
  this.unseenCount = initializeSessionResult.unseenCounter;
4397
+ window.postMessage({ type: 'nuts-new-notifications', value: this.unseenCount }, window.location.href);
4364
4398
  this.setupSocket();
4365
4399
  }
4366
4400
  if (this.clientStylingUrl) {
@@ -4402,7 +4436,7 @@ const NutsInboxWidget = class {
4402
4436
  return (h("div", { onClick: this.togglePopover, class: "BellIcon" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", fill: "currentColor", class: "bi bi-bell", viewBox: "0 0 16 16" }, ' ', h("path", { d: "M8 16a2 2 0 0 0 2-2H6a2 2 0 0 0 2 2zM8 1.918l-.797.161A4.002 4.002 0 0 0 4 6c0 .628-.134 2.197-.459 3.742-.16.767-.376 1.566-.663 2.258h10.244c-.287-.692-.502-1.49-.663-2.258C12.134 8.197 12 6.628 12 6a4.002 4.002 0 0 0-3.203-3.92L8 1.917zM14.22 12c.223.447.481.801.78 1H1c.299-.199.557-.553.78-1C2.68 10.2 3 6.88 3 6c0-2.42 1.72-4.44 4.005-4.901a1 1 0 1 1 1.99 0A5.002 5.002 0 0 1 13 6c0 .88.32 4.2 1.22 6z" }), ' '), this.unseenCount > 0 ? (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", class: "nc-bell-button-dot css-0 css-1eg2znq" }, h("rect", { x: "1.5", y: "1.5", width: "13", height: "13", rx: "6.5", fill: "url(#paint0_linear_1722_2699)", stroke: "#1E1E26", "stroke-width": "3" }), h("defs", null, h("linearGradient", { id: "paint0_linear_1722_2699", x1: "8", y1: "13", x2: "8", y2: "3", gradientUnits: "userSpaceOnUse" }, h("stop", { "stop-color": "#FF512F" }), h("stop", { offset: "1", "stop-color": "#DD2476" }))))) : ('')));
4403
4437
  }
4404
4438
  render() {
4405
- return (h("div", { key: '0e8cf6021dfd192f4c978bd976afa999eb074e87', ref: this.assignRefToStylingContainer, class: "Wrapper" }, h("div", { key: '9d3e3b45df7fa2be2450b121a24423e026a1c8de', ref: this.assignRefToBell, class: "BellIconWrapper" }, !this.isLoading && this.renderBellIcon()), this.popoverVisible && (h("nuts-popover", { key: '8b9f149da25f261cdd5c7fb5d794301837bc31ee', "notification-action": this.notificationAction, sessionId: this.sessionId, "unseen-count": this.unseenCount, token: this.token, "backend-url": this.backendUrl, "operator-id": this.operatorId, "user-id": this.userId, language: this.language, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl }))));
4439
+ return (h("div", { key: 'f660aad5bb8aef73e2db8c3fd8f61ef0f658427f', ref: this.assignRefToStylingContainer, class: "Wrapper" }, h("div", { key: '2f43938760a2deeaf8b753a68206675092fb6074', ref: this.assignRefToBell, class: "BellIconWrapper" }, !this.isLoading && this.renderBellIcon()), this.popoverVisible && (h("nuts-popover", { key: '89452813e0317939dde0196a043c9c86e7ac771d', "notification-action": this.notificationAction, sessionId: this.sessionId, "unseen-count": this.unseenCount, token: this.token, "backend-url": this.backendUrl, "operator-id": this.operatorId, "user-id": this.userId, language: this.language, "client-styling": this.clientStyling, "client-styling-url": this.clientStylingUrl, "translation-url": this.translationUrl }))));
4406
4440
  }
4407
4441
  get el() { return getElement(this); }
4408
4442
  static get watchers() { return {
@@ -42131,6 +42165,10 @@ const CheckCircleFilled$1 = CheckCircleFilled;
42131
42165
  var CloseCircleFilled = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, "name": "close-circle", "theme": "filled" };
42132
42166
  const CloseCircleFilled$1 = CloseCircleFilled;
42133
42167
 
42168
+ // This icon file is generated automatically.
42169
+ var CloseCircleOutlined = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z" } }] }, "name": "close-circle", "theme": "outlined" };
42170
+ const CloseCircleOutlined$1 = CloseCircleOutlined;
42171
+
42134
42172
  // This icon file is generated automatically.
42135
42173
  var DownOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" } }] }, "name": "down", "theme": "outlined" };
42136
42174
  const DownOutlined$1 = DownOutlined;
@@ -42205,45 +42243,45 @@ const truncate = (str, n) => {
42205
42243
  return str.length > n ? str.slice(0, n - 1) + '...' : str;
42206
42244
  };
42207
42245
 
42208
- 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-all}.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}";
42246
+ 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}";
42209
42247
  const NutsNotificationStyle0 = nutsNotificationCss;
42210
42248
 
42211
42249
  const systemIcons = {
42212
42250
  warning: {
42213
42251
  icon: renderIconDefinitionToSVGElement(WarningFilled$1, {
42214
- extraSVGAttrs: { width: '20px', height: '20px', fill: '#FFF000' },
42215
- }),
42252
+ extraSVGAttrs: { width: '20px', height: '20px', fill: '#FFF000' }
42253
+ })
42216
42254
  },
42217
42255
  info: {
42218
42256
  icon: renderIconDefinitionToSVGElement(InfoCircleFilled$1, {
42219
- extraSVGAttrs: { width: '20px', height: '20px', fill: '#0000FF' },
42220
- }),
42257
+ extraSVGAttrs: { width: '20px', height: '20px', fill: '#0000FF' }
42258
+ })
42221
42259
  },
42222
42260
  up: {
42223
42261
  icon: renderIconDefinitionToSVGElement(UpCircleFilled$1, {
42224
- extraSVGAttrs: { width: '20px', height: '20px', fill: '#A1A1B2' },
42225
- }),
42262
+ extraSVGAttrs: { width: '20px', height: '20px', fill: '#A1A1B2' }
42263
+ })
42226
42264
  },
42227
42265
  question: {
42228
42266
  icon: renderIconDefinitionToSVGElement(QuestionCircleFilled$1, {
42229
- extraSVGAttrs: { width: '20px', height: '20px', fill: '#A1A1B2' },
42230
- }),
42267
+ extraSVGAttrs: { width: '20px', height: '20px', fill: '#A1A1B2' }
42268
+ })
42231
42269
  },
42232
42270
  success: {
42233
42271
  icon: renderIconDefinitionToSVGElement(CheckCircleFilled$1, {
42234
- extraSVGAttrs: { width: '20px', height: '20px', fill: '#4D9980' },
42235
- }),
42272
+ extraSVGAttrs: { width: '20px', height: '20px', fill: '#4D9980' }
42273
+ })
42236
42274
  },
42237
42275
  error: {
42238
42276
  icon: renderIconDefinitionToSVGElement(CloseCircleFilled$1, {
42239
- extraSVGAttrs: { width: '20px', height: '20px', fill: '#E54545' },
42240
- }),
42277
+ extraSVGAttrs: { width: '20px', height: '20px', fill: '#E54545' }
42278
+ })
42241
42279
  },
42242
42280
  arrowDown: {
42243
42281
  icon: renderIconDefinitionToSVGElement(DownOutlined$1, {
42244
- extraSVGAttrs: { width: '16px', height: '16px', fill: '#A1A1B2' },
42245
- }),
42246
- },
42282
+ extraSVGAttrs: { width: '16px', height: '16px', fill: '#A1A1B2' }
42283
+ })
42284
+ }
42247
42285
  };
42248
42286
  const dateFnsLocale = (lang) => {
42249
42287
  return lang in dateFnsLocales ? dateFnsLocales[lang] : defaultLocale;
@@ -42265,14 +42303,14 @@ const NutsNotification = class {
42265
42303
  messageId: `${this.messageId}`,
42266
42304
  mark: {
42267
42305
  seen: !unread,
42268
- read: !unread,
42269
- },
42306
+ read: !unread
42307
+ }
42270
42308
  };
42271
42309
  const notificationData = await markAsRead({
42272
42310
  baseUrl: this.baseUrl,
42273
42311
  body: markAsReadBody,
42274
42312
  token: this.token,
42275
- unread,
42313
+ unread
42276
42314
  });
42277
42315
  this.messageRead = notificationData.messageRead;
42278
42316
  this.messageSeen = notificationData.messageSeen;
@@ -42282,7 +42320,7 @@ const NutsNotification = class {
42282
42320
  const deleteMessageResponse = await deleteMessage({
42283
42321
  baseUrl: this.baseUrl,
42284
42322
  token: this.token,
42285
- messageId: this.messageId,
42323
+ messageId: this.messageId
42286
42324
  });
42287
42325
  this.showSettingsModal = deleteMessageResponse;
42288
42326
  if (deleteMessageResponse) {
@@ -42300,14 +42338,10 @@ const NutsNotification = class {
42300
42338
  if (this.notificationAction == 'postMessage') {
42301
42339
  window.postMessage({ type: 'NotificationRedirect', url: this.redirectUrl }, window.location.href);
42302
42340
  }
42303
- if (!this.messageRead) {
42304
- this.toggleNotificationRead();
42305
- }
42306
42341
  if (((_a = this.content) === null || _a === void 0 ? void 0 : _a.length) <= MAX_NOTIFICATION_TEXT_LENGTH) {
42307
42342
  return;
42308
42343
  }
42309
- if (((_b = this.displayedContent) === null || _b === void 0 ? void 0 : _b.length) !== ((_c = this.content) === null || _c === void 0 ? void 0 : _c.length) &&
42310
- this.displayedContent !== this.content) {
42344
+ 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) {
42311
42345
  this.displayedContent = this.content;
42312
42346
  this.dropdownArrowRef.classList.add('FlipX');
42313
42347
  return;
@@ -42375,6 +42409,12 @@ const NutsNotification = class {
42375
42409
  this.showSettingsModal = false;
42376
42410
  }
42377
42411
  }
42412
+ clickOutsideHandle(ev) {
42413
+ if (ev.composedPath().some((elem) => this.el === elem)) {
42414
+ return;
42415
+ }
42416
+ this.showSettingsModal = false;
42417
+ }
42378
42418
  handleStylingChange(newValue, oldValue) {
42379
42419
  if (newValue !== oldValue)
42380
42420
  this.setClientStyling();
@@ -42412,14 +42452,15 @@ const NutsNotification = class {
42412
42452
  var _a, _b;
42413
42453
  const sanitizedNotificationBody = DOMPurify.sanitize(this.displayedContent, {
42414
42454
  ALLOW_UNKNOWN_PROTOCOLS: true,
42415
- ADD_ATTR: ["target"],
42455
+ ADD_ATTR: ['target'],
42416
42456
  ALLOWED_TAGS: ['b', 'u', 'i', 'br']
42417
42457
  });
42418
- return (h("div", { key: '02f77b55becbf6b5064cda7906890ba4cb070741', class: "Wrapper" }, h("div", { key: '2b4e60415d62b519123c83a2c26a164a76d8f23c', 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: '9b14e7e81253c82b31daefcff850900dc54f9b10', class: "ContentContainer" }, h("div", { key: 'eb83954f1331596fa851d54e93b9ce2c7421d339', innerHTML: sanitizedNotificationBody }), h("p", { key: 'ef1b3a410e527d834c15d575112ecf30a2c3a76b', class: "Date" }, formatDistanceToNow(new Date(this.date), {
42458
+ return (h("div", { key: '4a70f3f0ca827894e98cc605cebb67efa5567918', class: "Wrapper" }, h("div", { key: 'd717cf730c9ecb478fab0db4c1186a9aa8095587', 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: 'c73b0520101c69cbdea984aaa49d614cd2f083bf', class: "ContentContainer" }, h("div", { key: '7b5db1b999db6d4bcd4e6980ab9f25e0e7b39bf9', innerHTML: sanitizedNotificationBody }), h("p", { key: '623e6c65b1162529686b4b822695e290619baeb7', class: "Date" }, formatDistanceToNow(new Date(this.date), {
42419
42459
  addSuffix: true,
42420
- locale: dateFnsLocale(this.language),
42421
- }))), h("div", { key: 'a01d8e1fe13be2cf7abcb9cd661a69c7de61b87d', class: "RightActionsContainer" }, h("div", { key: 'bdf92ba2d2e66d704b82eee1543a651708bfe2d4', class: "Settings", onClick: this.toggleSettingsModal }, h("svg", { key: '2c85b402bb38c3b59b7f91ca30fae88e62941a95', width: "24", height: "24", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '4aec7a96ac98ccab1c42328c06cc1718f2859af9', 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) > MAX_NOTIFICATION_TEXT_LENGTH && (h("div", { key: 'f06f2fec7bae9d69848c165dd9ef527c0ab24329', 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)))) : ('')));
42460
+ locale: dateFnsLocale(this.language)
42461
+ }))), h("div", { key: 'b48ab6a8819672f2d15bd627c74574e1020d65d7', class: "RightActionsContainer" }, h("div", { key: 'd83c2390ba7905c4f619260a419ff80dddfd305d', class: "Settings", onClick: this.toggleSettingsModal }, h("svg", { key: '68a503334849a491f09f94dcc1d29062ee197191', width: "24", height: "24", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'babb4b5377e4b95740d9239d3d9fb2b2827a4f71', 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) > MAX_NOTIFICATION_TEXT_LENGTH && (h("div", { key: '0b77f7441b8ab5e2288e266d2dfc9beda5b8fa3d', 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)))) : ('')));
42422
42462
  }
42463
+ get el() { return getElement(this); }
42423
42464
  static get watchers() { return {
42424
42465
  "clientStyling": ["handleStylingChange"],
42425
42466
  "clientStylingUrl": ["handleStylingUrlChange"],
@@ -42428,33 +42469,42 @@ const NutsNotification = class {
42428
42469
  };
42429
42470
  NutsNotification.style = NutsNotificationStyle0;
42430
42471
 
42431
- const nutsPopoverCss = ":host{display:block}.Popover{padding:15px 0px;border-radius:7px;box-shadow:var(--emw--color-gray-400, rgba(0, 0, 0, 0.2)) 0px 5px 20px;background:var(--emw--color-gray-300, rgb(30, 30, 38));margin:0px;font-family:inherit;color:var(--emw--color-gray-200, rgb(51, 55, 55));direction:ltr;width:420px;z-index:999;position:absolute;right:0}.Popover .Header{display:flex;justify-content:space-between;padding:0 20px 10px 20px;box-shadow:var(--emw--color-gray-20, rgba(0, 0, 0, 0.2)) 0px 5px 5px -5px}.Popover .Header .Title{color:var(--emw--color-white, rgb(255, 255, 255));font-size:20px;font-style:normal;font-weight:700;line-height:24px;text-align:center;padding-left:10px}.Popover .Header .Title .UnseenCounter{text-decoration:none;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;text-transform:uppercase;border-radius:var(--emw--border-radius-medium, 10px);letter-spacing:0.25px;text-overflow:ellipsis;overflow:hidden;padding:0px;margin-left:10px;width:25px;height:20px;pointer-events:none;border:none;background:linear-gradient(0deg, var(--emw--color-secondary-20, rgb(255, 81, 47)) 0%, var(--emw--color-secondary, rgb(221, 36, 118)) 100%);font-family:inherit;line-height:14px;color:var(--emw--color-white, rgb(255, 255, 255));font-weight:bold;font-size:12px}.Popover .Header .MarkAsRead{margin-top:5px;margin-right:10px;font-size:14px;font-style:normal;font-weight:400;line-height:17px;color:var(--emw--color-gray-150, rgb(130, 130, 153));cursor:pointer;pointer-events:auto;opacity:0.5}.Popover .Header .MarkAsRead:hover{opacity:0.7;transition:250ms}.Popover .NotificationList{height:400px;overflow:auto;box-shadow:0px 20px 10px -20px rgba(0, 0, 0, 0.45) inset, 0px -20px 10px -20px rgba(0, 0, 0, 0.45) inset}.Popover .NotificationList .NoMessages{display:flex;justify-content:center;flex-direction:column;align-items:center;height:100%}.Popover .NotificationList .NoMessages p{color:var(--emw--color-white, #fff);opacity:0.7}.Popover .Pagination{display:flex;justify-content:space-around;margin-top:13px}.Popover .Pagination .Button{width:43%}.Popover .Pagination .Button 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;justify-content:center}.Popover .Pagination .Button button svg{width:15px;height:15px;fill:white}.Popover .Pagination .Button button:disabled{cursor:default;opacity:0.5}.Popover .Pagination .Button button:hover:enabled{background:var(--emw--color-gray-300, rgb(61, 61, 77));transition:300ms}";
42472
+ const nutsPopoverCss = ":host{display:block}.Popover{padding:15px 0px;border-radius:7px;box-shadow:var(--emw--color-gray-400, rgba(0, 0, 0, 0.2)) 0px 5px 20px;background:var(--emw--color-gray-300, rgb(30, 30, 38));margin:0px;font-family:inherit;color:var(--emw--color-gray-200, rgb(51, 55, 55));direction:ltr;width:420px;z-index:999;position:absolute;right:0}.Popover .Header{display:flex;padding:0 20px 10px 20px;align-items:center;box-shadow:var(--emw--color-gray-20, rgba(0, 0, 0, 0.2)) 0px 5px 5px -5px}.Popover .Header .Title{color:var(--emw--color-white, rgb(255, 255, 255));font-size:20px;font-style:normal;font-weight:700;line-height:24px;text-align:center;padding-left:10px;display:flex;align-items:center;gap:5px}.Popover .Header .Title .UnseenCounter{margin-right:5px;display:flex;align-items:center;justify-content:center;text-decoration:none;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;text-transform:uppercase;border-radius:var(--emw--border-radius-medium, 10px);letter-spacing:0.25px;text-overflow:ellipsis;overflow:hidden;padding:0px;width:25px;height:20px;pointer-events:none;border:none;background:linear-gradient(0deg, var(--emw--color-secondary-20, rgb(255, 81, 47)) 0%, var(--emw--color-secondary, rgb(221, 36, 118)) 100%);font-family:inherit;line-height:14px;color:var(--emw--color-white, rgb(255, 255, 255));font-weight:bold;font-size:12px}.Popover .Header .MarkAsRead{font-size:14px;font-style:normal;font-weight:400;line-height:17px;color:var(--emw--color-gray-150, rgb(130, 130, 153));cursor:pointer;pointer-events:auto;opacity:0.5}.Popover .Header .MarkAsRead:hover{opacity:0.7;transition:250ms}.Popover .Header .DeleteAll,.Popover .Header .Close{font-style:normal;border:none;background:transparent;font-weight:400;line-height:17px;color:var(--emw--color-gray-150, rgb(130, 130, 153));cursor:pointer;pointer-events:auto;opacity:0.5}.Popover .Header .DeleteAll svg,.Popover .Header .Close svg{width:25px;height:25px}.Popover .Header .DeleteAll:hover,.Popover .Header .Close:hover{opacity:0.7;transition:250ms}.Popover .Header .DeleteAll svg{width:30px;height:30px}.Popover .Header .DeleteAll.Active{opacity:1}.Popover .Header .DeleteAll:disabled{opacity:0.5;cursor:not-allowed}.Popover .Header .Close{margin-left:auto}.Popover .DeleteAllDropdown{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:100px;top:50px}.Popover .DeleteAllDropdown svg{margin-right:10px}.Popover .DeleteAllDropdown 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}.Popover .DeleteAllDropdown button:hover{background:var(--emw--color-gray-300, rgb(61, 61, 77));transition:300ms}.Popover .NotificationList{height:400px;overflow:auto;box-shadow:0px 20px 10px -20px rgba(0, 0, 0, 0.45) inset, 0px -20px 10px -20px rgba(0, 0, 0, 0.45) inset}.Popover .NotificationList .NoMessages{display:flex;justify-content:center;flex-direction:column;align-items:center;height:100%}.Popover .NotificationList .NoMessages p{color:var(--emw--color-white, #fff);opacity:0.7}.Popover .Pagination{display:flex;justify-content:space-around;margin-top:13px}.Popover .Pagination .Button{width:43%}.Popover .Pagination .Button 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;justify-content:center}.Popover .Pagination .Button button svg{width:15px;height:15px;fill:white}.Popover .Pagination .Button button:disabled{cursor:default;opacity:0.5}.Popover .Pagination .Button button:hover:enabled{background:var(--emw--color-gray-300, rgb(61, 61, 77));transition:300ms}";
42432
42473
  const NutsPopoverStyle0 = nutsPopoverCss;
42433
42474
 
42434
42475
  const NutsPopover = class {
42435
42476
  constructor(hostRef) {
42436
42477
  registerInstance(this, hostRef);
42437
42478
  this.allNotificationsRead = createEvent(this, "allNotificationsRead", 7);
42479
+ this.allMessagesDeteled = createEvent(this, "allMessagesDeleted", 7);
42480
+ this.closePopoverEmmiter = createEvent(this, "closePopover", 7);
42438
42481
  this.currentPage = 0;
42439
42482
  this.updateNotificationsDataAfterPageChange = (getNotificationsData) => {
42440
- this.isLoading = getNotificationsData.isLoading;
42441
42483
  this.notifications = getNotificationsData.notifications;
42484
+ this.hasMore = getNotificationsData.hasMore;
42485
+ this.isLoading = getNotificationsData.isLoading;
42442
42486
  };
42443
42487
  this.nextPage = async () => {
42488
+ if (!this.hasMore) {
42489
+ return;
42490
+ }
42491
+ this.currentPage++;
42444
42492
  getNotifications({
42445
42493
  baseUrl: this.baseUrl,
42446
42494
  token: this.token,
42447
- page: ++this.currentPage,
42495
+ page: this.currentPage
42448
42496
  }).then((data) => {
42449
- console.log(data);
42450
42497
  return this.updateNotificationsDataAfterPageChange(data);
42451
42498
  });
42452
42499
  };
42453
42500
  this.prevPage = () => {
42501
+ if (this.currentPage > 0) {
42502
+ this.currentPage--;
42503
+ }
42454
42504
  getNotifications({
42455
42505
  baseUrl: this.baseUrl,
42456
42506
  token: this.token,
42457
- page: --this.currentPage,
42507
+ page: this.currentPage
42458
42508
  }).then((data) => this.updateNotificationsDataAfterPageChange(data));
42459
42509
  };
42460
42510
  this.setClientStyling = () => {
@@ -42487,6 +42537,27 @@ const NutsPopover = class {
42487
42537
  this.unseenCount = 0;
42488
42538
  }
42489
42539
  };
42540
+ this.deleteAllNotifications = async () => {
42541
+ const allNotificationsDeleted = await deleteAll({
42542
+ baseUrl: this.baseUrl,
42543
+ token: this.token
42544
+ });
42545
+ if (allNotificationsDeleted) {
42546
+ this.allMessagesDeteled.emit();
42547
+ this.unseenCount = 0;
42548
+ this.showDeleteAllPopup = false;
42549
+ }
42550
+ };
42551
+ this.closePopover = () => {
42552
+ this.closePopoverEmmiter.emit();
42553
+ };
42554
+ this.showDeletePopup = () => {
42555
+ var _a;
42556
+ if (((_a = this.notifications) === null || _a === void 0 ? void 0 : _a.length) === 0) {
42557
+ return;
42558
+ }
42559
+ this.showDeleteAllPopup = !this.showDeleteAllPopup;
42560
+ };
42490
42561
  this.assignRefToStylingContainer = (ref) => {
42491
42562
  this.stylingContainer = ref;
42492
42563
  };
@@ -42505,15 +42576,25 @@ const NutsPopover = class {
42505
42576
  this.isLoading = true;
42506
42577
  this.showMarkAll = false;
42507
42578
  this.limitStylingAppends = false;
42579
+ this.showDeleteAllPopup = false;
42580
+ this.hasMore = true;
42508
42581
  }
42509
42582
  messageDeteledHandler(event) {
42510
42583
  this.notifications = this.notifications.filter((item) => {
42511
- return item._id != event.detail;
42584
+ return item.id != event.detail;
42512
42585
  });
42513
42586
  getNotifications({
42514
42587
  baseUrl: this.baseUrl,
42515
42588
  token: this.token,
42516
- page: this.currentPage,
42589
+ page: this.currentPage
42590
+ }).then((data) => this.updateNotificationsDataAfterPageChange(data));
42591
+ }
42592
+ allMessagesDeletedHandler() {
42593
+ this.notifications = [];
42594
+ getNotifications({
42595
+ baseUrl: this.baseUrl,
42596
+ token: this.token,
42597
+ page: this.currentPage
42517
42598
  }).then((data) => this.updateNotificationsDataAfterPageChange(data));
42518
42599
  }
42519
42600
  newNotificationHandler(event) {
@@ -42523,6 +42604,13 @@ const NutsPopover = class {
42523
42604
  }
42524
42605
  this.notifications = [event.detail];
42525
42606
  }
42607
+ clickOutsideHandle(ev) {
42608
+ var _a;
42609
+ const target = ev.target;
42610
+ if (this.showDeleteAllPopup && this.dropdownRef && !((_a = this.dropdownRef) === null || _a === void 0 ? void 0 : _a.contains(target))) {
42611
+ this.showDeleteAllPopup = false;
42612
+ }
42613
+ }
42526
42614
  unseenCountHandler(newValue) {
42527
42615
  if (newValue == 0) {
42528
42616
  this.showMarkAll = false;
@@ -42573,12 +42661,14 @@ const NutsPopover = class {
42573
42661
  }
42574
42662
  }
42575
42663
  render() {
42576
- return (h("div", { key: 'd4a40cfac705ecb065f4d86c0b66469cd65d58c7', class: "Popover", ref: this.assignRefToStylingContainer }, h("div", { key: 'df10296eb110acf6b29fba3029e128401f39dd13', class: "Header" }, h("div", { key: '5abdf8beea99b42594d11c74fed1381f7c3fb848', class: "Title" }, translate$1('notifications', this.language), this.unseenCount > 0 ? (h("div", { class: "UnseenCounter" }, this.unseenCount)) : ('')), this.showMarkAll ? (h("div", { class: "MarkAsRead", onClick: this.markAllNotificationsAsRead }, translate$1('markAllAsRead', this.language))) : ('')), h("div", { key: 'a519422b104858e947cc740837571645e3d1ec4c', class: "NotificationList" }, !this.isLoading &&
42577
- (this.notifications.length > 0 ? (this.notifications.map((item) => {
42664
+ var _a, _b, _c;
42665
+ return (h("div", { key: '475fae425a652a600597b607f1805139591daef4', class: "Popover", ref: this.assignRefToStylingContainer }, h("div", { key: 'f56b473cd1a0342e65811d969a9b8ecdfb2500c5', class: "Header" }, h("div", { key: 'df40bb6dc654a27d2ddd6dcb0411351c1e9f918e', class: "Title" }, translate$1('notifications', this.language), this.unseenCount > 0 ? h("div", { class: "UnseenCounter" }, this.unseenCount) : ''), this.showMarkAll && (h("div", { key: '9f4805c808d142d8ce09b01ce8d3a46e74120bd0', class: "MarkAsRead", onClick: this.markAllNotificationsAsRead }, translate$1('markAllAsRead', this.language))), h("button", { key: '9053877b044d184693108e21d89cc8ba8aef25ce', class: `DeleteAll${this.showDeleteAllPopup ? ' Active' : ''}`, onClick: this.showDeletePopup, disabled: !((_a = this.notifications) === null || _a === void 0 ? void 0 : _a.length) }, h("svg", { key: '517d78bc52f3a45c765bd124152d34db39d5313b', width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '9183c159dd59ff78143b05c0966a19024976528f', 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" }))), h("button", { key: 'b3f8482a174346351a04ebc05769c9c1140caf31', class: "Close", onClick: this.closePopover }, h("div", { key: '802f4bf7c00f8f5e1518f32c2610dd5dc0a7c82a', innerHTML: renderIconDefinitionToSVGElement(CloseCircleOutlined$1, {
42666
+ extraSVGAttrs: { width: '20px', height: '20px', fill: '#A1A1B2' }
42667
+ }) })), this.showDeleteAllPopup && (h("div", { key: '541ef6bc74eb85c0c70c9eaaf41f07022f885a29', class: "DeleteAllDropdown", ref: (el) => (this.dropdownRef = el) }, h("button", { key: '123b9d0ff1c8cb446900db97ffc81e19a6fbed7a', onClick: this.deleteAllNotifications }, translate$1('deleteAllMessages', this.language))))), h("div", { key: '82e8765a89c07f7874a63ba7038b084cf788a1ba', class: "NotificationList" }, !this.isLoading &&
42668
+ (((_b = this.notifications) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (this.notifications.map((item) => {
42578
42669
  var _a;
42579
42670
  return (h("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 }));
42580
- })) : (h("div", { class: "NoMessages" }, h("svg", { width: "120", height: "108", viewBox: "0 0 120 108", fill: "none" }, h("circle", { cx: "11.3191", cy: "30.7872", r: "6.31915", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("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" }), h("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" }), h("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" }), h("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" }), h("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" }), h("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" }), h("circle", { cx: "107.511", cy: "56.0638", r: "7.02128", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("circle", { cx: "16.4252", cy: "58.1703", r: "4.21277", fill: "#3D3D4D" }), h("ellipse", { cx: "59.9573", cy: "104.511", rx: "25.2766", ry: "2.80851", fill: "#3D3D4D" }), h("path", { d: "M81.5317 18.1489H88.553L81.5317 25.1702H88.553", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M96.6807 2H106.51L96.6807 11.8298H106.51", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" })), h("p", null, translate$1('noMessages', this.language)))))), !this.isLoading &&
42581
- (this.notifications.length >= 10 || this.currentPage !== 0) ? (h("div", { class: "Pagination" }, h("div", { class: "Button" }, h("button", { disabled: this.currentPage <= 0, onClick: this.prevPage }, h("svg", { class: "svg-icon", viewBox: "0 0 20 20" }, h("path", { 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))), h("div", { class: "Button" }, h("button", { disabled: this.notifications.length < 10, onClick: this.nextPage }, translate$1('next', this.language), h("svg", { class: "svg-icon", viewBox: "0 0 20 20" }, h("path", { 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" })))))) : ('')));
42671
+ })) : (h("div", { class: "NoMessages" }, h("svg", { width: "120", height: "108", viewBox: "0 0 120 108", fill: "none" }, h("circle", { cx: "11.3191", cy: "30.7872", r: "6.31915", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("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" }), h("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" }), h("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" }), h("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" }), h("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" }), h("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" }), h("circle", { cx: "107.511", cy: "56.0638", r: "7.02128", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("circle", { cx: "16.4252", cy: "58.1703", r: "4.21277", fill: "#3D3D4D" }), h("ellipse", { cx: "59.9573", cy: "104.511", rx: "25.2766", ry: "2.80851", fill: "#3D3D4D" }), h("path", { d: "M81.5317 18.1489H88.553L81.5317 25.1702H88.553", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M96.6807 2H106.51L96.6807 11.8298H106.51", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" })), h("p", null, translate$1('noMessages', this.language)))))), !this.isLoading && (((_c = this.notifications) === null || _c === void 0 ? void 0 : _c.length) >= 10 || this.currentPage !== 0) ? (h("div", { class: "Pagination" }, h("div", { class: "Button" }, h("button", { disabled: this.currentPage <= 0, onClick: this.prevPage }, h("svg", { class: "svg-icon", viewBox: "0 0 20 20" }, h("path", { 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))), h("div", { class: "Button" }, h("button", { disabled: !this.hasMore, onClick: this.nextPage }, translate$1('next', this.language), h("svg", { class: "svg-icon", viewBox: "0 0 20 20" }, h("path", { 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" })))))) : ('')));
42582
42672
  }
42583
42673
  static get watchers() { return {
42584
42674
  "unseenCount": ["unseenCountHandler"],
@@ -1 +1 @@
1
- import{p as n,b as i}from"./index-6a331097.js";export{s as setNonce}from"./index-6a331097.js";import{g as e}from"./app-globals-0f993ce5.js";(()=>{const i=import.meta.url,e={};return""!==i&&(e.resourcesUrl=new URL(".",i).href),n(e)})().then((async n=>(await e(),i([["nuts-inbox-widget_3",[[1,"nuts-inbox-widget",{backendUrl:[513,"backend-url"],socketUrl:[513,"socket-url"],userId:[513,"user-id"],sessionId:[513,"session-id"],operatorId:[513,"operator-id"],subscriberId:[513,"subscriber-id"],deviceId:[513,"device-id"],language:[513],environment:[513],applicationIdentifier:[513,"application-identifier"],clientStyling:[1537,"client-styling"],clientStylingUrl:[513,"client-styling-url"],bellIconPosition:[513,"bell-icon-position"],notificationAction:[513,"notification-action"],translationUrl:[513,"translation-url"],isLoading:[32],popoverVisible:[32],unseenCount:[32],limitStylingAppends:[32]},[[8,"click","clickOutsideHandle"],[0,"allNotificationsRead","resetUnseenCount"]],{subscriberId:["initializeHandler"],operatorId:["initializeHandler"],applicationIdentifier:["initializeHandler"],deviceId:["initializeHandler"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],translationUrl:["handleNewTranslations"]}],[0,"nuts-popover",{language:[513],userId:[513,"user-id"],operatorId:[513,"operator-id"],token:[513],sessionId:[513,"session-id"],backendUrl:[513,"backend-url"],unseenCount:[514,"unseen-count"],clientStylingUrl:[513,"client-styling-url"],notificationAction:[513,"notification-action"],clientStyling:[1537,"client-styling"],translationUrl:[513,"translation-url"],notifications:[32],isLoading:[32],showMarkAll:[32],limitStylingAppends:[32]},[[8,"messageDeleted","messageDeteledHandler"],[8,"newNotification","newNotificationHandler"]],{unseenCount:["unseenCountHandler"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],translationUrl:["handleNewTranslations"]}],[0,"nuts-notification",{badge:[513],content:[513],date:[513],showSettings:[516,"show-settings"],read:[516],seen:[516],language:[513],sessionId:[513,"session-id"],subscriberId:[513,"subscriber-id"],userId:[513,"user-id"],messageId:[513,"message-id"],operatorId:[513,"operator-id"],token:[513],backendUrl:[513,"backend-url"],redirectUrl:[513,"redirect-url"],notificationAction:[513,"notification-action"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],clientStyling:[1537,"client-styling"],showSettingsModal:[32],messageSeen:[32],messageRead:[32],displayedContent:[32],limitStylingAppends:[32]},[[8,"allNotificationsRead","allNotificationsReadHandler"],[8,"settingsOpened","settingsOpenedHandler"]],{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],translationUrl:["handleNewTranslations"]}]]]],n))));
1
+ import{p as n,b as e}from"./index-6a331097.js";export{s as setNonce}from"./index-6a331097.js";import{g as i}from"./app-globals-0f993ce5.js";(()=>{const e=import.meta.url,i={};return""!==e&&(i.resourcesUrl=new URL(".",e).href),n(i)})().then((async n=>(await i(),e([["nuts-inbox-widget_3",[[1,"nuts-inbox-widget",{backendUrl:[513,"backend-url"],socketUrl:[513,"socket-url"],userId:[513,"user-id"],sessionId:[513,"session-id"],operatorId:[513,"operator-id"],subscriberId:[513,"subscriber-id"],deviceId:[513,"device-id"],language:[513],environment:[513],applicationIdentifier:[513,"application-identifier"],clientStyling:[1537,"client-styling"],clientStylingUrl:[513,"client-styling-url"],bellIconPosition:[513,"bell-icon-position"],notificationAction:[513,"notification-action"],translationUrl:[513,"translation-url"],isLoading:[32],popoverVisible:[32],unseenCount:[32],limitStylingAppends:[32]},[[8,"click","clickOutsideHandle"],[0,"allNotificationsRead","resetUnseenCount"],[8,"closePopover","closePopoverHandler"]],{subscriberId:["initializeHandler"],operatorId:["initializeHandler"],applicationIdentifier:["initializeHandler"],deviceId:["initializeHandler"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],translationUrl:["handleNewTranslations"]}],[0,"nuts-popover",{language:[513],userId:[513,"user-id"],operatorId:[513,"operator-id"],token:[513],sessionId:[513,"session-id"],backendUrl:[513,"backend-url"],unseenCount:[514,"unseen-count"],clientStylingUrl:[513,"client-styling-url"],notificationAction:[513,"notification-action"],clientStyling:[1537,"client-styling"],translationUrl:[513,"translation-url"],notifications:[32],isLoading:[32],showMarkAll:[32],limitStylingAppends:[32],showDeleteAllPopup:[32],hasMore:[32]},[[8,"messageDeleted","messageDeteledHandler"],[8,"allMessagesDeleted","allMessagesDeletedHandler"],[8,"newNotification","newNotificationHandler"],[8,"click","clickOutsideHandle"]],{unseenCount:["unseenCountHandler"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],translationUrl:["handleNewTranslations"]}],[0,"nuts-notification",{badge:[513],content:[513],date:[513],showSettings:[516,"show-settings"],read:[516],seen:[516],language:[513],sessionId:[513,"session-id"],subscriberId:[513,"subscriber-id"],userId:[513,"user-id"],messageId:[513,"message-id"],operatorId:[513,"operator-id"],token:[513],backendUrl:[513,"backend-url"],redirectUrl:[513,"redirect-url"],notificationAction:[513,"notification-action"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],clientStyling:[1537,"client-styling"],showSettingsModal:[32],messageSeen:[32],messageRead:[32],displayedContent:[32],limitStylingAppends:[32]},[[8,"allNotificationsRead","allNotificationsReadHandler"],[8,"settingsOpened","settingsOpenedHandler"],[8,"click","clickOutsideHandle"]],{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],translationUrl:["handleNewTranslations"]}]]]],n))));