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