@everymatrix/nuts-inbox-widget 1.44.0 → 1.45.7
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/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/index-ae4a5047.js +1329 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/cjs/nuts-inbox-widget.cjs.js +17 -11
- package/dist/cjs/nuts-inbox-widget_3.cjs.entry.js +2276 -1736
- package/dist/collection/api/methods/index.js +120 -120
- package/dist/collection/collection-manifest.json +5 -5
- package/dist/collection/components/nuts-inbox-widget/nuts-inbox-widget.js +511 -515
- package/dist/collection/components/nuts-notification/nuts-notification.css +8 -8
- package/dist/collection/components/nuts-notification/nuts-notification.js +585 -579
- package/dist/collection/components/nuts-popover/nuts-popover.css +8 -8
- package/dist/collection/components/nuts-popover/nuts-popover.js +392 -404
- package/dist/collection/types/nuts-inbox-widget.types.js +21 -21
- package/dist/collection/utils/locale.utils.js +42 -42
- package/dist/collection/utils/utils.js +12 -12
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-64960aae.js +1301 -0
- package/dist/esm/loader.js +7 -13
- package/dist/esm/nuts-inbox-widget.js +14 -11
- package/dist/esm/nuts-inbox-widget_3.entry.js +2276 -1736
- package/dist/nuts-inbox-widget/nuts-inbox-widget.esm.js +1 -1
- package/dist/nuts-inbox-widget/p-707e3b6f.entry.js +1 -0
- package/dist/nuts-inbox-widget/p-80fb2012.js +2 -0
- package/dist/nuts-inbox-widget/p-e1255160.js +1 -0
- package/dist/stencil.config.dev.js +14 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.dev.d.ts +2 -0
- package/dist/types/api/methods/types.d.ts +33 -33
- package/dist/types/components/nuts-inbox-widget/nuts-inbox-widget.d.ts +92 -92
- package/dist/types/components/nuts-notification/nuts-notification.d.ts +100 -100
- package/dist/types/components/nuts-popover/nuts-popover.d.ts +70 -70
- package/dist/types/components.d.ts +53 -5
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/types/nuts-inbox-widget.types.d.ts +74 -74
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +9 -5
- package/dist/cjs/index-84dbe58e.js +0 -1356
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/components/nuts-inbox-widget.d.ts +0 -11
- package/dist/components/nuts-inbox-widget.js +0 -4082
- package/dist/components/nuts-notification.d.ts +0 -11
- package/dist/components/nuts-notification.js +0 -6
- package/dist/components/nuts-notification2.js +0 -36119
- package/dist/components/nuts-popover.d.ts +0 -11
- package/dist/components/nuts-popover.js +0 -6
- package/dist/components/nuts-popover2.js +0 -170
- package/dist/esm/index-722b5754.js +0 -1329
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/nuts-inbox-widget/p-11f92a64.js +0 -1
- package/dist/nuts-inbox-widget/p-d0db9d2d.entry.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/nuts-inbox-widget/.stencil/packages/nuts-inbox-widget/stencil.config.d.ts +0 -2
|
@@ -1,412 +1,400 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { translate, getTranslations } from
|
|
3
|
-
import { getNotifications, markAllAsRead } from
|
|
4
|
-
import { createAuthHeaders } from
|
|
1
|
+
import { h, } from "@stencil/core";
|
|
2
|
+
import { translate, getTranslations } from "../../utils/locale.utils";
|
|
3
|
+
import { getNotifications, markAllAsRead } from "../../api/methods";
|
|
4
|
+
import { createAuthHeaders } from "../../utils/utils";
|
|
5
5
|
export class NutsPopover {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
this.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
getNotifications({
|
|
74
|
-
baseUrl: this.baseUrl,
|
|
75
|
-
headers: this.defaultHeaders,
|
|
76
|
-
page: this.currentPage,
|
|
77
|
-
}).then((data) => this.updateNotificationsDataAfterPageChange(data));
|
|
78
|
-
}
|
|
79
|
-
newNotificationHandler(event) {
|
|
80
|
-
if (Array.isArray(this.notifications)) {
|
|
81
|
-
this.notifications = [event.detail, ...this.notifications];
|
|
82
|
-
return;
|
|
6
|
+
constructor() {
|
|
7
|
+
this.currentPage = 0;
|
|
8
|
+
this.updateNotificationsDataAfterPageChange = (getNotificationsData) => {
|
|
9
|
+
this.isLoading = getNotificationsData.isLoading;
|
|
10
|
+
this.notifications = getNotificationsData.notifications;
|
|
11
|
+
};
|
|
12
|
+
this.nextPage = async () => {
|
|
13
|
+
getNotifications({
|
|
14
|
+
baseUrl: this.baseUrl,
|
|
15
|
+
headers: this.defaultHeaders,
|
|
16
|
+
page: ++this.currentPage,
|
|
17
|
+
}).then((data) => this.updateNotificationsDataAfterPageChange(data));
|
|
18
|
+
};
|
|
19
|
+
this.prevPage = () => {
|
|
20
|
+
getNotifications({
|
|
21
|
+
baseUrl: this.baseUrl,
|
|
22
|
+
headers: this.defaultHeaders,
|
|
23
|
+
page: --this.currentPage,
|
|
24
|
+
}).then((data) => this.updateNotificationsDataAfterPageChange(data));
|
|
25
|
+
};
|
|
26
|
+
this.setClientStyling = () => {
|
|
27
|
+
let sheet = document.createElement('style');
|
|
28
|
+
sheet.innerHTML = this.clientStyling;
|
|
29
|
+
this.stylingContainer.prepend(sheet);
|
|
30
|
+
};
|
|
31
|
+
this.setClientStylingURL = () => {
|
|
32
|
+
let url = new URL(this.clientStylingUrl);
|
|
33
|
+
let cssFile = document.createElement('style');
|
|
34
|
+
fetch(url.href)
|
|
35
|
+
.then((res) => res.text())
|
|
36
|
+
.then((data) => {
|
|
37
|
+
cssFile.innerHTML = data;
|
|
38
|
+
setTimeout(() => {
|
|
39
|
+
this.stylingContainer.prepend(cssFile);
|
|
40
|
+
}, 1);
|
|
41
|
+
})
|
|
42
|
+
.catch((err) => {
|
|
43
|
+
console.log('error ', err);
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
this.markAllNotificationsAsRead = async () => {
|
|
47
|
+
const markedAllNotificationsAsRead = await markAllAsRead({
|
|
48
|
+
baseUrl: this.baseUrl,
|
|
49
|
+
headers: this.defaultHeaders,
|
|
50
|
+
});
|
|
51
|
+
if (markedAllNotificationsAsRead) {
|
|
52
|
+
this.allNotificationsRead.emit();
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
this.assignRefToStylingContainer = (ref) => {
|
|
56
|
+
this.stylingContainer = ref;
|
|
57
|
+
};
|
|
58
|
+
this.language = undefined;
|
|
59
|
+
this.userId = undefined;
|
|
60
|
+
this.operatorId = undefined;
|
|
61
|
+
this.token = undefined;
|
|
62
|
+
this.sessionId = undefined;
|
|
63
|
+
this.admin = undefined;
|
|
64
|
+
this.backendUrl = undefined;
|
|
65
|
+
this.unseenCount = undefined;
|
|
66
|
+
this.clientStylingUrl = undefined;
|
|
67
|
+
this.notificationAction = undefined;
|
|
68
|
+
this.clientStyling = '';
|
|
69
|
+
this.translationUrl = '';
|
|
70
|
+
this.notifications = undefined;
|
|
71
|
+
this.isLoading = true;
|
|
72
|
+
this.showMarkAll = false;
|
|
83
73
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
74
|
+
messageDeteledHandler(event) {
|
|
75
|
+
this.notifications = this.notifications.filter((item) => {
|
|
76
|
+
return item._id != event.detail;
|
|
77
|
+
});
|
|
78
|
+
getNotifications({
|
|
79
|
+
baseUrl: this.baseUrl,
|
|
80
|
+
headers: this.defaultHeaders,
|
|
81
|
+
page: this.currentPage,
|
|
82
|
+
}).then((data) => this.updateNotificationsDataAfterPageChange(data));
|
|
89
83
|
}
|
|
90
|
-
|
|
91
|
-
|
|
84
|
+
newNotificationHandler(event) {
|
|
85
|
+
if (Array.isArray(this.notifications)) {
|
|
86
|
+
this.notifications = [event.detail, ...this.notifications];
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
this.notifications = [event.detail];
|
|
92
90
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
async componentWillLoad() {
|
|
101
|
-
if (this.translationUrl.length > 2) {
|
|
102
|
-
await getTranslations(this.translationUrl);
|
|
91
|
+
unseenCountHandler(newValue) {
|
|
92
|
+
if (newValue == 0) {
|
|
93
|
+
this.showMarkAll = false;
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
this.showMarkAll = true;
|
|
97
|
+
}
|
|
103
98
|
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
baseUrl: this.baseUrl,
|
|
110
|
-
headers: this.defaultHeaders,
|
|
111
|
-
page: this.currentPage,
|
|
112
|
-
}).then((data) => this.updateNotificationsDataAfterPageChange(data));
|
|
113
|
-
if (this.unseenCount != 0) {
|
|
114
|
-
this.showMarkAll = true;
|
|
99
|
+
handleNewTranslations() {
|
|
100
|
+
this.isLoading = true;
|
|
101
|
+
getTranslations(this.translationUrl).then(() => {
|
|
102
|
+
this.isLoading = false;
|
|
103
|
+
});
|
|
115
104
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
this.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}))
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
h("circle", { cx: "16.4252", cy: "58.1703", r: "4.21277", fill: "#3D3D4D" }),
|
|
139
|
-
h("
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
105
|
+
async componentWillLoad() {
|
|
106
|
+
if (this.translationUrl.length > 2) {
|
|
107
|
+
await getTranslations(this.translationUrl);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
connectedCallback() {
|
|
111
|
+
this.baseUrl = `${this.backendUrl}/v1/${this.operatorId}`;
|
|
112
|
+
this.defaultHeaders = createAuthHeaders(this.token, this.sessionId, this.admin);
|
|
113
|
+
getNotifications({
|
|
114
|
+
baseUrl: this.baseUrl,
|
|
115
|
+
headers: this.defaultHeaders,
|
|
116
|
+
page: this.currentPage,
|
|
117
|
+
}).then((data) => this.updateNotificationsDataAfterPageChange(data));
|
|
118
|
+
if (this.unseenCount != 0) {
|
|
119
|
+
this.showMarkAll = true;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
render() {
|
|
123
|
+
return (h("div", { key: '19f1190500d93deb1c0e8a483e386c7500ce8f4f', class: "Popover", ref: this.assignRefToStylingContainer }, h("div", { key: '3dbf5944a620593a574f0cbe6a99a9db0a937a4c', class: "Header" }, h("div", { key: '73af99188b1ecfe8e0894bbc585b1e8b2e111cdd', class: "Title" }, translate('notifications', this.language), this.unseenCount > 0 ? (h("div", { class: "UnseenCounter" }, this.unseenCount)) : ('')), this.showMarkAll ? (h("div", { class: "MarkAsRead", onClick: this.markAllNotificationsAsRead }, translate('markAllAsRead', this.language))) : ('')), h("div", { key: '57c8d4fd8ca9e68eae87af19cab310cc578f33e9', class: "NotificationList" }, !this.isLoading &&
|
|
124
|
+
(this.notifications.length > 0 ? (this.notifications.map((item) => {
|
|
125
|
+
var _a;
|
|
126
|
+
return (h("nuts-notification", { "client-styling": this.clientStyling, 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) || '', admin: this.admin, 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 }));
|
|
127
|
+
})) : (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('noMessages', this.language)))))), !this.isLoading &&
|
|
128
|
+
(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('prev', this.language))), h("div", { class: "Button" }, h("button", { disabled: this.notifications.length < 10, onClick: this.nextPage }, translate('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" })))))) : ('')));
|
|
129
|
+
}
|
|
130
|
+
static get is() { return "nuts-popover"; }
|
|
131
|
+
static get originalStyleUrls() {
|
|
132
|
+
return {
|
|
133
|
+
"$": ["nuts-popover.scss"]
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
static get styleUrls() {
|
|
137
|
+
return {
|
|
138
|
+
"$": ["nuts-popover.css"]
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
static get properties() {
|
|
142
|
+
return {
|
|
143
|
+
"language": {
|
|
144
|
+
"type": "string",
|
|
145
|
+
"mutable": false,
|
|
146
|
+
"complexType": {
|
|
147
|
+
"original": "string",
|
|
148
|
+
"resolved": "string",
|
|
149
|
+
"references": {}
|
|
150
|
+
},
|
|
151
|
+
"required": false,
|
|
152
|
+
"optional": false,
|
|
153
|
+
"docs": {
|
|
154
|
+
"tags": [],
|
|
155
|
+
"text": "Language code of the content"
|
|
156
|
+
},
|
|
157
|
+
"attribute": "language",
|
|
158
|
+
"reflect": true
|
|
159
|
+
},
|
|
160
|
+
"userId": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"mutable": false,
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "string",
|
|
165
|
+
"resolved": "string",
|
|
166
|
+
"references": {}
|
|
167
|
+
},
|
|
168
|
+
"required": false,
|
|
169
|
+
"optional": false,
|
|
170
|
+
"docs": {
|
|
171
|
+
"tags": [],
|
|
172
|
+
"text": "Unique ID of the user receiving notifications"
|
|
173
|
+
},
|
|
174
|
+
"attribute": "user-id",
|
|
175
|
+
"reflect": true
|
|
176
|
+
},
|
|
177
|
+
"operatorId": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"mutable": false,
|
|
180
|
+
"complexType": {
|
|
181
|
+
"original": "string",
|
|
182
|
+
"resolved": "string",
|
|
183
|
+
"references": {}
|
|
184
|
+
},
|
|
185
|
+
"required": false,
|
|
186
|
+
"optional": false,
|
|
187
|
+
"docs": {
|
|
188
|
+
"tags": [],
|
|
189
|
+
"text": "Unique ID of the operator domain"
|
|
190
|
+
},
|
|
191
|
+
"attribute": "operator-id",
|
|
192
|
+
"reflect": true
|
|
193
|
+
},
|
|
194
|
+
"token": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"mutable": false,
|
|
197
|
+
"complexType": {
|
|
198
|
+
"original": "string",
|
|
199
|
+
"resolved": "string",
|
|
200
|
+
"references": {}
|
|
201
|
+
},
|
|
202
|
+
"required": false,
|
|
203
|
+
"optional": false,
|
|
204
|
+
"docs": {
|
|
205
|
+
"tags": [],
|
|
206
|
+
"text": "Token used to authenticate notification transactions"
|
|
207
|
+
},
|
|
208
|
+
"attribute": "token",
|
|
209
|
+
"reflect": true
|
|
210
|
+
},
|
|
211
|
+
"sessionId": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"mutable": false,
|
|
214
|
+
"complexType": {
|
|
215
|
+
"original": "string",
|
|
216
|
+
"resolved": "string",
|
|
217
|
+
"references": {}
|
|
218
|
+
},
|
|
219
|
+
"required": true,
|
|
220
|
+
"optional": false,
|
|
221
|
+
"docs": {
|
|
222
|
+
"tags": [],
|
|
223
|
+
"text": "The sessionID of the user"
|
|
224
|
+
},
|
|
225
|
+
"attribute": "session-id",
|
|
226
|
+
"reflect": true
|
|
227
|
+
},
|
|
228
|
+
"admin": {
|
|
229
|
+
"type": "boolean",
|
|
230
|
+
"mutable": false,
|
|
231
|
+
"complexType": {
|
|
232
|
+
"original": "boolean",
|
|
233
|
+
"resolved": "boolean",
|
|
234
|
+
"references": {}
|
|
235
|
+
},
|
|
236
|
+
"required": false,
|
|
237
|
+
"optional": true,
|
|
238
|
+
"docs": {
|
|
239
|
+
"tags": [],
|
|
240
|
+
"text": "Indicates if the associated sessionId is an admin or a player sessionId"
|
|
241
|
+
},
|
|
242
|
+
"attribute": "admin",
|
|
243
|
+
"reflect": true
|
|
244
|
+
},
|
|
245
|
+
"backendUrl": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"mutable": false,
|
|
248
|
+
"complexType": {
|
|
249
|
+
"original": "string",
|
|
250
|
+
"resolved": "string",
|
|
251
|
+
"references": {}
|
|
252
|
+
},
|
|
253
|
+
"required": false,
|
|
254
|
+
"optional": false,
|
|
255
|
+
"docs": {
|
|
256
|
+
"tags": [],
|
|
257
|
+
"text": "Endpoint used for notification transactions"
|
|
258
|
+
},
|
|
259
|
+
"attribute": "backend-url",
|
|
260
|
+
"reflect": true
|
|
261
|
+
},
|
|
262
|
+
"unseenCount": {
|
|
263
|
+
"type": "number",
|
|
264
|
+
"mutable": false,
|
|
265
|
+
"complexType": {
|
|
266
|
+
"original": "number",
|
|
267
|
+
"resolved": "number",
|
|
268
|
+
"references": {}
|
|
269
|
+
},
|
|
270
|
+
"required": false,
|
|
271
|
+
"optional": false,
|
|
272
|
+
"docs": {
|
|
273
|
+
"tags": [],
|
|
274
|
+
"text": "The count of unseen notifications"
|
|
275
|
+
},
|
|
276
|
+
"attribute": "unseen-count",
|
|
277
|
+
"reflect": true
|
|
278
|
+
},
|
|
279
|
+
"clientStylingUrl": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"mutable": false,
|
|
282
|
+
"complexType": {
|
|
283
|
+
"original": "string",
|
|
284
|
+
"resolved": "string",
|
|
285
|
+
"references": {}
|
|
286
|
+
},
|
|
287
|
+
"required": false,
|
|
288
|
+
"optional": false,
|
|
289
|
+
"docs": {
|
|
290
|
+
"tags": [],
|
|
291
|
+
"text": "Custom styling URL"
|
|
292
|
+
},
|
|
293
|
+
"attribute": "client-styling-url",
|
|
294
|
+
"reflect": true
|
|
295
|
+
},
|
|
296
|
+
"notificationAction": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"mutable": false,
|
|
299
|
+
"complexType": {
|
|
300
|
+
"original": "string",
|
|
301
|
+
"resolved": "string",
|
|
302
|
+
"references": {}
|
|
303
|
+
},
|
|
304
|
+
"required": false,
|
|
305
|
+
"optional": false,
|
|
306
|
+
"docs": {
|
|
307
|
+
"tags": [],
|
|
308
|
+
"text": "Decides the behaviour of the notification onClick"
|
|
309
|
+
},
|
|
310
|
+
"attribute": "notification-action",
|
|
311
|
+
"reflect": true
|
|
312
|
+
},
|
|
313
|
+
"clientStyling": {
|
|
314
|
+
"type": "string",
|
|
315
|
+
"mutable": true,
|
|
316
|
+
"complexType": {
|
|
317
|
+
"original": "string",
|
|
318
|
+
"resolved": "string",
|
|
319
|
+
"references": {}
|
|
320
|
+
},
|
|
321
|
+
"required": false,
|
|
322
|
+
"optional": false,
|
|
323
|
+
"docs": {
|
|
324
|
+
"tags": [],
|
|
325
|
+
"text": "Custom styling string"
|
|
326
|
+
},
|
|
327
|
+
"attribute": "client-styling",
|
|
328
|
+
"reflect": true,
|
|
329
|
+
"defaultValue": "''"
|
|
330
|
+
},
|
|
331
|
+
"translationUrl": {
|
|
332
|
+
"type": "string",
|
|
333
|
+
"mutable": false,
|
|
334
|
+
"complexType": {
|
|
335
|
+
"original": "string",
|
|
336
|
+
"resolved": "string",
|
|
337
|
+
"references": {}
|
|
338
|
+
},
|
|
339
|
+
"required": false,
|
|
340
|
+
"optional": false,
|
|
341
|
+
"docs": {
|
|
342
|
+
"tags": [],
|
|
343
|
+
"text": "Translations via URL"
|
|
344
|
+
},
|
|
345
|
+
"attribute": "translation-url",
|
|
346
|
+
"reflect": true,
|
|
347
|
+
"defaultValue": "''"
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
static get states() {
|
|
352
|
+
return {
|
|
353
|
+
"notifications": {},
|
|
354
|
+
"isLoading": {},
|
|
355
|
+
"showMarkAll": {}
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
static get events() {
|
|
359
|
+
return [{
|
|
360
|
+
"method": "allNotificationsRead",
|
|
361
|
+
"name": "allNotificationsRead",
|
|
362
|
+
"bubbles": true,
|
|
363
|
+
"cancelable": true,
|
|
364
|
+
"composed": true,
|
|
365
|
+
"docs": {
|
|
366
|
+
"tags": [],
|
|
367
|
+
"text": ""
|
|
368
|
+
},
|
|
369
|
+
"complexType": {
|
|
370
|
+
"original": "any",
|
|
371
|
+
"resolved": "any",
|
|
372
|
+
"references": {}
|
|
373
|
+
}
|
|
374
|
+
}];
|
|
375
|
+
}
|
|
376
|
+
static get watchers() {
|
|
377
|
+
return [{
|
|
378
|
+
"propName": "unseenCount",
|
|
379
|
+
"methodName": "unseenCountHandler"
|
|
380
|
+
}, {
|
|
381
|
+
"propName": "translationUrl",
|
|
382
|
+
"methodName": "handleNewTranslations"
|
|
383
|
+
}];
|
|
384
|
+
}
|
|
385
|
+
static get listeners() {
|
|
386
|
+
return [{
|
|
387
|
+
"name": "messageDeleted",
|
|
388
|
+
"method": "messageDeteledHandler",
|
|
389
|
+
"target": "window",
|
|
390
|
+
"capture": false,
|
|
391
|
+
"passive": false
|
|
392
|
+
}, {
|
|
393
|
+
"name": "newNotification",
|
|
394
|
+
"method": "newNotificationHandler",
|
|
395
|
+
"target": "window",
|
|
396
|
+
"capture": false,
|
|
397
|
+
"passive": false
|
|
398
|
+
}];
|
|
369
399
|
}
|
|
370
|
-
}; }
|
|
371
|
-
static get states() { return {
|
|
372
|
-
"notifications": {},
|
|
373
|
-
"isLoading": {},
|
|
374
|
-
"showMarkAll": {}
|
|
375
|
-
}; }
|
|
376
|
-
static get events() { return [{
|
|
377
|
-
"method": "allNotificationsRead",
|
|
378
|
-
"name": "allNotificationsRead",
|
|
379
|
-
"bubbles": true,
|
|
380
|
-
"cancelable": true,
|
|
381
|
-
"composed": true,
|
|
382
|
-
"docs": {
|
|
383
|
-
"tags": [],
|
|
384
|
-
"text": ""
|
|
385
|
-
},
|
|
386
|
-
"complexType": {
|
|
387
|
-
"original": "any",
|
|
388
|
-
"resolved": "any",
|
|
389
|
-
"references": {}
|
|
390
|
-
}
|
|
391
|
-
}]; }
|
|
392
|
-
static get watchers() { return [{
|
|
393
|
-
"propName": "unseenCount",
|
|
394
|
-
"methodName": "unseenCountHandler"
|
|
395
|
-
}, {
|
|
396
|
-
"propName": "translationUrl",
|
|
397
|
-
"methodName": "handleNewTranslations"
|
|
398
|
-
}]; }
|
|
399
|
-
static get listeners() { return [{
|
|
400
|
-
"name": "messageDeleted",
|
|
401
|
-
"method": "messageDeteledHandler",
|
|
402
|
-
"target": "window",
|
|
403
|
-
"capture": false,
|
|
404
|
-
"passive": false
|
|
405
|
-
}, {
|
|
406
|
-
"name": "newNotification",
|
|
407
|
-
"method": "newNotificationHandler",
|
|
408
|
-
"target": "window",
|
|
409
|
-
"capture": false,
|
|
410
|
-
"passive": false
|
|
411
|
-
}]; }
|
|
412
400
|
}
|