@everymatrix/nuts-inbox-widget 1.76.72 → 1.77.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{index-c16396a3.js → index-4522ef7e.js} +231 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/nuts-inbox-widget.cjs.js +2 -2
- package/dist/cjs/nuts-inbox-widget_3.cjs.entry.js +68 -31
- package/dist/collection/components/nuts-inbox-widget/nuts-inbox-widget.js +31 -16
- package/dist/collection/components/nuts-notification/constants.js +2 -1
- package/dist/collection/components/nuts-notification/nuts-notification.js +82 -13
- package/dist/collection/components/nuts-popover/nuts-popover.js +2 -2
- package/dist/collection/utils/utils.js +10 -2
- package/dist/esm/{index-6a331097.js → index-0160662f.js} +231 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/nuts-inbox-widget.js +3 -3
- package/dist/esm/nuts-inbox-widget_3.entry.js +68 -31
- package/dist/nuts-inbox-widget/index-0160662f.js +2 -0
- 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/stencil.config.js +2 -1
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.dev.d.ts +2 -0
- package/dist/types/{Users/StefanO/Desktop/Proj → builds/emfe-widgets}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/tools/plugins/index.d.ts +1 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/tools/plugins/lazy-load-chunk-plugin.d.ts +12 -0
- package/dist/types/components/nuts-inbox-widget/nuts-inbox-widget.d.ts +1 -1
- package/dist/types/components/nuts-notification/constants.d.ts +2 -1
- package/dist/types/components/nuts-notification/nuts-notification.d.ts +8 -0
- package/dist/types/components.d.ts +16 -0
- package/dist/types/utils/utils.d.ts +1 -1
- package/hydrate/index.d.ts +236 -0
- package/hydrate/index.js +60405 -0
- package/hydrate/index.mjs +60397 -0
- package/hydrate/package.json +12 -0
- package/package.json +10 -2
- package/dist/nuts-inbox-widget/index-6a331097.js +0 -2
- package/dist/types/Users/StefanO/Desktop/Proj/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.d.ts +0 -2
- package/dist/types/Users/StefanO/Desktop/Proj/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.dev.d.ts +0 -2
- /package/dist/types/{Users/StefanO/Desktop/Proj → builds/emfe-widgets}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
- /package/dist/types/{Users/StefanO/Desktop/Proj → builds/emfe-widgets}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/storybook/main.d.ts +0 -0
- /package/dist/types/{Users/StefanO/Desktop/Proj → builds/emfe-widgets}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/storybook/preview.d.ts +0 -0
- /package/dist/types/{Users/StefanO/Desktop/Proj → builds/emfe-widgets}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/{Users/StefanO/Desktop/Proj → builds/emfe-widgets}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/{Users/StefanO/Desktop/Proj → builds/emfe-widgets}/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const NAMESPACE = 'nuts-inbox-widget';
|
|
2
|
-
const BUILD = /* nuts-inbox-widget */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad:
|
|
2
|
+
const BUILD = /* nuts-inbox-widget */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: true, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
@@ -71,6 +71,15 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
71
71
|
|
|
72
72
|
// src/client/client-style.ts
|
|
73
73
|
var styles = /* @__PURE__ */ new Map();
|
|
74
|
+
|
|
75
|
+
// src/runtime/runtime-constants.ts
|
|
76
|
+
var CONTENT_REF_ID = "r";
|
|
77
|
+
var ORG_LOCATION_ID = "o";
|
|
78
|
+
var SLOT_NODE_ID = "s";
|
|
79
|
+
var TEXT_NODE_ID = "t";
|
|
80
|
+
var HYDRATE_ID = "s-id";
|
|
81
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
82
|
+
var HYDRATE_CHILD_ID = "c-id";
|
|
74
83
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
75
84
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
76
85
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -84,6 +93,7 @@ var plt = {
|
|
|
84
93
|
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
85
94
|
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
86
95
|
};
|
|
96
|
+
var supportsShadow = BUILD.shadowDom;
|
|
87
97
|
var supportsListenerOptions = /* @__PURE__ */ (() => {
|
|
88
98
|
let supportsListenerOptions2 = false;
|
|
89
99
|
try {
|
|
@@ -289,6 +299,197 @@ var newVNode = (tag, text) => {
|
|
|
289
299
|
};
|
|
290
300
|
var Host = {};
|
|
291
301
|
var isHost = (node) => node && node.$tag$ === Host;
|
|
302
|
+
|
|
303
|
+
// src/runtime/client-hydrate.ts
|
|
304
|
+
var initializeClientHydrate = (hostElm, tagName, hostId, hostRef) => {
|
|
305
|
+
const endHydrate = createTime("hydrateClient", tagName);
|
|
306
|
+
const shadowRoot = hostElm.shadowRoot;
|
|
307
|
+
const childRenderNodes = [];
|
|
308
|
+
const slotNodes = [];
|
|
309
|
+
const shadowRootNodes = shadowRoot ? [] : null;
|
|
310
|
+
const vnode = hostRef.$vnode$ = newVNode(tagName, null);
|
|
311
|
+
if (!plt.$orgLocNodes$) {
|
|
312
|
+
initializeDocumentHydrate(doc.body, plt.$orgLocNodes$ = /* @__PURE__ */ new Map());
|
|
313
|
+
}
|
|
314
|
+
hostElm[HYDRATE_ID] = hostId;
|
|
315
|
+
hostElm.removeAttribute(HYDRATE_ID);
|
|
316
|
+
clientHydrate(vnode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, hostElm, hostId);
|
|
317
|
+
childRenderNodes.map((c) => {
|
|
318
|
+
const orgLocationId = c.$hostId$ + "." + c.$nodeId$;
|
|
319
|
+
const orgLocationNode = plt.$orgLocNodes$.get(orgLocationId);
|
|
320
|
+
const node = c.$elm$;
|
|
321
|
+
if (orgLocationNode && supportsShadow && orgLocationNode["s-en"] === "") {
|
|
322
|
+
orgLocationNode.parentNode.insertBefore(node, orgLocationNode.nextSibling);
|
|
323
|
+
}
|
|
324
|
+
if (!shadowRoot) {
|
|
325
|
+
node["s-hn"] = tagName;
|
|
326
|
+
if (orgLocationNode) {
|
|
327
|
+
node["s-ol"] = orgLocationNode;
|
|
328
|
+
node["s-ol"]["s-nr"] = node;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
plt.$orgLocNodes$.delete(orgLocationId);
|
|
332
|
+
});
|
|
333
|
+
if (shadowRoot) {
|
|
334
|
+
shadowRootNodes.map((shadowRootNode) => {
|
|
335
|
+
if (shadowRootNode) {
|
|
336
|
+
shadowRoot.appendChild(shadowRootNode);
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
endHydrate();
|
|
341
|
+
};
|
|
342
|
+
var clientHydrate = (parentVNode, childRenderNodes, slotNodes, shadowRootNodes, hostElm, node, hostId) => {
|
|
343
|
+
let childNodeType;
|
|
344
|
+
let childIdSplt;
|
|
345
|
+
let childVNode;
|
|
346
|
+
let i2;
|
|
347
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
348
|
+
childNodeType = node.getAttribute(HYDRATE_CHILD_ID);
|
|
349
|
+
if (childNodeType) {
|
|
350
|
+
childIdSplt = childNodeType.split(".");
|
|
351
|
+
if (childIdSplt[0] === hostId || childIdSplt[0] === "0") {
|
|
352
|
+
childVNode = {
|
|
353
|
+
$flags$: 0,
|
|
354
|
+
$hostId$: childIdSplt[0],
|
|
355
|
+
$nodeId$: childIdSplt[1],
|
|
356
|
+
$depth$: childIdSplt[2],
|
|
357
|
+
$index$: childIdSplt[3],
|
|
358
|
+
$tag$: node.tagName.toLowerCase(),
|
|
359
|
+
$elm$: node,
|
|
360
|
+
$attrs$: null,
|
|
361
|
+
$children$: null,
|
|
362
|
+
$key$: null,
|
|
363
|
+
$name$: null,
|
|
364
|
+
$text$: null
|
|
365
|
+
};
|
|
366
|
+
childRenderNodes.push(childVNode);
|
|
367
|
+
node.removeAttribute(HYDRATE_CHILD_ID);
|
|
368
|
+
if (!parentVNode.$children$) {
|
|
369
|
+
parentVNode.$children$ = [];
|
|
370
|
+
}
|
|
371
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
372
|
+
parentVNode = childVNode;
|
|
373
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
374
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
for (i2 = node.childNodes.length - 1; i2 >= 0; i2--) {
|
|
379
|
+
clientHydrate(
|
|
380
|
+
parentVNode,
|
|
381
|
+
childRenderNodes,
|
|
382
|
+
slotNodes,
|
|
383
|
+
shadowRootNodes,
|
|
384
|
+
hostElm,
|
|
385
|
+
node.childNodes[i2],
|
|
386
|
+
hostId
|
|
387
|
+
);
|
|
388
|
+
}
|
|
389
|
+
if (node.shadowRoot) {
|
|
390
|
+
for (i2 = node.shadowRoot.childNodes.length - 1; i2 >= 0; i2--) {
|
|
391
|
+
clientHydrate(
|
|
392
|
+
parentVNode,
|
|
393
|
+
childRenderNodes,
|
|
394
|
+
slotNodes,
|
|
395
|
+
shadowRootNodes,
|
|
396
|
+
hostElm,
|
|
397
|
+
node.shadowRoot.childNodes[i2],
|
|
398
|
+
hostId
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
403
|
+
childIdSplt = node.nodeValue.split(".");
|
|
404
|
+
if (childIdSplt[1] === hostId || childIdSplt[1] === "0") {
|
|
405
|
+
childNodeType = childIdSplt[0];
|
|
406
|
+
childVNode = {
|
|
407
|
+
$flags$: 0,
|
|
408
|
+
$hostId$: childIdSplt[1],
|
|
409
|
+
$nodeId$: childIdSplt[2],
|
|
410
|
+
$depth$: childIdSplt[3],
|
|
411
|
+
$index$: childIdSplt[4],
|
|
412
|
+
$elm$: node,
|
|
413
|
+
$attrs$: null,
|
|
414
|
+
$children$: null,
|
|
415
|
+
$key$: null,
|
|
416
|
+
$name$: null,
|
|
417
|
+
$tag$: null,
|
|
418
|
+
$text$: null
|
|
419
|
+
};
|
|
420
|
+
if (childNodeType === TEXT_NODE_ID) {
|
|
421
|
+
childVNode.$elm$ = node.nextSibling;
|
|
422
|
+
if (childVNode.$elm$ && childVNode.$elm$.nodeType === 3 /* TextNode */) {
|
|
423
|
+
childVNode.$text$ = childVNode.$elm$.textContent;
|
|
424
|
+
childRenderNodes.push(childVNode);
|
|
425
|
+
node.remove();
|
|
426
|
+
if (!parentVNode.$children$) {
|
|
427
|
+
parentVNode.$children$ = [];
|
|
428
|
+
}
|
|
429
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
430
|
+
if (shadowRootNodes && childVNode.$depth$ === "0") {
|
|
431
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
} else if (childVNode.$hostId$ === hostId) {
|
|
435
|
+
if (childNodeType === SLOT_NODE_ID) {
|
|
436
|
+
childVNode.$tag$ = "slot";
|
|
437
|
+
if (childIdSplt[5]) {
|
|
438
|
+
node["s-sn"] = childVNode.$name$ = childIdSplt[5];
|
|
439
|
+
} else {
|
|
440
|
+
node["s-sn"] = "";
|
|
441
|
+
}
|
|
442
|
+
node["s-sr"] = true;
|
|
443
|
+
if (shadowRootNodes) {
|
|
444
|
+
childVNode.$elm$ = doc.createElement(childVNode.$tag$);
|
|
445
|
+
if (childVNode.$name$) {
|
|
446
|
+
childVNode.$elm$.setAttribute("name", childVNode.$name$);
|
|
447
|
+
}
|
|
448
|
+
node.parentNode.insertBefore(childVNode.$elm$, node);
|
|
449
|
+
node.remove();
|
|
450
|
+
if (childVNode.$depth$ === "0") {
|
|
451
|
+
shadowRootNodes[childVNode.$index$] = childVNode.$elm$;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
slotNodes.push(childVNode);
|
|
455
|
+
if (!parentVNode.$children$) {
|
|
456
|
+
parentVNode.$children$ = [];
|
|
457
|
+
}
|
|
458
|
+
parentVNode.$children$[childVNode.$index$] = childVNode;
|
|
459
|
+
} else if (childNodeType === CONTENT_REF_ID) {
|
|
460
|
+
if (shadowRootNodes) {
|
|
461
|
+
node.remove();
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
} else if (parentVNode && parentVNode.$tag$ === "style") {
|
|
467
|
+
const vnode = newVNode(null, node.textContent);
|
|
468
|
+
vnode.$elm$ = node;
|
|
469
|
+
vnode.$index$ = "0";
|
|
470
|
+
parentVNode.$children$ = [vnode];
|
|
471
|
+
}
|
|
472
|
+
};
|
|
473
|
+
var initializeDocumentHydrate = (node, orgLocNodes) => {
|
|
474
|
+
if (node.nodeType === 1 /* ElementNode */) {
|
|
475
|
+
let i2 = 0;
|
|
476
|
+
for (; i2 < node.childNodes.length; i2++) {
|
|
477
|
+
initializeDocumentHydrate(node.childNodes[i2], orgLocNodes);
|
|
478
|
+
}
|
|
479
|
+
if (node.shadowRoot) {
|
|
480
|
+
for (i2 = 0; i2 < node.shadowRoot.childNodes.length; i2++) {
|
|
481
|
+
initializeDocumentHydrate(node.shadowRoot.childNodes[i2], orgLocNodes);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
} else if (node.nodeType === 8 /* CommentNode */) {
|
|
485
|
+
const childIdSplt = node.nodeValue.split(".");
|
|
486
|
+
if (childIdSplt[0] === ORG_LOCATION_ID) {
|
|
487
|
+
orgLocNodes.set(childIdSplt[1] + "." + childIdSplt[2], node);
|
|
488
|
+
node.nodeValue = "";
|
|
489
|
+
node["s-en"] = childIdSplt[3];
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
};
|
|
292
493
|
var parsePropertyValue = (propValue, propType) => {
|
|
293
494
|
if (propValue != null && !isComplexType(propValue)) {
|
|
294
495
|
if (propType & 4 /* Boolean */) {
|
|
@@ -354,7 +555,9 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
354
555
|
rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
355
556
|
}
|
|
356
557
|
if (!appliedStyles.has(scopeId2)) {
|
|
357
|
-
{
|
|
558
|
+
if (styleContainerNode.host && (styleElm = styleContainerNode.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`))) {
|
|
559
|
+
styleElm.innerHTML = style;
|
|
560
|
+
} else {
|
|
358
561
|
styleElm = doc.createElement("style");
|
|
359
562
|
styleElm.innerHTML = style;
|
|
360
563
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
@@ -391,6 +594,7 @@ var attachStyles = (hostRef) => {
|
|
|
391
594
|
endAttachStyles();
|
|
392
595
|
};
|
|
393
596
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
597
|
+
var convertScopedToShadow = (css) => css.replace(/\/\*!@([^\/]+)\*\/[^\{]+\{/g, "$1{");
|
|
394
598
|
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
395
599
|
if (oldValue !== newValue) {
|
|
396
600
|
let isProp = isMemberInElement(elm, memberName);
|
|
@@ -840,6 +1044,9 @@ var postUpdateComponent = (hostRef) => {
|
|
|
840
1044
|
{
|
|
841
1045
|
addHydratedFlag(elm);
|
|
842
1046
|
}
|
|
1047
|
+
{
|
|
1048
|
+
safeCall(instance, "componentDidLoad");
|
|
1049
|
+
}
|
|
843
1050
|
endPostUpdate();
|
|
844
1051
|
{
|
|
845
1052
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -1072,10 +1279,21 @@ var connectedCallback = (elm) => {
|
|
|
1072
1279
|
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
1073
1280
|
if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
|
|
1074
1281
|
hostRef.$flags$ |= 1 /* hasConnected */;
|
|
1282
|
+
let hostId;
|
|
1283
|
+
{
|
|
1284
|
+
hostId = elm.getAttribute(HYDRATE_ID);
|
|
1285
|
+
if (hostId) {
|
|
1286
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
1287
|
+
const scopeId2 = addStyle(elm.shadowRoot, cmpMeta);
|
|
1288
|
+
elm.classList.remove(scopeId2 + "-h", scopeId2 + "-s");
|
|
1289
|
+
}
|
|
1290
|
+
initializeClientHydrate(elm, cmpMeta.$tagName$, hostId, hostRef);
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1075
1293
|
{
|
|
1076
1294
|
let ancestorComponent = elm;
|
|
1077
1295
|
while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {
|
|
1078
|
-
if (ancestorComponent["s-p"]) {
|
|
1296
|
+
if (ancestorComponent.nodeType === 1 /* ElementNode */ && ancestorComponent.hasAttribute("s-id") && ancestorComponent["s-p"] || ancestorComponent["s-p"]) {
|
|
1079
1297
|
attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
|
|
1080
1298
|
break;
|
|
1081
1299
|
}
|
|
@@ -1132,10 +1350,20 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1132
1350
|
const metaCharset = /* @__PURE__ */ head.querySelector("meta[charset]");
|
|
1133
1351
|
const dataStyles = /* @__PURE__ */ doc.createElement("style");
|
|
1134
1352
|
const deferredConnectedCallbacks = [];
|
|
1353
|
+
const styles2 = /* @__PURE__ */ doc.querySelectorAll(`[${HYDRATED_STYLE_ID}]`);
|
|
1135
1354
|
let appLoadFallback;
|
|
1136
1355
|
let isBootstrapping = true;
|
|
1356
|
+
let i2 = 0;
|
|
1137
1357
|
Object.assign(plt, options);
|
|
1138
1358
|
plt.$resourcesUrl$ = new URL(options.resourcesUrl || "./", doc.baseURI).href;
|
|
1359
|
+
{
|
|
1360
|
+
plt.$flags$ |= 2 /* appLoaded */;
|
|
1361
|
+
}
|
|
1362
|
+
{
|
|
1363
|
+
for (; i2 < styles2.length; i2++) {
|
|
1364
|
+
registerStyle(styles2[i2].getAttribute(HYDRATED_STYLE_ID), convertScopedToShadow(styles2[i2].innerHTML), true);
|
|
1365
|
+
}
|
|
1366
|
+
}
|
|
1139
1367
|
let hasSlotRelocation = false;
|
|
1140
1368
|
lazyBundles.map((lazyBundle) => {
|
|
1141
1369
|
lazyBundle[1].map((compactMeta) => {
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-0160662f.js';
|
|
2
|
+
export { s as setNonce } from './index-0160662f.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["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]
|
|
8
|
+
return bootstrapLazy([["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]},[[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],"isNotificationsLoading":[32],"showMarkAll":[32],"limitStylingAppends":[32],"showDeleteAllPopup":[32],"hasMore":[32]},[[8,"messageDeleted","messageDeletedHandler"],[8,"messageRead","messageReadHandler"],[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"],"maxTextLength":[514,"max-text-length"],"maxLines":[514,"max-lines"],"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"]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-0160662f.js';
|
|
2
|
+
export { s as setNonce } from './index-0160662f.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -16,5 +16,5 @@ var patchBrowser = () => {
|
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(async (options) => {
|
|
18
18
|
await globalScripts();
|
|
19
|
-
return bootstrapLazy([["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]
|
|
19
|
+
return bootstrapLazy([["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]},[[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],"isNotificationsLoading":[32],"showMarkAll":[32],"limitStylingAppends":[32],"showDeleteAllPopup":[32],"hasMore":[32]},[[8,"messageDeleted","messageDeletedHandler"],[8,"messageRead","messageReadHandler"],[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"],"maxTextLength":[514,"max-text-length"],"maxLines":[514,"max-lines"],"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"]}]]]], options);
|
|
20
20
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index-0160662f.js';
|
|
2
2
|
|
|
3
3
|
const DEFAULT_LANGUAGE = 'en';
|
|
4
4
|
const SUPPORTED_LANGUAGES = ['hu', 'en', 'tr'];
|
|
@@ -4393,7 +4393,6 @@ const NutsInboxWidget = class {
|
|
|
4393
4393
|
this.isLoading = false;
|
|
4394
4394
|
this.popoverVisible = false;
|
|
4395
4395
|
this.unseenCount = undefined;
|
|
4396
|
-
this.limitStylingAppends = false;
|
|
4397
4396
|
}
|
|
4398
4397
|
initializeHandler(newValue, oldValue) {
|
|
4399
4398
|
if (newValue !== oldValue) {
|
|
@@ -4436,6 +4435,8 @@ const NutsInboxWidget = class {
|
|
|
4436
4435
|
}
|
|
4437
4436
|
}
|
|
4438
4437
|
setupSocket() {
|
|
4438
|
+
if (this.socketRef)
|
|
4439
|
+
return;
|
|
4439
4440
|
if (this.token) {
|
|
4440
4441
|
this.socketRef = lookup(this.socketUrl, {
|
|
4441
4442
|
reconnection: true,
|
|
@@ -4474,9 +4475,6 @@ const NutsInboxWidget = class {
|
|
|
4474
4475
|
window.postMessage({ type: 'nuts-new-notifications', value: this.unseenCount }, window.location.href);
|
|
4475
4476
|
this.setupSocket();
|
|
4476
4477
|
}
|
|
4477
|
-
if (this.clientStylingUrl) {
|
|
4478
|
-
this.setClientStylingURL();
|
|
4479
|
-
}
|
|
4480
4478
|
}
|
|
4481
4479
|
handleStylingChange(newValue, oldValue) {
|
|
4482
4480
|
if (newValue !== oldValue)
|
|
@@ -4498,22 +4496,21 @@ const NutsInboxWidget = class {
|
|
|
4498
4496
|
}
|
|
4499
4497
|
}
|
|
4500
4498
|
componentDidRender() {
|
|
4501
|
-
// start custom styling area
|
|
4502
|
-
if (!this.limitStylingAppends && this.stylingContainer) {
|
|
4503
|
-
if (this.clientStyling)
|
|
4504
|
-
this.setClientStyling();
|
|
4505
|
-
if (this.clientStylingUrl)
|
|
4506
|
-
this.setClientStylingURL();
|
|
4507
|
-
this.limitStylingAppends = true;
|
|
4508
|
-
}
|
|
4509
|
-
// end custom styling area
|
|
4510
4499
|
this.positionIcon();
|
|
4511
4500
|
}
|
|
4501
|
+
componentDidLoad() {
|
|
4502
|
+
if (this.clientStyling) {
|
|
4503
|
+
this.setClientStyling();
|
|
4504
|
+
}
|
|
4505
|
+
if (this.clientStylingUrl) {
|
|
4506
|
+
this.setClientStylingURL();
|
|
4507
|
+
}
|
|
4508
|
+
}
|
|
4512
4509
|
renderBellIcon() {
|
|
4513
4510
|
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" }))))) : ('')));
|
|
4514
4511
|
}
|
|
4515
4512
|
render() {
|
|
4516
|
-
return (h("div", { key: '
|
|
4513
|
+
return (h("div", { key: '976f73d1e55a55aa5370f1cf1e03dd81ffe2b21a', ref: this.assignRefToStylingContainer, class: "Wrapper" }, h("div", { key: 'b443d739125b7b7e4798fd751e71c18cbc7ea43b', ref: this.assignRefToBell, class: "BellIconWrapper" }, !this.isLoading && this.renderBellIcon()), this.token && this.popoverVisible && (h("nuts-popover", { key: '0dc6e5a66747b44d6e1827cfc517dece41a215a2', "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 }))));
|
|
4517
4514
|
}
|
|
4518
4515
|
get el() { return getElement(this); }
|
|
4519
4516
|
static get watchers() { return {
|
|
@@ -42315,13 +42312,22 @@ function renderAbstractNodeToSVGElement(node, options) {
|
|
|
42315
42312
|
return "<".concat(node.tag).concat(attrsToken, " />");
|
|
42316
42313
|
}
|
|
42317
42314
|
|
|
42318
|
-
const MAX_NOTIFICATION_TEXT_LENGTH =
|
|
42315
|
+
const MAX_NOTIFICATION_TEXT_LENGTH = 200;
|
|
42316
|
+
const MAX_NOTIFICATION_LINES = 5;
|
|
42319
42317
|
|
|
42320
|
-
const truncate = (str, n) => {
|
|
42318
|
+
const truncate = (str, n, l) => {
|
|
42321
42319
|
if (!str || n < 0) {
|
|
42322
42320
|
return;
|
|
42323
42321
|
}
|
|
42324
|
-
|
|
42322
|
+
if (str.length > n) {
|
|
42323
|
+
return str.slice(0, n - 1) + '...';
|
|
42324
|
+
}
|
|
42325
|
+
const matches = [...str.matchAll(/<br\s*\/?>|<\/p>/gi)];
|
|
42326
|
+
if (matches.length >= l) {
|
|
42327
|
+
const cutoffIndex = matches[l - 1].index;
|
|
42328
|
+
return str.slice(0, cutoffIndex) + '...';
|
|
42329
|
+
}
|
|
42330
|
+
return str;
|
|
42325
42331
|
};
|
|
42326
42332
|
|
|
42327
42333
|
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}";
|
|
@@ -42418,7 +42424,7 @@ const NutsNotification = class {
|
|
|
42418
42424
|
this.messageDeteled.emit(this.messageId);
|
|
42419
42425
|
};
|
|
42420
42426
|
this.notificationActionHandler = () => {
|
|
42421
|
-
var _a, _b, _c;
|
|
42427
|
+
var _a, _b, _c, _d;
|
|
42422
42428
|
if (this.notificationAction == 'default' || !this.notificationAction) {
|
|
42423
42429
|
if (this.redirectUrl.length > 0) {
|
|
42424
42430
|
window.location.href = this.redirectUrl;
|
|
@@ -42427,15 +42433,16 @@ const NutsNotification = class {
|
|
|
42427
42433
|
if (this.notificationAction == 'postMessage') {
|
|
42428
42434
|
window.postMessage({ type: 'NotificationRedirect', url: this.redirectUrl }, window.location.href);
|
|
42429
42435
|
}
|
|
42430
|
-
if (((_a = this.content) === null || _a === void 0 ? void 0 : _a.length) <=
|
|
42436
|
+
if (((_a = this.content) === null || _a === void 0 ? void 0 : _a.length) <= this.maxTextLength &&
|
|
42437
|
+
(((_b = this.content) === null || _b === void 0 ? void 0 : _b.match(/<br\s*\/?>|<\/p>/gi)) || []).length <= this.maxLines) {
|
|
42431
42438
|
return;
|
|
42432
42439
|
}
|
|
42433
|
-
if (((
|
|
42440
|
+
if (((_c = this.displayedContent) === null || _c === void 0 ? void 0 : _c.length) !== ((_d = this.content) === null || _d === void 0 ? void 0 : _d.length) && this.displayedContent !== this.content) {
|
|
42434
42441
|
this.displayedContent = this.content;
|
|
42435
42442
|
this.dropdownArrowRef.classList.add('FlipX');
|
|
42436
42443
|
return;
|
|
42437
42444
|
}
|
|
42438
|
-
this.displayedContent = truncate(this.content,
|
|
42445
|
+
this.displayedContent = truncate(this.content, this.maxTextLength, this.maxLines);
|
|
42439
42446
|
this.dropdownArrowRef.classList.remove('FlipX');
|
|
42440
42447
|
};
|
|
42441
42448
|
this.setClientStyling = () => {
|
|
@@ -42483,6 +42490,8 @@ const NutsNotification = class {
|
|
|
42483
42490
|
this.clientStylingUrl = undefined;
|
|
42484
42491
|
this.translationUrl = '';
|
|
42485
42492
|
this.clientStyling = '';
|
|
42493
|
+
this.maxTextLength = MAX_NOTIFICATION_TEXT_LENGTH;
|
|
42494
|
+
this.maxLines = MAX_NOTIFICATION_LINES;
|
|
42486
42495
|
this.showSettingsModal = false;
|
|
42487
42496
|
this.messageSeen = false;
|
|
42488
42497
|
this.messageRead = false;
|
|
@@ -42527,6 +42536,8 @@ const NutsNotification = class {
|
|
|
42527
42536
|
// end custom styling area
|
|
42528
42537
|
}
|
|
42529
42538
|
async componentWillLoad() {
|
|
42539
|
+
this.maxTextLength = Number(this.maxTextLength);
|
|
42540
|
+
this.maxLines = Number(this.maxLines);
|
|
42530
42541
|
if (this.translationUrl.length > 2) {
|
|
42531
42542
|
await getTranslations(this.translationUrl);
|
|
42532
42543
|
}
|
|
@@ -42534,23 +42545,49 @@ const NutsNotification = class {
|
|
|
42534
42545
|
connectedCallback() {
|
|
42535
42546
|
this.messageSeen = this.seen;
|
|
42536
42547
|
this.messageRead = this.read;
|
|
42537
|
-
this.displayedContent = truncate(this.content,
|
|
42548
|
+
this.displayedContent = truncate(this.content, this.maxTextLength, this.maxLines);
|
|
42538
42549
|
this.baseUrl = `${this.backendUrl}/v1/${this.operatorId}`;
|
|
42539
42550
|
}
|
|
42540
42551
|
render() {
|
|
42541
|
-
var _a, _b;
|
|
42552
|
+
var _a, _b, _c;
|
|
42542
42553
|
const sanitizedNotificationBody = DOMPurify.sanitize(this.displayedContent, {
|
|
42543
42554
|
ALLOW_UNKNOWN_PROTOCOLS: true,
|
|
42544
42555
|
ADD_ATTR: ['target', 'rel'],
|
|
42545
|
-
ALLOWED_TAGS: [
|
|
42546
|
-
'
|
|
42547
|
-
'
|
|
42556
|
+
ALLOWED_TAGS: [
|
|
42557
|
+
'b',
|
|
42558
|
+
'u',
|
|
42559
|
+
'i',
|
|
42560
|
+
'br',
|
|
42561
|
+
'a',
|
|
42562
|
+
'em',
|
|
42563
|
+
'h1',
|
|
42564
|
+
'h2',
|
|
42565
|
+
'h3',
|
|
42566
|
+
'h4',
|
|
42567
|
+
'h5',
|
|
42568
|
+
'h6',
|
|
42569
|
+
'strong',
|
|
42570
|
+
'p',
|
|
42571
|
+
'i',
|
|
42572
|
+
'small',
|
|
42573
|
+
'mark',
|
|
42574
|
+
'del',
|
|
42575
|
+
'b',
|
|
42576
|
+
's',
|
|
42577
|
+
'ins',
|
|
42578
|
+
'sub',
|
|
42579
|
+
'sup',
|
|
42580
|
+
'var',
|
|
42581
|
+
'cite',
|
|
42582
|
+
'q',
|
|
42583
|
+
'blockquote'
|
|
42548
42584
|
]
|
|
42549
42585
|
});
|
|
42550
|
-
return (h("div", { key: '
|
|
42586
|
+
return (h("div", { key: 'a74957d743897164ff0f3b3d17707a8db5f433fd', class: "Wrapper" }, h("div", { key: '7dd78a87e080e8ca578620356b2cff9acc9fd64c', 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: 'ea80f329d9994c429bc6c66f2f414daf7e0771b0', class: "ContentContainer" }, h("div", { key: 'b817eecb9732eeb3b19c438c0fbe6398c822dcf0', innerHTML: sanitizedNotificationBody }), h("p", { key: 'cb2c821ba968bb6e95c5703e94c296857822ae77', class: "Date" }, formatDistanceToNow(new Date(this.date), {
|
|
42551
42587
|
addSuffix: true,
|
|
42552
42588
|
locale: dateFnsLocale(this.language)
|
|
42553
|
-
}))), h("div", { key: '
|
|
42589
|
+
}))), h("div", { key: 'd35902296022dff85e84d2484846a724f4b098af', class: "RightActionsContainer" }, h("div", { key: 'b3f4f5d0452d89e58bf64a10d42140ad0d000f98', class: "Settings", onClick: this.toggleSettingsModal }, h("svg", { key: 'f5dab069aeb97ed7e7055277518b9850e47aa017', width: "24", height: "24", viewBox: "0 0 30 30", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '79398e37d9fa8fa5fb856d739caaa6b3e343c79a', d: "M20.625 15.5C20.625 16.5547 21.4453 17.375 22.5 17.375C23.5156 17.375 24.375 16.5547 24.375 15.5C24.375 14.4844 23.5156 13.625 22.5 13.625C21.4453 13.625 20.625 14.4844 20.625 15.5ZM9.375 15.5C9.375 14.4844 8.51562 13.625 7.5 13.625C6.44531 13.625 5.625 14.4844 5.625 15.5C5.625 16.5547 6.44531 17.375 7.5 17.375C8.51562 17.375 9.375 16.5547 9.375 15.5ZM16.875 15.5C16.875 14.4844 16.0156 13.625 15 13.625C13.9453 13.625 13.125 14.4844 13.125 15.5C13.125 16.5547 13.9453 17.375 15 17.375C16.0156 17.375 16.875 16.5547 16.875 15.5Z", fill: "currentColor" }))), (((_b = this.content) === null || _b === void 0 ? void 0 : _b.length) > this.maxTextLength ||
|
|
42590
|
+
(((_c = this.content) === null || _c === void 0 ? void 0 : _c.match(/<br\s*\/?>|<\/p>/gi)) || []).length > this.maxLines) && (h("div", { key: 'a75570887a9b7441b38c7cacf63ba525a17e795c', 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)))) : ('')));
|
|
42554
42591
|
}
|
|
42555
42592
|
get el() { return getElement(this); }
|
|
42556
42593
|
static get watchers() { return {
|
|
@@ -42747,8 +42784,8 @@ const NutsPopover = class {
|
|
|
42747
42784
|
extraSVGAttrs: { width: '30px', height: '30px', fill: '#A1A1B2' }
|
|
42748
42785
|
}) })) : ((_b = this.notifications) === null || _b === void 0 ? void 0 : _b.length) > 0 ? (this.notifications.map((item) => {
|
|
42749
42786
|
var _a;
|
|
42750
|
-
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 }));
|
|
42751
|
-
})) : (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 && (h("div", { key: '
|
|
42787
|
+
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, "max-text-length": 200, "max-lines": 5 }));
|
|
42788
|
+
})) : (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 && (h("div", { key: 'ac051bc217b20856ee2fbb05c164740a2ce15034', class: "Pagination" }, h("div", { key: '4103c2541b1534674f4a395782b57cb7f412e635', class: "Button" }, h("button", { key: 'b5ea8a82ad305692ba6b7e27de3156df8755b41a', disabled: this.isNotificationsLoading || this.currentPage <= 0, onClick: this.prevPage }, h("svg", { key: '84a373abf56f161f2f566c617c2227d713bfbad5', class: "svg-icon", viewBox: "0 0 20 20" }, h("path", { key: 'a8c8e4d65eb525f98db3a9f3770c64a4cff44b0e', d: "M8.388,10.049l4.76-4.873c0.303-0.31,0.297-0.804-0.012-1.105c-0.309-0.304-0.803-0.293-1.105,0.012L6.726,9.516c-0.303,0.31-0.296,0.805,0.012,1.105l5.433,5.307c0.152,0.148,0.35,0.223,0.547,0.223c0.203,0,0.406-0.08,0.559-0.236c0.303-0.309,0.295-0.803-0.012-1.104L8.388,10.049z" })), translate$1('prev', this.language))), h("div", { key: '20b18543fe251fe1f2b67e002fa07ec9be8146e7', class: "Button" }, h("button", { key: '797168392bd58e443953ccac835e33660956ea27', disabled: this.isNotificationsLoading || !this.hasMore, onClick: this.nextPage }, translate$1('next', this.language), h("svg", { key: '3602fbc69f946074355405ec83075069bb3787c1', class: "svg-icon", viewBox: "0 0 20 20" }, h("path", { key: '679cc4531c96fe91bbdc027acfee1eb71240495d', d: "M11.611,10.049l-4.76-4.873c-0.303-0.31-0.297-0.804,0.012-1.105c0.309-0.304,0.803-0.293,1.105,0.012l5.306,5.433c0.304,0.31,0.296,0.805-0.012,1.105L7.83,15.928c-0.152,0.148-0.35,0.223-0.547,0.223c-0.203,0-0.406-0.08-0.559-0.236c-0.303-0.309-0.295-0.803,0.012-1.104L11.611,10.049z" }))))))));
|
|
42752
42789
|
}
|
|
42753
42790
|
static get watchers() { return {
|
|
42754
42791
|
"unseenCount": ["unseenCountHandler"],
|