@everymatrix/general-registration 1.56.1 → 1.56.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/checkbox-group-input_13.cjs.entry.js +1047 -962
- package/dist/cjs/general-registration.cjs.js +2 -2
- package/dist/cjs/{index-59ba6f69.js → index-4ad59840.js} +132 -277
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/general-registration/general-registration.js +19 -48
- package/dist/esm/checkbox-group-input_13.entry.js +1047 -962
- package/dist/esm/general-registration.js +3 -3
- package/dist/esm/{index-de907516.js → index-14f0c56e.js} +132 -277
- package/dist/esm/loader.js +2 -2
- package/dist/general-registration/general-registration.esm.js +1 -1
- package/dist/general-registration/{p-439f617f.entry.js → p-290ae59c.entry.js} +140 -126
- package/dist/general-registration/p-59a2915a.js +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.dev.d.ts +2 -0
- package/dist/types/components.d.ts +0 -48
- package/dist/types/stencil-public-runtime.d.ts +0 -6
- package/package.json +1 -1
- package/dist/general-registration/p-f0564129.js +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-input/src/utils/types.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-registration/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-registration/.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/general-registration/.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/general-registration/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1,30 +1,17 @@
|
|
|
1
1
|
const NAMESPACE = 'general-registration';
|
|
2
|
-
const BUILD = /* general-registration */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, constructableCSS: true, cssAnnotations: true, devTools: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: true, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false,
|
|
2
|
+
const BUILD = /* general-registration */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: true, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: true, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: true, hostListenerTargetDocument: true, 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: true, propMutable: true, propNumber: false, propString: true, reflect: true, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: true, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, 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: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.19.2 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
9
9
|
for (var name in all)
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var
|
|
15
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
16
|
-
|
|
17
|
-
// src/client/client-host-ref.ts
|
|
18
|
-
var getHostRef = (ref) => {
|
|
19
|
-
if (ref.__stencil__getHostRef) {
|
|
20
|
-
return ref.__stencil__getHostRef();
|
|
21
|
-
}
|
|
22
|
-
return void 0;
|
|
23
|
-
};
|
|
24
|
-
var registerInstance = (lazyInstance, hostRef) => {
|
|
25
|
-
lazyInstance.__stencil__getHostRef = () => hostRef;
|
|
26
|
-
hostRef.$lazyInstance$ = lazyInstance;
|
|
27
|
-
};
|
|
12
|
+
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
13
|
+
var getHostRef = (ref) => hostRefs.get(ref);
|
|
14
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
28
15
|
var registerHost = (hostElement, cmpMeta) => {
|
|
29
16
|
const hostRef = {
|
|
30
17
|
$flags$: 0,
|
|
@@ -37,9 +24,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
37
24
|
hostElement["s-p"] = [];
|
|
38
25
|
hostElement["s-rc"] = [];
|
|
39
26
|
}
|
|
40
|
-
|
|
41
|
-
hostElement.__stencil__getHostRef = () => ref;
|
|
42
|
-
return ref;
|
|
27
|
+
return hostRefs.set(hostElement, hostRef);
|
|
43
28
|
};
|
|
44
29
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
45
30
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -76,22 +61,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
76
61
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
77
62
|
/* webpackMode: "lazy" */
|
|
78
63
|
`./${bundleId}.entry.js${""}`
|
|
79
|
-
).then(
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
cmpModules.set(bundleId, importedModule);
|
|
83
|
-
}
|
|
84
|
-
return importedModule[exportName];
|
|
85
|
-
},
|
|
86
|
-
(e) => {
|
|
87
|
-
consoleError(e, hostRef.$hostElement$);
|
|
64
|
+
).then((importedModule) => {
|
|
65
|
+
{
|
|
66
|
+
cmpModules.set(bundleId, importedModule);
|
|
88
67
|
}
|
|
89
|
-
|
|
68
|
+
return importedModule[exportName];
|
|
69
|
+
}, consoleError);
|
|
90
70
|
};
|
|
91
71
|
|
|
92
72
|
// src/client/client-style.ts
|
|
93
73
|
var styles = /* @__PURE__ */ new Map();
|
|
94
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
95
74
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
96
75
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
97
76
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -165,6 +144,14 @@ var flush = () => {
|
|
|
165
144
|
};
|
|
166
145
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
167
146
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
147
|
+
|
|
148
|
+
// src/utils/constants.ts
|
|
149
|
+
var EMPTY_OBJ = {};
|
|
150
|
+
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
151
|
+
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
152
|
+
|
|
153
|
+
// src/utils/helpers.ts
|
|
154
|
+
var isDef = (v) => v != null;
|
|
168
155
|
var isComplexType = (o) => {
|
|
169
156
|
o = typeof o;
|
|
170
157
|
return o === "object" || o === "function";
|
|
@@ -365,40 +352,13 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
365
352
|
}
|
|
366
353
|
if (!appliedStyles.has(scopeId2)) {
|
|
367
354
|
{
|
|
368
|
-
styleElm =
|
|
355
|
+
styleElm = doc.createElement("style");
|
|
369
356
|
styleElm.innerHTML = style;
|
|
370
357
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
371
358
|
if (nonce != null) {
|
|
372
359
|
styleElm.setAttribute("nonce", nonce);
|
|
373
360
|
}
|
|
374
|
-
|
|
375
|
-
if (styleContainerNode.nodeName === "HEAD") {
|
|
376
|
-
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
377
|
-
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
378
|
-
styleContainerNode.insertBefore(
|
|
379
|
-
styleElm,
|
|
380
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
381
|
-
);
|
|
382
|
-
} else if ("host" in styleContainerNode) {
|
|
383
|
-
if (supportsConstructableStylesheets) {
|
|
384
|
-
const stylesheet = new CSSStyleSheet();
|
|
385
|
-
stylesheet.replaceSync(style);
|
|
386
|
-
styleContainerNode.adoptedStyleSheets = [stylesheet, ...styleContainerNode.adoptedStyleSheets];
|
|
387
|
-
} else {
|
|
388
|
-
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
389
|
-
if (existingStyleContainer) {
|
|
390
|
-
existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
391
|
-
} else {
|
|
392
|
-
styleContainerNode.prepend(styleElm);
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
} else {
|
|
396
|
-
styleContainerNode.append(styleElm);
|
|
397
|
-
}
|
|
398
|
-
}
|
|
399
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
400
|
-
styleContainerNode.insertBefore(styleElm, null);
|
|
401
|
-
}
|
|
361
|
+
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector("link"));
|
|
402
362
|
}
|
|
403
363
|
if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {
|
|
404
364
|
styleElm.innerHTML += SLOT_FB_CSS;
|
|
@@ -421,123 +381,96 @@ var attachStyles = (hostRef) => {
|
|
|
421
381
|
const scopeId2 = addStyle(
|
|
422
382
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
423
383
|
cmpMeta);
|
|
424
|
-
if (
|
|
384
|
+
if (flags & 10 /* needsScopedEncapsulation */) {
|
|
425
385
|
elm["s-sc"] = scopeId2;
|
|
426
386
|
elm.classList.add(scopeId2 + "-h");
|
|
427
387
|
}
|
|
428
388
|
endAttachStyles();
|
|
429
389
|
};
|
|
430
390
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
431
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
432
|
-
if (oldValue
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
const oldClasses = parseClassList(oldValue);
|
|
440
|
-
let newClasses = parseClassList(newValue);
|
|
441
|
-
{
|
|
391
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
392
|
+
if (oldValue !== newValue) {
|
|
393
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
394
|
+
let ln = memberName.toLowerCase();
|
|
395
|
+
if (memberName === "class") {
|
|
396
|
+
const classList = elm.classList;
|
|
397
|
+
const oldClasses = parseClassList(oldValue);
|
|
398
|
+
const newClasses = parseClassList(newValue);
|
|
442
399
|
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
443
400
|
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
444
|
-
}
|
|
445
|
-
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
446
|
-
if (newValue) {
|
|
447
|
-
newValue(elm);
|
|
448
|
-
}
|
|
449
|
-
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
450
|
-
if (memberName[2] === "-") {
|
|
451
|
-
memberName = memberName.slice(3);
|
|
452
|
-
} else if (isMemberInElement(win, ln)) {
|
|
453
|
-
memberName = ln.slice(2);
|
|
454
|
-
} else {
|
|
455
|
-
memberName = ln[2] + memberName.slice(3);
|
|
456
|
-
}
|
|
457
|
-
if (oldValue || newValue) {
|
|
458
|
-
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
459
|
-
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
460
|
-
if (oldValue) {
|
|
461
|
-
plt.rel(elm, memberName, oldValue, capture);
|
|
462
|
-
}
|
|
401
|
+
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
463
402
|
if (newValue) {
|
|
464
|
-
|
|
403
|
+
newValue(elm);
|
|
465
404
|
}
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
405
|
+
} else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
|
|
406
|
+
if (memberName[2] === "-") {
|
|
407
|
+
memberName = memberName.slice(3);
|
|
408
|
+
} else if (isMemberInElement(win, ln)) {
|
|
409
|
+
memberName = ln.slice(2);
|
|
410
|
+
} else {
|
|
411
|
+
memberName = ln[2] + memberName.slice(3);
|
|
412
|
+
}
|
|
413
|
+
if (oldValue || newValue) {
|
|
414
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
415
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
416
|
+
if (oldValue) {
|
|
417
|
+
plt.rel(elm, memberName, oldValue, capture);
|
|
418
|
+
}
|
|
419
|
+
if (newValue) {
|
|
420
|
+
plt.ael(elm, memberName, newValue, capture);
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
} else {
|
|
424
|
+
const isComplex = isComplexType(newValue);
|
|
425
|
+
if ((isProp || isComplex && newValue !== null) && !isSvg) {
|
|
426
|
+
try {
|
|
427
|
+
if (!elm.tagName.includes("-")) {
|
|
428
|
+
const n = newValue == null ? "" : newValue;
|
|
429
|
+
if (memberName === "list") {
|
|
430
|
+
isProp = false;
|
|
431
|
+
} else if (oldValue == null || elm[memberName] != n) {
|
|
477
432
|
elm[memberName] = n;
|
|
478
|
-
} else {
|
|
479
|
-
elm.setAttribute(memberName, n);
|
|
480
433
|
}
|
|
434
|
+
} else {
|
|
435
|
+
elm[memberName] = newValue;
|
|
481
436
|
}
|
|
482
|
-
}
|
|
483
|
-
elm[memberName] = newValue;
|
|
437
|
+
} catch (e) {
|
|
484
438
|
}
|
|
485
|
-
} catch (e) {
|
|
486
439
|
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
440
|
+
if (newValue == null || newValue === false) {
|
|
441
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
442
|
+
{
|
|
443
|
+
elm.removeAttribute(memberName);
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex) {
|
|
447
|
+
newValue = newValue === true ? "" : newValue;
|
|
490
448
|
{
|
|
491
|
-
elm.
|
|
449
|
+
elm.setAttribute(memberName, newValue);
|
|
492
450
|
}
|
|
493
451
|
}
|
|
494
|
-
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
495
|
-
newValue = newValue === true ? "" : newValue;
|
|
496
|
-
{
|
|
497
|
-
elm.setAttribute(memberName, newValue);
|
|
498
|
-
}
|
|
499
452
|
}
|
|
500
453
|
}
|
|
501
454
|
};
|
|
502
455
|
var parseClassListRegex = /\s/;
|
|
503
|
-
var parseClassList = (value) =>
|
|
504
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
505
|
-
value = value.baseVal;
|
|
506
|
-
}
|
|
507
|
-
if (!value || typeof value !== "string") {
|
|
508
|
-
return [];
|
|
509
|
-
}
|
|
510
|
-
return value.split(parseClassListRegex);
|
|
511
|
-
};
|
|
456
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
512
457
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
513
458
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
514
459
|
|
|
515
460
|
// src/runtime/vdom/update-element.ts
|
|
516
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
461
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
517
462
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
518
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
519
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
463
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
464
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
520
465
|
{
|
|
521
466
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
522
467
|
if (!(memberName in newVnodeAttrs)) {
|
|
523
|
-
setAccessor(
|
|
524
|
-
elm,
|
|
525
|
-
memberName,
|
|
526
|
-
oldVnodeAttrs[memberName],
|
|
527
|
-
void 0,
|
|
528
|
-
isSvgMode2,
|
|
529
|
-
newVnode.$flags$);
|
|
468
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
530
469
|
}
|
|
531
470
|
}
|
|
532
471
|
}
|
|
533
472
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
534
|
-
setAccessor(
|
|
535
|
-
elm,
|
|
536
|
-
memberName,
|
|
537
|
-
oldVnodeAttrs[memberName],
|
|
538
|
-
newVnodeAttrs[memberName],
|
|
539
|
-
isSvgMode2,
|
|
540
|
-
newVnode.$flags$);
|
|
473
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
541
474
|
}
|
|
542
475
|
};
|
|
543
476
|
function sortedAttrNames(attrNames) {
|
|
@@ -549,10 +482,13 @@ function sortedAttrNames(attrNames) {
|
|
|
549
482
|
attrNames
|
|
550
483
|
);
|
|
551
484
|
}
|
|
485
|
+
|
|
486
|
+
// src/runtime/vdom/vdom-render.ts
|
|
487
|
+
var scopeId;
|
|
552
488
|
var hostTagName;
|
|
553
489
|
var useNativeShadowDom = false;
|
|
554
490
|
var isSvgMode = false;
|
|
555
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
491
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
556
492
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
557
493
|
let i2 = 0;
|
|
558
494
|
let elm;
|
|
@@ -573,6 +509,9 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
573
509
|
{
|
|
574
510
|
updateElement(null, newVNode2, isSvgMode);
|
|
575
511
|
}
|
|
512
|
+
if (isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
513
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
514
|
+
}
|
|
576
515
|
if (newVNode2.$children$) {
|
|
577
516
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
578
517
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -709,9 +648,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
709
648
|
if (!isInitialRender) {
|
|
710
649
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
711
650
|
}
|
|
712
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
713
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
714
|
-
}
|
|
715
651
|
return true;
|
|
716
652
|
}
|
|
717
653
|
return false;
|
|
@@ -727,7 +663,9 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
727
663
|
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
728
664
|
}
|
|
729
665
|
{
|
|
730
|
-
|
|
666
|
+
if (tag === "slot" && !useNativeShadowDom) ; else {
|
|
667
|
+
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
668
|
+
}
|
|
731
669
|
}
|
|
732
670
|
if (oldChildren !== null && newChildren !== null) {
|
|
733
671
|
updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
@@ -736,10 +674,7 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
736
674
|
elm.textContent = "";
|
|
737
675
|
}
|
|
738
676
|
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
739
|
-
} else if (
|
|
740
|
-
// don't do this on initial render as it can cause non-hydrated content to be removed
|
|
741
|
-
!isInitialRender && BUILD.updatable && oldChildren !== null
|
|
742
|
-
) {
|
|
677
|
+
} else if (oldChildren !== null) {
|
|
743
678
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
744
679
|
}
|
|
745
680
|
if (isSvgMode && tag === "svg") {
|
|
@@ -756,9 +691,8 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
756
691
|
}
|
|
757
692
|
};
|
|
758
693
|
var insertBefore = (parent, newNode, reference) => {
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
}
|
|
694
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
695
|
+
return inserted;
|
|
762
696
|
};
|
|
763
697
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
764
698
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -783,21 +717,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
783
717
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
784
718
|
hostRef.$vnode$ = rootVnode;
|
|
785
719
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
786
|
-
|
|
720
|
+
{
|
|
721
|
+
scopeId = hostElm["s-sc"];
|
|
722
|
+
}
|
|
723
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
787
724
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
788
725
|
};
|
|
789
726
|
|
|
790
727
|
// src/runtime/update-component.ts
|
|
791
728
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
792
729
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
793
|
-
|
|
794
|
-
new Promise(
|
|
795
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
796
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
797
|
-
r();
|
|
798
|
-
}
|
|
799
|
-
)
|
|
800
|
-
);
|
|
730
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
801
731
|
}
|
|
802
732
|
};
|
|
803
733
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -826,15 +756,14 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
826
756
|
{
|
|
827
757
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
828
758
|
if (hostRef.$queuedListeners$) {
|
|
829
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event
|
|
759
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
830
760
|
hostRef.$queuedListeners$ = void 0;
|
|
831
761
|
}
|
|
832
762
|
}
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
763
|
+
{
|
|
764
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
765
|
+
}
|
|
836
766
|
}
|
|
837
|
-
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
838
767
|
endSchedule();
|
|
839
768
|
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
840
769
|
};
|
|
@@ -900,13 +829,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
900
829
|
const endPostUpdate = createTime("postUpdate", tagName);
|
|
901
830
|
const instance = hostRef.$lazyInstance$ ;
|
|
902
831
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
903
|
-
|
|
832
|
+
{
|
|
833
|
+
safeCall(instance, "componentDidRender");
|
|
834
|
+
}
|
|
904
835
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
905
836
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
906
837
|
{
|
|
907
838
|
addHydratedFlag(elm);
|
|
908
839
|
}
|
|
909
|
-
|
|
840
|
+
{
|
|
841
|
+
safeCall(instance, "componentDidLoad");
|
|
842
|
+
}
|
|
910
843
|
endPostUpdate();
|
|
911
844
|
{
|
|
912
845
|
hostRef.$onReadyResolve$(elm);
|
|
@@ -915,7 +848,6 @@ var postUpdateComponent = (hostRef) => {
|
|
|
915
848
|
}
|
|
916
849
|
}
|
|
917
850
|
} else {
|
|
918
|
-
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
919
851
|
endPostUpdate();
|
|
920
852
|
}
|
|
921
853
|
{
|
|
@@ -930,14 +862,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
930
862
|
}
|
|
931
863
|
};
|
|
932
864
|
var appDidLoad = (who) => {
|
|
865
|
+
{
|
|
866
|
+
addHydratedFlag(doc.documentElement);
|
|
867
|
+
}
|
|
933
868
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
934
869
|
};
|
|
935
|
-
var safeCall = (instance, method, arg
|
|
870
|
+
var safeCall = (instance, method, arg) => {
|
|
936
871
|
if (instance && instance[method]) {
|
|
937
872
|
try {
|
|
938
873
|
return instance[method](arg);
|
|
939
874
|
} catch (e) {
|
|
940
|
-
consoleError(e
|
|
875
|
+
consoleError(e);
|
|
941
876
|
}
|
|
942
877
|
}
|
|
943
878
|
return void 0;
|
|
@@ -979,11 +914,6 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
|
979
914
|
}
|
|
980
915
|
}
|
|
981
916
|
if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
|
|
982
|
-
if (instance.componentShouldUpdate) {
|
|
983
|
-
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
|
|
984
|
-
return;
|
|
985
|
-
}
|
|
986
|
-
}
|
|
987
917
|
scheduleUpdate(hostRef, false);
|
|
988
918
|
}
|
|
989
919
|
}
|
|
@@ -1001,68 +931,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1001
931
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1002
932
|
members.map(([memberName, [memberFlags]]) => {
|
|
1003
933
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1004
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1005
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1006
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1007
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1008
|
-
Object.defineProperty(prototype, memberName, {
|
|
1009
|
-
get() {
|
|
1010
|
-
{
|
|
1011
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1012
|
-
return getValue(this, memberName);
|
|
1013
|
-
}
|
|
1014
|
-
const ref = getHostRef(this);
|
|
1015
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1016
|
-
if (!instance) return;
|
|
1017
|
-
return instance[memberName];
|
|
1018
|
-
}
|
|
1019
|
-
},
|
|
1020
|
-
configurable: true,
|
|
1021
|
-
enumerable: true
|
|
1022
|
-
});
|
|
1023
|
-
}
|
|
1024
934
|
Object.defineProperty(prototype, memberName, {
|
|
935
|
+
get() {
|
|
936
|
+
return getValue(this, memberName);
|
|
937
|
+
},
|
|
1025
938
|
set(newValue) {
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
1031
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1032
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1033
|
-
}
|
|
1034
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1035
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1036
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1037
|
-
return;
|
|
1038
|
-
}
|
|
1039
|
-
{
|
|
1040
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1041
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1042
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1043
|
-
ref.$onReadyPromise$.then(() => {
|
|
1044
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1045
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
1046
|
-
}
|
|
1047
|
-
});
|
|
1048
|
-
}
|
|
1049
|
-
return;
|
|
1050
|
-
}
|
|
1051
|
-
const setterSetVal = () => {
|
|
1052
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
1053
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1054
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1055
|
-
}
|
|
1056
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1057
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1058
|
-
};
|
|
1059
|
-
if (ref.$lazyInstance$) {
|
|
1060
|
-
setterSetVal();
|
|
1061
|
-
} else {
|
|
1062
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1063
|
-
}
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
939
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
940
|
+
},
|
|
941
|
+
configurable: true,
|
|
942
|
+
enumerable: true
|
|
1066
943
|
});
|
|
1067
944
|
}
|
|
1068
945
|
});
|
|
@@ -1072,11 +949,10 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1072
949
|
plt.jmp(() => {
|
|
1073
950
|
var _a2;
|
|
1074
951
|
const propName = attrNameToPropName.get(attrName);
|
|
1075
|
-
if (this.hasOwnProperty(propName)
|
|
952
|
+
if (this.hasOwnProperty(propName)) {
|
|
1076
953
|
newValue = this[propName];
|
|
1077
954
|
delete this[propName];
|
|
1078
|
-
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" &&
|
|
1079
|
-
this[propName] == newValue) {
|
|
955
|
+
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) {
|
|
1080
956
|
return;
|
|
1081
957
|
} else if (propName == null) {
|
|
1082
958
|
const hostRef = getHostRef(this);
|
|
@@ -1092,11 +968,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1092
968
|
}
|
|
1093
969
|
return;
|
|
1094
970
|
}
|
|
1095
|
-
|
|
1096
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1097
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1098
|
-
this[propName] = newValue;
|
|
1099
|
-
}
|
|
971
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1100
972
|
});
|
|
1101
973
|
};
|
|
1102
974
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1125,7 +997,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1125
997
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1126
998
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1127
999
|
if (bundleId) {
|
|
1128
|
-
const CstrImport = loadModule(cmpMeta
|
|
1000
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1129
1001
|
if (CstrImport && "then" in CstrImport) {
|
|
1130
1002
|
const endLoad = uniqueTime();
|
|
1131
1003
|
Cstr = await CstrImport;
|
|
@@ -1150,7 +1022,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1150
1022
|
try {
|
|
1151
1023
|
new Cstr(hostRef);
|
|
1152
1024
|
} catch (e) {
|
|
1153
|
-
consoleError(e
|
|
1025
|
+
consoleError(e);
|
|
1154
1026
|
}
|
|
1155
1027
|
{
|
|
1156
1028
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1159,7 +1031,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1159
1031
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1160
1032
|
}
|
|
1161
1033
|
endNewInstance();
|
|
1162
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1034
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1163
1035
|
} else {
|
|
1164
1036
|
Cstr = elm.constructor;
|
|
1165
1037
|
const cmpTag = elm.localName;
|
|
@@ -1186,9 +1058,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1186
1058
|
schedule();
|
|
1187
1059
|
}
|
|
1188
1060
|
};
|
|
1189
|
-
var fireConnectedCallback = (instance
|
|
1061
|
+
var fireConnectedCallback = (instance) => {
|
|
1190
1062
|
{
|
|
1191
|
-
safeCall(instance, "connectedCallback"
|
|
1063
|
+
safeCall(instance, "connectedCallback");
|
|
1192
1064
|
}
|
|
1193
1065
|
};
|
|
1194
1066
|
|
|
@@ -1224,17 +1096,17 @@ var connectedCallback = (elm) => {
|
|
|
1224
1096
|
} else {
|
|
1225
1097
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1226
1098
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1227
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1099
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1228
1100
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1229
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
1101
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
|
|
1230
1102
|
}
|
|
1231
1103
|
}
|
|
1232
1104
|
endConnected();
|
|
1233
1105
|
}
|
|
1234
1106
|
};
|
|
1235
|
-
var disconnectInstance = (instance
|
|
1107
|
+
var disconnectInstance = (instance) => {
|
|
1236
1108
|
{
|
|
1237
|
-
safeCall(instance, "disconnectedCallback"
|
|
1109
|
+
safeCall(instance, "disconnectedCallback");
|
|
1238
1110
|
}
|
|
1239
1111
|
};
|
|
1240
1112
|
var disconnectedCallback = async (elm) => {
|
|
@@ -1247,17 +1119,11 @@ var disconnectedCallback = async (elm) => {
|
|
|
1247
1119
|
}
|
|
1248
1120
|
}
|
|
1249
1121
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1250
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1122
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1251
1123
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1252
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1124
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1253
1125
|
}
|
|
1254
1126
|
}
|
|
1255
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1256
|
-
rootAppliedStyles.delete(elm);
|
|
1257
|
-
}
|
|
1258
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1259
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1260
|
-
}
|
|
1261
1127
|
};
|
|
1262
1128
|
|
|
1263
1129
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1342,17 +1208,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1342
1208
|
}
|
|
1343
1209
|
disconnectedCallback() {
|
|
1344
1210
|
plt.jmp(() => disconnectedCallback(this));
|
|
1345
|
-
plt.raf(() => {
|
|
1346
|
-
var _a3;
|
|
1347
|
-
const hostRef = getHostRef(this);
|
|
1348
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1349
|
-
if (i2 > -1) {
|
|
1350
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1351
|
-
}
|
|
1352
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1353
|
-
delete hostRef.$vnode$.$elm$;
|
|
1354
|
-
}
|
|
1355
|
-
});
|
|
1356
1211
|
}
|
|
1357
1212
|
componentOnReady() {
|
|
1358
1213
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1416,7 +1271,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1416
1271
|
}
|
|
1417
1272
|
}
|
|
1418
1273
|
} catch (e) {
|
|
1419
|
-
consoleError(e
|
|
1274
|
+
consoleError(e);
|
|
1420
1275
|
}
|
|
1421
1276
|
};
|
|
1422
1277
|
var getHostListenerTarget = (elm, flags) => {
|