@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
|
@@ -21,19 +21,27 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'player-elevate-level';
|
|
24
|
-
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 };
|
|
24
|
+
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 };
|
|
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/utils/constants.ts
|
|
36
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
37
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
38
|
+
|
|
39
|
+
// src/client/client-host-ref.ts
|
|
34
40
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
35
41
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
36
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
42
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
43
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
44
|
+
};
|
|
37
45
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
46
|
const hostRef = {
|
|
39
47
|
$flags$: 0,
|
|
@@ -46,7 +54,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
54
|
hostElement["s-p"] = [];
|
|
47
55
|
hostElement["s-rc"] = [];
|
|
48
56
|
}
|
|
49
|
-
|
|
57
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
58
|
+
return ref;
|
|
50
59
|
};
|
|
51
60
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
61
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -91,16 +100,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
91
100
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
92
101
|
/* webpackMode: "lazy" */
|
|
93
102
|
`./${bundleId}.entry.js${""}`
|
|
94
|
-
)); }).then(
|
|
95
|
-
{
|
|
96
|
-
|
|
103
|
+
)); }).then(
|
|
104
|
+
(importedModule) => {
|
|
105
|
+
{
|
|
106
|
+
cmpModules.set(bundleId, importedModule);
|
|
107
|
+
}
|
|
108
|
+
return importedModule[exportName];
|
|
109
|
+
},
|
|
110
|
+
(e) => {
|
|
111
|
+
consoleError(e, hostRef.$hostElement$);
|
|
97
112
|
}
|
|
98
|
-
|
|
99
|
-
}, consoleError);
|
|
113
|
+
);
|
|
100
114
|
};
|
|
101
115
|
|
|
102
116
|
// src/client/client-style.ts
|
|
103
117
|
var styles = /* @__PURE__ */ new Map();
|
|
118
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
104
119
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
105
120
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
106
121
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -180,14 +195,6 @@ var getAssetPath = (path) => {
|
|
|
180
195
|
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
181
196
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
182
197
|
};
|
|
183
|
-
|
|
184
|
-
// src/utils/constants.ts
|
|
185
|
-
var EMPTY_OBJ = {};
|
|
186
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
187
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
188
|
-
|
|
189
|
-
// src/utils/helpers.ts
|
|
190
|
-
var isDef = (v) => v != null;
|
|
191
198
|
var isComplexType = (o) => {
|
|
192
199
|
o = typeof o;
|
|
193
200
|
return o === "object" || o === "function";
|
|
@@ -247,6 +254,63 @@ var unwrapErr = (result) => {
|
|
|
247
254
|
throw result.value;
|
|
248
255
|
}
|
|
249
256
|
};
|
|
257
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
258
|
+
const childNodes = elm.__childNodes || elm.childNodes;
|
|
259
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
260
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
261
|
+
var _a;
|
|
262
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
263
|
+
if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
|
|
264
|
+
slotNode.hidden = true;
|
|
265
|
+
} else {
|
|
266
|
+
slotNode.hidden = false;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
for (const childNode of childNodes) {
|
|
272
|
+
if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
|
|
273
|
+
updateFallbackSlotVisibility(childNode);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
278
|
+
let i2 = 0;
|
|
279
|
+
let slottedNodes = [];
|
|
280
|
+
let childNode;
|
|
281
|
+
for (; i2 < childNodes.length; i2++) {
|
|
282
|
+
childNode = childNodes[i2];
|
|
283
|
+
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
|
284
|
+
slottedNodes.push(childNode);
|
|
285
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
286
|
+
}
|
|
287
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
288
|
+
}
|
|
289
|
+
return slottedNodes;
|
|
290
|
+
}
|
|
291
|
+
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
|
292
|
+
const childNodes = [];
|
|
293
|
+
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
|
294
|
+
while ((node = node.nextSibling) && node["s-sn"] === slotName) {
|
|
295
|
+
childNodes.push(node);
|
|
296
|
+
}
|
|
297
|
+
return childNodes;
|
|
298
|
+
};
|
|
299
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
300
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
301
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
302
|
+
return true;
|
|
303
|
+
}
|
|
304
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
305
|
+
return true;
|
|
306
|
+
}
|
|
307
|
+
return false;
|
|
308
|
+
}
|
|
309
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
310
|
+
return true;
|
|
311
|
+
}
|
|
312
|
+
return slotName === "";
|
|
313
|
+
};
|
|
250
314
|
var createTime = (fnName, tagName = "") => {
|
|
251
315
|
{
|
|
252
316
|
return () => {
|
|
@@ -435,7 +499,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
435
499
|
}
|
|
436
500
|
if (!appliedStyles.has(scopeId2)) {
|
|
437
501
|
{
|
|
438
|
-
styleElm = doc.createElement("style");
|
|
502
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
439
503
|
styleElm.innerHTML = style;
|
|
440
504
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
441
505
|
if (nonce != null) {
|
|
@@ -445,7 +509,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
445
509
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
446
510
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
447
511
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
448
|
-
styleContainerNode.insertBefore(
|
|
512
|
+
styleContainerNode.insertBefore(
|
|
513
|
+
styleElm,
|
|
514
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
515
|
+
);
|
|
449
516
|
} else if ("host" in styleContainerNode) {
|
|
450
517
|
if (supportsConstructableStylesheets) {
|
|
451
518
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -463,7 +530,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
463
530
|
styleContainerNode.append(styleElm);
|
|
464
531
|
}
|
|
465
532
|
}
|
|
466
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
533
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
467
534
|
styleContainerNode.insertBefore(styleElm, null);
|
|
468
535
|
}
|
|
469
536
|
}
|
|
@@ -488,23 +555,25 @@ var attachStyles = (hostRef) => {
|
|
|
488
555
|
const scopeId2 = addStyle(
|
|
489
556
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
490
557
|
cmpMeta);
|
|
491
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
558
|
+
if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
|
|
492
559
|
elm["s-sc"] = scopeId2;
|
|
493
560
|
elm.classList.add(scopeId2 + "-h");
|
|
494
561
|
}
|
|
495
562
|
endAttachStyles();
|
|
496
563
|
};
|
|
497
564
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
498
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
565
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
499
566
|
if (oldValue !== newValue) {
|
|
500
567
|
let isProp = isMemberInElement(elm, memberName);
|
|
501
568
|
let ln = memberName.toLowerCase();
|
|
502
569
|
if (memberName === "class") {
|
|
503
570
|
const classList = elm.classList;
|
|
504
571
|
const oldClasses = parseClassList(oldValue);
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
572
|
+
let newClasses = parseClassList(newValue);
|
|
573
|
+
{
|
|
574
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
575
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
576
|
+
}
|
|
508
577
|
} else if (memberName === "style") {
|
|
509
578
|
{
|
|
510
579
|
for (const prop in oldValue) {
|
|
@@ -563,7 +632,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
563
632
|
elm.setAttribute(memberName, n);
|
|
564
633
|
}
|
|
565
634
|
}
|
|
566
|
-
} else {
|
|
635
|
+
} else if (elm[memberName] !== newValue) {
|
|
567
636
|
elm[memberName] = newValue;
|
|
568
637
|
}
|
|
569
638
|
} catch (e) {
|
|
@@ -585,24 +654,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
585
654
|
}
|
|
586
655
|
};
|
|
587
656
|
var parseClassListRegex = /\s/;
|
|
588
|
-
var parseClassList = (value) =>
|
|
657
|
+
var parseClassList = (value) => {
|
|
658
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
659
|
+
value = value.baseVal;
|
|
660
|
+
}
|
|
661
|
+
if (!value || typeof value !== "string") {
|
|
662
|
+
return [];
|
|
663
|
+
}
|
|
664
|
+
return value.split(parseClassListRegex);
|
|
665
|
+
};
|
|
589
666
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
590
667
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
591
668
|
|
|
592
669
|
// src/runtime/vdom/update-element.ts
|
|
593
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
670
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
594
671
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
595
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
596
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
672
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
673
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
597
674
|
{
|
|
598
675
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
599
676
|
if (!(memberName in newVnodeAttrs)) {
|
|
600
|
-
setAccessor(
|
|
677
|
+
setAccessor(
|
|
678
|
+
elm,
|
|
679
|
+
memberName,
|
|
680
|
+
oldVnodeAttrs[memberName],
|
|
681
|
+
void 0,
|
|
682
|
+
isSvgMode2,
|
|
683
|
+
newVnode.$flags$);
|
|
601
684
|
}
|
|
602
685
|
}
|
|
603
686
|
}
|
|
604
687
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
605
|
-
setAccessor(
|
|
688
|
+
setAccessor(
|
|
689
|
+
elm,
|
|
690
|
+
memberName,
|
|
691
|
+
oldVnodeAttrs[memberName],
|
|
692
|
+
newVnodeAttrs[memberName],
|
|
693
|
+
isSvgMode2,
|
|
694
|
+
newVnode.$flags$);
|
|
606
695
|
}
|
|
607
696
|
};
|
|
608
697
|
function sortedAttrNames(attrNames) {
|
|
@@ -614,16 +703,13 @@ function sortedAttrNames(attrNames) {
|
|
|
614
703
|
attrNames
|
|
615
704
|
);
|
|
616
705
|
}
|
|
617
|
-
|
|
618
|
-
// src/runtime/vdom/vdom-render.ts
|
|
619
|
-
var scopeId;
|
|
620
706
|
var contentRef;
|
|
621
707
|
var hostTagName;
|
|
622
708
|
var useNativeShadowDom = false;
|
|
623
709
|
var checkSlotFallbackVisibility = false;
|
|
624
710
|
var checkSlotRelocate = false;
|
|
625
711
|
var isSvgMode = false;
|
|
626
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
712
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
627
713
|
var _a;
|
|
628
714
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
629
715
|
let i2 = 0;
|
|
@@ -633,9 +719,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
633
719
|
if (!useNativeShadowDom) {
|
|
634
720
|
checkSlotRelocate = true;
|
|
635
721
|
if (newVNode2.$tag$ === "slot") {
|
|
636
|
-
if (scopeId) {
|
|
637
|
-
parentElm.classList.add(scopeId + "-s");
|
|
638
|
-
}
|
|
639
722
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
640
723
|
// slot element has fallback content
|
|
641
724
|
// still create an element that "mocks" the slot element
|
|
@@ -666,14 +749,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
666
749
|
{
|
|
667
750
|
updateElement(null, newVNode2, isSvgMode);
|
|
668
751
|
}
|
|
669
|
-
const rootNode = elm.getRootNode();
|
|
670
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
671
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
672
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
673
|
-
}
|
|
674
752
|
if (newVNode2.$children$) {
|
|
675
753
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
676
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
754
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
677
755
|
if (childNode) {
|
|
678
756
|
elm.appendChild(childNode);
|
|
679
757
|
}
|
|
@@ -706,7 +784,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
706
784
|
};
|
|
707
785
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
708
786
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
709
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
787
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
710
788
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
711
789
|
let node = parentElm;
|
|
712
790
|
while (node = node.nextSibling) {
|
|
@@ -718,7 +796,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
718
796
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
719
797
|
const childNode = oldSlotChildNodes[i2];
|
|
720
798
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
721
|
-
insertBefore(
|
|
799
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
722
800
|
childNode["s-ol"].remove();
|
|
723
801
|
childNode["s-ol"] = void 0;
|
|
724
802
|
childNode["s-sh"] = void 0;
|
|
@@ -738,7 +816,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
738
816
|
}
|
|
739
817
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
740
818
|
if (vnodes[startIdx]) {
|
|
741
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
819
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
742
820
|
if (childNode) {
|
|
743
821
|
vnodes[startIdx].$elm$ = childNode;
|
|
744
822
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -825,7 +903,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
825
903
|
if (idxInOld >= 0) {
|
|
826
904
|
elmToMove = oldCh[idxInOld];
|
|
827
905
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
828
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
906
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
829
907
|
} else {
|
|
830
908
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
831
909
|
oldCh[idxInOld] = void 0;
|
|
@@ -833,12 +911,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
833
911
|
}
|
|
834
912
|
newStartVnode = newCh[++newStartIdx];
|
|
835
913
|
} else {
|
|
836
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
914
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
837
915
|
newStartVnode = newCh[++newStartIdx];
|
|
838
916
|
}
|
|
839
917
|
if (node) {
|
|
840
918
|
{
|
|
841
|
-
insertBefore(
|
|
919
|
+
insertBefore(
|
|
920
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
921
|
+
node,
|
|
922
|
+
referenceNode(oldStartVnode.$elm$)
|
|
923
|
+
);
|
|
842
924
|
}
|
|
843
925
|
}
|
|
844
926
|
}
|
|
@@ -859,28 +941,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
859
941
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
860
942
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
861
943
|
if (leftVNode.$tag$ === "slot") {
|
|
862
|
-
if (
|
|
863
|
-
// The component gets hydrated and no VDOM has been initialized.
|
|
864
|
-
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
865
|
-
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
866
|
-
// hydration comments to be removed
|
|
867
|
-
leftVNode.$elm$.nodeType !== 8
|
|
868
|
-
) {
|
|
869
|
-
return false;
|
|
870
|
-
}
|
|
871
944
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
872
945
|
}
|
|
873
946
|
if (!isInitialRender) {
|
|
874
947
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
875
948
|
}
|
|
949
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
950
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
951
|
+
}
|
|
876
952
|
return true;
|
|
877
953
|
}
|
|
878
954
|
return false;
|
|
879
955
|
};
|
|
880
|
-
var referenceNode = (node) =>
|
|
881
|
-
return node && node["s-ol"] || node;
|
|
882
|
-
};
|
|
883
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
956
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
884
957
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
885
958
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
886
959
|
const oldChildren = oldVNode.$children$;
|
|
@@ -919,41 +992,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
919
992
|
elm.data = text;
|
|
920
993
|
}
|
|
921
994
|
};
|
|
922
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
923
|
-
const childNodes = elm.childNodes;
|
|
924
|
-
for (const childNode of childNodes) {
|
|
925
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
926
|
-
if (childNode["s-sr"]) {
|
|
927
|
-
const slotName = childNode["s-sn"];
|
|
928
|
-
childNode.hidden = false;
|
|
929
|
-
for (const siblingNode of childNodes) {
|
|
930
|
-
if (siblingNode !== childNode) {
|
|
931
|
-
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
932
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
933
|
-
childNode.hidden = true;
|
|
934
|
-
break;
|
|
935
|
-
}
|
|
936
|
-
} else {
|
|
937
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
938
|
-
childNode.hidden = true;
|
|
939
|
-
break;
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
updateFallbackSlotVisibility(childNode);
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
};
|
|
949
995
|
var relocateNodes = [];
|
|
950
996
|
var markSlotContentForRelocation = (elm) => {
|
|
951
997
|
let node;
|
|
952
998
|
let hostContentNodes;
|
|
953
999
|
let j;
|
|
954
|
-
|
|
1000
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
1001
|
+
for (const childNode of children) {
|
|
955
1002
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
956
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
1003
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
957
1004
|
const slotName = childNode["s-sn"];
|
|
958
1005
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
959
1006
|
node = hostContentNodes[j];
|
|
@@ -995,21 +1042,6 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
995
1042
|
}
|
|
996
1043
|
}
|
|
997
1044
|
};
|
|
998
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
999
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1000
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
1001
|
-
return true;
|
|
1002
|
-
}
|
|
1003
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
1004
|
-
return true;
|
|
1005
|
-
}
|
|
1006
|
-
return false;
|
|
1007
|
-
}
|
|
1008
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
1009
|
-
return true;
|
|
1010
|
-
}
|
|
1011
|
-
return slotName === "";
|
|
1012
|
-
};
|
|
1013
1045
|
var nullifyVNodeRefs = (vNode) => {
|
|
1014
1046
|
{
|
|
1015
1047
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -1017,8 +1049,9 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
1017
1049
|
}
|
|
1018
1050
|
};
|
|
1019
1051
|
var insertBefore = (parent, newNode, reference) => {
|
|
1020
|
-
|
|
1021
|
-
|
|
1052
|
+
{
|
|
1053
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1054
|
+
}
|
|
1022
1055
|
};
|
|
1023
1056
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1024
1057
|
var _a, _b, _c, _d;
|
|
@@ -1044,10 +1077,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1044
1077
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1045
1078
|
hostRef.$vnode$ = rootVnode;
|
|
1046
1079
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
1047
|
-
|
|
1048
|
-
scopeId = hostElm["s-sc"];
|
|
1049
|
-
}
|
|
1050
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1080
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
1051
1081
|
{
|
|
1052
1082
|
contentRef = hostElm["s-cr"];
|
|
1053
1083
|
checkSlotFallbackVisibility = false;
|
|
@@ -1075,7 +1105,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1075
1105
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1076
1106
|
while (orgLocationNode) {
|
|
1077
1107
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1078
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1108
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1079
1109
|
refNode = refNode.nextSibling;
|
|
1080
1110
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1081
1111
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1088,13 +1118,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1088
1118
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1089
1119
|
}
|
|
1090
1120
|
}
|
|
1091
|
-
|
|
1121
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1122
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1123
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1092
1124
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1093
1125
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1094
1126
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1095
1127
|
}
|
|
1096
1128
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1097
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1129
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1098
1130
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1099
1131
|
}
|
|
1100
1132
|
}
|
|
@@ -1122,7 +1154,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1122
1154
|
// src/runtime/update-component.ts
|
|
1123
1155
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1124
1156
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1125
|
-
ancestorComponent["s-p"].push(
|
|
1157
|
+
const index = ancestorComponent["s-p"].push(
|
|
1158
|
+
new Promise(
|
|
1159
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1160
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1161
|
+
r();
|
|
1162
|
+
}
|
|
1163
|
+
)
|
|
1164
|
+
);
|
|
1126
1165
|
}
|
|
1127
1166
|
};
|
|
1128
1167
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1151,16 +1190,16 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1151
1190
|
{
|
|
1152
1191
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1153
1192
|
if (hostRef.$queuedListeners$) {
|
|
1154
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1193
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1155
1194
|
hostRef.$queuedListeners$ = void 0;
|
|
1156
1195
|
}
|
|
1157
1196
|
}
|
|
1158
1197
|
{
|
|
1159
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1198
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1160
1199
|
}
|
|
1161
1200
|
}
|
|
1162
1201
|
{
|
|
1163
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
|
1202
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
1164
1203
|
}
|
|
1165
1204
|
endSchedule();
|
|
1166
1205
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
@@ -1228,7 +1267,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1228
1267
|
const instance = hostRef.$lazyInstance$ ;
|
|
1229
1268
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1230
1269
|
{
|
|
1231
|
-
safeCall(instance, "componentDidRender");
|
|
1270
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1232
1271
|
}
|
|
1233
1272
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1234
1273
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -1257,17 +1296,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1257
1296
|
}
|
|
1258
1297
|
};
|
|
1259
1298
|
var appDidLoad = (who) => {
|
|
1260
|
-
{
|
|
1261
|
-
addHydratedFlag(doc.documentElement);
|
|
1262
|
-
}
|
|
1263
1299
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1264
1300
|
};
|
|
1265
|
-
var safeCall = (instance, method, arg) => {
|
|
1301
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1266
1302
|
if (instance && instance[method]) {
|
|
1267
1303
|
try {
|
|
1268
1304
|
return instance[method](arg);
|
|
1269
1305
|
} catch (e) {
|
|
1270
|
-
consoleError(e);
|
|
1306
|
+
consoleError(e, elm);
|
|
1271
1307
|
}
|
|
1272
1308
|
}
|
|
1273
1309
|
return void 0;
|
|
@@ -1326,15 +1362,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1326
1362
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1327
1363
|
members.map(([memberName, [memberFlags]]) => {
|
|
1328
1364
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1365
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1366
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1367
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1368
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1369
|
+
Object.defineProperty(prototype, memberName, {
|
|
1370
|
+
get() {
|
|
1371
|
+
{
|
|
1372
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1373
|
+
return getValue(this, memberName);
|
|
1374
|
+
}
|
|
1375
|
+
const ref = getHostRef(this);
|
|
1376
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1377
|
+
if (!instance) return;
|
|
1378
|
+
return instance[memberName];
|
|
1379
|
+
}
|
|
1380
|
+
},
|
|
1381
|
+
configurable: true,
|
|
1382
|
+
enumerable: true
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1329
1385
|
Object.defineProperty(prototype, memberName, {
|
|
1330
|
-
get() {
|
|
1331
|
-
return getValue(this, memberName);
|
|
1332
|
-
},
|
|
1333
1386
|
set(newValue) {
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1387
|
+
const ref = getHostRef(this);
|
|
1388
|
+
if (origSetter) {
|
|
1389
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1390
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1391
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1392
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1393
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1394
|
+
}
|
|
1395
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1396
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1397
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1398
|
+
return;
|
|
1399
|
+
}
|
|
1400
|
+
{
|
|
1401
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1402
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1403
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1404
|
+
ref.$onReadyPromise$.then(() => {
|
|
1405
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1406
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1407
|
+
}
|
|
1408
|
+
});
|
|
1409
|
+
}
|
|
1410
|
+
return;
|
|
1411
|
+
}
|
|
1412
|
+
const setterSetVal = () => {
|
|
1413
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1414
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1415
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1416
|
+
}
|
|
1417
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1418
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1419
|
+
};
|
|
1420
|
+
if (ref.$lazyInstance$) {
|
|
1421
|
+
setterSetVal();
|
|
1422
|
+
} else {
|
|
1423
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1338
1427
|
});
|
|
1339
1428
|
}
|
|
1340
1429
|
});
|
|
@@ -1344,7 +1433,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1344
1433
|
plt.jmp(() => {
|
|
1345
1434
|
var _a2;
|
|
1346
1435
|
const propName = attrNameToPropName.get(attrName);
|
|
1347
|
-
if (this.hasOwnProperty(propName)) {
|
|
1436
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1348
1437
|
newValue = this[propName];
|
|
1349
1438
|
delete this[propName];
|
|
1350
1439
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1364,7 +1453,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1364
1453
|
}
|
|
1365
1454
|
return;
|
|
1366
1455
|
}
|
|
1367
|
-
|
|
1456
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1457
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1458
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1459
|
+
this[propName] = newValue;
|
|
1460
|
+
}
|
|
1368
1461
|
});
|
|
1369
1462
|
};
|
|
1370
1463
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1393,7 +1486,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1393
1486
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1394
1487
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1395
1488
|
if (bundleId) {
|
|
1396
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1489
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1397
1490
|
if (CstrImport && "then" in CstrImport) {
|
|
1398
1491
|
const endLoad = uniqueTime();
|
|
1399
1492
|
Cstr = await CstrImport;
|
|
@@ -1418,7 +1511,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1418
1511
|
try {
|
|
1419
1512
|
new Cstr(hostRef);
|
|
1420
1513
|
} catch (e) {
|
|
1421
|
-
consoleError(e);
|
|
1514
|
+
consoleError(e, elm);
|
|
1422
1515
|
}
|
|
1423
1516
|
{
|
|
1424
1517
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1453,7 +1546,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1453
1546
|
schedule();
|
|
1454
1547
|
}
|
|
1455
1548
|
};
|
|
1456
|
-
var fireConnectedCallback = (instance) => {
|
|
1549
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1457
1550
|
};
|
|
1458
1551
|
|
|
1459
1552
|
// src/runtime/connected-callback.ts
|
|
@@ -1507,7 +1600,7 @@ var setContentReference = (elm) => {
|
|
|
1507
1600
|
contentRefElm["s-cn"] = true;
|
|
1508
1601
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1509
1602
|
};
|
|
1510
|
-
var disconnectInstance = (instance) => {
|
|
1603
|
+
var disconnectInstance = (instance, elm) => {
|
|
1511
1604
|
};
|
|
1512
1605
|
var disconnectedCallback = async (elm) => {
|
|
1513
1606
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1522,6 +1615,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1522
1615
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1523
1616
|
}
|
|
1524
1617
|
}
|
|
1618
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1619
|
+
rootAppliedStyles.delete(elm);
|
|
1620
|
+
}
|
|
1621
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1622
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1623
|
+
}
|
|
1525
1624
|
};
|
|
1526
1625
|
|
|
1527
1626
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1606,6 +1705,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1606
1705
|
}
|
|
1607
1706
|
disconnectedCallback() {
|
|
1608
1707
|
plt.jmp(() => disconnectedCallback(this));
|
|
1708
|
+
plt.raf(() => {
|
|
1709
|
+
var _a3;
|
|
1710
|
+
const hostRef = getHostRef(this);
|
|
1711
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1712
|
+
if (i2 > -1) {
|
|
1713
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
1714
|
+
}
|
|
1715
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1716
|
+
delete hostRef.$vnode$.$elm$;
|
|
1717
|
+
}
|
|
1718
|
+
});
|
|
1609
1719
|
}
|
|
1610
1720
|
componentOnReady() {
|
|
1611
1721
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1672,7 +1782,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1672
1782
|
}
|
|
1673
1783
|
}
|
|
1674
1784
|
} catch (e) {
|
|
1675
|
-
consoleError(e);
|
|
1785
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1676
1786
|
}
|
|
1677
1787
|
};
|
|
1678
1788
|
var getHostListenerTarget = (elm, flags) => {
|