@everymatrix/casino-engagement-suite-tournament 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/casino-engagement-suite-tournament/casino-engagement-suite-tournament.esm.js +1 -1
- package/dist/casino-engagement-suite-tournament/index.esm.js +1 -1
- package/dist/casino-engagement-suite-tournament/p-00972ad5.js +2 -0
- package/dist/casino-engagement-suite-tournament/{p-9c24a103.entry.js → p-69ef97d1.entry.js} +1 -1
- package/dist/casino-engagement-suite-tournament/p-c1d0b870.js +1 -0
- package/dist/cjs/casino-engagement-suite-progress-bar_3.cjs.entry.js +39 -13
- package/dist/cjs/{casino-engagement-suite-tournament-d2f62483.js → casino-engagement-suite-tournament-19a1c3b7.js} +200 -144
- package/dist/cjs/casino-engagement-suite-tournament.cjs.js +2 -2
- package/dist/cjs/{index-4eb9b2e6.js → index-79c59362.js} +253 -145
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/casino-engagement-suite-tournament/casino-engagement-suite-tournament.js +35 -4
- package/dist/esm/casino-engagement-suite-progress-bar_3.entry.js +39 -13
- package/dist/esm/{casino-engagement-suite-tournament-66512e26.js → casino-engagement-suite-tournament-f2131da2.js} +200 -144
- package/dist/esm/casino-engagement-suite-tournament.js +3 -3
- package/dist/esm/{index-3124114b.js → index-bc18616b.js} +253 -145
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/casino-engagement-suite-tournament/p-1cd75583.js +0 -2
- package/dist/casino-engagement-suite-tournament/p-94b7b68e.js +0 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/packages/stencil/casino-engagement-suite-tournament/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/casino-engagement-suite-tournament/.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/casino-engagement-suite-tournament/.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/casino-engagement-suite-tournament/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -21,19 +21,23 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'casino-engagement-suite-tournament';
|
|
24
|
-
const BUILD = /* casino-engagement-suite-tournament */ { allRenderFn: true, 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: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, 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: false, propNumber: true, 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: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
|
|
24
|
+
const BUILD = /* casino-engagement-suite-tournament */ { allRenderFn: true, 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: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, 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: false, propNumber: true, 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: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: true, watchCallback: true };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
+
|
|
35
|
+
// src/client/client-host-ref.ts
|
|
34
36
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
35
37
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
36
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
38
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
39
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
40
|
+
};
|
|
37
41
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
42
|
const hostRef = {
|
|
39
43
|
$flags$: 0,
|
|
@@ -46,7 +50,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
50
|
hostElement["s-p"] = [];
|
|
47
51
|
hostElement["s-rc"] = [];
|
|
48
52
|
}
|
|
49
|
-
|
|
53
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
54
|
+
return ref;
|
|
50
55
|
};
|
|
51
56
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
57
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -83,16 +88,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
83
88
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
84
89
|
/* webpackMode: "lazy" */
|
|
85
90
|
`./${bundleId}.entry.js${""}`
|
|
86
|
-
)); }).then(
|
|
87
|
-
{
|
|
88
|
-
|
|
91
|
+
)); }).then(
|
|
92
|
+
(importedModule) => {
|
|
93
|
+
{
|
|
94
|
+
cmpModules.set(bundleId, importedModule);
|
|
95
|
+
}
|
|
96
|
+
return importedModule[exportName];
|
|
97
|
+
},
|
|
98
|
+
(e) => {
|
|
99
|
+
consoleError(e, hostRef.$hostElement$);
|
|
89
100
|
}
|
|
90
|
-
|
|
91
|
-
}, consoleError);
|
|
101
|
+
);
|
|
92
102
|
};
|
|
93
103
|
|
|
94
104
|
// src/client/client-style.ts
|
|
95
105
|
var styles = /* @__PURE__ */ new Map();
|
|
106
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
96
107
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
97
108
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
98
109
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
@@ -167,12 +178,6 @@ var flush = () => {
|
|
|
167
178
|
};
|
|
168
179
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
169
180
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
170
|
-
|
|
171
|
-
// src/utils/constants.ts
|
|
172
|
-
var EMPTY_OBJ = {};
|
|
173
|
-
|
|
174
|
-
// src/utils/helpers.ts
|
|
175
|
-
var isDef = (v) => v != null;
|
|
176
181
|
var isComplexType = (o) => {
|
|
177
182
|
o = typeof o;
|
|
178
183
|
return o === "object" || o === "function";
|
|
@@ -232,6 +237,63 @@ var unwrapErr = (result) => {
|
|
|
232
237
|
throw result.value;
|
|
233
238
|
}
|
|
234
239
|
};
|
|
240
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
241
|
+
const childNodes = elm.__childNodes || elm.childNodes;
|
|
242
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
243
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
244
|
+
var _a;
|
|
245
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
246
|
+
if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
|
|
247
|
+
slotNode.hidden = true;
|
|
248
|
+
} else {
|
|
249
|
+
slotNode.hidden = false;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
for (const childNode of childNodes) {
|
|
255
|
+
if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
|
|
256
|
+
updateFallbackSlotVisibility(childNode);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
261
|
+
let i2 = 0;
|
|
262
|
+
let slottedNodes = [];
|
|
263
|
+
let childNode;
|
|
264
|
+
for (; i2 < childNodes.length; i2++) {
|
|
265
|
+
childNode = childNodes[i2];
|
|
266
|
+
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
|
267
|
+
slottedNodes.push(childNode);
|
|
268
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
269
|
+
}
|
|
270
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
271
|
+
}
|
|
272
|
+
return slottedNodes;
|
|
273
|
+
}
|
|
274
|
+
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
|
275
|
+
const childNodes = [];
|
|
276
|
+
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
|
277
|
+
while ((node = node.nextSibling) && node["s-sn"] === slotName) {
|
|
278
|
+
childNodes.push(node);
|
|
279
|
+
}
|
|
280
|
+
return childNodes;
|
|
281
|
+
};
|
|
282
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
283
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
284
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
285
|
+
return true;
|
|
286
|
+
}
|
|
287
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
288
|
+
return true;
|
|
289
|
+
}
|
|
290
|
+
return false;
|
|
291
|
+
}
|
|
292
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
293
|
+
return true;
|
|
294
|
+
}
|
|
295
|
+
return slotName === "";
|
|
296
|
+
};
|
|
235
297
|
var createTime = (fnName, tagName = "") => {
|
|
236
298
|
{
|
|
237
299
|
return () => {
|
|
@@ -386,7 +448,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
386
448
|
}
|
|
387
449
|
if (!appliedStyles.has(scopeId2)) {
|
|
388
450
|
{
|
|
389
|
-
styleElm = doc.createElement("style");
|
|
451
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
390
452
|
styleElm.innerHTML = style;
|
|
391
453
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
392
454
|
if (nonce != null) {
|
|
@@ -396,7 +458,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
396
458
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
397
459
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
398
460
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
399
|
-
styleContainerNode.insertBefore(
|
|
461
|
+
styleContainerNode.insertBefore(
|
|
462
|
+
styleElm,
|
|
463
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
464
|
+
);
|
|
400
465
|
} else if ("host" in styleContainerNode) {
|
|
401
466
|
if (supportsConstructableStylesheets) {
|
|
402
467
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -414,7 +479,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
414
479
|
styleContainerNode.append(styleElm);
|
|
415
480
|
}
|
|
416
481
|
}
|
|
417
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
482
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
418
483
|
styleContainerNode.insertBefore(styleElm, null);
|
|
419
484
|
}
|
|
420
485
|
}
|
|
@@ -439,23 +504,25 @@ var attachStyles = (hostRef) => {
|
|
|
439
504
|
const scopeId2 = addStyle(
|
|
440
505
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
441
506
|
cmpMeta);
|
|
442
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
507
|
+
if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
|
|
443
508
|
elm["s-sc"] = scopeId2;
|
|
444
509
|
elm.classList.add(scopeId2 + "-h");
|
|
445
510
|
}
|
|
446
511
|
endAttachStyles();
|
|
447
512
|
};
|
|
448
513
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
449
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
514
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
450
515
|
if (oldValue !== newValue) {
|
|
451
516
|
let isProp = isMemberInElement(elm, memberName);
|
|
452
517
|
let ln = memberName.toLowerCase();
|
|
453
518
|
if (memberName === "class") {
|
|
454
519
|
const classList = elm.classList;
|
|
455
520
|
const oldClasses = parseClassList(oldValue);
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
521
|
+
let newClasses = parseClassList(newValue);
|
|
522
|
+
{
|
|
523
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
524
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
525
|
+
}
|
|
459
526
|
} else if (memberName === "style") {
|
|
460
527
|
{
|
|
461
528
|
for (const prop in oldValue) {
|
|
@@ -514,7 +581,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
514
581
|
elm.setAttribute(memberName, n);
|
|
515
582
|
}
|
|
516
583
|
}
|
|
517
|
-
} else {
|
|
584
|
+
} else if (elm[memberName] !== newValue) {
|
|
518
585
|
elm[memberName] = newValue;
|
|
519
586
|
}
|
|
520
587
|
} catch (e) {
|
|
@@ -547,24 +614,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
547
614
|
}
|
|
548
615
|
};
|
|
549
616
|
var parseClassListRegex = /\s/;
|
|
550
|
-
var parseClassList = (value) =>
|
|
617
|
+
var parseClassList = (value) => {
|
|
618
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
619
|
+
value = value.baseVal;
|
|
620
|
+
}
|
|
621
|
+
if (!value || typeof value !== "string") {
|
|
622
|
+
return [];
|
|
623
|
+
}
|
|
624
|
+
return value.split(parseClassListRegex);
|
|
625
|
+
};
|
|
551
626
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
552
627
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
553
628
|
|
|
554
629
|
// src/runtime/vdom/update-element.ts
|
|
555
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
630
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
556
631
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
557
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
558
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
632
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
633
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
559
634
|
{
|
|
560
635
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
561
636
|
if (!(memberName in newVnodeAttrs)) {
|
|
562
|
-
setAccessor(
|
|
637
|
+
setAccessor(
|
|
638
|
+
elm,
|
|
639
|
+
memberName,
|
|
640
|
+
oldVnodeAttrs[memberName],
|
|
641
|
+
void 0,
|
|
642
|
+
isSvgMode2,
|
|
643
|
+
newVnode.$flags$);
|
|
563
644
|
}
|
|
564
645
|
}
|
|
565
646
|
}
|
|
566
647
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
567
|
-
setAccessor(
|
|
648
|
+
setAccessor(
|
|
649
|
+
elm,
|
|
650
|
+
memberName,
|
|
651
|
+
oldVnodeAttrs[memberName],
|
|
652
|
+
newVnodeAttrs[memberName],
|
|
653
|
+
isSvgMode2,
|
|
654
|
+
newVnode.$flags$);
|
|
568
655
|
}
|
|
569
656
|
};
|
|
570
657
|
function sortedAttrNames(attrNames) {
|
|
@@ -576,16 +663,13 @@ function sortedAttrNames(attrNames) {
|
|
|
576
663
|
attrNames
|
|
577
664
|
);
|
|
578
665
|
}
|
|
579
|
-
|
|
580
|
-
// src/runtime/vdom/vdom-render.ts
|
|
581
|
-
var scopeId;
|
|
582
666
|
var contentRef;
|
|
583
667
|
var hostTagName;
|
|
584
668
|
var useNativeShadowDom = false;
|
|
585
669
|
var checkSlotFallbackVisibility = false;
|
|
586
670
|
var checkSlotRelocate = false;
|
|
587
671
|
var isSvgMode = false;
|
|
588
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
672
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
589
673
|
var _a;
|
|
590
674
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
591
675
|
let i2 = 0;
|
|
@@ -595,9 +679,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
595
679
|
if (!useNativeShadowDom) {
|
|
596
680
|
checkSlotRelocate = true;
|
|
597
681
|
if (newVNode2.$tag$ === "slot") {
|
|
598
|
-
if (scopeId) {
|
|
599
|
-
parentElm.classList.add(scopeId + "-s");
|
|
600
|
-
}
|
|
601
682
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
602
683
|
// slot element has fallback content
|
|
603
684
|
// still create an element that "mocks" the slot element
|
|
@@ -621,14 +702,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
621
702
|
{
|
|
622
703
|
updateElement(null, newVNode2, isSvgMode);
|
|
623
704
|
}
|
|
624
|
-
const rootNode = elm.getRootNode();
|
|
625
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
626
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
627
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
628
|
-
}
|
|
629
705
|
if (newVNode2.$children$) {
|
|
630
706
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
631
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
707
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
632
708
|
if (childNode) {
|
|
633
709
|
elm.appendChild(childNode);
|
|
634
710
|
}
|
|
@@ -654,7 +730,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
654
730
|
};
|
|
655
731
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
656
732
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
657
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
733
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
658
734
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
659
735
|
let node = parentElm;
|
|
660
736
|
while (node = node.nextSibling) {
|
|
@@ -666,7 +742,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
666
742
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
667
743
|
const childNode = oldSlotChildNodes[i2];
|
|
668
744
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
669
|
-
insertBefore(
|
|
745
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
670
746
|
childNode["s-ol"].remove();
|
|
671
747
|
childNode["s-ol"] = void 0;
|
|
672
748
|
childNode["s-sh"] = void 0;
|
|
@@ -686,7 +762,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
686
762
|
}
|
|
687
763
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
688
764
|
if (vnodes[startIdx]) {
|
|
689
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
765
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
690
766
|
if (childNode) {
|
|
691
767
|
vnodes[startIdx].$elm$ = childNode;
|
|
692
768
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -773,7 +849,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
773
849
|
if (idxInOld >= 0) {
|
|
774
850
|
elmToMove = oldCh[idxInOld];
|
|
775
851
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
776
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
852
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
777
853
|
} else {
|
|
778
854
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
779
855
|
oldCh[idxInOld] = void 0;
|
|
@@ -781,12 +857,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
781
857
|
}
|
|
782
858
|
newStartVnode = newCh[++newStartIdx];
|
|
783
859
|
} else {
|
|
784
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
860
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
785
861
|
newStartVnode = newCh[++newStartIdx];
|
|
786
862
|
}
|
|
787
863
|
if (node) {
|
|
788
864
|
{
|
|
789
|
-
insertBefore(
|
|
865
|
+
insertBefore(
|
|
866
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
867
|
+
node,
|
|
868
|
+
referenceNode(oldStartVnode.$elm$)
|
|
869
|
+
);
|
|
790
870
|
}
|
|
791
871
|
}
|
|
792
872
|
}
|
|
@@ -807,28 +887,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
807
887
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
808
888
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
809
889
|
if (leftVNode.$tag$ === "slot") {
|
|
810
|
-
if (
|
|
811
|
-
// The component gets hydrated and no VDOM has been initialized.
|
|
812
|
-
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
813
|
-
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
814
|
-
// hydration comments to be removed
|
|
815
|
-
leftVNode.$elm$.nodeType !== 8
|
|
816
|
-
) {
|
|
817
|
-
return false;
|
|
818
|
-
}
|
|
819
890
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
820
891
|
}
|
|
821
892
|
if (!isInitialRender) {
|
|
822
893
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
823
894
|
}
|
|
895
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
896
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
897
|
+
}
|
|
824
898
|
return true;
|
|
825
899
|
}
|
|
826
900
|
return false;
|
|
827
901
|
};
|
|
828
|
-
var referenceNode = (node) =>
|
|
829
|
-
return node && node["s-ol"] || node;
|
|
830
|
-
};
|
|
831
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
902
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
832
903
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
833
904
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
834
905
|
const oldChildren = oldVNode.$children$;
|
|
@@ -861,41 +932,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
861
932
|
elm.data = text;
|
|
862
933
|
}
|
|
863
934
|
};
|
|
864
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
865
|
-
const childNodes = elm.childNodes;
|
|
866
|
-
for (const childNode of childNodes) {
|
|
867
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
868
|
-
if (childNode["s-sr"]) {
|
|
869
|
-
const slotName = childNode["s-sn"];
|
|
870
|
-
childNode.hidden = false;
|
|
871
|
-
for (const siblingNode of childNodes) {
|
|
872
|
-
if (siblingNode !== childNode) {
|
|
873
|
-
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
874
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
875
|
-
childNode.hidden = true;
|
|
876
|
-
break;
|
|
877
|
-
}
|
|
878
|
-
} else {
|
|
879
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
880
|
-
childNode.hidden = true;
|
|
881
|
-
break;
|
|
882
|
-
}
|
|
883
|
-
}
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
updateFallbackSlotVisibility(childNode);
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
};
|
|
891
935
|
var relocateNodes = [];
|
|
892
936
|
var markSlotContentForRelocation = (elm) => {
|
|
893
937
|
let node;
|
|
894
938
|
let hostContentNodes;
|
|
895
939
|
let j;
|
|
896
|
-
|
|
940
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
941
|
+
for (const childNode of children) {
|
|
897
942
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
898
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
943
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
899
944
|
const slotName = childNode["s-sn"];
|
|
900
945
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
901
946
|
node = hostContentNodes[j];
|
|
@@ -937,21 +982,6 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
937
982
|
}
|
|
938
983
|
}
|
|
939
984
|
};
|
|
940
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
941
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
942
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
943
|
-
return true;
|
|
944
|
-
}
|
|
945
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
946
|
-
return true;
|
|
947
|
-
}
|
|
948
|
-
return false;
|
|
949
|
-
}
|
|
950
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
951
|
-
return true;
|
|
952
|
-
}
|
|
953
|
-
return slotName === "";
|
|
954
|
-
};
|
|
955
985
|
var nullifyVNodeRefs = (vNode) => {
|
|
956
986
|
{
|
|
957
987
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -959,8 +989,9 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
959
989
|
}
|
|
960
990
|
};
|
|
961
991
|
var insertBefore = (parent, newNode, reference) => {
|
|
962
|
-
|
|
963
|
-
|
|
992
|
+
{
|
|
993
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
994
|
+
}
|
|
964
995
|
};
|
|
965
996
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
966
997
|
var _a, _b, _c, _d;
|
|
@@ -986,10 +1017,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
986
1017
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
987
1018
|
hostRef.$vnode$ = rootVnode;
|
|
988
1019
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
989
|
-
|
|
990
|
-
scopeId = hostElm["s-sc"];
|
|
991
|
-
}
|
|
992
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1020
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
993
1021
|
{
|
|
994
1022
|
contentRef = hostElm["s-cr"];
|
|
995
1023
|
checkSlotFallbackVisibility = false;
|
|
@@ -1017,7 +1045,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1017
1045
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1018
1046
|
while (orgLocationNode) {
|
|
1019
1047
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1020
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1048
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1021
1049
|
refNode = refNode.nextSibling;
|
|
1022
1050
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1023
1051
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1030,13 +1058,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1030
1058
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1031
1059
|
}
|
|
1032
1060
|
}
|
|
1033
|
-
|
|
1061
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1062
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1063
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1034
1064
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1035
1065
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1036
1066
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1037
1067
|
}
|
|
1038
1068
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1039
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1069
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1040
1070
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1041
1071
|
}
|
|
1042
1072
|
}
|
|
@@ -1064,7 +1094,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1064
1094
|
// src/runtime/update-component.ts
|
|
1065
1095
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1066
1096
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1067
|
-
ancestorComponent["s-p"].push(
|
|
1097
|
+
const index = ancestorComponent["s-p"].push(
|
|
1098
|
+
new Promise(
|
|
1099
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1100
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1101
|
+
r();
|
|
1102
|
+
}
|
|
1103
|
+
)
|
|
1104
|
+
);
|
|
1068
1105
|
}
|
|
1069
1106
|
};
|
|
1070
1107
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1093,12 +1130,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1093
1130
|
{
|
|
1094
1131
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1095
1132
|
if (hostRef.$queuedListeners$) {
|
|
1096
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1133
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1097
1134
|
hostRef.$queuedListeners$ = void 0;
|
|
1098
1135
|
}
|
|
1099
1136
|
}
|
|
1100
1137
|
{
|
|
1101
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1138
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1102
1139
|
}
|
|
1103
1140
|
}
|
|
1104
1141
|
endSchedule();
|
|
@@ -1167,7 +1204,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1167
1204
|
const instance = hostRef.$lazyInstance$ ;
|
|
1168
1205
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1169
1206
|
{
|
|
1170
|
-
safeCall(instance, "componentDidRender");
|
|
1207
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1171
1208
|
}
|
|
1172
1209
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1173
1210
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -1196,17 +1233,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1196
1233
|
}
|
|
1197
1234
|
};
|
|
1198
1235
|
var appDidLoad = (who) => {
|
|
1199
|
-
{
|
|
1200
|
-
addHydratedFlag(doc.documentElement);
|
|
1201
|
-
}
|
|
1202
1236
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1203
1237
|
};
|
|
1204
|
-
var safeCall = (instance, method, arg) => {
|
|
1238
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1205
1239
|
if (instance && instance[method]) {
|
|
1206
1240
|
try {
|
|
1207
1241
|
return instance[method](arg);
|
|
1208
1242
|
} catch (e) {
|
|
1209
|
-
consoleError(e);
|
|
1243
|
+
consoleError(e, elm);
|
|
1210
1244
|
}
|
|
1211
1245
|
}
|
|
1212
1246
|
return void 0;
|
|
@@ -1265,15 +1299,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1265
1299
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1266
1300
|
members.map(([memberName, [memberFlags]]) => {
|
|
1267
1301
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1302
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1303
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1304
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1305
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1306
|
+
Object.defineProperty(prototype, memberName, {
|
|
1307
|
+
get() {
|
|
1308
|
+
{
|
|
1309
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1310
|
+
return getValue(this, memberName);
|
|
1311
|
+
}
|
|
1312
|
+
const ref = getHostRef(this);
|
|
1313
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1314
|
+
if (!instance) return;
|
|
1315
|
+
return instance[memberName];
|
|
1316
|
+
}
|
|
1317
|
+
},
|
|
1318
|
+
configurable: true,
|
|
1319
|
+
enumerable: true
|
|
1320
|
+
});
|
|
1321
|
+
}
|
|
1268
1322
|
Object.defineProperty(prototype, memberName, {
|
|
1269
|
-
get() {
|
|
1270
|
-
return getValue(this, memberName);
|
|
1271
|
-
},
|
|
1272
1323
|
set(newValue) {
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1324
|
+
const ref = getHostRef(this);
|
|
1325
|
+
if (origSetter) {
|
|
1326
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1327
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1328
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1329
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1330
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1331
|
+
}
|
|
1332
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1333
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1334
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1335
|
+
return;
|
|
1336
|
+
}
|
|
1337
|
+
{
|
|
1338
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1339
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1340
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1341
|
+
ref.$onReadyPromise$.then(() => {
|
|
1342
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1343
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1344
|
+
}
|
|
1345
|
+
});
|
|
1346
|
+
}
|
|
1347
|
+
return;
|
|
1348
|
+
}
|
|
1349
|
+
const setterSetVal = () => {
|
|
1350
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1351
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1352
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1353
|
+
}
|
|
1354
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1355
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1356
|
+
};
|
|
1357
|
+
if (ref.$lazyInstance$) {
|
|
1358
|
+
setterSetVal();
|
|
1359
|
+
} else {
|
|
1360
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1277
1364
|
});
|
|
1278
1365
|
}
|
|
1279
1366
|
});
|
|
@@ -1283,7 +1370,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1283
1370
|
plt.jmp(() => {
|
|
1284
1371
|
var _a2;
|
|
1285
1372
|
const propName = attrNameToPropName.get(attrName);
|
|
1286
|
-
if (this.hasOwnProperty(propName)) {
|
|
1373
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1287
1374
|
newValue = this[propName];
|
|
1288
1375
|
delete this[propName];
|
|
1289
1376
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1303,7 +1390,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1303
1390
|
}
|
|
1304
1391
|
return;
|
|
1305
1392
|
}
|
|
1306
|
-
|
|
1393
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1394
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1395
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1396
|
+
this[propName] = newValue;
|
|
1397
|
+
}
|
|
1307
1398
|
});
|
|
1308
1399
|
};
|
|
1309
1400
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1332,7 +1423,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1332
1423
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1333
1424
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1334
1425
|
if (bundleId) {
|
|
1335
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1426
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1336
1427
|
if (CstrImport && "then" in CstrImport) {
|
|
1337
1428
|
const endLoad = uniqueTime();
|
|
1338
1429
|
Cstr = await CstrImport;
|
|
@@ -1357,7 +1448,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1357
1448
|
try {
|
|
1358
1449
|
new Cstr(hostRef);
|
|
1359
1450
|
} catch (e) {
|
|
1360
|
-
consoleError(e);
|
|
1451
|
+
consoleError(e, elm);
|
|
1361
1452
|
}
|
|
1362
1453
|
{
|
|
1363
1454
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1366,7 +1457,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1366
1457
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1367
1458
|
}
|
|
1368
1459
|
endNewInstance();
|
|
1369
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1460
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1370
1461
|
} else {
|
|
1371
1462
|
Cstr = elm.constructor;
|
|
1372
1463
|
const cmpTag = elm.localName;
|
|
@@ -1393,9 +1484,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1393
1484
|
schedule();
|
|
1394
1485
|
}
|
|
1395
1486
|
};
|
|
1396
|
-
var fireConnectedCallback = (instance) => {
|
|
1487
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1397
1488
|
{
|
|
1398
|
-
safeCall(instance, "connectedCallback");
|
|
1489
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1399
1490
|
}
|
|
1400
1491
|
};
|
|
1401
1492
|
|
|
@@ -1437,9 +1528,9 @@ var connectedCallback = (elm) => {
|
|
|
1437
1528
|
} else {
|
|
1438
1529
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1439
1530
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1440
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1531
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1441
1532
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1442
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
1533
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1443
1534
|
}
|
|
1444
1535
|
}
|
|
1445
1536
|
endConnected();
|
|
@@ -1452,9 +1543,9 @@ var setContentReference = (elm) => {
|
|
|
1452
1543
|
contentRefElm["s-cn"] = true;
|
|
1453
1544
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1454
1545
|
};
|
|
1455
|
-
var disconnectInstance = (instance) => {
|
|
1546
|
+
var disconnectInstance = (instance, elm) => {
|
|
1456
1547
|
{
|
|
1457
|
-
safeCall(instance, "disconnectedCallback");
|
|
1548
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1458
1549
|
}
|
|
1459
1550
|
};
|
|
1460
1551
|
var disconnectedCallback = async (elm) => {
|
|
@@ -1467,11 +1558,17 @@ var disconnectedCallback = async (elm) => {
|
|
|
1467
1558
|
}
|
|
1468
1559
|
}
|
|
1469
1560
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1470
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1561
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1471
1562
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1472
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1563
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1473
1564
|
}
|
|
1474
1565
|
}
|
|
1566
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1567
|
+
rootAppliedStyles.delete(elm);
|
|
1568
|
+
}
|
|
1569
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1570
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1571
|
+
}
|
|
1475
1572
|
};
|
|
1476
1573
|
|
|
1477
1574
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1556,6 +1653,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1556
1653
|
}
|
|
1557
1654
|
disconnectedCallback() {
|
|
1558
1655
|
plt.jmp(() => disconnectedCallback(this));
|
|
1656
|
+
plt.raf(() => {
|
|
1657
|
+
var _a3;
|
|
1658
|
+
const hostRef = getHostRef(this);
|
|
1659
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1660
|
+
if (i2 > -1) {
|
|
1661
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
1662
|
+
}
|
|
1663
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1664
|
+
delete hostRef.$vnode$.$elm$;
|
|
1665
|
+
}
|
|
1666
|
+
});
|
|
1559
1667
|
}
|
|
1560
1668
|
componentOnReady() {
|
|
1561
1669
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1619,7 +1727,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1619
1727
|
}
|
|
1620
1728
|
}
|
|
1621
1729
|
} catch (e) {
|
|
1622
|
-
consoleError(e);
|
|
1730
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1623
1731
|
}
|
|
1624
1732
|
};
|
|
1625
1733
|
var getHostListenerTarget = (elm, flags) => {
|