@everymatrix/nuts-inbox-widget 1.53.0 → 1.53.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. package/dist/cjs/{index-43ce2388.js → index-13b68ce6.js} +171 -74
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/nuts-inbox-widget.cjs.js +2 -2
  4. package/dist/cjs/nuts-inbox-widget_3.cjs.entry.js +51 -59
  5. package/dist/collection/collection-manifest.json +1 -1
  6. package/dist/collection/components/nuts-inbox-widget/nuts-inbox-widget.js +57 -19
  7. package/dist/collection/components/nuts-notification/nuts-notification.js +50 -24
  8. package/dist/collection/components/nuts-popover/nuts-popover.js +33 -15
  9. package/dist/esm/{index-90fc4db5.js → index-4ba12d79.js} +171 -74
  10. package/dist/esm/loader.js +2 -2
  11. package/dist/esm/nuts-inbox-widget.js +3 -3
  12. package/dist/esm/nuts-inbox-widget_3.entry.js +51 -59
  13. package/dist/nuts-inbox-widget/nuts-inbox-widget.esm.js +1 -1
  14. package/dist/nuts-inbox-widget/p-4d5c8bdf.js +2 -0
  15. package/dist/nuts-inbox-widget/p-570eeade.entry.js +1 -0
  16. 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
  17. 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
  18. package/package.json +1 -1
  19. package/dist/nuts-inbox-widget/p-3a5589e2.entry.js +0 -1
  20. package/dist/nuts-inbox-widget/p-6148a470.js +0 -2
  21. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.d.ts +0 -2
  22. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/nuts-inbox-widget/.stencil/packages/stencil/nuts-inbox-widget/stencil.config.dev.d.ts +0 -2
@@ -21,19 +21,27 @@ function _interopNamespace(e) {
21
21
  }
22
22
 
23
23
  const NAMESPACE = 'nuts-inbox-widget';
24
- const BUILD = /* nuts-inbox-widget */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, 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: false, 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 };
24
+ const BUILD = /* nuts-inbox-widget */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, 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: false, 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, modernPropertyDecls: 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 };
25
25
 
26
26
  /*
27
- Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
27
+ Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
28
28
  */
29
29
  var __defProp = Object.defineProperty;
30
30
  var __export = (target, all) => {
31
31
  for (var name in all)
32
32
  __defProp(target, name, { get: all[name], enumerable: true });
33
33
  };
34
+
35
+ // src/utils/constants.ts
36
+ var SVG_NS = "http://www.w3.org/2000/svg";
37
+ var HTML_NS = "http://www.w3.org/1999/xhtml";
38
+
39
+ // src/client/client-host-ref.ts
34
40
  var hostRefs = /* @__PURE__ */ new WeakMap();
35
41
  var getHostRef = (ref) => hostRefs.get(ref);
36
- var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
42
+ var registerInstance = (lazyInstance, hostRef) => {
43
+ hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
44
+ };
37
45
  var registerHost = (hostElement, cmpMeta) => {
38
46
  const hostRef = {
39
47
  $flags$: 0,
@@ -46,7 +54,8 @@ var registerHost = (hostElement, cmpMeta) => {
46
54
  hostElement["s-p"] = [];
47
55
  hostElement["s-rc"] = [];
48
56
  }
49
- return hostRefs.set(hostElement, hostRef);
57
+ const ref = hostRefs.set(hostElement, hostRef);
58
+ return ref;
50
59
  };
51
60
  var isMemberInElement = (elm, memberName) => memberName in elm;
52
61
  var consoleError = (e, el) => (0, console.error)(e, el);
@@ -83,16 +92,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
83
92
  /* webpackExclude: /\.system\.entry\.js$/ */
84
93
  /* webpackMode: "lazy" */
85
94
  `./${bundleId}.entry.js${""}`
86
- )); }).then((importedModule) => {
87
- {
88
- cmpModules.set(bundleId, importedModule);
95
+ )); }).then(
96
+ (importedModule) => {
97
+ {
98
+ cmpModules.set(bundleId, importedModule);
99
+ }
100
+ return importedModule[exportName];
101
+ },
102
+ (e) => {
103
+ consoleError(e, hostRef.$hostElement$);
89
104
  }
90
- return importedModule[exportName];
91
- }, consoleError);
105
+ );
92
106
  };
