@everymatrix/player-elevate-card 1.54.12 → 1.55.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 +32 -78
- package/dist/cjs/{index-e1db0305.js → index-fcb2d8d9.js} +138 -246
- 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 +7 -39
- package/dist/collection/components/player-elevate-card-data/player-elevate-card-data.js +5 -2
- package/dist/collection/components/player-elevate-loyaltycard/player-elevate-loyaltycard.js +7 -39
- package/dist/collection/components/player-elevate-pointcard/player-elevate-pointcard.js +10 -51
- package/dist/esm/general-styling-wrapper_5.entry.js +32 -78
- package/dist/esm/{index-29ae3408.js → index-94328d47.js} +138 -246
- package/dist/esm/loader.js +2 -2
- package/dist/esm/player-elevate-card.js +3 -3
- package/dist/player-elevate-card/p-08c2b497.entry.js +1 -0
- package/dist/player-elevate-card/p-8dfd18ff.js +2 -0
- package/dist/player-elevate-card/player-elevate-card.esm.js +1 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/stencil.config.d.ts +2 -0
- 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 +2 -0
- package/package.json +1 -1
- package/dist/player-elevate-card/p-17e5148c.js +0 -2
- package/dist/player-elevate-card/p-fbac732f.entry.js +0 -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 +0 -2
- 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 +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
const NAMESPACE = 'player-elevate-card';
|
|
2
|
-
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,
|
|
2
|
+
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 };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
9
9
|
for (var name in all)
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
// src/client/client-host-ref.ts
|
|
14
12
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
15
13
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
16
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
17
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
18
|
-
};
|
|
14
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
19
15
|
var registerHost = (hostElement, cmpMeta) => {
|
|
20
16
|
const hostRef = {
|
|
21
17
|
$flags$: 0,
|
|
@@ -28,8 +24,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
28
24
|
hostElement["s-p"] = [];
|
|
29
25
|
hostElement["s-rc"] = [];
|
|
30
26
|
}
|
|
31
|
-
|
|
32
|
-
return ref;
|
|
27
|
+
return hostRefs.set(hostElement, hostRef);
|
|
33
28
|
};
|
|
34
29
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
35
30
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -66,22 +61,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
66
61
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
67
62
|
/* webpackMode: "lazy" */
|
|
68
63
|
`./${bundleId}.entry.js${""}`
|
|
69
|
-
).then(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
cmpModules.set(bundleId, importedModule);
|
|
73
|
-
}
|
|
74
|
-
return importedModule[exportName];
|
|
75
|
-
},
|
|
76
|
-
(e) => {
|
|
77
|
-
consoleError(e, hostRef.$hostElement$);
|
|
64
|
+
).then((importedModule) => {
|
|
65
|
+
{
|
|
66
|
+
cmpModules.set(bundleId, importedModule);
|
|
78
67
|
}
|
|
79
|
-
|
|
68
|
+
return importedModule[exportName];
|
|
69
|
+
}, consoleError);
|
|
80
70
|
};
|
|
81
71
|
|
|
82
72
|
// src/client/client-style.ts
|
|
83
73
|
var styles = /* @__PURE__ */ new Map();
|
|
84
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
85
74
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
86
75
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
87
76
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -161,6 +150,12 @@ var getAssetPath = (path) => {
|
|
|
161
150
|
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
162
151
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
163
152
|
};
|
|
153
|
+
|
|
154
|
+
// src/utils/constants.ts
|
|
155
|
+
var EMPTY_OBJ = {};
|
|
156
|
+
|
|
157
|
+
// src/utils/helpers.ts
|
|
158
|
+
var isDef = (v) => v != null;
|
|
164
159
|
var isComplexType = (o) => {
|
|
165
160
|
o = typeof o;
|
|
166
161
|
return o === "object" || o === "function";
|
|
@@ -220,63 +215,6 @@ var unwrapErr = (result) => {
|
|
|
220
215
|
throw result.value;
|
|
221
216
|
}
|
|
222
217
|
};
|
|
223
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
224
|
-
const childNodes = elm.__childNodes || elm.childNodes;
|
|
225
|
-
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
226
|
-
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
227
|
-
var _a;
|
|
228
|
-
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
229
|
-
if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
|
|
230
|
-
slotNode.hidden = true;
|
|
231
|
-
} else {
|
|
232
|
-
slotNode.hidden = false;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
for (const childNode of childNodes) {
|
|
238
|
-
if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
|
|
239
|
-
updateFallbackSlotVisibility(childNode);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
244
|
-
let i2 = 0;
|
|
245
|
-
let slottedNodes = [];
|
|
246
|
-
let childNode;
|
|
247
|
-
for (; i2 < childNodes.length; i2++) {
|
|
248
|
-
childNode = childNodes[i2];
|
|
249
|
-
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
|
250
|
-
slottedNodes.push(childNode);
|
|
251
|
-
if (typeof slotName !== "undefined") return slottedNodes;
|
|
252
|
-
}
|
|
253
|
-
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
254
|
-
}
|
|
255
|
-
return slottedNodes;
|
|
256
|
-
}
|
|
257
|
-
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
|
258
|
-
const childNodes = [];
|
|
259
|
-
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
|
260
|
-
while ((node = node.nextSibling) && node["s-sn"] === slotName) {
|
|
261
|
-
childNodes.push(node);
|
|
262
|
-
}
|
|
263
|
-
return childNodes;
|
|
264
|
-
};
|
|
265
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
266
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
267
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
268
|
-
return true;
|
|
269
|
-
}
|
|
270
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
271
|
-
return true;
|
|
272
|
-
}
|
|
273
|
-
return false;
|
|
274
|
-
}
|
|
275
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
276
|
-
return true;
|
|
277
|
-
}
|
|
278
|
-
return slotName === "";
|
|
279
|
-
};
|
|
280
218
|
var createTime = (fnName, tagName = "") => {
|
|
281
219
|
{
|
|
282
220
|
return () => {
|
|
@@ -462,7 +400,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
462
400
|
}
|
|
463
401
|
if (!appliedStyles.has(scopeId2)) {
|
|
464
402
|
{
|
|
465
|
-
styleElm =
|
|
403
|
+
styleElm = doc.createElement("style");
|
|
466
404
|
styleElm.innerHTML = style;
|
|
467
405
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
468
406
|
if (nonce != null) {
|
|
@@ -472,10 +410,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
472
410
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
473
411
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
474
412
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
475
|
-
styleContainerNode.insertBefore(
|
|
476
|
-
styleElm,
|
|
477
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
478
|
-
);
|
|
413
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
479
414
|
} else if ("host" in styleContainerNode) {
|
|
480
415
|
if (supportsConstructableStylesheets) {
|
|
481
416
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -493,7 +428,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
493
428
|
styleContainerNode.append(styleElm);
|
|
494
429
|
}
|
|
495
430
|
}
|
|
496
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
431
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
497
432
|
styleContainerNode.insertBefore(styleElm, null);
|
|
498
433
|
}
|
|
499
434
|
}
|
|
@@ -518,25 +453,23 @@ var attachStyles = (hostRef) => {
|
|
|
518
453
|
const scopeId2 = addStyle(
|
|
519
454
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
520
455
|
cmpMeta);
|
|
521
|
-
if (
|
|
456
|
+
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
522
457
|
elm["s-sc"] = scopeId2;
|
|
523
458
|
elm.classList.add(scopeId2 + "-h");
|
|
524
459
|
}
|
|
525
460
|
endAttachStyles();
|
|
526
461
|
};
|
|
527
462
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
528
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
463
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
529
464
|
if (oldValue !== newValue) {
|
|
530
465
|
let isProp = isMemberInElement(elm, memberName);
|
|
531
466
|
let ln = memberName.toLowerCase();
|
|
532
467
|
if (memberName === "class") {
|
|
533
468
|
const classList = elm.classList;
|
|
534
469
|
const oldClasses = parseClassList(oldValue);
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
539
|
-
}
|
|
470
|
+
const newClasses = parseClassList(newValue);
|
|
471
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
472
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
540
473
|
} else if (memberName === "style") {
|
|
541
474
|
{
|
|
542
475
|
for (const prop in oldValue) {
|
|
@@ -591,7 +524,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
591
524
|
elm.setAttribute(memberName, n);
|
|
592
525
|
}
|
|
593
526
|
}
|
|
594
|
-
} else
|
|
527
|
+
} else {
|
|
595
528
|
elm[memberName] = newValue;
|
|
596
529
|
}
|
|
597
530
|
} catch (e) {
|
|
@@ -613,44 +546,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
613
546
|
}
|
|
614
547
|
};
|
|
615
548
|
var parseClassListRegex = /\s/;
|
|
616
|
-
var parseClassList = (value) =>
|
|
617
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
618
|
-
value = value.baseVal;
|
|
619
|
-
}
|
|
620
|
-
if (!value || typeof value !== "string") {
|
|
621
|
-
return [];
|
|
622
|
-
}
|
|
623
|
-
return value.split(parseClassListRegex);
|
|
624
|
-
};
|
|
549
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
625
550
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
626
551
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
627
552
|
|
|
628
553
|
// src/runtime/vdom/update-element.ts
|
|
629
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
554
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
630
555
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
631
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
632
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
556
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
557
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
633
558
|
{
|
|
634
559
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
635
560
|
if (!(memberName in newVnodeAttrs)) {
|
|
636
|
-
setAccessor(
|
|
637
|
-
elm,
|
|
638
|
-
memberName,
|
|
639
|
-
oldVnodeAttrs[memberName],
|
|
640
|
-
void 0,
|
|
641
|
-
isSvgMode2,
|
|
642
|
-
newVnode.$flags$);
|
|
561
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
643
562
|
}
|
|
644
563
|
}
|
|
645
564
|
}
|
|
646
565
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
647
|
-
setAccessor(
|
|
648
|
-
elm,
|
|
649
|
-
memberName,
|
|
650
|
-
oldVnodeAttrs[memberName],
|
|
651
|
-
newVnodeAttrs[memberName],
|
|
652
|
-
isSvgMode2,
|
|
653
|
-
newVnode.$flags$);
|
|
566
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
654
567
|
}
|
|
655
568
|
};
|
|
656
569
|
function sortedAttrNames(attrNames) {
|
|
@@ -662,13 +575,16 @@ function sortedAttrNames(attrNames) {
|
|
|
662
575
|
attrNames
|
|
663
576
|
);
|
|
664
577
|
}
|
|
578
|
+
|
|
579
|
+
// src/runtime/vdom/vdom-render.ts
|
|
580
|
+
var scopeId;
|
|
665
581
|
var contentRef;
|
|
666
582
|
var hostTagName;
|
|
667
583
|
var useNativeShadowDom = false;
|
|
668
584
|
var checkSlotFallbackVisibility = false;
|
|
669
585
|
var checkSlotRelocate = false;
|
|
670
586
|
var isSvgMode = false;
|
|
671
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
587
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
672
588
|
var _a;
|
|
673
589
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
674
590
|
let i2 = 0;
|
|
@@ -678,6 +594,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
678
594
|
if (!useNativeShadowDom) {
|
|
679
595
|
checkSlotRelocate = true;
|
|
680
596
|
if (newVNode2.$tag$ === "slot") {
|
|
597
|
+
if (scopeId) {
|
|
598
|
+
parentElm.classList.add(scopeId + "-s");
|
|
599
|
+
}
|
|
681
600
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
682
601
|
// slot element has fallback content
|
|
683
602
|
// still create an element that "mocks" the slot element
|
|
@@ -701,9 +620,14 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
701
620
|
{
|
|
702
621
|
updateElement(null, newVNode2, isSvgMode);
|
|
703
622
|
}
|
|
623
|
+
const rootNode = elm.getRootNode();
|
|
624
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
625
|
+
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
626
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
627
|
+
}
|
|
704
628
|
if (newVNode2.$children$) {
|
|
705
629
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
706
|
-
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
630
|
+
childNode = createElm(oldParentVNode, newVNode2, i2, elm);
|
|
707
631
|
if (childNode) {
|
|
708
632
|
elm.appendChild(childNode);
|
|
709
633
|
}
|
|
@@ -729,7 +653,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
729
653
|
};
|
|
730
654
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
731
655
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
732
|
-
const oldSlotChildNodes = Array.from(parentElm.
|
|
656
|
+
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
733
657
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
734
658
|
let node = parentElm;
|
|
735
659
|
while (node = node.nextSibling) {
|
|
@@ -741,7 +665,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
741
665
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
742
666
|
const childNode = oldSlotChildNodes[i2];
|
|
743
667
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
744
|
-
insertBefore(
|
|
668
|
+
insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
|
|
745
669
|
childNode["s-ol"].remove();
|
|
746
670
|
childNode["s-ol"] = void 0;
|
|
747
671
|
childNode["s-sh"] = void 0;
|
|
@@ -761,7 +685,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
761
685
|
}
|
|
762
686
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
763
687
|
if (vnodes[startIdx]) {
|
|
764
|
-
childNode = createElm(null, parentVNode, startIdx);
|
|
688
|
+
childNode = createElm(null, parentVNode, startIdx, parentElm);
|
|
765
689
|
if (childNode) {
|
|
766
690
|
vnodes[startIdx].$elm$ = childNode;
|
|
767
691
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -847,7 +771,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
847
771
|
if (idxInOld >= 0) {
|
|
848
772
|
elmToMove = oldCh[idxInOld];
|
|
849
773
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
850
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
774
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
|
|
851
775
|
} else {
|
|
852
776
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
853
777
|
oldCh[idxInOld] = void 0;
|
|
@@ -855,16 +779,12 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
855
779
|
}
|
|
856
780
|
newStartVnode = newCh[++newStartIdx];
|
|
857
781
|
} else {
|
|
858
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
782
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
|
|
859
783
|
newStartVnode = newCh[++newStartIdx];
|
|
860
784
|
}
|
|
861
785
|
if (node) {
|
|
862
786
|
{
|
|
863
|
-
insertBefore(
|
|
864
|
-
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
865
|
-
node,
|
|
866
|
-
referenceNode(oldStartVnode.$elm$)
|
|
867
|
-
);
|
|
787
|
+
insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
|
|
868
788
|
}
|
|
869
789
|
}
|
|
870
790
|
}
|
|
@@ -885,19 +805,28 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
885
805
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
886
806
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
887
807
|
if (leftVNode.$tag$ === "slot") {
|
|
808
|
+
if (
|
|
809
|
+
// The component gets hydrated and no VDOM has been initialized.
|
|
810
|
+
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
811
|
+
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
812
|
+
// hydration comments to be removed
|
|
813
|
+
leftVNode.$elm$.nodeType !== 8
|
|
814
|
+
) {
|
|
815
|
+
return false;
|
|
816
|
+
}
|
|
888
817
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
889
818
|
}
|
|
890
819
|
if (!isInitialRender) {
|
|
891
820
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
892
821
|
}
|
|
893
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
894
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
895
|
-
}
|
|
896
822
|
return true;
|
|
897
823
|
}
|
|
898
824
|
return false;
|
|
899
825
|
};
|
|
900
|
-
var referenceNode = (node) =>
|
|
826
|
+
var referenceNode = (node) => {
|
|
827
|
+
return node && node["s-ol"] || node;
|
|
828
|
+
};
|
|
829
|
+
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
901
830
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
902
831
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
903
832
|
const oldChildren = oldVNode.$children$;
|
|
@@ -930,15 +859,41 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
930
859
|
elm.data = text;
|
|
931
860
|
}
|
|
932
861
|
};
|
|
862
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
863
|
+
const childNodes = elm.childNodes;
|
|
864
|
+
for (const childNode of childNodes) {
|
|
865
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
866
|
+
if (childNode["s-sr"]) {
|
|
867
|
+
const slotName = childNode["s-sn"];
|
|
868
|
+
childNode.hidden = false;
|
|
869
|
+
for (const siblingNode of childNodes) {
|
|
870
|
+
if (siblingNode !== childNode) {
|
|
871
|
+
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
872
|
+
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
873
|
+
childNode.hidden = true;
|
|
874
|
+
break;
|
|
875
|
+
}
|
|
876
|
+
} else {
|
|
877
|
+
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
878
|
+
childNode.hidden = true;
|
|
879
|
+
break;
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
updateFallbackSlotVisibility(childNode);
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
};
|
|
933
889
|
var relocateNodes = [];
|
|
934
890
|
var markSlotContentForRelocation = (elm) => {
|
|
935
891
|
let node;
|
|
936
892
|
let hostContentNodes;
|
|
937
893
|
let j;
|
|
938
|
-
const
|
|
939
|
-
for (const childNode of children) {
|
|
894
|
+
for (const childNode of elm.childNodes) {
|
|
940
895
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
941
|
-
hostContentNodes = node.parentNode.
|
|
896
|
+
hostContentNodes = node.parentNode.childNodes;
|
|
942
897
|
const slotName = childNode["s-sn"];
|
|
943
898
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
944
899
|
node = hostContentNodes[j];
|
|
@@ -980,10 +935,24 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
980
935
|
}
|
|
981
936
|
}
|
|
982
937
|
};
|
|
983
|
-
var
|
|
984
|
-
{
|
|
985
|
-
|
|
938
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
939
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
940
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
941
|
+
return true;
|
|
942
|
+
}
|
|
943
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
944
|
+
return true;
|
|
945
|
+
}
|
|
946
|
+
return false;
|
|
986
947
|
}
|
|
948
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
949
|
+
return true;
|
|
950
|
+
}
|
|
951
|
+
return slotName === "";
|
|
952
|
+
};
|
|
953
|
+
var insertBefore = (parent, newNode, reference) => {
|
|
954
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
955
|
+
return inserted;
|
|
987
956
|
};
|
|
988
957
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
989
958
|
var _a, _b, _c, _d;
|
|
@@ -1009,7 +978,10 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1009
978
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1010
979
|
hostRef.$vnode$ = rootVnode;
|
|
1011
980
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
1012
|
-
|
|
981
|
+
{
|
|
982
|
+
scopeId = hostElm["s-sc"];
|
|
983
|
+
}
|
|
984
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1013
985
|
{
|
|
1014
986
|
contentRef = hostElm["s-cr"];
|
|
1015
987
|
checkSlotFallbackVisibility = false;
|
|
@@ -1037,7 +1009,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1037
1009
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1038
1010
|
while (orgLocationNode) {
|
|
1039
1011
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1040
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef ===
|
|
1012
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1041
1013
|
refNode = refNode.nextSibling;
|
|
1042
1014
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1043
1015
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1050,15 +1022,13 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1050
1022
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1051
1023
|
}
|
|
1052
1024
|
}
|
|
1053
|
-
|
|
1054
|
-
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1055
|
-
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1025
|
+
if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
1056
1026
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1057
1027
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1058
1028
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1059
1029
|
}
|
|
1060
1030
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1061
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */
|
|
1031
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1062
1032
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1063
1033
|
}
|
|
1064
1034
|
}
|
|
@@ -1086,14 +1056,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1086
1056
|
// src/runtime/update-component.ts
|
|
1087
1057
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1088
1058
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1089
|
-
|
|
1090
|
-
new Promise(
|
|
1091
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1092
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1093
|
-
r();
|
|
1094
|
-
}
|
|
1095
|
-
)
|
|
1096
|
-
);
|
|
1059
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
1097
1060
|
}
|
|
1098
1061
|
};
|
|
1099
1062
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1122,12 +1085,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1122
1085
|
{
|
|
1123
1086
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1124
1087
|
if (hostRef.$queuedListeners$) {
|
|
1125
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event
|
|
1088
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1126
1089
|
hostRef.$queuedListeners$ = void 0;
|
|
1127
1090
|
}
|
|
1128
1091
|
}
|
|
1129
1092
|
{
|
|
1130
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
|
1093
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1131
1094
|
}
|
|
1132
1095
|
}
|
|
1133
1096
|
endSchedule();
|
|
@@ -1196,7 +1159,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1196
1159
|
const instance = hostRef.$lazyInstance$ ;
|
|
1197
1160
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1198
1161
|
{
|
|
1199
|
-
safeCall(instance, "componentDidRender"
|
|
1162
|
+
safeCall(instance, "componentDidRender");
|
|
1200
1163
|
}
|
|
1201
1164
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1202
1165
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -1225,14 +1188,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1225
1188
|
}
|
|
1226
1189
|
};
|
|
1227
1190
|
var appDidLoad = (who) => {
|
|
1191
|
+
{
|
|
1192
|
+
addHydratedFlag(doc.documentElement);
|
|
1193
|
+
}
|
|
1228
1194
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1229
1195
|
};
|
|
1230
|
-
var safeCall = (instance, method, arg
|
|
1196
|
+
var safeCall = (instance, method, arg) => {
|
|
1231
1197
|
if (instance && instance[method]) {
|
|
1232
1198
|
try {
|
|
1233
1199
|
return instance[method](arg);
|
|
1234
1200
|
} catch (e) {
|
|
1235
|
-
consoleError(e
|
|
1201
|
+
consoleError(e);
|
|
1236
1202
|
}
|
|
1237
1203
|
}
|
|
1238
1204
|
return void 0;
|
|
@@ -1291,68 +1257,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1291
1257
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1292
1258
|
members.map(([memberName, [memberFlags]]) => {
|
|
1293
1259
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1294
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1295
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1296
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1297
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1298
|
-
Object.defineProperty(prototype, memberName, {
|
|
1299
|
-
get() {
|
|
1300
|
-
{
|
|
1301
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1302
|
-
return getValue(this, memberName);
|
|
1303
|
-
}
|
|
1304
|
-
const ref = getHostRef(this);
|
|
1305
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1306
|
-
if (!instance) return;
|
|
1307
|
-
return instance[memberName];
|
|
1308
|
-
}
|
|
1309
|
-
},
|
|
1310
|
-
configurable: true,
|
|
1311
|
-
enumerable: true
|
|
1312
|
-
});
|
|
1313
|
-
}
|
|
1314
1260
|
Object.defineProperty(prototype, memberName, {
|
|
1261
|
+
get() {
|
|
1262
|
+
return getValue(this, memberName);
|
|
1263
|
+
},
|
|
1315
1264
|
set(newValue) {
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
1321
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1322
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1323
|
-
}
|
|
1324
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1325
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1326
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1327
|
-
return;
|
|
1328
|
-
}
|
|
1329
|
-
{
|
|
1330
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1331
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1332
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1333
|
-
ref.$onReadyPromise$.then(() => {
|
|
1334
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1335
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
1336
|
-
}
|
|
1337
|
-
});
|
|
1338
|
-
}
|
|
1339
|
-
return;
|
|
1340
|
-
}
|
|
1341
|
-
const setterSetVal = () => {
|
|
1342
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
1343
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1344
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1345
|
-
}
|
|
1346
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1347
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1348
|
-
};
|
|
1349
|
-
if (ref.$lazyInstance$) {
|
|
1350
|
-
setterSetVal();
|
|
1351
|
-
} else {
|
|
1352
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1355
|
-
}
|
|
1265
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1266
|
+
},
|
|
1267
|
+
configurable: true,
|
|
1268
|
+
enumerable: true
|
|
1356
1269
|
});
|
|
1357
1270
|
}
|
|
1358
1271
|
});
|
|
@@ -1362,7 +1275,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1362
1275
|
plt.jmp(() => {
|
|
1363
1276
|
var _a2;
|
|
1364
1277
|
const propName = attrNameToPropName.get(attrName);
|
|
1365
|
-
if (this.hasOwnProperty(propName)
|
|
1278
|
+
if (this.hasOwnProperty(propName)) {
|
|
1366
1279
|
newValue = this[propName];
|
|
1367
1280
|
delete this[propName];
|
|
1368
1281
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1382,11 +1295,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1382
1295
|
}
|
|
1383
1296
|
return;
|
|
1384
1297
|
}
|
|
1385
|
-
|
|
1386
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1387
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1388
|
-
this[propName] = newValue;
|
|
1389
|
-
}
|
|
1298
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1390
1299
|
});
|
|
1391
1300
|
};
|
|
1392
1301
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1415,7 +1324,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1415
1324
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1416
1325
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1417
1326
|
if (bundleId) {
|
|
1418
|
-
const CstrImport = loadModule(cmpMeta
|
|
1327
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1419
1328
|
if (CstrImport && "then" in CstrImport) {
|
|
1420
1329
|
const endLoad = uniqueTime();
|
|
1421
1330
|
Cstr = await CstrImport;
|
|
@@ -1440,7 +1349,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1440
1349
|
try {
|
|
1441
1350
|
new Cstr(hostRef);
|
|
1442
1351
|
} catch (e) {
|
|
1443
|
-
consoleError(e
|
|
1352
|
+
consoleError(e);
|
|
1444
1353
|
}
|
|
1445
1354
|
{
|
|
1446
1355
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1475,7 +1384,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1475
1384
|
schedule();
|
|
1476
1385
|
}
|
|
1477
1386
|
};
|
|
1478
|
-
var fireConnectedCallback = (instance
|
|
1387
|
+
var fireConnectedCallback = (instance) => {
|
|
1479
1388
|
};
|
|
1480
1389
|
|
|
1481
1390
|
// src/runtime/connected-callback.ts
|
|
@@ -1529,7 +1438,7 @@ var setContentReference = (elm) => {
|
|
|
1529
1438
|
contentRefElm["s-cn"] = true;
|
|
1530
1439
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1531
1440
|
};
|
|
1532
|
-
var disconnectInstance = (instance
|
|
1441
|
+
var disconnectInstance = (instance) => {
|
|
1533
1442
|
};
|
|
1534
1443
|
var disconnectedCallback = async (elm) => {
|
|
1535
1444
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1544,12 +1453,6 @@ var disconnectedCallback = async (elm) => {
|
|
|
1544
1453
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1545
1454
|
}
|
|
1546
1455
|
}
|
|
1547
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1548
|
-
rootAppliedStyles.delete(elm);
|
|
1549
|
-
}
|
|
1550
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1551
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1552
|
-
}
|
|
1553
1456
|
};
|
|
1554
1457
|
|
|
1555
1458
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1634,17 +1537,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1634
1537
|
}
|
|
1635
1538
|
disconnectedCallback() {
|
|
1636
1539
|
plt.jmp(() => disconnectedCallback(this));
|
|
1637
|
-
plt.raf(() => {
|
|
1638
|
-
var _a3;
|
|
1639
|
-
const hostRef = getHostRef(this);
|
|
1640
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1641
|
-
if (i2 > -1) {
|
|
1642
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1643
|
-
}
|
|
1644
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1645
|
-
delete hostRef.$vnode$.$elm$;
|
|
1646
|
-
}
|
|
1647
|
-
});
|
|
1648
1540
|
}
|
|
1649
1541
|
componentOnReady() {
|
|
1650
1542
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1711,7 +1603,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1711
1603
|
}
|
|
1712
1604
|
}
|
|
1713
1605
|
} catch (e) {
|
|
1714
|
-
consoleError(e
|
|
1606
|
+
consoleError(e);
|
|
1715
1607
|
}
|
|
1716
1608
|
};
|
|
1717
1609
|
var getHostListenerTarget = (elm, flags) => {
|