@everymatrix/casino-game-thumb-view 1.54.12 → 1.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/casino-game-thumb-view/casino-game-thumb-view.esm.js +1 -1
- package/dist/casino-game-thumb-view/p-3ac1ceb2.entry.js +7 -0
- package/dist/casino-game-thumb-view/p-6f25852e.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-89d09251.js +2 -0
- package/dist/casino-game-thumb-view/p-c7ae1205.entry.js +1 -0
- package/dist/casino-game-thumb-view/{p-600af885.entry.js → p-c9da4e8b.entry.js} +1 -1
- package/dist/casino-game-thumb-view/p-cbb0566f.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-cfd13ff8.entry.js +1 -0
- package/dist/cjs/casino-extrainfo-baccarat.cjs.entry.js +5 -1
- package/dist/cjs/casino-extrainfo-blackjack.cjs.entry.js +6 -1
- package/dist/cjs/casino-extrainfo-roulette.cjs.entry.js +4 -4
- package/dist/cjs/casino-game-thumb-view.cjs.js +2 -2
- package/dist/cjs/casino-game-thumb-view_2.cjs.entry.js +40 -51
- package/dist/cjs/casino-game-thumbnail-betlimit_2.cjs.entry.js +7 -2
- package/dist/cjs/casino-normal-game-thumbnail.cjs.entry.js +2 -1
- package/dist/cjs/{index-b36c6933.js → index-0892a7c6.js} +145 -255
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.js +4 -4
- package/dist/collection/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.js +7 -2
- package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.js +3 -5
- package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.js +33 -99
- package/dist/collection/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.js +3 -5
- package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js +4 -3
- package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js +6 -27
- package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js +3 -2
- package/dist/esm/casino-extrainfo-baccarat.entry.js +5 -1
- package/dist/esm/casino-extrainfo-blackjack.entry.js +6 -1
- package/dist/esm/casino-extrainfo-roulette.entry.js +4 -4
- package/dist/esm/casino-game-thumb-view.js +3 -3
- package/dist/esm/casino-game-thumb-view_2.entry.js +40 -51
- package/dist/esm/casino-game-thumbnail-betlimit_2.entry.js +7 -2
- package/dist/esm/casino-normal-game-thumbnail.entry.js +2 -1
- package/dist/esm/{index-23b4a4c5.js → index-bbccad17.js} +145 -255
- package/dist/esm/loader.js +2 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/casino-game-thumb-view/p-13741d4d.js +0 -2
- package/dist/casino-game-thumb-view/p-53ba085b.entry.js +0 -1
- package/dist/casino-game-thumb-view/p-b13b5c25.entry.js +0 -1
- package/dist/casino-game-thumb-view/p-c6ee2783.entry.js +0 -1
- package/dist/casino-game-thumb-view/p-dd797f50.entry.js +0 -7
- package/dist/casino-game-thumb-view/p-ee2bdcce.entry.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -1,25 +1,17 @@
|
|
1
1
|
const NAMESPACE = 'casino-game-thumb-view';
|
2
|
-
const BUILD = /* casino-game-thumb-view */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, 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: true, hostListenerTargetParent: false, hostListenerTargetWindow: false, 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: true, mode: false,
|
2
|
+
const BUILD = /* casino-game-thumb-view */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: true, cmpWillUpdate: false, connectedCallback: false, 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: true, hostListenerTargetParent: false, hostListenerTargetWindow: false, 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: true, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: false, 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: true, watchCallback: true };
|
3
3
|
|
4
4
|
/*
|
5
|
-
Stencil Client Platform v4.
|
5
|
+
Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
|
6
6
|
*/
|
7
7
|
var __defProp = Object.defineProperty;
|
8
8
|
var __export = (target, all) => {
|
9
9
|
for (var name in all)
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
11
11
|
};
|
12
|
-
|
13
|
-
// src/utils/constants.ts
|
14
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
15
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
16
|
-
|
17
|
-
// src/client/client-host-ref.ts
|
18
12
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
19
13
|
var getHostRef = (ref) => hostRefs.get(ref);
|
20
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
21
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
22
|
-
};
|
14
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
23
15
|
var registerHost = (hostElement, cmpMeta) => {
|
24
16
|
const hostRef = {
|
25
17
|
$flags$: 0,
|
@@ -35,8 +27,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
35
27
|
hostElement["s-p"] = [];
|
36
28
|
hostElement["s-rc"] = [];
|
37
29
|
}
|
38
|
-
|
39
|
-
return ref;
|
30
|
+
return hostRefs.set(hostElement, hostRef);
|
40
31
|
};
|
41
32
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
42
33
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
@@ -93,22 +84,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
93
84
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
94
85
|
/* webpackMode: "lazy" */
|
95
86
|
`./${bundleId}.entry.js${""}`
|
96
|
-
).then(
|
97
|
-
|
98
|
-
|
99
|
-
cmpModules.set(bundleId, importedModule);
|
100
|
-
}
|
101
|
-
return importedModule[exportName];
|
102
|
-
},
|
103
|
-
(e) => {
|
104
|
-
consoleError(e, hostRef.$hostElement$);
|
87
|
+
).then((importedModule) => {
|
88
|
+
{
|
89
|
+
cmpModules.set(bundleId, importedModule);
|
105
90
|
}
|
106
|
-
|
91
|
+
return importedModule[exportName];
|
92
|
+
}, consoleError);
|
107
93
|
};
|
108
94
|
|
109
95
|
// src/client/client-style.ts
|
110
96
|
var styles = /* @__PURE__ */ new Map();
|
111
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
112
97
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
113
98
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
114
99
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
@@ -183,6 +168,14 @@ var flush = () => {
|
|
183
168
|
};
|
184
169
|
var nextTick = (cb) => promiseResolve().then(cb);
|
185
170
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
171
|
+
|
172
|
+
// src/utils/constants.ts
|
173
|
+
var EMPTY_OBJ = {};
|
174
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
175
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
176
|
+
|
177
|
+
// src/utils/helpers.ts
|
178
|
+
var isDef = (v) => v != null;
|
186
179
|
var isComplexType = (o) => {
|
187
180
|
o = typeof o;
|
188
181
|
return o === "object" || o === "function";
|
@@ -242,63 +235,6 @@ var unwrapErr = (result) => {
|
|
242
235
|
throw result.value;
|
243
236
|
}
|
244
237
|
};
|
245
|
-
var updateFallbackSlotVisibility = (elm) => {
|
246
|
-
const childNodes = elm.__childNodes || elm.childNodes;
|
247
|
-
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
248
|
-
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
249
|
-
var _a;
|
250
|
-
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
251
|
-
if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
|
252
|
-
slotNode.hidden = true;
|
253
|
-
} else {
|
254
|
-
slotNode.hidden = false;
|
255
|
-
}
|
256
|
-
}
|
257
|
-
});
|
258
|
-
}
|
259
|
-
for (const childNode of childNodes) {
|
260
|
-
if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
|
261
|
-
updateFallbackSlotVisibility(childNode);
|
262
|
-
}
|
263
|
-
}
|
264
|
-
};
|
265
|
-
function getHostSlotNodes(childNodes, hostName, slotName) {
|
266
|
-
let i2 = 0;
|
267
|
-
let slottedNodes = [];
|
268
|
-
let childNode;
|
269
|
-
for (; i2 < childNodes.length; i2++) {
|
270
|
-
childNode = childNodes[i2];
|
271
|
-
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
272
|
-
slottedNodes.push(childNode);
|
273
|
-
if (typeof slotName !== "undefined") return slottedNodes;
|
274
|
-
}
|
275
|
-
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
276
|
-
}
|
277
|
-
return slottedNodes;
|
278
|
-
}
|
279
|
-
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
280
|
-
const childNodes = [];
|
281
|
-
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
282
|
-
while ((node = node.nextSibling) && node["s-sn"] === slotName) {
|
283
|
-
childNodes.push(node);
|
284
|
-
}
|
285
|
-
return childNodes;
|
286
|
-
};
|
287
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
288
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
289
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
290
|
-
return true;
|
291
|
-
}
|
292
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
293
|
-
return true;
|
294
|
-
}
|
295
|
-
return false;
|
296
|
-
}
|
297
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
298
|
-
return true;
|
299
|
-
}
|
300
|
-
return slotName === "";
|
301
|
-
};
|
302
238
|
var createTime = (fnName, tagName = "") => {
|
303
239
|
{
|
304
240
|
return () => {
|
@@ -490,7 +426,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
490
426
|
}
|
491
427
|
if (!appliedStyles.has(scopeId2)) {
|
492
428
|
{
|
493
|
-
styleElm =
|
429
|
+
styleElm = doc.createElement("style");
|
494
430
|
styleElm.innerHTML = style;
|
495
431
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
496
432
|
if (nonce != null) {
|
@@ -500,10 +436,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
500
436
|
if (styleContainerNode.nodeName === "HEAD") {
|
501
437
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
502
438
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
503
|
-
styleContainerNode.insertBefore(
|
504
|
-
styleElm,
|
505
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
506
|
-
);
|
439
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
507
440
|
} else if ("host" in styleContainerNode) {
|
508
441
|
if (supportsConstructableStylesheets) {
|
509
442
|
const stylesheet = new CSSStyleSheet();
|
@@ -521,7 +454,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
521
454
|
styleContainerNode.append(styleElm);
|
522
455
|
}
|
523
456
|
}
|
524
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
457
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
525
458
|
styleContainerNode.insertBefore(styleElm, null);
|
526
459
|
}
|
527
460
|
}
|
@@ -546,25 +479,23 @@ var attachStyles = (hostRef) => {
|
|
546
479
|
const scopeId2 = addStyle(
|
547
480
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
548
481
|
cmpMeta);
|
549
|
-
if (
|
482
|
+
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
550
483
|
elm["s-sc"] = scopeId2;
|
551
484
|
elm.classList.add(scopeId2 + "-h");
|
552
485
|
}
|
553
486
|
endAttachStyles();
|
554
487
|
};
|
555
488
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
556
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
489
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
557
490
|
if (oldValue !== newValue) {
|
558
491
|
let isProp = isMemberInElement(elm, memberName);
|
559
492
|
let ln = memberName.toLowerCase();
|
560
493
|
if (memberName === "class") {
|
561
494
|
const classList = elm.classList;
|
562
495
|
const oldClasses = parseClassList(oldValue);
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
567
|
-
}
|
496
|
+
const newClasses = parseClassList(newValue);
|
497
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
498
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
568
499
|
} else if (memberName === "style") {
|
569
500
|
{
|
570
501
|
for (const prop in oldValue) {
|
@@ -623,7 +554,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
623
554
|
elm.setAttribute(memberName, n);
|
624
555
|
}
|
625
556
|
}
|
626
|
-
} else
|
557
|
+
} else {
|
627
558
|
elm[memberName] = newValue;
|
628
559
|
}
|
629
560
|
} catch (e) {
|
@@ -656,44 +587,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
656
587
|
}
|
657
588
|
};
|
658
589
|
var parseClassListRegex = /\s/;
|
659
|
-
var parseClassList = (value) =>
|
660
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
661
|
-
value = value.baseVal;
|
662
|
-
}
|
663
|
-
if (!value || typeof value !== "string") {
|
664
|
-
return [];
|
665
|
-
}
|
666
|
-
return value.split(parseClassListRegex);
|
667
|
-
};
|
590
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
668
591
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
669
592
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
670
593
|
|
671
594
|
// src/runtime/vdom/update-element.ts
|
672
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
595
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
673
596
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
674
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
675
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
597
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
598
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
676
599
|
{
|
677
600
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
678
601
|
if (!(memberName in newVnodeAttrs)) {
|
679
|
-
setAccessor(
|
680
|
-
elm,
|
681
|
-
memberName,
|
682
|
-
oldVnodeAttrs[memberName],
|
683
|
-
void 0,
|
684
|
-
isSvgMode2,
|
685
|
-
newVnode.$flags$);
|
602
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
686
603
|
}
|
687
604
|
}
|
688
605
|
}
|
689
606
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
690
|
-
setAccessor(
|
691
|
-
elm,
|
692
|
-
memberName,
|
693
|
-
oldVnodeAttrs[memberName],
|
694
|
-
newVnodeAttrs[memberName],
|
695
|
-
isSvgMode2,
|
696
|
-
newVnode.$flags$);
|
607
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
697
608
|
}
|
698
609
|
};
|
699
610
|
function sortedAttrNames(attrNames) {
|
@@ -705,13 +616,16 @@ function sortedAttrNames(attrNames) {
|
|
705
616
|
attrNames
|
706
617
|
);
|
707
618
|
}
|
619
|
+
|
620
|
+
// src/runtime/vdom/vdom-render.ts
|
621
|
+
var scopeId;
|
708
622
|
var contentRef;
|
709
623
|
var hostTagName;
|
710
624
|
var useNativeShadowDom = false;
|
711
625
|
var checkSlotFallbackVisibility = false;
|
712
626
|
var checkSlotRelocate = false;
|
713
627
|
var isSvgMode = false;
|
714
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
628
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
715
629
|
var _a;
|
716
630
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
717
631
|
let i2 = 0;
|
@@ -721,6 +635,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
721
635
|
if (!useNativeShadowDom) {
|
722
636
|
checkSlotRelocate = true;
|
723
637
|
if (newVNode2.$tag$ === "slot") {
|
638
|
+
if (scopeId) {
|
639
|
+
parentElm.classList.add(scopeId + "-s");
|
640
|
+
}
|
724
641
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
725
642
|
// slot element has fallback content
|
726
643
|
// still create an element that "mocks" the slot element
|
@@ -751,9 +668,14 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
751
668
|
{
|
752
669
|
updateElement(null, newVNode2, isSvgMode);
|
753
670
|
}
|
671
|
+
const rootNode = elm.getRootNode();
|
672
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
673
|
+
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
674
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
675
|
+
}
|
754
676
|
if (newVNode2.$children$) {
|
755
677
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
756
|
-
childNode = createElm(oldParentVNode, newVNode2, i2);
|
678
|
+
childNode = createElm(oldParentVNode, newVNode2, i2, elm);
|
757
679
|
if (childNode) {
|
758
680
|
elm.appendChild(childNode);
|
759
681
|
}
|
@@ -786,7 +708,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
786
708
|
};
|
787
709
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
788
710
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
789
|
-
const oldSlotChildNodes = Array.from(parentElm.
|
711
|
+
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
790
712
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
791
713
|
let node = parentElm;
|
792
714
|
while (node = node.nextSibling) {
|
@@ -798,7 +720,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
798
720
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
799
721
|
const childNode = oldSlotChildNodes[i2];
|
800
722
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
801
|
-
insertBefore(
|
723
|
+
insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
|
802
724
|
childNode["s-ol"].remove();
|
803
725
|
childNode["s-ol"] = void 0;
|
804
726
|
childNode["s-sh"] = void 0;
|
@@ -818,7 +740,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
818
740
|
}
|
819
741
|
for (; startIdx <= endIdx; ++startIdx) {
|
820
742
|
if (vnodes[startIdx]) {
|
821
|
-
childNode = createElm(null, parentVNode, startIdx);
|
743
|
+
childNode = createElm(null, parentVNode, startIdx, parentElm);
|
822
744
|
if (childNode) {
|
823
745
|
vnodes[startIdx].$elm$ = childNode;
|
824
746
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
@@ -905,7 +827,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
905
827
|
if (idxInOld >= 0) {
|
906
828
|
elmToMove = oldCh[idxInOld];
|
907
829
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
908
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
830
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
|
909
831
|
} else {
|
910
832
|
patch(elmToMove, newStartVnode, isInitialRender);
|
911
833
|
oldCh[idxInOld] = void 0;
|
@@ -913,16 +835,12 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
913
835
|
}
|
914
836
|
newStartVnode = newCh[++newStartIdx];
|
915
837
|
} else {
|
916
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
838
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
|
917
839
|
newStartVnode = newCh[++newStartIdx];
|
918
840
|
}
|
919
841
|
if (node) {
|
920
842
|
{
|
921
|
-
insertBefore(
|
922
|
-
referenceNode(oldStartVnode.$elm$).parentNode,
|
923
|
-
node,
|
924
|
-
referenceNode(oldStartVnode.$elm$)
|
925
|
-
);
|
843
|
+
insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
|
926
844
|
}
|
927
845
|
}
|
928
846
|
}
|
@@ -943,19 +861,28 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
943
861
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
944
862
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
945
863
|
if (leftVNode.$tag$ === "slot") {
|
864
|
+
if (
|
865
|
+
// The component gets hydrated and no VDOM has been initialized.
|
866
|
+
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
867
|
+
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
868
|
+
// hydration comments to be removed
|
869
|
+
leftVNode.$elm$.nodeType !== 8
|
870
|
+
) {
|
871
|
+
return false;
|
872
|
+
}
|
946
873
|
return leftVNode.$name$ === rightVNode.$name$;
|
947
874
|
}
|
948
875
|
if (!isInitialRender) {
|
949
876
|
return leftVNode.$key$ === rightVNode.$key$;
|
950
877
|
}
|
951
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
952
|
-
leftVNode.$key$ = rightVNode.$key$;
|
953
|
-
}
|
954
878
|
return true;
|
955
879
|
}
|
956
880
|
return false;
|
957
881
|
};
|
958
|
-
var referenceNode = (node) =>
|
882
|
+
var referenceNode = (node) => {
|
883
|
+
return node && node["s-ol"] || node;
|
884
|
+
};
|
885
|
+
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
959
886
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
960
887
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
961
888
|
const oldChildren = oldVNode.$children$;
|
@@ -994,15 +921,41 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
994
921
|
elm.data = text;
|
995
922
|
}
|
996
923
|
};
|
924
|
+
var updateFallbackSlotVisibility = (elm) => {
|
925
|
+
const childNodes = elm.childNodes;
|
926
|
+
for (const childNode of childNodes) {
|
927
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
928
|
+
if (childNode["s-sr"]) {
|
929
|
+
const slotName = childNode["s-sn"];
|
930
|
+
childNode.hidden = false;
|
931
|
+
for (const siblingNode of childNodes) {
|
932
|
+
if (siblingNode !== childNode) {
|
933
|
+
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
934
|
+
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
935
|
+
childNode.hidden = true;
|
936
|
+
break;
|
937
|
+
}
|
938
|
+
} else {
|
939
|
+
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
940
|
+
childNode.hidden = true;
|
941
|
+
break;
|
942
|
+
}
|
943
|
+
}
|
944
|
+
}
|
945
|
+
}
|
946
|
+
}
|
947
|
+
updateFallbackSlotVisibility(childNode);
|
948
|
+
}
|
949
|
+
}
|
950
|
+
};
|
997
951
|
var relocateNodes = [];
|
998
952
|
var markSlotContentForRelocation = (elm) => {
|
999
953
|
let node;
|
1000
954
|
let hostContentNodes;
|
1001
955
|
let j;
|
1002
|
-
const
|
1003
|
-
for (const childNode of children) {
|
956
|
+
for (const childNode of elm.childNodes) {
|
1004
957
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
1005
|
-
hostContentNodes = node.parentNode.
|
958
|
+
hostContentNodes = node.parentNode.childNodes;
|
1006
959
|
const slotName = childNode["s-sn"];
|
1007
960
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
1008
961
|
node = hostContentNodes[j];
|
@@ -1044,6 +997,21 @@ var markSlotContentForRelocation = (elm) => {
|
|
1044
997
|
}
|
1045
998
|
}
|
1046
999
|
};
|
1000
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
1001
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
1002
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
1003
|
+
return true;
|
1004
|
+
}
|
1005
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
1006
|
+
return true;
|
1007
|
+
}
|
1008
|
+
return false;
|
1009
|
+
}
|
1010
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
1011
|
+
return true;
|
1012
|
+
}
|
1013
|
+
return slotName === "";
|
1014
|
+
};
|
1047
1015
|
var nullifyVNodeRefs = (vNode) => {
|
1048
1016
|
{
|
1049
1017
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
@@ -1051,9 +1019,8 @@ var nullifyVNodeRefs = (vNode) => {
|
|
1051
1019
|
}
|
1052
1020
|
};
|
1053
1021
|
var insertBefore = (parent, newNode, reference) => {
|
1054
|
-
|
1055
|
-
|
1056
|
-
}
|
1022
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
1023
|
+
return inserted;
|
1057
1024
|
};
|
1058
1025
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
1059
1026
|
var _a, _b, _c, _d;
|
@@ -1073,7 +1040,10 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1073
1040
|
rootVnode.$flags$ |= 4 /* isHost */;
|
1074
1041
|
hostRef.$vnode$ = rootVnode;
|
1075
1042
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
1076
|
-
|
1043
|
+
{
|
1044
|
+
scopeId = hostElm["s-sc"];
|
1045
|
+
}
|
1046
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
1077
1047
|
{
|
1078
1048
|
contentRef = hostElm["s-cr"];
|
1079
1049
|
checkSlotFallbackVisibility = false;
|
@@ -1101,7 +1071,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1101
1071
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
1102
1072
|
while (orgLocationNode) {
|
1103
1073
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
1104
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef ===
|
1074
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
1105
1075
|
refNode = refNode.nextSibling;
|
1106
1076
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
1107
1077
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
@@ -1114,15 +1084,13 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1114
1084
|
orgLocationNode = orgLocationNode.previousSibling;
|
1115
1085
|
}
|
1116
1086
|
}
|
1117
|
-
|
1118
|
-
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
1119
|
-
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
1087
|
+
if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
|
1120
1088
|
if (nodeToRelocate !== insertBeforeNode) {
|
1121
1089
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
1122
1090
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
1123
1091
|
}
|
1124
1092
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
1125
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */
|
1093
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
1126
1094
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
1127
1095
|
}
|
1128
1096
|
}
|
@@ -1150,14 +1118,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1150
1118
|
// src/runtime/update-component.ts
|
1151
1119
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
1152
1120
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
1153
|
-
|
1154
|
-
new Promise(
|
1155
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
1156
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
1157
|
-
r();
|
1158
|
-
}
|
1159
|
-
)
|
1160
|
-
);
|
1121
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
1161
1122
|
}
|
1162
1123
|
};
|
1163
1124
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
@@ -1186,16 +1147,16 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
1186
1147
|
{
|
1187
1148
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
1188
1149
|
if (hostRef.$queuedListeners$) {
|
1189
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event
|
1150
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
1190
1151
|
hostRef.$queuedListeners$ = void 0;
|
1191
1152
|
}
|
1192
1153
|
}
|
1193
1154
|
{
|
1194
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
1155
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
1195
1156
|
}
|
1196
1157
|
}
|
1197
1158
|
{
|
1198
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"
|
1159
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
1199
1160
|
}
|
1200
1161
|
endSchedule();
|
1201
1162
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
@@ -1263,7 +1224,7 @@ var postUpdateComponent = (hostRef) => {
|
|
1263
1224
|
const instance = hostRef.$lazyInstance$ ;
|
1264
1225
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
1265
1226
|
{
|
1266
|
-
safeCall(instance, "componentDidRender"
|
1227
|
+
safeCall(instance, "componentDidRender");
|
1267
1228
|
}
|
1268
1229
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
1269
1230
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
@@ -1271,7 +1232,7 @@ var postUpdateComponent = (hostRef) => {
|
|
1271
1232
|
addHydratedFlag(elm);
|
1272
1233
|
}
|
1273
1234
|
{
|
1274
|
-
safeCall(instance, "componentDidLoad"
|
1235
|
+
safeCall(instance, "componentDidLoad");
|
1275
1236
|
}
|
1276
1237
|
endPostUpdate();
|
1277
1238
|
{
|
@@ -1298,14 +1259,17 @@ var postUpdateComponent = (hostRef) => {
|
|
1298
1259
|
}
|
1299
1260
|
};
|
1300
1261
|
var appDidLoad = (who) => {
|
1262
|
+
{
|
1263
|
+
addHydratedFlag(doc.documentElement);
|
1264
|
+
}
|
1301
1265
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
1302
1266
|
};
|
1303
|
-
var safeCall = (instance, method, arg
|
1267
|
+
var safeCall = (instance, method, arg) => {
|
1304
1268
|
if (instance && instance[method]) {
|
1305
1269
|
try {
|
1306
1270
|
return instance[method](arg);
|
1307
1271
|
} catch (e) {
|
1308
|
-
consoleError(e
|
1272
|
+
consoleError(e);
|
1309
1273
|
}
|
1310
1274
|
}
|
1311
1275
|
return void 0;
|
@@ -1364,68 +1328,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1364
1328
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
1365
1329
|
members.map(([memberName, [memberFlags]]) => {
|
1366
1330
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
1367
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
1368
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
1369
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
1370
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
1371
|
-
Object.defineProperty(prototype, memberName, {
|
1372
|
-
get() {
|
1373
|
-
{
|
1374
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
1375
|
-
return getValue(this, memberName);
|
1376
|
-
}
|
1377
|
-
const ref = getHostRef(this);
|
1378
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
1379
|
-
if (!instance) return;
|
1380
|
-
return instance[memberName];
|
1381
|
-
}
|
1382
|
-
},
|
1383
|
-
configurable: true,
|
1384
|
-
enumerable: true
|
1385
|
-
});
|
1386
|
-
}
|
1387
1331
|
Object.defineProperty(prototype, memberName, {
|
1332
|
+
get() {
|
1333
|
+
return getValue(this, memberName);
|
1334
|
+
},
|
1388
1335
|
set(newValue) {
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
newValue = ref.$instanceValues$.get(memberName);
|
1394
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
1395
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
1396
|
-
}
|
1397
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
1398
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
1399
|
-
setValue(this, memberName, newValue, cmpMeta);
|
1400
|
-
return;
|
1401
|
-
}
|
1402
|
-
{
|
1403
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
1404
|
-
setValue(this, memberName, newValue, cmpMeta);
|
1405
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
1406
|
-
ref.$onReadyPromise$.then(() => {
|
1407
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
1408
|
-
ref.$lazyInstance$[memberName] = newValue;
|
1409
|
-
}
|
1410
|
-
});
|
1411
|
-
}
|
1412
|
-
return;
|
1413
|
-
}
|
1414
|
-
const setterSetVal = () => {
|
1415
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
1416
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
1417
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
1418
|
-
}
|
1419
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
1420
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
1421
|
-
};
|
1422
|
-
if (ref.$lazyInstance$) {
|
1423
|
-
setterSetVal();
|
1424
|
-
} else {
|
1425
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
1426
|
-
}
|
1427
|
-
}
|
1428
|
-
}
|
1336
|
+
setValue(this, memberName, newValue, cmpMeta);
|
1337
|
+
},
|
1338
|
+
configurable: true,
|
1339
|
+
enumerable: true
|
1429
1340
|
});
|
1430
1341
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
1431
1342
|
Object.defineProperty(prototype, memberName, {
|
@@ -1446,7 +1357,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1446
1357
|
plt.jmp(() => {
|
1447
1358
|
var _a2;
|
1448
1359
|
const propName = attrNameToPropName.get(attrName);
|
1449
|
-
if (this.hasOwnProperty(propName)
|
1360
|
+
if (this.hasOwnProperty(propName)) {
|
1450
1361
|
newValue = this[propName];
|
1451
1362
|
delete this[propName];
|
1452
1363
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
@@ -1466,11 +1377,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1466
1377
|
}
|
1467
1378
|
return;
|
1468
1379
|
}
|
1469
|
-
|
1470
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
1471
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
1472
|
-
this[propName] = newValue;
|
1473
|
-
}
|
1380
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
1474
1381
|
});
|
1475
1382
|
};
|
1476
1383
|
Cstr.observedAttributes = Array.from(
|
@@ -1495,7 +1402,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1495
1402
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
1496
1403
|
const bundleId = cmpMeta.$lazyBundleId$;
|
1497
1404
|
if (bundleId) {
|
1498
|
-
const CstrImport = loadModule(cmpMeta
|
1405
|
+
const CstrImport = loadModule(cmpMeta);
|
1499
1406
|
if (CstrImport && "then" in CstrImport) {
|
1500
1407
|
const endLoad = uniqueTime();
|
1501
1408
|
Cstr = await CstrImport;
|
@@ -1520,7 +1427,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1520
1427
|
try {
|
1521
1428
|
new Cstr(hostRef);
|
1522
1429
|
} catch (e) {
|
1523
|
-
consoleError(e
|
1430
|
+
consoleError(e);
|
1524
1431
|
}
|
1525
1432
|
{
|
1526
1433
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
@@ -1555,7 +1462,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1555
1462
|
schedule();
|
1556
1463
|
}
|
1557
1464
|
};
|
1558
|
-
var fireConnectedCallback = (instance
|
1465
|
+
var fireConnectedCallback = (instance) => {
|
1559
1466
|
};
|
1560
1467
|
|
1561
1468
|
// src/runtime/connected-callback.ts
|
@@ -1609,9 +1516,9 @@ var setContentReference = (elm) => {
|
|
1609
1516
|
contentRefElm["s-cn"] = true;
|
1610
1517
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
1611
1518
|
};
|
1612
|
-
var disconnectInstance = (instance
|
1519
|
+
var disconnectInstance = (instance) => {
|
1613
1520
|
{
|
1614
|
-
safeCall(instance, "disconnectedCallback"
|
1521
|
+
safeCall(instance, "disconnectedCallback");
|
1615
1522
|
}
|
1616
1523
|
};
|
1617
1524
|
var disconnectedCallback = async (elm) => {
|
@@ -1624,17 +1531,11 @@ var disconnectedCallback = async (elm) => {
|
|
1624
1531
|
}
|
1625
1532
|
}
|
1626
1533
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
1627
|
-
disconnectInstance(hostRef.$lazyInstance
|
1534
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
1628
1535
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
1629
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
1536
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
1630
1537
|
}
|
1631
1538
|
}
|
1632
|
-
if (rootAppliedStyles.has(elm)) {
|
1633
|
-
rootAppliedStyles.delete(elm);
|
1634
|
-
}
|
1635
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
1636
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
1637
|
-
}
|
1638
1539
|
};
|
1639
1540
|
|
1640
1541
|
// src/runtime/bootstrap-lazy.ts
|
@@ -1716,17 +1617,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1716
1617
|
}
|
1717
1618
|
disconnectedCallback() {
|
1718
1619
|
plt.jmp(() => disconnectedCallback(this));
|
1719
|
-
plt.raf(() => {
|
1720
|
-
var _a3;
|
1721
|
-
const hostRef = getHostRef(this);
|
1722
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
1723
|
-
if (i2 > -1) {
|
1724
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
1725
|
-
}
|
1726
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
1727
|
-
delete hostRef.$vnode$.$elm$;
|
1728
|
-
}
|
1729
|
-
});
|
1730
1620
|
}
|
1731
1621
|
componentOnReady() {
|
1732
1622
|
return getHostRef(this).$onReadyPromise$;
|
@@ -1790,7 +1680,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
1790
1680
|
}
|
1791
1681
|
}
|
1792
1682
|
} catch (e) {
|
1793
|
-
consoleError(e
|
1683
|
+
consoleError(e);
|
1794
1684
|
}
|
1795
1685
|
};
|
1796
1686
|
var getHostListenerTarget = (elm, flags) => {
|