93
107
 
94
108
  // src/client/client-style.ts
95
109
  var styles = /* @__PURE__ */ new Map();
110
+ var HYDRATED_STYLE_ID = "sty-id";
96
111
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
97
112
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
98
113
  var win = typeof window !== "undefined" ? window : {};
@@ -166,14 +181,6 @@ var flush = () => {
166
181
  };
167
182
  var nextTick = (cb) => promiseResolve().then(cb);
168
183
  var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
169
-
170
- // src/utils/constants.ts
171
- var EMPTY_OBJ = {};
172
- var SVG_NS = "http://www.w3.org/2000/svg";
173
- var HTML_NS = "http://www.w3.org/1999/xhtml";
174
-
175
- // src/utils/helpers.ts
176
- var isDef = (v) => v != null;
177
184
  var isComplexType = (o) => {
178
185
  o = typeof o;
179
186
  return o === "object" || o === "function";
@@ -377,7 +384,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
377
384
  }
378
385
  if (!appliedStyles.has(scopeId2)) {
379
386
  {
380
- styleElm = doc.createElement("style");
387
+ styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
381
388
  styleElm.innerHTML = style;
382
389
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
383
390
  if (nonce != null) {
@@ -387,7 +394,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
387
394
  if (styleContainerNode.nodeName === "HEAD") {
388
395
  const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
389
396
  const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
390
- styleContainerNode.insertBefore(styleElm, referenceNode2);
397
+ styleContainerNode.insertBefore(
398
+ styleElm,
399
+ (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
400
+ );
391
401
  } else if ("host" in styleContainerNode) {
392
402
  if (supportsConstructableStylesheets) {
393
403
  const stylesheet = new CSSStyleSheet();
@@ -437,16 +447,18 @@ var attachStyles = (hostRef) => {
437
447
  endAttachStyles();
438
448
  };
439
449
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
440
- var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
450
+ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
441
451
  if (oldValue !== newValue) {
442
452
  let isProp = isMemberInElement(elm, memberName);
443
453
  let ln = memberName.toLowerCase();
444
454
  if (memberName === "class") {
445
455
  const classList = elm.classList;
446
456
  const oldClasses = parseClassList(oldValue);
447
- const newClasses = parseClassList(newValue);
448
- classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
449
- classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
457
+ let newClasses = parseClassList(newValue);
458
+ {
459
+ classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
460
+ classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
461
+ }
450
462
  } else if (memberName === "key") ; else if (memberName === "ref") {
451
463
  if (newValue) {
452
464
  newValue(elm);
@@ -484,7 +496,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
484
496
  elm.setAttribute(memberName, n);
485
497
  }
486
498
  }
487
- } else {
499
+ } else if (elm[memberName] !== newValue) {
488
500
  elm[memberName] = newValue;
489
501
  }
490
502
  } catch (e) {
@@ -506,24 +518,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
506
518
  }
507
519
  };
508
520
  var parseClassListRegex = /\s/;
509
- var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
521
+ var parseClassList = (value) => {
522
+ if (typeof value === "object" && value && "baseVal" in value) {
523
+ value = value.baseVal;
524
+ }
525
+ if (!value || typeof value !== "string") {
526
+ return [];
527
+ }
528
+ return value.split(parseClassListRegex);
529
+ };
510
530
  var CAPTURE_EVENT_SUFFIX = "Capture";
511
531
  var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
512
532
 
513
533
  // src/runtime/vdom/update-element.ts
514
- var updateElement = (oldVnode, newVnode, isSvgMode2) => {
534
+ var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
515
535
  const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
516
- const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
517
- const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
536
+ const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
537
+ const newVnodeAttrs = newVnode.$attrs$ || {};
518
538
  {
519
539
  for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
520
540
  if (!(memberName in newVnodeAttrs)) {
521
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
541
+ setAccessor(
542
+ elm,
543
+ memberName,
544
+ oldVnodeAttrs[memberName],
545
+ void 0,
546
+ isSvgMode2,
547
+ newVnode.$flags$);
522
548
  }
523
549
  }
524
550
  }
525
551
  for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
526
- setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
552
+ setAccessor(
553
+ elm,
554
+ memberName,
555
+ oldVnodeAttrs[memberName],
556
+ newVnodeAttrs[memberName],
557
+ isSvgMode2,
558
+ newVnode.$flags$);
527
559
  }
528
560
  };
529
561
  function sortedAttrNames(attrNames) {
@@ -535,13 +567,10 @@ function sortedAttrNames(attrNames) {
535
567
  attrNames
536
568
  );
537
569
  }
538
-
539
- // src/runtime/vdom/vdom-render.ts
540
- var scopeId;
541
570
  var hostTagName;
542
571
  var useNativeShadowDom = false;
543
572
  var isSvgMode = false;
544
- var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
573
+ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
545
574
  const newVNode2 = newParentVNode.$children$[childIndex];
546
575
  let i2 = 0;
547
576
  let elm;
@@ -562,11 +591,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
562
591
  {
563
592
  updateElement(null, newVNode2, isSvgMode);
564
593
  }
565
- const rootNode = elm.getRootNode();
566
- const isElementWithinShadowRoot = !rootNode.querySelector("body");
567
- if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
568
- elm.classList.add(elm["s-si"] = scopeId);
569
- }
570
594
  if (newVNode2.$children$) {
571
595
  for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
572
596
  childNode = createElm(oldParentVNode, newVNode2, i2);
@@ -703,6 +727,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
703
727
  if (!isInitialRender) {
704
728
  return leftVNode.$key$ === rightVNode.$key$;
705
729
  }
730
+ if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
731
+ leftVNode.$key$ = rightVNode.$key$;
732
+ }
706
733
  return true;
707
734
  }
