@everymatrix/player-elevate-card 1.55.0 → 1.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/general-styling-wrapper_5.cjs.entry.js +79 -33
- package/dist/cjs/{index-fcb2d8d9.js → index-e1db0305.js} +246 -138
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/player-elevate-card.cjs.js +3 -3
- 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 +59 -8
- package/dist/collection/components/player-elevate-pointcard/player-elevate-pointcard.js +51 -10
- package/dist/esm/general-styling-wrapper_5.entry.js +79 -33
- package/dist/esm/{index-94328d47.js → index-29ae3408.js} +246 -138
- package/dist/esm/loader.js +3 -3
- package/dist/esm/player-elevate-card.js +4 -4
- package/dist/player-elevate-card/p-17e5148c.js +2 -0
- package/dist/player-elevate-card/p-33df4709.entry.js +1 -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/dist/types/components/player-elevate-loyaltycard/player-elevate-loyaltycard.d.ts +4 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/player-elevate-card/p-08c2b497.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
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -21,19 +21,23 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'player-elevate-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.26.0 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
+
|
|
35
|
+
// src/client/client-host-ref.ts
|
|
34
36
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
35
37
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
36
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
38
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
39
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
40
|
+
};
|
|
37
41
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
42
|
const hostRef = {
|
|
39
43
|
$flags$: 0,
|
|
@@ -46,7 +50,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
50
|
hostElement["s-p"] = [];
|
|
47
51
|
hostElement["s-rc"] = [];
|
|
48
52
|
}
|
|
49
|
-
|
|
53
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
54
|
+
return ref;
|
|
50
55
|
};
|
|
51
56
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
57
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -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();
|
|
@@ -450,7 +515,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
450
515
|
styleContainerNode.append(styleElm);
|
|
451
516
|
}
|
|
452
517
|
}
|
|
453
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
518
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
454
519
|
styleContainerNode.insertBefore(styleElm, null);
|
|
455
520
|
}
|
|
456
521
|
}
|
|
@@ -475,23 +540,25 @@ var attachStyles = (hostRef) => {
|
|
|
475
540
|
const scopeId2 = addStyle(
|
|
476
541
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
477
542
|
cmpMeta);
|
|
478
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
543
|
+
if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
|
|
479
544
|
elm["s-sc"] = scopeId2;
|
|
480
545
|
elm.classList.add(scopeId2 + "-h");
|
|
481
546
|
}
|
|
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,10 +1031,7 @@ 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
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1034
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
1007
1035
|
{
|
|
1008
1036
|
contentRef = hostElm["s-cr"];
|
|
1009
1037
|
checkSlotFallbackVisibility = false;
|
|
@@ -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 */;
|
|
@@ -1210,17 +1247,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1210
1247
|
}
|
|
1211
1248
|
};
|
|
1212
1249
|
var appDidLoad = (who) => {
|
|
1213
|
-
{
|
|
1214
|
-
addHydratedFlag(doc.documentElement);
|
|
1215
|
-
}
|
|
1216
1250
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1217
1251
|
};
|
|
1218
|
-
var safeCall = (instance, method, arg) => {
|
|
1252
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1219
1253
|
if (instance && instance[method]) {
|
|
1220
1254
|
try {
|
|
1221
1255
|
return instance[method](arg);
|
|
1222
1256
|
} catch (e) {
|
|
1223
|
-
consoleError(e);
|
|
1257
|
+
consoleError(e, elm);
|
|
1224
1258
|
}
|
|
1225
1259
|
}
|
|
1226
1260
|
return void 0;
|
|
@@ -1279,15 +1313,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1279
1313
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1280
1314
|
members.map(([memberName, [memberFlags]]) => {
|
|
1281
1315
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1316
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1317
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1318
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1319
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1320
|
+
Object.defineProperty(prototype, memberName, {
|
|
1321
|
+
get() {
|
|
1322
|
+
{
|
|
1323
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1324
|
+
return getValue(this, memberName);
|
|
1325
|
+
}
|
|
1326
|
+
const ref = getHostRef(this);
|
|
1327
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1328
|
+
if (!instance) return;
|
|
1329
|
+
return instance[memberName];
|
|
1330
|
+
}
|
|
1331
|
+
},
|
|
1332
|
+
configurable: true,
|
|
1333
|
+
enumerable: true
|
|
1334
|
+
});
|
|
1335
|
+
}
|
|
1282
1336
|
Object.defineProperty(prototype, memberName, {
|
|
1283
|
-
get() {
|
|
1284
|
-
return getValue(this, memberName);
|
|
1285
|
-
},
|
|
1286
1337
|
set(newValue) {
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1338
|
+
const ref = getHostRef(this);
|
|
1339
|
+
if (origSetter) {
|
|
1340
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1341
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1342
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1343
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1344
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1345
|
+
}
|
|
1346
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1347
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1348
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1349
|
+
return;
|
|
1350
|
+
}
|
|
1351
|
+
{
|
|
1352
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1353
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1354
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1355
|
+
ref.$onReadyPromise$.then(() => {
|
|
1356
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1357
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1358
|
+
}
|
|
1359
|
+
});
|
|
1360
|
+
}
|
|
1361
|
+
return;
|
|
1362
|
+
}
|
|
1363
|
+
const setterSetVal = () => {
|
|
1364
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1365
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1366
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1367
|
+
}
|
|
1368
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1369
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1370
|
+
};
|
|
1371
|
+
if (ref.$lazyInstance$) {
|
|
1372
|
+
setterSetVal();
|
|
1373
|
+
} else {
|
|
1374
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1291
1378
|
});
|
|
1292
1379
|
}
|
|
1293
1380
|
});
|
|
@@ -1297,7 +1384,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1297
1384
|
plt.jmp(() => {
|
|
1298
1385
|
var _a2;
|
|
1299
1386
|
const propName = attrNameToPropName.get(attrName);
|
|
1300
|
-
if (this.hasOwnProperty(propName)) {
|
|
1387
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1301
1388
|
newValue = this[propName];
|
|
1302
1389
|
delete this[propName];
|
|
1303
1390
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1317,7 +1404,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1317
1404
|
}
|
|
1318
1405
|
return;
|
|
1319
1406
|
}
|
|
1320
|
-
|
|
1407
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1408
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1409
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1410
|
+
this[propName] = newValue;
|
|
1411
|
+
}
|
|
1321
1412
|
});
|
|
1322
1413
|
};
|
|
1323
1414
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1346,7 +1437,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1346
1437
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1347
1438
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1348
1439
|
if (bundleId) {
|
|
1349
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1440
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1350
1441
|
if (CstrImport && "then" in CstrImport) {
|
|
1351
1442
|
const endLoad = uniqueTime();
|
|
1352
1443
|
Cstr = await CstrImport;
|
|
@@ -1371,7 +1462,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1371
1462
|
try {
|
|
1372
1463
|
new Cstr(hostRef);
|
|
1373
1464
|
} catch (e) {
|
|
1374
|
-
consoleError(e);
|
|
1465
|
+
consoleError(e, elm);
|
|
1375
1466
|
}
|
|
1376
1467
|
{
|
|
1377
1468
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1406,7 +1497,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1406
1497
|
schedule();
|
|
1407
1498
|
}
|
|
1408
1499
|
};
|
|
1409
|
-
var fireConnectedCallback = (instance) => {
|
|
1500
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1410
1501
|
};
|
|
1411
1502
|
|
|
1412
1503
|
// src/runtime/connected-callback.ts
|
|
@@ -1460,7 +1551,7 @@ var setContentReference = (elm) => {
|
|
|
1460
1551
|
contentRefElm["s-cn"] = true;
|
|
1461
1552
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1462
1553
|
};
|
|
1463
|
-
var disconnectInstance = (instance) => {
|
|
1554
|
+
var disconnectInstance = (instance, elm) => {
|
|
1464
1555
|
};
|
|
1465
1556
|
var disconnectedCallback = async (elm) => {
|
|
1466
1557
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1475,6 +1566,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1475
1566
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1476
1567
|
}
|
|
1477
1568
|
}
|
|
1569
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1570
|
+
rootAppliedStyles.delete(elm);
|
|
1571
|
+
}
|
|
1572
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1573
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1574
|
+
}
|
|
1478
1575
|
};
|
|
1479
1576
|
|
|
1480
1577
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1559,6 +1656,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1559
1656
|
}
|
|
1560
1657
|
disconnectedCallback() {
|
|
1561
1658
|
plt.jmp(() => disconnectedCallback(this));
|
|
1659
|
+
plt.raf(() => {
|
|
1660
|
+
var _a3;
|
|
1661
|
+
const hostRef = getHostRef(this);
|
|
1662
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1663
|
+
if (i2 > -1) {
|
|
1664
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
1665
|
+
}
|
|
1666
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1667
|
+
delete hostRef.$vnode$.$elm$;
|
|
1668
|
+
}
|
|
1669
|
+
});
|
|
1562
1670
|
}
|
|
1563
1671
|
componentOnReady() {
|
|
1564
1672
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1625,7 +1733,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1625
1733
|
}
|
|
1626
1734
|
}
|
|
1627
1735
|
} catch (e) {
|
|
1628
|
-
consoleError(e);
|
|
1736
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1629
1737
|
}
|
|
1630
1738
|
};
|
|
1631
1739
|
var getHostListenerTarget = (elm, flags) => {
|