@everymatrix/general-input 1.54.11 → 1.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/checkbox-group-input_10.cjs.entry.js +17472 -17497
- package/dist/cjs/general-input.cjs.entry.js +18 -17
- package/dist/cjs/general-input.cjs.js +2 -2
- package/dist/cjs/{index-a91d7bcb.js → index-01420a64.js} +76 -177
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/toggle-checkbox-input.cjs.entry.js +16 -12
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +17 -33
- package/dist/collection/components/checkbox-input/checkbox-input.js +14 -29
- package/dist/collection/components/date-input/date-input.js +17 -35
- package/dist/collection/components/email-input/email-input.js +16 -29
- package/dist/collection/components/general-input/general-input.js +18 -51
- package/dist/collection/components/number-input/number-input.js +15 -27
- package/dist/collection/components/password-input/password-input.js +19 -34
- package/dist/collection/components/radio-input/radio-input.js +14 -24
- package/dist/collection/components/select-input/select-input.js +17 -39
- package/dist/collection/components/tel-input/tel-input.js +17 -31
- package/dist/collection/components/text-input/text-input.js +17 -36
- package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +17 -33
- package/dist/esm/checkbox-group-input_10.entry.js +17472 -17497
- package/dist/esm/general-input.entry.js +18 -17
- package/dist/esm/general-input.js +3 -3
- package/dist/esm/{index-3bab966c.js → index-542cff81.js} +76 -177
- package/dist/esm/loader.js +2 -2
- package/dist/esm/toggle-checkbox-input.entry.js +16 -12
- package/dist/general-input/general-input.esm.js +1 -1
- package/dist/general-input/p-3cab3b95.entry.js +1 -0
- package/dist/general-input/p-3ce1e382.js +2 -0
- package/dist/general-input/p-e5532cb1.entry.js +1 -0
- package/dist/general-input/p-ff2306f9.entry.js +5909 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/general-input/p-5ab8d194.js +0 -2
- package/dist/general-input/p-8ce07665.entry.js +0 -1
- package/dist/general-input/p-9ad71153.entry.js +0 -1
- package/dist/general-input/p-eff1e99a.entry.js +0 -4465
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +0 -2
- package/dist/types/builds/emfe-widgets/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +0 -2
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/{builds/emfe-widgets → Users/maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-542cff81.js';
|
|
2
2
|
import { g as getTranslations } from './locale.utils-0883d9a6.js';
|
|
3
3
|
|
|
4
4
|
const generalInputCss = ":host{display:block;height:100%}";
|
|
@@ -7,28 +7,29 @@ const GeneralInputStyle0 = generalInputCss;
|
|
|
7
7
|
const GeneralInput = class {
|
|
8
8
|
constructor(hostRef) {
|
|
9
9
|
registerInstance(this, hostRef);
|
|
10
|
-
/**
|
|
11
|
-
* Type the general-input should take. Can take the default HTML input values.
|
|
12
|
-
*/
|
|
13
|
-
this.type = 'text';
|
|
14
|
-
/**
|
|
15
|
-
* Client custom styling via inline style
|
|
16
|
-
*/
|
|
17
|
-
this.clientStyling = '';
|
|
18
|
-
/**
|
|
19
|
-
* Translations via URL
|
|
20
|
-
*/
|
|
21
|
-
this.translationUrl = '';
|
|
22
|
-
/**
|
|
23
|
-
* Emit event on click
|
|
24
|
-
*/
|
|
25
|
-
this.emitOnClick = false;
|
|
26
10
|
this.handleClick = (event) => {
|
|
27
11
|
if (this.emitOnClick) {
|
|
28
12
|
event.stopPropagation();
|
|
29
13
|
window.postMessage({ type: `registration${this.name}Clicked` }, window.location.href);
|
|
30
14
|
}
|
|
31
15
|
};
|
|
16
|
+
this.type = 'text';
|
|
17
|
+
this.name = undefined;
|
|
18
|
+
this.displayName = undefined;
|
|
19
|
+
this.placeholder = undefined;
|
|
20
|
+
this.action = undefined;
|
|
21
|
+
this.validation = undefined;
|
|
22
|
+
this.options = undefined;
|
|
23
|
+
this.language = undefined;
|
|
24
|
+
this.autofilled = undefined;
|
|
25
|
+
this.tooltip = undefined;
|
|
26
|
+
this.defaultValue = undefined;
|
|
27
|
+
this.emitValue = undefined;
|
|
28
|
+
this.isDuplicateInput = undefined;
|
|
29
|
+
this.clientStyling = '';
|
|
30
|
+
this.dateFormat = undefined;
|
|
31
|
+
this.translationUrl = '';
|
|
32
|
+
this.emitOnClick = false;
|
|
32
33
|
}
|
|
33
34
|
connectedCallback() {
|
|
34
35
|
if (this.translationUrl) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-542cff81.js';
|
|
2
|
+
export { s as setNonce } from './index-542cff81.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v4.
|
|
6
|
+
Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
var patchBrowser = () => {
|
|
9
9
|
const importMeta = import.meta.url;
|
|
@@ -1,21 +1,17 @@
|
|
|
1
1
|
const NAMESPACE = 'general-input';
|
|
2
|
-
const BUILD = /* general-input */ { 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: 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,
|
|
2
|
+
const BUILD = /* general-input */ { 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: 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: false, 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: true };
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
|
-
Stencil Client Platform v4.
|
|
5
|
+
Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
6
6
|
*/
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __export = (target, all) => {
|
|
9
9
|
for (var name in all)
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
// src/client/client-host-ref.ts
|
|
14
12
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
15
13
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
16
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
17
|
-
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
18
|
-
};
|
|
14
|
+
var registerInstance = (lazyInstance, hostRef) => hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
19
15
|
var registerHost = (hostElement, cmpMeta) => {
|
|
20
16
|
const hostRef = {
|
|
21
17
|
$flags$: 0,
|
|
@@ -28,8 +24,7 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
28
24
|
hostElement["s-p"] = [];
|
|
29
25
|
hostElement["s-rc"] = [];
|
|
30
26
|
}
|
|
31
|
-
|
|
32
|
-
return ref;
|
|
27
|
+
return hostRefs.set(hostElement, hostRef);
|
|
33
28
|
};
|
|
34
29
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
35
30
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -74,22 +69,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
74
69
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
75
70
|
/* webpackMode: "lazy" */
|
|
76
71
|
`./${bundleId}.entry.js${""}`
|
|
77
|
-
).then(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
cmpModules.set(bundleId, importedModule);
|
|
81
|
-
}
|
|
82
|
-
return importedModule[exportName];
|
|
83
|
-
},
|
|
84
|
-
(e) => {
|
|
85
|
-
consoleError(e, hostRef.$hostElement$);
|
|
72
|
+
).then((importedModule) => {
|
|
73
|
+
{
|
|
74
|
+
cmpModules.set(bundleId, importedModule);
|
|
86
75
|
}
|
|
87
|
-
|
|
76
|
+
return importedModule[exportName];
|
|
77
|
+
}, consoleError);
|
|
88
78
|
};
|
|
89
79
|
|
|
90
80
|
// src/client/client-style.ts
|
|
91
81
|
var styles = /* @__PURE__ */ new Map();
|
|
92
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
93
82
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
94
83
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
95
84
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -163,6 +152,12 @@ var flush = () => {
|
|
|
163
152
|
};
|
|
164
153
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
165
154
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
155
|
+
|
|
156
|
+
// src/utils/constants.ts
|
|
157
|
+
var EMPTY_OBJ = {};
|
|
158
|
+
|
|
159
|
+
// src/utils/helpers.ts
|
|
160
|
+
var isDef = (v) => v != null;
|
|
166
161
|
var isComplexType = (o) => {
|
|
167
162
|
o = typeof o;
|
|
168
163
|
return o === "object" || o === "function";
|
|
@@ -363,7 +358,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
363
358
|
}
|
|
364
359
|
if (!appliedStyles.has(scopeId2)) {
|
|
365
360
|
{
|
|
366
|
-
styleElm =
|
|
361
|
+
styleElm = doc.createElement("style");
|
|
367
362
|
styleElm.innerHTML = style;
|
|
368
363
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
369
364
|
if (nonce != null) {
|
|
@@ -373,10 +368,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
373
368
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
374
369
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
375
370
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
376
|
-
styleContainerNode.insertBefore(
|
|
377
|
-
styleElm,
|
|
378
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
379
|
-
);
|
|
371
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
380
372
|
} else if ("host" in styleContainerNode) {
|
|
381
373
|
if (supportsConstructableStylesheets) {
|
|
382
374
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -394,7 +386,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
394
386
|
styleContainerNode.append(styleElm);
|
|
395
387
|
}
|
|
396
388
|
}
|
|
397
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
389
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
398
390
|
styleContainerNode.insertBefore(styleElm, null);
|
|
399
391
|
}
|
|
400
392
|
}
|
|
@@ -419,25 +411,23 @@ var attachStyles = (hostRef) => {
|
|
|
419
411
|
const scopeId2 = addStyle(
|
|
420
412
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
421
413
|
cmpMeta);
|
|
422
|
-
if (
|
|
414
|
+
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
423
415
|
elm["s-sc"] = scopeId2;
|
|
424
416
|
elm.classList.add(scopeId2 + "-h");
|
|
425
417
|
}
|
|
426
418
|
endAttachStyles();
|
|
427
419
|
};
|
|
428
420
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
429
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
421
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
430
422
|
if (oldValue !== newValue) {
|
|
431
423
|
let isProp = isMemberInElement(elm, memberName);
|
|
432
424
|
let ln = memberName.toLowerCase();
|
|
433
425
|
if (memberName === "class") {
|
|
434
426
|
const classList = elm.classList;
|
|
435
427
|
const oldClasses = parseClassList(oldValue);
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
440
|
-
}
|
|
428
|
+
const newClasses = parseClassList(newValue);
|
|
429
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
430
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
441
431
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
442
432
|
if (newValue) {
|
|
443
433
|
newValue(elm);
|
|
@@ -475,7 +465,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
475
465
|
elm.setAttribute(memberName, n);
|
|
476
466
|
}
|
|
477
467
|
}
|
|
478
|
-
} else
|
|
468
|
+
} else {
|
|
479
469
|
elm[memberName] = newValue;
|
|
480
470
|
}
|
|
481
471
|
} catch (e) {
|
|
@@ -497,44 +487,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
497
487
|
}
|
|
498
488
|
};
|
|
499
489
|
var parseClassListRegex = /\s/;
|
|
500
|
-
var parseClassList = (value) =>
|
|
501
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
502
|
-
value = value.baseVal;
|
|
503
|
-
}
|
|
504
|
-
if (!value || typeof value !== "string") {
|
|
505
|
-
return [];
|
|
506
|
-
}
|
|
507
|
-
return value.split(parseClassListRegex);
|
|
508
|
-
};
|
|
490
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
509
491
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
510
492
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
511
493
|
|
|
512
494
|
// src/runtime/vdom/update-element.ts
|
|
513
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
495
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
514
496
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
515
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
516
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
497
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
498
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
517
499
|
{
|
|
518
500
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
519
501
|
if (!(memberName in newVnodeAttrs)) {
|
|
520
|
-
setAccessor(
|
|
521
|
-
elm,
|
|
522
|
-
memberName,
|
|
523
|
-
oldVnodeAttrs[memberName],
|
|
524
|
-
void 0,
|
|
525
|
-
isSvgMode2,
|
|
526
|
-
newVnode.$flags$);
|
|
502
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
527
503
|
}
|
|
528
504
|
}
|
|
529
505
|
}
|
|
530
506
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
531
|
-
setAccessor(
|
|
532
|
-
elm,
|
|
533
|
-
memberName,
|
|
534
|
-
oldVnodeAttrs[memberName],
|
|
535
|
-
newVnodeAttrs[memberName],
|
|
536
|
-
isSvgMode2,
|
|
537
|
-
newVnode.$flags$);
|
|
507
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
538
508
|
}
|
|
539
509
|
};
|
|
540
510
|
function sortedAttrNames(attrNames) {
|
|
@@ -546,10 +516,13 @@ function sortedAttrNames(attrNames) {
|
|
|
546
516
|
attrNames
|
|
547
517
|
);
|
|
548
518
|
}
|
|
519
|
+
|
|
520
|
+
// src/runtime/vdom/vdom-render.ts
|
|
521
|
+
var scopeId;
|
|
549
522
|
var hostTagName;
|
|
550
523
|
var useNativeShadowDom = false;
|
|
551
524
|
var isSvgMode = false;
|
|
552
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
525
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
553
526
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
554
527
|
let i2 = 0;
|
|
555
528
|
let elm;
|
|
@@ -563,6 +536,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
563
536
|
{
|
|
564
537
|
updateElement(null, newVNode2, isSvgMode);
|
|
565
538
|
}
|
|
539
|
+
const rootNode = elm.getRootNode();
|
|
540
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
541
|
+
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
542
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
543
|
+
}
|
|
566
544
|
if (newVNode2.$children$) {
|
|
567
545
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
568
546
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -692,9 +670,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
692
670
|
if (!isInitialRender) {
|
|
693
671
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
694
672
|
}
|
|
695
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
696
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
697
|
-
}
|
|
698
673
|
return true;
|
|
699
674
|
}
|
|
700
675
|
return false;
|
|
@@ -734,9 +709,8 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
734
709
|
}
|
|
735
710
|
};
|
|
736
711
|
var insertBefore = (parent, newNode, reference) => {
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}
|
|
712
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
713
|
+
return inserted;
|
|
740
714
|
};
|
|
741
715
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
742
716
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -761,21 +735,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
761
735
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
762
736
|
hostRef.$vnode$ = rootVnode;
|
|
763
737
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
764
|
-
|
|
738
|
+
{
|
|
739
|
+
scopeId = hostElm["s-sc"];
|
|
740
|
+
}
|
|
741
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
765
742
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
766
743
|
};
|
|
767
744
|
|
|
768
745
|
// src/runtime/update-component.ts
|
|
769
746
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
770
747
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
771
|
-
|
|
772
|
-
new Promise(
|
|
773
|
-
(r) => hostRef.$onRenderResolve$ = () => {
|
|
774
|
-
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
775
|
-
r();
|
|
776
|
-
}
|
|
777
|
-
)
|
|
778
|
-
);
|
|
748
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
779
749
|
}
|
|
780
750
|
};
|
|
781
751
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -804,12 +774,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
804
774
|
{
|
|
805
775
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
806
776
|
if (hostRef.$queuedListeners$) {
|
|
807
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event
|
|
777
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
808
778
|
hostRef.$queuedListeners$ = void 0;
|
|
809
779
|
}
|
|
810
780
|
}
|
|
811
781
|
{
|
|
812
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
|
782
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
813
783
|
}
|
|
814
784
|
}
|
|
815
785
|
endSchedule();
|
|
@@ -878,7 +848,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
878
848
|
const instance = hostRef.$lazyInstance$ ;
|
|
879
849
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
880
850
|
{
|
|
881
|
-
safeCall(instance, "componentDidRender"
|
|
851
|
+
safeCall(instance, "componentDidRender");
|
|
882
852
|
}
|
|
883
853
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
884
854
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -886,7 +856,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
886
856
|
addHydratedFlag(elm);
|
|
887
857
|
}
|
|
888
858
|
{
|
|
889
|
-
safeCall(instance, "componentDidLoad"
|
|
859
|
+
safeCall(instance, "componentDidLoad");
|
|
890
860
|
}
|
|
891
861
|
endPostUpdate();
|
|
892
862
|
{
|
|
@@ -910,14 +880,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
910
880
|
}
|
|
911
881
|
};
|
|
912
882
|
var appDidLoad = (who) => {
|
|
883
|
+
{
|
|
884
|
+
addHydratedFlag(doc.documentElement);
|
|
885
|
+
}
|
|
913
886
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
914
887
|
};
|
|
915
|
-
var safeCall = (instance, method, arg
|
|
888
|
+
var safeCall = (instance, method, arg) => {
|
|
916
889
|
if (instance && instance[method]) {
|
|
917
890
|
try {
|
|
918
891
|
return instance[method](arg);
|
|
919
892
|
} catch (e) {
|
|
920
|
-
consoleError(e
|
|
893
|
+
consoleError(e);
|
|
921
894
|
}
|
|
922
895
|
}
|
|
923
896
|
return void 0;
|
|
@@ -976,68 +949,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
976
949
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
977
950
|
members.map(([memberName, [memberFlags]]) => {
|
|
978
951
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
979
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
980
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
981
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
982
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
983
|
-
Object.defineProperty(prototype, memberName, {
|
|
984
|
-
get() {
|
|
985
|
-
{
|
|
986
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
987
|
-
return getValue(this, memberName);
|
|
988
|
-
}
|
|
989
|
-
const ref = getHostRef(this);
|
|
990
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
991
|
-
if (!instance) return;
|
|
992
|
-
return instance[memberName];
|
|
993
|
-
}
|
|
994
|
-
},
|
|
995
|
-
configurable: true,
|
|
996
|
-
enumerable: true
|
|
997
|
-
});
|
|
998
|
-
}
|
|
999
952
|
Object.defineProperty(prototype, memberName, {
|
|
953
|
+
get() {
|
|
954
|
+
return getValue(this, memberName);
|
|
955
|
+
},
|
|
1000
956
|
set(newValue) {
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
1006
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1007
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1008
|
-
}
|
|
1009
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1010
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1011
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1012
|
-
return;
|
|
1013
|
-
}
|
|
1014
|
-
{
|
|
1015
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1016
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1017
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1018
|
-
ref.$onReadyPromise$.then(() => {
|
|
1019
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1020
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
1021
|
-
}
|
|
1022
|
-
});
|
|
1023
|
-
}
|
|
1024
|
-
return;
|
|
1025
|
-
}
|
|
1026
|
-
const setterSetVal = () => {
|
|
1027
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
1028
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1029
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1030
|
-
}
|
|
1031
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1032
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1033
|
-
};
|
|
1034
|
-
if (ref.$lazyInstance$) {
|
|
1035
|
-
setterSetVal();
|
|
1036
|
-
} else {
|
|
1037
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
}
|
|
957
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
958
|
+
},
|
|
959
|
+
configurable: true,
|
|
960
|
+
enumerable: true
|
|
1041
961
|
});
|
|
1042
962
|
}
|
|
1043
963
|
});
|
|
@@ -1047,7 +967,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1047
967
|
plt.jmp(() => {
|
|
1048
968
|
var _a2;
|
|
1049
969
|
const propName = attrNameToPropName.get(attrName);
|
|
1050
|
-
if (this.hasOwnProperty(propName)
|
|
970
|
+
if (this.hasOwnProperty(propName)) {
|
|
1051
971
|
newValue = this[propName];
|
|
1052
972
|
delete this[propName];
|
|
1053
973
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1067,11 +987,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1067
987
|
}
|
|
1068
988
|
return;
|
|
1069
989
|
}
|
|
1070
|
-
|
|
1071
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1072
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1073
|
-
this[propName] = newValue;
|
|
1074
|
-
}
|
|
990
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1075
991
|
});
|
|
1076
992
|
};
|
|
1077
993
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1100,7 +1016,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1100
1016
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1101
1017
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1102
1018
|
if (bundleId) {
|
|
1103
|
-
const CstrImport = loadModule(cmpMeta
|
|
1019
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1104
1020
|
if (CstrImport && "then" in CstrImport) {
|
|
1105
1021
|
const endLoad = uniqueTime();
|
|
1106
1022
|
Cstr = await CstrImport;
|
|
@@ -1125,7 +1041,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1125
1041
|
try {
|
|
1126
1042
|
new Cstr(hostRef);
|
|
1127
1043
|
} catch (e) {
|
|
1128
|
-
consoleError(e
|
|
1044
|
+
consoleError(e);
|
|
1129
1045
|
}
|
|
1130
1046
|
{
|
|
1131
1047
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1134,7 +1050,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1134
1050
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1135
1051
|
}
|
|
1136
1052
|
endNewInstance();
|
|
1137
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1053
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1138
1054
|
} else {
|
|
1139
1055
|
Cstr = elm.constructor;
|
|
1140
1056
|
const cmpTag = elm.localName;
|
|
@@ -1161,9 +1077,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1161
1077
|
schedule();
|
|
1162
1078
|
}
|
|
1163
1079
|
};
|
|
1164
|
-
var fireConnectedCallback = (instance
|
|
1080
|
+
var fireConnectedCallback = (instance) => {
|
|
1165
1081
|
{
|
|
1166
|
-
safeCall(instance, "connectedCallback"
|
|
1082
|
+
safeCall(instance, "connectedCallback");
|
|
1167
1083
|
}
|
|
1168
1084
|
};
|
|
1169
1085
|
|
|
@@ -1199,17 +1115,17 @@ var connectedCallback = (elm) => {
|
|
|
1199
1115
|
} else {
|
|
1200
1116
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1201
1117
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1202
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1118
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1203
1119
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1204
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
1120
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
|
|
1205
1121
|
}
|
|
1206
1122
|
}
|
|
1207
1123
|
endConnected();
|
|
1208
1124
|
}
|
|
1209
1125
|
};
|
|
1210
|
-
var disconnectInstance = (instance
|
|
1126
|
+
var disconnectInstance = (instance) => {
|
|
1211
1127
|
{
|
|
1212
|
-
safeCall(instance, "disconnectedCallback"
|
|
1128
|
+
safeCall(instance, "disconnectedCallback");
|
|
1213
1129
|
}
|
|
1214
1130
|
};
|
|
1215
1131
|
var disconnectedCallback = async (elm) => {
|
|
@@ -1222,17 +1138,11 @@ var disconnectedCallback = async (elm) => {
|
|
|
1222
1138
|
}
|
|
1223
1139
|
}
|
|
1224
1140
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1225
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1141
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1226
1142
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1227
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1143
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1228
1144
|
}
|
|
1229
1145
|
}
|
|
1230
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1231
|
-
rootAppliedStyles.delete(elm);
|
|
1232
|
-
}
|
|
1233
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1234
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1235
|
-
}
|
|
1236
1146
|
};
|
|
1237
1147
|
|
|
1238
1148
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1317,17 +1227,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1317
1227
|
}
|
|
1318
1228
|
disconnectedCallback() {
|
|
1319
1229
|
plt.jmp(() => disconnectedCallback(this));
|
|
1320
|
-
plt.raf(() => {
|
|
1321
|
-
var _a3;
|
|
1322
|
-
const hostRef = getHostRef(this);
|
|
1323
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1324
|
-
if (i2 > -1) {
|
|
1325
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1326
|
-
}
|
|
1327
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1328
|
-
delete hostRef.$vnode$.$elm$;
|
|
1329
|
-
}
|
|
1330
|
-
});
|
|
1331
1230
|
}
|
|
1332
1231
|
componentOnReady() {
|
|
1333
1232
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1391,7 +1290,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1391
1290
|
}
|
|
1392
1291
|
}
|
|
1393
1292
|
} catch (e) {
|
|
1394
|
-
consoleError(e
|
|
1293
|
+
consoleError(e);
|
|
1395
1294
|
}
|
|
1396
1295
|
};
|
|
1397
1296
|
var getHostListenerTarget = (elm, flags) => {
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-542cff81.js';
|
|
2
|
+
export { s as setNonce } from './index-542cff81.js';
|
|
3
3
|
import { g as globalScripts } from './app-globals-0f993ce5.js';
|
|
4
4
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-542cff81.js';
|
|
2
2
|
import { t as translate } from './locale.utils-0883d9a6.js';
|
|
3
3
|
import { t as tooltipIconSvg } from './tooltipIcon-0a5a06a2.js';
|
|
4
4
|
|
|
@@ -10,23 +10,27 @@ const ToggleCheckboxInput = class {
|
|
|
10
10
|
registerInstance(this, hostRef);
|
|
11
11
|
this.sendValidityState = createEvent(this, "sendValidityState", 7);
|
|
12
12
|
this.sendInputValue = createEvent(this, "sendInputValue", 7);
|
|
13
|
-
/**
|
|
14
|
-
* Default value for the input.
|
|
15
|
-
*/
|
|
16
|
-
this.defaultValue = '';
|
|
17
|
-
/**
|
|
18
|
-
* Client custom styling via inline style
|
|
19
|
-
*/
|
|
20
|
-
this.clientStyling = '';
|
|
21
|
-
this.limitStylingAppends = false;
|
|
22
|
-
this.showTooltip = false;
|
|
23
|
-
this.showFields = this.defaultValue === 'true';
|
|
24
13
|
this.value = '';
|
|
25
14
|
this.setClientStyling = () => {
|
|
26
15
|
let sheet = document.createElement('style');
|
|
27
16
|
sheet.innerHTML = this.clientStyling;
|
|
28
17
|
this.stylingContainer.prepend(sheet);
|
|
29
18
|
};
|
|
19
|
+
this.name = undefined;
|
|
20
|
+
this.displayName = undefined;
|
|
21
|
+
this.defaultValue = '';
|
|
22
|
+
this.options = undefined;
|
|
23
|
+
this.autofilled = undefined;
|
|
24
|
+
this.tooltip = undefined;
|
|
25
|
+
this.validation = undefined;
|
|
26
|
+
this.language = undefined;
|
|
27
|
+
this.emitValue = undefined;
|
|
28
|
+
this.clientStyling = '';
|
|
29
|
+
this.errorMessage = undefined;
|
|
30
|
+
this.isValid = undefined;
|
|
31
|
+
this.limitStylingAppends = false;
|
|
32
|
+
this.showTooltip = false;
|
|
33
|
+
this.showFields = this.defaultValue === 'true';
|
|
30
34
|
}
|
|
31
35
|
validityStateHandler(inputStateEvent) {
|
|
32
36
|
this.sendValidityState.emit(inputStateEvent);
|