708
735
  return false;
@@ -749,8 +776,9 @@ var nullifyVNodeRefs = (vNode) => {
749
776
  }
750
777
  };
751
778
  var insertBefore = (parent, newNode, reference) => {
752
- const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
753
- return inserted;
779
+ {
780
+ return parent == null ? void 0 : parent.insertBefore(newNode, reference);
781
+ }
754
782
  };
755
783
  var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
756
784
  const hostElm = hostRef.$hostElement$;
@@ -775,9 +803,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
775
803
  rootVnode.$flags$ |= 4 /* isHost */;
776
804
  hostRef.$vnode$ = rootVnode;
777
805
  rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
778
- {
779
- scopeId = hostElm["s-sc"];
780
- }
781
806
  useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
782
807
  patch(oldVNode, rootVnode, isInitialLoad);
783
808
  };
@@ -785,7 +810,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
785
810
  // src/runtime/update-component.ts
786
811
  var attachToAncestor = (hostRef, ancestorComponent) => {
787
812
  if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
788
- ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
813
+ const index = ancestorComponent["s-p"].push(
814
+ new Promise(
815
+ (r) => hostRef.$onRenderResolve$ = () => {
816
+ ancestorComponent["s-p"].splice(index - 1, 1);
817
+ r();
818
+ }
819
+ )
820
+ );
789
821
  }
790
822
  };
791
823
  var scheduleUpdate = (hostRef, isInitialLoad) => {
@@ -814,12 +846,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
814
846
  {
815
847
  hostRef.$flags$ |= 256 /* isListenReady */;
816
848
  if (hostRef.$queuedListeners$) {
817
- hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
849
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
818
850
  hostRef.$queuedListeners$ = void 0;
819
851
  }
820
852
  }
821
853
  {
822
- maybePromise = safeCall(instance, "componentWillLoad");
854
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
823
855
  }
824
856
  }
