@everymatrix/player-elevate-level 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/bonus-elevate-levels_8.cjs.entry.js +73 -46
- package/dist/cjs/{index-7984d0a5.js → index-199914b5.js} +251 -141
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{player-elevate-card-items-7b2739c6.js → player-elevate-card-items-acfe519b.js} +1 -1
- package/dist/cjs/player-elevate-card.cjs.entry.js +21 -9
- package/dist/cjs/player-elevate-level.cjs.js +3 -3
- package/dist/cjs/player-elevate-pointcard.cjs.entry.js +29 -12
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/player-elevate-level/player-elevate-level.js +30 -6
- package/dist/esm/bonus-elevate-levels_8.entry.js +73 -46
- package/dist/esm/{index-84dc1f3a.js → index-0029392c.js} +251 -141
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{player-elevate-card-items-44f42400.js → player-elevate-card-items-01a62645.js} +1 -1
- package/dist/esm/player-elevate-card.entry.js +21 -9
- package/dist/esm/player-elevate-level.js +4 -4
- package/dist/esm/player-elevate-pointcard.entry.js +29 -12
- package/dist/player-elevate-level/p-273cd792.entry.js +1 -0
- package/dist/player-elevate-level/p-30fdef2d.js +2 -0
- package/dist/player-elevate-level/{p-7db7d79d.js → p-61624f78.js} +1 -1
- package/dist/player-elevate-level/p-927c5c3b.entry.js +1 -0
- package/dist/player-elevate-level/p-eeb6f10f.entry.js +1 -0
- package/dist/player-elevate-level/player-elevate-level.esm.js +1 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-level/.stencil/packages/stencil/player-elevate-level/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-level/.stencil/packages/stencil/player-elevate-level/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/player-elevate-level/p-424fb7ca.entry.js +0 -1
- package/dist/player-elevate-level/p-694f2995.entry.js +0 -1
- package/dist/player-elevate-level/p-91129d4d.js +0 -2
- package/dist/player-elevate-level/p-bf99f38c.entry.js +0 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/player-elevate-level/.stencil/packages/stencil/player-elevate-level/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/player-elevate-level/.stencil/packages/stencil/player-elevate-level/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-level/.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-level/.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-level/.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-level/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
const NAMESPACE = 'player-elevate-level';
|
|
2
|
-
const BUILD = /* player-elevate-level */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: 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: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
2
|
+
const BUILD = /* player-elevate-level */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: 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: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.26.0 | 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/utils/constants.ts
|
|
14
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
15
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
16
|
+
|
|
17
|
+
// src/client/client-host-ref.ts
|
|
12
18
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
13
19
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
14
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
20
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
21
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
22
|
+
};
|
|
15
23
|
var registerHost = (hostElement, cmpMeta) => {
|
|
16
24
|
const hostRef = {
|
|
17
25
|
$flags$: 0,
|
|
@@ -24,7 +32,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
24
32
|
hostElement["s-p"] = [];
|
|
25
33
|
hostElement["s-rc"] = [];
|
|
26
34
|
}
|
|
27
|
-
|
|
35
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
36
|
+
return ref;
|
|
28
37
|
};
|
|
29
38
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
30
39
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -69,16 +78,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
69
78
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
70
79
|
/* webpackMode: "lazy" */
|
|
71
80
|
`./${bundleId}.entry.js${""}`
|
|
72
|
-
).then(
|
|
73
|
-
{
|
|
74
|
-
|
|
81
|
+
).then(
|
|
82
|
+
(importedModule) => {
|
|
83
|
+
{
|
|
84
|
+
cmpModules.set(bundleId, importedModule);
|
|
85
|
+
}
|
|
86
|
+
return importedModule[exportName];
|
|
87
|
+
},
|
|
88
|
+
(e) => {
|
|
89
|
+
consoleError(e, hostRef.$hostElement$);
|
|
75
90
|
}
|
|
76
|
-
|
|
77
|
-
}, consoleError);
|
|
91
|
+
);
|
|
78
92
|
};
|
|
79
93
|
|
|
80
94
|
// src/client/client-style.ts
|
|
81
95
|
var styles = /* @__PURE__ */ new Map();
|
|
96
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
82
97
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
83
98
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
84
99
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -158,14 +173,6 @@ var getAssetPath = (path) => {
|
|
|
158
173
|
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
159
174
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
160
175
|
};
|
|
161
|
-
|
|
162
|
-
// src/utils/constants.ts
|
|
163
|
-
var EMPTY_OBJ = {};
|
|
164
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
165
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
166
|
-
|
|
167
|
-
// src/utils/helpers.ts
|
|
168
|
-
var isDef = (v) => v != null;
|
|
169
176
|
var isComplexType = (o) => {
|
|
170
177
|
o = typeof o;
|
|
171
178
|
return o === "object" || o === "function";
|
|
@@ -225,6 +232,63 @@ var unwrapErr = (result) => {
|
|
|
225
232
|
throw result.value;
|
|
226
233
|
}
|
|
227
234
|
};
|
|
235
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
236
|
+
const childNodes = elm.__childNodes || elm.childNodes;
|
|
237
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
238
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
239
|
+
var _a;
|
|
240
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
241
|
+
if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
|
|
242
|
+
slotNode.hidden = true;
|
|
243
|
+
} else {
|
|
244
|
+
slotNode.hidden = false;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
for (const childNode of childNodes) {
|
|
250
|
+
if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
|
|
251
|
+
updateFallbackSlotVisibility(childNode);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
256
|
+
let i2 = 0;
|
|
257
|
+
let slottedNodes = [];
|
|
258
|
+
let childNode;
|
|
259
|
+
for (; i2 < childNodes.length; i2++) {
|
|
260
|
+
childNode = childNodes[i2];
|
|
261
|
+
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
|
262
|
+
slottedNodes.push(childNode);
|
|
263
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
264
|
+
}
|
|
265
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
266
|
+
}
|
|
267
|
+
return slottedNodes;
|
|
268
|
+
}
|
|
269
|
+
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
|
270
|
+
const childNodes = [];
|
|
271
|
+
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
|
272
|
+
while ((node = node.nextSibling) && node["s-sn"] === slotName) {
|
|
273
|
+
childNodes.push(node);
|
|
274
|
+
}
|
|
275
|
+
return childNodes;
|
|
276
|
+
};
|
|
277
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
278
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
279
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
280
|
+
return true;
|
|
281
|
+
}
|
|
282
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
283
|
+
return true;
|
|
284
|
+
}
|
|
285
|
+
return false;
|
|
286
|
+
}
|
|
287
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
288
|
+
return true;
|
|
289
|
+
}
|
|
290
|
+
return slotName === "";
|
|
291
|
+
};
|
|
228
292
|
var createTime = (fnName, tagName = "") => {
|
|
229
293
|
{
|
|
230
294
|
return () => {
|
|
@@ -413,7 +477,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
413
477
|
}
|
|
414
478
|
if (!appliedStyles.has(scopeId2)) {
|
|
415
479
|
{
|
|
416
|
-
styleElm = doc.createElement("style");
|
|
480
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
417
481
|
styleElm.innerHTML = style;
|
|
418
482
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
419
483
|
if (nonce != null) {
|
|
@@ -423,7 +487,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
423
487
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
424
488
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
425
489
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
426
|
-
styleContainerNode.insertBefore(
|
|
490
|
+
styleContainerNode.insertBefore(
|
|
491
|
+
styleElm,
|
|
492
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
493
|
+
);
|
|
427
494
|
} else if ("host" in styleContainerNode) {
|
|
428
495
|
if (supportsConstructableStylesheets) {
|
|
429
496
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -441,7 +508,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
441
508
|
styleContainerNode.append(styleElm);
|
|
442
509
|
}
|
|
443
510
|
}
|
|
444
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
511
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
445
512
|
styleContainerNode.insertBefore(styleElm, null);
|
|
446
513
|
}
|
|
447
514
|
}
|
|
@@ -466,23 +533,25 @@ var attachStyles = (hostRef) => {
|
|
|
466
533
|
const scopeId2 = addStyle(
|
|
467
534
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
468
535
|
cmpMeta);
|
|
469
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
536
|
+
if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
|
|
470
537
|
elm["s-sc"] = scopeId2;
|
|
471
538
|
elm.classList.add(scopeId2 + "-h");
|
|
472
539
|
}
|
|
473
540
|
endAttachStyles();
|
|
474
541
|
};
|
|
475
542
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
476
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
543
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
477
544
|
if (oldValue !== newValue) {
|
|
478
545
|
let isProp = isMemberInElement(elm, memberName);
|
|
479
546
|
let ln = memberName.toLowerCase();
|
|
480
547
|
if (memberName === "class") {
|
|
481
548
|
const classList = elm.classList;
|
|
482
549
|
const oldClasses = parseClassList(oldValue);
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
550
|
+
let newClasses = parseClassList(newValue);
|
|
551
|
+
{
|
|
552
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
553
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
554
|
+
}
|
|
486
555
|
} else if (memberName === "style") {
|
|
487
556
|
{
|
|
488
557
|
for (const prop in oldValue) {
|
|
@@ -541,7 +610,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
541
610
|
elm.setAttribute(memberName, n);
|
|
542
611
|
}
|
|
543
612
|
}
|
|
544
|
-
} else {
|
|
613
|
+
} else if (elm[memberName] !== newValue) {
|
|
545
614
|
elm[memberName] = newValue;
|
|
546
615
|
}
|
|
547
616
|
} catch (e) {
|
|
@@ -563,24 +632,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
563
632
|
}
|
|
564
633
|
};
|
|
565
634
|
var parseClassListRegex = /\s/;
|
|
566
|
-
var parseClassList = (value) =>
|
|
635
|
+
var parseClassList = (value) => {
|
|
636
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
637
|
+
value = value.baseVal;
|
|
638
|
+
}
|
|
639
|
+
if (!value || typeof value !== "string") {
|
|
640
|
+
return [];
|
|
641
|
+
}
|
|
642
|
+
return value.split(parseClassListRegex);
|
|
643
|
+
};
|
|
567
644
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
568
645
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
569
646
|
|
|
570
647
|
// src/runtime/vdom/update-element.ts
|
|
571
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
648
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
572
649
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
573
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
574
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
650
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
651
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
575
652
|
{
|
|
576
653
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
577
654
|
if (!(memberName in newVnodeAttrs)) {
|
|
578
|
-
setAccessor(
|
|
655
|
+
setAccessor(
|
|
656
|
+
elm,
|
|
657
|
+
memberName,
|
|
658
|
+
oldVnodeAttrs[memberName],
|
|
659
|
+
void 0,
|
|
660
|
+
isSvgMode2,
|
|
661
|
+
newVnode.$flags$);
|
|
579
662
|
}
|
|
580
663
|
}
|
|
581
664
|
}
|
|
582
665
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
583
|
-
setAccessor(
|
|
666
|
+
setAccessor(
|
|
667
|
+
elm,
|
|
668
|
+
memberName,
|
|
669
|
+
oldVnodeAttrs[memberName],
|
|
670
|
+
newVnodeAttrs[memberName],
|
|
671
|
+
isSvgMode2,
|
|
672
|
+
newVnode.$flags$);
|
|
584
673
|
}
|
|
585
674
|
};
|
|
586
675
|
function sortedAttrNames(attrNames) {
|
|
@@ -592,16 +681,13 @@ function sortedAttrNames(attrNames) {
|
|
|
592
681
|
attrNames
|
|
593
682
|
);
|
|
594
683
|
}
|
|
595
|
-
|
|
596
|
-
// src/runtime/vdom/vdom-render.ts
|
|
597
|
-
var scopeId;
|
|
598
684
|
var contentRef;
|
|
599
685
|
var hostTagName;
|
|
600
686
|
var useNativeShadowDom = false;
|
|
601
687
|
var checkSlotFallbackVisibility = false;
|
|
602
688
|
var checkSlotRelocate = false;
|
|
603
689
|
var isSvgMode = false;
|
|
604
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
690
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
605
691
|
var _a;
|
|
606
692
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
607
693
|
let i2 = 0;
|
|
@@ -611,9 +697,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
611
697
|
if (!useNativeShadowDom) {
|
|
612
698
|
checkSlotRelocate = true;
|
|
613
699
|
if (newVNode2.$tag$ === "slot") {
|
|
614
|
-
if (scopeId) {
|
|
615
|
-
parentElm.classList.add(scopeId + "-s");
|
|
616
|
-
}
|
|
617
700
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
618
701
|
// slot element has fallback content
|
|
619
702
|
// still create an element that "mocks" the slot element
|
|
@@ -644,14 +727,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
644
727
|
{
|
|
645
728
|
updateElement(null, newVNode2, isSvgMode);
|
|
646
729
|
}
|
|
647
|
-
const rootNode = elm.getRootNode();
|
|
648
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
649
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
650
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
651
|
-
}
|
|
652
730
|
if (newVNode2.$children$) {
|
|
653
731
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
654
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
732
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
655
733
|
if (childNode) {
|
|
656
734
|
elm.appendChild(childNode);
|
|
657
735
|
}
|
|
@@ -684,7 +762,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
684
762
|
};
|
|
685
763
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
686
764
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
687
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
765
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
688
766
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
689
767
|
let node = parentElm;
|
|
690
768
|
while (node = node.nextSibling) {
|
|
@@ -696,7 +774,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
696
774
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
697
775
|
const childNode = oldSlotChildNodes[i2];
|
|
698
776
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
699
|
-
insertBefore(
|
|
777
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
700
778
|
childNode["s-ol"].remove();
|
|
701
779
|
childNode["s-ol"] = void 0;
|
|
702
780
|
childNode["s-sh"] = void 0;
|
|
@@ -716,7 +794,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
716
794
|
}
|
|
717
795
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
718
796
|
if (vnodes[startIdx]) {
|
|
719
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
797
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
720
798
|
if (childNode) {
|
|
721
799
|
vnodes[startIdx].$elm$ = childNode;
|
|
722
800
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -803,7 +881,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
803
881
|
if (idxInOld >= 0) {
|
|
804
882
|
elmToMove = oldCh[idxInOld];
|
|
805
883
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
806
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
884
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
807
885
|
} else {
|
|
808
886
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
809
887
|
oldCh[idxInOld] = void 0;
|
|
@@ -811,12 +889,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
811
889
|
}
|
|
812
890
|
newStartVnode = newCh[++newStartIdx];
|
|
813
891
|
} else {
|
|
814
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
892
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
815
893
|
newStartVnode = newCh[++newStartIdx];
|
|
816
894
|
}
|
|
817
895
|
if (node) {
|
|
818
896
|
{
|
|
819
|
-
insertBefore(
|
|
897
|
+
insertBefore(
|
|
898
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
899
|
+
node,
|
|
900
|
+
referenceNode(oldStartVnode.$elm$)
|
|
901
|
+
);
|
|
820
902
|
}
|
|
821
903
|
}
|
|
822
904
|
}
|
|
@@ -837,28 +919,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
837
919
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
838
920
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
839
921
|
if (leftVNode.$tag$ === "slot") {
|
|
840
|
-
if (
|
|
841
|
-
// The component gets hydrated and no VDOM has been initialized.
|
|
842
|
-
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
843
|
-
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
844
|
-
// hydration comments to be removed
|
|
845
|
-
leftVNode.$elm$.nodeType !== 8
|
|
846
|
-
) {
|
|
847
|
-
return false;
|
|
848
|
-
}
|
|
849
922
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
850
923
|
}
|
|
851
924
|
if (!isInitialRender) {
|
|
852
925
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
853
926
|
}
|
|
927
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
928
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
929
|
+
}
|
|
854
930
|
return true;
|
|
855
931
|
}
|
|
856
932
|
return false;
|
|
857
933
|
};
|
|
858
|
-
var referenceNode = (node) =>
|
|
859
|
-
return node && node["s-ol"] || node;
|
|
860
|
-
};
|
|
861
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
934
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
862
935
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
863
936
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
864
937
|
const oldChildren = oldVNode.$children$;
|
|
@@ -897,41 +970,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
897
970
|
elm.data = text;
|
|
898
971
|
}
|
|
899
972
|
};
|
|
900
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
901
|
-
const childNodes = elm.childNodes;
|
|
902
|
-
for (const childNode of childNodes) {
|
|
903
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
904
|
-
if (childNode["s-sr"]) {
|
|
905
|
-
const slotName = childNode["s-sn"];
|
|
906
|
-
childNode.hidden = false;
|
|
907
|
-
for (const siblingNode of childNodes) {
|
|
908
|
-
if (siblingNode !== childNode) {
|
|
909
|
-
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
910
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
911
|
-
childNode.hidden = true;
|
|
912
|
-
break;
|
|
913
|
-
}
|
|
914
|
-
} else {
|
|
915
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
916
|
-
childNode.hidden = true;
|
|
917
|
-
break;
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
updateFallbackSlotVisibility(childNode);
|
|
924
|
-
}
|
|
925
|
-
}
|
|
926
|
-
};
|
|
927
973
|
var relocateNodes = [];
|
|
928
974
|
var markSlotContentForRelocation = (elm) => {
|
|
929
975
|
let node;
|
|
930
976
|
let hostContentNodes;
|
|
931
977
|
let j;
|
|
932
|
-
|
|
978
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
979
|
+
for (const childNode of children) {
|
|
933
980
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
934
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
981
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
935
982
|
const slotName = childNode["s-sn"];
|
|
936
983
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
937
984
|
node = hostContentNodes[j];
|
|
@@ -973,21 +1020,6 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
973
1020
|
}
|
|
974
1021
|
}
|
|
975
1022
|
};
|
|
976
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
977
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
978
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
979
|
-
return true;
|
|
980
|
-
}
|
|
981
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
982
|
-
return true;
|
|
983
|
-
}
|
|
984
|
-
return false;
|
|
985
|
-
}
|
|
986
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
987
|
-
return true;
|
|
988
|
-
}
|
|
989
|
-
return slotName === "";
|
|
990
|
-
};
|
|
991
1023
|
var nullifyVNodeRefs = (vNode) => {
|
|
992
1024
|
{
|
|
993
1025
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -995,8 +1027,9 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
995
1027
|
}
|
|
996
1028
|
};
|
|
997
1029
|
var insertBefore = (parent, newNode, reference) => {
|
|
998
|
-
|
|
999
|
-
|
|
1030
|
+
{
|
|
1031
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1032
|
+
}
|
|
1000
1033
|
};
|
|
1001
1034
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1002
1035
|
var _a, _b, _c, _d;
|
|
@@ -1022,10 +1055,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1022
1055
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1023
1056
|
hostRef.$vnode$ = rootVnode;
|
|
1024
1057
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
1025
|
-
|
|
1026
|
-
scopeId = hostElm["s-sc"];
|
|
1027
|
-
}
|
|
1028
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1058
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
1029
1059
|
{
|
|
1030
1060
|
contentRef = hostElm["s-cr"];
|
|
1031
1061
|
checkSlotFallbackVisibility = false;
|
|
@@ -1053,7 +1083,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1053
1083
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1054
1084
|
while (orgLocationNode) {
|
|
1055
1085
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1056
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1086
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1057
1087
|
refNode = refNode.nextSibling;
|
|
1058
1088
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1059
1089
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1066,13 +1096,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1066
1096
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1067
1097
|
}
|
|
1068
1098
|
}
|
|
1069
|
-
|
|
1099
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1100
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1101
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1070
1102
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1071
1103
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1072
1104
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1073
1105
|
}
|
|
1074
1106
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1075
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1107
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1076
1108
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1077
1109
|
}
|
|
1078
1110
|
}
|
|
@@ -1100,7 +1132,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1100
1132
|
// src/runtime/update-component.ts
|
|
1101
1133
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1102
1134
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1103
|
-
ancestorComponent["s-p"].push(
|
|
1135
|
+
const index = ancestorComponent["s-p"].push(
|
|
1136
|
+
new Promise(
|
|
1137
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1138
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1139
|
+
r();
|
|
1140
|
+
}
|
|
1141
|
+
)
|
|
1142
|
+
);
|
|
1104
1143
|
}
|
|
1105
1144
|
};
|
|
1106
1145
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1129,16 +1168,16 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1129
1168
|
{
|
|
1130
1169
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1131
1170
|
if (hostRef.$queuedListeners$) {
|
|
1132
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1171
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1133
1172
|
hostRef.$queuedListeners$ = void 0;
|
|
1134
1173
|
}
|
|
1135
1174
|
}
|
|
1136
1175
|
{
|
|
1137
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1176
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1138
1177
|
}
|
|
1139
1178
|
}
|
|
1140
1179
|
{
|
|
1141
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
1180
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
1142
1181
|
}
|
|
1143
1182
|
endSchedule();
|
|
1144
1183
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
@@ -1206,7 +1245,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1206
1245
|
const instance = hostRef.$lazyInstance$ ;
|
|
1207
1246
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1208
1247
|
{
|
|
1209
|
-
safeCall(instance, "componentDidRender");
|
|
1248
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1210
1249
|
}
|
|
1211
1250
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1212
1251
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -1235,17 +1274,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1235
1274
|
}
|
|
1236
1275
|
};
|
|
1237
1276
|
var appDidLoad = (who) => {
|
|
1238
|
-
{
|
|
1239
|
-
addHydratedFlag(doc.documentElement);
|
|
1240
|
-
}
|
|
1241
1277
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1242
1278
|
};
|
|
1243
|
-
var safeCall = (instance, method, arg) => {
|
|
1279
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1244
1280
|
if (instance && instance[method]) {
|
|
1245
1281
|
try {
|
|
1246
1282
|
return instance[method](arg);
|
|
1247
1283
|
} catch (e) {
|
|
1248
|
-
consoleError(e);
|
|
1284
|
+
consoleError(e, elm);
|
|
1249
1285
|
}
|
|
1250
1286
|
}
|
|
1251
1287
|
return void 0;
|
|
@@ -1304,15 +1340,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1304
1340
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1305
1341
|
members.map(([memberName, [memberFlags]]) => {
|
|
1306
1342
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1343
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1344
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1345
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1346
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1347
|
+
Object.defineProperty(prototype, memberName, {
|
|
1348
|
+
get() {
|
|
1349
|
+
{
|
|
1350
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1351
|
+
return getValue(this, memberName);
|
|
1352
|
+
}
|
|
1353
|
+
const ref = getHostRef(this);
|
|
1354
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1355
|
+
if (!instance) return;
|
|
1356
|
+
return instance[memberName];
|
|
1357
|
+
}
|
|
1358
|
+
},
|
|
1359
|
+
configurable: true,
|
|
1360
|
+
enumerable: true
|
|
1361
|
+
});
|
|
1362
|
+
}
|
|
1307
1363
|
Object.defineProperty(prototype, memberName, {
|
|
1308
|
-
get() {
|
|
1309
|
-
return getValue(this, memberName);
|
|
1310
|
-
},
|
|
1311
1364
|
set(newValue) {
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1365
|
+
const ref = getHostRef(this);
|
|
1366
|
+
if (origSetter) {
|
|
1367
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1368
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1369
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1370
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1371
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1372
|
+
}
|
|
1373
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1374
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1375
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1376
|
+
return;
|
|
1377
|
+
}
|
|
1378
|
+
{
|
|
1379
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1380
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1381
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1382
|
+
ref.$onReadyPromise$.then(() => {
|
|
1383
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1384
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1385
|
+
}
|
|
1386
|
+
});
|
|
1387
|
+
}
|
|
1388
|
+
return;
|
|
1389
|
+
}
|
|
1390
|
+
const setterSetVal = () => {
|
|
1391
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1392
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1393
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1394
|
+
}
|
|
1395
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1396
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1397
|
+
};
|
|
1398
|
+
if (ref.$lazyInstance$) {
|
|
1399
|
+
setterSetVal();
|
|
1400
|
+
} else {
|
|
1401
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1316
1405
|
});
|
|
1317
1406
|
}
|
|
1318
1407
|
});
|
|
@@ -1322,7 +1411,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1322
1411
|
plt.jmp(() => {
|
|
1323
1412
|
var _a2;
|
|
1324
1413
|
const propName = attrNameToPropName.get(attrName);
|
|
1325
|
-
if (this.hasOwnProperty(propName)) {
|
|
1414
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1326
1415
|
newValue = this[propName];
|
|
1327
1416
|
delete this[propName];
|
|
1328
1417
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1342,7 +1431,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1342
1431
|
}
|
|
1343
1432
|
return;
|
|
1344
1433
|
}
|
|
1345
|
-
|
|
1434
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1435
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1436
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1437
|
+
this[propName] = newValue;
|
|
1438
|
+
}
|
|
1346
1439
|
});
|
|
1347
1440
|
};
|
|
1348
1441
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1371,7 +1464,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1371
1464
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1372
1465
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1373
1466
|
if (bundleId) {
|
|
1374
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1467
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1375
1468
|
if (CstrImport && "then" in CstrImport) {
|
|
1376
1469
|
const endLoad = uniqueTime();
|
|
1377
1470
|
Cstr = await CstrImport;
|
|
@@ -1396,7 +1489,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1396
1489
|
try {
|
|
1397
1490
|
new Cstr(hostRef);
|
|
1398
1491
|
} catch (e) {
|
|
1399
|
-
consoleError(e);
|
|
1492
|
+
consoleError(e, elm);
|
|
1400
1493
|
}
|
|
1401
1494
|
{
|
|
1402
1495
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1431,7 +1524,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1431
1524
|
schedule();
|
|
1432
1525
|
}
|
|
1433
1526
|
};
|
|
1434
|
-
var fireConnectedCallback = (instance) => {
|
|
1527
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1435
1528
|
};
|
|
1436
1529
|
|
|
1437
1530
|
// src/runtime/connected-callback.ts
|
|
@@ -1485,7 +1578,7 @@ var setContentReference = (elm) => {
|
|
|
1485
1578
|
contentRefElm["s-cn"] = true;
|
|
1486
1579
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1487
1580
|
};
|
|
1488
|
-
var disconnectInstance = (instance) => {
|
|
1581
|
+
var disconnectInstance = (instance, elm) => {
|
|
1489
1582
|
};
|
|
1490
1583
|
var disconnectedCallback = async (elm) => {
|
|
1491
1584
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1500,6 +1593,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1500
1593
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1501
1594
|
}
|
|
1502
1595
|
}
|
|
1596
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1597
|
+
rootAppliedStyles.delete(elm);
|
|
1598
|
+
}
|
|
1599
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1600
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1601
|
+
}
|
|
1503
1602
|
};
|
|
1504
1603
|
|
|
1505
1604
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1584,6 +1683,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1584
1683
|
}
|
|
1585
1684
|
disconnectedCallback() {
|
|
1586
1685
|
plt.jmp(() => disconnectedCallback(this));
|
|
1686
|
+
plt.raf(() => {
|
|
1687
|
+
var _a3;
|
|
1688
|
+
const hostRef = getHostRef(this);
|
|
1689
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1690
|
+
if (i2 > -1) {
|
|
1691
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
1692
|
+
}
|
|
1693
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1694
|
+
delete hostRef.$vnode$.$elm$;
|
|
1695
|
+
}
|
|
1696
|
+
});
|
|
1587
1697
|
}
|
|
1588
1698
|
componentOnReady() {
|
|
1589
1699
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1650,7 +1760,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1650
1760
|
}
|
|
1651
1761
|
}
|
|
1652
1762
|
} catch (e) {
|
|
1653
|
-
consoleError(e);
|
|
1763
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1654
1764
|
}
|
|
1655
1765
|
};
|
|
1656
1766
|
var getHostListenerTarget = (elm, flags) => {
|