eiam-user-preference 0.0.56 → 0.0.59

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 (67) hide show
  1. package/LICENSE +22 -22
  2. package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -1
  3. package/dist/cjs/eiam-user-preference.cjs.entry.js +15 -5
  4. package/dist/cjs/eiam-user-preference.cjs.js +3 -5
  5. package/dist/cjs/eiam-user-preference.cjs.js.map +1 -1
  6. package/dist/cjs/eiam-user-preference.entry.cjs.js.map +1 -1
  7. package/dist/cjs/{index-BwhDU6Rv.js → index-DFm_LKOZ.js} +250 -138
  8. package/dist/cjs/index-DFm_LKOZ.js.map +1 -0
  9. package/dist/cjs/index.cjs.js +0 -2
  10. package/dist/cjs/index.cjs.js.map +1 -1
  11. package/dist/cjs/loader.cjs.js +2 -4
  12. package/dist/cjs/my-component.cjs.entry.js +2 -4
  13. package/dist/cjs/my-component.entry.cjs.js.map +1 -1
  14. package/dist/collection/collection-manifest.json +2 -2
  15. package/dist/collection/components/eiam-user-preference/eiam-user-preference.js +22 -10
  16. package/dist/collection/components/eiam-user-preference/eiam-user-preference.js.map +1 -1
  17. package/dist/collection/components/my-component/my-component.css +3 -3
  18. package/dist/collection/components/my-component/my-component.js +7 -7
  19. package/dist/collection/components/my-component/my-component.js.map +1 -1
  20. package/dist/collection/index.js.map +1 -1
  21. package/dist/collection/utils/utils.js.map +1 -1
  22. package/dist/components/eiam-user-preference.js +20 -6
  23. package/dist/components/eiam-user-preference.js.map +1 -1
  24. package/dist/components/index.js +1 -1
  25. package/dist/components/index.js.map +1 -1
  26. package/dist/components/my-component.js +7 -5
  27. package/dist/components/my-component.js.map +1 -1
  28. package/dist/components/{p-Bg8L3BtK.js → p-Dk6Z16y5.js} +234 -136
  29. package/dist/components/p-Dk6Z16y5.js.map +1 -0
  30. package/dist/eiam-user-preference/eiam-user-preference.entry.esm.js.map +1 -1
  31. package/dist/eiam-user-preference/eiam-user-preference.esm.js +1 -1
  32. package/dist/eiam-user-preference/eiam-user-preference.esm.js.map +1 -1
  33. package/dist/eiam-user-preference/index.esm.js.map +1 -1
  34. package/dist/eiam-user-preference/my-component.entry.esm.js.map +1 -1
  35. package/dist/eiam-user-preference/p-D1G58aKM.js +3 -0
  36. package/dist/eiam-user-preference/p-D1G58aKM.js.map +1 -0
  37. package/dist/eiam-user-preference/p-DQuL1Twl.js.map +1 -1
  38. package/dist/eiam-user-preference/p-a3ad7926.entry.js +2 -0
  39. package/dist/eiam-user-preference/p-a3ad7926.entry.js.map +1 -0
  40. package/dist/eiam-user-preference/{p-7478358c.entry.js → p-c60f171a.entry.js} +2 -2
  41. package/dist/eiam-user-preference/p-c60f171a.entry.js.map +1 -0
  42. package/dist/esm/app-globals-DQuL1Twl.js.map +1 -1
  43. package/dist/esm/eiam-user-preference.entry.js +15 -5
  44. package/dist/esm/eiam-user-preference.entry.js.map +1 -1
  45. package/dist/esm/eiam-user-preference.js +4 -6
  46. package/dist/esm/eiam-user-preference.js.map +1 -1
  47. package/dist/esm/{index-Ko8ax98F.js → index-D1G58aKM.js} +250 -138
  48. package/dist/esm/index-D1G58aKM.js.map +1 -0
  49. package/dist/esm/index.js +0 -2
  50. package/dist/esm/index.js.map +1 -1
  51. package/dist/esm/loader.js +3 -5
  52. package/dist/esm/my-component.entry.js +2 -4
  53. package/dist/esm/my-component.entry.js.map +1 -1
  54. package/dist/types/components/eiam-user-preference/eiam-user-preference.d.ts +3 -0
  55. package/dist/types/stencil-public-runtime.d.ts +82 -9
  56. package/package.json +81 -81
  57. package/readme.md +86 -86
  58. package/dist/cjs/eiam-user-preference.cjs.entry.js.map +0 -1
  59. package/dist/cjs/index-BwhDU6Rv.js.map +0 -1
  60. package/dist/cjs/my-component.cjs.entry.js.map +0 -1
  61. package/dist/components/p-Bg8L3BtK.js.map +0 -1
  62. package/dist/eiam-user-preference/p-43c6e6ba.entry.js +0 -2
  63. package/dist/eiam-user-preference/p-43c6e6ba.entry.js.map +0 -1
  64. package/dist/eiam-user-preference/p-7478358c.entry.js.map +0 -1
  65. package/dist/eiam-user-preference/p-Ko8ax98F.js +0 -3
  66. package/dist/eiam-user-preference/p-Ko8ax98F.js.map +0 -1
  67. package/dist/esm/index-Ko8ax98F.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  const NAMESPACE = 'eiam-user-preference';
