@everymatrix/player-elevate-points-history 1.53.0 → 1.53.10
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 +587 -33
- package/dist/cjs/{index-d10609c2.js → index-1f0a05aa.js} +241 -139
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{player-elevate-card-items-f69d5f29.js → player-elevate-card-items-6bfb137f.js} +1 -1
- package/dist/cjs/player-elevate-card.cjs.entry.js +21 -9
- package/dist/cjs/player-elevate-loyaltycard.cjs.entry.js +21 -9
- package/dist/cjs/player-elevate-points-history.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/player-elevate-points-history/player-elevate-points-history.js +44 -6
- package/dist/esm/bonus-pagination-limits_6.entry.js +643 -89
- package/dist/esm/{index-7f3411b7.js → index-0dc7e971.js} +241 -139
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{player-elevate-card-items-0b23f85a.js → player-elevate-card-items-b370b44a.js} +1 -1
- package/dist/esm/player-elevate-card.entry.js +21 -9
- package/dist/esm/player-elevate-loyaltycard.entry.js +21 -9
- package/dist/esm/player-elevate-points-history.js +3 -3
- package/dist/player-elevate-points-history/p-21d9f0ce.js +2 -0
- package/dist/player-elevate-points-history/p-9a629429.entry.js +1 -0
- package/dist/player-elevate-points-history/p-a5c50e2b.entry.js +1 -0
- package/dist/player-elevate-points-history/p-bb33b2db.entry.js +1 -0
- package/dist/player-elevate-points-history/{p-d3990dc6.js → p-f09b6964.js} +1 -1
- 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/dist/types/components/player-elevate-points-history/player-elevate-points-history.d.ts +1 -1
- package/package.json +1 -1
- package/dist/player-elevate-points-history/p-702726b0.js +0 -2
- package/dist/player-elevate-points-history/p-a69c8a36.entry.js +0 -1
- package/dist/player-elevate-points-history/p-dd9c00ae.entry.js +0 -1
- package/dist/player-elevate-points-history/p-fc8ae547.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
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
const NAMESPACE = 'player-elevate-points-history';
|
|
2
|
-
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 };
|
|
2
|
+
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 };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
9
9
|
for (var name in all)
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
|
+
|
|
13
|
+
// src/client/client-host-ref.ts
|
|
12
14
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
13
15
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
14
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
16
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
17
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
18
|
+
};
|
|
15
19
|
var registerHost = (hostElement, cmpMeta) => {
|
|
16
20
|
const hostRef = {
|
|
17
21
|
$flags$: 0,
|
|
@@ -24,7 +28,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
24
28
|
hostElement["s-p"] = [];
|
|
25
29
|
hostElement["s-rc"] = [];
|
|
26
30
|
}
|
|
27
|
-
|
|
31
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
32
|
+
return ref;
|
|
28
33
|
};
|
|
29
34
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
30
35
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -69,16 +74,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
69
74
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
70
75
|
/* webpackMode: "lazy" */
|
|
71
76
|
`./${bundleId}.entry.js${""}`
|
|
72
|
-
).then(
|
|
73
|
-
{
|
|
74
|
-
|
|
77
|
+
).then(
|
|
78
|
+
(importedModule) => {
|
|
79
|
+
{
|
|
80
|
+
cmpModules.set(bundleId, importedModule);
|
|
81
|
+
}
|
|
82
|
+
return importedModule[exportName];
|
|
83
|
+
},
|
|
84
|
+
(e) => {
|
|
85
|
+
consoleError(e, hostRef.$hostElement$);
|
|
75
86
|
}
|
|
76
|
-
|
|
77
|
-
}, consoleError);
|
|
87
|
+
);
|
|
78
88
|
};
|
|
79
89
|
|
|
80
90
|
// src/client/client-style.ts
|
|
81
91
|
var styles = /* @__PURE__ */ new Map();
|
|
92
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
82
93
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
83
94
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
84
95
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -158,12 +169,6 @@ var getAssetPath = (path) => {
|
|
|
158
169
|
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
159
170
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
160
171
|
};
|
|
161
|
-
|
|
162
|
-
// src/utils/constants.ts
|
|
163
|
-
var EMPTY_OBJ = {};
|
|
164
|
-
|
|
165
|
-
// src/utils/helpers.ts
|
|
166
|
-
var isDef = (v) => v != null;
|
|
167
172
|
var isComplexType = (o) => {
|
|
168
173
|
o = typeof o;
|
|
169
174
|
return o === "object" || o === "function";
|
|
@@ -223,6 +228,63 @@ var unwrapErr = (result) => {
|
|
|
223
228
|
throw result.value;
|
|
224
229
|
}
|
|
225
230
|
};
|
|
231
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
232
|
+
const childNodes = elm.__childNodes || elm.childNodes;
|
|
233
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
234
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
235
|
+
var _a;
|
|
236
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
237
|
+
if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
|
|
238
|
+
slotNode.hidden = true;
|
|
239
|
+
} else {
|
|
240
|
+
slotNode.hidden = false;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
for (const childNode of childNodes) {
|
|
246
|
+
if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
|
|
247
|
+
updateFallbackSlotVisibility(childNode);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
252
|
+
let i2 = 0;
|
|
253
|
+
let slottedNodes = [];
|
|
254
|
+
let childNode;
|
|
255
|
+
for (; i2 < childNodes.length; i2++) {
|
|
256
|
+
childNode = childNodes[i2];
|
|
257
|
+
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
|
258
|
+
slottedNodes.push(childNode);
|
|
259
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
260
|
+
}
|
|
261
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
262
|
+
}
|
|
263
|
+
return slottedNodes;
|
|
264
|
+
}
|
|
265
|
+
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
|
266
|
+
const childNodes = [];
|
|
267
|
+
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
|
268
|
+
while ((node = node.nextSibling) && node["s-sn"] === slotName) {
|
|
269
|
+
childNodes.push(node);
|
|
270
|
+
}
|
|
271
|
+
return childNodes;
|
|
272
|
+
};
|
|
273
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
274
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
275
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
276
|
+
return true;
|
|
277
|
+
}
|
|
278
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
279
|
+
return true;
|
|
280
|
+
}
|
|
281
|
+
return false;
|
|
282
|
+
}
|
|
283
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
284
|
+
return true;
|
|
285
|
+
}
|
|
286
|
+
return slotName === "";
|
|
287
|
+
};
|
|
226
288
|
var createTime = (fnName, tagName = "") => {
|
|
227
289
|
{
|
|
228
290
|
return () => {
|
|
@@ -414,7 +476,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
414
476
|
}
|
|
415
477
|
if (!appliedStyles.has(scopeId2)) {
|
|
416
478
|
{
|
|
417
|
-
styleElm = doc.createElement("style");
|
|
479
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
418
480
|
styleElm.innerHTML = style;
|
|
419
481
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
420
482
|
if (nonce != null) {
|
|
@@ -424,7 +486,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
424
486
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
425
487
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
426
488
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
427
|
-
styleContainerNode.insertBefore(
|
|
489
|
+
styleContainerNode.insertBefore(
|
|
490
|
+
styleElm,
|
|
491
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
492
|
+
);
|
|
428
493
|
} else if ("host" in styleContainerNode) {
|
|
429
494
|
if (supportsConstructableStylesheets) {
|
|
430
495
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -474,16 +539,18 @@ var attachStyles = (hostRef) => {
|
|
|
474
539
|
endAttachStyles();
|
|
475
540
|
};
|
|
476
541
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
477
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
542
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
478
543
|
if (oldValue !== newValue) {
|
|
479
544
|
let isProp = isMemberInElement(elm, memberName);
|
|
480
545
|
let ln = memberName.toLowerCase();
|
|
481
546
|
if (memberName === "class") {
|
|
482
547
|
const classList = elm.classList;
|
|
483
548
|
const oldClasses = parseClassList(oldValue);
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
549
|
+
let newClasses = parseClassList(newValue);
|
|
550
|
+
{
|
|
551
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
552
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
553
|
+
}
|
|
487
554
|
} else if (memberName === "style") {
|
|
488
555
|
{
|
|
489
556
|
for (const prop in oldValue) {
|
|
@@ -538,7 +605,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
538
605
|
elm.setAttribute(memberName, n);
|
|
539
606
|
}
|
|
540
607
|
}
|
|
541
|
-
} else {
|
|
608
|
+
} else if (elm[memberName] !== newValue) {
|
|
542
609
|
elm[memberName] = newValue;
|
|
543
610
|
}
|
|
544
611
|
} catch (e) {
|
|
@@ -560,24 +627,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
560
627
|
}
|
|
561
628
|
};
|
|
562
629
|
var parseClassListRegex = /\s/;
|
|
563
|
-
var parseClassList = (value) =>
|
|
630
|
+
var parseClassList = (value) => {
|
|
631
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
632
|
+
value = value.baseVal;
|
|
633
|
+
}
|
|
634
|
+
if (!value || typeof value !== "string") {
|
|
635
|
+
return [];
|
|
636
|
+
}
|
|
637
|
+
return value.split(parseClassListRegex);
|
|
638
|
+
};
|
|
564
639
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
565
640
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
566
641
|
|
|
567
642
|
// src/runtime/vdom/update-element.ts
|
|
568
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
643
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
569
644
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
570
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
571
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
645
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
646
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
572
647
|
{
|
|
573
648
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
574
649
|
if (!(memberName in newVnodeAttrs)) {
|
|
575
|
-
setAccessor(
|
|
650
|
+
setAccessor(
|
|
651
|
+
elm,
|
|
652
|
+
memberName,
|
|
653
|
+
oldVnodeAttrs[memberName],
|
|
654
|
+
void 0,
|
|
655
|
+
isSvgMode2,
|
|
656
|
+
newVnode.$flags$);
|
|
576
657
|
}
|
|
577
658
|
}
|
|
578
659
|
}
|
|
579
660
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
580
|
-
setAccessor(
|
|
661
|
+
setAccessor(
|
|
662
|
+
elm,
|
|
663
|
+
memberName,
|
|
664
|
+
oldVnodeAttrs[memberName],
|
|
665
|
+
newVnodeAttrs[memberName],
|
|
666
|
+
isSvgMode2,
|
|
667
|
+
newVnode.$flags$);
|
|
581
668
|
}
|
|
582
669
|
};
|
|
583
670
|
function sortedAttrNames(attrNames) {
|
|
@@ -589,16 +676,13 @@ function sortedAttrNames(attrNames) {
|
|
|
589
676
|
attrNames
|
|
590
677
|
);
|
|
591
678
|
}
|
|
592
|
-
|
|
593
|
-
// src/runtime/vdom/vdom-render.ts
|
|
594
|
-
var scopeId;
|
|
595
679
|
var contentRef;
|
|
596
680
|
var hostTagName;
|
|
597
681
|
var useNativeShadowDom = false;
|
|
598
682
|
var checkSlotFallbackVisibility = false;
|
|
599
683
|
var checkSlotRelocate = false;
|
|
600
684
|
var isSvgMode = false;
|
|
601
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
685
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
602
686
|
var _a;
|
|
603
687
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
604
688
|
let i2 = 0;
|
|
@@ -608,9 +692,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
608
692
|
if (!useNativeShadowDom) {
|
|
609
693
|
checkSlotRelocate = true;
|
|
610
694
|
if (newVNode2.$tag$ === "slot") {
|
|
611
|
-
if (scopeId) {
|
|
612
|
-
parentElm.classList.add(scopeId + "-s");
|
|
613
|
-
}
|
|
614
695
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
615
696
|
// slot element has fallback content
|
|
616
697
|
// still create an element that "mocks" the slot element
|
|
@@ -634,14 +715,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
634
715
|
{
|
|
635
716
|
updateElement(null, newVNode2, isSvgMode);
|
|
636
717
|
}
|
|
637
|
-
const rootNode = elm.getRootNode();
|
|
638
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
639
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
640
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
641
|
-
}
|
|
642
718
|
if (newVNode2.$children$) {
|
|
643
719
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
644
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
720
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
645
721
|
if (childNode) {
|
|
646
722
|
elm.appendChild(childNode);
|
|
647
723
|
}
|
|
@@ -667,7 +743,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
667
743
|
};
|
|
668
744
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
669
745
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
670
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
746
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
671
747
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
672
748
|
let node = parentElm;
|
|
673
749
|
while (node = node.nextSibling) {
|
|
@@ -679,7 +755,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
679
755
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
680
756
|
const childNode = oldSlotChildNodes[i2];
|
|
681
757
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
682
|
-
insertBefore(
|
|
758
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
683
759
|
childNode["s-ol"].remove();
|
|
684
760
|
childNode["s-ol"] = void 0;
|
|
685
761
|
childNode["s-sh"] = void 0;
|
|
@@ -699,7 +775,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
699
775
|
}
|
|
700
776
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
701
777
|
if (vnodes[startIdx]) {
|
|
702
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
778
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
703
779
|
if (childNode) {
|
|
704
780
|
vnodes[startIdx].$elm$ = childNode;
|
|
705
781
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -785,7 +861,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
785
861
|
if (idxInOld >= 0) {
|
|
786
862
|
elmToMove = oldCh[idxInOld];
|
|
787
863
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
788
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
864
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
789
865
|
} else {
|
|
790
866
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
791
867
|
oldCh[idxInOld] = void 0;
|
|
@@ -793,12 +869,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
793
869
|
}
|
|
794
870
|
newStartVnode = newCh[++newStartIdx];
|
|
795
871
|
} else {
|
|
796
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
872
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
797
873
|
newStartVnode = newCh[++newStartIdx];
|
|
798
874
|
}
|
|
799
875
|
if (node) {
|
|
800
876
|
{
|
|
801
|
-
insertBefore(
|
|
877
|
+
insertBefore(
|
|
878
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
879
|
+
node,
|
|
880
|
+
referenceNode(oldStartVnode.$elm$)
|
|
881
|
+
);
|
|
802
882
|
}
|
|
803
883
|
}
|
|
804
884
|
}
|
|
@@ -819,28 +899,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
819
899
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
820
900
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
821
901
|
if (leftVNode.$tag$ === "slot") {
|
|
822
|
-
if (
|
|
823
|
-
// The component gets hydrated and no VDOM has been initialized.
|
|
824
|
-
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
825
|
-
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
826
|
-
// hydration comments to be removed
|
|
827
|
-
leftVNode.$elm$.nodeType !== 8
|
|
828
|
-
) {
|
|
829
|
-
return false;
|
|
830
|
-
}
|
|
831
902
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
832
903
|
}
|
|
833
904
|
if (!isInitialRender) {
|
|
834
905
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
835
906
|
}
|
|
907
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
908
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
909
|
+
}
|
|
836
910
|
return true;
|
|
837
911
|
}
|
|
838
912
|
return false;
|
|
839
913
|
};
|
|
840
|
-
var referenceNode = (node) =>
|
|
841
|
-
return node && node["s-ol"] || node;
|
|
842
|
-
};
|
|
843
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
914
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
844
915
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
845
916
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
846
917
|
const oldChildren = oldVNode.$children$;
|
|
@@ -873,41 +944,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
873
944
|
elm.data = text;
|
|
874
945
|
}
|
|
875
946
|
};
|
|
876
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
877
|
-
const childNodes = elm.childNodes;
|
|
878
|
-
for (const childNode of childNodes) {
|
|
879
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
880
|
-
if (childNode["s-sr"]) {
|
|
881
|
-
const slotName = childNode["s-sn"];
|
|
882
|
-
childNode.hidden = false;
|
|
883
|
-
for (const siblingNode of childNodes) {
|
|
884
|
-
if (siblingNode !== childNode) {
|
|
885
|
-
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
886
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
887
|
-
childNode.hidden = true;
|
|
888
|
-
break;
|
|
889
|
-
}
|
|
890
|
-
} else {
|
|
891
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
892
|
-
childNode.hidden = true;
|
|
893
|
-
break;
|
|
894
|
-
}
|
|
895
|
-
}
|
|
896
|
-
}
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
updateFallbackSlotVisibility(childNode);
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
};
|
|
903
947
|
var relocateNodes = [];
|
|
904
948
|
var markSlotContentForRelocation = (elm) => {
|
|
905
949
|
let node;
|
|
906
950
|
let hostContentNodes;
|
|
907
951
|
let j;
|
|
908
|
-
|
|
952
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
953
|
+
for (const childNode of children) {
|
|
909
954
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
910
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
955
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
911
956
|
const slotName = childNode["s-sn"];
|
|
912
957
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
913
958
|
node = hostContentNodes[j];
|
|
@@ -949,24 +994,10 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
949
994
|
}
|
|
950
995
|
}
|
|
951
996
|
};
|
|
952
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
953
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
954
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
955
|
-
return true;
|
|
956
|
-
}
|
|
957
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
958
|
-
return true;
|
|
959
|
-
}
|
|
960
|
-
return false;
|
|
961
|
-
}
|
|
962
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
963
|
-
return true;
|
|
964
|
-
}
|
|
965
|
-
return slotName === "";
|
|
966
|
-
};
|
|
967
997
|
var insertBefore = (parent, newNode, reference) => {
|
|
968
|
-
|
|
969
|
-
|
|
998
|
+
{
|
|
999
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1000
|
+
}
|
|
970
1001
|
};
|
|
971
1002
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
972
1003
|
var _a, _b, _c, _d;
|
|
@@ -992,9 +1023,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
992
1023
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
993
1024
|
hostRef.$vnode$ = rootVnode;
|
|
994
1025
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
995
|
-
{
|
|
996
|
-
scopeId = hostElm["s-sc"];
|
|
997
|
-
}
|
|
998
1026
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
999
1027
|
{
|
|
1000
1028
|
contentRef = hostElm["s-cr"];
|
|
@@ -1023,7 +1051,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1023
1051
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1024
1052
|
while (orgLocationNode) {
|
|
1025
1053
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1026
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1054
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1027
1055
|
refNode = refNode.nextSibling;
|
|
1028
1056
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1029
1057
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1036,13 +1064,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1036
1064
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1037
1065
|
}
|
|
1038
1066
|
}
|
|
1039
|
-
|
|
1067
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1068
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1069
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1040
1070
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1041
1071
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1042
1072
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1043
1073
|
}
|
|
1044
1074
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1045
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1075
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1046
1076
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1047
1077
|
}
|
|
1048
1078
|
}
|
|
@@ -1070,7 +1100,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1070
1100
|
// src/runtime/update-component.ts
|
|
1071
1101
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1072
1102
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1073
|
-
ancestorComponent["s-p"].push(
|
|
1103
|
+
const index = ancestorComponent["s-p"].push(
|
|
1104
|
+
new Promise(
|
|
1105
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1106
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1107
|
+
r();
|
|
1108
|
+
}
|
|
1109
|
+
)
|
|
1110
|
+
);
|
|
1074
1111
|
}
|
|
1075
1112
|
};
|
|
1076
1113
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1099,16 +1136,16 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1099
1136
|
{
|
|
1100
1137
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1101
1138
|
if (hostRef.$queuedListeners$) {
|
|
1102
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1139
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1103
1140
|
hostRef.$queuedListeners$ = void 0;
|
|
1104
1141
|
}
|
|
1105
1142
|
}
|
|
1106
1143
|
{
|
|
1107
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1144
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1108
1145
|
}
|
|
1109
1146
|
}
|
|
1110
1147
|
{
|
|
1111
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
1148
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
1112
1149
|
}
|
|
1113
1150
|
endSchedule();
|
|
1114
1151
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
@@ -1176,7 +1213,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1176
1213
|
const instance = hostRef.$lazyInstance$ ;
|
|
1177
1214
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1178
1215
|
{
|
|
1179
|
-
safeCall(instance, "componentDidRender");
|
|
1216
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1180
1217
|
}
|
|
1181
1218
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1182
1219
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -1210,12 +1247,12 @@ var appDidLoad = (who) => {
|
|
|
1210
1247
|
}
|
|
1211
1248
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1212
1249
|
};
|
|
1213
|
-
var safeCall = (instance, method, arg) => {
|
|
1250
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1214
1251
|
if (instance && instance[method]) {
|
|
1215
1252
|
try {
|
|
1216
1253
|
return instance[method](arg);
|
|
1217
1254
|
} catch (e) {
|
|
1218
|
-
consoleError(e);
|
|
1255
|
+
consoleError(e, elm);
|
|
1219
1256
|
}
|
|
1220
1257
|
}
|
|
1221
1258
|
return void 0;
|
|
@@ -1274,15 +1311,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1274
1311
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1275
1312
|
members.map(([memberName, [memberFlags]]) => {
|
|
1276
1313
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1314
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1315
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1316
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1317
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1318
|
+
Object.defineProperty(prototype, memberName, {
|
|
1319
|
+
get() {
|
|
1320
|
+
{
|
|
1321
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1322
|
+
return getValue(this, memberName);
|
|
1323
|
+
}
|
|
1324
|
+
const ref = getHostRef(this);
|
|
1325
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1326
|
+
if (!instance) return;
|
|
1327
|
+
return instance[memberName];
|
|
1328
|
+
}
|
|
1329
|
+
},
|
|
1330
|
+
configurable: true,
|
|
1331
|
+
enumerable: true
|
|
1332
|
+
});
|
|
1333
|
+
}
|
|
1277
1334
|
Object.defineProperty(prototype, memberName, {
|
|
1278
|
-
get() {
|
|
1279
|
-
return getValue(this, memberName);
|
|
1280
|
-
},
|
|
1281
1335
|
set(newValue) {
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1336
|
+
const ref = getHostRef(this);
|
|
1337
|
+
if (origSetter) {
|
|
1338
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1339
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1340
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1341
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1342
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1343
|
+
}
|
|
1344
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1345
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1346
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1347
|
+
return;
|
|
1348
|
+
}
|
|
1349
|
+
{
|
|
1350
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1351
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1352
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1353
|
+
ref.$onReadyPromise$.then(() => {
|
|
1354
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1355
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1356
|
+
}
|
|
1357
|
+
});
|
|
1358
|
+
}
|
|
1359
|
+
return;
|
|
1360
|
+
}
|
|
1361
|
+
const setterSetVal = () => {
|
|
1362
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1363
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1364
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1365
|
+
}
|
|
1366
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1367
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1368
|
+
};
|
|
1369
|
+
if (ref.$lazyInstance$) {
|
|
1370
|
+
setterSetVal();
|
|
1371
|
+
} else {
|
|
1372
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1286
1376
|
});
|
|
1287
1377
|
}
|
|
1288
1378
|
});
|
|
@@ -1292,7 +1382,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1292
1382
|
plt.jmp(() => {
|
|
1293
1383
|
var _a2;
|
|
1294
1384
|
const propName = attrNameToPropName.get(attrName);
|
|
1295
|
-
if (this.hasOwnProperty(propName)) {
|
|
1385
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1296
1386
|
newValue = this[propName];
|
|
1297
1387
|
delete this[propName];
|
|
1298
1388
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1312,7 +1402,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1312
1402
|
}
|
|
1313
1403
|
return;
|
|
1314
1404
|
}
|
|
1315
|
-
|
|
1405
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1406
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1407
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1408
|
+
this[propName] = newValue;
|
|
1409
|
+
}
|
|
1316
1410
|
});
|
|
1317
1411
|
};
|
|
1318
1412
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1339,9 +1433,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1339
1433
|
let Cstr;
|
|
1340
1434
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1341
1435
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1436
|
+
{
|
|
1437
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1345
1438
|
if (CstrImport && "then" in CstrImport) {
|
|
1346
1439
|
const endLoad = uniqueTime();
|
|
1347
1440
|
Cstr = await CstrImport;
|
|
@@ -1366,7 +1459,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1366
1459
|
try {
|
|
1367
1460
|
new Cstr(hostRef);
|
|
1368
1461
|
} catch (e) {
|
|
1369
|
-
consoleError(e);
|
|
1462
|
+
consoleError(e, elm);
|
|
1370
1463
|
}
|
|
1371
1464
|
{
|
|
1372
1465
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1375,10 +1468,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1375
1468
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1376
1469
|
}
|
|
1377
1470
|
endNewInstance();
|
|
1378
|
-
} else {
|
|
1379
|
-
Cstr = elm.constructor;
|
|
1380
|
-
const cmpTag = elm.localName;
|
|
1381
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1382
1471
|
}
|
|
1383
1472
|
if (Cstr && Cstr.style) {
|
|
1384
1473
|
let style;
|
|
@@ -1401,7 +1490,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1401
1490
|
schedule();
|
|
1402
1491
|
}
|
|
1403
1492
|
};
|
|
1404
|
-
var fireConnectedCallback = (instance) => {
|
|
1493
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1405
1494
|
};
|
|
1406
1495
|
|
|
1407
1496
|
// src/runtime/connected-callback.ts
|
|
@@ -1455,7 +1544,7 @@ var setContentReference = (elm) => {
|
|
|
1455
1544
|
contentRefElm["s-cn"] = true;
|
|
1456
1545
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1457
1546
|
};
|
|
1458
|
-
var disconnectInstance = (instance) => {
|
|
1547
|
+
var disconnectInstance = (instance, elm) => {
|
|
1459
1548
|
};
|
|
1460
1549
|
var disconnectedCallback = async (elm) => {
|
|
1461
1550
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1470,6 +1559,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1470
1559
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1471
1560
|
}
|
|
1472
1561
|
}
|
|
1562
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1563
|
+
rootAppliedStyles.delete(elm);
|
|
1564
|
+
}
|
|
1565
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1566
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1567
|
+
}
|
|
1473
1568
|
};
|
|
1474
1569
|
|
|
1475
1570
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1554,6 +1649,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1554
1649
|
}
|
|
1555
1650
|
disconnectedCallback() {
|
|
1556
1651
|
plt.jmp(() => disconnectedCallback(this));
|
|
1652
|
+
plt.raf(() => {
|
|
1653
|
+
var _a3;
|
|
1654
|
+
const hostRef = getHostRef(this);
|
|
1655
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1656
|
+
delete hostRef.$vnode$.$elm$;
|
|
1657
|
+
}
|
|
1658
|
+
});
|
|
1557
1659
|
}
|
|
1558
1660
|
componentOnReady() {
|
|
1559
1661
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1620,7 +1722,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1620
1722
|
}
|
|
1621
1723
|
}
|
|
1622
1724
|
} catch (e) {
|
|
1623
|
-
consoleError(e);
|
|
1725
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1624
1726
|
}
|
|
1625
1727
|
};
|
|
1626
1728
|
var getHostListenerTarget = (elm, flags) => {
|