@everymatrix/bonus-elevate-shop-item 1.53.0 → 1.53.10
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-3fdabb21.entry.js +1 -0
- package/dist/bonus-elevate-shop-item/p-edff3a91.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-51d505be.js} +251 -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-8304d884.js} +251 -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
|
@@ -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.25.1 | 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();
|
|
@@ -468,16 +535,18 @@ var attachStyles = (hostRef) => {
|
|
|
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,9 +1050,6 @@ 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
1053
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1024
1054
|
{
|
|
1025
1055
|
contentRef = hostElm["s-cr"];
|
|
@@ -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
|
}
|
|
@@ -1231,12 +1270,12 @@ var appDidLoad = (who) => {
|
|
|
1231
1270
|
}
|
|
1232
1271
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1233
1272
|
};
|
|
1234
|
-
var safeCall = (instance, method, arg) => {
|
|
1273
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1235
1274
|
if (instance && instance[method]) {
|
|
1236
1275
|
try {
|
|
1237
1276
|
return instance[method](arg);
|
|
1238
1277
|
} catch (e) {
|
|
1239
|
-
consoleError(e);
|
|
1278
|
+
consoleError(e, elm);
|
|
1240
1279
|
}
|
|
1241
1280
|
}
|
|
1242
1281
|
return void 0;
|
|
@@ -1279,15 +1318,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1279
1318
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1280
1319
|
members.map(([memberName, [memberFlags]]) => {
|
|
1281
1320
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1321
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1322
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1323
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1324
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1325
|
+
Object.defineProperty(prototype, memberName, {
|
|
1326
|
+
get() {
|
|
1327
|
+
{
|
|
1328
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1329
|
+
return getValue(this, memberName);
|
|
1330
|
+
}
|
|
1331
|
+
const ref = getHostRef(this);
|
|
1332
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1333
|
+
if (!instance) return;
|
|
1334
|
+
return instance[memberName];
|
|
1335
|
+
}
|
|
1336
|
+
},
|
|
1337
|
+
configurable: true,
|
|
1338
|
+
enumerable: true
|
|
1339
|
+
});
|
|
1340
|
+
}
|
|
1282
1341
|
Object.defineProperty(prototype, memberName, {
|
|
1283
|
-
get() {
|
|
1284
|
-
return getValue(this, memberName);
|
|
1285
|
-
},
|
|
1286
1342
|
set(newValue) {
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1343
|
+
const ref = getHostRef(this);
|
|
1344
|
+
if (origSetter) {
|
|
1345
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1346
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1347
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1348
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1349
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1350
|
+
}
|
|
1351
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1352
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1353
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1354
|
+
return;
|
|
1355
|
+
}
|
|
1356
|
+
{
|
|
1357
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1358
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1359
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1360
|
+
ref.$onReadyPromise$.then(() => {
|
|
1361
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1362
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1363
|
+
}
|
|
1364
|
+
});
|
|
1365
|
+
}
|
|
1366
|
+
return;
|
|
1367
|
+
}
|
|
1368
|
+
const setterSetVal = () => {
|
|
1369
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1370
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1371
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1372
|
+
}
|
|
1373
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1374
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1375
|
+
};
|
|
1376
|
+
if (ref.$lazyInstance$) {
|
|
1377
|
+
setterSetVal();
|
|
1378
|
+
} else {
|
|
1379
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1291
1383
|
});
|
|
1292
1384
|
}
|
|
1293
1385
|
});
|
|
@@ -1297,7 +1389,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1297
1389
|
plt.jmp(() => {
|
|
1298
1390
|
var _a2;
|
|
1299
1391
|
const propName = attrNameToPropName.get(attrName);
|
|
1300
|
-
if (this.hasOwnProperty(propName)) {
|
|
1392
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1301
1393
|
newValue = this[propName];
|
|
1302
1394
|
delete this[propName];
|
|
1303
1395
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1317,7 +1409,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1317
1409
|
}
|
|
1318
1410
|
return;
|
|
1319
1411
|
}
|
|
1320
|
-
|
|
1412
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1413
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1414
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1415
|
+
this[propName] = newValue;
|
|
1416
|
+
}
|
|
1321
1417
|
});
|
|
1322
1418
|
};
|
|
1323
1419
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1344,9 +1440,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1344
1440
|
let Cstr;
|
|
1345
1441
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1346
1442
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1443
|
+
{
|
|
1444
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1350
1445
|
if (CstrImport && "then" in CstrImport) {
|
|
1351
1446
|
const endLoad = uniqueTime();
|
|
1352
1447
|
Cstr = await CstrImport;
|
|
@@ -1368,17 +1463,13 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1368
1463
|
try {
|
|
1369
1464
|
new Cstr(hostRef);
|
|
1370
1465
|
} catch (e) {
|
|
1371
|
-
consoleError(e);
|
|
1466
|
+
consoleError(e, elm);
|
|
1372
1467
|
}
|
|
1373
1468
|
{
|
|
1374
1469
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1375
1470
|
}
|
|
1376
1471
|
endNewInstance();
|
|
1377
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1378
|
-
} else {
|
|
1379
|
-
Cstr = elm.constructor;
|
|
1380
|
-
const cmpTag = elm.localName;
|
|
1381
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1472
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1382
1473
|
}
|
|
1383
1474
|
if (Cstr && Cstr.style) {
|
|
1384
1475
|
let style;
|
|
@@ -1401,9 +1492,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1401
1492
|
schedule();
|
|
1402
1493
|
}
|
|
1403
1494
|
};
|
|
1404
|
-
var fireConnectedCallback = (instance) => {
|
|
1495
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1405
1496
|
{
|
|
1406
|
-
safeCall(instance, "connectedCallback");
|
|
1497
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1407
1498
|
}
|
|
1408
1499
|
};
|
|
1409
1500
|
|
|
@@ -1444,9 +1535,9 @@ var connectedCallback = (elm) => {
|
|
|
1444
1535
|
}
|
|
1445
1536
|
} else {
|
|
1446
1537
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1447
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1538
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1448
1539
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1449
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
1540
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1450
1541
|
}
|
|
1451
1542
|
}
|
|
1452
1543
|
endConnected();
|
|
@@ -1459,20 +1550,26 @@ var setContentReference = (elm) => {
|
|
|
1459
1550
|
contentRefElm["s-cn"] = true;
|
|
1460
1551
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1461
1552
|
};
|
|
1462
|
-
var disconnectInstance = (instance) => {
|
|
1553
|
+
var disconnectInstance = (instance, elm) => {
|
|
1463
1554
|
{
|
|
1464
|
-
safeCall(instance, "disconnectedCallback");
|
|
1555
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1465
1556
|
}
|
|
1466
1557
|
};
|
|
1467
1558
|
var disconnectedCallback = async (elm) => {
|
|
1468
1559
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
1469
1560
|
const hostRef = getHostRef(elm);
|
|
1470
1561
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1471
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1562
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1472
1563
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1473
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1564
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1474
1565
|
}
|
|
1475
1566
|
}
|
|
1567
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1568
|
+
rootAppliedStyles.delete(elm);
|
|
1569
|
+
}
|
|
1570
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1571
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1572
|
+
}
|
|
1476
1573
|
};
|
|
1477
1574
|
|
|
1478
1575
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1549,6 +1646,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1549
1646
|
}
|
|
1550
1647
|
disconnectedCallback() {
|
|
1551
1648
|
plt.jmp(() => disconnectedCallback(this));
|
|
1649
|
+
plt.raf(() => {
|
|
1650
|
+
var _a3;
|
|
1651
|
+
const hostRef = getHostRef(this);
|
|
1652
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1653
|
+
delete hostRef.$vnode$.$elm$;
|
|
1654
|
+
}
|
|
1655
|
+
});
|
|
1552
1656
|
}
|
|
1553
1657
|
componentOnReady() {
|
|
1554
1658
|
return getHostRef(this).$onReadyPromise$;
|