2
- const BUILD = /* eiam-user-preference */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true};
2
+ const BUILD = /* eiam-user-preference */ { hydratedSelectorName: "hydrated", lazyLoad: true, propChangeCallback: true, updatable: true};
3
3
 
4
4
  /*
5
- Stencil Client Platform v4.29.1 | MIT Licensed | https://stenciljs.com
5
+ Stencil Client Platform v4.38.2 | MIT Licensed | https://stenciljs.com
6
6
  */
7
7
  var __defProp = Object.defineProperty;
8
8
  var __export = (target, all) => {
@@ -22,21 +22,31 @@ var reWireGetterSetter = (instance, hostRef) => {
22
22
  members.map(([memberName, [memberFlags]]) => {
23
23
  if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {
24
24
  const ogValue = instance[memberName];
25
- const ogDescriptor = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(instance), memberName);
26
- Object.defineProperty(instance, memberName, {
27
- get() {
28
- return ogDescriptor.get.call(this);
29
- },
30
- set(newValue) {
31
- ogDescriptor.set.call(this, newValue);
32
- },
33
- configurable: true,
34
- enumerable: true
35
- });
25
+ const ogDescriptor = getPropertyDescriptor(Object.getPrototypeOf(instance), memberName) || Object.getOwnPropertyDescriptor(instance, memberName);
26
+ if (ogDescriptor) {
27
+ Object.defineProperty(instance, memberName, {
28
+ get() {
29
+ return ogDescriptor.get.call(this);
30
+ },
31
+ set(newValue) {
32
+ ogDescriptor.set.call(this, newValue);
33
+ },
34
+ configurable: true,
35
+ enumerable: true
36
+ });
37
+ }
36
38
  instance[memberName] = hostRef.$instanceValues$.has(memberName) ? hostRef.$instanceValues$.get(memberName) : ogValue;
37
39
  }
38
40
  });
39
41
  };
42
+ function getPropertyDescriptor(obj, memberName) {
43
+ while (obj) {
44
+ const desc = Object.getOwnPropertyDescriptor(obj, memberName);
45
+ if (desc == null ? void 0 : desc.get) return desc;
46
+ obj = Object.getPrototypeOf(obj);
47
+ }
48
+ return void 0;
49
+ }
40
50
 
41
51
  // src/client/client-host-ref.ts
