@everymatrix/gamification-dropdown 0.7.0 → 0.8.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-0a3a8194.js → gamification-dropdown-0fd9c5b8.js} +24 -11
- package/dist/cjs/gamification-dropdown.cjs.js +2 -2
- package/dist/cjs/gamification-dropdown_4.cjs.entry.js +34 -17
- package/dist/cjs/{index-7b4d999d.js → index-c535ed72.js} +244 -140
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{player-elevate-card-items-087e5a58.js → player-elevate-card-items-42538012.js} +1 -1
- package/dist/cjs/player-elevate-card.cjs.entry.js +21 -9
- package/dist/cjs/player-elevate-pointcard.cjs.entry.js +29 -12
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/gamification-dropdown/gamification-dropdown.js +35 -10
- package/dist/esm/{gamification-dropdown-456bb56a.js → gamification-dropdown-ae7b7c69.js} +24 -11
- package/dist/esm/gamification-dropdown.js +3 -3
- package/dist/esm/gamification-dropdown_4.entry.js +34 -17
- package/dist/esm/{index-171550cf.js → index-ea7720e4.js} +244 -140
- package/dist/esm/index.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{player-elevate-card-items-2078bd83.js → player-elevate-card-items-9d490a3b.js} +1 -1
- package/dist/esm/player-elevate-card.entry.js +21 -9
- package/dist/esm/player-elevate-pointcard.entry.js +29 -12
- package/dist/gamification-dropdown/gamification-dropdown.esm.js +1 -1
- package/dist/gamification-dropdown/index.esm.js +1 -1
- package/dist/gamification-dropdown/p-10486e5b.entry.js +1 -0
- package/dist/gamification-dropdown/{p-dda9c7be.js → p-21507480.js} +1 -1
- package/dist/gamification-dropdown/p-3f7623db.js +2 -0
- package/dist/gamification-dropdown/p-422d11f7.entry.js +1 -0
- package/dist/gamification-dropdown/p-4b1d42b5.entry.js +1 -0
- package/dist/gamification-dropdown/p-c5998a81.js +1 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/packages/stencil/gamification-dropdown/stencil.config.d.ts +2 -0
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/packages/stencil/gamification-dropdown/stencil.config.dev.d.ts +2 -0
- package/package.json +2 -2
- package/dist/gamification-dropdown/p-7ecb6fdf.js +0 -2
- package/dist/gamification-dropdown/p-8426f967.entry.js +0 -1
- package/dist/gamification-dropdown/p-881e823a.entry.js +0 -1
- package/dist/gamification-dropdown/p-a2f51157.entry.js +0 -1
- package/dist/gamification-dropdown/p-cfb00725.js +0 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/packages/stencil/gamification-dropdown/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/gamification-dropdown/.stencil/packages/stencil/gamification-dropdown/stencil.config.dev.d.ts +0 -2
|
@@ -1,17 +1,25 @@
|
|
|
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, 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 };
|
|
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, modernPropertyDecls: 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.25.1 | 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
|
|
12
18
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
13
19
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
14
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
20
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
21
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
22
|
+
};
|
|
15
23
|
var registerHost = (hostElement, cmpMeta) => {
|
|
16
24
|
const hostRef = {
|
|
17
25
|
$flags$: 0,
|
|
@@ -24,7 +32,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
24
32
|
hostElement["s-p"] = [];
|
|
25
33
|
hostElement["s-rc"] = [];
|
|
26
34
|
}
|
|
27
|
-
|
|
35
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
36
|
+
return ref;
|
|
28
37
|
};
|
|
29
38
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
30
39
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -69,16 +78,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
69
78
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
70
79
|
/* webpackMode: "lazy" */
|
|
71
80
|
`./${bundleId}.entry.js${""}`
|
|
72
|
-
).then(
|
|
73
|
-
{
|
|
74
|
-
|
|
81
|
+
).then(
|
|
82
|
+
(importedModule) => {
|
|
83
|
+
{
|
|
84
|
+
cmpModules.set(bundleId, importedModule);
|
|
85
|
+
}
|
|
86
|
+
return importedModule[exportName];
|
|
87
|
+
},
|
|
88
|
+
(e) => {
|
|
89
|
+
consoleError(e, hostRef.$hostElement$);
|
|
75
90
|
}
|
|
76
|
-
|
|
77
|
-
}, consoleError);
|
|
91
|
+
);
|
|
78
92
|
};
|
|
79
93
|
|
|
80
94
|
// src/client/client-style.ts
|
|
81
95
|
var styles = /* @__PURE__ */ new Map();
|
|
96
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
82
97
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
83
98
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
84
99
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -158,14 +173,6 @@ var getAssetPath = (path) => {
|
|
|
158
173
|
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
159
174
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
160
175
|
};
|
|
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;
|
|
169
176
|
var isComplexType = (o) => {
|
|
170
177
|
o = typeof o;
|
|
171
178
|
return o === "object" || o === "function";
|
|
@@ -225,6 +232,63 @@ var unwrapErr = (result) => {
|
|
|
225
232
|
throw result.value;
|
|
226
233
|
}
|
|
227
234
|
};
|
|
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
|
+
};
|
|
228
292
|
var createTime = (fnName, tagName = "") => {
|
|
229
293
|
{
|
|
230
294
|
return () => {
|
|
@@ -410,7 +474,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
410
474
|
}
|
|
411
475
|
if (!appliedStyles.has(scopeId2)) {
|
|
412
476
|
{
|
|
413
|
-
styleElm = doc.createElement("style");
|
|
477
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
414
478
|
styleElm.innerHTML = style;
|
|
415
479
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
416
480
|
if (nonce != null) {
|
|
@@ -420,7 +484,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
420
484
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
421
485
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
422
486
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
423
|
-
styleContainerNode.insertBefore(
|
|
487
|
+
styleContainerNode.insertBefore(
|
|
488
|
+
styleElm,
|
|
489
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
490
|
+
);
|
|
424
491
|
} else if ("host" in styleContainerNode) {
|
|
425
492
|
if (supportsConstructableStylesheets) {
|
|
426
493
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -470,16 +537,18 @@ var attachStyles = (hostRef) => {
|
|
|
470
537
|
endAttachStyles();
|
|
471
538
|
};
|
|
472
539
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
473
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
540
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
474
541
|
if (oldValue !== newValue) {
|
|
475
542
|
let isProp = isMemberInElement(elm, memberName);
|
|
476
543
|
let ln = memberName.toLowerCase();
|
|
477
544
|
if (memberName === "class") {
|
|
478
545
|
const classList = elm.classList;
|
|
479
546
|
const oldClasses = parseClassList(oldValue);
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
547
|
+
let newClasses = parseClassList(newValue);
|
|
548
|
+
{
|
|
549
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
550
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
551
|
+
}
|
|
483
552
|
} else if (memberName === "style") {
|
|
484
553
|
{
|
|
485
554
|
for (const prop in oldValue) {
|
|
@@ -538,7 +607,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
538
607
|
elm.setAttribute(memberName, n);
|
|
539
608
|
}
|
|
540
609
|
}
|
|
541
|
-
} else {
|
|
610
|
+
} else if (elm[memberName] !== newValue) {
|
|
542
611
|
elm[memberName] = newValue;
|
|
543
612
|
}
|
|
544
613
|
} catch (e) {
|
|
@@ -560,24 +629,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
560
629
|
}
|
|
561
630
|
};
|
|
562
631
|
var parseClassListRegex = /\s/;
|
|
563
|
-
var parseClassList = (value) =>
|
|
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
|
+
};
|
|
564
641
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
565
642
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
566
643
|
|
|
567
644
|
// src/runtime/vdom/update-element.ts
|
|
568
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
645
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
569
646
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
570
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
571
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
647
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
648
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
572
649
|
{
|
|
573
650
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
574
651
|
if (!(memberName in newVnodeAttrs)) {
|
|
575
|
-
setAccessor(
|
|
652
|
+
setAccessor(
|
|
653
|
+
elm,
|
|
654
|
+
memberName,
|
|
655
|
+
oldVnodeAttrs[memberName],
|
|
656
|
+
void 0,
|
|
657
|
+
isSvgMode2,
|
|
658
|
+
newVnode.$flags$);
|
|
576
659
|
}
|
|
577
660
|
}
|
|
578
661
|
}
|
|
579
662
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
580
|
-
setAccessor(
|
|
663
|
+
setAccessor(
|
|
664
|
+
elm,
|
|
665
|
+
memberName,
|
|
666
|
+
oldVnodeAttrs[memberName],
|
|
667
|
+
newVnodeAttrs[memberName],
|
|
668
|
+
isSvgMode2,
|
|
669
|
+
newVnode.$flags$);
|
|
581
670
|
}
|
|
582
671
|
};
|
|
583
672
|
function sortedAttrNames(attrNames) {
|
|
@@ -589,16 +678,13 @@ function sortedAttrNames(attrNames) {
|
|
|
589
678
|
attrNames
|
|
590
679
|
);
|
|
591
680
|
}
|
|
592
|
-
|
|
593
|
-
// src/runtime/vdom/vdom-render.ts
|
|
594
|
-
var scopeId;
|
|
595
681
|
var contentRef;
|
|
596
682
|
var hostTagName;
|
|
597
683
|
var useNativeShadowDom = false;
|
|
598
684
|
var checkSlotFallbackVisibility = false;
|
|
599
685
|
var checkSlotRelocate = false;
|
|
600
686
|
var isSvgMode = false;
|
|
601
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
687
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
602
688
|
var _a;
|
|
603
689
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
604
690
|
let i2 = 0;
|
|
@@ -608,9 +694,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
608
694
|
if (!useNativeShadowDom) {
|
|
609
695
|
checkSlotRelocate = true;
|
|
610
696
|
if (newVNode2.$tag$ === "slot") {
|
|
611
|
-
if (scopeId) {
|
|
612
|
-
parentElm.classList.add(scopeId + "-s");
|
|
613
|
-
}
|
|
614
697
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
615
698
|
// slot element has fallback content
|
|
616
699
|
// still create an element that "mocks" the slot element
|
|
@@ -641,14 +724,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
641
724
|
{
|
|
642
725
|
updateElement(null, newVNode2, isSvgMode);
|
|
643
726
|
}
|
|
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
|
-
}
|
|
649
727
|
if (newVNode2.$children$) {
|
|
650
728
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
651
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
729
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
652
730
|
if (childNode) {
|
|
653
731
|
elm.appendChild(childNode);
|
|
654
732
|
}
|
|
@@ -681,7 +759,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
681
759
|
};
|
|
682
760
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
683
761
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
684
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
762
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
685
763
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
686
764
|
let node = parentElm;
|
|
687
765
|
while (node = node.nextSibling) {
|
|
@@ -693,7 +771,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
693
771
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
694
772
|
const childNode = oldSlotChildNodes[i2];
|
|
695
773
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
696
|
-
insertBefore(
|
|
774
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
697
775
|
childNode["s-ol"].remove();
|
|
698
776
|
childNode["s-ol"] = void 0;
|
|
699
777
|
childNode["s-sh"] = void 0;
|
|
@@ -713,7 +791,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
713
791
|
}
|
|
714
792
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
715
793
|
if (vnodes[startIdx]) {
|
|
716
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
794
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
717
795
|
if (childNode) {
|
|
718
796
|
vnodes[startIdx].$elm$ = childNode;
|
|
719
797
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -800,7 +878,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
800
878
|
if (idxInOld >= 0) {
|
|
801
879
|
elmToMove = oldCh[idxInOld];
|
|
802
880
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
803
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
881
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
804
882
|
} else {
|
|
805
883
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
806
884
|
oldCh[idxInOld] = void 0;
|
|
@@ -808,12 +886,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
808
886
|
}
|
|
809
887
|
newStartVnode = newCh[++newStartIdx];
|
|
810
888
|
} else {
|
|
811
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
889
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
812
890
|
newStartVnode = newCh[++newStartIdx];
|
|
813
891
|
}
|
|
814
892
|
if (node) {
|
|
815
893
|
{
|
|
816
|
-
insertBefore(
|
|
894
|
+
insertBefore(
|
|
895
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
896
|
+
node,
|
|
897
|
+
referenceNode(oldStartVnode.$elm$)
|
|
898
|
+
);
|
|
817
899
|
}
|
|
818
900
|
}
|
|
819
901
|
}
|
|
@@ -834,28 +916,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
834
916
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
835
917
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
836
918
|
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
|
-
}
|
|
846
919
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
847
920
|
}
|
|
848
921
|
if (!isInitialRender) {
|
|
849
922
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
850
923
|
}
|
|
924
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
925
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
926
|
+
}
|
|
851
927
|
return true;
|
|
852
928
|
}
|
|
853
929
|
return false;
|
|
854
930
|
};
|
|
855
|
-
var referenceNode = (node) =>
|
|
856
|
-
return node && node["s-ol"] || node;
|
|
857
|
-
};
|
|
858
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
931
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
859
932
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
860
933
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
861
934
|
const oldChildren = oldVNode.$children$;
|
|
@@ -894,41 +967,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
894
967
|
elm.data = text;
|
|
895
968
|
}
|
|
896
969
|
};
|
|
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
|
-
};
|
|
924
970
|
var relocateNodes = [];
|
|
925
971
|
var markSlotContentForRelocation = (elm) => {
|
|
926
972
|
let node;
|
|
927
973
|
let hostContentNodes;
|
|
928
974
|
let j;
|
|
929
|
-
|
|
975
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
976
|
+
for (const childNode of children) {
|
|
930
977
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
931
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
978
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
932
979
|
const slotName = childNode["s-sn"];
|
|
933
980
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
934
981
|
node = hostContentNodes[j];
|
|
@@ -970,21 +1017,6 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
970
1017
|
}
|
|
971
1018
|
}
|
|
972
1019
|
};
|
|
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
|
-
};
|
|
988
1020
|
var nullifyVNodeRefs = (vNode) => {
|
|
989
1021
|
{
|
|
990
1022
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -992,8 +1024,9 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
992
1024
|
}
|
|
993
1025
|
};
|
|
994
1026
|
var insertBefore = (parent, newNode, reference) => {
|
|
995
|
-
|
|
996
|
-
|
|
1027
|
+
{
|
|
1028
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1029
|
+
}
|
|
997
1030
|
};
|
|
998
1031
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
999
1032
|
var _a, _b, _c, _d;
|
|
@@ -1019,9 +1052,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1019
1052
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1020
1053
|
hostRef.$vnode$ = rootVnode;
|
|
1021
1054
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
1022
|
-
{
|
|
1023
|
-
scopeId = hostElm["s-sc"];
|
|
1024
|
-
}
|
|
1025
1055
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1026
1056
|
{
|
|
1027
1057
|
contentRef = hostElm["s-cr"];
|
|
@@ -1050,7 +1080,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1050
1080
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1051
1081
|
while (orgLocationNode) {
|
|
1052
1082
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1053
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1083
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1054
1084
|
refNode = refNode.nextSibling;
|
|
1055
1085
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1056
1086
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1063,13 +1093,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1063
1093
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1064
1094
|
}
|
|
1065
1095
|
}
|
|
1066
|
-
|
|
1096
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1097
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1098
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1067
1099
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1068
1100
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1069
1101
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1070
1102
|
}
|
|
1071
1103
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1072
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1104
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1073
1105
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1074
1106
|
}
|
|
1075
1107
|
}
|
|
@@ -1097,7 +1129,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1097
1129
|
// src/runtime/update-component.ts
|
|
1098
1130
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1099
1131
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1100
|
-
ancestorComponent["s-p"].push(
|
|
1132
|
+
const index = ancestorComponent["s-p"].push(
|
|
1133
|
+
new Promise(
|
|
1134
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1135
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1136
|
+
r();
|
|
1137
|
+
}
|
|
1138
|
+
)
|
|
1139
|
+
);
|
|
1101
1140
|
}
|
|
1102
1141
|
};
|
|
1103
1142
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1126,12 +1165,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1126
1165
|
{
|
|
1127
1166
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1128
1167
|
if (hostRef.$queuedListeners$) {
|
|
1129
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1168
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1130
1169
|
hostRef.$queuedListeners$ = void 0;
|
|
1131
1170
|
}
|
|
1132
1171
|
}
|
|
1133
1172
|
{
|
|
1134
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1173
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1135
1174
|
}
|
|
1136
1175
|
}
|
|
1137
1176
|
endSchedule();
|
|
@@ -1200,7 +1239,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1200
1239
|
const instance = hostRef.$lazyInstance$ ;
|
|
1201
1240
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1202
1241
|
{
|
|
1203
|
-
safeCall(instance, "componentDidRender");
|
|
1242
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1204
1243
|
}
|
|
1205
1244
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1206
1245
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -1234,12 +1273,12 @@ var appDidLoad = (who) => {
|
|
|
1234
1273
|
}
|
|
1235
1274
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1236
1275
|
};
|
|
1237
|
-
var safeCall = (instance, method, arg) => {
|
|
1276
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1238
1277
|
if (instance && instance[method]) {
|
|
1239
1278
|
try {
|
|
1240
1279
|
return instance[method](arg);
|
|
1241
1280
|
} catch (e) {
|
|
1242
|
-
consoleError(e);
|
|
1281
|
+
consoleError(e, elm);
|
|
1243
1282
|
}
|
|
1244
1283
|
}
|
|
1245
1284
|
return void 0;
|
|
@@ -1298,15 +1337,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1298
1337
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1299
1338
|
members.map(([memberName, [memberFlags]]) => {
|
|
1300
1339
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1340
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1341
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1342
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1343
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1344
|
+
Object.defineProperty(prototype, memberName, {
|
|
1345
|
+
get() {
|
|
1346
|
+
{
|
|
1347
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1348
|
+
return getValue(this, memberName);
|
|
1349
|
+
}
|
|
1350
|
+
const ref = getHostRef(this);
|
|
1351
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1352
|
+
if (!instance) return;
|
|
1353
|
+
return instance[memberName];
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
configurable: true,
|
|
1357
|
+
enumerable: true
|
|
1358
|
+
});
|
|
1359
|
+
}
|
|
1301
1360
|
Object.defineProperty(prototype, memberName, {
|
|
1302
|
-
get() {
|
|
1303
|
-
return getValue(this, memberName);
|
|
1304
|
-
},
|
|
1305
1361
|
set(newValue) {
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1362
|
+
const ref = getHostRef(this);
|
|
1363
|
+
if (origSetter) {
|
|
1364
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1365
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1366
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1367
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1368
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1369
|
+
}
|
|
1370
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1371
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1372
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1373
|
+
return;
|
|
1374
|
+
}
|
|
1375
|
+
{
|
|
1376
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1377
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1378
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1379
|
+
ref.$onReadyPromise$.then(() => {
|
|
1380
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1381
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1382
|
+
}
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
return;
|
|
1386
|
+
}
|
|
1387
|
+
const setterSetVal = () => {
|
|
1388
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1389
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1390
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1391
|
+
}
|
|
1392
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1393
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1394
|
+
};
|
|
1395
|
+
if (ref.$lazyInstance$) {
|
|
1396
|
+
setterSetVal();
|
|
1397
|
+
} else {
|
|
1398
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1310
1402
|
});
|
|
1311
1403
|
}
|
|
1312
1404
|
});
|
|
@@ -1316,7 +1408,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1316
1408
|
plt.jmp(() => {
|
|
1317
1409
|
var _a2;
|
|
1318
1410
|
const propName = attrNameToPropName.get(attrName);
|
|
1319
|
-
if (this.hasOwnProperty(propName)) {
|
|
1411
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1320
1412
|
newValue = this[propName];
|
|
1321
1413
|
delete this[propName];
|
|
1322
1414
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1336,7 +1428,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1336
1428
|
}
|
|
1337
1429
|
return;
|
|
1338
1430
|
}
|
|
1339
|
-
|
|
1431
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1432
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1433
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1434
|
+
this[propName] = newValue;
|
|
1435
|
+
}
|
|
1340
1436
|
});
|
|
1341
1437
|
};
|
|
1342
1438
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1363,9 +1459,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1363
1459
|
let Cstr;
|
|
1364
1460
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1365
1461
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1462
|
+
{
|
|
1463
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1369
1464
|
if (CstrImport && "then" in CstrImport) {
|
|
1370
1465
|
const endLoad = uniqueTime();
|
|
1371
1466
|
Cstr = await CstrImport;
|
|
@@ -1390,7 +1485,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1390
1485
|
try {
|
|
1391
1486
|
new Cstr(hostRef);
|
|
1392
1487
|
} catch (e) {
|
|
1393
|
-
consoleError(e);
|
|
1488
|
+
consoleError(e, elm);
|
|
1394
1489
|
}
|
|
1395
1490
|
{
|
|
1396
1491
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1399,10 +1494,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1399
1494
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1400
1495
|
}
|
|
1401
1496
|
endNewInstance();
|
|
1402
|
-
} else {
|
|
1403
|
-
Cstr = elm.constructor;
|
|
1404
|
-
const cmpTag = elm.localName;
|
|
1405
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1406
1497
|
}
|
|
1407
1498
|
if (Cstr && Cstr.style) {
|
|
1408
1499
|
let style;
|
|
@@ -1425,7 +1516,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1425
1516
|
schedule();
|
|
1426
1517
|
}
|
|
1427
1518
|
};
|
|
1428
|
-
var fireConnectedCallback = (instance) => {
|
|
1519
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1429
1520
|
};
|
|
1430
1521
|
|
|
1431
1522
|
// src/runtime/connected-callback.ts
|
|
@@ -1479,7 +1570,7 @@ var setContentReference = (elm) => {
|
|
|
1479
1570
|
contentRefElm["s-cn"] = true;
|
|
1480
1571
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1481
1572
|
};
|
|
1482
|
-
var disconnectInstance = (instance) => {
|
|
1573
|
+
var disconnectInstance = (instance, elm) => {
|
|
1483
1574
|
};
|
|
1484
1575
|
var disconnectedCallback = async (elm) => {
|
|
1485
1576
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1494,6 +1585,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1494
1585
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1495
1586
|
}
|
|
1496
1587
|
}
|
|
1588
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1589
|
+
rootAppliedStyles.delete(elm);
|
|
1590
|
+
}
|
|
1591
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1592
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1593
|
+
}
|
|
1497
1594
|
};
|
|
1498
1595
|
|
|
1499
1596
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1578,6 +1675,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1578
1675
|
}
|
|
1579
1676
|
disconnectedCallback() {
|
|
1580
1677
|
plt.jmp(() => disconnectedCallback(this));
|
|
1678
|
+
plt.raf(() => {
|
|
1679
|
+
var _a3;
|
|
1680
|
+
const hostRef = getHostRef(this);
|
|
1681
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1682
|
+
delete hostRef.$vnode$.$elm$;
|
|
1683
|
+
}
|
|
1684
|
+
});
|
|
1581
1685
|
}
|
|
1582
1686
|
componentOnReady() {
|
|
1583
1687
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1644,7 +1748,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1644
1748
|
}
|
|
1645
1749
|
}
|
|
1646
1750
|
} catch (e) {
|
|
1647
|
-
consoleError(e);
|
|
1751
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1648
1752
|
}
|
|
1649
1753
|
};
|
|
1650
1754
|
var getHostListenerTarget = (elm, flags) => {
|