@everymatrix/lottery-grid 1.56.0 → 1.56.3
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/{index-0019f59e.js → index-066eab2b.js} +71 -206
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/lottery-bullet_2.cjs.entry.js +25 -90
- package/dist/cjs/lottery-grid.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/lottery-grid/lottery-grid.js +17 -102
- package/dist/esm/{index-a4a45d0f.js → index-14a3a545.js} +71 -206
- package/dist/esm/loader.js +2 -2
- package/dist/esm/lottery-bullet_2.entry.js +25 -90
- package/dist/esm/lottery-grid.js +3 -3
- package/dist/lottery-grid/lottery-grid.esm.js +1 -1
- package/dist/lottery-grid/p-4d88680c.js +2 -0
- package/dist/lottery-grid/p-ae93dcaf.entry.js +1 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/lottery-grid/.stencil/packages/stencil/lottery-grid/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/lottery-grid/.stencil/packages/stencil/lottery-grid/stencil.config.dev.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +0 -6
- package/package.json +1 -1
- package/dist/lottery-grid/p-7ec64ea7.entry.js +0 -1
- package/dist/lottery-grid/p-eee776b4.js +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-grid/.stencil/packages/stencil/lottery-grid/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/lottery-grid/.stencil/packages/stencil/lottery-grid/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/lottery-grid/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/lottery-grid/.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/lottery-grid/.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/lottery-grid/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -21,23 +21,19 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'lottery-grid';
|
|
24
|
-
const BUILD = /* lottery-grid */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, 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: true, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false,
|
|
24
|
+
const BUILD = /* lottery-grid */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, 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: true, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.19.2 | 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/client/client-host-ref.ts
|
|
36
34
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
37
35
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
38
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
39
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
40
|
-
};
|
|
36
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
41
37
|
var registerHost = (hostElement, cmpMeta) => {
|
|
42
38
|
const hostRef = {
|
|
43
39
|
$flags$: 0,
|
|
@@ -50,8 +46,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
50
46
|
hostElement["s-p"] = [];
|
|
51
47
|
hostElement["s-rc"] = [];
|
|
52
48
|
}
|
|
53
|
-
|
|
54
|
-
return ref;
|
|
49
|
+
return hostRefs.set(hostElement, hostRef);
|
|
55
50
|
};
|
|
56
51
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
57
52
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -88,22 +83,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
88
83
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
89
84
|
/* webpackMode: "lazy" */
|
|
90
85
|
`./${bundleId}.entry.js${""}`
|
|
91
|
-
)); }).then(
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
cmpModules.set(bundleId, importedModule);
|
|
95
|
-
}
|
|
96
|
-
return importedModule[exportName];
|
|
97
|
-
},
|
|
98
|
-
(e) => {
|
|
99
|
-
consoleError(e, hostRef.$hostElement$);
|
|
86
|
+
)); }).then((importedModule) => {
|
|
87
|
+
{
|
|
88
|
+
cmpModules.set(bundleId, importedModule);
|
|
100
89
|
}
|
|
101
|
-
|
|
90
|
+
return importedModule[exportName];
|
|
91
|
+
}, consoleError);
|
|
102
92
|
};
|
|
103
93
|
|
|
104
94
|
// src/client/client-style.ts
|
|
105
95
|
var styles = /* @__PURE__ */ new Map();
|
|
106
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
107
96
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
108
97
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
109
98
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -177,6 +166,12 @@ var flush = () => {
|
|
|
177
166
|
};
|
|
178
167
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
179
168
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
169
|
+
|
|
170
|
+
// src/utils/constants.ts
|
|
171
|
+
var EMPTY_OBJ = {};
|
|
172
|
+
|
|
173
|
+
// src/utils/helpers.ts
|
|
174
|
+
var isDef = (v) => v != null;
|
|
180
175
|
var isComplexType = (o) => {
|
|
181
176
|
o = typeof o;
|
|
182
177
|
return o === "object" || o === "function";
|
|
@@ -380,40 +375,13 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
380
375
|
}
|
|
381
376
|
if (!appliedStyles.has(scopeId2)) {
|
|
382
377
|
{
|
|
383
|
-
styleElm =
|
|
378
|
+
styleElm = doc.createElement("style");
|
|
384
379
|
styleElm.innerHTML = style;
|
|
385
380
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
386
381
|
if (nonce != null) {
|
|
387
382
|
styleElm.setAttribute("nonce", nonce);
|
|
388
383
|
}
|
|
389
|
-
|
|
390
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
391
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
392
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
393
|
-
styleContainerNode.insertBefore(
|
|
394
|
-
styleElm,
|
|
395
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
396
|
-
);
|
|
397
|
-
} else if ("host" in styleContainerNode) {
|
|
398
|
-
if (supportsConstructableStylesheets) {
|
|
399
|
-
const stylesheet = new CSSStyleSheet();
|
|
400
|
-
stylesheet.replaceSync(style);
|
|
401
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
402
|
-
} else {
|
|
403
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
404
|
-
if (existingStyleContainer) {
|
|
405
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
406
|
-
} else {
|
|
407
|
-
styleContainerNode.prepend(styleElm);
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
} else {
|
|
411
|
-
styleContainerNode.append(styleElm);
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
415
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
416
|
-
}
|
|
384
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
417
385
|
}
|
|
418
386
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
419
387
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -436,25 +404,23 @@ var attachStyles = (hostRef) => {
|
|
|
436
404
|
const scopeId2 = addStyle(
|
|
437
405
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
438
406
|
cmpMeta);
|
|
439
|
-
if (
|
|
407
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
440
408
|
elm["s-sc"] = scopeId2;
|
|
441
409
|
elm.classList.add(scopeId2 + "-h");
|
|
442
410
|
}
|
|
443
411
|
endAttachStyles();
|
|
444
412
|
};
|
|
445
413
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
446
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
414
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
447
415
|
if (oldValue !== newValue) {
|
|
448
416
|
let isProp = isMemberInElement(elm, memberName);
|
|
449
417
|
let ln = memberName.toLowerCase();
|
|
450
418
|
if (memberName === "class") {
|
|
451
419
|
const classList = elm.classList;
|
|
452
420
|
const oldClasses = parseClassList(oldValue);
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
457
|
-
}
|
|
421
|
+
const newClasses = parseClassList(newValue);
|
|
422
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
423
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
458
424
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
459
425
|
if (newValue) {
|
|
460
426
|
newValue(elm);
|
|
@@ -486,13 +452,9 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
486
452
|
if (memberName === "list") {
|
|
487
453
|
isProp = false;
|
|
488
454
|
} else if (oldValue == null || elm[memberName] != n) {
|
|
489
|
-
|
|
490
|
-
elm[memberName] = n;
|
|
491
|
-
} else {
|
|
492
|
-
elm.setAttribute(memberName, n);
|
|
493
|
-
}
|
|
455
|
+
elm[memberName] = n;
|
|
494
456
|
}
|
|
495
|
-
} else
|
|
457
|
+
} else {
|
|
496
458
|
elm[memberName] = newValue;
|
|
497
459
|
}
|
|
498
460
|
} catch (e) {
|
|
@@ -514,44 +476,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
514
476
|
}
|
|
515
477
|
};
|
|
516
478
|
var parseClassListRegex = /\s/;
|
|
517
|
-
var parseClassList = (value) =>
|
|
518
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
519
|
-
value = value.baseVal;
|
|
520
|
-
}
|
|
521
|
-
if (!value || typeof value !== "string") {
|
|
522
|
-
return [];
|
|
523
|
-
}
|
|
524
|
-
return value.split(parseClassListRegex);
|
|
525
|
-
};
|
|
479
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
526
480
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
527
481
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
528
482
|
|
|
529
483
|
// src/runtime/vdom/update-element.ts
|
|
530
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
484
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
531
485
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
532
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
533
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
486
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
487
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
534
488
|
{
|
|
535
489
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
536
490
|
if (!(memberName in newVnodeAttrs)) {
|
|
537
|
-
setAccessor(
|
|
538
|
-
elm,
|
|
539
|
-
memberName,
|
|
540
|
-
oldVnodeAttrs[memberName],
|
|
541
|
-
void 0,
|
|
542
|
-
isSvgMode2,
|
|
543
|
-
newVnode.$flags$);
|
|
491
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
544
492
|
}
|
|
545
493
|
}
|
|
546
494
|
}
|
|
547
495
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
548
|
-
setAccessor(
|
|
549
|
-
elm,
|
|
550
|
-
memberName,
|
|
551
|
-
oldVnodeAttrs[memberName],
|
|
552
|
-
newVnodeAttrs[memberName],
|
|
553
|
-
isSvgMode2,
|
|
554
|
-
newVnode.$flags$);
|
|
496
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
555
497
|
}
|
|
556
498
|
};
|
|
557
499
|
function sortedAttrNames(attrNames) {
|
|
@@ -563,10 +505,13 @@ function sortedAttrNames(attrNames) {
|
|
|
563
505
|
attrNames
|
|
564
506
|
);
|
|
565
507
|
}
|
|
508
|
+
|
|
509
|
+
// src/runtime/vdom/vdom-render.ts
|
|
510
|
+
var scopeId;
|
|
566
511
|
var hostTagName;
|
|
567
512
|
var useNativeShadowDom = false;
|
|
568
513
|
var isSvgMode = false;
|
|
569
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
514
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
570
515
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
571
516
|
let i2 = 0;
|
|
572
517
|
let elm;
|
|
@@ -580,6 +525,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
580
525
|
{
|
|
581
526
|
updateElement(null, newVNode2, isSvgMode);
|
|
582
527
|
}
|
|
528
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
529
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
530
|
+
}
|
|
583
531
|
if (newVNode2.$children$) {
|
|
584
532
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
585
533
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -709,9 +657,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
709
657
|
if (!isInitialRender) {
|
|
710
658
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
711
659
|
}
|
|
712
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
713
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
714
|
-
}
|
|
715
660
|
return true;
|
|
716
661
|
}
|
|
717
662
|
return false;
|
|
@@ -734,10 +679,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
734
679
|
elm.textContent = "";
|
|
735
680
|
}
|
|
736
681
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
737
|
-
} else if (
|
|
738
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
739
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
740
|
-
) {
|
|
682
|
+
} else if (oldChildren !== null) {
|
|
741
683
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
742
684
|
}
|
|
743
685
|
} else if (oldVNode.$text$ !== text) {
|
|
@@ -751,9 +693,8 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
751
693
|
}
|
|
752
694
|
};
|
|
753
695
|
var insertBefore = (parent, newNode, reference) => {
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
}
|
|
696
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
697
|
+
return inserted;
|
|
757
698
|
};
|
|
758
699
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
759
700
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -778,21 +719,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
778
719
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
779
720
|
hostRef.$vnode$ = rootVnode;
|
|
780
721
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
781
|
-
|
|
722
|
+
{
|
|
723
|
+
scopeId = hostElm["s-sc"];
|
|
724
|
+
}
|
|
725
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
782
726
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
783
727
|
};
|
|
784
728
|
|
|
785
729
|
// src/runtime/update-component.ts
|
|
786
730
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
787
731
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
788
|
-
|
|
789
|
-
new Promise(
|
|
790
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
791
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
792
|
-
r();
|
|
793
|
-
}
|
|
794
|
-
)
|
|
795
|
-
);
|
|
732
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
796
733
|
}
|
|
797
734
|
};
|
|
798
735
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -821,7 +758,7 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
821
758
|
{
|
|
822
759
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
823
760
|
if (hostRef.$queuedListeners$) {
|
|
824
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event
|
|
761
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
825
762
|
hostRef.$queuedListeners$ = void 0;
|
|
826
763
|
}
|
|
827
764
|
}
|
|
@@ -892,7 +829,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
892
829
|
const instance = hostRef.$lazyInstance$ ;
|
|
893
830
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
894
831
|
{
|
|
895
|
-
safeCall(instance, "componentDidRender"
|
|
832
|
+
safeCall(instance, "componentDidRender");
|
|
896
833
|
}
|
|
897
834
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
898
835
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -921,14 +858,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
921
858
|
}
|
|
922
859
|
};
|
|
923
860
|
var appDidLoad = (who) => {
|
|
861
|
+
{
|
|
862
|
+
addHydratedFlag(doc.documentElement);
|
|
863
|
+
}
|
|
924
864
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
925
865
|
};
|
|
926
|
-
var safeCall = (instance, method, arg
|
|
866
|
+
var safeCall = (instance, method, arg) => {
|
|
927
867
|
if (instance && instance[method]) {
|
|
928
868
|
try {
|
|
929
869
|
return instance[method](arg);
|
|
930
870
|
} catch (e) {
|
|
931
|
-
consoleError(e
|
|
871
|
+
consoleError(e);
|
|
932
872
|
}
|
|
933
873
|
}
|
|
934
874
|
return void 0;
|
|
@@ -971,68 +911,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
971
911
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
972
912
|
members.map(([memberName, [memberFlags]]) => {
|
|
973
913
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
974
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
975
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
976
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
977
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
978
|
-
Object.defineProperty(prototype, memberName, {
|
|
979
|
-
get() {
|
|
980
|
-
{
|
|
981
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
982
|
-
return getValue(this, memberName);
|
|
983
|
-
}
|
|
984
|
-
const ref = getHostRef(this);
|
|
985
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
986
|
-
if (!instance) return;
|
|
987
|
-
return instance[memberName];
|
|
988
|
-
}
|
|
989
|
-
},
|
|
990
|
-
configurable: true,
|
|
991
|
-
enumerable: true
|
|
992
|
-
});
|
|
993
|
-
}
|
|
994
914
|
Object.defineProperty(prototype, memberName, {
|
|
915
|
+
get() {
|
|
916
|
+
return getValue(this, memberName);
|
|
917
|
+
},
|
|
995
918
|
set(newValue) {
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
1001
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1002
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1003
|
-
}
|
|
1004
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1005
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1006
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1007
|
-
return;
|
|
1008
|
-
}
|
|
1009
|
-
{
|
|
1010
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1011
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1012
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1013
|
-
ref.$onReadyPromise$.then(() => {
|
|
1014
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1015
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
1016
|
-
}
|
|
1017
|
-
});
|
|
1018
|
-
}
|
|
1019
|
-
return;
|
|
1020
|
-
}
|
|
1021
|
-
const setterSetVal = () => {
|
|
1022
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
1023
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1024
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1025
|
-
}
|
|
1026
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1027
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1028
|
-
};
|
|
1029
|
-
if (ref.$lazyInstance$) {
|
|
1030
|
-
setterSetVal();
|
|
1031
|
-
} else {
|
|
1032
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
}
|
|
919
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
920
|
+
},
|
|
921
|
+
configurable: true,
|
|
922
|
+
enumerable: true
|
|
1036
923
|
});
|
|
1037
924
|
}
|
|
1038
925
|
});
|
|
@@ -1042,11 +929,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1042
929
|
plt.jmp(() => {
|
|
1043
930
|
var _a2;
|
|
1044
931
|
const propName = attrNameToPropName.get(attrName);
|
|
1045
|
-
if (this.hasOwnProperty(propName)
|
|
932
|
+
if (this.hasOwnProperty(propName)) {
|
|
1046
933
|
newValue = this[propName];
|
|
1047
934
|
delete this[propName];
|
|
1048
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" &&
|
|
1049
|
-
this[propName] == newValue) {
|
|
935
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
|
|
1050
936
|
return;
|
|
1051
937
|
} else if (propName == null) {
|
|
1052
938
|
const hostRef = getHostRef(this);
|
|
@@ -1062,11 +948,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1062
948
|
}
|
|
1063
949
|
return;
|
|
1064
950
|
}
|
|
1065
|
-
|
|
1066
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1067
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1068
|
-
this[propName] = newValue;
|
|
1069
|
-
}
|
|
951
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1070
952
|
});
|
|
1071
953
|
};
|
|
1072
954
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1095,7 +977,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1095
977
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1096
978
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1097
979
|
if (bundleId) {
|
|
1098
|
-
const CstrImport = loadModule(cmpMeta
|
|
980
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1099
981
|
if (CstrImport && "then" in CstrImport) {
|
|
1100
982
|
const endLoad = uniqueTime();
|
|
1101
983
|
Cstr = await CstrImport;
|
|
@@ -1117,13 +999,13 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1117
999
|
try {
|
|
1118
1000
|
new Cstr(hostRef);
|
|
1119
1001
|
} catch (e) {
|
|
1120
|
-
consoleError(e
|
|
1002
|
+
consoleError(e);
|
|
1121
1003
|
}
|
|
1122
1004
|
{
|
|
1123
1005
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
1124
1006
|
}
|
|
1125
1007
|
endNewInstance();
|
|
1126
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1008
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1127
1009
|
} else {
|
|
1128
1010
|
Cstr = elm.constructor;
|
|
1129
1011
|
const cmpTag = elm.localName;
|
|
@@ -1150,9 +1032,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1150
1032
|
schedule();
|
|
1151
1033
|
}
|
|
1152
1034
|
};
|
|
1153
|
-
var fireConnectedCallback = (instance
|
|
1035
|
+
var fireConnectedCallback = (instance) => {
|
|
1154
1036
|
{
|
|
1155
|
-
safeCall(instance, "connectedCallback"
|
|
1037
|
+
safeCall(instance, "connectedCallback");
|
|
1156
1038
|
}
|
|
1157
1039
|
};
|
|
1158
1040
|
|
|
@@ -1188,15 +1070,15 @@ var connectedCallback = (elm) => {
|
|
|
1188
1070
|
} else {
|
|
1189
1071
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1190
1072
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1191
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1073
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1192
1074
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1193
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
1075
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
|
|
1194
1076
|
}
|
|
1195
1077
|
}
|
|
1196
1078
|
endConnected();
|
|
1197
1079
|
}
|
|
1198
1080
|
};
|
|
1199
|
-
var disconnectInstance = (instance
|
|
1081
|
+
var disconnectInstance = (instance) => {
|
|
1200
1082
|
};
|
|
1201
1083
|
var disconnectedCallback = async (elm) => {
|
|
1202
1084
|
if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
|
|
@@ -1211,12 +1093,6 @@ var disconnectedCallback = async (elm) => {
|
|
|
1211
1093
|
hostRef.$onReadyPromise$.then(() => disconnectInstance());
|
|
1212
1094
|
}
|
|
1213
1095
|
}
|
|
1214
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1215
|
-
rootAppliedStyles.delete(elm);
|
|
1216
|
-
}
|
|
1217
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1218
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1219
|
-
}
|
|
1220
1096
|
};
|
|
1221
1097
|
|
|
1222
1098
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1297,17 +1173,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1297
1173
|
}
|
|
1298
1174
|
disconnectedCallback() {
|
|
1299
1175
|
plt.jmp(() => disconnectedCallback(this));
|
|
1300
|
-
plt.raf(() => {
|
|
1301
|
-
var _a3;
|
|
1302
|
-
const hostRef = getHostRef(this);
|
|
1303
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1304
|
-
if (i2 > -1) {
|
|
1305
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1306
|
-
}
|
|
1307
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1308
|
-
delete hostRef.$vnode$.$elm$;
|
|
1309
|
-
}
|
|
1310
|
-
});
|
|
1311
1176
|
}
|
|
1312
1177
|
componentOnReady() {
|
|
1313
1178
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1371,7 +1236,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1371
1236
|
}
|
|
1372
1237
|
}
|
|
1373
1238
|
} catch (e) {
|
|
1374
|
-
consoleError(e
|
|
1239
|
+
consoleError(e);
|
|
1375
1240
|
}
|
|
1376
1241
|
};
|
|
1377
1242
|
var getHostListenerTarget = (elm, flags) => {
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-066eab2b.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|