825
857
  endSchedule();
@@ -888,7 +920,7 @@ var postUpdateComponent = (hostRef) => {
888
920
  const instance = hostRef.$lazyInstance$ ;
889
921
  const ancestorComponent = hostRef.$ancestorComponent$;
890
922
  {
891
- safeCall(instance, "componentDidRender");
923
+ safeCall(instance, "componentDidRender", void 0, elm);
892
924
  }
893
925
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
894
926
  hostRef.$flags$ |= 64 /* hasLoadedComponent */;
@@ -922,12 +954,12 @@ var appDidLoad = (who) => {
922
954
  }
923
955
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
924
956
  };
925
- var safeCall = (instance, method, arg) => {
957
+ var safeCall = (instance, method, arg, elm) => {
926
958
  if (instance && instance[method]) {
927
959
  try {
928
960
  return instance[method](arg);
929
961
  } catch (e) {
930
- consoleError(e);
962
+ consoleError(e, elm);
931
963
  }
932
964
  }
933
965
  return void 0;
@@ -986,15 +1018,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
986
1018
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
987
1019
  members.map(([memberName, [memberFlags]]) => {
988
1020
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
1021
+ const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
1022
+ if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
1023
+ if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
1024
+ if (flags & 1 /* isElementConstructor */ || !origGetter) {
1025
+ Object.defineProperty(prototype, memberName, {
1026
+ get() {
1027
+ {
1028
+ if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
1029
+ return getValue(this, memberName);
1030
+ }
1031
+ const ref = getHostRef(this);
1032
+ const instance = ref ? ref.$lazyInstance$ : prototype;
1033
+ if (!instance) return;
1034
+ return instance[memberName];
1035
+ }
1036
+ },
1037
+ configurable: true,
1038
+ enumerable: true
1039
+ });
1040
+ }
989
1041
  Object.defineProperty(prototype, memberName, {
990
- get() {
991
- return getValue(this, memberName);
992
- },
993
1042
  set(newValue) {
994
- setValue(this, memberName, newValue, cmpMeta);
995
- },
996
- configurable: true,
997
- enumerable: true
1043
+ const ref = getHostRef(this);
1044
+ if (origSetter) {
1045
+ const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1046
+ if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1047
+ newValue = ref.$instanceValues$.get(memberName);
1048
+ } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1049
+ ref.$instanceValues$.set(memberName, currentValue);
1050
+ }
1051
+ origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1052
+ newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1053
+ setValue(this, memberName, newValue, cmpMeta);
1054
+ return;
1055
+ }
1056
+ {
1057
+ if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1058
+ setValue(this, memberName, newValue, cmpMeta);
1059
+ if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1060
+ ref.$onReadyPromise$.then(() => {
1061
+ if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1062
+ ref.$lazyInstance$[memberName] = newValue;
1063
+ }
1064
+ });
1065
+ }
1066
+ return;
1067
+ }
1068
+ const setterSetVal = () => {
1069
+ const currentValue = ref.$lazyInstance$[memberName];
1070
+ if (!ref.$instanceValues$.get(memberName) && currentValue) {
1071
+ ref.$instanceValues$.set(memberName, currentValue);
1072
+ }
1073
+ ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1074
+ setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1075
+ };
1076
+ if (ref.$lazyInstance$) {
1077
+ setterSetVal();
1078
+ } else {
1079
+ ref.$onReadyPromise$.then(() => setterSetVal());
1080
+ }
1081
+ }
1082
+ }
998
1083
  });
999
1084
  }
1000
1085
  });
@@ -1004,7 +1089,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1004
1089
  plt.jmp(() => {
1005
1090
  var _a2;
1006
1091
  const propName = attrNameToPropName.get(attrName);
1007
- if (this.hasOwnProperty(propName)) {
1092
+ if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1008
1093
  newValue = this[propName];
1009
1094
  delete this[propName];
1010
1095
  } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
@@ -1024,7 +1109,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1024
1109
  }
1025
1110
  return;
1026
1111
  }
