@everymatrix/player-elevate-card 1.56.0 → 1.56.2
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/cjs/general-styling-wrapper_5.cjs.entry.js +33 -78
- package/dist/cjs/{index-e1db0305.js → index-ea33d8f2.js} +129 -280
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/player-elevate-card.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/player-elevate-card/player-elevate-card.js +7 -39
- package/dist/collection/components/player-elevate-card-data/player-elevate-card-data.js +5 -2
- package/dist/collection/components/player-elevate-loyaltycard/player-elevate-loyaltycard.js +8 -41
- package/dist/collection/components/player-elevate-pointcard/player-elevate-pointcard.js +10 -51
- package/dist/esm/general-styling-wrapper_5.entry.js +33 -78
- package/dist/esm/{index-29ae3408.js → index-98f17aff.js} +129 -280
- package/dist/esm/loader.js +2 -2
- package/dist/esm/player-elevate-card.js +3 -3
- package/dist/player-elevate-card/p-17f8d580.js +2 -0
- package/dist/player-elevate-card/p-45b4751e.entry.js +1 -0
- package/dist/player-elevate-card/player-elevate-card.esm.js +1 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/stencil.config.dev.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -6
- package/package.json +1 -1
- package/dist/player-elevate-card/p-17e5148c.js +0 -2
- package/dist/player-elevate-card/p-33df4709.entry.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/packages/stencil/player-elevate-card/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/player-elevate-card/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
const NAMESPACE = 'player-elevate-card';
|
|
2
|
-
const BUILD = /* player-elevate-card */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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,
|
|
2
|
+
const BUILD = /* player-elevate-card */ { allRenderFn: false, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: true, 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: false, propMutable: false, propNumber: false, 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: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
9
9
|
for (var name in all)
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
// src/client/client-host-ref.ts
|
|
14
12
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
15
13
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
16
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
17
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
18
|
-
};
|
|
14
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
19
15
|
var registerHost = (hostElement, cmpMeta) => {
|
|
20
16
|
const hostRef = {
|
|
21
17
|
$flags$: 0,
|
|
@@ -28,8 +24,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
28
24
|
hostElement["s-p"] = [];
|
|
29
25
|
hostElement["s-rc"] = [];
|
|
30
26
|
}
|
|
31
|
-
|
|
32
|
-
return ref;
|
|
27
|
+
return hostRefs.set(hostElement, hostRef);
|
|
33
28
|
};
|
|
34
29
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
35
30
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -66,22 +61,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
66
61
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
67
62
|
/* webpackMode: "lazy" */
|
|
68
63
|
`./${bundleId}.entry.js${""}`
|
|
69
|
-
).then(
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
cmpModules.set(bundleId, importedModule);
|
|
73
|
-
}
|
|
74
|
-
return importedModule[exportName];
|
|
75
|
-
},
|
|
76
|
-
(e) => {
|
|
77
|
-
consoleError(e, hostRef.$hostElement$);
|
|
64
|
+
).then((importedModule) => {
|
|
65
|
+
{
|
|
66
|
+
cmpModules.set(bundleId, importedModule);
|
|
78
67
|
}
|
|
79
|
-
|
|
68
|
+
return importedModule[exportName];
|
|
69
|
+
}, consoleError);
|
|
80
70
|
};
|
|
81
71
|
|
|
82
72
|
// src/client/client-style.ts
|
|
83
73
|
var styles = /* @__PURE__ */ new Map();
|
|
84
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
85
74
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
86
75
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
87
76
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -161,6 +150,12 @@ var getAssetPath = (path) => {
|
|
|
161
150
|
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
162
151
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
163
152
|
};
|
|
153
|
+
|
|
154
|
+
// src/utils/constants.ts
|
|
155
|
+
var EMPTY_OBJ = {};
|
|
156
|
+
|
|
157
|
+
// src/utils/helpers.ts
|
|
158
|
+
var isDef = (v) => v != null;
|
|
164
159
|
var isComplexType = (o) => {
|
|
165
160
|
o = typeof o;
|
|
166
161
|
return o === "object" || o === "function";
|
|
@@ -220,63 +215,6 @@ var unwrapErr = (result) => {
|
|
|
220
215
|
throw result.value;
|
|
221
216
|
}
|
|
222
217
|
};
|
|
223
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
224
|
-
const childNodes = elm.__childNodes || elm.childNodes;
|
|
225
|
-
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
226
|
-
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
227
|
-
var _a;
|
|
228
|
-
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
229
|
-
if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
|
|
230
|
-
slotNode.hidden = true;
|
|
231
|
-
} else {
|
|
232
|
-
slotNode.hidden = false;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
for (const childNode of childNodes) {
|
|
238
|
-
if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
|
|
239
|
-
updateFallbackSlotVisibility(childNode);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
244
|
-
let i2 = 0;
|
|
245
|
-
let slottedNodes = [];
|
|
246
|
-
let childNode;
|
|
247
|
-
for (; i2 < childNodes.length; i2++) {
|
|
248
|
-
childNode = childNodes[i2];
|
|
249
|
-
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
|
250
|
-
slottedNodes.push(childNode);
|
|
251
|
-
if (typeof slotName !== "undefined") return slottedNodes;
|
|
252
|
-
}
|
|
253
|
-
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
254
|
-
}
|
|
255
|
-
return slottedNodes;
|
|
256
|
-
}
|
|
257
|
-
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
|
258
|
-
const childNodes = [];
|
|
259
|
-
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
|
260
|
-
while ((node = node.nextSibling) && node["s-sn"] === slotName) {
|
|
261
|
-
childNodes.push(node);
|
|
262
|
-
}
|
|
263
|
-
return childNodes;
|
|
264
|
-
};
|
|
265
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
266
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
267
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
268
|
-
return true;
|
|
269
|
-
}
|
|
270
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
271
|
-
return true;
|
|
272
|
-
}
|
|
273
|
-
return false;
|
|
274
|
-
}
|
|
275
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
276
|
-
return true;
|
|
277
|
-
}
|
|
278
|
-
return slotName === "";
|
|
279
|
-
};
|
|
280
218
|
var createTime = (fnName, tagName = "") => {
|
|
281
219
|
{
|
|
282
220
|
return () => {
|
|
@@ -462,40 +400,13 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
462
400
|
}
|
|
463
401
|
if (!appliedStyles.has(scopeId2)) {
|
|
464
402
|
{
|
|
465
|
-
styleElm =
|
|
403
|
+
styleElm = doc.createElement("style");
|
|
466
404
|
styleElm.innerHTML = style;
|
|
467
405
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
468
406
|
if (nonce != null) {
|
|
469
407
|
styleElm.setAttribute("nonce", nonce);
|
|
470
408
|
}
|
|
471
|
-
|
|
472
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
473
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
474
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
475
|
-
styleContainerNode.insertBefore(
|
|
476
|
-
styleElm,
|
|
477
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
478
|
-
);
|
|
479
|
-
} else if ("host" in styleContainerNode) {
|
|
480
|
-
if (supportsConstructableStylesheets) {
|
|
481
|
-
const stylesheet = new CSSStyleSheet();
|
|
482
|
-
stylesheet.replaceSync(style);
|
|
483
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
484
|
-
} else {
|
|
485
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
486
|
-
if (existingStyleContainer) {
|
|
487
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
488
|
-
} else {
|
|
489
|
-
styleContainerNode.prepend(styleElm);
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
} else {
|
|
493
|
-
styleContainerNode.append(styleElm);
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
497
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
498
|
-
}
|
|
409
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
499
410
|
}
|
|
500
411
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
501
412
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -518,25 +429,23 @@ var attachStyles = (hostRef) => {
|
|
|
518
429
|
const scopeId2 = addStyle(
|
|
519
430
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
520
431
|
cmpMeta);
|
|
521
|
-
if (
|
|
432
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
522
433
|
elm["s-sc"] = scopeId2;
|
|
523
434
|
elm.classList.add(scopeId2 + "-h");
|
|
524
435
|
}
|
|
525
436
|
endAttachStyles();
|
|
526
437
|
};
|
|
527
438
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
528
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
439
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
529
440
|
if (oldValue !== newValue) {
|
|
530
441
|
let isProp = isMemberInElement(elm, memberName);
|
|
531
442
|
let ln = memberName.toLowerCase();
|
|
532
443
|
if (memberName === "class") {
|
|
533
444
|
const classList = elm.classList;
|
|
534
445
|
const oldClasses = parseClassList(oldValue);
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
539
|
-
}
|
|
446
|
+
const newClasses = parseClassList(newValue);
|
|
447
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
448
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
540
449
|
} else if (memberName === "style") {
|
|
541
450
|
{
|
|
542
451
|
for (const prop in oldValue) {
|
|
@@ -585,13 +494,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
585
494
|
if (memberName === "list") {
|
|
586
495
|
isProp = false;
|
|
587
496
|
} else if (oldValue == null || elm[memberName] != n) {
|
|
588
|
-
|
|
589
|
-
elm[memberName] = n;
|
|
590
|
-
} else {
|
|
591
|
-
elm.setAttribute(memberName, n);
|
|
592
|
-
}
|
|
497
|
+
elm[memberName] = n;
|
|
593
498
|
}
|
|
594
|
-
} else
|
|
499
|
+
} else {
|
|
595
500
|
elm[memberName] = newValue;
|
|
596
501
|
}
|
|
597
502
|
} catch (e) {
|
|
@@ -613,44 +518,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
613
518
|
}
|
|
614
519
|
};
|
|
615
520
|
var parseClassListRegex = /\s/;
|
|
616
|
-
var parseClassList = (value) =>
|
|
617
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
618
|
-
value = value.baseVal;
|
|
619
|
-
}
|
|
620
|
-
if (!value || typeof value !== "string") {
|
|
621
|
-
return [];
|
|
622
|
-
}
|
|
623
|
-
return value.split(parseClassListRegex);
|
|
624
|
-
};
|
|
521
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
625
522
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
626
523
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
627
524
|
|
|
628
525
|
// src/runtime/vdom/update-element.ts
|
|
629
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
526
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
630
527
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
631
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
632
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
528
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
529
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
633
530
|
{
|
|
634
531
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
635
532
|
if (!(memberName in newVnodeAttrs)) {
|
|
636
|
-
setAccessor(
|
|
637
|
-
elm,
|
|
638
|
-
memberName,
|
|
639
|
-
oldVnodeAttrs[memberName],
|
|
640
|
-
void 0,
|
|
641
|
-
isSvgMode2,
|
|
642
|
-
newVnode.$flags$);
|
|
533
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
643
534
|
}
|
|
644
535
|
}
|
|
645
536
|
}
|
|
646
537
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
647
|
-
setAccessor(
|
|
648
|
-
elm,
|
|
649
|
-
memberName,
|
|
650
|
-
oldVnodeAttrs[memberName],
|
|
651
|
-
newVnodeAttrs[memberName],
|
|
652
|
-
isSvgMode2,
|
|
653
|
-
newVnode.$flags$);
|
|
538
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
654
539
|
}
|
|
655
540
|
};
|
|
656
541
|
function sortedAttrNames(attrNames) {
|
|
@@ -662,13 +547,16 @@ function sortedAttrNames(attrNames) {
|
|
|
662
547
|
attrNames
|
|
663
548
|
);
|
|
664
549
|
}
|
|
550
|
+
|
|
551
|
+
// src/runtime/vdom/vdom-render.ts
|
|
552
|
+
var scopeId;
|
|
665
553
|
var contentRef;
|
|
666
554
|
var hostTagName;
|
|
667
555
|
var useNativeShadowDom = false;
|
|
668
556
|
var checkSlotFallbackVisibility = false;
|
|
669
557
|
var checkSlotRelocate = false;
|
|
670
558
|
var isSvgMode = false;
|
|
671
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
559
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
672
560
|
var _a;
|
|
673
561
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
674
562
|
let i2 = 0;
|
|
@@ -678,6 +566,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
678
566
|
if (!useNativeShadowDom) {
|
|
679
567
|
checkSlotRelocate = true;
|
|
680
568
|
if (newVNode2.$tag$ === "slot") {
|
|
569
|
+
if (scopeId) {
|
|
570
|
+
parentElm.classList.add(scopeId + "-s");
|
|
571
|
+
}
|
|
681
572
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
682
573
|
// slot element has fallback content
|
|
683
574
|
// still create an element that "mocks" the slot element
|
|
@@ -701,9 +592,12 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
701
592
|
{
|
|
702
593
|
updateElement(null, newVNode2, isSvgMode);
|
|
703
594
|
}
|
|
595
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
596
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
597
|
+
}
|
|
704
598
|
if (newVNode2.$children$) {
|
|
705
599
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
706
|
-
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
600
|
+
childNode = createElm(oldParentVNode, newVNode2, i2, elm);
|
|
707
601
|
if (childNode) {
|
|
708
602
|
elm.appendChild(childNode);
|
|
709
603
|
}
|
|
@@ -729,7 +623,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
729
623
|
};
|
|
730
624
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
731
625
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
732
|
-
const oldSlotChildNodes = Array.from(parentElm.
|
|
626
|
+
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
733
627
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
734
628
|
let node = parentElm;
|
|
735
629
|
while (node = node.nextSibling) {
|
|
@@ -741,7 +635,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
741
635
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
742
636
|
const childNode = oldSlotChildNodes[i2];
|
|
743
637
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
744
|
-
insertBefore(
|
|
638
|
+
insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
|
|
745
639
|
childNode["s-ol"].remove();
|
|
746
640
|
childNode["s-ol"] = void 0;
|
|
747
641
|
childNode["s-sh"] = void 0;
|
|
@@ -761,7 +655,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
761
655
|
}
|
|
762
656
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
763
657
|
if (vnodes[startIdx]) {
|
|
764
|
-
childNode = createElm(null, parentVNode, startIdx);
|
|
658
|
+
childNode = createElm(null, parentVNode, startIdx, parentElm);
|
|
765
659
|
if (childNode) {
|
|
766
660
|
vnodes[startIdx].$elm$ = childNode;
|
|
767
661
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -847,7 +741,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
847
741
|
if (idxInOld >= 0) {
|
|
848
742
|
elmToMove = oldCh[idxInOld];
|
|
849
743
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
850
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
744
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
|
|
851
745
|
} else {
|
|
852
746
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
853
747
|
oldCh[idxInOld] = void 0;
|
|
@@ -855,16 +749,12 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
855
749
|
}
|
|
856
750
|
newStartVnode = newCh[++newStartIdx];
|
|
857
751
|
} else {
|
|
858
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
752
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
|
|
859
753
|
newStartVnode = newCh[++newStartIdx];
|
|
860
754
|
}
|
|
861
755
|
if (node) {
|
|
862
756
|
{
|
|
863
|
-
insertBefore(
|
|
864
|
-
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
865
|
-
node,
|
|
866
|
-
referenceNode(oldStartVnode.$elm$)
|
|
867
|
-
);
|
|
757
|
+
insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
|
|
868
758
|
}
|
|
869
759
|
}
|
|
870
760
|
}
|
|
@@ -890,14 +780,14 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
890
780
|
if (!isInitialRender) {
|
|
891
781
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
892
782
|
}
|
|
893
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
894
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
895
|
-
}
|
|
896
783
|
return true;
|
|
897
784
|
}
|
|
898
785
|
return false;
|
|
899
786
|
};
|
|
900
|
-
var referenceNode = (node) =>
|
|
787
|
+
var referenceNode = (node) => {
|
|
788
|
+
return node && node["s-ol"] || node;
|
|
789
|
+
};
|
|
790
|
+
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
901
791
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
902
792
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
903
793
|
const oldChildren = oldVNode.$children$;
|
|
@@ -918,10 +808,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
918
808
|
elm.textContent = "";
|
|
919
809
|
}
|
|
920
810
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
921
|
-
} else if (
|
|
922
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
923
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
924
|
-
) {
|
|
811
|
+
} else if (oldChildren !== null) {
|
|
925
812
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
926
813
|
}
|
|
927
814
|
} else if ((defaultHolder = elm["s-cr"])) {
|
|
@@ -930,15 +817,41 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
930
817
|
elm.data = text;
|
|
931
818
|
}
|
|
932
819
|
};
|
|
820
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
821
|
+
const childNodes = elm.childNodes;
|
|
822
|
+
for (const childNode of childNodes) {
|
|
823
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
824
|
+
if (childNode["s-sr"]) {
|
|
825
|
+
const slotName = childNode["s-sn"];
|
|
826
|
+
childNode.hidden = false;
|
|
827
|
+
for (const siblingNode of childNodes) {
|
|
828
|
+
if (siblingNode !== childNode) {
|
|
829
|
+
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
830
|
+
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
831
|
+
childNode.hidden = true;
|
|
832
|
+
break;
|
|
833
|
+
}
|
|
834
|
+
} else {
|
|
835
|
+
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
836
|
+
childNode.hidden = true;
|
|
837
|
+
break;
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
updateFallbackSlotVisibility(childNode);
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
};
|
|
933
847
|
var relocateNodes = [];
|
|
934
848
|
var markSlotContentForRelocation = (elm) => {
|
|
935
849
|
let node;
|
|
936
850
|
let hostContentNodes;
|
|
937
851
|
let j;
|
|
938
|
-
const
|
|
939
|
-
for (const childNode of children) {
|
|
852
|
+
for (const childNode of elm.childNodes) {
|
|
940
853
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
941
|
-
hostContentNodes = node.parentNode.
|
|
854
|
+
hostContentNodes = node.parentNode.childNodes;
|
|
942
855
|
const slotName = childNode["s-sn"];
|
|
943
856
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
944
857
|
node = hostContentNodes[j];
|
|
@@ -980,10 +893,24 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
980
893
|
}
|
|
981
894
|
}
|
|
982
895
|
};
|
|
983
|
-
var
|
|
984
|
-
{
|
|
985
|
-
|
|
896
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
897
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
898
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
899
|
+
return true;
|
|
900
|
+
}
|
|
901
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
902
|
+
return true;
|
|
903
|
+
}
|
|
904
|
+
return false;
|
|
986
905
|
}
|
|
906
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
907
|
+
return true;
|
|
908
|
+
}
|
|
909
|
+
return slotName === "";
|
|
910
|
+
};
|
|
911
|
+
var insertBefore = (parent, newNode, reference) => {
|
|
912
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
913
|
+
return inserted;
|
|
987
914
|
};
|
|
988
915
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
989
916
|
var _a, _b, _c, _d;
|
|
@@ -1009,7 +936,10 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1009
936
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1010
937
|
hostRef.$vnode$ = rootVnode;
|
|
1011
938
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
1012
|
-
|
|
939
|
+
{
|
|
940
|
+
scopeId = hostElm["s-sc"];
|
|
941
|
+
}
|
|
942
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1013
943
|
{
|
|
1014
944
|
contentRef = hostElm["s-cr"];
|
|
1015
945
|
checkSlotFallbackVisibility = false;
|
|
@@ -1037,7 +967,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1037
967
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1038
968
|
while (orgLocationNode) {
|
|
1039
969
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1040
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef ===
|
|
970
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1041
971
|
refNode = refNode.nextSibling;
|
|
1042
972
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1043
973
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1050,15 +980,13 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1050
980
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1051
981
|
}
|
|
1052
982
|
}
|
|
1053
|
-
|
|
1054
|
-
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1055
|
-
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
983
|
+
if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
1056
984
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1057
985
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1058
986
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1059
987
|
}
|
|
1060
988
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1061
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */
|
|
989
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1062
990
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1063
991
|
}
|
|
1064
992
|
}
|
|
@@ -1086,14 +1014,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1086
1014
|
// src/runtime/update-component.ts
|
|
1087
1015
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1088
1016
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1089
|
-
|
|
1090
|
-
new Promise(
|
|
1091
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1092
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1093
|
-
r();
|
|
1094
|
-
}
|
|
1095
|
-
)
|
|
1096
|
-
);
|
|
1017
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
1097
1018
|
}
|
|
1098
1019
|
};
|
|
1099
1020
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1122,12 +1043,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1122
1043
|
{
|
|
1123
1044
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1124
1045
|
if (hostRef.$queuedListeners$) {
|
|
1125
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event
|
|
1046
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1126
1047
|
hostRef.$queuedListeners$ = void 0;
|
|
1127
1048
|
}
|
|
1128
1049
|
}
|
|
1129
1050
|
{
|
|
1130
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
|
1051
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1131
1052
|
}
|
|
1132
1053
|
}
|
|
1133
1054
|
endSchedule();
|
|
@@ -1196,7 +1117,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1196
1117
|
const instance = hostRef.$lazyInstance$ ;
|
|
1197
1118
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1198
1119
|
{
|
|
1199
|
-
safeCall(instance, "componentDidRender"
|
|
1120
|
+
safeCall(instance, "componentDidRender");
|
|
1200
1121
|
}
|
|
1201
1122
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1202
1123
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -1225,14 +1146,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1225
1146
|
}
|
|
1226
1147
|
};
|
|
1227
1148
|
var appDidLoad = (who) => {
|
|
1149
|
+
{
|
|
1150
|
+
addHydratedFlag(doc.documentElement);
|
|
1151
|
+
}
|
|
1228
1152
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1229
1153
|
};
|
|
1230
|
-
var safeCall = (instance, method, arg
|
|
1154
|
+
var safeCall = (instance, method, arg) => {
|
|
1231
1155
|
if (instance && instance[method]) {
|
|
1232
1156
|
try {
|
|
1233
1157
|
return instance[method](arg);
|
|
1234
1158
|
} catch (e) {
|
|
1235
|
-
consoleError(e
|
|
1159
|
+
consoleError(e);
|
|
1236
1160
|
}
|
|
1237
1161
|
}
|
|
1238
1162
|
return void 0;
|
|
@@ -1291,68 +1215,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1291
1215
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1292
1216
|
members.map(([memberName, [memberFlags]]) => {
|
|
1293
1217
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1294
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1295
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1296
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1297
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1298
|
-
Object.defineProperty(prototype, memberName, {
|
|
1299
|
-
get() {
|
|
1300
|
-
{
|
|
1301
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1302
|
-
return getValue(this, memberName);
|
|
1303
|
-
}
|
|
1304
|
-
const ref = getHostRef(this);
|
|
1305
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1306
|
-
if (!instance) return;
|
|
1307
|
-
return instance[memberName];
|
|
1308
|
-
}
|
|
1309
|
-
},
|
|
1310
|
-
configurable: true,
|
|
1311
|
-
enumerable: true
|
|
1312
|
-
});
|
|
1313
|
-
}
|
|
1314
1218
|
Object.defineProperty(prototype, memberName, {
|
|
1219
|
+
get() {
|
|
1220
|
+
return getValue(this, memberName);
|
|
1221
|
+
},
|
|
1315
1222
|
set(newValue) {
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
1321
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1322
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1323
|
-
}
|
|
1324
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1325
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1326
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1327
|
-
return;
|
|
1328
|
-
}
|
|
1329
|
-
{
|
|
1330
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1331
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1332
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1333
|
-
ref.$onReadyPromise$.then(() => {
|
|
1334
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1335
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
1336
|
-
}
|
|
1337
|
-
});
|
|
1338
|
-
}
|
|
1339
|
-
return;
|
|
1340
|
-
}
|
|
1341
|
-
const setterSetVal = () => {
|
|
1342
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
1343
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1344
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1345
|
-
}
|
|
1346
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1347
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1348
|
-
};
|
|
1349
|
-
if (ref.$lazyInstance$) {
|
|
1350
|
-
setterSetVal();
|
|
1351
|
-
} else {
|
|
1352
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1355
|
-
}
|
|
1223
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1224
|
+
},
|
|
1225
|
+
configurable: true,
|
|
1226
|
+
enumerable: true
|
|
1356
1227
|
});
|
|
1357
1228
|
}
|
|
1358
1229
|
});
|
|
@@ -1362,11 +1233,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1362
1233
|
plt.jmp(() => {
|
|
1363
1234
|
var _a2;
|
|
1364
1235
|
const propName = attrNameToPropName.get(attrName);
|
|
1365
|
-
if (this.hasOwnProperty(propName)
|
|
1236
|
+
if (this.hasOwnProperty(propName)) {
|
|
1366
1237
|
newValue = this[propName];
|
|
1367
1238
|
delete this[propName];
|
|
1368
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" &&
|
|
1369
|
-
this[propName] == newValue) {
|
|
1239
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
|
|
1370
1240
|
return;
|
|
1371
1241
|
} else if (propName == null) {
|
|
1372
1242
|
const hostRef = getHostRef(this);
|
|
@@ -1382,11 +1252,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1382
1252
|
}
|
|
1383
1253
|
return;
|
|
1384
1254
|
}
|
|
1385
|
-
|
|
1386
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1387
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1388
|
-
this[propName] = newValue;
|
|
1389
|
-
}
|
|
1255
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1390
1256
|
});
|
|
1391
1257
|
};
|
|
1392
1258
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1415,7 +1281,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1415
1281
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1416
1282
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1417
1283
|
if (bundleId) {
|
|
1418
|
-
const CstrImport = loadModule(cmpMeta
|
|
1284
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1419
1285
|
if (CstrImport && "then" in CstrImport) {
|
|
1420
1286
|
const endLoad = uniqueTime();
|
|
1421
1287
|
Cstr = await CstrImport;
|
|
@@ -1440,7 +1306,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1440
1306
|
try {
|
|
1441
1307
|
new Cstr(hostRef);
|
|
1442
1308
|
} catch (e) {
|
|
1443
|
-
consoleError(e
|
|
1309
|
+
consoleError(e);
|
|
1444
1310
|
}
|
|
1445
1311
|
{
|
|
1446
1312
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1475,7 +1341,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1475
1341
|
schedule();
|
|
1476
1342
|
}
|
|
1477
1343
|
};
|
|
1478
|
-
var fireConnectedCallback = (instance
|
|
1344
|
+
var fireConnectedCallback = (instance) => {
|
|
1479
1345
|
};
|
|
1480
1346
|
|
|
1481
1347
|
// src/runtime/connected-callback.ts
|
|
@@ -1529,7 +1395,7 @@ var setContentReference = (elm) => {
|
|
|
1529
1395
|
contentRefElm["s-cn"] = true;
|
|
1530
1396
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1531
1397
|
};
|
|
1532
|
-
var disconnectInstance = (instance
|
|
1398
|
+
var disconnectInstance = (instance) => {
|
|
1533
1399
|
};
|
|
1534
1400
|
var disconnectedCallback = async (elm) => {
|
|
1535
1401
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1544,12 +1410,6 @@ var disconnectedCallback = async (elm) => {
|
|
|
1544
1410
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1545
1411
|
}
|
|
1546
1412
|
}
|
|
1547
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1548
|
-
rootAppliedStyles.delete(elm);
|
|
1549
|
-
}
|
|
1550
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1551
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1552
|
-
}
|
|
1553
1413
|
};
|
|
1554
1414
|
|
|
1555
1415
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1634,17 +1494,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1634
1494
|
}
|
|
1635
1495
|
disconnectedCallback() {
|
|
1636
1496
|
plt.jmp(() => disconnectedCallback(this));
|
|
1637
|
-
plt.raf(() => {
|
|
1638
|
-
var _a3;
|
|
1639
|
-
const hostRef = getHostRef(this);
|
|
1640
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1641
|
-
if (i2 > -1) {
|
|
1642
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1643
|
-
}
|
|
1644
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1645
|
-
delete hostRef.$vnode$.$elm$;
|
|
1646
|
-
}
|
|
1647
|
-
});
|
|
1648
1497
|
}
|
|
1649
1498
|
componentOnReady() {
|
|
1650
1499
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1711,7 +1560,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1711
1560
|
}
|
|
1712
1561
|
}
|
|
1713
1562
|
} catch (e) {
|
|
1714
|
-
consoleError(e
|
|
1563
|
+
consoleError(e);
|
|
1715
1564
|
}
|
|
1716
1565
|
};
|
|
1717
1566
|
var getHostListenerTarget = (elm, flags) => {
|