@everymatrix/player-elevate-card 1.53.0 → 1.53.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/general-styling-wrapper_5.cjs.entry.js +78 -32
- package/dist/cjs/{index-fcb2d8d9.js → index-4decce07.js} +240 -138
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/player-elevate-card.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/player-elevate-card/player-elevate-card.js +39 -7
- package/dist/collection/components/player-elevate-card-data/player-elevate-card-data.js +2 -5
- package/dist/collection/components/player-elevate-loyaltycard/player-elevate-loyaltycard.js +39 -7
- package/dist/collection/components/player-elevate-pointcard/player-elevate-pointcard.js +51 -10
- package/dist/esm/general-styling-wrapper_5.entry.js +78 -32
- package/dist/esm/{index-94328d47.js → index-932d5ca0.js} +240 -138
- package/dist/esm/loader.js +2 -2
- package/dist/esm/player-elevate-card.js +3 -3
- package/dist/player-elevate-card/p-371d393e.entry.js +1 -0
- package/dist/player-elevate-card/p-46c78d03.js +2 -0
- package/dist/player-elevate-card/player-elevate-card.esm.js +1 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/player-elevate-card/p-49062db1.entry.js +0 -1
- package/dist/player-elevate-card/p-8dfd18ff.js +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/stencil.config.dev.d.ts +0 -2
|
@@ -21,19 +21,23 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'player-elevate-card';
|
|
24
|
-
const BUILD = /* player-elevate-card */ { 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: false, 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: false, propMutable: false, propNumber: false, 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-card */ { 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: false, 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: false, propMutable: false, propNumber: false, 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);
|
|
@@ -83,16 +88,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
83
88
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
84
89
|
/* webpackMode: "lazy" */
|
|
85
90
|
`./${bundleId}.entry.js${""}`
|
|
86
|
-
)); }).then(
|
|
87
|
-
{
|
|
88
|
-
|
|
91
|
+
)); }).then(
|
|
92
|
+
(importedModule) => {
|
|
93
|
+
{
|
|
94
|
+
cmpModules.set(bundleId, importedModule);
|
|
95
|
+
}
|
|
96
|
+
return importedModule[exportName];
|
|
97
|
+
},
|
|
98
|
+
(e) => {
|
|
99
|
+
consoleError(e, hostRef.$hostElement$);
|
|
89
100
|
}
|
|
90
|
-
|
|
91
|
-
}, consoleError);
|
|
101
|
+
);
|
|
92
102
|
};
|
|
93
103
|
|
|
94
104
|
// src/client/client-style.ts
|
|
95
105
|
var styles = /* @__PURE__ */ new Map();
|
|
106
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
96
107
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
97
108
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
98
109
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -172,12 +183,6 @@ var getAssetPath = (path) => {
|
|
|
172
183
|
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
173
184
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
174
185
|
};
|
|
175
|
-
|
|
176
|
-
// src/utils/constants.ts
|
|
177
|
-
var EMPTY_OBJ = {};
|
|
178
|
-
|
|
179
|
-
// src/utils/helpers.ts
|
|
180
|
-
var isDef = (v) => v != null;
|
|
181
186
|
var isComplexType = (o) => {
|
|
182
187
|
o = typeof o;
|
|
183
188
|
return o === "object" || o === "function";
|
|
@@ -237,6 +242,63 @@ var unwrapErr = (result) => {
|
|
|
237
242
|
throw result.value;
|
|
238
243
|
}
|
|
239
244
|
};
|
|
245
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
246
|
+
const childNodes = elm.__childNodes || elm.childNodes;
|
|
247
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
248
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
249
|
+
var _a;
|
|
250
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
251
|
+
if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
|
|
252
|
+
slotNode.hidden = true;
|
|
253
|
+
} else {
|
|
254
|
+
slotNode.hidden = false;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
for (const childNode of childNodes) {
|
|
260
|
+
if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
|
|
261
|
+
updateFallbackSlotVisibility(childNode);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
};
|
|
265
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
266
|
+
let i2 = 0;
|
|
267
|
+
let slottedNodes = [];
|
|
268
|
+
let childNode;
|
|
269
|
+
for (; i2 < childNodes.length; i2++) {
|
|
270
|
+
childNode = childNodes[i2];
|
|
271
|
+
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
|
272
|
+
slottedNodes.push(childNode);
|
|
273
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
274
|
+
}
|
|
275
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
276
|
+
}
|
|
277
|
+
return slottedNodes;
|
|
278
|
+
}
|
|
279
|
+
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
|
280
|
+
const childNodes = [];
|
|
281
|
+
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
|
282
|
+
while ((node = node.nextSibling) && node["s-sn"] === slotName) {
|
|
283
|
+
childNodes.push(node);
|
|
284
|
+
}
|
|
285
|
+
return childNodes;
|
|
286
|
+
};
|
|
287
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
288
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
289
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
290
|
+
return true;
|
|
291
|
+
}
|
|
292
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
293
|
+
return true;
|
|
294
|
+
}
|
|
295
|
+
return false;
|
|
296
|
+
}
|
|
297
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
298
|
+
return true;
|
|
299
|
+
}
|
|
300
|
+
return slotName === "";
|
|
301
|
+
};
|
|
240
302
|
var createTime = (fnName, tagName = "") => {
|
|
241
303
|
{
|
|
242
304
|
return () => {
|
|
@@ -422,7 +484,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
422
484
|
}
|
|
423
485
|
if (!appliedStyles.has(scopeId2)) {
|
|
424
486
|
{
|
|
425
|
-
styleElm = doc.createElement("style");
|
|
487
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
426
488
|
styleElm.innerHTML = style;
|
|
427
489
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
428
490
|
if (nonce != null) {
|
|
@@ -432,7 +494,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
432
494
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
433
495
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
434
496
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
435
|
-
styleContainerNode.insertBefore(
|
|
497
|
+
styleContainerNode.insertBefore(
|
|
498
|
+
styleElm,
|
|
499
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
500
|
+
);
|
|
436
501
|
} else if ("host" in styleContainerNode) {
|
|
437
502
|
if (supportsConstructableStylesheets) {
|
|
438
503
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -482,16 +547,18 @@ var attachStyles = (hostRef) => {
|
|
|
482
547
|
endAttachStyles();
|
|
483
548
|
};
|
|
484
549
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
485
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
550
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
486
551
|
if (oldValue !== newValue) {
|
|
487
552
|
let isProp = isMemberInElement(elm, memberName);
|
|
488
553
|
let ln = memberName.toLowerCase();
|
|
489
554
|
if (memberName === "class") {
|
|
490
555
|
const classList = elm.classList;
|
|
491
556
|
const oldClasses = parseClassList(oldValue);
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
557
|
+
let newClasses = parseClassList(newValue);
|
|
558
|
+
{
|
|
559
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
560
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
561
|
+
}
|
|
495
562
|
} else if (memberName === "style") {
|
|
496
563
|
{
|
|
497
564
|
for (const prop in oldValue) {
|
|
@@ -546,7 +613,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
546
613
|
elm.setAttribute(memberName, n);
|
|
547
614
|
}
|
|
548
615
|
}
|
|
549
|
-
} else {
|
|
616
|
+
} else if (elm[memberName] !== newValue) {
|
|
550
617
|
elm[memberName] = newValue;
|
|
551
618
|
}
|
|
552
619
|
} catch (e) {
|
|
@@ -568,24 +635,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
568
635
|
}
|
|
569
636
|
};
|
|
570
637
|
var parseClassListRegex = /\s/;
|
|
571
|
-
var parseClassList = (value) =>
|
|
638
|
+
var parseClassList = (value) => {
|
|
639
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
640
|
+
value = value.baseVal;
|
|
641
|
+
}
|
|
642
|
+
if (!value || typeof value !== "string") {
|
|
643
|
+
return [];
|
|
644
|
+
}
|
|
645
|
+
return value.split(parseClassListRegex);
|
|
646
|
+
};
|
|
572
647
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
573
648
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
574
649
|
|
|
575
650
|
// src/runtime/vdom/update-element.ts
|
|
576
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
651
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
577
652
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
578
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
579
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
653
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
654
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
580
655
|
{
|
|
581
656
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
582
657
|
if (!(memberName in newVnodeAttrs)) {
|
|
583
|
-
setAccessor(
|
|
658
|
+
setAccessor(
|
|
659
|
+
elm,
|
|
660
|
+
memberName,
|
|
661
|
+
oldVnodeAttrs[memberName],
|
|
662
|
+
void 0,
|
|
663
|
+
isSvgMode2,
|
|
664
|
+
newVnode.$flags$);
|
|
584
665
|
}
|
|
585
666
|
}
|
|
586
667
|
}
|
|
587
668
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
588
|
-
setAccessor(
|
|
669
|
+
setAccessor(
|
|
670
|
+
elm,
|
|
671
|
+
memberName,
|
|
672
|
+
oldVnodeAttrs[memberName],
|
|
673
|
+
newVnodeAttrs[memberName],
|
|
674
|
+
isSvgMode2,
|
|
675
|
+
newVnode.$flags$);
|
|
589
676
|
}
|
|
590
677
|
};
|
|
591
678
|
function sortedAttrNames(attrNames) {
|
|
@@ -597,16 +684,13 @@ function sortedAttrNames(attrNames) {
|
|
|
597
684
|
attrNames
|
|
598
685
|
);
|
|
599
686
|
}
|
|
600
|
-
|
|
601
|
-
// src/runtime/vdom/vdom-render.ts
|
|
602
|
-
var scopeId;
|
|
603
687
|
var contentRef;
|
|
604
688
|
var hostTagName;
|
|
605
689
|
var useNativeShadowDom = false;
|
|
606
690
|
var checkSlotFallbackVisibility = false;
|
|
607
691
|
var checkSlotRelocate = false;
|
|
608
692
|
var isSvgMode = false;
|
|
609
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
693
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
610
694
|
var _a;
|
|
611
695
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
612
696
|
let i2 = 0;
|
|
@@ -616,9 +700,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
616
700
|
if (!useNativeShadowDom) {
|
|
617
701
|
checkSlotRelocate = true;
|
|
618
702
|
if (newVNode2.$tag$ === "slot") {
|
|
619
|
-
if (scopeId) {
|
|
620
|
-
parentElm.classList.add(scopeId + "-s");
|
|
621
|
-
}
|
|
622
703
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
623
704
|
// slot element has fallback content
|
|
624
705
|
// still create an element that "mocks" the slot element
|
|
@@ -642,14 +723,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
642
723
|
{
|
|
643
724
|
updateElement(null, newVNode2, isSvgMode);
|
|
644
725
|
}
|
|
645
|
-
const rootNode = elm.getRootNode();
|
|
646
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
647
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
648
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
649
|
-
}
|
|
650
726
|
if (newVNode2.$children$) {
|
|
651
727
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
652
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
728
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
653
729
|
if (childNode) {
|
|
654
730
|
elm.appendChild(childNode);
|
|
655
731
|
}
|
|
@@ -675,7 +751,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
675
751
|
};
|
|
676
752
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
677
753
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
678
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
754
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
679
755
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
680
756
|
let node = parentElm;
|
|
681
757
|
while (node = node.nextSibling) {
|
|
@@ -687,7 +763,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
687
763
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
688
764
|
const childNode = oldSlotChildNodes[i2];
|
|
689
765
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
690
|
-
insertBefore(
|
|
766
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
691
767
|
childNode["s-ol"].remove();
|
|
692
768
|
childNode["s-ol"] = void 0;
|
|
693
769
|
childNode["s-sh"] = void 0;
|
|
@@ -707,7 +783,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
707
783
|
}
|
|
708
784
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
709
785
|
if (vnodes[startIdx]) {
|
|
710
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
786
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
711
787
|
if (childNode) {
|
|
712
788
|
vnodes[startIdx].$elm$ = childNode;
|
|
713
789
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -793,7 +869,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
793
869
|
if (idxInOld >= 0) {
|
|
794
870
|
elmToMove = oldCh[idxInOld];
|
|
795
871
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
796
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
872
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
797
873
|
} else {
|
|
798
874
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
799
875
|
oldCh[idxInOld] = void 0;
|
|
@@ -801,12 +877,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
801
877
|
}
|
|
802
878
|
newStartVnode = newCh[++newStartIdx];
|
|
803
879
|
} else {
|
|
804
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
880
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
805
881
|
newStartVnode = newCh[++newStartIdx];
|
|
806
882
|
}
|
|
807
883
|
if (node) {
|
|
808
884
|
{
|
|
809
|
-
insertBefore(
|
|
885
|
+
insertBefore(
|
|
886
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
887
|
+
node,
|
|
888
|
+
referenceNode(oldStartVnode.$elm$)
|
|
889
|
+
);
|
|
810
890
|
}
|
|
811
891
|
}
|
|
812
892
|
}
|
|
@@ -827,28 +907,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
827
907
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
828
908
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
829
909
|
if (leftVNode.$tag$ === "slot") {
|
|
830
|
-
if (
|
|
831
|
-
// The component gets hydrated and no VDOM has been initialized.
|
|
832
|
-
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
833
|
-
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
834
|
-
// hydration comments to be removed
|
|
835
|
-
leftVNode.$elm$.nodeType !== 8
|
|
836
|
-
) {
|
|
837
|
-
return false;
|
|
838
|
-
}
|
|
839
910
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
840
911
|
}
|
|
841
912
|
if (!isInitialRender) {
|
|
842
913
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
843
914
|
}
|
|
915
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
916
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
917
|
+
}
|
|
844
918
|
return true;
|
|
845
919
|
}
|
|
846
920
|
return false;
|
|
847
921
|
};
|
|
848
|
-
var referenceNode = (node) =>
|
|
849
|
-
return node && node["s-ol"] || node;
|
|
850
|
-
};
|
|
851
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
922
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
852
923
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
853
924
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
854
925
|
const oldChildren = oldVNode.$children$;
|
|
@@ -881,41 +952,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
881
952
|
elm.data = text;
|
|
882
953
|
}
|
|
883
954
|
};
|
|
884
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
885
|
-
const childNodes = elm.childNodes;
|
|
886
|
-
for (const childNode of childNodes) {
|
|
887
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
888
|
-
if (childNode["s-sr"]) {
|
|
889
|
-
const slotName = childNode["s-sn"];
|
|
890
|
-
childNode.hidden = false;
|
|
891
|
-
for (const siblingNode of childNodes) {
|
|
892
|
-
if (siblingNode !== childNode) {
|
|
893
|
-
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
894
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
895
|
-
childNode.hidden = true;
|
|
896
|
-
break;
|
|
897
|
-
}
|
|
898
|
-
} else {
|
|
899
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
900
|
-
childNode.hidden = true;
|
|
901
|
-
break;
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
updateFallbackSlotVisibility(childNode);
|
|
908
|
-
}
|
|
909
|
-
}
|
|
910
|
-
};
|
|
911
955
|
var relocateNodes = [];
|
|
912
956
|
var markSlotContentForRelocation = (elm) => {
|
|
913
957
|
let node;
|
|
914
958
|
let hostContentNodes;
|
|
915
959
|
let j;
|
|
916
|
-
|
|
960
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
961
|
+
for (const childNode of children) {
|
|
917
962
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
918
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
963
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
919
964
|
const slotName = childNode["s-sn"];
|
|
920
965
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
921
966
|
node = hostContentNodes[j];
|
|
@@ -957,24 +1002,10 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
957
1002
|
}
|
|
958
1003
|
}
|
|
959
1004
|
};
|
|
960
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
961
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
962
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
963
|
-
return true;
|
|
964
|
-
}
|
|
965
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
966
|
-
return true;
|
|
967
|
-
}
|
|
968
|
-
return false;
|
|
969
|
-
}
|
|
970
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
971
|
-
return true;
|
|
972
|
-
}
|
|
973
|
-
return slotName === "";
|
|
974
|
-
};
|
|
975
1005
|
var insertBefore = (parent, newNode, reference) => {
|
|
976
|
-
|
|
977
|
-
|
|
1006
|
+
{
|
|
1007
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1008
|
+
}
|
|
978
1009
|
};
|
|
979
1010
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
980
1011
|
var _a, _b, _c, _d;
|
|
@@ -1000,9 +1031,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1000
1031
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1001
1032
|
hostRef.$vnode$ = rootVnode;
|
|
1002
1033
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
1003
|
-
{
|
|
1004
|
-
scopeId = hostElm["s-sc"];
|
|
1005
|
-
}
|
|
1006
1034
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1007
1035
|
{
|
|
1008
1036
|
contentRef = hostElm["s-cr"];
|
|
@@ -1031,7 +1059,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1031
1059
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1032
1060
|
while (orgLocationNode) {
|
|
1033
1061
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1034
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1062
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1035
1063
|
refNode = refNode.nextSibling;
|
|
1036
1064
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1037
1065
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1044,13 +1072,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1044
1072
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1045
1073
|
}
|
|
1046
1074
|
}
|
|
1047
|
-
|
|
1075
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1076
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1077
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1048
1078
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1049
1079
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1050
1080
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1051
1081
|
}
|
|
1052
1082
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1053
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1083
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1054
1084
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1055
1085
|
}
|
|
1056
1086
|
}
|
|
@@ -1078,7 +1108,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1078
1108
|
// src/runtime/update-component.ts
|
|
1079
1109
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1080
1110
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1081
|
-
ancestorComponent["s-p"].push(
|
|
1111
|
+
const index = ancestorComponent["s-p"].push(
|
|
1112
|
+
new Promise(
|
|
1113
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1114
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1115
|
+
r();
|
|
1116
|
+
}
|
|
1117
|
+
)
|
|
1118
|
+
);
|
|
1082
1119
|
}
|
|
1083
1120
|
};
|
|
1084
1121
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1107,12 +1144,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1107
1144
|
{
|
|
1108
1145
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1109
1146
|
if (hostRef.$queuedListeners$) {
|
|
1110
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1147
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1111
1148
|
hostRef.$queuedListeners$ = void 0;
|
|
1112
1149
|
}
|
|
1113
1150
|
}
|
|
1114
1151
|
{
|
|
1115
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1152
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1116
1153
|
}
|
|
1117
1154
|
}
|
|
1118
1155
|
endSchedule();
|
|
@@ -1181,7 +1218,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1181
1218
|
const instance = hostRef.$lazyInstance$ ;
|
|
1182
1219
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1183
1220
|
{
|
|
1184
|
-
safeCall(instance, "componentDidRender");
|
|
1221
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1185
1222
|
}
|
|
1186
1223
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1187
1224
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -1215,12 +1252,12 @@ var appDidLoad = (who) => {
|
|
|
1215
1252
|
}
|
|
1216
1253
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1217
1254
|
};
|
|
1218
|
-
var safeCall = (instance, method, arg) => {
|
|
1255
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1219
1256
|
if (instance && instance[method]) {
|
|
1220
1257
|
try {
|
|
1221
1258
|
return instance[method](arg);
|
|
1222
1259
|
} catch (e) {
|
|
1223
|
-
consoleError(e);
|
|
1260
|
+
consoleError(e, elm);
|
|
1224
1261
|
}
|
|
1225
1262
|
}
|
|
1226
1263
|
return void 0;
|
|
@@ -1279,15 +1316,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1279
1316
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1280
1317
|
members.map(([memberName, [memberFlags]]) => {
|
|
1281
1318
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1319
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1320
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1321
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1322
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1323
|
+
Object.defineProperty(prototype, memberName, {
|
|
1324
|
+
get() {
|
|
1325
|
+
{
|
|
1326
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1327
|
+
return getValue(this, memberName);
|
|
1328
|
+
}
|
|
1329
|
+
const ref = getHostRef(this);
|
|
1330
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1331
|
+
if (!instance) return;
|
|
1332
|
+
return instance[memberName];
|
|
1333
|
+
}
|
|
1334
|
+
},
|
|
1335
|
+
configurable: true,
|
|
1336
|
+
enumerable: true
|
|
1337
|
+
});
|
|
1338
|
+
}
|
|
1282
1339
|
Object.defineProperty(prototype, memberName, {
|
|
1283
|
-
get() {
|
|
1284
|
-
return getValue(this, memberName);
|
|
1285
|
-
},
|
|
1286
1340
|
set(newValue) {
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1341
|
+
const ref = getHostRef(this);
|
|
1342
|
+
if (origSetter) {
|
|
1343
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1344
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1345
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1346
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1347
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1348
|
+
}
|
|
1349
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1350
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1351
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1352
|
+
return;
|
|
1353
|
+
}
|
|
1354
|
+
{
|
|
1355
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1356
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1357
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1358
|
+
ref.$onReadyPromise$.then(() => {
|
|
1359
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1360
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1361
|
+
}
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1364
|
+
return;
|
|
1365
|
+
}
|
|
1366
|
+
const setterSetVal = () => {
|
|
1367
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1368
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1369
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1370
|
+
}
|
|
1371
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1372
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1373
|
+
};
|
|
1374
|
+
if (ref.$lazyInstance$) {
|
|
1375
|
+
setterSetVal();
|
|
1376
|
+
} else {
|
|
1377
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1291
1381
|
});
|
|
1292
1382
|
}
|
|
1293
1383
|
});
|
|
@@ -1297,7 +1387,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1297
1387
|
plt.jmp(() => {
|
|
1298
1388
|
var _a2;
|
|
1299
1389
|
const propName = attrNameToPropName.get(attrName);
|
|
1300
|
-
if (this.hasOwnProperty(propName)) {
|
|
1390
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1301
1391
|
newValue = this[propName];
|
|
1302
1392
|
delete this[propName];
|
|
1303
1393
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1317,7 +1407,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1317
1407
|
}
|
|
1318
1408
|
return;
|
|
1319
1409
|
}
|
|
1320
|
-
|
|
1410
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1411
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1412
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1413
|
+
this[propName] = newValue;
|
|
1414
|
+
}
|
|
1321
1415
|
});
|
|
1322
1416
|
};
|
|
1323
1417
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1344,9 +1438,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1344
1438
|
let Cstr;
|
|
1345
1439
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1346
1440
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1441
|
+
{
|
|
1442
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1350
1443
|
if (CstrImport && "then" in CstrImport) {
|
|
1351
1444
|
const endLoad = uniqueTime();
|
|
1352
1445
|
Cstr = await CstrImport;
|
|
@@ -1371,7 +1464,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1371
1464
|
try {
|
|
1372
1465
|
new Cstr(hostRef);
|
|
1373
1466
|
} catch (e) {
|
|
1374
|
-
consoleError(e);
|
|
1467
|
+
consoleError(e, elm);
|
|
1375
1468
|
}
|
|
1376
1469
|
{
|
|
1377
1470
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1380,10 +1473,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1380
1473
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1381
1474
|
}
|
|
1382
1475
|
endNewInstance();
|
|
1383
|
-
} else {
|
|
1384
|
-
Cstr = elm.constructor;
|
|
1385
|
-
const cmpTag = elm.localName;
|
|
1386
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1387
1476
|
}
|
|
1388
1477
|
if (Cstr && Cstr.style) {
|
|
1389
1478
|
let style;
|
|
@@ -1406,7 +1495,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1406
1495
|
schedule();
|
|
1407
1496
|
}
|
|
1408
1497
|
};
|
|
1409
|
-
var fireConnectedCallback = (instance) => {
|
|
1498
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1410
1499
|
};
|
|
1411
1500
|
|
|
1412
1501
|
// src/runtime/connected-callback.ts
|
|
@@ -1460,7 +1549,7 @@ var setContentReference = (elm) => {
|
|
|
1460
1549
|
contentRefElm["s-cn"] = true;
|
|
1461
1550
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1462
1551
|
};
|
|
1463
|
-
var disconnectInstance = (instance) => {
|
|
1552
|
+
var disconnectInstance = (instance, elm) => {
|
|
1464
1553
|
};
|
|
1465
1554
|
var disconnectedCallback = async (elm) => {
|
|
1466
1555
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1475,6 +1564,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1475
1564
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1476
1565
|
}
|
|
1477
1566
|
}
|
|
1567
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1568
|
+
rootAppliedStyles.delete(elm);
|
|
1569
|
+
}
|
|
1570
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1571
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1572
|
+
}
|
|
1478
1573
|
};
|
|
1479
1574
|
|
|
1480
1575
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1559,6 +1654,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1559
1654
|
}
|
|
1560
1655
|
disconnectedCallback() {
|
|
1561
1656
|
plt.jmp(() => disconnectedCallback(this));
|
|
1657
|
+
plt.raf(() => {
|
|
1658
|
+
var _a3;
|
|
1659
|
+
const hostRef = getHostRef(this);
|
|
1660
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1661
|
+
delete hostRef.$vnode$.$elm$;
|
|
1662
|
+
}
|
|
1663
|
+
});
|
|
1562
1664
|
}
|
|
1563
1665
|
componentOnReady() {
|
|
1564
1666
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1625,7 +1727,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1625
1727
|
}
|
|
1626
1728
|
}
|
|
1627
1729
|
} catch (e) {
|
|
1628
|
-
consoleError(e);
|
|
1730
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1629
1731
|
}
|
|
1630
1732
|
};
|
|
1631
1733
|
var getHostListenerTarget = (elm, flags) => {
|