@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.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/nuts-inbox-widget.cjs.js +1 -1
- package/dist/cjs/nuts-inbox-widget_3.cjs.entry.js +155 -65
- package/dist/collection/api/methods/index.js +31 -12
- package/dist/collection/components/nuts-inbox-widget/nuts-inbox-widget.js +17 -7
- package/dist/collection/components/nuts-notification/nuts-notification.css +2 -1
- package/dist/collection/components/nuts-notification/nuts-notification.js +39 -30
- package/dist/collection/components/nuts-popover/nuts-popover.css +87 -4
- package/dist/collection/components/nuts-popover/nuts-popover.js +106 -13
- package/dist/collection/utils/locale.utils.js +18 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/nuts-inbox-widget.js +1 -1
- package/dist/esm/nuts-inbox-widget_3.entry.js +155 -65
- package/dist/nuts-inbox-widget/nuts-inbox-widget.esm.js +1 -1
- package/dist/nuts-inbox-widget/nuts-inbox-widget_3.entry.js +1 -1
- package/dist/types/api/methods/index.d.ts +8 -4
- package/dist/types/api/methods/types.d.ts +3 -1
- package/dist/types/components/nuts-inbox-widget/nuts-inbox-widget.d.ts +1 -0
- package/dist/types/components/nuts-notification/nuts-notification.d.ts +2 -0
- package/dist/types/components/nuts-popover/nuts-popover.d.ts +10 -0
- package/dist/types/components.d.ts +4 -0
- package/dist/types/types/nuts-inbox-widget.types.d.ts +1 -12
- package/package.json +1 -1
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-c16396a3.js');
|
|
6
6
|
|
|
7
7
|
const DEFAULT_LANGUAGE = 'en';
|
|
8
|
-
const SUPPORTED_LANGUAGES = ['hu', 'en'];
|
|
8
|
+
const SUPPORTED_LANGUAGES = ['hu', 'en', 'tr'];
|
|
9
9
|
const TRANSLATIONS = {
|
|
10
10
|
en: {
|
|
11
11
|
notifications: 'Notifications',
|
|
@@ -14,8 +14,20 @@ const TRANSLATIONS = {
|
|
|
14
14
|
markAsRead: 'Mark as read',
|
|
15
15
|
markAsUnread: 'Mark as unread',
|
|
16
16
|
removeMessage: 'Remove the message',
|
|
17
|
+
deleteAllMessages: 'Delete all messages',
|
|
17
18
|
next: 'Next',
|
|
18
|
-
prev: 'Previous'
|
|
19
|
+
prev: 'Previous'
|
|
20
|
+
},
|
|
21
|
+
tr: {
|
|
22
|
+
notifications: 'Bildirimler',
|
|
23
|
+
noMessages: 'Burada henüz görülecek yeni bir şey yok',
|
|
24
|
+
markAllAsRead: 'Hepsini okunmuş olarak işaretle',
|
|
25
|
+
markAsRead: 'Okunmuş olarak işaretle',
|
|
26
|
+
markAsUnread: 'Okunmamış olarak işaretle',
|
|
27
|
+
removeMessage: 'Bu mesajı sil',
|
|
28
|
+
deleteAllMessages: 'Tüm mesajları sil',
|
|
29
|
+
next: 'Sonraki',
|
|
30
|
+
prev: 'Önceki'
|
|
19
31
|
},
|
|
20
32
|
hu: {
|
|
21
33
|
notifications: 'értesítéseket',
|
|
@@ -24,15 +36,14 @@ const TRANSLATIONS = {
|
|
|
24
36
|
markAsRead: 'Jelöld olvasottként',
|
|
25
37
|
markAsUnread: 'Megjelölés olvasatlanként',
|
|
26
38
|
removeMessage: 'Távolítsa el az üzenetet',
|
|
39
|
+
deleteAllMessages: 'Delete all messages',
|
|
27
40
|
next: 'Következő',
|
|
28
|
-
prev: 'Előző'
|
|
29
|
-
}
|
|
41
|
+
prev: 'Előző'
|
|
42
|
+
}
|
|
30
43
|
};
|
|
31
44
|
const translate$1 = (key, customLang, values) => {
|
|
32
45
|
const lang = customLang;
|
|
33
|
-
let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang)
|
|
34
|
-
? lang
|
|
35
|
-
: DEFAULT_LANGUAGE][key];
|
|
46
|
+
let translation = TRANSLATIONS[lang !== undefined && SUPPORTED_LANGUAGES.includes(lang) ? lang : DEFAULT_LANGUAGE][key];
|
|
36
47
|
if (values !== undefined) {
|
|
37
48
|
for (const [key, value] of Object.entries(values.values)) {
|
|
38
49
|
const regex = new RegExp(`{${key}}`, 'g');
|
|
@@ -4103,25 +4114,25 @@ const initializeSession = async ({ baseUrl, body, sessionId }) => {
|
|
|
4103
4114
|
});
|
|
4104
4115
|
return {
|
|
4105
4116
|
token: newToken,
|
|
4106
|
-
unseenCounter
|
|
4117
|
+
unseenCounter
|
|
4107
4118
|
};
|
|
4108
4119
|
}
|
|
4109
4120
|
catch (error) {
|
|
4110
4121
|
console.log(error);
|
|
4111
4122
|
return {
|
|
4112
4123
|
token: null,
|
|
4113
|
-
unseenCounter: 0
|
|
4124
|
+
unseenCounter: 0
|
|
4114
4125
|
};
|
|
4115
4126
|
}
|
|
4116
4127
|
};
|
|
4117
|
-
const getUnseenCount = async ({ baseUrl, token
|
|
4128
|
+
const getUnseenCount = async ({ baseUrl, token }) => {
|
|
4118
4129
|
var _a;
|
|
4119
4130
|
const url = new URL(`${baseUrl}/widgets/notifications/unseen?limit=100`);
|
|
4120
4131
|
const headers = new Headers();
|
|
4121
4132
|
headers.append('Widget-Authorization', `Bearer ${token}`);
|
|
4122
4133
|
const options = {
|
|
4123
4134
|
method: 'GET',
|
|
4124
|
-
headers
|
|
4135
|
+
headers
|
|
4125
4136
|
};
|
|
4126
4137
|
try {
|
|
4127
4138
|
const res = await fetch(url.href, options);
|
|
@@ -4134,13 +4145,13 @@ const getUnseenCount = async ({ baseUrl, token, }) => {
|
|
|
4134
4145
|
return 0;
|
|
4135
4146
|
}
|
|
4136
4147
|
};
|
|
4137
|
-
const deleteMessage = async ({ baseUrl, token, messageId
|
|
4148
|
+
const deleteMessage = async ({ baseUrl, token, messageId }) => {
|
|
4138
4149
|
const url = new URL(`${baseUrl}/widgets/messages/${messageId}`);
|
|
4139
4150
|
const headers = new Headers();
|
|
4140
4151
|
headers.append('Widget-Authorization', `Bearer ${token}`);
|
|
4141
4152
|
const options = {
|
|
4142
4153
|
method: 'DELETE',
|
|
4143
|
-
headers
|
|
4154
|
+
headers
|
|
4144
4155
|
};
|
|
4145
4156
|
try {
|
|
4146
4157
|
await fetch(url.href, options);
|
|
@@ -4151,7 +4162,7 @@ const deleteMessage = async ({ baseUrl, token, messageId, }) => {
|
|
|
4151
4162
|
return true;
|
|
4152
4163
|
}
|
|
4153
4164
|
};
|
|
4154
|
-
const markAsRead = async ({ baseUrl, body, token, unread
|
|
4165
|
+
const markAsRead = async ({ baseUrl, body, token, unread }) => {
|
|
4155
4166
|
const url = new URL(`${baseUrl}/widgets/messages/markAs`);
|
|
4156
4167
|
const headers = new Headers();
|
|
4157
4168
|
headers.append('Widget-Authorization', `Bearer ${token}`);
|
|
@@ -4159,7 +4170,7 @@ const markAsRead = async ({ baseUrl, body, token, unread, }) => {
|
|
|
4159
4170
|
const options = {
|
|
4160
4171
|
method: 'POST',
|
|
4161
4172
|
headers,
|
|
4162
|
-
body: JSON.stringify(body)
|
|
4173
|
+
body: JSON.stringify(body)
|
|
4163
4174
|
};
|
|
4164
4175
|
try {
|
|
4165
4176
|
const res = await fetch(url.href, options);
|
|
@@ -4167,7 +4178,7 @@ const markAsRead = async ({ baseUrl, body, token, unread, }) => {
|
|
|
4167
4178
|
return {
|
|
4168
4179
|
messageSeen: data.data[0].seen,
|
|
4169
4180
|
messageRead: data.data[0].read,
|
|
4170
|
-
showSettingsModal: false
|
|
4181
|
+
showSettingsModal: false
|
|
4171
4182
|
};
|
|
4172
4183
|
}
|
|
4173
4184
|
catch (err) {
|
|
@@ -4175,7 +4186,7 @@ const markAsRead = async ({ baseUrl, body, token, unread, }) => {
|
|
|
4175
4186
|
return {
|
|
4176
4187
|
messageSeen: unread,
|
|
4177
4188
|
messageRead: unread,
|
|
4178
|
-
showSettingsModal: true
|
|
4189
|
+
showSettingsModal: true
|
|
4179
4190
|
};
|
|
4180
4191
|
}
|
|
4181
4192
|
};
|
|
@@ -4186,7 +4197,7 @@ const getNotifications = async ({ baseUrl, page, token }) => {
|
|
|
4186
4197
|
headers.append('Widget-Authorization', `Bearer ${token}`);
|
|
4187
4198
|
const options = {
|
|
4188
4199
|
method: 'GET',
|
|
4189
|
-
headers
|
|
4200
|
+
headers
|
|
4190
4201
|
};
|
|
4191
4202
|
try {
|
|
4192
4203
|
const res = await fetch(url.href, options);
|
|
@@ -4195,6 +4206,7 @@ const getNotifications = async ({ baseUrl, page, token }) => {
|
|
|
4195
4206
|
isLoading: false,
|
|
4196
4207
|
numberOfNotifications: data.totalCount,
|
|
4197
4208
|
notifications: data.data,
|
|
4209
|
+
hasMore: data.hasMore
|
|
4198
4210
|
};
|
|
4199
4211
|
}
|
|
4200
4212
|
catch (error) {
|
|
@@ -4203,10 +4215,11 @@ const getNotifications = async ({ baseUrl, page, token }) => {
|
|
|
4203
4215
|
isLoading: false,
|
|
4204
4216
|
numberOfNotifications: 0,
|
|
4205
4217
|
notifications: [],
|
|
4218
|
+
hasMore: undefined
|
|
4206
4219
|
};
|
|
4207
4220
|
}
|
|
4208
4221
|
};
|
|
4209
|
-
const markAllAsRead = async ({ baseUrl, token
|
|
4222
|
+
const markAllAsRead = async ({ baseUrl, token }) => {
|
|
4210
4223
|
const url = new URL(`${baseUrl}/widgets/messages/read`);
|
|
4211
4224
|
const headers = new Headers();
|
|
4212
4225
|
headers.append('Widget-Authorization', `Bearer ${token}`);
|
|
@@ -4225,6 +4238,23 @@ const markAllAsRead = async ({ baseUrl, token, }) => {
|
|
|
4225
4238
|
return false;
|
|
4226
4239
|
}
|
|
4227
4240
|
};
|
|
4241
|
+
const deleteAll = async ({ baseUrl, token }) => {
|
|
4242
|
+
const url = new URL(`${baseUrl}/widgets/messages`);
|
|
4243
|
+
const headers = new Headers();
|
|
4244
|
+
headers.append('Widget-Authorization', `Bearer ${token}`);
|
|
4245
|
+
const options = {
|
|
4246
|
+
method: 'DELETE',
|
|
4247
|
+
headers
|
|
4248
|
+
};
|
|
4249
|
+
try {
|
|
4250
|
+
await fetch(url.href, options);
|
|
4251
|
+
return true;
|
|
4252
|
+
}
|
|
4253
|
+
catch (error) {
|
|
4254
|
+
console.log(error);
|
|
4255
|
+
return false;
|
|
4256
|
+
}
|
|
4257
|
+
};
|
|
4228
4258
|
|
|
4229
4259
|
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}";
|
|
4230
4260
|
const NutsInboxWidgetStyle0 = nutsInboxWidgetCss;
|
|
@@ -4300,10 +4330,11 @@ const NutsInboxWidget = class {
|
|
|
4300
4330
|
initializeSession({
|
|
4301
4331
|
baseUrl: this.baseUrl,
|
|
4302
4332
|
body: this.initializeSessionBody,
|
|
4303
|
-
sessionId: this.sessionId
|
|
4333
|
+
sessionId: this.sessionId
|
|
4304
4334
|
}).then((initializeSessionResult) => {
|
|
4305
4335
|
this.token = initializeSessionResult.token;
|
|
4306
4336
|
this.unseenCount = initializeSessionResult.unseenCounter;
|
|
4337
|
+
window.postMessage({ type: 'nuts-new-notifications', value: this.unseenCount }, window.location.href);
|
|
4307
4338
|
this.setupSocket();
|
|
4308
4339
|
});
|
|
4309
4340
|
}
|
|
@@ -4321,6 +4352,9 @@ const NutsInboxWidget = class {
|
|
|
4321
4352
|
this.unseenCount = 0;
|
|
4322
4353
|
window.postMessage({ type: 'all-notifications-read', value: true }, window.location.href);
|
|
4323
4354
|
}
|
|
4355
|
+
closePopoverHandler() {
|
|
4356
|
+
this.popoverVisible = false;
|
|
4357
|
+
}
|
|
4324
4358
|
positionIcon() {
|
|
4325
4359
|
if (this.bellIconPosition == 'left') {
|
|
4326
4360
|
this.bellIconRef.style.justifyContent = 'flex-start';
|
|
@@ -4337,8 +4371,8 @@ const NutsInboxWidget = class {
|
|
|
4337
4371
|
reconnectionAttempts: 10,
|
|
4338
4372
|
transports: ['websocket'],
|
|
4339
4373
|
auth: {
|
|
4340
|
-
token: `${this.token}
|
|
4341
|
-
}
|
|
4374
|
+
token: `${this.token}`
|
|
4375
|
+
}
|
|
4342
4376
|
});
|
|
4343
4377
|
this.socketRef.on('connect_error', (error) => {
|
|
4344
4378
|
console.error('WebSocket error', error);
|
|
@@ -4351,8 +4385,7 @@ const NutsInboxWidget = class {
|
|
|
4351
4385
|
});
|
|
4352
4386
|
this.socketRef.on('unseen_count_changed', (data) => {
|
|
4353
4387
|
this.unseenCount = data.unseenCount;
|
|
4354
|
-
this.unseenCount
|
|
4355
|
-
window.postMessage({ type: 'nuts-new-notifications', value: this.unseenCount }, window.location.href);
|
|
4388
|
+
window.postMessage({ type: 'nuts-new-notifications', value: this.unseenCount }, window.location.href);
|
|
4356
4389
|
});
|
|
4357
4390
|
}
|
|
4358
4391
|
}
|
|
@@ -4365,6 +4398,7 @@ const NutsInboxWidget = class {
|
|
|
4365
4398
|
});
|
|
4366
4399
|
this.token = initializeSessionResult.token;
|
|
4367
4400
|
this.unseenCount = initializeSessionResult.unseenCounter;
|
|
4401
|
+
window.postMessage({ type: 'nuts-new-notifications', value: this.unseenCount }, window.location.href);
|
|
4368
4402
|
this.setupSocket();
|
|
4369
4403
|
}
|
|
4370
4404
|
if (this.clientStylingUrl) {
|
|
@@ -4406,7 +4440,7 @@ const NutsInboxWidget = class {
|
|
|
4406
4440
|
return (index.h("div", { onClick: this.togglePopover, class: "BellIcon" }, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "32", height: "32", fill: "currentColor", class: "bi bi-bell", viewBox: "0 0 16 16" }, ' ', index.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 ? (index.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" }, index.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" }), index.h("defs", null, index.h("linearGradient", { id: "paint0_linear_1722_2699", x1: "8", y1: "13", x2: "8", y2: "3", gradientUnits: "userSpaceOnUse" }, index.h("stop", { "stop-color": "#FF512F" }), index.h("stop", { offset: "1", "stop-color": "#DD2476" }))))) : ('')));
|
|
4407
4441
|
}
|
|
4408
4442
|
render() {
|
|
4409
|
-
return (index.h("div", { key: '
|
|
4443
|
+
return (index.h("div", { key: 'f660aad5bb8aef73e2db8c3fd8f61ef0f658427f', ref: this.assignRefToStylingContainer, class: "Wrapper" }, index.h("div", { key: '2f43938760a2deeaf8b753a68206675092fb6074', ref: this.assignRefToBell, class: "BellIconWrapper" }, !this.isLoading && this.renderBellIcon()), this.popoverVisible && (index.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 }))));
|
|
4410
4444
|
}
|
|
4411
4445
|
get el() { return index.getElement(this); }
|
|
4412
4446
|
static get watchers() { return {
|
|
@@ -42135,6 +42169,10 @@ const CheckCircleFilled$1 = CheckCircleFilled;
|
|
|
42135
42169
|
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" };
|
|
42136
42170
|
const CloseCircleFilled$1 = CloseCircleFilled;
|
|
42137
42171
|
|
|
42172
|
+
// This icon file is generated automatically.
|
|
42173
|
+
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" };
|
|
42174
|
+
const CloseCircleOutlined$1 = CloseCircleOutlined;
|
|
42175
|
+
|
|
42138
42176
|
// This icon file is generated automatically.
|
|
42139
42177
|
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" };
|
|
42140
42178
|
const DownOutlined$1 = DownOutlined;
|
|
@@ -42209,45 +42247,45 @@ const truncate = (str, n) => {
|
|
|
42209
42247
|
return str.length > n ? str.slice(0, n - 1) + '...' : str;
|
|
42210
42248
|
};
|
|
42211
42249
|
|
|
42212
|
-
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-
|
|
42250
|
+
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}";
|
|
42213
42251
|
const NutsNotificationStyle0 = nutsNotificationCss;
|
|
42214
42252
|
|
|
42215
42253
|
const systemIcons = {
|
|
42216
42254
|
warning: {
|
|
42217
42255
|
icon: renderIconDefinitionToSVGElement(WarningFilled$1, {
|
|
42218
|
-
extraSVGAttrs: { width: '20px', height: '20px', fill: '#FFF000' }
|
|
42219
|
-
})
|
|
42256
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: '#FFF000' }
|
|
42257
|
+
})
|
|
42220
42258
|
},
|
|
42221
42259
|
info: {
|
|
42222
42260
|
icon: renderIconDefinitionToSVGElement(InfoCircleFilled$1, {
|
|
42223
|
-
extraSVGAttrs: { width: '20px', height: '20px', fill: '#0000FF' }
|
|
42224
|
-
})
|
|
42261
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: '#0000FF' }
|
|
42262
|
+
})
|
|
42225
42263
|
},
|
|
42226
42264
|
up: {
|
|
42227
42265
|
icon: renderIconDefinitionToSVGElement(UpCircleFilled$1, {
|
|
42228
|
-
extraSVGAttrs: { width: '20px', height: '20px', fill: '#A1A1B2' }
|
|
42229
|
-
})
|
|
42266
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: '#A1A1B2' }
|
|
42267
|
+
})
|
|
42230
42268
|
},
|
|
42231
42269
|
question: {
|
|
42232
42270
|
icon: renderIconDefinitionToSVGElement(QuestionCircleFilled$1, {
|
|
42233
|
-
extraSVGAttrs: { width: '20px', height: '20px', fill: '#A1A1B2' }
|
|
42234
|
-
})
|
|
42271
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: '#A1A1B2' }
|
|
42272
|
+
})
|
|
42235
42273
|
},
|
|
42236
42274
|
success: {
|
|
42237
42275
|
icon: renderIconDefinitionToSVGElement(CheckCircleFilled$1, {
|
|
42238
|
-
extraSVGAttrs: { width: '20px', height: '20px', fill: '#4D9980' }
|
|
42239
|
-
})
|
|
42276
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: '#4D9980' }
|
|
42277
|
+
})
|
|
42240
42278
|
},
|
|
42241
42279
|
error: {
|
|
42242
42280
|
icon: renderIconDefinitionToSVGElement(CloseCircleFilled$1, {
|
|
42243
|
-
extraSVGAttrs: { width: '20px', height: '20px', fill: '#E54545' }
|
|
42244
|
-
})
|
|
42281
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: '#E54545' }
|
|
42282
|
+
})
|
|
42245
42283
|
},
|
|
42246
42284
|
arrowDown: {
|
|
42247
42285
|
icon: renderIconDefinitionToSVGElement(DownOutlined$1, {
|
|
42248
|
-
extraSVGAttrs: { width: '16px', height: '16px', fill: '#A1A1B2' }
|
|
42249
|
-
})
|
|
42250
|
-
}
|
|
42286
|
+
extraSVGAttrs: { width: '16px', height: '16px', fill: '#A1A1B2' }
|
|
42287
|
+
})
|
|
42288
|
+
}
|
|
42251
42289
|
};
|
|
42252
42290
|
const dateFnsLocale = (lang) => {
|
|
42253
42291
|
return lang in dateFnsLocales ? dateFnsLocales[lang] : defaultLocale;
|
|
@@ -42269,14 +42307,14 @@ const NutsNotification = class {
|
|
|
42269
42307
|
messageId: `${this.messageId}`,
|
|
42270
42308
|
mark: {
|
|
42271
42309
|
seen: !unread,
|
|
42272
|
-
read: !unread
|
|
42273
|
-
}
|
|
42310
|
+
read: !unread
|
|
42311
|
+
}
|
|
42274
42312
|
};
|
|
42275
42313
|
const notificationData = await markAsRead({
|
|
42276
42314
|
baseUrl: this.baseUrl,
|
|
42277
42315
|
body: markAsReadBody,
|
|
42278
42316
|
token: this.token,
|
|
42279
|
-
unread
|
|
42317
|
+
unread
|
|
42280
42318
|
});
|
|
42281
42319
|
this.messageRead = notificationData.messageRead;
|
|
42282
42320
|
this.messageSeen = notificationData.messageSeen;
|
|
@@ -42286,7 +42324,7 @@ const NutsNotification = class {
|
|
|
42286
42324
|
const deleteMessageResponse = await deleteMessage({
|
|
42287
42325
|
baseUrl: this.baseUrl,
|
|
42288
42326
|
token: this.token,
|
|
42289
|
-
messageId: this.messageId
|
|
42327
|
+
messageId: this.messageId
|
|
42290
42328
|
});
|
|
42291
42329
|
this.showSettingsModal = deleteMessageResponse;
|
|
42292
42330
|
if (deleteMessageResponse) {
|
|
@@ -42304,14 +42342,10 @@ const NutsNotification = class {
|
|
|
42304
42342
|
if (this.notificationAction == 'postMessage') {
|
|
42305
42343
|
window.postMessage({ type: 'NotificationRedirect', url: this.redirectUrl }, window.location.href);
|
|
42306
42344
|
}
|
|
42307
|
-
if (!this.messageRead) {
|
|
42308
|
-
this.toggleNotificationRead();
|
|
42309
|
-
}
|
|
42310
42345
|
if (((_a = this.content) === null || _a === void 0 ? void 0 : _a.length) <= MAX_NOTIFICATION_TEXT_LENGTH) {
|
|
42311
42346
|
return;
|
|
42312
42347
|
}
|
|
42313
|
-
if (((_b = this.displayedContent) === null || _b === void 0 ? void 0 : _b.length) !== ((_c = this.content) === null || _c === void 0 ? void 0 : _c.length) &&
|
|
42314
|
-
this.displayedContent !== this.content) {
|
|
42348
|
+
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) {
|
|
42315
42349
|
this.displayedContent = this.content;
|
|
42316
42350
|
this.dropdownArrowRef.classList.add('FlipX');
|
|
42317
42351
|
return;
|
|
@@ -42379,6 +42413,12 @@ const NutsNotification = class {
|
|
|
42379
42413
|
this.showSettingsModal = false;
|
|
42380
42414
|
}
|
|
42381
42415
|
}
|
|
42416
|
+
clickOutsideHandle(ev) {
|
|
42417
|
+
if (ev.composedPath().some((elem) => this.el === elem)) {
|
|
42418
|
+
return;
|
|
42419
|
+
}
|
|
42420
|
+
this.showSettingsModal = false;
|
|
42421
|
+
}
|
|
42382
42422
|
handleStylingChange(newValue, oldValue) {
|
|
42383
42423
|
if (newValue !== oldValue)
|
|
42384
42424
|
this.setClientStyling();
|
|
@@ -42416,14 +42456,15 @@ const NutsNotification = class {
|
|
|
42416
42456
|
var _a, _b;
|
|
42417
42457
|
const sanitizedNotificationBody = DOMPurify.sanitize(this.displayedContent, {
|
|
42418
42458
|
ALLOW_UNKNOWN_PROTOCOLS: true,
|
|
42419
|
-
ADD_ATTR: [
|
|
42459
|
+
ADD_ATTR: ['target'],
|
|
42420
42460
|
ALLOWED_TAGS: ['b', 'u', 'i', 'br']
|
|
42421
42461
|
});
|
|
42422
|
-
return (index.h("div", { key: '
|
|
42462
|
+
return (index.h("div", { key: '4a70f3f0ca827894e98cc605cebb67efa5567918', class: "Wrapper" }, index.h("div", { key: 'd717cf730c9ecb478fab0db4c1186a9aa8095587', 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: 'c73b0520101c69cbdea984aaa49d614cd2f083bf', class: "ContentContainer" }, index.h("div", { key: '7b5db1b999db6d4bcd4e6980ab9f25e0e7b39bf9', innerHTML: sanitizedNotificationBody }), index.h("p", { key: '623e6c65b1162529686b4b822695e290619baeb7', class: "Date" }, formatDistanceToNow(new Date(this.date), {
|
|
42423
42463
|
addSuffix: true,
|
|
42424
|
-
locale: dateFnsLocale(this.language)
|
|
42425
|
-
}))), index.h("div", { key: '
|
|
42464
|
+
locale: dateFnsLocale(this.language)
|
|
42465
|
+
}))), index.h("div", { key: 'b48ab6a8819672f2d15bd627c74574e1020d65d7', class: "RightActionsContainer" }, index.h("div", { key: 'd83c2390ba7905c4f619260a419ff80dddfd305d', class: "Settings", onClick: this.toggleSettingsModal }, index.h("svg", { key: '68a503334849a491f09f94dcc1d29062ee197191', width: "24", height: "24", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.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 && (index.h("div", { key: '0b77f7441b8ab5e2288e266d2dfc9beda5b8fa3d', 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)))) : ('')));
|
|
42426
42466
|
}
|
|
42467
|
+
get el() { return index.getElement(this); }
|
|
42427
42468
|
static get watchers() { return {
|
|
42428
42469
|
"clientStyling": ["handleStylingChange"],
|
|
42429
42470
|
"clientStylingUrl": ["handleStylingUrlChange"],
|
|
@@ -42432,33 +42473,42 @@ const NutsNotification = class {
|
|
|
42432
42473
|
};
|
|
42433
42474
|
NutsNotification.style = NutsNotificationStyle0;
|
|
42434
42475
|
|
|
42435
|
-
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;
|
|
42476
|
+
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}";
|
|
42436
42477
|
const NutsPopoverStyle0 = nutsPopoverCss;
|
|
42437
42478
|
|
|
42438
42479
|
const NutsPopover = class {
|
|
42439
42480
|
constructor(hostRef) {
|
|
42440
42481
|
index.registerInstance(this, hostRef);
|
|
42441
42482
|
this.allNotificationsRead = index.createEvent(this, "allNotificationsRead", 7);
|
|
42483
|
+
this.allMessagesDeteled = index.createEvent(this, "allMessagesDeleted", 7);
|
|
42484
|
+
this.closePopoverEmmiter = index.createEvent(this, "closePopover", 7);
|
|
42442
42485
|
this.currentPage = 0;
|
|
42443
42486
|
this.updateNotificationsDataAfterPageChange = (getNotificationsData) => {
|
|
42444
|
-
this.isLoading = getNotificationsData.isLoading;
|
|
42445
42487
|
this.notifications = getNotificationsData.notifications;
|
|
42488
|
+
this.hasMore = getNotificationsData.hasMore;
|
|
42489
|
+
this.isLoading = getNotificationsData.isLoading;
|
|
42446
42490
|
};
|
|
42447
42491
|
this.nextPage = async () => {
|
|
42492
|
+
if (!this.hasMore) {
|
|
42493
|
+
return;
|
|
42494
|
+
}
|
|
42495
|
+
this.currentPage++;
|
|
42448
42496
|
getNotifications({
|
|
42449
42497
|
baseUrl: this.baseUrl,
|
|
42450
42498
|
token: this.token,
|
|
42451
|
-
page:
|
|
42499
|
+
page: this.currentPage
|
|
42452
42500
|
}).then((data) => {
|
|
42453
|
-
console.log(data);
|
|
42454
42501
|
return this.updateNotificationsDataAfterPageChange(data);
|
|
42455
42502
|
});
|
|
42456
42503
|
};
|
|
42457
42504
|
this.prevPage = () => {
|
|
42505
|
+
if (this.currentPage > 0) {
|
|
42506
|
+
this.currentPage--;
|
|
42507
|
+
}
|
|
42458
42508
|
getNotifications({
|
|
42459
42509
|
baseUrl: this.baseUrl,
|
|
42460
42510
|
token: this.token,
|
|
42461
|
-
page:
|
|
42511
|
+
page: this.currentPage
|
|
42462
42512
|
}).then((data) => this.updateNotificationsDataAfterPageChange(data));
|
|
42463
42513
|
};
|
|
42464
42514
|
this.setClientStyling = () => {
|
|
@@ -42491,6 +42541,27 @@ const NutsPopover = class {
|
|
|
42491
42541
|
this.unseenCount = 0;
|
|
42492
42542
|
}
|
|
42493
42543
|
};
|
|
42544
|
+
this.deleteAllNotifications = async () => {
|
|
42545
|
+
const allNotificationsDeleted = await deleteAll({
|
|
42546
|
+
baseUrl: this.baseUrl,
|
|
42547
|
+
token: this.token
|
|
42548
|
+
});
|
|
42549
|
+
if (allNotificationsDeleted) {
|
|
42550
|
+
this.allMessagesDeteled.emit();
|
|
42551
|
+
this.unseenCount = 0;
|
|
42552
|
+
this.showDeleteAllPopup = false;
|
|
42553
|
+
}
|
|
42554
|
+
};
|
|
42555
|
+
this.closePopover = () => {
|
|
42556
|
+
this.closePopoverEmmiter.emit();
|
|
42557
|
+
};
|
|
42558
|
+
this.showDeletePopup = () => {
|
|
42559
|
+
var _a;
|
|
42560
|
+
if (((_a = this.notifications) === null || _a === void 0 ? void 0 : _a.length) === 0) {
|
|
42561
|
+
return;
|
|
42562
|
+
}
|
|
42563
|
+
this.showDeleteAllPopup = !this.showDeleteAllPopup;
|
|
42564
|
+
};
|
|
42494
42565
|
this.assignRefToStylingContainer = (ref) => {
|
|
42495
42566
|
this.stylingContainer = ref;
|
|
42496
42567
|
};
|
|
@@ -42509,15 +42580,25 @@ const NutsPopover = class {
|
|
|
42509
42580
|
this.isLoading = true;
|
|
42510
42581
|
this.showMarkAll = false;
|
|
42511
42582
|
this.limitStylingAppends = false;
|
|
42583
|
+
this.showDeleteAllPopup = false;
|
|
42584
|
+
this.hasMore = true;
|
|
42512
42585
|
}
|
|
42513
42586
|
messageDeteledHandler(event) {
|
|
42514
42587
|
this.notifications = this.notifications.filter((item) => {
|
|
42515
|
-
return item.
|
|
42588
|
+
return item.id != event.detail;
|
|
42516
42589
|
});
|
|
42517
42590
|
getNotifications({
|
|
42518
42591
|
baseUrl: this.baseUrl,
|
|
42519
42592
|
token: this.token,
|
|
42520
|
-
page: this.currentPage
|
|
42593
|
+
page: this.currentPage
|
|
42594
|
+
}).then((data) => this.updateNotificationsDataAfterPageChange(data));
|
|
42595
|
+
}
|
|
42596
|
+
allMessagesDeletedHandler() {
|
|
42597
|
+
this.notifications = [];
|
|
42598
|
+
getNotifications({
|
|
42599
|
+
baseUrl: this.baseUrl,
|
|
42600
|
+
token: this.token,
|
|
42601
|
+
page: this.currentPage
|
|
42521
42602
|
}).then((data) => this.updateNotificationsDataAfterPageChange(data));
|
|
42522
42603
|
}
|
|
42523
42604
|
newNotificationHandler(event) {
|
|
@@ -42527,6 +42608,13 @@ const NutsPopover = class {
|
|
|
42527
42608
|
}
|
|
42528
42609
|
this.notifications = [event.detail];
|
|
42529
42610
|
}
|
|
42611
|
+
clickOutsideHandle(ev) {
|
|
42612
|
+
var _a;
|
|
42613
|
+
const target = ev.target;
|
|
42614
|
+
if (this.showDeleteAllPopup && this.dropdownRef && !((_a = this.dropdownRef) === null || _a === void 0 ? void 0 : _a.contains(target))) {
|
|
42615
|
+
this.showDeleteAllPopup = false;
|
|
42616
|
+
}
|
|
42617
|
+
}
|
|
42530
42618
|
unseenCountHandler(newValue) {
|
|
42531
42619
|
if (newValue == 0) {
|
|
42532
42620
|
this.showMarkAll = false;
|
|
@@ -42577,12 +42665,14 @@ const NutsPopover = class {
|
|
|
42577
42665
|
}
|
|
42578
42666
|
}
|
|
42579
42667
|
render() {
|
|
42580
|
-
|
|
42581
|
-
|
|
42668
|
+
var _a, _b, _c;
|
|
42669
|
+
return (index.h("div", { key: '475fae425a652a600597b607f1805139591daef4', class: "Popover", ref: this.assignRefToStylingContainer }, index.h("div", { key: 'f56b473cd1a0342e65811d969a9b8ecdfb2500c5', class: "Header" }, index.h("div", { key: 'df40bb6dc654a27d2ddd6dcb0411351c1e9f918e', class: "Title" }, translate$1('notifications', this.language), this.unseenCount > 0 ? index.h("div", { class: "UnseenCounter" }, this.unseenCount) : ''), this.showMarkAll && (index.h("div", { key: '9f4805c808d142d8ce09b01ce8d3a46e74120bd0', class: "MarkAsRead", onClick: this.markAllNotificationsAsRead }, translate$1('markAllAsRead', this.language))), index.h("button", { key: '9053877b044d184693108e21d89cc8ba8aef25ce', class: `DeleteAll${this.showDeleteAllPopup ? ' Active' : ''}`, onClick: this.showDeletePopup, disabled: !((_a = this.notifications) === null || _a === void 0 ? void 0 : _a.length) }, index.h("svg", { key: '517d78bc52f3a45c765bd124152d34db39d5313b', width: "16", height: "16", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.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" }))), index.h("button", { key: 'b3f8482a174346351a04ebc05769c9c1140caf31', class: "Close", onClick: this.closePopover }, index.h("div", { key: '802f4bf7c00f8f5e1518f32c2610dd5dc0a7c82a', innerHTML: renderIconDefinitionToSVGElement(CloseCircleOutlined$1, {
|
|
42670
|
+
extraSVGAttrs: { width: '20px', height: '20px', fill: '#A1A1B2' }
|
|
42671
|
+
}) })), this.showDeleteAllPopup && (index.h("div", { key: '541ef6bc74eb85c0c70c9eaaf41f07022f885a29', class: "DeleteAllDropdown", ref: (el) => (this.dropdownRef = el) }, index.h("button", { key: '123b9d0ff1c8cb446900db97ffc81e19a6fbed7a', onClick: this.deleteAllNotifications }, translate$1('deleteAllMessages', this.language))))), index.h("div", { key: '82e8765a89c07f7874a63ba7038b084cf788a1ba', class: "NotificationList" }, !this.isLoading &&
|
|
42672
|
+
(((_b = this.notifications) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (this.notifications.map((item) => {
|
|
42582
42673
|
var _a;
|
|
42583
42674
|
return (index.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 }));
|
|
42584
|
-
})) : (index.h("div", { class: "NoMessages" }, index.h("svg", { width: "120", height: "108", viewBox: "0 0 120 108", fill: "none" }, index.h("circle", { cx: "11.3191", cy: "30.7872", r: "6.31915", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.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" }), index.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" }), index.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" }), index.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" }), index.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" }), index.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" }), index.h("circle", { cx: "107.511", cy: "56.0638", r: "7.02128", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("circle", { cx: "16.4252", cy: "58.1703", r: "4.21277", fill: "#3D3D4D" }), index.h("ellipse", { cx: "59.9573", cy: "104.511", rx: "25.2766", ry: "2.80851", fill: "#3D3D4D" }), index.h("path", { d: "M81.5317 18.1489H88.553L81.5317 25.1702H88.553", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M96.6807 2H106.51L96.6807 11.8298H106.51", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" })), index.h("p", null, translate$1('noMessages', this.language)))))), !this.isLoading &&
|
|
42585
|
-
(this.notifications.length >= 10 || this.currentPage !== 0) ? (index.h("div", { class: "Pagination" }, index.h("div", { class: "Button" }, index.h("button", { disabled: this.currentPage <= 0, onClick: this.prevPage }, index.h("svg", { class: "svg-icon", viewBox: "0 0 20 20" }, index.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))), index.h("div", { class: "Button" }, index.h("button", { disabled: this.notifications.length < 10, onClick: this.nextPage }, translate$1('next', this.language), index.h("svg", { class: "svg-icon", viewBox: "0 0 20 20" }, index.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" })))))) : ('')));
|
|
42675
|
+
})) : (index.h("div", { class: "NoMessages" }, index.h("svg", { width: "120", height: "108", viewBox: "0 0 120 108", fill: "none" }, index.h("circle", { cx: "11.3191", cy: "30.7872", r: "6.31915", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.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" }), index.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" }), index.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" }), index.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" }), index.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" }), index.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" }), index.h("circle", { cx: "107.511", cy: "56.0638", r: "7.02128", stroke: "#3D3D4D", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("circle", { cx: "16.4252", cy: "58.1703", r: "4.21277", fill: "#3D3D4D" }), index.h("ellipse", { cx: "59.9573", cy: "104.511", rx: "25.2766", ry: "2.80851", fill: "#3D3D4D" }), index.h("path", { d: "M81.5317 18.1489H88.553L81.5317 25.1702H88.553", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M96.6807 2H106.51L96.6807 11.8298H106.51", stroke: "#828299", "stroke-width": "3.5", "stroke-linecap": "round", "stroke-linejoin": "round" })), index.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) ? (index.h("div", { class: "Pagination" }, index.h("div", { class: "Button" }, index.h("button", { disabled: this.currentPage <= 0, onClick: this.prevPage }, index.h("svg", { class: "svg-icon", viewBox: "0 0 20 20" }, index.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))), index.h("div", { class: "Button" }, index.h("button", { disabled: !this.hasMore, onClick: this.nextPage }, translate$1('next', this.language), index.h("svg", { class: "svg-icon", viewBox: "0 0 20 20" }, index.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" })))))) : ('')));
|
|
42586
42676
|
}
|
|
42587
42677
|
static get watchers() { return {
|
|
42588
42678
|
"unseenCount": ["unseenCountHandler"],
|