1027
- this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1112
+ const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1113
+ newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1114
+ if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1115
+ this[propName] = newValue;
1116
+ }
1028
1117
  });
1029
1118
  };
1030
1119
  Cstr.observedAttributes = Array.from(
@@ -1051,9 +1140,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1051
1140
  let Cstr;
1052
1141
  if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
1053
1142
  hostRef.$flags$ |= 32 /* hasInitializedComponent */;
1054
- const bundleId = cmpMeta.$lazyBundleId$;
1055
- if (bundleId) {
1056
- const CstrImport = loadModule(cmpMeta);
1143
+ {
1144
+ const CstrImport = loadModule(cmpMeta, hostRef);
1057
1145
  if (CstrImport && "then" in CstrImport) {
1058
1146
  const endLoad = uniqueTime();
1059
1147
  Cstr = await CstrImport;
@@ -1078,7 +1166,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1078
1166
  try {
1079
1167
  new Cstr(hostRef);
1080
1168
  } catch (e) {
1081
- consoleError(e);
1169
+ consoleError(e, elm);
1082
1170
  }
1083
1171
  {
1084
1172
  hostRef.$flags$ &= ~8 /* isConstructingInstance */;
@@ -1087,11 +1175,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1087
1175
  hostRef.$flags$ |= 128 /* isWatchReady */;
1088
1176
  }
1089
1177
  endNewInstance();
1090
- fireConnectedCallback(hostRef.$lazyInstance$);
1091
- } else {
1092
- Cstr = elm.constructor;
1093
- const cmpTag = elm.localName;
1094
- customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
1178
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1095
1179
  }
1096
1180
  if (Cstr && Cstr.style) {
1097
1181
  let style;
@@ -1114,9 +1198,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1114
1198
  schedule();
1115
1199
  }
1116
1200
  };
1117
- var fireConnectedCallback = (instance) => {
1201
+ var fireConnectedCallback = (instance, elm) => {
1118
1202
  {
1119
- safeCall(instance, "connectedCallback");
1203
+ safeCall(instance, "connectedCallback", void 0, elm);
1120
1204
  }
1121
1205
  };
1122
1206
 
@@ -1152,15 +1236,15 @@ var connectedCallback = (elm) => {
1152
1236
  } else {
1153
1237
  addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1154
1238
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
1155
- fireConnectedCallback(hostRef.$lazyInstance$);
1239
+ fireConnectedCallback(hostRef.$lazyInstance$, elm);
1156
1240
  } else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1157
- hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
1241
+ hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
1158
1242
  }
1159
1243
  }
1160
1244
  endConnected();
1161
1245
  }
1162
1246
  };
1163
- var disconnectInstance = (instance) => {
1247
+ var disconnectInstance = (instance, elm) => {
1164
1248
  };
1165
1249
  var disconnectedCallback = async (elm) => {
1166
1250
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
@@ -1175,6 +1259,12 @@ var disconnectedCallback = async (elm) => {
1175
1259
  hostRef.$onReadyPromise$.then(() => disconnectInstance());
1176
1260
  }
1177
1261
  }
1262
+ if (rootAppliedStyles.has(elm)) {
1263
+ rootAppliedStyles.delete(elm);
1264
+ }
1265
+ if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
1266
+ rootAppliedStyles.delete(elm.shadowRoot);
1267
+ }
1178
1268
  };
1179
1269
 
1180
1270
  // src/runtime/bootstrap-lazy.ts
@@ -1259,6 +1349,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1259
1349
  }
1260
1350
  disconnectedCallback() {
1261
1351
  plt.jmp(() => disconnectedCallback(this));
1352
+ plt.raf(() => {
1353
+ var _a3;
1354
+ const hostRef = getHostRef(this);
1355
+ if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
1356
+ delete hostRef.$vnode$.$elm$;
1357
+ }
1358
+ });
1262
1359
  }
1263
1360
  componentOnReady() {
1264
1361
  return getHostRef(this).$onReadyPromise$;
@@ -1322,7 +1419,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1322
1419
  }