42
52
  var getHostRef = (ref) => {
@@ -46,6 +56,7 @@ var getHostRef = (ref) => {
46
56
  return void 0;
47
57
  };
48
58
  var registerInstance = (lazyInstance, hostRef) => {
59
+ if (!hostRef) return;
49
60
  lazyInstance.__stencil__getHostRef = () => hostRef;
50
61
  hostRef.$lazyInstance$ = lazyInstance;
51
62
  {
@@ -57,13 +68,17 @@ var registerHost = (hostElement, cmpMeta) => {
57
68
  $flags$: 0,
58
69
  $hostElement$: hostElement,
59
70
  $cmpMeta$: cmpMeta,
60
- $instanceValues$: /* @__PURE__ */ new Map()
71
+ $instanceValues$: /* @__PURE__ */ new Map(),
72
+ $serializerValues$: /* @__PURE__ */ new Map()
61
73
  };
62
74
  {
63
75
  hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
64
76
  hostElement["s-p"] = [];
65
77
  hostElement["s-rc"] = [];
66
78
  }
79
+ {
80
+ hostRef.$fetchedCbList$ = [];
81
+ }
67
82
  const ref = hostRef;
68
83
  hostElement.__stencil__getHostRef = () => ref;
69
84
  return ref;
@@ -105,7 +120,6 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
105
120
 
106
121
  // src/client/client-style.ts
107
122
  var styles = /* @__PURE__ */ new Map();
108
- var HYDRATED_STYLE_ID = "sty-id";
109
123
  var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
110
124
  var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
111
125
  var win = typeof window !== "undefined" ? window : {};
@@ -127,6 +141,7 @@ var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
127
141
  }
128
142
  return false;
129
143
  })() ;
144
+ var supportsMutableAdoptedStyleSheets = supportsConstructableStylesheets ? /* @__PURE__ */ (() => !!win.document && Object.getOwnPropertyDescriptor(win.document.adoptedStyleSheets, "length").writable)() : false;
130
145
  var queuePending = false;
131
146
  var queueDomReads = [];
132
147
  var queueDomWrites = [];
@@ -173,6 +188,11 @@ function queryNonceMetaTagContent(doc) {
173
188
  return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
174
189
  }
175
190
 
191
+ // src/utils/regular-expression.ts
192
+ var escapeRegExpSpecialCharacters = (text) => {
193
+ return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
194
+ };
195
+
176
196
  // src/utils/result.ts
177
197
  var result_exports = {};
