@everymatrix/bonus-elevate-shop-item 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/bonus-elevate-shop-item/bonus-elevate-shop-item.esm.js +1 -1
- package/dist/bonus-elevate-shop-item/p-649baad8.entry.js +1 -0
- package/dist/bonus-elevate-shop-item/p-7e614c16.js +2 -0
- package/dist/cjs/bonus-elevate-shop-assets-slider_3.cjs.entry.js +47 -16
- package/dist/cjs/bonus-elevate-shop-item.cjs.js +2 -2
- package/dist/cjs/{index-791389e8.js → index-5ee6395c.js} +257 -147
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-assets-slider.js +22 -5
- package/dist/collection/components/bonus-elevate-shop-item/bonus-elevate-shop-item.js +41 -7
- package/dist/esm/bonus-elevate-shop-assets-slider_3.entry.js +47 -16
- package/dist/esm/bonus-elevate-shop-item.js +3 -3
- package/dist/esm/{index-3fe56209.js → index-d65aef7f.js} +257 -147
- package/dist/esm/loader.js +2 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-elevate-shop-item/.stencil/packages/stencil/bonus-elevate-shop-item/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/bonus-elevate-shop-item/.stencil/packages/stencil/bonus-elevate-shop-item/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/bonus-elevate-shop-item/p-11ccf3d4.entry.js +0 -1
- package/dist/bonus-elevate-shop-item/p-8ebd9aab.js +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/bonus-elevate-shop-item/.stencil/packages/stencil/bonus-elevate-shop-item/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/bonus-elevate-shop-item/.stencil/packages/stencil/bonus-elevate-shop-item/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/bonus-elevate-shop-item/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{maria.bumbar/Desktop → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/bonus-elevate-shop-item/.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/bonus-elevate-shop-item/.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/bonus-elevate-shop-item/.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 = 'bonus-elevate-shop-item';
|
|
24
|
-
const BUILD = /* bonus-elevate-shop-item */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, 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: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: 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: false, watchCallback: false };
|
|
24
|
+
const BUILD = /* bonus-elevate-shop-item */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: true, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, 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: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: true, state: true, style: true, svg: 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: false, watchCallback: false };
|
|
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,
|
|
@@ -46,7 +54,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
54
|
hostElement["s-p"] = [];
|
|
47
55
|
hostElement["s-rc"] = [];
|
|
48
56
|
}
|
|
49
|
-
|
|
57
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
58
|
+
return ref;
|
|
50
59
|
};
|
|
51
60
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
61
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -83,16 +92,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
83
92
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
84
93
|
/* webpackMode: "lazy" */
|
|
85
94
|
`./${bundleId}.entry.js${""}`
|
|
86
|
-
)); }).then(
|
|
87
|
-
{
|
|
88
|
-
|
|
95
|
+
)); }).then(
|
|
96
|
+
(importedModule) => {
|
|
97
|
+
{
|
|
98
|
+
cmpModules.set(bundleId, importedModule);
|
|
99
|
+
}
|
|
100
|
+
return importedModule[exportName];
|
|
101
|
+
},
|
|
102
|
+
(e) => {
|
|
103
|
+
consoleError(e, hostRef.$hostElement$);
|
|
89
104
|
}
|
|
90
|
-
|
|
91
|
-
}, consoleError);
|
|
105
|
+
);
|
|
92
106
|
};
|
|
93
107
|
|
|
94
108
|
// src/client/client-style.ts
|
|
95
109
|
var styles = /* @__PURE__ */ new Map();
|
|
110
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
96
111
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
97
112
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
98
113
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -150,14 +165,6 @@ var flush = () => {
|
|
|
150
165
|
};
|
|
151
166
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
152
167
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
153
|
-
|
|
154
|
-
// src/utils/constants.ts
|
|
155
|
-
var EMPTY_OBJ = {};
|
|
156
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
157
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
158
|
-
|
|
159
|
-
// src/utils/helpers.ts
|
|
160
|
-
var isDef = (v) => v != null;
|
|
161
168
|
var isComplexType = (o) => {
|
|
162
169
|
o = typeof o;
|
|
163
170
|
return o === "object" || o === "function";
|
|
@@ -217,6 +224,63 @@ var unwrapErr = (result) => {
|
|
|
217
224
|
throw result.value;
|
|
218
225
|
}
|
|
219
226
|
};
|
|
227
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
228
|
+
const childNodes = elm.__childNodes || elm.childNodes;
|
|
229
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
230
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
231
|
+
var _a;
|
|
232
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
233
|
+
if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
|
|
234
|
+
slotNode.hidden = true;
|
|
235
|
+
} else {
|
|
236
|
+
slotNode.hidden = false;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
for (const childNode of childNodes) {
|
|
242
|
+
if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
|
|
243
|
+
updateFallbackSlotVisibility(childNode);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
248
|
+
let i2 = 0;
|
|
249
|
+
let slottedNodes = [];
|
|
250
|
+
let childNode;
|
|
251
|
+
for (; i2 < childNodes.length; i2++) {
|
|
252
|
+
childNode = childNodes[i2];
|
|
253
|
+
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
|
254
|
+
slottedNodes.push(childNode);
|
|
255
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
256
|
+
}
|
|
257
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
258
|
+
}
|
|
259
|
+
return slottedNodes;
|
|
260
|
+
}
|
|
261
|
+
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
|
262
|
+
const childNodes = [];
|
|
263
|
+
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
|
264
|
+
while ((node = node.nextSibling) && node["s-sn"] === slotName) {
|
|
265
|
+
childNodes.push(node);
|
|
266
|
+
}
|
|
267
|
+
return childNodes;
|
|
268
|
+
};
|
|
269
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
270
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
271
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
272
|
+
return true;
|
|
273
|
+
}
|
|
274
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
275
|
+
return true;
|
|
276
|
+
}
|
|
277
|
+
return false;
|
|
278
|
+
}
|
|
279
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
280
|
+
return true;
|
|
281
|
+
}
|
|
282
|
+
return slotName === "";
|
|
283
|
+
};
|
|
220
284
|
var createTime = (fnName, tagName = "") => {
|
|
221
285
|
{
|
|
222
286
|
return () => {
|
|
@@ -408,7 +472,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
408
472
|
}
|
|
409
473
|
if (!appliedStyles.has(scopeId2)) {
|
|
410
474
|
{
|
|
411
|
-
styleElm = doc.createElement("style");
|
|
475
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
412
476
|
styleElm.innerHTML = style;
|
|
413
477
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
414
478
|
if (nonce != null) {
|
|
@@ -418,7 +482,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
418
482
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
419
483
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
420
484
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
421
|
-
styleContainerNode.insertBefore(
|
|
485
|
+
styleContainerNode.insertBefore(
|
|
486
|
+
styleElm,
|
|
487
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
488
|
+
);
|
|
422
489
|
} else if ("host" in styleContainerNode) {
|
|
423
490
|
if (supportsConstructableStylesheets) {
|
|
424
491
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -436,7 +503,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
436
503
|
styleContainerNode.append(styleElm);
|
|
437
504
|
}
|
|
438
505
|
}
|
|
439
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */
|
|
506
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
440
507
|
styleContainerNode.insertBefore(styleElm, null);
|
|
441
508
|
}
|
|
442
509
|
}
|
|
@@ -461,23 +528,25 @@ var attachStyles = (hostRef) => {
|
|
|
461
528
|
const scopeId2 = addStyle(
|
|
462
529
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
463
530
|
cmpMeta);
|
|
464
|
-
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
531
|
+
if ((flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */ || flags & 128 /* shadowNeedsScopedCss */)) {
|
|
465
532
|
elm["s-sc"] = scopeId2;
|
|
466
533
|
elm.classList.add(scopeId2 + "-h");
|
|
467
534
|
}
|
|
468
535
|
endAttachStyles();
|
|
469
536
|
};
|
|
470
537
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
471
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
538
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
472
539
|
if (oldValue !== newValue) {
|
|
473
540
|
let isProp = isMemberInElement(elm, memberName);
|
|
474
541
|
let ln = memberName.toLowerCase();
|
|
475
542
|
if (memberName === "class") {
|
|
476
543
|
const classList = elm.classList;
|
|
477
544
|
const oldClasses = parseClassList(oldValue);
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
545
|
+
let newClasses = parseClassList(newValue);
|
|
546
|
+
{
|
|
547
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
548
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
549
|
+
}
|
|
481
550
|
} else if (memberName === "style") {
|
|
482
551
|
{
|
|
483
552
|
for (const prop in oldValue) {
|
|
@@ -536,7 +605,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
536
605
|
elm.setAttribute(memberName, n);
|
|
537
606
|
}
|
|
538
607
|
}
|
|
539
|
-
} else {
|
|
608
|
+
} else if (elm[memberName] !== newValue) {
|
|
540
609
|
elm[memberName] = newValue;
|
|
541
610
|
}
|
|
542
611
|
} catch (e) {
|
|
@@ -558,24 +627,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
558
627
|
}
|
|
559
628
|
};
|
|
560
629
|
var parseClassListRegex = /\s/;
|
|
561
|
-
var parseClassList = (value) =>
|
|
630
|
+
var parseClassList = (value) => {
|
|
631
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
632
|
+
value = value.baseVal;
|
|
633
|
+
}
|
|
634
|
+
if (!value || typeof value !== "string") {
|
|
635
|
+
return [];
|
|
636
|
+
}
|
|
637
|
+
return value.split(parseClassListRegex);
|
|
638
|
+
};
|
|
562
639
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
563
640
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
564
641
|
|
|
565
642
|
// src/runtime/vdom/update-element.ts
|
|
566
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
643
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
567
644
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
568
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
569
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
645
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
646
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
570
647
|
{
|
|
571
648
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
572
649
|
if (!(memberName in newVnodeAttrs)) {
|
|
573
|
-
setAccessor(
|
|
650
|
+
setAccessor(
|
|
651
|
+
elm,
|
|
652
|
+
memberName,
|
|
653
|
+
oldVnodeAttrs[memberName],
|
|
654
|
+
void 0,
|
|
655
|
+
isSvgMode2,
|
|
656
|
+
newVnode.$flags$);
|
|
574
657
|
}
|
|
575
658
|
}
|
|
576
659
|
}
|
|
577
660
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
578
|
-
setAccessor(
|
|
661
|
+
setAccessor(
|
|
662
|
+
elm,
|
|
663
|
+
memberName,
|
|
664
|
+
oldVnodeAttrs[memberName],
|
|
665
|
+
newVnodeAttrs[memberName],
|
|
666
|
+
isSvgMode2,
|
|
667
|
+
newVnode.$flags$);
|
|
579
668
|
}
|
|
580
669
|
};
|
|
581
670
|
function sortedAttrNames(attrNames) {
|
|
@@ -587,16 +676,13 @@ function sortedAttrNames(attrNames) {
|
|
|
587
676
|
attrNames
|
|
588
677
|
);
|
|
589
678
|
}
|
|
590
|
-
|
|
591
|
-
// src/runtime/vdom/vdom-render.ts
|
|
592
|
-
var scopeId;
|
|
593
679
|
var contentRef;
|
|
594
680
|
var hostTagName;
|
|
595
681
|
var useNativeShadowDom = false;
|
|
596
682
|
var checkSlotFallbackVisibility = false;
|
|
597
683
|
var checkSlotRelocate = false;
|
|
598
684
|
var isSvgMode = false;
|
|
599
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
685
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
600
686
|
var _a;
|
|
601
687
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
602
688
|
let i2 = 0;
|
|
@@ -606,9 +692,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
606
692
|
if (!useNativeShadowDom) {
|
|
607
693
|
checkSlotRelocate = true;
|
|
608
694
|
if (newVNode2.$tag$ === "slot") {
|
|
609
|
-
if (scopeId) {
|
|
610
|
-
parentElm.classList.add(scopeId + "-s");
|
|
611
|
-
}
|
|
612
695
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
613
696
|
// slot element has fallback content
|
|
614
697
|
// still create an element that "mocks" the slot element
|
|
@@ -639,14 +722,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
639
722
|
{
|
|
640
723
|
updateElement(null, newVNode2, isSvgMode);
|
|
641
724
|
}
|
|
642
|
-
const rootNode = elm.getRootNode();
|
|
643
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
644
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
645
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
646
|
-
}
|
|
647
725
|
if (newVNode2.$children$) {
|
|
648
726
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
649
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
727
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
650
728
|
if (childNode) {
|
|
651
729
|
elm.appendChild(childNode);
|
|
652
730
|
}
|
|
@@ -679,7 +757,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
679
757
|
};
|
|
680
758
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
681
759
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
682
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
760
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
683
761
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
684
762
|
let node = parentElm;
|
|
685
763
|
while (node = node.nextSibling) {
|
|
@@ -691,7 +769,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
691
769
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
692
770
|
const childNode = oldSlotChildNodes[i2];
|
|
693
771
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
694
|
-
insertBefore(
|
|
772
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
695
773
|
childNode["s-ol"].remove();
|
|
696
774
|
childNode["s-ol"] = void 0;
|
|
697
775
|
childNode["s-sh"] = void 0;
|
|
@@ -711,7 +789,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
711
789
|
}
|
|
712
790
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
713
791
|
if (vnodes[startIdx]) {
|
|
714
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
792
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
715
793
|
if (childNode) {
|
|
716
794
|
vnodes[startIdx].$elm$ = childNode;
|
|
717
795
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -798,7 +876,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
798
876
|
if (idxInOld >= 0) {
|
|
799
877
|
elmToMove = oldCh[idxInOld];
|
|
800
878
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
801
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
879
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
802
880
|
} else {
|
|
803
881
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
804
882
|
oldCh[idxInOld] = void 0;
|
|
@@ -806,12 +884,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
806
884
|
}
|
|
807
885
|
newStartVnode = newCh[++newStartIdx];
|
|
808
886
|
} else {
|
|
809
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
887
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
810
888
|
newStartVnode = newCh[++newStartIdx];
|
|
811
889
|
}
|
|
812
890
|
if (node) {
|
|
813
891
|
{
|
|
814
|
-
insertBefore(
|
|
892
|
+
insertBefore(
|
|
893
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
894
|
+
node,
|
|
895
|
+
referenceNode(oldStartVnode.$elm$)
|
|
896
|
+
);
|
|
815
897
|
}
|
|
816
898
|
}
|
|
817
899
|
}
|
|
@@ -832,28 +914,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
832
914
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
833
915
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
834
916
|
if (leftVNode.$tag$ === "slot") {
|
|
835
|
-
if (
|
|
836
|
-
// The component gets hydrated and no VDOM has been initialized.
|
|
837
|
-
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
838
|
-
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
839
|
-
// hydration comments to be removed
|
|
840
|
-
leftVNode.$elm$.nodeType !== 8
|
|
841
|
-
) {
|
|
842
|
-
return false;
|
|
843
|
-
}
|
|
844
917
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
845
918
|
}
|
|
846
919
|
if (!isInitialRender) {
|
|
847
920
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
848
921
|
}
|
|
922
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
923
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
924
|
+
}
|
|
849
925
|
return true;
|
|
850
926
|
}
|
|
851
927
|
return false;
|
|
852
928
|
};
|
|
853
|
-
var referenceNode = (node) =>
|
|
854
|
-
return node && node["s-ol"] || node;
|
|
855
|
-
};
|
|
856
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
929
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
857
930
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
858
931
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
859
932
|
const oldChildren = oldVNode.$children$;
|
|
@@ -892,41 +965,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
892
965
|
elm.data = text;
|
|
893
966
|
}
|
|
894
967
|
};
|
|
895
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
896
|
-
const childNodes = elm.childNodes;
|
|
897
|
-
for (const childNode of childNodes) {
|
|
898
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
899
|
-
if (childNode["s-sr"]) {
|
|
900
|
-
const slotName = childNode["s-sn"];
|
|
901
|
-
childNode.hidden = false;
|
|
902
|
-
for (const siblingNode of childNodes) {
|
|
903
|
-
if (siblingNode !== childNode) {
|
|
904
|
-
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
905
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
906
|
-
childNode.hidden = true;
|
|
907
|
-
break;
|
|
908
|
-
}
|
|
909
|
-
} else {
|
|
910
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
911
|
-
childNode.hidden = true;
|
|
912
|
-
break;
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
}
|
|
918
|
-
updateFallbackSlotVisibility(childNode);
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
};
|
|
922
968
|
var relocateNodes = [];
|
|
923
969
|
var markSlotContentForRelocation = (elm) => {
|
|
924
970
|
let node;
|
|
925
971
|
let hostContentNodes;
|
|
926
972
|
let j;
|
|
927
|
-
|
|
973
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
974
|
+
for (const childNode of children) {
|
|
928
975
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
929
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
976
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
930
977
|
const slotName = childNode["s-sn"];
|
|
931
978
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
932
979
|
node = hostContentNodes[j];
|
|
@@ -968,21 +1015,6 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
968
1015
|
}
|
|
969
1016
|
}
|
|
970
1017
|
};
|
|
971
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
972
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
973
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
974
|
-
return true;
|
|
975
|
-
}
|
|
976
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
977
|
-
return true;
|
|
978
|
-
}
|
|
979
|
-
return false;
|
|
980
|
-
}
|
|
981
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
982
|
-
return true;
|
|
983
|
-
}
|
|
984
|
-
return slotName === "";
|
|
985
|
-
};
|
|
986
1018
|
var nullifyVNodeRefs = (vNode) => {
|
|
987
1019
|
{
|
|
988
1020
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -990,8 +1022,9 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
990
1022
|
}
|
|
991
1023
|
};
|
|
992
1024
|
var insertBefore = (parent, newNode, reference) => {
|
|
993
|
-
|
|
994
|
-
|
|
1025
|
+
{
|
|
1026
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1027
|
+
}
|
|
995
1028
|
};
|
|
996
1029
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
997
1030
|
var _a, _b, _c, _d;
|
|
@@ -1017,10 +1050,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1017
1050
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1018
1051
|
hostRef.$vnode$ = rootVnode;
|
|
1019
1052
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
1020
|
-
|
|
1021
|
-
scopeId = hostElm["s-sc"];
|
|
1022
|
-
}
|
|
1023
|
-
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1053
|
+
useNativeShadowDom = !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) && !(cmpMeta.$flags$ & 128 /* shadowNeedsScopedCss */);
|
|
1024
1054
|
{
|
|
1025
1055
|
contentRef = hostElm["s-cr"];
|
|
1026
1056
|
checkSlotFallbackVisibility = false;
|
|
@@ -1048,7 +1078,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1048
1078
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1049
1079
|
while (orgLocationNode) {
|
|
1050
1080
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1051
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1081
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1052
1082
|
refNode = refNode.nextSibling;
|
|
1053
1083
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1054
1084
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1061,13 +1091,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1061
1091
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1062
1092
|
}
|
|
1063
1093
|
}
|
|
1064
|
-
|
|
1094
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1095
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1096
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1065
1097
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1066
1098
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1067
1099
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1068
1100
|
}
|
|
1069
1101
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1070
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1102
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1071
1103
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1072
1104
|
}
|
|
1073
1105
|
}
|
|
@@ -1095,7 +1127,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1095
1127
|
// src/runtime/update-component.ts
|
|
1096
1128
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1097
1129
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1098
|
-
ancestorComponent["s-p"].push(
|
|
1130
|
+
const index = ancestorComponent["s-p"].push(
|
|
1131
|
+
new Promise(
|
|
1132
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1133
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1134
|
+
r();
|
|
1135
|
+
}
|
|
1136
|
+
)
|
|
1137
|
+
);
|
|
1099
1138
|
}
|
|
1100
1139
|
};
|
|
1101
1140
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1122,7 +1161,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1122
1161
|
let maybePromise;
|
|
1123
1162
|
if (isInitialLoad) {
|
|
1124
1163
|
{
|
|
1125
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1164
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1126
1165
|
}
|
|
1127
1166
|
}
|
|
1128
1167
|
endSchedule();
|
|
@@ -1191,7 +1230,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1191
1230
|
const instance = hostRef.$lazyInstance$ ;
|
|
1192
1231
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1193
1232
|
{
|
|
1194
|
-
safeCall(instance, "componentDidRender");
|
|
1233
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1195
1234
|
}
|
|
1196
1235
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1197
1236
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -1199,7 +1238,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1199
1238
|
addHydratedFlag(elm);
|
|
1200
1239
|
}
|
|
1201
1240
|
{
|
|
1202
|
-
safeCall(instance, "componentDidLoad");
|
|
1241
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
1203
1242
|
}
|
|
1204
1243
|
endPostUpdate();
|
|
1205
1244
|
{
|
|
@@ -1210,7 +1249,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1210
1249
|
}
|
|
1211
1250
|
} else {
|
|
1212
1251
|
{
|
|
1213
|
-
safeCall(instance, "componentDidUpdate");
|
|
1252
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
1214
1253
|
}
|
|
1215
1254
|
endPostUpdate();
|
|
1216
1255
|
}
|
|
@@ -1226,17 +1265,14 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1226
1265
|
}
|
|
1227
1266
|
};
|
|
1228
1267
|
var appDidLoad = (who) => {
|
|
1229
|
-
{
|
|
1230
|
-
addHydratedFlag(doc.documentElement);
|
|
1231
|
-
}
|
|
1232
1268
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1233
1269
|
};
|
|
1234
|
-
var safeCall = (instance, method, arg) => {
|
|
1270
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1235
1271
|
if (instance && instance[method]) {
|
|
1236
1272
|
try {
|
|
1237
1273
|
return instance[method](arg);
|
|
1238
1274
|
} catch (e) {
|
|
1239
|
-
consoleError(e);
|
|
1275
|
+
consoleError(e, elm);
|
|
1240
1276
|
}
|
|
1241
1277
|
}
|
|
1242
1278
|
return void 0;
|
|
@@ -1279,15 +1315,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1279
1315
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1280
1316
|
members.map(([memberName, [memberFlags]]) => {
|
|
1281
1317
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1318
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1319
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1320
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1321
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1322
|
+
Object.defineProperty(prototype, memberName, {
|
|
1323
|
+
get() {
|
|
1324
|
+
{
|
|
1325
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1326
|
+
return getValue(this, memberName);
|
|
1327
|
+
}
|
|
1328
|
+
const ref = getHostRef(this);
|
|
1329
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1330
|
+
if (!instance) return;
|
|
1331
|
+
return instance[memberName];
|
|
1332
|
+
}
|
|
1333
|
+
},
|
|
1334
|
+
configurable: true,
|
|
1335
|
+
enumerable: true
|
|
1336
|
+
});
|
|
1337
|
+
}
|
|
1282
1338
|
Object.defineProperty(prototype, memberName, {
|
|
1283
|
-
get() {
|
|
1284
|
-
return getValue(this, memberName);
|
|
1285
|
-
},
|
|
1286
1339
|
set(newValue) {
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1340
|
+
const ref = getHostRef(this);
|
|
1341
|
+
if (origSetter) {
|
|
1342
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1343
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1344
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1345
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1346
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1347
|
+
}
|
|
1348
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1349
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1350
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1351
|
+
return;
|
|
1352
|
+
}
|
|
1353
|
+
{
|
|
1354
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1355
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1356
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1357
|
+
ref.$onReadyPromise$.then(() => {
|
|
1358
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1359
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1360
|
+
}
|
|
1361
|
+
});
|
|
1362
|
+
}
|
|
1363
|
+
return;
|
|
1364
|
+
}
|
|
1365
|
+
const setterSetVal = () => {
|
|
1366
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1367
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1368
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1369
|
+
}
|
|
1370
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1371
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1372
|
+
};
|
|
1373
|
+
if (ref.$lazyInstance$) {
|
|
1374
|
+
setterSetVal();
|
|
1375
|
+
} else {
|
|
1376
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1291
1380
|
});
|
|
1292
1381
|
}
|
|
1293
1382
|
});
|
|
@@ -1297,7 +1386,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1297
1386
|
plt.jmp(() => {
|
|
1298
1387
|
var _a2;
|
|
1299
1388
|
const propName = attrNameToPropName.get(attrName);
|
|
1300
|
-
if (this.hasOwnProperty(propName)) {
|
|
1389
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1301
1390
|
newValue = this[propName];
|
|
1302
1391
|
delete this[propName];
|
|
1303
1392
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1317,7 +1406,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1317
1406
|
}
|
|
1318
1407
|
return;
|
|
1319
1408
|
}
|
|
1320
|
-
|
|
1409
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1410
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1411
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1412
|
+
this[propName] = newValue;
|
|
1413
|
+
}
|
|
1321
1414
|
});
|
|
1322
1415
|
};
|
|
1323
1416
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1346,7 +1439,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1346
1439
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1347
1440
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1348
1441
|
if (bundleId) {
|
|
1349
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1442
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1350
1443
|
if (CstrImport && "then" in CstrImport) {
|
|
1351
1444
|
const endLoad = uniqueTime();
|
|
1352
1445
|
Cstr = await CstrImport;
|
|
@@ -1368,13 +1461,13 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1368
1461
|
try {
|
|
1369
1462
|
new Cstr(hostRef);
|
|
1370
1463
|
} catch (e) {
|
|
1371
|
-
consoleError(e);
|
|
1464
|
+
consoleError(e, elm);
|
|
1372
1465
|
}
|
|
1373
1466
|
{
|
|
1374
1467
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1375
1468
|
}
|
|
1376
1469
|
endNewInstance();
|
|
1377
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1470
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1378
1471
|
} else {
|
|
1379
1472
|
Cstr = elm.constructor;
|
|
1380
1473
|
const cmpTag = elm.localName;
|
|
@@ -1401,9 +1494,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1401
1494
|
schedule();
|
|
1402
1495
|
}
|
|
1403
1496
|
};
|
|
1404
|
-
var fireConnectedCallback = (instance) => {
|
|
1497
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1405
1498
|
{
|
|
1406
|
-
safeCall(instance, "connectedCallback");
|
|
1499
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1407
1500
|
}
|
|
1408
1501
|
};
|
|
1409
1502
|
|
|
@@ -1444,9 +1537,9 @@ var connectedCallback = (elm) => {
|
|
|
1444
1537
|
}
|
|
1445
1538
|
} else {
|
|
1446
1539
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1447
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1540
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1448
1541
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1449
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
1542
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1450
1543
|
}
|
|
1451
1544
|
}
|
|
1452
1545
|
endConnected();
|
|
@@ -1459,20 +1552,26 @@ var setContentReference = (elm) => {
|
|
|
1459
1552
|
contentRefElm["s-cn"] = true;
|
|
1460
1553
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1461
1554
|
};
|
|
1462
|
-
var disconnectInstance = (instance) => {
|
|
1555
|
+
var disconnectInstance = (instance, elm) => {
|
|
1463
1556
|
{
|
|
1464
|
-
safeCall(instance, "disconnectedCallback");
|
|
1557
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1465
1558
|
}
|
|
1466
1559
|
};
|
|
1467
1560
|
var disconnectedCallback = async (elm) => {
|
|
1468
1561
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1469
1562
|
const hostRef = getHostRef(elm);
|
|
1470
1563
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1471
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1564
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1472
1565
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1473
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1566
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1474
1567
|
}
|
|
1475
1568
|
}
|
|
1569
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1570
|
+
rootAppliedStyles.delete(elm);
|
|
1571
|
+
}
|
|
1572
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1573
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1574
|
+
}
|
|
1476
1575
|
};
|
|
1477
1576
|
|
|
1478
1577
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1549,6 +1648,17 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1549
1648
|
}
|
|
1550
1649
|
disconnectedCallback() {
|
|
1551
1650
|
plt.jmp(() => disconnectedCallback(this));
|
|
1651
|
+
plt.raf(() => {
|
|
1652
|
+
var _a3;
|
|
1653
|
+
const hostRef = getHostRef(this);
|
|
1654
|
+
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1655
|
+
if (i2 > -1) {
|
|
1656
|
+
deferredConnectedCallbacks.splice(i2, 1);
|
|
1657
|
+
}
|
|
1658
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1659
|
+
delete hostRef.$vnode$.$elm$;
|
|
1660
|
+
}
|
|
1661
|
+
});
|
|
1552
1662
|
}
|
|
1553
1663
|
componentOnReady() {
|
|
1554
1664
|
return getHostRef(this).$onReadyPromise$;
|