@everymatrix/gamification-dropdown 1.54.12 → 1.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{gamification-dropdown-756a43c2.js → gamification-dropdown-0a3a8194.js} +11 -24
- package/dist/cjs/gamification-dropdown.cjs.js +2 -2
- package/dist/cjs/gamification-dropdown_4.cjs.entry.js +17 -34
- package/dist/cjs/{index-547b95bf.js → index-7b4d999d.js} +140 -250
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{player-elevate-card-items-705345d8.js → player-elevate-card-items-087e5a58.js} +1 -1
- package/dist/cjs/player-elevate-card.cjs.entry.js +9 -21
- package/dist/cjs/player-elevate-pointcard.cjs.entry.js +12 -29
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/gamification-dropdown/gamification-dropdown.js +10 -35
- package/dist/esm/{gamification-dropdown-370424de.js → gamification-dropdown-456bb56a.js} +11 -24
- package/dist/esm/gamification-dropdown.js +3 -3
- package/dist/esm/gamification-dropdown_4.entry.js +17 -34
- package/dist/esm/{index-1ed44842.js → index-171550cf.js} +140 -250
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{player-elevate-card-items-4e46b4c8.js → player-elevate-card-items-2078bd83.js} +1 -1
- package/dist/esm/player-elevate-card.entry.js +9 -21
- package/dist/esm/player-elevate-pointcard.entry.js +12 -29
- package/dist/gamification-dropdown/gamification-dropdown.esm.js +1 -1
- package/dist/gamification-dropdown/index.esm.js +1 -1
- package/dist/gamification-dropdown/p-7ecb6fdf.js +2 -0
- package/dist/gamification-dropdown/p-8426f967.entry.js +1 -0
- package/dist/gamification-dropdown/p-881e823a.entry.js +1 -0
- package/dist/gamification-dropdown/p-a2f51157.entry.js +1 -0
- package/dist/gamification-dropdown/p-cfb00725.js +1 -0
- package/dist/gamification-dropdown/{p-e4f069bf.js → p-dda9c7be.js} +1 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/packages/stencil/gamification-dropdown/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/packages/stencil/gamification-dropdown/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/gamification-dropdown/p-17c6de19.entry.js +0 -1
- package/dist/gamification-dropdown/p-1c00c3b4.entry.js +0 -1
- package/dist/gamification-dropdown/p-5cfad4de.entry.js +0 -1
- package/dist/gamification-dropdown/p-6854f53c.js +0 -2
- package/dist/gamification-dropdown/p-7fd023ad.js +0 -1
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/packages/stencil/gamification-dropdown/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/packages/stencil/gamification-dropdown/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/gamification-dropdown/.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/gamification-dropdown/.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/gamification-dropdown/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
const NAMESPACE = 'gamification-dropdown';
|
|
2
|
-
const BUILD = /* gamification-dropdown */ { 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 = /* gamification-dropdown */ { 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: 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: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.22.3 | 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/utils/constants.ts
|
|
14
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
15
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
16
|
-
|
|
17
|
-
// src/client/client-host-ref.ts
|
|
18
12
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
19
13
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
20
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
21
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
22
|
-
};
|
|
14
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
23
15
|
var registerHost = (hostElement, cmpMeta) => {
|
|
24
16
|
const hostRef = {
|
|
25
17
|
$flags$: 0,
|
|
@@ -32,8 +24,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
32
24
|
hostElement["s-p"] = [];
|
|
33
25
|
hostElement["s-rc"] = [];
|
|
34
26
|
}
|
|
35
|
-
|
|
36
|
-
return ref;
|
|
27
|
+
return hostRefs.set(hostElement, hostRef);
|
|
37
28
|
};
|
|
38
29
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
39
30
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -78,22 +69,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
78
69
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
79
70
|
/* webpackMode: "lazy" */
|
|
80
71
|
`./${bundleId}.entry.js${""}`
|
|
81
|
-
).then(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
cmpModules.set(bundleId, importedModule);
|
|
85
|
-
}
|
|
86
|
-
return importedModule[exportName];
|
|
87
|
-
},
|
|
88
|
-
(e) => {
|
|
89
|
-
consoleError(e, hostRef.$hostElement$);
|
|
72
|
+
).then((importedModule) => {
|
|
73
|
+
{
|
|
74
|
+
cmpModules.set(bundleId, importedModule);
|
|
90
75
|
}
|
|
91
|
-
|
|
76
|
+
return importedModule[exportName];
|
|
77
|
+
}, consoleError);
|
|
92
78
|
};
|
|
93
79
|
|
|
94
80
|
// src/client/client-style.ts
|
|
95
81
|
var styles = /* @__PURE__ */ new Map();
|
|
96
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
97
82
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
98
83
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
99
84
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -173,6 +158,14 @@ var getAssetPath = (path) => {
|
|
|
173
158
|
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
174
159
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
175
160
|
};
|
|
161
|
+
|
|
162
|
+
// src/utils/constants.ts
|
|
163
|
+
var EMPTY_OBJ = {};
|
|
164
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
165
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
166
|
+
|
|
167
|
+
// src/utils/helpers.ts
|
|
168
|
+
var isDef = (v) => v != null;
|
|
176
169
|
var isComplexType = (o) => {
|
|
177
170
|
o = typeof o;
|
|
178
171
|
return o === "object" || o === "function";
|
|
@@ -232,63 +225,6 @@ var unwrapErr = (result) => {
|
|
|
232
225
|
throw result.value;
|
|
233
226
|
}
|
|
234
227
|
};
|
|
235
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
236
|
-
const childNodes = elm.__childNodes || elm.childNodes;
|
|
237
|
-
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
238
|
-
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
239
|
-
var _a;
|
|
240
|
-
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
241
|
-
if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
|
|
242
|
-
slotNode.hidden = true;
|
|
243
|
-
} else {
|
|
244
|
-
slotNode.hidden = false;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
for (const childNode of childNodes) {
|
|
250
|
-
if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
|
|
251
|
-
updateFallbackSlotVisibility(childNode);
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
256
|
-
let i2 = 0;
|
|
257
|
-
let slottedNodes = [];
|
|
258
|
-
let childNode;
|
|
259
|
-
for (; i2 < childNodes.length; i2++) {
|
|
260
|
-
childNode = childNodes[i2];
|
|
261
|
-
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
|
262
|
-
slottedNodes.push(childNode);
|
|
263
|
-
if (typeof slotName !== "undefined") return slottedNodes;
|
|
264
|
-
}
|
|
265
|
-
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
266
|
-
}
|
|
267
|
-
return slottedNodes;
|
|
268
|
-
}
|
|
269
|
-
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
|
270
|
-
const childNodes = [];
|
|
271
|
-
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
|
272
|
-
while ((node = node.nextSibling) && node["s-sn"] === slotName) {
|
|
273
|
-
childNodes.push(node);
|
|
274
|
-
}
|
|
275
|
-
return childNodes;
|
|
276
|
-
};
|
|
277
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
278
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
279
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
280
|
-
return true;
|
|
281
|
-
}
|
|
282
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
283
|
-
return true;
|
|
284
|
-
}
|
|
285
|
-
return false;
|
|
286
|
-
}
|
|
287
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
288
|
-
return true;
|
|
289
|
-
}
|
|
290
|
-
return slotName === "";
|
|
291
|
-
};
|
|
292
228
|
var createTime = (fnName, tagName = "") => {
|
|
293
229
|
{
|
|
294
230
|
return () => {
|
|
@@ -474,7 +410,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
474
410
|
}
|
|
475
411
|
if (!appliedStyles.has(scopeId2)) {
|
|
476
412
|
{
|
|
477
|
-
styleElm =
|
|
413
|
+
styleElm = doc.createElement("style");
|
|
478
414
|
styleElm.innerHTML = style;
|
|
479
415
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
480
416
|
if (nonce != null) {
|
|
@@ -484,10 +420,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
484
420
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
485
421
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
486
422
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
487
|
-
styleContainerNode.insertBefore(
|
|
488
|
-
styleElm,
|
|
489
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
490
|
-
);
|
|
423
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
491
424
|
} else if ("host" in styleContainerNode) {
|
|
492
425
|
if (supportsConstructableStylesheets) {
|
|
493
426
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -505,7 +438,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
505
438
|
styleContainerNode.append(styleElm);
|
|
506
439
|
}
|
|
507
440
|
}
|
|
508
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
441
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
509
442
|
styleContainerNode.insertBefore(styleElm, null);
|
|
510
443
|
}
|
|
511
444
|
}
|
|
@@ -530,25 +463,23 @@ var attachStyles = (hostRef) => {
|
|
|
530
463
|
const scopeId2 = addStyle(
|
|
531
464
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
532
465
|
cmpMeta);
|
|
533
|
-
if (
|
|
466
|
+
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
534
467
|
elm["s-sc"] = scopeId2;
|
|
535
468
|
elm.classList.add(scopeId2 + "-h");
|
|
536
469
|
}
|
|
537
470
|
endAttachStyles();
|
|
538
471
|
};
|
|
539
472
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
540
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
473
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
541
474
|
if (oldValue !== newValue) {
|
|
542
475
|
let isProp = isMemberInElement(elm, memberName);
|
|
543
476
|
let ln = memberName.toLowerCase();
|
|
544
477
|
if (memberName === "class") {
|
|
545
478
|
const classList = elm.classList;
|
|
546
479
|
const oldClasses = parseClassList(oldValue);
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
551
|
-
}
|
|
480
|
+
const newClasses = parseClassList(newValue);
|
|
481
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
482
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
552
483
|
} else if (memberName === "style") {
|
|
553
484
|
{
|
|
554
485
|
for (const prop in oldValue) {
|
|
@@ -607,7 +538,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
607
538
|
elm.setAttribute(memberName, n);
|
|
608
539
|
}
|
|
609
540
|
}
|
|
610
|
-
} else
|
|
541
|
+
} else {
|
|
611
542
|
elm[memberName] = newValue;
|
|
612
543
|
}
|
|
613
544
|
} catch (e) {
|
|
@@ -629,44 +560,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
629
560
|
}
|
|
630
561
|
};
|
|
631
562
|
var parseClassListRegex = /\s/;
|
|
632
|
-
var parseClassList = (value) =>
|
|
633
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
634
|
-
value = value.baseVal;
|
|
635
|
-
}
|
|
636
|
-
if (!value || typeof value !== "string") {
|
|
637
|
-
return [];
|
|
638
|
-
}
|
|
639
|
-
return value.split(parseClassListRegex);
|
|
640
|
-
};
|
|
563
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
641
564
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
642
565
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
643
566
|
|
|
644
567
|
// src/runtime/vdom/update-element.ts
|
|
645
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
568
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
646
569
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
647
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
648
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
570
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
571
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
649
572
|
{
|
|
650
573
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
651
574
|
if (!(memberName in newVnodeAttrs)) {
|
|
652
|
-
setAccessor(
|
|
653
|
-
elm,
|
|
654
|
-
memberName,
|
|
655
|
-
oldVnodeAttrs[memberName],
|
|
656
|
-
void 0,
|
|
657
|
-
isSvgMode2,
|
|
658
|
-
newVnode.$flags$);
|
|
575
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
659
576
|
}
|
|
660
577
|
}
|
|
661
578
|
}
|
|
662
579
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
663
|
-
setAccessor(
|
|
664
|
-
elm,
|
|
665
|
-
memberName,
|
|
666
|
-
oldVnodeAttrs[memberName],
|
|
667
|
-
newVnodeAttrs[memberName],
|
|
668
|
-
isSvgMode2,
|
|
669
|
-
newVnode.$flags$);
|
|
580
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
670
581
|
}
|
|
671
582
|
};
|
|
672
583
|
function sortedAttrNames(attrNames) {
|
|
@@ -678,13 +589,16 @@ function sortedAttrNames(attrNames) {
|
|
|
678
589
|
attrNames
|
|
679
590
|
);
|
|
680
591
|
}
|
|
592
|
+
|
|
593
|
+
// src/runtime/vdom/vdom-render.ts
|
|
594
|
+
var scopeId;
|
|
681
595
|
var contentRef;
|
|
682
596
|
var hostTagName;
|
|
683
597
|
var useNativeShadowDom = false;
|
|
684
598
|
var checkSlotFallbackVisibility = false;
|
|
685
599
|
var checkSlotRelocate = false;
|
|
686
600
|
var isSvgMode = false;
|
|
687
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
601
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
688
602
|
var _a;
|
|
689
603
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
690
604
|
let i2 = 0;
|
|
@@ -694,6 +608,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
694
608
|
if (!useNativeShadowDom) {
|
|
695
609
|
checkSlotRelocate = true;
|
|
696
610
|
if (newVNode2.$tag$ === "slot") {
|
|
611
|
+
if (scopeId) {
|
|
612
|
+
parentElm.classList.add(scopeId + "-s");
|
|
613
|
+
}
|
|
697
614
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
698
615
|
// slot element has fallback content
|
|
699
616
|
// still create an element that "mocks" the slot element
|
|
@@ -724,9 +641,14 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
724
641
|
{
|
|
725
642
|
updateElement(null, newVNode2, isSvgMode);
|
|
726
643
|
}
|
|
644
|
+
const rootNode = elm.getRootNode();
|
|
645
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
646
|
+
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
647
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
648
|
+
}
|
|
727
649
|
if (newVNode2.$children$) {
|
|
728
650
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
729
|
-
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
651
|
+
childNode = createElm(oldParentVNode, newVNode2, i2, elm);
|
|
730
652
|
if (childNode) {
|
|
731
653
|
elm.appendChild(childNode);
|
|
732
654
|
}
|
|
@@ -759,7 +681,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
759
681
|
};
|
|
760
682
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
761
683
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
762
|
-
const oldSlotChildNodes = Array.from(parentElm.
|
|
684
|
+
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
763
685
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
764
686
|
let node = parentElm;
|
|
765
687
|
while (node = node.nextSibling) {
|
|
@@ -771,7 +693,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
771
693
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
772
694
|
const childNode = oldSlotChildNodes[i2];
|
|
773
695
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
774
|
-
insertBefore(
|
|
696
|
+
insertBefore(parentReferenceNode(childNode), childNode, referenceNode(childNode));
|
|
775
697
|
childNode["s-ol"].remove();
|
|
776
698
|
childNode["s-ol"] = void 0;
|
|
777
699
|
childNode["s-sh"] = void 0;
|
|
@@ -791,7 +713,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
791
713
|
}
|
|
792
714
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
793
715
|
if (vnodes[startIdx]) {
|
|
794
|
-
childNode = createElm(null, parentVNode, startIdx);
|
|
716
|
+
childNode = createElm(null, parentVNode, startIdx, parentElm);
|
|
795
717
|
if (childNode) {
|
|
796
718
|
vnodes[startIdx].$elm$ = childNode;
|
|
797
719
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -878,7 +800,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
878
800
|
if (idxInOld >= 0) {
|
|
879
801
|
elmToMove = oldCh[idxInOld];
|
|
880
802
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
881
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
803
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld, parentElm);
|
|
882
804
|
} else {
|
|
883
805
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
884
806
|
oldCh[idxInOld] = void 0;
|
|
@@ -886,16 +808,12 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
886
808
|
}
|
|
887
809
|
newStartVnode = newCh[++newStartIdx];
|
|
888
810
|
} else {
|
|
889
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
811
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx, parentElm);
|
|
890
812
|
newStartVnode = newCh[++newStartIdx];
|
|
891
813
|
}
|
|
892
814
|
if (node) {
|
|
893
815
|
{
|
|
894
|
-
insertBefore(
|
|
895
|
-
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
896
|
-
node,
|
|
897
|
-
referenceNode(oldStartVnode.$elm$)
|
|
898
|
-
);
|
|
816
|
+
insertBefore(parentReferenceNode(oldStartVnode.$elm$), node, referenceNode(oldStartVnode.$elm$));
|
|
899
817
|
}
|
|
900
818
|
}
|
|
901
819
|
}
|
|
@@ -916,19 +834,28 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
916
834
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
917
835
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
918
836
|
if (leftVNode.$tag$ === "slot") {
|
|
837
|
+
if (
|
|
838
|
+
// The component gets hydrated and no VDOM has been initialized.
|
|
839
|
+
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
840
|
+
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
841
|
+
// hydration comments to be removed
|
|
842
|
+
leftVNode.$elm$.nodeType !== 8
|
|
843
|
+
) {
|
|
844
|
+
return false;
|
|
845
|
+
}
|
|
919
846
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
920
847
|
}
|
|
921
848
|
if (!isInitialRender) {
|
|
922
849
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
923
850
|
}
|
|
924
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
925
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
926
|
-
}
|
|
927
851
|
return true;
|
|
928
852
|
}
|
|
929
853
|
return false;
|
|
930
854
|
};
|
|
931
|
-
var referenceNode = (node) =>
|
|
855
|
+
var referenceNode = (node) => {
|
|
856
|
+
return node && node["s-ol"] || node;
|
|
857
|
+
};
|
|
858
|
+
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
932
859
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
933
860
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
934
861
|
const oldChildren = oldVNode.$children$;
|
|
@@ -967,15 +894,41 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
967
894
|
elm.data = text;
|
|
968
895
|
}
|
|
969
896
|
};
|
|
897
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
898
|
+
const childNodes = elm.childNodes;
|
|
899
|
+
for (const childNode of childNodes) {
|
|
900
|
+
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
901
|
+
if (childNode["s-sr"]) {
|
|
902
|
+
const slotName = childNode["s-sn"];
|
|
903
|
+
childNode.hidden = false;
|
|
904
|
+
for (const siblingNode of childNodes) {
|
|
905
|
+
if (siblingNode !== childNode) {
|
|
906
|
+
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
907
|
+
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
908
|
+
childNode.hidden = true;
|
|
909
|
+
break;
|
|
910
|
+
}
|
|
911
|
+
} else {
|
|
912
|
+
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
913
|
+
childNode.hidden = true;
|
|
914
|
+
break;
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
updateFallbackSlotVisibility(childNode);
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
};
|
|
970
924
|
var relocateNodes = [];
|
|
971
925
|
var markSlotContentForRelocation = (elm) => {
|
|
972
926
|
let node;
|
|
973
927
|
let hostContentNodes;
|
|
974
928
|
let j;
|
|
975
|
-
const
|
|
976
|
-
for (const childNode of children) {
|
|
929
|
+
for (const childNode of elm.childNodes) {
|
|
977
930
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
978
|
-
hostContentNodes = node.parentNode.
|
|
931
|
+
hostContentNodes = node.parentNode.childNodes;
|
|
979
932
|
const slotName = childNode["s-sn"];
|
|
980
933
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
981
934
|
node = hostContentNodes[j];
|
|
@@ -1017,6 +970,21 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
1017
970
|
}
|
|
1018
971
|
}
|
|
1019
972
|
};
|
|
973
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
974
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
975
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
976
|
+
return true;
|
|
977
|
+
}
|
|
978
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
979
|
+
return true;
|
|
980
|
+
}
|
|
981
|
+
return false;
|
|
982
|
+
}
|
|
983
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
984
|
+
return true;
|
|
985
|
+
}
|
|
986
|
+
return slotName === "";
|
|
987
|
+
};
|
|
1020
988
|
var nullifyVNodeRefs = (vNode) => {
|
|
1021
989
|
{
|
|
1022
990
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -1024,9 +992,8 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
1024
992
|
}
|
|
1025
993
|
};
|
|
1026
994
|
var insertBefore = (parent, newNode, reference) => {
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
}
|
|
995
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
996
|
+
return inserted;
|
|
1030
997
|
};
|
|
1031
998
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1032
999
|
var _a, _b, _c, _d;
|
|
@@ -1052,7 +1019,10 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1052
1019
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1053
1020
|
hostRef.$vnode$ = rootVnode;
|
|
1054
1021
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
1055
|
-
|
|
1022
|
+
{
|
|
1023
|
+
scopeId = hostElm["s-sc"];
|
|
1024
|
+
}
|
|
1025
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1056
1026
|
{
|
|
1057
1027
|
contentRef = hostElm["s-cr"];
|
|
1058
1028
|
checkSlotFallbackVisibility = false;
|
|
@@ -1080,7 +1050,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1080
1050
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1081
1051
|
while (orgLocationNode) {
|
|
1082
1052
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1083
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef ===
|
|
1053
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1084
1054
|
refNode = refNode.nextSibling;
|
|
1085
1055
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1086
1056
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1093,15 +1063,13 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1093
1063
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1094
1064
|
}
|
|
1095
1065
|
}
|
|
1096
|
-
|
|
1097
|
-
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1098
|
-
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1066
|
+
if (!insertBeforeNode && parentNodeRef !== nodeToRelocate.parentNode || nodeToRelocate.nextSibling !== insertBeforeNode) {
|
|
1099
1067
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1100
1068
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1101
1069
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1102
1070
|
}
|
|
1103
1071
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1104
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */
|
|
1072
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1105
1073
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1106
1074
|
}
|
|
1107
1075
|
}
|
|
@@ -1129,14 +1097,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1129
1097
|
// src/runtime/update-component.ts
|
|
1130
1098
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1131
1099
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1132
|
-
|
|
1133
|
-
new Promise(
|
|
1134
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1135
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1136
|
-
r();
|
|
1137
|
-
}
|
|
1138
|
-
)
|
|
1139
|
-
);
|
|
1100
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
1140
1101
|
}
|
|
1141
1102
|
};
|
|
1142
1103
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1165,12 +1126,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1165
1126
|
{
|
|
1166
1127
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1167
1128
|
if (hostRef.$queuedListeners$) {
|
|
1168
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event
|
|
1129
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1169
1130
|
hostRef.$queuedListeners$ = void 0;
|
|
1170
1131
|
}
|
|
1171
1132
|
}
|
|
1172
1133
|
{
|
|
1173
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
|
1134
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1174
1135
|
}
|
|
1175
1136
|
}
|
|
1176
1137
|
endSchedule();
|
|
@@ -1239,7 +1200,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1239
1200
|
const instance = hostRef.$lazyInstance$ ;
|
|
1240
1201
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1241
1202
|
{
|
|
1242
|
-
safeCall(instance, "componentDidRender"
|
|
1203
|
+
safeCall(instance, "componentDidRender");
|
|
1243
1204
|
}
|
|
1244
1205
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1245
1206
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -1268,14 +1229,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1268
1229
|
}
|
|
1269
1230
|
};
|
|
1270
1231
|
var appDidLoad = (who) => {
|
|
1232
|
+
{
|
|
1233
|
+
addHydratedFlag(doc.documentElement);
|
|
1234
|
+
}
|
|
1271
1235
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1272
1236
|
};
|
|
1273
|
-
var safeCall = (instance, method, arg
|
|
1237
|
+
var safeCall = (instance, method, arg) => {
|
|
1274
1238
|
if (instance && instance[method]) {
|
|
1275
1239
|
try {
|
|
1276
1240
|
return instance[method](arg);
|
|
1277
1241
|
} catch (e) {
|
|
1278
|
-
consoleError(e
|
|
1242
|
+
consoleError(e);
|
|
1279
1243
|
}
|
|
1280
1244
|
}
|
|
1281
1245
|
return void 0;
|
|
@@ -1334,68 +1298,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1334
1298
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1335
1299
|
members.map(([memberName, [memberFlags]]) => {
|
|
1336
1300
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1337
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1338
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1339
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1340
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1341
|
-
Object.defineProperty(prototype, memberName, {
|
|
1342
|
-
get() {
|
|
1343
|
-
{
|
|
1344
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1345
|
-
return getValue(this, memberName);
|
|
1346
|
-
}
|
|
1347
|
-
const ref = getHostRef(this);
|
|
1348
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1349
|
-
if (!instance) return;
|
|
1350
|
-
return instance[memberName];
|
|
1351
|
-
}
|
|
1352
|
-
},
|
|
1353
|
-
configurable: true,
|
|
1354
|
-
enumerable: true
|
|
1355
|
-
});
|
|
1356
|
-
}
|
|
1357
1301
|
Object.defineProperty(prototype, memberName, {
|
|
1302
|
+
get() {
|
|
1303
|
+
return getValue(this, memberName);
|
|
1304
|
+
},
|
|
1358
1305
|
set(newValue) {
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
1364
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1365
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1366
|
-
}
|
|
1367
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1368
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1369
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1370
|
-
return;
|
|
1371
|
-
}
|
|
1372
|
-
{
|
|
1373
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1374
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1375
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1376
|
-
ref.$onReadyPromise$.then(() => {
|
|
1377
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1378
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
1379
|
-
}
|
|
1380
|
-
});
|
|
1381
|
-
}
|
|
1382
|
-
return;
|
|
1383
|
-
}
|
|
1384
|
-
const setterSetVal = () => {
|
|
1385
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
1386
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1387
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1388
|
-
}
|
|
1389
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1390
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1391
|
-
};
|
|
1392
|
-
if (ref.$lazyInstance$) {
|
|
1393
|
-
setterSetVal();
|
|
1394
|
-
} else {
|
|
1395
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
}
|
|
1306
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1307
|
+
},
|
|
1308
|
+
configurable: true,
|
|
1309
|
+
enumerable: true
|
|
1399
1310
|
});
|
|
1400
1311
|
}
|
|
1401
1312
|
});
|
|
@@ -1405,7 +1316,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1405
1316
|
plt.jmp(() => {
|
|
1406
1317
|
var _a2;
|
|
1407
1318
|
const propName = attrNameToPropName.get(attrName);
|
|
1408
|
-
if (this.hasOwnProperty(propName)
|
|
1319
|
+
if (this.hasOwnProperty(propName)) {
|
|
1409
1320
|
newValue = this[propName];
|
|
1410
1321
|
delete this[propName];
|
|
1411
1322
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1425,11 +1336,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1425
1336
|
}
|
|
1426
1337
|
return;
|
|
1427
1338
|
}
|
|
1428
|
-
|
|
1429
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1430
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1431
|
-
this[propName] = newValue;
|
|
1432
|
-
}
|
|
1339
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1433
1340
|
});
|
|
1434
1341
|
};
|
|
1435
1342
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1458,7 +1365,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1458
1365
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1459
1366
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1460
1367
|
if (bundleId) {
|
|
1461
|
-
const CstrImport = loadModule(cmpMeta
|
|
1368
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1462
1369
|
if (CstrImport && "then" in CstrImport) {
|
|
1463
1370
|
const endLoad = uniqueTime();
|
|
1464
1371
|
Cstr = await CstrImport;
|
|
@@ -1483,7 +1390,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1483
1390
|
try {
|
|
1484
1391
|
new Cstr(hostRef);
|
|
1485
1392
|
} catch (e) {
|
|
1486
|
-
consoleError(e
|
|
1393
|
+
consoleError(e);
|
|
1487
1394
|
}
|
|
1488
1395
|
{
|
|
1489
1396
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1518,7 +1425,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1518
1425
|
schedule();
|
|
1519
1426
|
}
|
|
1520
1427
|
};
|
|
1521
|
-
var fireConnectedCallback = (instance
|
|
1428
|
+
var fireConnectedCallback = (instance) => {
|
|
1522
1429
|
};
|
|
1523
1430
|
|
|
1524
1431
|
// src/runtime/connected-callback.ts
|
|
@@ -1572,7 +1479,7 @@ var setContentReference = (elm) => {
|
|
|
1572
1479
|
contentRefElm["s-cn"] = true;
|
|
1573
1480
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1574
1481
|
};
|
|
1575
|
-
var disconnectInstance = (instance
|
|
1482
|
+
var disconnectInstance = (instance) => {
|
|
1576
1483
|
};
|
|
1577
1484
|
var disconnectedCallback = async (elm) => {
|
|
1578
1485
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1587,12 +1494,6 @@ var disconnectedCallback = async (elm) => {
|
|
|
1587
1494
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1588
1495
|
}
|
|
1589
1496
|
}
|
|
1590
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1591
|
-
rootAppliedStyles.delete(elm);
|
|
1592
|
-
}
|
|
1593
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1594
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1595
|
-
}
|
|
1596
1497
|
};
|
|
1597
1498
|
|
|
1598
1499
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1677,17 +1578,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1677
1578
|
}
|
|
1678
1579
|
disconnectedCallback() {
|
|
1679
1580
|
plt.jmp(() => disconnectedCallback(this));
|
|
1680
|
-
plt.raf(() => {
|
|
1681
|
-
var _a3;
|
|
1682
|
-
const hostRef = getHostRef(this);
|
|
1683
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1684
|
-
if (i2 > -1) {
|
|
1685
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1686
|
-
}
|
|
1687
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1688
|
-
delete hostRef.$vnode$.$elm$;
|
|
1689
|
-
}
|
|
1690
|
-
});
|
|
1691
1581
|
}
|
|
1692
1582
|
componentOnReady() {
|
|
1693
1583
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1754,7 +1644,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1754
1644
|
}
|
|
1755
1645
|
}
|
|
1756
1646
|
} catch (e) {
|
|
1757
|
-
consoleError(e
|
|
1647
|
+
consoleError(e);
|
|
1758
1648
|
}
|
|
1759
1649
|
};
|
|
1760
1650
|
var getHostListenerTarget = (elm, flags) => {
|