178
198
  __export(result_exports, {
@@ -221,6 +241,26 @@ var unwrapErr = (result) => {
221
241
  throw result.value;
222
242
  }
223
243
  };
244
+
245
+ // src/utils/style.ts
246
+ function createStyleSheetIfNeededAndSupported(styles2) {
247
+ return void 0;
248
+ }
249
+
250
+ // src/utils/shadow-root.ts
251
+ var globalStyleSheet;
252
+ function createShadowRoot(cmpMeta) {
253
+ var _a;
254
+ const shadowRoot = this.attachShadow({ mode: "open" });
255
+ if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
256
+ if (globalStyleSheet) {
257
+ if (supportsMutableAdoptedStyleSheets) {
258
+ shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
259
+ } else {
260
+ shadowRoot.adoptedStyleSheets = [...shadowRoot.adoptedStyleSheets, globalStyleSheet];
261
+ }
262
+ }
263
+ }
224
264
  var createTime = (fnName, tagName = "") => {
225
265
  {
226
266
  return () => {
@@ -235,100 +275,6 @@ var uniqueTime = (key, measureText) => {
235
275
  };
236
276
  }
237
277
  };
238
- var h = (nodeName, vnodeData, ...children) => {
239
- let child = null;
240
- let key = null;
241
- let simple = false;
242
- let lastSimple = false;
243
- const vNodeChildren = [];
244
- const walk = (c) => {
245
- for (let i2 = 0; i2 < c.length; i2++) {
246
- child = c[i2];
247
- if (Array.isArray(child)) {
248
- walk(child);
249
- } else if (child != null && typeof child !== "boolean") {
250
- if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
251
- child = String(child);
252
- }
253
- if (simple && lastSimple) {
254
- vNodeChildren[vNodeChildren.length - 1].$text$ += child;
255
- } else {
256
- vNodeChildren.push(simple ? newVNode(null, child) : child);
257
- }
258
- lastSimple = simple;
259
- }
260
- }
261
- };
262
- walk(children);
263
- if (vnodeData) {
264
- if (vnodeData.key) {
265
- key = vnodeData.key;
266
- }
267
- {
268
- const classData = vnodeData.className || vnodeData.class;
269
- if (classData) {
270
- vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
271
- }
272
- }
273
- }
274
- const vnode = newVNode(nodeName, null);
275
- vnode.$attrs$ = vnodeData;
276
- if (vNodeChildren.length > 0) {
277
- vnode.$children$ = vNodeChildren;
278
- }
279
- {
280
- vnode.$key$ = key;
281
- }
282
- return vnode;
283
- };
284
- var newVNode = (tag, text) => {
285
- const vnode = {
286
- $flags$: 0,
287
- $tag$: tag,
288
- $text$: text,
289
- $elm$: null,
290
- $children$: null
291
- };
292
- {
293
- vnode.$attrs$ = null;
294
- }
295
- {
296
- vnode.$key$ = null;
297
- }
298
- return vnode;
299
- };
300
- var Host = {};
301
- var isHost = (node) => node && node.$tag$ === Host;
302
- var parsePropertyValue = (propValue, propType) => {
303
- if (propValue != null && !isComplexType(propValue)) {
304
- if (propType & 1 /* String */) {
305
- return String(propValue);
306
- }
307
- return propValue;
308
- }
309
- return propValue;
310
- };
311
- var getElement = (ref) => getHostRef(ref).$hostElement$ ;
312
-
313
- // src/runtime/event-emitter.ts
314
- var createEvent = (ref, name, flags) => {
315
- const elm = getElement(ref);
316
- return {
317
- emit: (detail) => {
318
- return emitEvent(elm, name, {
319
- bubbles: true,
320
- composed: true,
321
- cancelable: true,
322
- detail
323
- });
324
- }
325
- };
326
- };
327
- var emitEvent = (elm, name, opts) => {
328
- const ev = plt.ce(name, opts);
329
- elm.dispatchEvent(ev);
330
- return ev;
331
- };
332
278
  var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
333
279
  var registerStyle = (scopeId2, cssText, allowCS) => {
334
280
  let style = styles.get(scopeId2);
@@ -362,7 +308,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
362
308
  }
363
309
  if (!appliedStyles.has(scopeId2)) {
364
310
  {
365
- styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || win.document.createElement("style");
311
+ styleElm = win.document.createElement("style");
366
312
  styleElm.innerHTML = style;
367
313
  const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
368
314
  if (nonce != null) {
@@ -380,7 +326,11 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
380
326
  if (supportsConstructableStylesheets) {
381
327
  const stylesheet = new CSSStyleSheet();
382
328
  stylesheet.replaceSync(style);
383
- styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
329
+ if (supportsMutableAdoptedStyleSheets) {
330
+ styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
331
+ } else {
332
+ styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
333
+ }
384
334
  } else {
385
335
  const existingStyleContainer = styleContainerNode.querySelector("style");
386
336
  if (existingStyleContainer) {
@@ -405,7 +355,11 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
405
355
  }
406
356
  }
407
357
  } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {
408
- styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
358
+ if (supportsMutableAdoptedStyleSheets) {
359
+ styleContainerNode.adoptedStyleSheets.push(style);
360
+ } else {
361
+ styleContainerNode.adoptedStyleSheets = [...styleContainerNode.adoptedStyleSheets, style];
362
+ }
409
363
  }
410
364
  }
411
365
  return scopeId2;
@@ -425,6 +379,115 @@ var attachStyles = (hostRef) => {
425
379
  endAttachStyles();
426
380
  };
427
381
  var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
382
+ var h = (nodeName, vnodeData, ...children) => {
383
+ let child = null;
384
+ let key = null;
385
+ let simple = false;
386
+ let lastSimple = false;
387
+ const vNodeChildren = [];
388
+ const walk = (c) => {
389
+ for (let i2 = 0; i2 < c.length; i2++) {
390
+ child = c[i2];
391
+ if (Array.isArray(child)) {
392
+ walk(child);
393
+ } else if (child != null && typeof child !== "boolean") {
394
+ if (simple = typeof nodeName !== "function" && !isComplexType(child)) {
395
+ child = String(child);
396
+ }
397
+ if (simple && lastSimple) {
398
+ vNodeChildren[vNodeChildren.length - 1].$text$ += child;
399
+ } else {
400
+ vNodeChildren.push(simple ? newVNode(null, child) : child);
401
+ }
402
+ lastSimple = simple;
403
+ }
404
+ }
405
+ };
406
+ walk(children);
407
+ if (vnodeData) {
408
+ if (vnodeData.key) {
409
+ key = vnodeData.key;
410
+ }
411
+ {
412
+ const classData = vnodeData.className || vnodeData.class;
413
+ if (classData) {
414
+ vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
415
+ }
416
+ }
417
+ }
418
+ const vnode = newVNode(nodeName, null);
419
+ vnode.$attrs$ = vnodeData;
420
+ if (vNodeChildren.length > 0) {
421
+ vnode.$children$ = vNodeChildren;
422
+ }
423
+ {
424
+ vnode.$key$ = key;
425
+ }
426
+ return vnode;
427
+ };
428
+ var newVNode = (tag, text) => {
429
+ const vnode = {
430
+ $flags$: 0,
431
+ $tag$: tag,
432
+ $text$: text,
433
+ $elm$: null,
434
+ $children$: null
435
+ };
436
+ {
437
+ vnode.$attrs$ = null;
438
+ }
439
+ {
440
+ vnode.$key$ = null;
441
+ }
442
+ return vnode;
443
+ };
444
+ var Host = {};
445
+ var isHost = (node) => node && node.$tag$ === Host;
446
+ var createSupportsRuleRe = (selector) => {
447
+ const safeSelector2 = escapeRegExpSpecialCharacters(selector);
448
+ return new RegExp(
449
+ // First capture group: match any context before the selector that's not inside @supports selector()
450
+ // Using negative lookahead to avoid matching inside @supports selector(...) condition
451
+ `(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`,
452
+ "g"
453
+ );
454
+ };
455
+ createSupportsRuleRe("::slotted");
456
+ createSupportsRuleRe(":host");
457
+ createSupportsRuleRe(":host-context");
458
+ var parsePropertyValue = (propValue, propType, isFormAssociated) => {
459
+ if (propValue != null && !isComplexType(propValue)) {
460
+ if (propType & 1 /* String */) {
461
+ return String(propValue);
462
+ }
463
+ return propValue;
464
+ }
465
+ return propValue;
466
+ };
467
+ var getElement = (ref) => {
468
+ var _a;
469
+ return (_a = getHostRef(ref)) == null ? void 0 : _a.$hostElement$ ;
470
+ };
471
+
472
+ // src/runtime/event-emitter.ts
473
+ var createEvent = (ref, name, flags) => {
474
+ const elm = getElement(ref);
475
+ return {
476
+ emit: (detail) => {
477
+ return emitEvent(elm, name, {
478
+ bubbles: true,
479
+ composed: true,
480
+ cancelable: true,
481
+ detail
482
+ });
483
+ }
484
+ };
485
+ };
486
+ var emitEvent = (elm, name, opts) => {
487
+ const ev = plt.ce(name, opts);
488
+ elm.dispatchEvent(ev);
489
+ return ev;
490
+ };
428
491
  var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
429
492
  if (oldValue === newValue) {
430
493
  return;
@@ -758,7 +821,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
758
821
  !isInitialRender && BUILD.updatable && oldChildren !== null
759
822
  ) {
760
823
  removeVnodes(oldChildren, 0, oldChildren.length - 1);
761
- }
824
+ } else ;
762
825
  if (isSvgMode && tag === "svg") {
763
826
  isSvgMode = false;
764
827
  }
@@ -814,6 +877,12 @@ var scheduleUpdate = (hostRef, isInitialLoad) => {
814
877
  }
815
878
  attachToAncestor(hostRef, hostRef.$ancestorComponent$);
816
879
  const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
880
+ if (isInitialLoad) {
881
+ queueMicrotask(() => {
882
+ dispatch();
883
+ });
884
+ return;
885
+ }
817
886
  return writeTask(dispatch) ;
818
887
  };