1323
1420
  }
1324
1421
  } catch (e) {
1325
- consoleError(e);
1422
+ consoleError(e, hostRef.$hostElement$);
1326
1423
  }
1327
1424
  };
1328
1425
  var getHostListenerTarget = (elm, flags) => {
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-43ce2388.js');
5
+ const index = require('./index-13b68ce6.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  const defineCustomElements = async (win, options) => {
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-43ce2388.js');
5
+ const index = require('./index-13b68ce6.js');
6
6
  const appGlobals = require('./app-globals-3a1e7e63.js');
7
7
 
8
8
  /*
9
- Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
9
+ Stencil Client Patch Browser v4.25.1 | MIT Licensed | https://stenciljs.com
10
10
  */
11
11
  var patchBrowser = () => {
12
12
  const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('nuts-inbox-widget.cjs.js', document.baseURI).href));
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-43ce2388.js');
5
+ const index = require('./index-13b68ce6.js');
6
6
 
7
7
  const DEFAULT_LANGUAGE = 'en';
8
8
  const SUPPORTED_LANGUAGES = ['hu', 'en'];
@@ -4234,6 +4234,33 @@ const NutsInboxWidget = class {
4234
4234
  index.registerInstance(this, hostRef);
4235
4235
  this.notificationFeed = index.createEvent(this, "notificationFeed", 7);
4236
4236
  this.newNotification = index.createEvent(this, "newNotification", 7);
4237
+ /**
4238
+ * Language of the widget
4239
+ */
4240
+ this.language = 'en';
4241
+ /**
4242
+ * Environment on which the widget is used (possible values: `stage`, `prod`)
4243
+ */
4244
+ this.environment = 'stage';
4245
+ /**
4246
+ * Client custom styling via inline styles
4247
+ */
4248
+ this.clientStyling = '';
4249
+ /**
4250
+ * Position of the widget (possible values: `left` and `right`) - this changes the `justify-content` property of the `.BellIconWrapper` class
4251
+ */
4252
+ this.bellIconPosition = 'left';
4253
+ /**
4254
+ * Clicking on the notification will automatically redirect you to the redirectURL attached to the notification (`default` behaviour). It can be changed to `postMessage` and instead of the redirect it will emit a postMessage with the redirectURL and the parent website can take actions
4255
+ */
4256
+ this.notificationAction = 'default';
4257
+ /**
4258
+ * Translations via URL
4259
+ */
4260
+ this.translationUrl = '';
4261
+ this.isLoading = false;
4262
+ this.popoverVisible = false;
4263
+ this.limitStylingAppends = false;
4237
4264
  this.token = null;
4238
4265
  this.baseUrl = `${this.backendUrl}/v1/${this.operatorId}`;
4239
4266
  this.initializeSessionBody = {
@@ -4274,25 +4301,6 @@ const NutsInboxWidget = class {
4274
4301
  this.assignRefToBell = (ref) => {
4275
4302
  this.bellIconRef = ref;
4276
4303
  };
4277
- this.backendUrl = undefined;
4278
- this.socketUrl = undefined;
4279
- this.userId = undefined;
4280
- this.sessionId = undefined;
4281
- this.operatorId = undefined;
4282
- this.subscriberId = undefined;
4283
- this.deviceId = undefined;
4284
- this.language = 'en';
4285
- this.environment = 'stage';
4286
- this.applicationIdentifier = undefined;
4287
- this.clientStyling = '';
4288
- this.clientStylingUrl = undefined;
4289
- this.bellIconPosition = 'left';
4290
- this.notificationAction = 'default';
4291
- this.translationUrl = '';
4292
- this.isLoading = false;
4293
- this.popoverVisible = false;
4294
- this.unseenCount = undefined;
4295
- this.limitStylingAppends = false;
4296
4304
  }
4297
4305
  initializeHandler(newValue, oldValue) {
4298
4306
  if (newValue !== oldValue) {
@@ -40689,6 +40697,18 @@ const NutsNotification = class {
40689
40697
  index.registerInstance(this, hostRef);
40690
40698
  this.messageDeteled = index.createEvent(this, "messageDeleted", 7);
40691
40699
  this.settingsOpened = index.createEvent(this, "settingsOpened", 7);
40700
+ /**
40701
+ * Translations via URL
40702
+ */
40703
+ this.translationUrl = '';
40704
+ /**
40705
+ * Clienty styling passed as a string
40706
+ */
40707
+ this.clientStyling = '';
40708
+ this.showSettingsModal = false;
40709
+ this.messageSeen = false;
40710
+ this.messageRead = false;
40711
+ this.limitStylingAppends = false;
40692
40712
  this.toggleSettingsModal = (e) => {
40693
40713
  e.stopImmediatePropagation();
40694
40714
  this.showSettingsModal = !this.showSettingsModal;
@@ -40777,30 +40797,6 @@ const NutsNotification = class {
40777
40797
  this.assignRefToDropdownArrow = (ref) => {
40778
40798
  this.dropdownArrowRef = ref;
40779
40799
  };
40780
- this.badge = undefined;
40781
- this.content = undefined;
40782
- this.date = undefined;
40783
- this.showSettings = undefined;
40784
- this.read = undefined;
40785
- this.seen = undefined;
40786
- this.language = undefined;
40787
- this.sessionId = undefined;
40788
- this.subscriberId = undefined;
40789
- this.userId = undefined;
40790
- this.messageId = undefined;
40791
- this.operatorId = undefined;
40792
- this.token = undefined;
40793
- this.backendUrl = undefined;
40794
- this.redirectUrl = undefined;
40795
- this.notificationAction = undefined;
40796
- this.clientStylingUrl = undefined;
40797
- this.translationUrl = '';
40798
- this.clientStyling = '';
40799
- this.showSettingsModal = false;
40800
- this.messageSeen = false;
40801
- this.messageRead = false;
40802
- this.displayedContent = undefined;
40803
- this.limitStylingAppends = false;
40804
40800
  }
40805
40801
  allNotificationsReadHandler() {
40806
40802
  this.messageSeen = true;
@@ -40866,6 +40862,17 @@ const NutsPopover = class {
40866
40862
  constructor(hostRef) {
40867
40863
  index.registerInstance(this, hostRef);
40868
40864
  this.allNotificationsRead = index.createEvent(this, "allNotificationsRead", 7);
40865
+ /**
40866
+ * Custom styling string
40867
+ */
40868
+ this.clientStyling = '';
40869
+ /**
40870
+ * Translations via URL
40871
+ */
40872
+ this.translationUrl = '';
40873
+ this.isLoading = true;
40874
+ this.showMarkAll = false;
40875
+ this.limitStylingAppends = false;
40869
40876
  this.currentPage = 0;
40870
40877
  this.updateNotificationsDataAfterPageChange = (getNotificationsData) => {
40871
40878
  this.isLoading = getNotificationsData.isLoading;
@@ -40921,21 +40928,6 @@ const NutsPopover = class {
40921
40928
  this.assignRefToStylingContainer = (ref) => {
40922
40929
  this.stylingContainer = ref;
40923
40930
  };
40924
- this.language = undefined;
40925
- this.userId = undefined;
40926
- this.operatorId = undefined;
40927
- this.token = undefined;
40928
- this.sessionId = undefined;
40929
- this.backendUrl = undefined;
40930
- this.unseenCount = undefined;
40931
- this.clientStylingUrl = undefined;
40932
- this.notificationAction = undefined;
40933
- this.clientStyling = '';
40934
- this.translationUrl = '';
40935
- this.notifications = undefined;
40936
- this.isLoading = true;
40937
- this.showMarkAll = false;
40938
- this.limitStylingAppends = false;
40939
40931
  }
40940
40932
  messageDeteledHandler(event) {
40941
40933
  this.notifications = this.notifications.filter((item) => {