@everymatrix/casino-game-thumb-view 1.54.11 → 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/builds/emfe-widgets/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.d.ts +0 -2
- package/dist/types/builds/emfe-widgets/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/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/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/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -21,27 +21,19 @@ function _interopNamespace(e) {
|
|
21
21
|
}
|
22
22
|
|
23
23
|
const NAMESPACE = 'casino-game-thumb-view';
|
24
|
-
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,
|
24
|
+
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 };
|
25
25
|
|
26
26
|
/*
|
27
|
-
Stencil Client Platform v4.
|
27
|
+
Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
|
28
28
|
*/
|
29
29
|
var __defProp = Object.defineProperty;
|
30
30
|
var __export = (target, all) => {
|
31
31
|
for (var name in all)
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
33
33
|
};
|
34
|
-
|
35
|
-
// src/utils/constants.ts
|
36
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
37
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
38
|
-
|
39
|
-
// src/client/client-host-ref.ts
|
40
34
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
41
35
|
var getHostRef = (ref) => hostRefs.get(ref);
|
42
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
43
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
44
|
-
};
|
36
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
45
37
|
var registerHost = (hostElement, cmpMeta) => {
|
46
38
|
const hostRef = {
|
47
39
|
$flags$: 0,
|
@@ -57,8 +49,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
57
49
|
hostElement["s-p"] = [];
|
58
50
|
hostElement["s-rc"] = [];
|
59
51
|
}
|
60
|
-
|
61
|
-
return ref;
|
52
|
+
return hostRefs.set(hostElement, hostRef);
|
62
53
|
};
|
63
54
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
64
55
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
@@ -115,22 +106,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
115
106
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
116
107
|
/* webpackMode: "lazy" */
|
117
108
|
`./${bundleId}.entry.js${""}`
|
118
|
-
)); }).then(
|
119
|
-
|
120
|
-
|
121
|
-
cmpModules.set(bundleId, importedModule);
|
122
|
-
}
|
123
|
-
return importedModule[exportName];
|
124
|
-
},
|
125
|
-
(e) => {
|
126
|
-
consoleError(e, hostRef.$hostElement$);
|
109
|
+
)); }).then((importedModule) => {
|
110
|
+
{
|
111
|
+
cmpModules.set(bundleId, importedModule);
|
127
112
|
}
|
128
|
-
|
113
|
+
return importedModule[exportName];
|
114
|
+
}, consoleError);
|
129
115
|
};
|
130
116
|
|
131
117
|
// src/client/client-style.ts
|
132
118
|
var styles = /* @__PURE__ */ new Map();
|
133
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
134
119
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
135
120
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
136
121
|
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
@@ -205,6 +190,14 @@ var flush = () => {
|
|
205
190
|
};
|
206
191
|
var nextTick = (cb) => promiseResolve().then(cb);
|
207
192
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
193
|
+
|
194
|
+
// src/utils/constants.ts
|
195
|
+
var EMPTY_OBJ = {};
|
196
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
197
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
198
|
+
|
199
|
+
// src/utils/helpers.ts
|
200
|
+
var isDef = (v) => v != null;
|
208
201
|
var isComplexType = (o) => {
|
209
202
|
o = typeof o;
|
210
203
|
return o === "object" || o === "function";
|
@@ -264,63 +257,6 @@ var unwrapErr = (result) => {
|
|
264
257
|
throw result.value;
|
265
258
|
}
|
266
259
|
};
|
267
|
-
var updateFallbackSlotVisibility = (elm) => {
|
268
|
-
const childNodes = elm.__childNodes || elm.childNodes;
|
269
|
-
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
270
|
-
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
271
|
-
var _a;
|
272
|
-
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
273
|
-
if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
|
274
|
-
slotNode.hidden = true;
|
275
|
-
} else {
|
276
|
-
slotNode.hidden = false;
|
277
|
-
}
|
278
|
-
}
|
279
|
-
});
|
280
|
-
}
|
281
|
-
for (const childNode of childNodes) {
|
282
|
-
if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
|
283
|
-
updateFallbackSlotVisibility(childNode);
|
284
|
-
}
|
285
|
-
}
|
286
|
-
};
|
287
|
-
function getHostSlotNodes(childNodes, hostName, slotName) {
|
288
|
-
let i2 = 0;
|
289
|
-
let slottedNodes = [];
|
290
|
-
let childNode;
|
291
|
-
for (; i2 < childNodes.length; i2++) {
|
292
|
-
childNode = childNodes[i2];
|
293
|
-
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
294
|
-
slottedNodes.push(childNode);
|
295
|
-
if (typeof slotName !== "undefined") return slottedNodes;
|
296
|
-
}
|
297
|
-
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
298
|
-
}
|
299
|
-
return slottedNodes;
|
300
|
-
}
|
301
|
-
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
302
|
-
const childNodes = [];
|
303
|
-
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
304
|
-
while ((node = node.nextSibling) && node["s-sn"] === slotName) {
|
305
|
-
childNodes.push(node);
|
306
|
-
}
|
307
|
-
return childNodes;
|
308
|
-
};
|
309
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
310
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
311
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
312
|
-
return true;
|
313
|
-
}
|
314
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
315
|
-
return true;
|
316
|
-
}
|
317
|
-
return false;
|
318
|
-
}
|
319
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
320
|
-
return true;
|
321
|
-
}
|
322
|
-
return slotName === "";
|
323
|
-
};
|
324
260
|
var createTime = (fnName, tagName = "") => {
|
325
261
|
{
|
326
262
|
return () => {
|
@@ -512,7 +448,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
512
448
|
}
|
513
449
|
if (!appliedStyles.has(scopeId2)) {
|
514
450
|
{
|
515
|
-
styleElm =
|
451
|
+
styleElm = doc.createElement("style");
|
516
452
|
styleElm.innerHTML = style;
|
517
453
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
518
454
|
if (nonce != null) {
|
@@ -522,10 +458,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
522
458
|
if (styleContainerNode.nodeName === "HEAD") {
|
523
459
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
524
460
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
525
|
-
styleContainerNode.insertBefore(
|
526
|
-
styleElm,
|
527
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
528
|
-
);
|
461
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
529
462
|
} else if ("host" in styleContainerNode) {
|
530
463
|
if (supportsConstructableStylesheets) {
|
531
464
|
const stylesheet = new CSSStyleSheet();
|
@@ -543,7 +476,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
543
476
|
styleContainerNode.append(styleElm);
|
544
477
|
}
|
545
478
|
}
|
546
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
479
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
547
480
|
styleContainerNode.insertBefore(styleElm, null);
|
548
481
|
}
|
549
482
|
}
|
@@ -568,25 +501,23 @@ var attachStyles = (hostRef) => {
|
|
568
501
|
const scopeId2 = addStyle(
|
569
502
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
570
503
|
cmpMeta);
|
571
|
-
if (
|
504
|
+
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
572
505
|
elm["s-sc"] = scopeId2;
|
573
506
|
elm.classList.add(scopeId2 + "-h");
|
574
507
|
}
|
575
508
|
endAttachStyles();
|
576
509
|
};
|
577
510
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
578
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
511
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
579
512
|
if (oldValue !== newValue) {
|
580
513
|
let isProp = isMemberInElement(elm, memberName);
|
581
514
|
let ln = memberName.toLowerCase();
|
582
515
|
if (memberName === "class") {
|
583
516
|
const classList = elm.classList;
|
584
517
|
const oldClasses = parseClassList(oldValue);
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
589
|
-
}
|
518
|
+
const newClasses = parseClassList(newValue);
|
519
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
520
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
590
521
|
} else if (memberName === "style") {
|
591
522
|
{
|
592
523
|
for (const prop in oldValue) {
|
@@ -645,7 +576,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
645
576
|
elm.setAttribute(memberName, n);
|
646
577
|
}
|
647
578
|
}
|
648
|
-
} else
|
579
|
+
} else {
|
649
580
|
elm[memberName] = newValue;
|
650
581
|
}
|
651
582
|
} catch (e) {
|
@@ -678,44 +609,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
678
609
|
}
|
679
610
|
};
|
680
611
|
var parseClassListRegex = /\s/;
|
681
|
-
var parseClassList = (value) =>
|
682
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
683
|
-
value = value.baseVal;
|
684
|
-
}
|
685
|
-
if (!value || typeof value !== "string") {
|
686
|
-
return [];
|
687
|
-
}
|
688
|
-
return value.split(parseClassListRegex);
|
689
|
-
};
|
612
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
690
613
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
691
614
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
692
615
|
|
693
616
|
// src/runtime/vdom/update-element.ts
|
694
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
617
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
695
618
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
696
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
697
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
619
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
620
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
698
621
|
{
|
699
622
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
700
623
|
if (!(memberName in newVnodeAttrs)) {
|
701
|
-
setAccessor(
|
702
|
-
elm,
|
703
|
-
memberName,
|
704
|
-
oldVnodeAttrs[memberName],
|
705
|
-
void 0,
|
706
|
-
isSvgMode2,
|
707
|
-
newVnode.$flags$);
|
624
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
708
625
|
}
|
709
626
|
}
|
710
627
|
}
|
711
628
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
712
|
-
setAccessor(
|
713
|
-
elm,
|
714
|
-
memberName,
|
715
|
-
oldVnodeAttrs[memberName],
|
716
|
-
newVnodeAttrs[memberName],
|
717
|
-
isSvgMode2,
|
718
|
-
newVnode.$flags$);
|
629
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
719
630
|
}
|
720
631
|
};
|
721
632
|
function sortedAttrNames(attrNames) {
|
@@ -727,13 +638,16 @@ function sortedAttrNames(attrNames) {
|
|
727
638
|
attrNames
|
728
639
|
);
|
729
640
|
}
|
641
|
+
|
642
|
+
// src/runtime/vdom/vdom-render.ts
|
643
|
+
var scopeId;
|
730
644
|
var contentRef;
|
731
645
|
var hostTagName;
|
732
646
|
var useNativeShadowDom = false;
|
733
647
|
var checkSlotFallbackVisibility = false;
|
734
648
|
var checkSlotRelocate = false;
|
735
649
|
var isSvgMode = false;
|
736
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
650
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
737
651
|
var _a;
|
738
652
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
739
653
|
let i2 = 0;
|
@@ -743,6 +657,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
743
657
|
if (!useNativeShadowDom) {
|
744
658
|
checkSlotRelocate = true;
|
745
659
|
if (newVNode2.$tag$ === "slot") {
|
660
|
+
if (scopeId) {
|
661
|
+
parentElm.classList.add(scopeId + "-s");
|
662
|
+
}
|
746
663
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
747
664
|
// slot element has fallback content
|
748
665
|
// still create an element that "mocks" the slot element
|
@@ -773,9 +690,14 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
773
690
|
{
|
774
691
|
updateElement(null, newVNode2, isSvgMode);
|
775
692
|
}
|
693
|
+
const rootNode = elm.getRootNode();
|
694
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
695
|
+
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
696
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
697
|
+
}
|
776
698
|
if (newVNode2.$children$) {
|
777
699
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
778
|
-
childNode = createElm(oldParentVNode, newVNode2, i2);
|
700
|
+
childNode = createElm(oldParentVNode, newVNode2, i2, elm);
|
779
701
|
if (childNode) {
|
780
702
|
elm.appendChild(childNode);
|
781
703
|
}
|
@@ -808,7 +730,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
808
730
|
};
|
809
731
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
810
732
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
811
|
-
const oldSlotChildNodes = Array.from(parentElm.
|
733
|
+
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
812
734
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
813
735
|
let node = parentElm;
|
814
736
|
while (node = node.nextSibling) {
|
@@ -820,7 +742,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
820
742
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
821
743
|
const childNode = oldSlotChildNodes[i2];
|
822
744
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
823
|
-
insertBefore(
|
745
|
+
insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
|
824
746
|
childNode["s-ol"].remove();
|
825
747
|
childNode["s-ol"] = void 0;
|
826
748
|
childNode["s-sh"] = void 0;
|
@@ -840,7 +762,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
840
762
|
}
|
841
763
|
for (; startIdx <= endIdx; ++startIdx) {
|
842
764
|
if (vnodes[startIdx]) {
|
843
|
-
childNode = createElm(null, parentVNode, startIdx);
|
765
|
+
childNode = createElm(null, parentVNode, startIdx, parentElm);
|
844
766
|
if (childNode) {
|
845
767
|
vnodes[startIdx].$elm$ = childNode;
|
846
768
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
@@ -927,7 +849,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
927
849
|
if (idxInOld >= 0) {
|
928
850
|
elmToMove = oldCh[idxInOld];
|
929
851
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
930
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
852
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
|
931
853
|
} else {
|
932
854
|
patch(elmToMove, newStartVnode, isInitialRender);
|
933
855
|
oldCh[idxInOld] = void 0;
|
@@ -935,16 +857,12 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
935
857
|
}
|
936
858
|
newStartVnode = newCh[++newStartIdx];
|
937
859
|
} else {
|
938
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
860
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
|
939
861
|
newStartVnode = newCh[++newStartIdx];
|
940
862
|
}
|
941
863
|
if (node) {
|
942
864
|
{
|
943
|
-
insertBefore(
|
944
|
-
referenceNode(oldStartVnode.$elm$).parentNode,
|
945
|
-
node,
|
946
|
-
referenceNode(oldStartVnode.$elm$)
|
947
|
-
);
|
865
|
+
insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
|
948
866
|
}
|
949
867
|
}
|
950
868
|
}
|
@@ -965,19 +883,28 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
965
883
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
966
884
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
967
885
|
if (leftVNode.$tag$ === "slot") {
|
886
|
+
if (
|
887
|
+
// The component gets hydrated and no VDOM has been initialized.
|
888
|
+
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
889
|
+
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
890
|
+
// hydration comments to be removed
|
891
|
+
leftVNode.$elm$.nodeType !== 8
|
892
|
+
) {
|
893
|
+
return false;
|
894
|
+
}
|
968
895
|
return leftVNode.$name$ === rightVNode.$name$;
|
969
896
|
}
|
970
897
|
if (!isInitialRender) {
|
971
898
|
return leftVNode.$key$ === rightVNode.$key$;
|
972
899
|
}
|
973
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
974
|
-
leftVNode.$key$ = rightVNode.$key$;
|
975
|
-
}
|
976
900
|
return true;
|
977
901
|
}
|
978
902
|
return false;
|
979
903
|
};
|
980
|
-
var referenceNode = (node) =>
|
904
|
+
var referenceNode = (node) => {
|
905
|
+
return node && node["s-ol"] || node;
|
906
|
+
};
|
907
|
+
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
981
908
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
982
909
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
983
910
|
const oldChildren = oldVNode.$children$;
|
@@ -1016,15 +943,41 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
1016
943
|
elm.data = text;
|
1017
944
|
}
|
1018
945
|
};
|
946
|
+
var updateFallbackSlotVisibility = (elm) => {
|
947
|
+
const childNodes = elm.childNodes;
|
948
|
+
for (const childNode of childNodes) {
|
949
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
950
|
+
if (childNode["s-sr"]) {
|
951
|
+
const slotName = childNode["s-sn"];
|
952
|
+
childNode.hidden = false;
|
953
|
+
for (const siblingNode of childNodes) {
|
954
|
+
if (siblingNode !== childNode) {
|
955
|
+
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
956
|
+
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
957
|
+
childNode.hidden = true;
|
958
|
+
break;
|
959
|
+
}
|
960
|
+
} else {
|
961
|
+
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
962
|
+
childNode.hidden = true;
|
963
|
+
break;
|
964
|
+
}
|
965
|
+
}
|
966
|
+
}
|
967
|
+
}
|
968
|
+
}
|
969
|
+
updateFallbackSlotVisibility(childNode);
|
970
|
+
}
|
971
|
+
}
|
972
|
+
};
|
1019
973
|
var relocateNodes = [];
|
1020
974
|
var markSlotContentForRelocation = (elm) => {
|
1021
975
|
let node;
|
1022
976
|
let hostContentNodes;
|
1023
977
|
let j;
|
1024
|
-
const
|
1025
|
-
for (const childNode of children) {
|
978
|
+
for (const childNode of elm.childNodes) {
|
1026
979
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
1027
|
-
hostContentNodes = node.parentNode.
|
980
|
+
hostContentNodes = node.parentNode.childNodes;
|
1028
981
|
const slotName = childNode["s-sn"];
|
1029
982
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
1030
983
|
node = hostContentNodes[j];
|
@@ -1066,6 +1019,21 @@ var markSlotContentForRelocation = (elm) => {
|
|
1066
1019
|
}
|
1067
1020
|
}
|
1068
1021
|
};
|
1022
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
1023
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
1024
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
1025
|
+
return true;
|
1026
|
+
}
|
1027
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
1028
|
+
return true;
|
1029
|
+
}
|
1030
|
+
return false;
|
1031
|
+
}
|
1032
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
1033
|
+
return true;
|
1034
|
+
}
|
1035
|
+
return slotName === "";
|
1036
|
+
};
|
1069
1037
|
var nullifyVNodeRefs = (vNode) => {
|
1070
1038
|
{
|
1071
1039
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
@@ -1073,9 +1041,8 @@ var nullifyVNodeRefs = (vNode) => {
|
|
1073
1041
|
}
|
1074
1042
|
};
|
1075
1043
|
var insertBefore = (parent, newNode, reference) => {
|
1076
|
-
|
1077
|
-
|
1078
|
-
}
|
1044
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
1045
|
+
return inserted;
|
1079
1046
|
};
|
1080
1047
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
1081
1048
|
var _a, _b, _c, _d;
|
@@ -1095,7 +1062,10 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1095
1062
|
rootVnode.$flags$ |= 4 /* isHost */;
|
1096
1063
|
hostRef.$vnode$ = rootVnode;
|
1097
1064
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
1098
|
-
|
1065
|
+
{
|
1066
|
+
scopeId = hostElm["s-sc"];
|
1067
|
+
}
|
1068
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
1099
1069
|
{
|
1100
1070
|
contentRef = hostElm["s-cr"];
|
1101
1071
|
checkSlotFallbackVisibility = false;
|
@@ -1123,7 +1093,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1123
1093
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
1124
1094
|
while (orgLocationNode) {
|
1125
1095
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
1126
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef ===
|
1096
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
1127
1097
|
refNode = refNode.nextSibling;
|
1128
1098
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
1129
1099
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
@@ -1136,15 +1106,13 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1136
1106
|
orgLocationNode = orgLocationNode.previousSibling;
|
1137
1107
|
}
|
1138
1108
|
}
|
1139
|
-
|
1140
|
-
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
1141
|
-
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
1109
|
+
if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
|
1142
1110
|
if (nodeToRelocate !== insertBeforeNode) {
|
1143
1111
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
1144
1112
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
1145
1113
|
}
|
1146
1114
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
1147
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */
|
1115
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
1148
1116
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
1149
1117
|
}
|
1150
1118
|
}
|
@@ -1172,14 +1140,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1172
1140
|
// src/runtime/update-component.ts
|
1173
1141
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
1174
1142
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
1175
|
-
|
1176
|
-
new Promise(
|
1177
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
1178
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
1179
|
-
r();
|
1180
|
-
}
|
1181
|
-
)
|
1182
|
-
);
|
1143
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
1183
1144
|
}
|
1184
1145
|
};
|
1185
1146
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
@@ -1208,16 +1169,16 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
1208
1169
|
{
|
1209
1170
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
1210
1171
|
if (hostRef.$queuedListeners$) {
|
1211
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event
|
1172
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
1212
1173
|
hostRef.$queuedListeners$ = void 0;
|
1213
1174
|
}
|
1214
1175
|
}
|
1215
1176
|
{
|
1216
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
1177
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
1217
1178
|
}
|
1218
1179
|
}
|
1219
1180
|
{
|
1220
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"
|
1181
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender"));
|
1221
1182
|
}
|
1222
1183
|
endSchedule();
|
1223
1184
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
@@ -1285,7 +1246,7 @@ var postUpdateComponent = (hostRef) => {
|
|
1285
1246
|
const instance = hostRef.$lazyInstance$ ;
|
1286
1247
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
1287
1248
|
{
|
1288
|
-
safeCall(instance, "componentDidRender"
|
1249
|
+
safeCall(instance, "componentDidRender");
|
1289
1250
|
}
|
1290
1251
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
1291
1252
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
@@ -1293,7 +1254,7 @@ var postUpdateComponent = (hostRef) => {
|
|
1293
1254
|
addHydratedFlag(elm);
|
1294
1255
|
}
|
1295
1256
|
{
|
1296
|
-
safeCall(instance, "componentDidLoad"
|
1257
|
+
safeCall(instance, "componentDidLoad");
|
1297
1258
|
}
|
1298
1259
|
endPostUpdate();
|
1299
1260
|
{
|
@@ -1320,14 +1281,17 @@ var postUpdateComponent = (hostRef) => {
|
|
1320
1281
|
}
|
1321
1282
|
};
|
1322
1283
|
var appDidLoad = (who) => {
|
1284
|
+
{
|
1285
|
+
addHydratedFlag(doc.documentElement);
|
1286
|
+
}
|
1323
1287
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
1324
1288
|
};
|
1325
|
-
var safeCall = (instance, method, arg
|
1289
|
+
var safeCall = (instance, method, arg) => {
|
1326
1290
|
if (instance && instance[method]) {
|
1327
1291
|
try {
|
1328
1292
|
return instance[method](arg);
|
1329
1293
|
} catch (e) {
|
1330
|
-
consoleError(e
|
1294
|
+
consoleError(e);
|
1331
1295
|
}
|
1332
1296
|
}
|
1333
1297
|
return void 0;
|
@@ -1386,68 +1350,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1386
1350
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
1387
1351
|
members.map(([memberName, [memberFlags]]) => {
|
1388
1352
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
1389
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
1390
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
1391
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
1392
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
1393
|
-
Object.defineProperty(prototype, memberName, {
|
1394
|
-
get() {
|
1395
|
-
{
|
1396
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
1397
|
-
return getValue(this, memberName);
|
1398
|
-
}
|
1399
|
-
const ref = getHostRef(this);
|
1400
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
1401
|
-
if (!instance) return;
|
1402
|
-
return instance[memberName];
|
1403
|
-
}
|
1404
|
-
},
|
1405
|
-
configurable: true,
|
1406
|
-
enumerable: true
|
1407
|
-
});
|
1408
|
-
}
|
1409
1353
|
Object.defineProperty(prototype, memberName, {
|
1354
|
+
get() {
|
1355
|
+
return getValue(this, memberName);
|
1356
|
+
},
|
1410
1357
|
set(newValue) {
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
newValue = ref.$instanceValues$.get(memberName);
|
1416
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
1417
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
1418
|
-
}
|
1419
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
1420
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
1421
|
-
setValue(this, memberName, newValue, cmpMeta);
|
1422
|
-
return;
|
1423
|
-
}
|
1424
|
-
{
|
1425
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
1426
|
-
setValue(this, memberName, newValue, cmpMeta);
|
1427
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
1428
|
-
ref.$onReadyPromise$.then(() => {
|
1429
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
1430
|
-
ref.$lazyInstance$[memberName] = newValue;
|
1431
|
-
}
|
1432
|
-
});
|
1433
|
-
}
|
1434
|
-
return;
|
1435
|
-
}
|
1436
|
-
const setterSetVal = () => {
|
1437
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
1438
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
1439
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
1440
|
-
}
|
1441
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
1442
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
1443
|
-
};
|
1444
|
-
if (ref.$lazyInstance$) {
|
1445
|
-
setterSetVal();
|
1446
|
-
} else {
|
1447
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
1448
|
-
}
|
1449
|
-
}
|
1450
|
-
}
|
1358
|
+
setValue(this, memberName, newValue, cmpMeta);
|
1359
|
+
},
|
1360
|
+
configurable: true,
|
1361
|
+
enumerable: true
|
1451
1362
|
});
|
1452
1363
|
} else if (flags & 1 /* isElementConstructor */ && memberFlags & 64 /* Method */) {
|
1453
1364
|
Object.defineProperty(prototype, memberName, {
|
@@ -1468,7 +1379,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1468
1379
|
plt.jmp(() => {
|
1469
1380
|
var _a2;
|
1470
1381
|
const propName = attrNameToPropName.get(attrName);
|
1471
|
-
if (this.hasOwnProperty(propName)
|
1382
|
+
if (this.hasOwnProperty(propName)) {
|
1472
1383
|
newValue = this[propName];
|
1473
1384
|
delete this[propName];
|
1474
1385
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
@@ -1488,11 +1399,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1488
1399
|
}
|
1489
1400
|
return;
|
1490
1401
|
}
|
1491
|
-
|
1492
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
1493
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
1494
|
-
this[propName] = newValue;
|
1495
|
-
}
|
1402
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
1496
1403
|
});
|
1497
1404
|
};
|
1498
1405
|
Cstr.observedAttributes = Array.from(
|
@@ -1517,7 +1424,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1517
1424
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
1518
1425
|
const bundleId = cmpMeta.$lazyBundleId$;
|
1519
1426
|
if (bundleId) {
|
1520
|
-
const CstrImport = loadModule(cmpMeta
|
1427
|
+
const CstrImport = loadModule(cmpMeta);
|
1521
1428
|
if (CstrImport && "then" in CstrImport) {
|
1522
1429
|
const endLoad = uniqueTime();
|
1523
1430
|
Cstr = await CstrImport;
|
@@ -1542,7 +1449,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1542
1449
|
try {
|
1543
1450
|
new Cstr(hostRef);
|
1544
1451
|
} catch (e) {
|
1545
|
-
consoleError(e
|
1452
|
+
consoleError(e);
|
1546
1453
|
}
|
1547
1454
|
{
|
1548
1455
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
@@ -1577,7 +1484,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1577
1484
|
schedule();
|
1578
1485
|
}
|
1579
1486
|
};
|
1580
|
-
var fireConnectedCallback = (instance
|
1487
|
+
var fireConnectedCallback = (instance) => {
|
1581
1488
|
};
|
1582
1489
|
|
1583
1490
|
// src/runtime/connected-callback.ts
|
@@ -1631,9 +1538,9 @@ var setContentReference = (elm) => {
|
|
1631
1538
|
contentRefElm["s-cn"] = true;
|
1632
1539
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
1633
1540
|
};
|
1634
|
-
var disconnectInstance = (instance
|
1541
|
+
var disconnectInstance = (instance) => {
|
1635
1542
|
{
|
1636
|
-
safeCall(instance, "disconnectedCallback"
|
1543
|
+
safeCall(instance, "disconnectedCallback");
|
1637
1544
|
}
|
1638
1545
|
};
|
1639
1546
|
var disconnectedCallback = async (elm) => {
|
@@ -1646,17 +1553,11 @@ var disconnectedCallback = async (elm) => {
|
|
1646
1553
|
}
|
1647
1554
|
}
|
1648
1555
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
1649
|
-
disconnectInstance(hostRef.$lazyInstance
|
1556
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
1650
1557
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
1651
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
1558
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
1652
1559
|
}
|
1653
1560
|
}
|
1654
|
-
if (rootAppliedStyles.has(elm)) {
|
1655
|
-
rootAppliedStyles.delete(elm);
|
1656
|
-
}
|
1657
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
1658
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
1659
|
-
}
|
1660
1561
|
};
|
1661
1562
|
|
1662
1563
|
// src/runtime/bootstrap-lazy.ts
|
@@ -1738,17 +1639,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1738
1639
|
}
|
1739
1640
|
disconnectedCallback() {
|
1740
1641
|
plt.jmp(() => disconnectedCallback(this));
|
1741
|
-
plt.raf(() => {
|
1742
|
-
var _a3;
|
1743
|
-
const hostRef = getHostRef(this);
|
1744
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
1745
|
-
if (i2 > -1) {
|
1746
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
1747
|
-
}
|
1748
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
1749
|
-
delete hostRef.$vnode$.$elm$;
|
1750
|
-
}
|
1751
|
-
});
|
1752
1642
|
}
|
1753
1643
|
componentOnReady() {
|
1754
1644
|
return getHostRef(this).$onReadyPromise$;
|
@@ -1812,7 +1702,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
1812
1702
|
}
|
1813
1703
|
}
|
1814
1704
|
} catch (e) {
|
1815
|
-
consoleError(e
|
1705
|
+
consoleError(e);
|
1816
1706
|
}
|
1817
1707
|
};
|
1818
1708
|
var getHostListenerTarget = (elm, flags) => {
|