819
888
  var dispatchHooks = (hostRef, isInitialLoad) => {
@@ -827,6 +896,11 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
827
896
  }
828
897
  let maybePromise;
829
898
  if (isInitialLoad) {
899
+ {
900
+ if (hostRef.$fetchedCbList$.length) {
901
+ hostRef.$fetchedCbList$.forEach((cb) => cb(elm));
902
+ }
903
+ }
830
904
  maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
831
905
  } else {
832
906
  maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
@@ -948,6 +1022,9 @@ var addHydratedFlag = (elm) => {
948
1022
  var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
949
1023
  var setValue = (ref, propName, newVal, cmpMeta) => {
950
1024
  const hostRef = getHostRef(ref);
1025
+ if (!hostRef) {
1026
+ return;
1027
+ }
951
1028
  if (!hostRef) {
952
1029
  throw new Error(
953
1030
  `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
@@ -957,7 +1034,9 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
957
1034
  const oldVal = hostRef.$instanceValues$.get(propName);
958
1035
  const flags = hostRef.$flags$;
959
1036
  const instance = hostRef.$lazyInstance$ ;
960
- newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
1037
+ newVal = parsePropertyValue(
1038
+ newVal,
1039
+ cmpMeta.$members$[propName][0]);
961
1040
  const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);
962
1041
  const didValueChange = newVal !== oldVal && !areBothNaN;
963
1042
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
@@ -991,9 +1070,17 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
991
1070
  var proxyComponent = (Cstr, cmpMeta, flags) => {
992
1071
  var _a, _b;
993
1072
  const prototype = Cstr.prototype;
994
- if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
995
- if (Cstr.watchers && !cmpMeta.$watchers$) {
996
- cmpMeta.$watchers$ = Cstr.watchers;
1073
+ if (cmpMeta.$members$ || BUILD.propChangeCallback) {
1074
+ {
1075
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
1076
+ cmpMeta.$watchers$ = Cstr.watchers;
1077
+ }
1078
+ if (Cstr.deserializers && !cmpMeta.$deserializers$) {
1079
+ cmpMeta.$deserializers$ = Cstr.deserializers;
1080
+ }
1081
+ if (Cstr.serializers && !cmpMeta.$serializers$) {
1082
+ cmpMeta.$serializers$ = Cstr.serializers;
1083
+ }
997
1084
  }
998
1085
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
999
1086
  members.map(([memberName, [memberFlags]]) => {
@@ -1021,14 +1108,19 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1021
1108
  Object.defineProperty(prototype, memberName, {
1022
1109
  set(newValue) {
1023
1110
  const ref = getHostRef(this);
1111
+ if (!ref) {
1112
+ return;
1113
+ }
1024
1114
  if (origSetter) {
1025
1115
  const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1026
1116
  if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
1027
1117
  newValue = ref.$instanceValues$.get(memberName);
1028
- } else if (!ref.$instanceValues$.get(memberName) && currentValue) {
1029
- ref.$instanceValues$.set(memberName, currentValue);
1030
1118
  }
1031
- origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
1119
+ origSetter.apply(this, [
1120
+ parsePropertyValue(
1121
+ newValue,
1122
+ memberFlags)
1123
+ ]);
1032
1124
  newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
1033
1125
  setValue(this, memberName, newValue, cmpMeta);
1034
1126
  return;
@@ -1037,7 +1129,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1037
1129
  if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
1038
1130
  setValue(this, memberName, newValue, cmpMeta);
1039
1131
  if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
1040
- ref.$onReadyPromise$.then(() => {
1132
+ ref.$fetchedCbList$.push(() => {
1041
1133
  if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
1042
1134
  ref.$lazyInstance$[memberName] = newValue;
1043
1135
  }
@@ -1050,13 +1142,17 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1050
1142
  if (!ref.$instanceValues$.get(memberName) && currentValue) {
1051
1143
  ref.$instanceValues$.set(memberName, currentValue);
1052
1144
  }
1053
- ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
1145
+ ref.$lazyInstance$[memberName] = parsePropertyValue(
1146
+ newValue,
1147
+ memberFlags);
1054
1148
  setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
1055
1149
  };
1056
1150
  if (ref.$lazyInstance$) {
1057
1151
  setterSetVal();
1058
1152
  } else {
1059
- ref.$onReadyPromise$.then(() => setterSetVal());
1153
+ ref.$fetchedCbList$.push(() => {
1154
+ setterSetVal();
1155
+ });
1060
1156
  }
1061
1157
  }
1062
1158
  }
@@ -1069,16 +1165,17 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1069
1165
  plt.jmp(() => {
1070
1166
  var _a2;
1071
1167
  const propName = attrNameToPropName.get(attrName);
1168
+ const hostRef = getHostRef(this);
1072
1169
  if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
1073
1170
  newValue = this[propName];
1074
1171
  delete this[propName];
1075
- } else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1172
+ }
1173
+ if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
1076
1174
  this[propName] == newValue) {
1077
1175
  return;
1078
1176
  } else if (propName == null) {
1079
- const hostRef = getHostRef(this);
1080
1177
  const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
1081
- if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
1178
+ if (hostRef && flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {
1082
1179
  const instance = hostRef.$lazyInstance$ ;
1083
1180
  const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];
1084
1181
  entry == null ? void 0 : entry.forEach((callbackName) => {
@@ -1089,9 +1186,12 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1089
1186
  }
1090
1187
  return;
1091
1188
  }
1189
+ const propFlags = members.find(([m]) => m === propName);
1190
+ if (propFlags && propFlags[1][0] & 4 /* Boolean */) {
1191
+ newValue = newValue === null || newValue === "false" ? false : true;
1192
+ }
1092
1193
  const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
1093
- newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
1094
- if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
1194
+ if (newValue != this[propName] && (!propDesc.get || !!propDesc.set)) {
1095
1195
  this[propName] = newValue;
1096
1196
  }
1097
1197
  });
@@ -1099,7 +1199,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
1099
1199
  Cstr.observedAttributes = Array.from(
1100
1200
  /* @__PURE__ */ new Set([
1101
1201
  ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),
1102
- ...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {
1202
+ ...members.filter(([_, m]) => m[0] & 31 /* HasAttribute */).map(([propName, m]) => {
1103
1203
  const attrName = m[1] || propName;
1104
1204
  attrNameToPropName.set(attrName, propName);
1105
1205
  return attrName;
@@ -1132,6 +1232,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1132
1232
  if (!Cstr.isProxied) {
1133
1233
  {
1134
1234
  cmpMeta.$watchers$ = Cstr.watchers;
1235
+ cmpMeta.$serializers$ = Cstr.serializers;
1236
+ cmpMeta.$deserializers$ = Cstr.deserializers;
1135
1237
  }
1136
1238
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1137
1239
  Cstr.isProxied = true;
@@ -1189,6 +1291,9 @@ var fireConnectedCallback = (instance, elm) => {
1189
1291
  var connectedCallback = (elm) => {
1190
1292
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1191
1293
  const hostRef = getHostRef(elm);
1294
+ if (!hostRef) {
1295
+ return;
1296
+ }
1192
1297
  const cmpMeta = hostRef.$cmpMeta$;
1193
1298
  const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
1194
1299
  if (!(hostRef.$flags$ & 1 /* hasConnected */)) {
@@ -1204,7 +1309,7 @@ var connectedCallback = (elm) => {
1204
1309
  }
1205
1310
  if (cmpMeta.$members$) {
1206
1311
  Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
1207
- if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {
1312
+ if (memberFlags & 31 /* Prop */ && memberName in elm && elm[memberName] !== Object.prototype[memberName]) {
1208
1313
  const value = elm[memberName];
1209
1314
  delete elm[memberName];
1210
1315
  elm[memberName] = value;
@@ -1268,7 +1373,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1268
1373
  let hasSlotRelocation = false;
1269
1374
  lazyBundles.map((lazyBundle) => {
1270
1375
  lazyBundle[1].map((compactMeta) => {
1271
- var _a2;
1376
+ var _a2, _b, _c;
1272
1377
  const cmpMeta = {
1273
1378
  $flags$: compactMeta[0],
1274
1379
  $tagName$: compactMeta[1],
@@ -1283,6 +1388,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1283
1388
  }
1284
1389
  {
1285
1390
  cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1391
+ cmpMeta.$serializers$ = (_b = compactMeta[5]) != null ? _b : {};
1392
+ cmpMeta.$deserializers$ = (_c = compactMeta[6]) != null ? _c : {};
1286
1393
  }
1287
1394
  const tagName = cmpMeta.$tagName$;
1288
1395
  const HostElement = class extends HTMLElement {
@@ -1295,9 +1402,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1295
1402
  if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
1296
1403
  {
1297
1404
  if (!self.shadowRoot) {
1298
- {
1299
- self.attachShadow({ mode: "open" });
1300
- }
1405
+ createShadowRoot.call(self, cmpMeta);
1301
1406
  } else {
1302
1407
  if (self.shadowRoot.mode !== "open") {
1303
1408
  throw new Error(
@@ -1309,7 +1414,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1309
1414
  }
1310
1415
  }
1311
1416
  connectedCallback() {
1312
- getHostRef(this);
1417
+ const hostRef = getHostRef(this);
1418
+ if (!hostRef) {
1419
+ return;
1420
+ }
1313
1421
  if (!this.hasRegisteredEventListeners) {
1314
1422
  this.hasRegisteredEventListeners = true;
1315
1423
  }
@@ -1328,6 +1436,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1328
1436
  plt.raf(() => {
1329
1437
  var _a3;
1330
1438
  const hostRef = getHostRef(this);
1439
+ if (!hostRef) {
1440
+ return;
1441
+ }
1331
1442
  const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
1332
1443
  if (i2 > -1) {
1333
1444
  deferredConnectedCallbacks.splice(i2, 1);
@@ -1338,7 +1449,8 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1338
1449
  });
1339
1450
  }
1340
1451
  componentOnReady() {
1341
- return getHostRef(this).$onReadyPromise$;
1452
+ var _a3;
1453
+ return (_a3 = getHostRef(this)) == null ? void 0 : _a3.$onReadyPromise$;
1342
1454
  }
1343
1455
  };
1344
1456
  cmpMeta.$lazyBundleId$ = lazyBundle[0];
@@ -1382,6 +1494,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1382
1494
  var setNonce = (nonce) => plt.$nonce$ = nonce;
1383
1495
 
1384
1496
  export { Host as H, bootstrapLazy as b, createEvent as c, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
1385
- //# sourceMappingURL=index-Ko8ax98F.js.map
1497
+ //# sourceMappingURL=index-D1G58aKM.js.map
1386
1498
 
1387
- //# sourceMappingURL=index-Ko8ax98F.js.map
1499
+ //# sourceMappingURL=index-D1G58aKM.js.map