@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
|
@@ -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.25.1 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
+
|
|
35
|
+
// src/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();
|
|
@@ -496,16 +561,18 @@ var attachStyles = (hostRef) => {
|
|
|
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,9 +1045,6 @@ 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
1048
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1021
1049
|
{
|
|
1022
1050
|
contentRef = hostElm["s-cr"];
|
|
@@ -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 */;
|
|
@@ -1232,12 +1269,12 @@ var appDidLoad = (who) => {
|
|
|
1232
1269
|
}
|
|
1233
1270
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1234
1271
|
};
|
|
1235
|
-
var safeCall = (instance, method, arg) => {
|
|
1272
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1236
1273
|
if (instance && instance[method]) {
|
|
1237
1274
|
try {
|
|
1238
1275
|
return instance[method](arg);
|
|
1239
1276
|
} catch (e) {
|
|
1240
|
-
consoleError(e);
|
|
1277
|
+
consoleError(e, elm);
|
|
1241
1278
|
}
|
|
1242
1279
|
}
|
|
1243
1280
|
return void 0;
|
|
@@ -1296,15 +1333,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1296
1333
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1297
1334
|
members.map(([memberName, [memberFlags]]) => {
|
|
1298
1335
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1336
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1337
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1338
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1339
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1340
|
+
Object.defineProperty(prototype, memberName, {
|
|
1341
|
+
get() {
|
|
1342
|
+
{
|
|
1343
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1344
|
+
return getValue(this, memberName);
|
|
1345
|
+
}
|
|
1346
|
+
const ref = getHostRef(this);
|
|
1347
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1348
|
+
if (!instance) return;
|
|
1349
|
+
return instance[memberName];
|
|
1350
|
+
}
|
|
1351
|
+
},
|
|
1352
|
+
configurable: true,
|
|
1353
|
+
enumerable: true
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1299
1356
|
Object.defineProperty(prototype, memberName, {
|
|
1300
|
-
get() {
|
|
1301
|
-
return getValue(this, memberName);
|
|
1302
|
-
},
|
|
1303
1357
|
set(newValue) {
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1358
|
+
const ref = getHostRef(this);
|
|
1359
|
+
if (origSetter) {
|
|
1360
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1361
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1362
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1363
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1364
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1365
|
+
}
|
|
1366
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1367
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1368
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1369
|
+
return;
|
|
1370
|
+
}
|
|
1371
|
+
{
|
|
1372
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1373
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1374
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1375
|
+
ref.$onReadyPromise$.then(() => {
|
|
1376
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1377
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1378
|
+
}
|
|
1379
|
+
});
|
|
1380
|
+
}
|
|
1381
|
+
return;
|
|
1382
|
+
}
|
|
1383
|
+
const setterSetVal = () => {
|
|
1384
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1385
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1386
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1387
|
+
}
|
|
1388
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1389
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1390
|
+
};
|
|
1391
|
+
if (ref.$lazyInstance$) {
|
|
1392
|
+
setterSetVal();
|
|
1393
|
+
} else {
|
|
1394
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1308
1398
|
});
|
|
1309
1399
|
}
|
|
1310
1400
|
});
|
|
@@ -1314,7 +1404,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1314
1404
|
plt.jmp(() => {
|
|
1315
1405
|
var _a2;
|
|
1316
1406
|
const propName = attrNameToPropName.get(attrName);
|
|
1317
|
-
if (this.hasOwnProperty(propName)) {
|
|
1407
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1318
1408
|
newValue = this[propName];
|
|
1319
1409
|
delete this[propName];
|
|
1320
1410
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1334,7 +1424,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1334
1424
|
}
|
|
1335
1425
|
return;
|
|
1336
1426
|
}
|
|
1337
|
-
|
|
1427
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1428
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1429
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1430
|
+
this[propName] = newValue;
|
|
1431
|
+
}
|
|
1338
1432
|
});
|
|
1339
1433
|
};
|
|
1340
1434
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1361,9 +1455,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1361
1455
|
let Cstr;
|
|
1362
1456
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1363
1457
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1458
|
+
{
|
|
1459
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1367
1460
|
if (CstrImport && "then" in CstrImport) {
|
|
1368
1461
|
const endLoad = uniqueTime();
|
|
1369
1462
|
Cstr = await CstrImport;
|
|
@@ -1388,7 +1481,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1388
1481
|
try {
|
|
1389
1482
|
new Cstr(hostRef);
|
|
1390
1483
|
} catch (e) {
|
|
1391
|
-
consoleError(e);
|
|
1484
|
+
consoleError(e, elm);
|
|
1392
1485
|
}
|
|
1393
1486
|
{
|
|
1394
1487
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1397,10 +1490,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1397
1490
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1398
1491
|
}
|
|
1399
1492
|
endNewInstance();
|
|
1400
|
-
} else {
|
|
1401
|
-
Cstr = elm.constructor;
|
|
1402
|
-
const cmpTag = elm.localName;
|
|
1403
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1404
1493
|
}
|
|
1405
1494
|
if (Cstr && Cstr.style) {
|
|
1406
1495
|
let style;
|
|
@@ -1423,7 +1512,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1423
1512
|
schedule();
|
|
1424
1513
|
}
|
|
1425
1514
|
};
|
|
1426
|
-
var fireConnectedCallback = (instance) => {
|
|
1515
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1427
1516
|
};
|
|
1428
1517
|
|
|
1429
1518
|
// src/runtime/connected-callback.ts
|
|
@@ -1477,7 +1566,7 @@ var setContentReference = (elm) => {
|
|
|
1477
1566
|
contentRefElm["s-cn"] = true;
|
|
1478
1567
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1479
1568
|
};
|
|
1480
|
-
var disconnectInstance = (instance) => {
|
|
1569
|
+
var disconnectInstance = (instance, elm) => {
|
|
1481
1570
|
};
|
|
1482
1571
|
var disconnectedCallback = async (elm) => {
|
|
1483
1572
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1492,6 +1581,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1492
1581
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1493
1582
|
}
|
|
1494
1583
|
}
|
|
1584
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1585
|
+
rootAppliedStyles.delete(elm);
|
|
1586
|
+
}
|
|
1587
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1588
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1589
|
+
}
|
|
1495
1590
|
};
|
|
1496
1591
|
|
|
1497
1592
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1576,6 +1671,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1576
1671
|
}
|
|
1577
1672
|
disconnectedCallback() {
|
|
1578
1673
|
plt.jmp(() => disconnectedCallback(this));
|
|
1674
|
+
plt.raf(() => {
|
|
1675
|
+
var _a3;
|
|
1676
|
+
const hostRef = getHostRef(this);
|
|
1677
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1678
|
+
delete hostRef.$vnode$.$elm$;
|
|
1679
|
+
}
|
|
1680
|
+
});
|
|
1579
1681
|
}
|
|
1580
1682
|
componentOnReady() {
|
|
1581
1683
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1642,7 +1744,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1642
1744
|
}
|
|
1643
1745
|
}
|
|
1644
1746
|
} catch (e) {
|
|
1645
|
-
consoleError(e);
|
|
1747
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1646
1748
|
}
|
|
1647
1749
|
};
|
|
1648
1750
|
var getHostListenerTarget = (elm, flags) => {
|