@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
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
const NAMESPACE = 'casino-engagement-suite-tournament';
|
|
2
|
-
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 };
|
|
2
|
+
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 };
|
|
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/client/client-host-ref.ts
|
|
12
14
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
13
15
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
14
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
16
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
17
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
18
|
+
};
|
|
15
19
|
var registerHost = (hostElement, cmpMeta) => {
|
|
16
20
|
const hostRef = {
|
|
17
21
|
$flags$: 0,
|
|
@@ -24,7 +28,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
24
28
|
hostElement["s-p"] = [];
|
|
25
29
|
hostElement["s-rc"] = [];
|
|
26
30
|
}
|
|
27
|
-
|
|
31
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
32
|
+
return ref;
|
|
28
33
|
};
|
|
29
34
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
30
35
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -61,16 +66,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
61
66
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
62
67
|
/* webpackMode: "lazy" */
|
|
63
68
|
`./${bundleId}.entry.js${""}`
|
|
64
|
-
).then(
|
|
65
|
-
{
|
|
66
|
-
|
|
69
|
+
).then(
|
|
70
|
+
(importedModule) => {
|
|
71
|
+
{
|
|
72
|
+
cmpModules.set(bundleId, importedModule);
|
|
73
|
+
}
|
|
74
|
+
return importedModule[exportName];
|
|
75
|
+
},
|
|
76
|
+
(e) => {
|
|
77
|
+
consoleError(e, hostRef.$hostElement$);
|
|
67
78
|
}
|
|
68
|
-
|
|
69
|
-
}, consoleError);
|
|
79
|
+
);
|
|
70
80
|
};
|
|
71
81
|
|
|
72
82
|
// src/client/client-style.ts
|
|
73
83
|
var styles = /* @__PURE__ */ new Map();
|
|
84
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
74
85
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
75
86
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
76
87
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
@@ -145,12 +156,6 @@ var flush = () => {
|
|
|
145
156
|
};
|
|
146
157
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
147
158
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
148
|
-
|
|
149
|
-
// src/utils/constants.ts
|
|
150
|
-
var EMPTY_OBJ = {};
|
|
151
|
-
|
|
152
|
-
// src/utils/helpers.ts
|
|
153
|
-
var isDef = (v) => v != null;
|
|
154
159
|
var isComplexType = (o) => {
|
|
155
160
|
o = typeof o;
|
|
156
161
|
return o === "object" || o === "function";
|
|
@@ -210,6 +215,63 @@ var unwrapErr = (result) => {
|
|
|
210
215
|
throw result.value;
|
|
211
216
|
}
|
|
212
217
|
};
|
|
218
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
219
|
+
const childNodes = elm.__childNodes || elm.childNodes;
|
|
220
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
221
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
222
|
+
var _a;
|
|
223
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
224
|
+
if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
|
|
225
|
+
slotNode.hidden = true;
|
|
226
|
+
} else {
|
|
227
|
+
slotNode.hidden = false;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
for (const childNode of childNodes) {
|
|
233
|
+
if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
|
|
234
|
+
updateFallbackSlotVisibility(childNode);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
239
|
+
let i2 = 0;
|
|
240
|
+
let slottedNodes = [];
|
|
241
|
+
let childNode;
|
|
242
|
+
for (; i2 < childNodes.length; i2++) {
|
|
243
|
+
childNode = childNodes[i2];
|
|
244
|
+
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
|
245
|
+
slottedNodes.push(childNode);
|
|
246
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
247
|
+
}
|
|
248
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
249
|
+
}
|
|
250
|
+
return slottedNodes;
|
|
251
|
+
}
|
|
252
|
+
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
|
253
|
+
const childNodes = [];
|
|
254
|
+
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
|
255
|
+
while ((node = node.nextSibling) && node["s-sn"] === slotName) {
|
|
256
|
+
childNodes.push(node);
|
|
257
|
+
}
|
|
258
|
+
return childNodes;
|
|
259
|
+
};
|
|
260
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
261
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
262
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
265
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
266
|
+
return true;
|
|
267
|
+
}
|
|
268
|
+
return false;
|
|
269
|
+
}
|
|
270
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
271
|
+
return true;
|
|
272
|
+
}
|
|
273
|
+
return slotName === "";
|
|
274
|
+
};
|
|
213
275
|
var createTime = (fnName, tagName = "") => {
|
|
214
276
|
{
|
|
215
277
|
return () => {
|
|
@@ -364,7 +426,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
364
426
|
}
|
|
365
427
|
if (!appliedStyles.has(scopeId2)) {
|
|
366
428
|
{
|
|
367
|
-
styleElm = doc.createElement("style");
|
|
429
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
368
430
|
styleElm.innerHTML = style;
|
|
369
431
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
370
432
|
if (nonce != null) {
|
|
@@ -374,7 +436,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
374
436
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
375
437
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
376
438
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
377
|
-
styleContainerNode.insertBefore(
|
|
439
|
+
styleContainerNode.insertBefore(
|
|
440
|
+
styleElm,
|
|
441
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
442
|
+
);
|
|
378
443
|
} else if ("host" in styleContainerNode) {
|
|
379
444
|
if (supportsConstructableStylesheets) {
|
|
380
445
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -392,7 +457,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
392
457
|
styleContainerNode.append(styleElm);
|
|
393
458
|
}
|
|
394
459
|
}
|
|
395
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
460
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
396
461
|
styleContainerNode.insertBefore(styleElm, null);
|
|
397
462
|
}
|
|
398
463
|
}
|
|
@@ -417,23 +482,25 @@ var attachStyles = (hostRef) => {
|
|
|
417
482
|
const scopeId2 = addStyle(
|
|
418
483
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
419
484
|
cmpMeta);
|
|
420
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
485
|
+
if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
|
|
421
486
|
elm["s-sc"] = scopeId2;
|
|
422
487
|
elm.classList.add(scopeId2 + "-h");
|
|
423
488
|
}
|
|
424
489
|
endAttachStyles();
|
|
425
490
|
};
|
|
426
491
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
427
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
492
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
428
493
|
if (oldValue !== newValue) {
|
|
429
494
|
let isProp = isMemberInElement(elm, memberName);
|
|
430
495
|
let ln = memberName.toLowerCase();
|
|
431
496
|
if (memberName === "class") {
|
|
432
497
|
const classList = elm.classList;
|
|
433
498
|
const oldClasses = parseClassList(oldValue);
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
499
|
+
let newClasses = parseClassList(newValue);
|
|
500
|
+
{
|
|
501
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
502
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
503
|
+
}
|
|
437
504
|
} else if (memberName === "style") {
|
|
438
505
|
{
|
|
439
506
|
for (const prop in oldValue) {
|
|
@@ -492,7 +559,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
492
559
|
elm.setAttribute(memberName, n);
|
|
493
560
|
}
|
|
494
561
|
}
|
|
495
|
-
} else {
|
|
562
|
+
} else if (elm[memberName] !== newValue) {
|
|
496
563
|
elm[memberName] = newValue;
|
|
497
564
|
}
|
|
498
565
|
} catch (e) {
|
|
@@ -525,24 +592,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
525
592
|
}
|
|
526
593
|
};
|
|
527
594
|
var parseClassListRegex = /\s/;
|
|
528
|
-
var parseClassList = (value) =>
|
|
595
|
+
var parseClassList = (value) => {
|
|
596
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
597
|
+
value = value.baseVal;
|
|
598
|
+
}
|
|
599
|
+
if (!value || typeof value !== "string") {
|
|
600
|
+
return [];
|
|
601
|
+
}
|
|
602
|
+
return value.split(parseClassListRegex);
|
|
603
|
+
};
|
|
529
604
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
530
605
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
531
606
|
|
|
532
607
|
// src/runtime/vdom/update-element.ts
|
|
533
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
608
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
534
609
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
535
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
536
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
610
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
611
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
537
612
|
{
|
|
538
613
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
539
614
|
if (!(memberName in newVnodeAttrs)) {
|
|
540
|
-
setAccessor(
|
|
615
|
+
setAccessor(
|
|
616
|
+
elm,
|
|
617
|
+
memberName,
|
|
618
|
+
oldVnodeAttrs[memberName],
|
|
619
|
+
void 0,
|
|
620
|
+
isSvgMode2,
|
|
621
|
+
newVnode.$flags$);
|
|
541
622
|
}
|
|
542
623
|
}
|
|
543
624
|
}
|
|
544
625
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
545
|
-
setAccessor(
|
|
626
|
+
setAccessor(
|
|
627
|
+
elm,
|
|
628
|
+
memberName,
|
|
629
|
+
oldVnodeAttrs[memberName],
|
|
630
|
+
newVnodeAttrs[memberName],
|
|
631
|
+
isSvgMode2,
|
|
632
|
+
newVnode.$flags$);
|
|
546
633
|
}
|
|
547
634
|
};
|
|
548
635
|
function sortedAttrNames(attrNames) {
|
|
@@ -554,16 +641,13 @@ function sortedAttrNames(attrNames) {
|
|
|
554
641
|
attrNames
|
|
555
642
|
);
|
|
556
643
|
}
|
|
557
|
-
|
|
558
|
-
// src/runtime/vdom/vdom-render.ts
|
|
559
|
-
var scopeId;
|
|
560
644
|
var contentRef;
|
|
561
645
|
var hostTagName;
|
|
562
646
|
var useNativeShadowDom = false;
|
|
563
647
|
var checkSlotFallbackVisibility = false;
|
|
564
648
|
var checkSlotRelocate = false;
|
|
565
649
|
var isSvgMode = false;
|
|
566
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
650
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
567
651
|
var _a;
|
|
568
652
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
569
653
|
let i2 = 0;
|
|
@@ -573,9 +657,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
573
657
|
if (!useNativeShadowDom) {
|
|
574
658
|
checkSlotRelocate = true;
|
|
575
659
|
if (newVNode2.$tag$ === "slot") {
|
|
576
|
-
if (scopeId) {
|
|
577
|
-
parentElm.classList.add(scopeId + "-s");
|
|
578
|
-
}
|
|
579
660
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
580
661
|
// slot element has fallback content
|
|
581
662
|
// still create an element that "mocks" the slot element
|
|
@@ -599,14 +680,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
599
680
|
{
|
|
600
681
|
updateElement(null, newVNode2, isSvgMode);
|
|
601
682
|
}
|
|
602
|
-
const rootNode = elm.getRootNode();
|
|
603
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
604
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
605
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
606
|
-
}
|
|
607
683
|
if (newVNode2.$children$) {
|
|
608
684
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
609
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
685
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
610
686
|
if (childNode) {
|
|
611
687
|
elm.appendChild(childNode);
|
|
612
688
|
}
|
|
@@ -632,7 +708,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
632
708
|
};
|
|
633
709
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
634
710
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
635
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
711
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
636
712
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
637
713
|
let node = parentElm;
|
|
638
714
|
while (node = node.nextSibling) {
|
|
@@ -644,7 +720,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
644
720
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
645
721
|
const childNode = oldSlotChildNodes[i2];
|
|
646
722
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
647
|
-
insertBefore(
|
|
723
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
648
724
|
childNode["s-ol"].remove();
|
|
649
725
|
childNode["s-ol"] = void 0;
|
|
650
726
|
childNode["s-sh"] = void 0;
|
|
@@ -664,7 +740,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
664
740
|
}
|
|
665
741
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
666
742
|
if (vnodes[startIdx]) {
|
|
667
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
743
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
668
744
|
if (childNode) {
|
|
669
745
|
vnodes[startIdx].$elm$ = childNode;
|
|
670
746
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -751,7 +827,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
751
827
|
if (idxInOld >= 0) {
|
|
752
828
|
elmToMove = oldCh[idxInOld];
|
|
753
829
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
754
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
830
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
755
831
|
} else {
|
|
756
832
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
757
833
|
oldCh[idxInOld] = void 0;
|
|
@@ -759,12 +835,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
759
835
|
}
|
|
760
836
|
newStartVnode = newCh[++newStartIdx];
|
|
761
837
|
} else {
|
|
762
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
838
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
763
839
|
newStartVnode = newCh[++newStartIdx];
|
|
764
840
|
}
|
|
765
841
|
if (node) {
|
|
766
842
|
{
|
|
767
|
-
insertBefore(
|
|
843
|
+
insertBefore(
|
|
844
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
845
|
+
node,
|
|
846
|
+
referenceNode(oldStartVnode.$elm$)
|
|
847
|
+
);
|
|
768
848
|
}
|
|
769
849
|
}
|
|
770
850
|
}
|
|
@@ -785,28 +865,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
785
865
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
786
866
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
787
867
|
if (leftVNode.$tag$ === "slot") {
|
|
788
|
-
if (
|
|
789
|
-
// The component gets hydrated and no VDOM has been initialized.
|
|
790
|
-
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
791
|
-
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
792
|
-
// hydration comments to be removed
|
|
793
|
-
leftVNode.$elm$.nodeType !== 8
|
|
794
|
-
) {
|
|
795
|
-
return false;
|
|
796
|
-
}
|
|
797
868
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
798
869
|
}
|
|
799
870
|
if (!isInitialRender) {
|
|
800
871
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
801
872
|
}
|
|
873
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
874
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
875
|
+
}
|
|
802
876
|
return true;
|
|
803
877
|
}
|
|
804
878
|
return false;
|
|
805
879
|
};
|
|
806
|
-
var referenceNode = (node) =>
|
|
807
|
-
return node && node["s-ol"] || node;
|
|
808
|
-
};
|
|
809
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
880
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
810
881
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
811
882
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
812
883
|
const oldChildren = oldVNode.$children$;
|
|
@@ -839,41 +910,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
839
910
|
elm.data = text;
|
|
840
911
|
}
|
|
841
912
|
};
|
|
842
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
843
|
-
const childNodes = elm.childNodes;
|
|
844
|
-
for (const childNode of childNodes) {
|
|
845
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
846
|
-
if (childNode["s-sr"]) {
|
|
847
|
-
const slotName = childNode["s-sn"];
|
|
848
|
-
childNode.hidden = false;
|
|
849
|
-
for (const siblingNode of childNodes) {
|
|
850
|
-
if (siblingNode !== childNode) {
|
|
851
|
-
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
852
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
853
|
-
childNode.hidden = true;
|
|
854
|
-
break;
|
|
855
|
-
}
|
|
856
|
-
} else {
|
|
857
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
858
|
-
childNode.hidden = true;
|
|
859
|
-
break;
|
|
860
|
-
}
|
|
861
|
-
}
|
|
862
|
-
}
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
updateFallbackSlotVisibility(childNode);
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
};
|
|
869
913
|
var relocateNodes = [];
|
|
870
914
|
var markSlotContentForRelocation = (elm) => {
|
|
871
915
|
let node;
|
|
872
916
|
let hostContentNodes;
|
|
873
917
|
let j;
|
|
874
|
-
|
|
918
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
919
|
+
for (const childNode of children) {
|
|
875
920
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
876
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
921
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
877
922
|
const slotName = childNode["s-sn"];
|
|
878
923
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
879
924
|
node = hostContentNodes[j];
|
|
@@ -915,21 +960,6 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
915
960
|
}
|
|
916
961
|
}
|
|
917
962
|
};
|
|
918
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
919
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
920
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
921
|
-
return true;
|
|
922
|
-
}
|
|
923
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
924
|
-
return true;
|
|
925
|
-
}
|
|
926
|
-
return false;
|
|
927
|
-
}
|
|
928
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
929
|
-
return true;
|
|
930
|
-
}
|
|
931
|
-
return slotName === "";
|
|
932
|
-
};
|
|
933
963
|
var nullifyVNodeRefs = (vNode) => {
|
|
934
964
|
{
|
|
935
965
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -937,8 +967,9 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
937
967
|
}
|
|
938
968
|
};
|
|
939
969
|
var insertBefore = (parent, newNode, reference) => {
|
|
940
|
-
|
|
941
|
-
|
|
970
|
+
{
|
|
971
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
972
|
+
}
|
|
942
973
|
};
|
|
943
974
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
944
975
|
var _a, _b, _c, _d;
|
|
@@ -964,10 +995,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
964
995
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
965
996
|
hostRef.$vnode$ = rootVnode;
|
|
966
997
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
967
|
-
|
|
968
|
-
scopeId = hostElm["s-sc"];
|
|
969
|
-
}
|
|
970
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
998
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
971
999
|
{
|
|
972
1000
|
contentRef = hostElm["s-cr"];
|
|
973
1001
|
checkSlotFallbackVisibility = false;
|
|
@@ -995,7 +1023,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
995
1023
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
996
1024
|
while (orgLocationNode) {
|
|
997
1025
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
998
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1026
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
999
1027
|
refNode = refNode.nextSibling;
|
|
1000
1028
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1001
1029
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1008,13 +1036,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1008
1036
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1009
1037
|
}
|
|
1010
1038
|
}
|
|
1011
|
-
|
|
1039
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1040
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1041
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1012
1042
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1013
1043
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1014
1044
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1015
1045
|
}
|
|
1016
1046
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1017
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1047
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1018
1048
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1019
1049
|
}
|
|
1020
1050
|
}
|
|
@@ -1042,7 +1072,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1042
1072
|
// src/runtime/update-component.ts
|
|
1043
1073
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1044
1074
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1045
|
-
ancestorComponent["s-p"].push(
|
|
1075
|
+
const index = ancestorComponent["s-p"].push(
|
|
1076
|
+
new Promise(
|
|
1077
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1078
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1079
|
+
r();
|
|
1080
|
+
}
|
|
1081
|
+
)
|
|
1082
|
+
);
|
|
1046
1083
|
}
|
|
1047
1084
|
};
|
|
1048
1085
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1071,12 +1108,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1071
1108
|
{
|
|
1072
1109
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1073
1110
|
if (hostRef.$queuedListeners$) {
|
|
1074
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1111
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1075
1112
|
hostRef.$queuedListeners$ = void 0;
|
|
1076
1113
|
}
|
|
1077
1114
|
}
|
|
1078
1115
|
{
|
|
1079
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1116
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1080
1117
|
}
|
|
1081
1118
|
}
|
|
1082
1119
|
endSchedule();
|
|
@@ -1145,7 +1182,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1145
1182
|
const instance = hostRef.$lazyInstance$ ;
|
|
1146
1183
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1147
1184
|
{
|
|
1148
|
-
safeCall(instance, "componentDidRender");
|
|
1185
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1149
1186
|
}
|
|
1150
1187
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1151
1188
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -1174,17 +1211,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1174
1211
|
}
|
|
1175
1212
|
};
|
|
1176
1213
|
var appDidLoad = (who) => {
|
|
1177
|
-
{
|
|
1178
|
-
addHydratedFlag(doc.documentElement);
|
|
1179
|
-
}
|
|
1180
1214
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1181
1215
|
};
|
|
1182
|
-
var safeCall = (instance, method, arg) => {
|
|
1216
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1183
1217
|
if (instance && instance[method]) {
|
|
1184
1218
|
try {
|
|
1185
1219
|
return instance[method](arg);
|
|
1186
1220
|
} catch (e) {
|
|
1187
|
-
consoleError(e);
|
|
1221
|
+
consoleError(e, elm);
|
|
1188
1222
|
}
|
|
1189
1223
|
}
|
|
1190
1224
|
return void 0;
|
|
@@ -1243,15 +1277,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1243
1277
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1244
1278
|
members.map(([memberName, [memberFlags]]) => {
|
|
1245
1279
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1280
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1281
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1282
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1283
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1284
|
+
Object.defineProperty(prototype, memberName, {
|
|
1285
|
+
get() {
|
|
1286
|
+
{
|
|
1287
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1288
|
+
return getValue(this, memberName);
|
|
1289
|
+
}
|
|
1290
|
+
const ref = getHostRef(this);
|
|
1291
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1292
|
+
if (!instance) return;
|
|
1293
|
+
return instance[memberName];
|
|
1294
|
+
}
|
|
1295
|
+
},
|
|
1296
|
+
configurable: true,
|
|
1297
|
+
enumerable: true
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1246
1300
|
Object.defineProperty(prototype, memberName, {
|
|
1247
|
-
get() {
|
|
1248
|
-
return getValue(this, memberName);
|
|
1249
|
-
},
|
|
1250
1301
|
set(newValue) {
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1302
|
+
const ref = getHostRef(this);
|
|
1303
|
+
if (origSetter) {
|
|
1304
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1305
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1306
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1307
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1308
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1309
|
+
}
|
|
1310
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1311
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1312
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1313
|
+
return;
|
|
1314
|
+
}
|
|
1315
|
+
{
|
|
1316
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1317
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1318
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1319
|
+
ref.$onReadyPromise$.then(() => {
|
|
1320
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1321
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1322
|
+
}
|
|
1323
|
+
});
|
|
1324
|
+
}
|
|
1325
|
+
return;
|
|
1326
|
+
}
|
|
1327
|
+
const setterSetVal = () => {
|
|
1328
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1329
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1330
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1331
|
+
}
|
|
1332
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1333
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1334
|
+
};
|
|
1335
|
+
if (ref.$lazyInstance$) {
|
|
1336
|
+
setterSetVal();
|
|
1337
|
+
} else {
|
|
1338
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1255
1342
|
});
|
|
1256
1343
|
}
|
|
1257
1344
|
});
|
|
@@ -1261,7 +1348,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1261
1348
|
plt.jmp(() => {
|
|
1262
1349
|
var _a2;
|
|
1263
1350
|
const propName = attrNameToPropName.get(attrName);
|
|
1264
|
-
if (this.hasOwnProperty(propName)) {
|
|
1351
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1265
1352
|
newValue = this[propName];
|
|
1266
1353
|
delete this[propName];
|
|
1267
1354
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1281,7 +1368,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1281
1368
|
}
|
|
1282
1369
|
return;
|
|
1283
1370
|
}
|
|
1284
|
-
|
|
1371
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1372
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1373
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1374
|
+
this[propName] = newValue;
|
|
1375
|
+
}
|
|
1285
1376
|
});
|
|
1286
1377
|
};
|
|
1287
1378
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1310,7 +1401,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1310
1401
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1311
1402
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1312
1403
|
if (bundleId) {
|
|
1313
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1404
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1314
1405
|
if (CstrImport && "then" in CstrImport) {
|
|
1315
1406
|
const endLoad = uniqueTime();
|
|
1316
1407
|
Cstr = await CstrImport;
|
|
@@ -1335,7 +1426,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1335
1426
|
try {
|
|
1336
1427
|
new Cstr(hostRef);
|
|
1337
1428
|
} catch (e) {
|
|
1338
|
-
consoleError(e);
|
|
1429
|
+
consoleError(e, elm);
|
|
1339
1430
|
}
|
|
1340
1431
|
{
|
|
1341
1432
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1344,7 +1435,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1344
1435
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1345
1436
|
}
|
|
1346
1437
|
endNewInstance();
|
|
1347
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1438
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1348
1439
|
} else {
|
|
1349
1440
|
Cstr = elm.constructor;
|
|
1350
1441
|
const cmpTag = elm.localName;
|
|
@@ -1371,9 +1462,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1371
1462
|
schedule();
|
|
1372
1463
|
}
|
|
1373
1464
|
};
|
|
1374
|
-
var fireConnectedCallback = (instance) => {
|
|
1465
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1375
1466
|
{
|
|
1376
|
-
safeCall(instance, "connectedCallback");
|
|
1467
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1377
1468
|
}
|
|
1378
1469
|
};
|
|
1379
1470
|
|
|
@@ -1415,9 +1506,9 @@ var connectedCallback = (elm) => {
|
|
|
1415
1506
|
} else {
|
|
1416
1507
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1417
1508
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1418
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1509
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1419
1510
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1420
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
1511
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1421
1512
|
}
|
|
1422
1513
|
}
|
|
1423
1514
|
endConnected();
|
|
@@ -1430,9 +1521,9 @@ var setContentReference = (elm) => {
|
|
|
1430
1521
|
contentRefElm["s-cn"] = true;
|
|
1431
1522
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1432
1523
|
};
|
|
1433
|
-
var disconnectInstance = (instance) => {
|
|
1524
|
+
var disconnectInstance = (instance, elm) => {
|
|
1434
1525
|
{
|
|
1435
|
-
safeCall(instance, "disconnectedCallback");
|
|
1526
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1436
1527
|
}
|
|
1437
1528
|
};
|
|
1438
1529
|
var disconnectedCallback = async (elm) => {
|
|
@@ -1445,11 +1536,17 @@ var disconnectedCallback = async (elm) => {
|
|
|
1445
1536
|
}
|
|
1446
1537
|
}
|
|
1447
1538
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1448
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1539
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1449
1540
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1450
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1541
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1451
1542
|
}
|
|
1452
1543
|
}
|
|
1544
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1545
|
+
rootAppliedStyles.delete(elm);
|
|
1546
|
+
}
|
|
1547
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1548
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1549
|
+
}
|
|
1453
1550
|
};
|
|
1454
1551
|
|
|
1455
1552
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1534,6 +1631,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1534
1631
|
}
|
|
1535
1632
|
disconnectedCallback() {
|
|
1536
1633
|
plt.jmp(() => disconnectedCallback(this));
|
|
1634
|
+
plt.raf(() => {
|
|
1635
|
+
var _a3;
|
|
1636
|
+
const hostRef = getHostRef(this);
|
|
1637
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1638
|
+
if (i2 > -1) {
|
|
1639
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
1640
|
+
}
|
|
1641
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1642
|
+
delete hostRef.$vnode$.$elm$;
|
|
1643
|
+
}
|
|
1644
|
+
});
|
|
1537
1645
|
}
|
|
1538
1646
|
componentOnReady() {
|
|
1539
1647
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1597,7 +1705,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1597
1705
|
}
|
|
1598
1706
|
}
|
|
1599
1707
|
} catch (e) {
|
|
1600
|
-
consoleError(e);
|
|
1708
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1601
1709
|
}
|
|
1602
1710
|
};
|
|
1603
1711
|
var getHostListenerTarget = (elm, flags) => {
|