@everymatrix/player-elevate-points-history 1.55.0 → 1.56.0
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/bonus-pagination-limits_6.cjs.entry.js +282 -167
- package/dist/cjs/{index-d10609c2.js → index-c3f0d8ea.js} +247 -139
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{player-elevate-card-items-198085c9.js → player-elevate-card-items-8b7d73d2.js} +1 -1
- package/dist/cjs/player-elevate-card.cjs.entry.js +21 -9
- package/dist/cjs/player-elevate-loyaltycard.cjs.entry.js +22 -10
- package/dist/cjs/player-elevate-points-history.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/player-elevate-points-history/player-elevate-points-history.js +43 -5
- package/dist/esm/bonus-pagination-limits_6.entry.js +282 -167
- package/dist/esm/{index-7f3411b7.js → index-8008f845.js} +247 -139
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{player-elevate-card-items-3780b49a.js → player-elevate-card-items-81ace8b1.js} +1 -1
- package/dist/esm/player-elevate-card.entry.js +21 -9
- package/dist/esm/player-elevate-loyaltycard.entry.js +22 -10
- package/dist/esm/player-elevate-points-history.js +4 -4
- package/dist/player-elevate-points-history/{p-a203a531.js → p-1c49c46d.js} +1 -1
- package/dist/player-elevate-points-history/p-3d707cb1.entry.js +1 -0
- package/dist/player-elevate-points-history/p-530d5612.js +2 -0
- package/dist/player-elevate-points-history/p-78e6bcdb.entry.js +1 -0
- package/dist/player-elevate-points-history/p-d7b1a6d5.entry.js +1 -0
- package/dist/player-elevate-points-history/player-elevate-points-history.esm.js +1 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/player-elevate-points-history/p-2d5f1bbe.entry.js +0 -1
- package/dist/player-elevate-points-history/p-702726b0.js +0 -2
- package/dist/player-elevate-points-history/p-75618658.entry.js +0 -1
- package/dist/player-elevate-points-history/p-b5dd7d1b.entry.js +0 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -21,19 +21,23 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'player-elevate-points-history';
|
|
24
|
-
const BUILD = /* player-elevate-points-history */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, 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: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
24
|
+
const BUILD = /* player-elevate-points-history */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, 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: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.26.0 | 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/client/client-host-ref.ts
|
|
34
36
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
35
37
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
36
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
38
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
39
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
40
|
+
};
|
|
37
41
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
42
|
const hostRef = {
|
|
39
43
|
$flags$: 0,
|
|
@@ -46,7 +50,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
50
|
hostElement["s-p"] = [];
|
|
47
51
|
hostElement["s-rc"] = [];
|
|
48
52
|
}
|
|
49
|
-
|
|
53
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
54
|
+
return ref;
|
|
50
55
|
};
|
|
51
56
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
57
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -91,16 +96,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
91
96
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
92
97
|
/* webpackMode: "lazy" */
|
|
93
98
|
`./${bundleId}.entry.js${""}`
|
|
94
|
-
)); }).then(
|
|
95
|
-
{
|
|
96
|
-
|
|
99
|
+
)); }).then(
|
|
100
|
+
(importedModule) => {
|
|
101
|
+
{
|
|
102
|
+
cmpModules.set(bundleId, importedModule);
|
|
103
|
+
}
|
|
104
|
+
return importedModule[exportName];
|
|
105
|
+
},
|
|
106
|
+
(e) => {
|
|
107
|
+
consoleError(e, hostRef.$hostElement$);
|
|
97
108
|
}
|
|
98
|
-
|
|
99
|
-
}, consoleError);
|
|
109
|
+
);
|
|
100
110
|
};
|
|
101
111
|
|
|
102
112
|
// src/client/client-style.ts
|
|
103
113
|
var styles = /* @__PURE__ */ new Map();
|
|
114
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
104
115
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
105
116
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
106
117
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -180,12 +191,6 @@ var getAssetPath = (path) => {
|
|
|
180
191
|
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
181
192
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
182
193
|
};
|
|
183
|
-
|
|
184
|
-
// src/utils/constants.ts
|
|
185
|
-
var EMPTY_OBJ = {};
|
|
186
|
-
|
|
187
|
-
// src/utils/helpers.ts
|
|
188
|
-
var isDef = (v) => v != null;
|
|
189
194
|
var isComplexType = (o) => {
|
|
190
195
|
o = typeof o;
|
|
191
196
|
return o === "object" || o === "function";
|
|
@@ -245,6 +250,63 @@ var unwrapErr = (result) => {
|
|
|
245
250
|
throw result.value;
|
|
246
251
|
}
|
|
247
252
|
};
|
|
253
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
254
|
+
const childNodes = elm.__childNodes || elm.childNodes;
|
|
255
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
256
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
257
|
+
var _a;
|
|
258
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
259
|
+
if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
|
|
260
|
+
slotNode.hidden = true;
|
|
261
|
+
} else {
|
|
262
|
+
slotNode.hidden = false;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
for (const childNode of childNodes) {
|
|
268
|
+
if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
|
|
269
|
+
updateFallbackSlotVisibility(childNode);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
274
|
+
let i2 = 0;
|
|
275
|
+
let slottedNodes = [];
|
|
276
|
+
let childNode;
|
|
277
|
+
for (; i2 < childNodes.length; i2++) {
|
|
278
|
+
childNode = childNodes[i2];
|
|
279
|
+
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
|
280
|
+
slottedNodes.push(childNode);
|
|
281
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
282
|
+
}
|
|
283
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
284
|
+
}
|
|
285
|
+
return slottedNodes;
|
|
286
|
+
}
|
|
287
|
+
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
|
288
|
+
const childNodes = [];
|
|
289
|
+
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
|
290
|
+
while ((node = node.nextSibling) && node["s-sn"] === slotName) {
|
|
291
|
+
childNodes.push(node);
|
|
292
|
+
}
|
|
293
|
+
return childNodes;
|
|
294
|
+
};
|
|
295
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
296
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
297
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
298
|
+
return true;
|
|
299
|
+
}
|
|
300
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
301
|
+
return true;
|
|
302
|
+
}
|
|
303
|
+
return false;
|
|
304
|
+
}
|
|
305
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
306
|
+
return true;
|
|
307
|
+
}
|
|
308
|
+
return slotName === "";
|
|
309
|
+
};
|
|
248
310
|
var createTime = (fnName, tagName = "") => {
|
|
249
311
|
{
|
|
250
312
|
return () => {
|
|
@@ -436,7 +498,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
436
498
|
}
|
|
437
499
|
if (!appliedStyles.has(scopeId2)) {
|
|
438
500
|
{
|
|
439
|
-
styleElm = doc.createElement("style");
|
|
501
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
440
502
|
styleElm.innerHTML = style;
|
|
441
503
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
442
504
|
if (nonce != null) {
|
|
@@ -446,7 +508,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
446
508
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
447
509
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
448
510
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
449
|
-
styleContainerNode.insertBefore(
|
|
511
|
+
styleContainerNode.insertBefore(
|
|
512
|
+
styleElm,
|
|
513
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
514
|
+
);
|
|
450
515
|
} else if ("host" in styleContainerNode) {
|
|
451
516
|
if (supportsConstructableStylesheets) {
|
|
452
517
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -464,7 +529,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
464
529
|
styleContainerNode.append(styleElm);
|
|
465
530
|
}
|
|
466
531
|
}
|
|
467
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
532
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
468
533
|
styleContainerNode.insertBefore(styleElm, null);
|
|
469
534
|
}
|
|
470
535
|
}
|
|
@@ -489,23 +554,25 @@ var attachStyles = (hostRef) => {
|
|
|
489
554
|
const scopeId2 = addStyle(
|
|
490
555
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
491
556
|
cmpMeta);
|
|
492
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
557
|
+
if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
|
|
493
558
|
elm["s-sc"] = scopeId2;
|
|
494
559
|
elm.classList.add(scopeId2 + "-h");
|
|
495
560
|
}
|
|
496
561
|
endAttachStyles();
|
|
497
562
|
};
|
|
498
563
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
499
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
564
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
500
565
|
if (oldValue !== newValue) {
|
|
501
566
|
let isProp = isMemberInElement(elm, memberName);
|
|
502
567
|
let ln = memberName.toLowerCase();
|
|
503
568
|
if (memberName === "class") {
|
|
504
569
|
const classList = elm.classList;
|
|
505
570
|
const oldClasses = parseClassList(oldValue);
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
571
|
+
let newClasses = parseClassList(newValue);
|
|
572
|
+
{
|
|
573
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
574
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
575
|
+
}
|
|
509
576
|
} else if (memberName === "style") {
|
|
510
577
|
{
|
|
511
578
|
for (const prop in oldValue) {
|
|
@@ -560,7 +627,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
560
627
|
elm.setAttribute(memberName, n);
|
|
561
628
|
}
|
|
562
629
|
}
|
|
563
|
-
} else {
|
|
630
|
+
} else if (elm[memberName] !== newValue) {
|
|
564
631
|
elm[memberName] = newValue;
|
|
565
632
|
}
|
|
566
633
|
} catch (e) {
|
|
@@ -582,24 +649,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
582
649
|
}
|
|
583
650
|
};
|
|
584
651
|
var parseClassListRegex = /\s/;
|
|
585
|
-
var parseClassList = (value) =>
|
|
652
|
+
var parseClassList = (value) => {
|
|
653
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
654
|
+
value = value.baseVal;
|
|
655
|
+
}
|
|
656
|
+
if (!value || typeof value !== "string") {
|
|
657
|
+
return [];
|
|
658
|
+
}
|
|
659
|
+
return value.split(parseClassListRegex);
|
|
660
|
+
};
|
|
586
661
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
587
662
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
588
663
|
|
|
589
664
|
// src/runtime/vdom/update-element.ts
|
|
590
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
665
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
591
666
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
592
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
593
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
667
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
668
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
594
669
|
{
|
|
595
670
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
596
671
|
if (!(memberName in newVnodeAttrs)) {
|
|
597
|
-
setAccessor(
|
|
672
|
+
setAccessor(
|
|
673
|
+
elm,
|
|
674
|
+
memberName,
|
|
675
|
+
oldVnodeAttrs[memberName],
|
|
676
|
+
void 0,
|
|
677
|
+
isSvgMode2,
|
|
678
|
+
newVnode.$flags$);
|
|
598
679
|
}
|
|
599
680
|
}
|
|
600
681
|
}
|
|
601
682
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
602
|
-
setAccessor(
|
|
683
|
+
setAccessor(
|
|
684
|
+
elm,
|
|
685
|
+
memberName,
|
|
686
|
+
oldVnodeAttrs[memberName],
|
|
687
|
+
newVnodeAttrs[memberName],
|
|
688
|
+
isSvgMode2,
|
|
689
|
+
newVnode.$flags$);
|
|
603
690
|
}
|
|
604
691
|
};
|
|
605
692
|
function sortedAttrNames(attrNames) {
|
|
@@ -611,16 +698,13 @@ function sortedAttrNames(attrNames) {
|
|
|
611
698
|
attrNames
|
|
612
699
|
);
|
|
613
700
|
}
|
|
614
|
-
|
|
615
|
-
// src/runtime/vdom/vdom-render.ts
|
|
616
|
-
var scopeId;
|
|
617
701
|
var contentRef;
|
|
618
702
|
var hostTagName;
|
|
619
703
|
var useNativeShadowDom = false;
|
|
620
704
|
var checkSlotFallbackVisibility = false;
|
|
621
705
|
var checkSlotRelocate = false;
|
|
622
706
|
var isSvgMode = false;
|
|
623
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
707
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
624
708
|
var _a;
|
|
625
709
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
626
710
|
let i2 = 0;
|
|
@@ -630,9 +714,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
630
714
|
if (!useNativeShadowDom) {
|
|
631
715
|
checkSlotRelocate = true;
|
|
632
716
|
if (newVNode2.$tag$ === "slot") {
|
|
633
|
-
if (scopeId) {
|
|
634
|
-
parentElm.classList.add(scopeId + "-s");
|
|
635
|
-
}
|
|
636
717
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
637
718
|
// slot element has fallback content
|
|
638
719
|
// still create an element that "mocks" the slot element
|
|
@@ -656,14 +737,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
656
737
|
{
|
|
657
738
|
updateElement(null, newVNode2, isSvgMode);
|
|
658
739
|
}
|
|
659
|
-
const rootNode = elm.getRootNode();
|
|
660
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
661
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
662
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
663
|
-
}
|
|
664
740
|
if (newVNode2.$children$) {
|
|
665
741
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
666
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
742
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
667
743
|
if (childNode) {
|
|
668
744
|
elm.appendChild(childNode);
|
|
669
745
|
}
|
|
@@ -689,7 +765,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
689
765
|
};
|
|
690
766
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
691
767
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
692
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
768
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
693
769
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
694
770
|
let node = parentElm;
|
|
695
771
|
while (node = node.nextSibling) {
|
|
@@ -701,7 +777,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
701
777
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
702
778
|
const childNode = oldSlotChildNodes[i2];
|
|
703
779
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
704
|
-
insertBefore(
|
|
780
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
705
781
|
childNode["s-ol"].remove();
|
|
706
782
|
childNode["s-ol"] = void 0;
|
|
707
783
|
childNode["s-sh"] = void 0;
|
|
@@ -721,7 +797,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
721
797
|
}
|
|
722
798
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
723
799
|
if (vnodes[startIdx]) {
|
|
724
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
800
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
725
801
|
if (childNode) {
|
|
726
802
|
vnodes[startIdx].$elm$ = childNode;
|
|
727
803
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -807,7 +883,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
807
883
|
if (idxInOld >= 0) {
|
|
808
884
|
elmToMove = oldCh[idxInOld];
|
|
809
885
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
810
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
886
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
811
887
|
} else {
|
|
812
888
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
813
889
|
oldCh[idxInOld] = void 0;
|
|
@@ -815,12 +891,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
815
891
|
}
|
|
816
892
|
newStartVnode = newCh[++newStartIdx];
|
|
817
893
|
} else {
|
|
818
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
894
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
819
895
|
newStartVnode = newCh[++newStartIdx];
|
|
820
896
|
}
|
|
821
897
|
if (node) {
|
|
822
898
|
{
|
|
823
|
-
insertBefore(
|
|
899
|
+
insertBefore(
|
|
900
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
901
|
+
node,
|
|
902
|
+
referenceNode(oldStartVnode.$elm$)
|
|
903
|
+
);
|
|
824
904
|
}
|
|
825
905
|
}
|
|
826
906
|
}
|
|
@@ -841,28 +921,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
841
921
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
842
922
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
843
923
|
if (leftVNode.$tag$ === "slot") {
|
|
844
|
-
if (
|
|
845
|
-
// The component gets hydrated and no VDOM has been initialized.
|
|
846
|
-
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
847
|
-
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
848
|
-
// hydration comments to be removed
|
|
849
|
-
leftVNode.$elm$.nodeType !== 8
|
|
850
|
-
) {
|
|
851
|
-
return false;
|
|
852
|
-
}
|
|
853
924
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
854
925
|
}
|
|
855
926
|
if (!isInitialRender) {
|
|
856
927
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
857
928
|
}
|
|
929
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
930
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
931
|
+
}
|
|
858
932
|
return true;
|
|
859
933
|
}
|
|
860
934
|
return false;
|
|
861
935
|
};
|
|
862
|
-
var referenceNode = (node) =>
|
|
863
|
-
return node && node["s-ol"] || node;
|
|
864
|
-
};
|
|
865
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
936
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
866
937
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
867
938
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
868
939
|
const oldChildren = oldVNode.$children$;
|
|
@@ -895,41 +966,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
895
966
|
elm.data = text;
|
|
896
967
|
}
|
|
897
968
|
};
|
|
898
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
899
|
-
const childNodes = elm.childNodes;
|
|
900
|
-
for (const childNode of childNodes) {
|
|
901
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
902
|
-
if (childNode["s-sr"]) {
|
|
903
|
-
const slotName = childNode["s-sn"];
|
|
904
|
-
childNode.hidden = false;
|
|
905
|
-
for (const siblingNode of childNodes) {
|
|
906
|
-
if (siblingNode !== childNode) {
|
|
907
|
-
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
908
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
909
|
-
childNode.hidden = true;
|
|
910
|
-
break;
|
|
911
|
-
}
|
|
912
|
-
} else {
|
|
913
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
914
|
-
childNode.hidden = true;
|
|
915
|
-
break;
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
updateFallbackSlotVisibility(childNode);
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
};
|
|
925
969
|
var relocateNodes = [];
|
|
926
970
|
var markSlotContentForRelocation = (elm) => {
|
|
927
971
|
let node;
|
|
928
972
|
let hostContentNodes;
|
|
929
973
|
let j;
|
|
930
|
-
|
|
974
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
975
|
+
for (const childNode of children) {
|
|
931
976
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
932
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
977
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
933
978
|
const slotName = childNode["s-sn"];
|
|
934
979
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
935
980
|
node = hostContentNodes[j];
|
|
@@ -971,24 +1016,10 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
971
1016
|
}
|
|
972
1017
|
}
|
|
973
1018
|
};
|
|
974
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
975
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
976
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
977
|
-
return true;
|
|
978
|
-
}
|
|
979
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
980
|
-
return true;
|
|
981
|
-
}
|
|
982
|
-
return false;
|
|
983
|
-
}
|
|
984
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
985
|
-
return true;
|
|
986
|
-
}
|
|
987
|
-
return slotName === "";
|
|
988
|
-
};
|
|
989
1019
|
var insertBefore = (parent, newNode, reference) => {
|
|
990
|
-
|
|
991
|
-
|
|
1020
|
+
{
|
|
1021
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1022
|
+
}
|
|
992
1023
|
};
|
|
993
1024
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
994
1025
|
var _a, _b, _c, _d;
|
|
@@ -1014,10 +1045,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1014
1045
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1015
1046
|
hostRef.$vnode$ = rootVnode;
|
|
1016
1047
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
1017
|
-
|
|
1018
|
-
scopeId = hostElm["s-sc"];
|
|
1019
|
-
}
|
|
1020
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1048
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
1021
1049
|
{
|
|
1022
1050
|
contentRef = hostElm["s-cr"];
|
|
1023
1051
|
checkSlotFallbackVisibility = false;
|
|
@@ -1045,7 +1073,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1045
1073
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1046
1074
|
while (orgLocationNode) {
|
|
1047
1075
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1048
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1076
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1049
1077
|
refNode = refNode.nextSibling;
|
|
1050
1078
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1051
1079
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1058,13 +1086,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1058
1086
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1059
1087
|
}
|
|
1060
1088
|
}
|
|
1061
|
-
|
|
1089
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1090
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1091
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1062
1092
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1063
1093
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1064
1094
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1065
1095
|
}
|
|
1066
1096
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1067
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1097
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1068
1098
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1069
1099
|
}
|
|
1070
1100
|
}
|
|
@@ -1092,7 +1122,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1092
1122
|
// src/runtime/update-component.ts
|
|
1093
1123
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1094
1124
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1095
|
-
ancestorComponent["s-p"].push(
|
|
1125
|
+
const index = ancestorComponent["s-p"].push(
|
|
1126
|
+
new Promise(
|
|
1127
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1128
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1129
|
+
r();
|
|
1130
|
+
}
|
|
1131
|
+
)
|
|
1132
|
+
);
|
|
1096
1133
|
}
|
|
1097
1134
|
};
|
|
1098
1135
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1121,16 +1158,16 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1121
1158
|
{
|
|
1122
1159
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1123
1160
|
if (hostRef.$queuedListeners$) {
|
|
1124
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1161
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1125
1162
|
hostRef.$queuedListeners$ = void 0;
|
|
1126
1163
|
}
|
|
1127
1164
|
}
|
|
1128
1165
|
{
|
|
1129
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1166
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1130
1167
|
}
|
|
1131
1168
|
}
|
|
1132
1169
|
{
|
|
1133
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
1170
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
1134
1171
|
}
|
|
1135
1172
|
endSchedule();
|
|
1136
1173
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
@@ -1198,7 +1235,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1198
1235
|
const instance = hostRef.$lazyInstance$ ;
|
|
1199
1236
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1200
1237
|
{
|
|
1201
|
-
safeCall(instance, "componentDidRender");
|
|
1238
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1202
1239
|
}
|
|
1203
1240
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1204
1241
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -1227,17 +1264,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1227
1264
|
}
|
|
1228
1265
|
};
|
|
1229
1266
|
var appDidLoad = (who) => {
|
|
1230
|
-
{
|
|
1231
|
-
addHydratedFlag(doc.documentElement);
|
|
1232
|
-
}
|
|
1233
1267
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1234
1268
|
};
|
|
1235
|
-
var safeCall = (instance, method, arg) => {
|
|
1269
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1236
1270
|
if (instance && instance[method]) {
|
|
1237
1271
|
try {
|
|
1238
1272
|
return instance[method](arg);
|
|
1239
1273
|
} catch (e) {
|
|
1240
|
-
consoleError(e);
|
|
1274
|
+
consoleError(e, elm);
|
|
1241
1275
|
}
|
|
1242
1276
|
}
|
|
1243
1277
|
return void 0;
|
|
@@ -1296,15 +1330,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1296
1330
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1297
1331
|
members.map(([memberName, [memberFlags]]) => {
|
|
1298
1332
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1333
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1334
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1335
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1336
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1337
|
+
Object.defineProperty(prototype, memberName, {
|
|
1338
|
+
get() {
|
|
1339
|
+
{
|
|
1340
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1341
|
+
return getValue(this, memberName);
|
|
1342
|
+
}
|
|
1343
|
+
const ref = getHostRef(this);
|
|
1344
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1345
|
+
if (!instance) return;
|
|
1346
|
+
return instance[memberName];
|
|
1347
|
+
}
|
|
1348
|
+
},
|
|
1349
|
+
configurable: true,
|
|
1350
|
+
enumerable: true
|
|
1351
|
+
});
|
|
1352
|
+
}
|
|
1299
1353
|
Object.defineProperty(prototype, memberName, {
|
|
1300
|
-
get() {
|
|
1301
|
-
return getValue(this, memberName);
|
|
1302
|
-
},
|
|
1303
1354
|
set(newValue) {
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1355
|
+
const ref = getHostRef(this);
|
|
1356
|
+
if (origSetter) {
|
|
1357
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1358
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1359
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1360
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1361
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1362
|
+
}
|
|
1363
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1364
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1365
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1366
|
+
return;
|
|
1367
|
+
}
|
|
1368
|
+
{
|
|
1369
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1370
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1371
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1372
|
+
ref.$onReadyPromise$.then(() => {
|
|
1373
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1374
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1375
|
+
}
|
|
1376
|
+
});
|
|
1377
|
+
}
|
|
1378
|
+
return;
|
|
1379
|
+
}
|
|
1380
|
+
const setterSetVal = () => {
|
|
1381
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1382
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1383
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1384
|
+
}
|
|
1385
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1386
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1387
|
+
};
|
|
1388
|
+
if (ref.$lazyInstance$) {
|
|
1389
|
+
setterSetVal();
|
|
1390
|
+
} else {
|
|
1391
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
}
|
|
1308
1395
|
});
|
|
1309
1396
|
}
|
|
1310
1397
|
});
|
|
@@ -1314,7 +1401,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1314
1401
|
plt.jmp(() => {
|
|
1315
1402
|
var _a2;
|
|
1316
1403
|
const propName = attrNameToPropName.get(attrName);
|
|
1317
|
-
if (this.hasOwnProperty(propName)) {
|
|
1404
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1318
1405
|
newValue = this[propName];
|
|
1319
1406
|
delete this[propName];
|
|
1320
1407
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1334,7 +1421,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1334
1421
|
}
|
|
1335
1422
|
return;
|
|
1336
1423
|
}
|
|
1337
|
-
|
|
1424
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1425
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1426
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1427
|
+
this[propName] = newValue;
|
|
1428
|
+
}
|
|
1338
1429
|
});
|
|
1339
1430
|
};
|
|
1340
1431
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1363,7 +1454,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1363
1454
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1364
1455
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1365
1456
|
if (bundleId) {
|
|
1366
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1457
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1367
1458
|
if (CstrImport && "then" in CstrImport) {
|
|
1368
1459
|
const endLoad = uniqueTime();
|
|
1369
1460
|
Cstr = await CstrImport;
|
|
@@ -1388,7 +1479,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1388
1479
|
try {
|
|
1389
1480
|
new Cstr(hostRef);
|
|
1390
1481
|
} catch (e) {
|
|
1391
|
-
consoleError(e);
|
|
1482
|
+
consoleError(e, elm);
|
|
1392
1483
|
}
|
|
1393
1484
|
{
|
|
1394
1485
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1423,7 +1514,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1423
1514
|
schedule();
|
|
1424
1515
|
}
|
|
1425
1516
|
};
|
|
1426
|
-
var fireConnectedCallback = (instance) => {
|
|
1517
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1427
1518
|
};
|
|
1428
1519
|
|
|
1429
1520
|
// src/runtime/connected-callback.ts
|
|
@@ -1477,7 +1568,7 @@ var setContentReference = (elm) => {
|
|
|
1477
1568
|
contentRefElm["s-cn"] = true;
|
|
1478
1569
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1479
1570
|
};
|
|
1480
|
-
var disconnectInstance = (instance) => {
|
|
1571
|
+
var disconnectInstance = (instance, elm) => {
|
|
1481
1572
|
};
|
|
1482
1573
|
var disconnectedCallback = async (elm) => {
|
|
1483
1574
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1492,6 +1583,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1492
1583
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1493
1584
|
}
|
|
1494
1585
|
}
|
|
1586
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1587
|
+
rootAppliedStyles.delete(elm);
|
|
1588
|
+
}
|
|
1589
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1590
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1591
|
+
}
|
|
1495
1592
|
};
|
|
1496
1593
|
|
|
1497
1594
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1576,6 +1673,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1576
1673
|
}
|
|
1577
1674
|
disconnectedCallback() {
|
|
1578
1675
|
plt.jmp(() => disconnectedCallback(this));
|
|
1676
|
+
plt.raf(() => {
|
|
1677
|
+
var _a3;
|
|
1678
|
+
const hostRef = getHostRef(this);
|
|
1679
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1680
|
+
if (i2 > -1) {
|
|
1681
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
1682
|
+
}
|
|
1683
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1684
|
+
delete hostRef.$vnode$.$elm$;
|
|
1685
|
+
}
|
|
1686
|
+
});
|
|
1579
1687
|
}
|
|
1580
1688
|
componentOnReady() {
|
|
1581
1689
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1642,7 +1750,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1642
1750
|
}
|
|
1643
1751
|
}
|
|
1644
1752
|
} catch (e) {
|
|
1645
|
-
consoleError(e);
|
|
1753
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1646
1754
|
}
|
|
1647
1755
|
};
|
|
1648
1756
|
var getHostListenerTarget = (elm, flags) => {
|