@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
|
@@ -21,19 +21,27 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'gamification-dropdown';
|
|
24
|
-
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 };
|
|
24
|
+
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 };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.25.1 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
+
|
|
35
|
+
// src/utils/constants.ts
|
|
36
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
37
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
38
|
+
|
|
39
|
+
// src/client/client-host-ref.ts
|
|
34
40
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
35
41
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
36
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
42
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
43
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
44
|
+
};
|
|
37
45
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
46
|
const hostRef = {
|
|
39
47
|
$flags$: 0,
|
|
@@ -46,7 +54,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
54
|
hostElement["s-p"] = [];
|
|
47
55
|
hostElement["s-rc"] = [];
|
|
48
56
|
}
|
|
49
|
-
|
|
57
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
58
|
+
return ref;
|
|
50
59
|
};
|
|
51
60
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
61
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -91,16 +100,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
91
100
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
92
101
|
/* webpackMode: "lazy" */
|
|
93
102
|
`./${bundleId}.entry.js${""}`
|
|
94
|
-
)); }).then(
|
|
95
|
-
{
|
|
96
|
-
|
|
103
|
+
)); }).then(
|
|
104
|
+
(importedModule) => {
|
|
105
|
+
{
|
|
106
|
+
cmpModules.set(bundleId, importedModule);
|
|
107
|
+
}
|
|
108
|
+
return importedModule[exportName];
|
|
109
|
+
},
|
|
110
|
+
(e) => {
|
|
111
|
+
consoleError(e, hostRef.$hostElement$);
|
|
97
112
|
}
|
|
98
|
-
|
|
99
|
-
}, consoleError);
|
|
113
|
+
);
|
|
100
114
|
};
|
|
101
115
|
|
|
102
116
|
// src/client/client-style.ts
|
|
103
117
|
var styles = /* @__PURE__ */ new Map();
|
|
118
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
104
119
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
105
120
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
106
121
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -180,14 +195,6 @@ var getAssetPath = (path) => {
|
|
|
180
195
|
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
181
196
|
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
182
197
|
};
|
|
183
|
-
|
|
184
|
-
// src/utils/constants.ts
|
|
185
|
-
var EMPTY_OBJ = {};
|
|
186
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
187
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
188
|
-
|
|
189
|
-
// src/utils/helpers.ts
|
|
190
|
-
var isDef = (v) => v != null;
|
|
191
198
|
var isComplexType = (o) => {
|
|
192
199
|
o = typeof o;
|
|
193
200
|
return o === "object" || o === "function";
|
|
@@ -247,6 +254,63 @@ var unwrapErr = (result) => {
|
|
|
247
254
|
throw result.value;
|
|
248
255
|
}
|
|
249
256
|
};
|
|
257
|
+
var updateFallbackSlotVisibility = (elm) => {
|
|
258
|
+
const childNodes = elm.__childNodes || elm.childNodes;
|
|
259
|
+
if (elm.tagName && elm.tagName.includes("-") && elm["s-cr"] && elm.tagName !== "SLOT-FB") {
|
|
260
|
+
getHostSlotNodes(childNodes, elm.tagName).forEach((slotNode) => {
|
|
261
|
+
var _a;
|
|
262
|
+
if (slotNode.nodeType === 1 /* ElementNode */ && slotNode.tagName === "SLOT-FB") {
|
|
263
|
+
if ((_a = getHostSlotChildNodes(slotNode, slotNode["s-sn"], false)) == null ? void 0 : _a.length) {
|
|
264
|
+
slotNode.hidden = true;
|
|
265
|
+
} else {
|
|
266
|
+
slotNode.hidden = false;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
for (const childNode of childNodes) {
|
|
272
|
+
if (childNode.nodeType === 1 /* ElementNode */ && (childNode.__childNodes || childNode.childNodes).length) {
|
|
273
|
+
updateFallbackSlotVisibility(childNode);
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
};
|
|
277
|
+
function getHostSlotNodes(childNodes, hostName, slotName) {
|
|
278
|
+
let i2 = 0;
|
|
279
|
+
let slottedNodes = [];
|
|
280
|
+
let childNode;
|
|
281
|
+
for (; i2 < childNodes.length; i2++) {
|
|
282
|
+
childNode = childNodes[i2];
|
|
283
|
+
if (childNode["s-sr"] && childNode["s-hn"] === hostName && (slotName === void 0 || childNode["s-sn"] === slotName)) {
|
|
284
|
+
slottedNodes.push(childNode);
|
|
285
|
+
if (typeof slotName !== "undefined") return slottedNodes;
|
|
286
|
+
}
|
|
287
|
+
slottedNodes = [...slottedNodes, ...getHostSlotNodes(childNode.childNodes, hostName, slotName)];
|
|
288
|
+
}
|
|
289
|
+
return slottedNodes;
|
|
290
|
+
}
|
|
291
|
+
var getHostSlotChildNodes = (node, slotName, includeSlot = true) => {
|
|
292
|
+
const childNodes = [];
|
|
293
|
+
if (includeSlot && node["s-sr"] || !node["s-sr"]) childNodes.push(node);
|
|
294
|
+
while ((node = node.nextSibling) && node["s-sn"] === slotName) {
|
|
295
|
+
childNodes.push(node);
|
|
296
|
+
}
|
|
297
|
+
return childNodes;
|
|
298
|
+
};
|
|
299
|
+
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
300
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
301
|
+
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
302
|
+
return true;
|
|
303
|
+
}
|
|
304
|
+
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
305
|
+
return true;
|
|
306
|
+
}
|
|
307
|
+
return false;
|
|
308
|
+
}
|
|
309
|
+
if (nodeToRelocate["s-sn"] === slotName) {
|
|
310
|
+
return true;
|
|
311
|
+
}
|
|
312
|
+
return slotName === "";
|
|
313
|
+
};
|
|
250
314
|
var createTime = (fnName, tagName = "") => {
|
|
251
315
|
{
|
|
252
316
|
return () => {
|
|
@@ -432,7 +496,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
432
496
|
}
|
|
433
497
|
if (!appliedStyles.has(scopeId2)) {
|
|
434
498
|
{
|
|
435
|
-
styleElm = doc.createElement("style");
|
|
499
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
436
500
|
styleElm.innerHTML = style;
|
|
437
501
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
438
502
|
if (nonce != null) {
|
|
@@ -442,7 +506,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
442
506
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
443
507
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
444
508
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
445
|
-
styleContainerNode.insertBefore(
|
|
509
|
+
styleContainerNode.insertBefore(
|
|
510
|
+
styleElm,
|
|
511
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
512
|
+
);
|
|
446
513
|
} else if ("host" in styleContainerNode) {
|
|
447
514
|
if (supportsConstructableStylesheets) {
|
|
448
515
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -492,16 +559,18 @@ var attachStyles = (hostRef) => {
|
|
|
492
559
|
endAttachStyles();
|
|
493
560
|
};
|
|
494
561
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
495
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
562
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
496
563
|
if (oldValue !== newValue) {
|
|
497
564
|
let isProp = isMemberInElement(elm, memberName);
|
|
498
565
|
let ln = memberName.toLowerCase();
|
|
499
566
|
if (memberName === "class") {
|
|
500
567
|
const classList = elm.classList;
|
|
501
568
|
const oldClasses = parseClassList(oldValue);
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
569
|
+
let newClasses = parseClassList(newValue);
|
|
570
|
+
{
|
|
571
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
572
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
573
|
+
}
|
|
505
574
|
} else if (memberName === "style") {
|
|
506
575
|
{
|
|
507
576
|
for (const prop in oldValue) {
|
|
@@ -560,7 +629,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
560
629
|
elm.setAttribute(memberName, n);
|
|
561
630
|
}
|
|
562
631
|
}
|
|
563
|
-
} else {
|
|
632
|
+
} else if (elm[memberName] !== newValue) {
|
|
564
633
|
elm[memberName] = newValue;
|
|
565
634
|
}
|
|
566
635
|
} catch (e) {
|
|
@@ -582,24 +651,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
582
651
|
}
|
|
583
652
|
};
|
|
584
653
|
var parseClassListRegex = /\s/;
|
|
585
|
-
var parseClassList = (value) =>
|
|
654
|
+
var parseClassList = (value) => {
|
|
655
|
+
if (typeof value === "object" && value && "baseVal" in value) {
|
|
656
|
+
value = value.baseVal;
|
|
657
|
+
}
|
|
658
|
+
if (!value || typeof value !== "string") {
|
|
659
|
+
return [];
|
|
660
|
+
}
|
|
661
|
+
return value.split(parseClassListRegex);
|
|
662
|
+
};
|
|
586
663
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
587
664
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
588
665
|
|
|
589
666
|
// src/runtime/vdom/update-element.ts
|
|
590
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
667
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
591
668
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
592
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
593
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
669
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
670
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
594
671
|
{
|
|
595
672
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
596
673
|
if (!(memberName in newVnodeAttrs)) {
|
|
597
|
-
setAccessor(
|
|
674
|
+
setAccessor(
|
|
675
|
+
elm,
|
|
676
|
+
memberName,
|
|
677
|
+
oldVnodeAttrs[memberName],
|
|
678
|
+
void 0,
|
|
679
|
+
isSvgMode2,
|
|
680
|
+
newVnode.$flags$);
|
|
598
681
|
}
|
|
599
682
|
}
|
|
600
683
|
}
|
|
601
684
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
602
|
-
setAccessor(
|
|
685
|
+
setAccessor(
|
|
686
|
+
elm,
|
|
687
|
+
memberName,
|
|
688
|
+
oldVnodeAttrs[memberName],
|
|
689
|
+
newVnodeAttrs[memberName],
|
|
690
|
+
isSvgMode2,
|
|
691
|
+
newVnode.$flags$);
|
|
603
692
|
}
|
|
604
693
|
};
|
|
605
694
|
function sortedAttrNames(attrNames) {
|
|
@@ -611,16 +700,13 @@ function sortedAttrNames(attrNames) {
|
|
|
611
700
|
attrNames
|
|
612
701
|
);
|
|
613
702
|
}
|
|
614
|
-
|
|
615
|
-
// src/runtime/vdom/vdom-render.ts
|
|
616
|
-
var scopeId;
|
|
617
703
|
var contentRef;
|
|
618
704
|
var hostTagName;
|
|
619
705
|
var useNativeShadowDom = false;
|
|
620
706
|
var checkSlotFallbackVisibility = false;
|
|
621
707
|
var checkSlotRelocate = false;
|
|
622
708
|
var isSvgMode = false;
|
|
623
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
709
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
624
710
|
var _a;
|
|
625
711
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
626
712
|
let i2 = 0;
|
|
@@ -630,9 +716,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
630
716
|
if (!useNativeShadowDom) {
|
|
631
717
|
checkSlotRelocate = true;
|
|
632
718
|
if (newVNode2.$tag$ === "slot") {
|
|
633
|
-
if (scopeId) {
|
|
634
|
-
parentElm.classList.add(scopeId + "-s");
|
|
635
|
-
}
|
|
636
719
|
newVNode2.$flags$ |= newVNode2.$children$ ? (
|
|
637
720
|
// slot element has fallback content
|
|
638
721
|
// still create an element that "mocks" the slot element
|
|
@@ -663,14 +746,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
663
746
|
{
|
|
664
747
|
updateElement(null, newVNode2, isSvgMode);
|
|
665
748
|
}
|
|
666
|
-
const rootNode = elm.getRootNode();
|
|
667
|
-
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
668
|
-
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
669
|
-
elm.classList.add(elm["s-si"] = scopeId);
|
|
670
|
-
}
|
|
671
749
|
if (newVNode2.$children$) {
|
|
672
750
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
673
|
-
childNode = createElm(oldParentVNode, newVNode2, i2
|
|
751
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
674
752
|
if (childNode) {
|
|
675
753
|
elm.appendChild(childNode);
|
|
676
754
|
}
|
|
@@ -703,7 +781,7 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
703
781
|
};
|
|
704
782
|
var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
705
783
|
plt.$flags$ |= 1 /* isTmpDisconnected */;
|
|
706
|
-
const oldSlotChildNodes = Array.from(parentElm.childNodes);
|
|
784
|
+
const oldSlotChildNodes = Array.from(parentElm.__childNodes || parentElm.childNodes);
|
|
707
785
|
if (parentElm["s-sr"] && BUILD.experimentalSlotFixes) {
|
|
708
786
|
let node = parentElm;
|
|
709
787
|
while (node = node.nextSibling) {
|
|
@@ -715,7 +793,7 @@ var putBackInOriginalLocation = (parentElm, recursive) => {
|
|
|
715
793
|
for (let i2 = oldSlotChildNodes.length - 1; i2 >= 0; i2--) {
|
|
716
794
|
const childNode = oldSlotChildNodes[i2];
|
|
717
795
|
if (childNode["s-hn"] !== hostTagName && childNode["s-ol"]) {
|
|
718
|
-
insertBefore(
|
|
796
|
+
insertBefore(referenceNode(childNode).parentNode, childNode, referenceNode(childNode));
|
|
719
797
|
childNode["s-ol"].remove();
|
|
720
798
|
childNode["s-ol"] = void 0;
|
|
721
799
|
childNode["s-sh"] = void 0;
|
|
@@ -735,7 +813,7 @@ var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
|
735
813
|
}
|
|
736
814
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
737
815
|
if (vnodes[startIdx]) {
|
|
738
|
-
childNode = createElm(null, parentVNode, startIdx
|
|
816
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
739
817
|
if (childNode) {
|
|
740
818
|
vnodes[startIdx].$elm$ = childNode;
|
|
741
819
|
insertBefore(containerElm, childNode, referenceNode(before) );
|
|
@@ -822,7 +900,7 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
822
900
|
if (idxInOld >= 0) {
|
|
823
901
|
elmToMove = oldCh[idxInOld];
|
|
824
902
|
if (elmToMove.$tag$ !== newStartVnode.$tag$) {
|
|
825
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld
|
|
903
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
826
904
|
} else {
|
|
827
905
|
patch(elmToMove, newStartVnode, isInitialRender);
|
|
828
906
|
oldCh[idxInOld] = void 0;
|
|
@@ -830,12 +908,16 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
830
908
|
}
|
|
831
909
|
newStartVnode = newCh[++newStartIdx];
|
|
832
910
|
} else {
|
|
833
|
-
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx
|
|
911
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
834
912
|
newStartVnode = newCh[++newStartIdx];
|
|
835
913
|
}
|
|
836
914
|
if (node) {
|
|
837
915
|
{
|
|
838
|
-
insertBefore(
|
|
916
|
+
insertBefore(
|
|
917
|
+
referenceNode(oldStartVnode.$elm$).parentNode,
|
|
918
|
+
node,
|
|
919
|
+
referenceNode(oldStartVnode.$elm$)
|
|
920
|
+
);
|
|
839
921
|
}
|
|
840
922
|
}
|
|
841
923
|
}
|
|
@@ -856,28 +938,19 @@ var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = fals
|
|
|
856
938
|
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
857
939
|
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
858
940
|
if (leftVNode.$tag$ === "slot") {
|
|
859
|
-
if (
|
|
860
|
-
// The component gets hydrated and no VDOM has been initialized.
|
|
861
|
-
// Here the comparison can't happen as $name$ property is not set for `leftNode`.
|
|
862
|
-
"$nodeId$" in leftVNode && isInitialRender && // `leftNode` is not from type HTMLComment which would cause many
|
|
863
|
-
// hydration comments to be removed
|
|
864
|
-
leftVNode.$elm$.nodeType !== 8
|
|
865
|
-
) {
|
|
866
|
-
return false;
|
|
867
|
-
}
|
|
868
941
|
return leftVNode.$name$ === rightVNode.$name$;
|
|
869
942
|
}
|
|
870
943
|
if (!isInitialRender) {
|
|
871
944
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
872
945
|
}
|
|
946
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
947
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
948
|
+
}
|
|
873
949
|
return true;
|
|
874
950
|
}
|
|
875
951
|
return false;
|
|
876
952
|
};
|
|
877
|
-
var referenceNode = (node) =>
|
|
878
|
-
return node && node["s-ol"] || node;
|
|
879
|
-
};
|
|
880
|
-
var parentReferenceNode = (node) => (node["s-ol"] ? node["s-ol"] : node).parentNode;
|
|
953
|
+
var referenceNode = (node) => node && node["s-ol"] || node;
|
|
881
954
|
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
882
955
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
883
956
|
const oldChildren = oldVNode.$children$;
|
|
@@ -916,41 +989,15 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
916
989
|
elm.data = text;
|
|
917
990
|
}
|
|
918
991
|
};
|
|
919
|
-
var updateFallbackSlotVisibility = (elm) => {
|
|
920
|
-
const childNodes = elm.childNodes;
|
|
921
|
-
for (const childNode of childNodes) {
|
|
922
|
-
if (childNode.nodeType === 1 /* ElementNode */) {
|
|
923
|
-
if (childNode["s-sr"]) {
|
|
924
|
-
const slotName = childNode["s-sn"];
|
|
925
|
-
childNode.hidden = false;
|
|
926
|
-
for (const siblingNode of childNodes) {
|
|
927
|
-
if (siblingNode !== childNode) {
|
|
928
|
-
if (siblingNode["s-hn"] !== childNode["s-hn"] || slotName !== "") {
|
|
929
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ && (slotName === siblingNode.getAttribute("slot") || slotName === siblingNode["s-sn"]) || siblingNode.nodeType === 3 /* TextNode */ && slotName === siblingNode["s-sn"]) {
|
|
930
|
-
childNode.hidden = true;
|
|
931
|
-
break;
|
|
932
|
-
}
|
|
933
|
-
} else {
|
|
934
|
-
if (siblingNode.nodeType === 1 /* ElementNode */ || siblingNode.nodeType === 3 /* TextNode */ && siblingNode.textContent.trim() !== "") {
|
|
935
|
-
childNode.hidden = true;
|
|
936
|
-
break;
|
|
937
|
-
}
|
|
938
|
-
}
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
updateFallbackSlotVisibility(childNode);
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
};
|
|
946
992
|
var relocateNodes = [];
|
|
947
993
|
var markSlotContentForRelocation = (elm) => {
|
|
948
994
|
let node;
|
|
949
995
|
let hostContentNodes;
|
|
950
996
|
let j;
|
|
951
|
-
|
|
997
|
+
const children = elm.__childNodes || elm.childNodes;
|
|
998
|
+
for (const childNode of children) {
|
|
952
999
|
if (childNode["s-sr"] && (node = childNode["s-cr"]) && node.parentNode) {
|
|
953
|
-
hostContentNodes = node.parentNode.childNodes;
|
|
1000
|
+
hostContentNodes = node.parentNode.__childNodes || node.parentNode.childNodes;
|
|
954
1001
|
const slotName = childNode["s-sn"];
|
|
955
1002
|
for (j = hostContentNodes.length - 1; j >= 0; j--) {
|
|
956
1003
|
node = hostContentNodes[j];
|
|
@@ -992,21 +1039,6 @@ var markSlotContentForRelocation = (elm) => {
|
|
|
992
1039
|
}
|
|
993
1040
|
}
|
|
994
1041
|
};
|
|
995
|
-
var isNodeLocatedInSlot = (nodeToRelocate, slotName) => {
|
|
996
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
997
|
-
if (nodeToRelocate.getAttribute("slot") === null && slotName === "") {
|
|
998
|
-
return true;
|
|
999
|
-
}
|
|
1000
|
-
if (nodeToRelocate.getAttribute("slot") === slotName) {
|
|
1001
|
-
return true;
|
|
1002
|
-
}
|
|
1003
|
-
return false;
|
|
1004
|
-
}
|
|
1005
|
-
if (nodeToRelocate["s-sn"] === slotName) {
|
|
1006
|
-
return true;
|
|
1007
|
-
}
|
|
1008
|
-
return slotName === "";
|
|
1009
|
-
};
|
|
1010
1042
|
var nullifyVNodeRefs = (vNode) => {
|
|
1011
1043
|
{
|
|
1012
1044
|
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
@@ -1014,8 +1046,9 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
1014
1046
|
}
|
|
1015
1047
|
};
|
|
1016
1048
|
var insertBefore = (parent, newNode, reference) => {
|
|
1017
|
-
|
|
1018
|
-
|
|
1049
|
+
{
|
|
1050
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1051
|
+
}
|
|
1019
1052
|
};
|
|
1020
1053
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1021
1054
|
var _a, _b, _c, _d;
|
|
@@ -1041,9 +1074,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1041
1074
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
1042
1075
|
hostRef.$vnode$ = rootVnode;
|
|
1043
1076
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
1044
|
-
{
|
|
1045
|
-
scopeId = hostElm["s-sc"];
|
|
1046
|
-
}
|
|
1047
1077
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
1048
1078
|
{
|
|
1049
1079
|
contentRef = hostElm["s-cr"];
|
|
@@ -1072,7 +1102,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1072
1102
|
let orgLocationNode = (_a = nodeToRelocate["s-ol"]) == null ? void 0 : _a.previousSibling;
|
|
1073
1103
|
while (orgLocationNode) {
|
|
1074
1104
|
let refNode = (_b = orgLocationNode["s-nr"]) != null ? _b : null;
|
|
1075
|
-
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === refNode.parentNode) {
|
|
1105
|
+
if (refNode && refNode["s-sn"] === nodeToRelocate["s-sn"] && parentNodeRef === (refNode.__parentNode || refNode.parentNode)) {
|
|
1076
1106
|
refNode = refNode.nextSibling;
|
|
1077
1107
|
while (refNode === nodeToRelocate || (refNode == null ? void 0 : refNode["s-sr"])) {
|
|
1078
1108
|
refNode = refNode == null ? void 0 : refNode.nextSibling;
|
|
@@ -1085,13 +1115,15 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1085
1115
|
orgLocationNode = orgLocationNode.previousSibling;
|
|
1086
1116
|
}
|
|
1087
1117
|
}
|
|
1088
|
-
|
|
1118
|
+
const parent = nodeToRelocate.__parentNode || nodeToRelocate.parentNode;
|
|
1119
|
+
const nextSibling = nodeToRelocate.__nextSibling || nodeToRelocate.nextSibling;
|
|
1120
|
+
if (!insertBeforeNode && parentNodeRef !== parent || nextSibling !== insertBeforeNode) {
|
|
1089
1121
|
if (nodeToRelocate !== insertBeforeNode) {
|
|
1090
1122
|
if (!nodeToRelocate["s-hn"] && nodeToRelocate["s-ol"]) {
|
|
1091
1123
|
nodeToRelocate["s-hn"] = nodeToRelocate["s-ol"].parentNode.nodeName;
|
|
1092
1124
|
}
|
|
1093
1125
|
insertBefore(parentNodeRef, nodeToRelocate, insertBeforeNode);
|
|
1094
|
-
if (nodeToRelocate.nodeType === 1 /* ElementNode */) {
|
|
1126
|
+
if (nodeToRelocate.nodeType === 1 /* ElementNode */ && nodeToRelocate.tagName !== "SLOT-FB") {
|
|
1095
1127
|
nodeToRelocate.hidden = (_c = nodeToRelocate["s-ih"]) != null ? _c : false;
|
|
1096
1128
|
}
|
|
1097
1129
|
}
|
|
@@ -1119,7 +1151,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
1119
1151
|
// src/runtime/update-component.ts
|
|
1120
1152
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1121
1153
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1122
|
-
ancestorComponent["s-p"].push(
|
|
1154
|
+
const index = ancestorComponent["s-p"].push(
|
|
1155
|
+
new Promise(
|
|
1156
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
1157
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1158
|
+
r();
|
|
1159
|
+
}
|
|
1160
|
+
)
|
|
1161
|
+
);
|
|
1123
1162
|
}
|
|
1124
1163
|
};
|
|
1125
1164
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -1148,12 +1187,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
1148
1187
|
{
|
|
1149
1188
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
1150
1189
|
if (hostRef.$queuedListeners$) {
|
|
1151
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
1190
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
1152
1191
|
hostRef.$queuedListeners$ = void 0;
|
|
1153
1192
|
}
|
|
1154
1193
|
}
|
|
1155
1194
|
{
|
|
1156
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
1195
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1157
1196
|
}
|
|
1158
1197
|
}
|
|
1159
1198
|
endSchedule();
|
|
@@ -1222,7 +1261,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
1222
1261
|
const instance = hostRef.$lazyInstance$ ;
|
|
1223
1262
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1224
1263
|
{
|
|
1225
|
-
safeCall(instance, "componentDidRender");
|
|
1264
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1226
1265
|
}
|
|
1227
1266
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
1228
1267
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -1256,12 +1295,12 @@ var appDidLoad = (who) => {
|
|
|
1256
1295
|
}
|
|
1257
1296
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1258
1297
|
};
|
|
1259
|
-
var safeCall = (instance, method, arg) => {
|
|
1298
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1260
1299
|
if (instance && instance[method]) {
|
|
1261
1300
|
try {
|
|
1262
1301
|
return instance[method](arg);
|
|
1263
1302
|
} catch (e) {
|
|
1264
|
-
consoleError(e);
|
|
1303
|
+
consoleError(e, elm);
|
|
1265
1304
|
}
|
|
1266
1305
|
}
|
|
1267
1306
|
return void 0;
|
|
@@ -1320,15 +1359,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1320
1359
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1321
1360
|
members.map(([memberName, [memberFlags]]) => {
|
|
1322
1361
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1362
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1363
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1364
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1365
|
+
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1366
|
+
Object.defineProperty(prototype, memberName, {
|
|
1367
|
+
get() {
|
|
1368
|
+
{
|
|
1369
|
+
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1370
|
+
return getValue(this, memberName);
|
|
1371
|
+
}
|
|
1372
|
+
const ref = getHostRef(this);
|
|
1373
|
+
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1374
|
+
if (!instance) return;
|
|
1375
|
+
return instance[memberName];
|
|
1376
|
+
}
|
|
1377
|
+
},
|
|
1378
|
+
configurable: true,
|
|
1379
|
+
enumerable: true
|
|
1380
|
+
});
|
|
1381
|
+
}
|
|
1323
1382
|
Object.defineProperty(prototype, memberName, {
|
|
1324
|
-
get() {
|
|
1325
|
-
return getValue(this, memberName);
|
|
1326
|
-
},
|
|
1327
1383
|
set(newValue) {
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1384
|
+
const ref = getHostRef(this);
|
|
1385
|
+
if (origSetter) {
|
|
1386
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1387
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
1388
|
+
newValue = ref.$instanceValues$.get(memberName);
|
|
1389
|
+
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1390
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1391
|
+
}
|
|
1392
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1393
|
+
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1394
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1395
|
+
return;
|
|
1396
|
+
}
|
|
1397
|
+
{
|
|
1398
|
+
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1399
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1400
|
+
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1401
|
+
ref.$onReadyPromise$.then(() => {
|
|
1402
|
+
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1403
|
+
ref.$lazyInstance$[memberName] = newValue;
|
|
1404
|
+
}
|
|
1405
|
+
});
|
|
1406
|
+
}
|
|
1407
|
+
return;
|
|
1408
|
+
}
|
|
1409
|
+
const setterSetVal = () => {
|
|
1410
|
+
const currentValue = ref.$lazyInstance$[memberName];
|
|
1411
|
+
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1412
|
+
ref.$instanceValues$.set(memberName, currentValue);
|
|
1413
|
+
}
|
|
1414
|
+
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1415
|
+
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1416
|
+
};
|
|
1417
|
+
if (ref.$lazyInstance$) {
|
|
1418
|
+
setterSetVal();
|
|
1419
|
+
} else {
|
|
1420
|
+
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1332
1424
|
});
|
|
1333
1425
|
}
|
|
1334
1426
|
});
|
|
@@ -1338,7 +1430,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1338
1430
|
plt.jmp(() => {
|
|
1339
1431
|
var _a2;
|
|
1340
1432
|
const propName = attrNameToPropName.get(attrName);
|
|
1341
|
-
if (this.hasOwnProperty(propName)) {
|
|
1433
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
1342
1434
|
newValue = this[propName];
|
|
1343
1435
|
delete this[propName];
|
|
1344
1436
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1358,7 +1450,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1358
1450
|
}
|
|
1359
1451
|
return;
|
|
1360
1452
|
}
|
|
1361
|
-
|
|
1453
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1454
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1455
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1456
|
+
this[propName] = newValue;
|
|
1457
|
+
}
|
|
1362
1458
|
});
|
|
1363
1459
|
};
|
|
1364
1460
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1385,9 +1481,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1385
1481
|
let Cstr;
|
|
1386
1482
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1387
1483
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1484
|
+
{
|
|
1485
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1391
1486
|
if (CstrImport && "then" in CstrImport) {
|
|
1392
1487
|
const endLoad = uniqueTime();
|
|
1393
1488
|
Cstr = await CstrImport;
|
|
@@ -1412,7 +1507,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1412
1507
|
try {
|
|
1413
1508
|
new Cstr(hostRef);
|
|
1414
1509
|
} catch (e) {
|
|
1415
|
-
consoleError(e);
|
|
1510
|
+
consoleError(e, elm);
|
|
1416
1511
|
}
|
|
1417
1512
|
{
|
|
1418
1513
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1421,10 +1516,6 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1421
1516
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1422
1517
|
}
|
|
1423
1518
|
endNewInstance();
|
|
1424
|
-
} else {
|
|
1425
|
-
Cstr = elm.constructor;
|
|
1426
|
-
const cmpTag = elm.localName;
|
|
1427
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1428
1519
|
}
|
|
1429
1520
|
if (Cstr && Cstr.style) {
|
|
1430
1521
|
let style;
|
|
@@ -1447,7 +1538,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1447
1538
|
schedule();
|
|
1448
1539
|
}
|
|
1449
1540
|
};
|
|
1450
|
-
var fireConnectedCallback = (instance) => {
|
|
1541
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1451
1542
|
};
|
|
1452
1543
|
|
|
1453
1544
|
// src/runtime/connected-callback.ts
|
|
@@ -1501,7 +1592,7 @@ var setContentReference = (elm) => {
|
|
|
1501
1592
|
contentRefElm["s-cn"] = true;
|
|
1502
1593
|
insertBefore(elm, contentRefElm, elm.firstChild);
|
|
1503
1594
|
};
|
|
1504
|
-
var disconnectInstance = (instance) => {
|
|
1595
|
+
var disconnectInstance = (instance, elm) => {
|
|
1505
1596
|
};
|
|
1506
1597
|
var disconnectedCallback = async (elm) => {
|
|
1507
1598
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1516,6 +1607,12 @@ var disconnectedCallback = async (elm) => {
|
|
|
1516
1607
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1517
1608
|
}
|
|
1518
1609
|
}
|
|
1610
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1611
|
+
rootAppliedStyles.delete(elm);
|
|
1612
|
+
}
|
|
1613
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1614
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1615
|
+
}
|
|
1519
1616
|
};
|
|
1520
1617
|
|
|
1521
1618
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1600,6 +1697,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1600
1697
|
}
|
|
1601
1698
|
disconnectedCallback() {
|
|
1602
1699
|
plt.jmp(() => disconnectedCallback(this));
|
|
1700
|
+
plt.raf(() => {
|
|
1701
|
+
var _a3;
|
|
1702
|
+
const hostRef = getHostRef(this);
|
|
1703
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1704
|
+
delete hostRef.$vnode$.$elm$;
|
|
1705
|
+
}
|
|
1706
|
+
});
|
|
1603
1707
|
}
|
|
1604
1708
|
componentOnReady() {
|
|
1605
1709
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1666,7 +1770,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1666
1770
|
}
|
|
1667
1771
|
}
|
|
1668
1772
|
} catch (e) {
|
|
1669
|
-
consoleError(e);
|
|
1773
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1670
1774
|
}
|
|
1671
1775
|
};
|
|
1672
1776
|
var getHostListenerTarget = (elm, flags) => {
|