@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
|
@@ -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-01420a64.js');
|
|
6
6
|
const locale_utils = require('./locale.utils-345d0792.js');
|
|
7
7
|
|
|
8
8
|
const generalInputCss = ":host{display:block;height:100%}";
|
|
@@ -11,28 +11,29 @@ const GeneralInputStyle0 = generalInputCss;
|
|
|
11
11
|
const GeneralInput = class {
|
|
12
12
|
constructor(hostRef) {
|
|
13
13
|
index.registerInstance(this, hostRef);
|
|
14
|
-
/**
|
|
15
|
-
* Type the general-input should take. Can take the default HTML input values.
|
|
16
|
-
*/
|
|
17
|
-
this.type = 'text';
|
|
18
|
-
/**
|
|
19
|
-
* Client custom styling via inline style
|
|
20
|
-
*/
|
|
21
|
-
this.clientStyling = '';
|
|
22
|
-
/**
|
|
23
|
-
* Translations via URL
|
|
24
|
-
*/
|
|
25
|
-
this.translationUrl = '';
|
|
26
|
-
/**
|
|
27
|
-
* Emit event on click
|
|
28
|
-
*/
|
|
29
|
-
this.emitOnClick = false;
|
|
30
14
|
this.handleClick = (event) => {
|
|
31
15
|
if (this.emitOnClick) {
|
|
32
16
|
event.stopPropagation();
|
|
33
17
|
window.postMessage({ type: `registration${this.name}Clicked` }, window.location.href);
|
|
34
18
|
}
|
|
35
19
|
};
|
|
20
|
+
this.type = 'text';
|
|
21
|
+
this.name = undefined;
|
|
22
|
+
this.displayName = undefined;
|
|
23
|
+
this.placeholder = undefined;
|
|
24
|
+
this.action = undefined;
|
|
25
|
+
this.validation = undefined;
|
|
26
|
+
this.options = undefined;
|
|
27
|
+
this.language = undefined;
|
|
28
|
+
this.autofilled = undefined;
|
|
29
|
+
this.tooltip = undefined;
|
|
30
|
+
this.defaultValue = undefined;
|
|
31
|
+
this.emitValue = undefined;
|
|
32
|
+
this.isDuplicateInput = undefined;
|
|
33
|
+
this.clientStyling = '';
|
|
34
|
+
this.dateFormat = undefined;
|
|
35
|
+
this.translationUrl = '';
|
|
36
|
+
this.emitOnClick = false;
|
|
36
37
|
}
|
|
37
38
|
connectedCallback() {
|
|
38
39
|
if (this.translationUrl) {
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-01420a64.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
|
-
Stencil Client Patch Browser v4.
|
|
9
|
+
Stencil Client Patch Browser v4.22.3 | MIT Licensed | https://stenciljs.com
|
|
10
10
|
*/
|
|
11
11
|
var patchBrowser = () => {
|
|
12
12
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('general-input.cjs.js', document.baseURI).href));
|
|
@@ -21,23 +21,19 @@ function _interopNamespace(e) {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
const NAMESPACE = 'general-input';
|
|
24
|
-
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,
|
|
24
|
+
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 };
|
|
25
25
|
|
|
26
26
|
/*
|
|
27
|
-
Stencil Client Platform v4.
|
|
27
|
+
Stencil Client Platform v4.22.3 | 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);
|
|
@@ -96,22 +91,16 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
96
91
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
97
92
|
/* webpackMode: "lazy" */
|
|
98
93
|
`./${bundleId}.entry.js${""}`
|
|
99
|
-
)); }).then(
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
cmpModules.set(bundleId, importedModule);
|
|
103
|
-
}
|
|
104
|
-
return importedModule[exportName];
|
|
105
|
-
},
|
|
106
|
-
(e) => {
|
|
107
|
-
consoleError(e, hostRef.$hostElement$);
|
|
94
|
+
)); }).then((importedModule) => {
|
|
95
|
+
{
|
|
96
|
+
cmpModules.set(bundleId, importedModule);
|
|
108
97
|
}
|
|
109
|
-
|
|
98
|
+
return importedModule[exportName];
|
|
99
|
+
}, consoleError);
|
|
110
100
|
};
|
|
111
101
|
|
|
112
102
|
// src/client/client-style.ts
|
|
113
103
|
var styles = /* @__PURE__ */ new Map();
|
|
114
|
-
var HYDRATED_STYLE_ID = "sty-id";
|
|
115
104
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
116
105
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
117
106
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -185,6 +174,12 @@ var flush = () => {
|
|
|
185
174
|
};
|
|
186
175
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
187
176
|
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
177
|
+
|
|
178
|
+
// src/utils/constants.ts
|
|
179
|
+
var EMPTY_OBJ = {};
|
|
180
|
+
|
|
181
|
+
// src/utils/helpers.ts
|
|
182
|
+
var isDef = (v) => v != null;
|
|
188
183
|
var isComplexType = (o) => {
|
|
189
184
|
o = typeof o;
|
|
190
185
|
return o === "object" || o === "function";
|
|
@@ -385,7 +380,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
385
380
|
}
|
|
386
381
|
if (!appliedStyles.has(scopeId2)) {
|
|
387
382
|
{
|
|
388
|
-
styleElm =
|
|
383
|
+
styleElm = doc.createElement("style");
|
|
389
384
|
styleElm.innerHTML = style;
|
|
390
385
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
391
386
|
if (nonce != null) {
|
|
@@ -395,10 +390,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
395
390
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
396
391
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
397
392
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
398
|
-
styleContainerNode.insertBefore(
|
|
399
|
-
styleElm,
|
|
400
|
-
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
401
|
-
);
|
|
393
|
+
styleContainerNode.insertBefore(styleElm, referenceNode2);
|
|
402
394
|
} else if ("host" in styleContainerNode) {
|
|
403
395
|
if (supportsConstructableStylesheets) {
|
|
404
396
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -416,7 +408,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
416
408
|
styleContainerNode.append(styleElm);
|
|
417
409
|
}
|
|
418
410
|
}
|
|
419
|
-
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {
|
|
411
|
+
if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */ && styleContainerNode.nodeName !== "HEAD") {
|
|
420
412
|
styleContainerNode.insertBefore(styleElm, null);
|
|
421
413
|
}
|
|
422
414
|
}
|
|
@@ -441,25 +433,23 @@ var attachStyles = (hostRef) => {
|
|
|
441
433
|
const scopeId2 = addStyle(
|
|
442
434
|
elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),
|
|
443
435
|
cmpMeta);
|
|
444
|
-
if (
|
|
436
|
+
if (flags & 10 /* needsScopedEncapsulation */ && flags & 2 /* scopedCssEncapsulation */) {
|
|
445
437
|
elm["s-sc"] = scopeId2;
|
|
446
438
|
elm.classList.add(scopeId2 + "-h");
|
|
447
439
|
}
|
|
448
440
|
endAttachStyles();
|
|
449
441
|
};
|
|
450
442
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
451
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags
|
|
443
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
452
444
|
if (oldValue !== newValue) {
|
|
453
445
|
let isProp = isMemberInElement(elm, memberName);
|
|
454
446
|
let ln = memberName.toLowerCase();
|
|
455
447
|
if (memberName === "class") {
|
|
456
448
|
const classList = elm.classList;
|
|
457
449
|
const oldClasses = parseClassList(oldValue);
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
462
|
-
}
|
|
450
|
+
const newClasses = parseClassList(newValue);
|
|
451
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
452
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
463
453
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
464
454
|
if (newValue) {
|
|
465
455
|
newValue(elm);
|
|
@@ -497,7 +487,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
497
487
|
elm.setAttribute(memberName, n);
|
|
498
488
|
}
|
|
499
489
|
}
|
|
500
|
-
} else
|
|
490
|
+
} else {
|
|
501
491
|
elm[memberName] = newValue;
|
|
502
492
|
}
|
|
503
493
|
} catch (e) {
|
|
@@ -519,44 +509,24 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
519
509
|
}
|
|
520
510
|
};
|
|
521
511
|
var parseClassListRegex = /\s/;
|
|
522
|
-
var parseClassList = (value) =>
|
|
523
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
524
|
-
value = value.baseVal;
|
|
525
|
-
}
|
|
526
|
-
if (!value || typeof value !== "string") {
|
|
527
|
-
return [];
|
|
528
|
-
}
|
|
529
|
-
return value.split(parseClassListRegex);
|
|
530
|
-
};
|
|
512
|
+
var parseClassList = (value) => !value ? [] : value.split(parseClassListRegex);
|
|
531
513
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
532
514
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
533
515
|
|
|
534
516
|
// src/runtime/vdom/update-element.ts
|
|
535
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2
|
|
517
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
536
518
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
537
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
538
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
519
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || EMPTY_OBJ;
|
|
520
|
+
const newVnodeAttrs = newVnode.$attrs$ || EMPTY_OBJ;
|
|
539
521
|
{
|
|
540
522
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
541
523
|
if (!(memberName in newVnodeAttrs)) {
|
|
542
|
-
setAccessor(
|
|
543
|
-
elm,
|
|
544
|
-
memberName,
|
|
545
|
-
oldVnodeAttrs[memberName],
|
|
546
|
-
void 0,
|
|
547
|
-
isSvgMode2,
|
|
548
|
-
newVnode.$flags$);
|
|
524
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
549
525
|
}
|
|
550
526
|
}
|
|
551
527
|
}
|
|
552
528
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
553
|
-
setAccessor(
|
|
554
|
-
elm,
|
|
555
|
-
memberName,
|
|
556
|
-
oldVnodeAttrs[memberName],
|
|
557
|
-
newVnodeAttrs[memberName],
|
|
558
|
-
isSvgMode2,
|
|
559
|
-
newVnode.$flags$);
|
|
529
|
+
setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
560
530
|
}
|
|
561
531
|
};
|
|
562
532
|
function sortedAttrNames(attrNames) {
|
|
@@ -568,10 +538,13 @@ function sortedAttrNames(attrNames) {
|
|
|
568
538
|
attrNames
|
|
569
539
|
);
|
|
570
540
|
}
|
|
541
|
+
|
|
542
|
+
// src/runtime/vdom/vdom-render.ts
|
|
543
|
+
var scopeId;
|
|
571
544
|
var hostTagName;
|
|
572
545
|
var useNativeShadowDom = false;
|
|
573
546
|
var isSvgMode = false;
|
|
574
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
547
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
575
548
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
576
549
|
let i2 = 0;
|
|
577
550
|
let elm;
|
|
@@ -585,6 +558,11 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
585
558
|
{
|
|
586
559
|
updateElement(null, newVNode2, isSvgMode);
|
|
587
560
|
}
|
|
561
|
+
const rootNode = elm.getRootNode();
|
|
562
|
+
const isElementWithinShadowRoot = !rootNode.querySelector("body");
|
|
563
|
+
if (!isElementWithinShadowRoot && BUILD.scoped && isDef(scopeId) && elm["s-si"] !== scopeId) {
|
|
564
|
+
elm.classList.add(elm["s-si"] = scopeId);
|
|
565
|
+
}
|
|
588
566
|
if (newVNode2.$children$) {
|
|
589
567
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
590
568
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -714,9 +692,6 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
714
692
|
if (!isInitialRender) {
|
|
715
693
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
716
694
|
}
|
|
717
|
-
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
718
|
-
leftVNode.$key$ = rightVNode.$key$;
|
|
719
|
-
}
|
|
720
695
|
return true;
|
|
721
696
|
}
|
|
722
697
|
return false;
|
|
@@ -756,9 +731,8 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
756
731
|
}
|
|
757
732
|
};
|
|
758
733
|
var insertBefore = (parent, newNode, reference) => {
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
}
|
|
734
|
+
const inserted = parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
735
|
+
return inserted;
|
|
762
736
|
};
|
|
763
737
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
764
738
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -783,21 +757,17 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
783
757
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
784
758
|
hostRef.$vnode$ = rootVnode;
|
|
785
759
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
786
|
-
|
|
760
|
+
{
|
|
761
|
+
scopeId = hostElm["s-sc"];
|
|
762
|
+
}
|
|
763
|
+
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
787
764
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
788
765
|
};
|
|
789
766
|
|
|
790
767
|
// src/runtime/update-component.ts
|
|
791
768
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
792
769
|
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
|
-
);
|
|
770
|
+
ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = r));
|
|
801
771
|
}
|
|
802
772
|
};
|
|
803
773
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -826,12 +796,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
826
796
|
{
|
|
827
797
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
828
798
|
if (hostRef.$queuedListeners$) {
|
|
829
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event
|
|
799
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
830
800
|
hostRef.$queuedListeners$ = void 0;
|
|
831
801
|
}
|
|
832
802
|
}
|
|
833
803
|
{
|
|
834
|
-
maybePromise = safeCall(instance, "componentWillLoad"
|
|
804
|
+
maybePromise = safeCall(instance, "componentWillLoad");
|
|
835
805
|
}
|
|
836
806
|
}
|
|
837
807
|
endSchedule();
|
|
@@ -900,7 +870,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
900
870
|
const instance = hostRef.$lazyInstance$ ;
|
|
901
871
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
902
872
|
{
|
|
903
|
-
safeCall(instance, "componentDidRender"
|
|
873
|
+
safeCall(instance, "componentDidRender");
|
|
904
874
|
}
|
|
905
875
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
906
876
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -908,7 +878,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
908
878
|
addHydratedFlag(elm);
|
|
909
879
|
}
|
|
910
880
|
{
|
|
911
|
-
safeCall(instance, "componentDidLoad"
|
|
881
|
+
safeCall(instance, "componentDidLoad");
|
|
912
882
|
}
|
|
913
883
|
endPostUpdate();
|
|
914
884
|
{
|
|
@@ -932,14 +902,17 @@ var postUpdateComponent = (hostRef) => {
|
|
|
932
902
|
}
|
|
933
903
|
};
|
|
934
904
|
var appDidLoad = (who) => {
|
|
905
|
+
{
|
|
906
|
+
addHydratedFlag(doc.documentElement);
|
|
907
|
+
}
|
|
935
908
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
936
909
|
};
|
|
937
|
-
var safeCall = (instance, method, arg
|
|
910
|
+
var safeCall = (instance, method, arg) => {
|
|
938
911
|
if (instance && instance[method]) {
|
|
939
912
|
try {
|
|
940
913
|
return instance[method](arg);
|
|
941
914
|
} catch (e) {
|
|
942
|
-
consoleError(e
|
|
915
|
+
consoleError(e);
|
|
943
916
|
}
|
|
944
917
|
}
|
|
945
918
|
return void 0;
|
|
@@ -998,68 +971,15 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
998
971
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
999
972
|
members.map(([memberName, [memberFlags]]) => {
|
|
1000
973
|
if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
|
|
1001
|
-
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1002
|
-
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;
|
|
1003
|
-
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;
|
|
1004
|
-
if (flags & 1 /* isElementConstructor */ || !origGetter) {
|
|
1005
|
-
Object.defineProperty(prototype, memberName, {
|
|
1006
|
-
get() {
|
|
1007
|
-
{
|
|
1008
|
-
if ((cmpMeta.$members$[memberName][0] & 2048 /* Getter */) === 0) {
|
|
1009
|
-
return getValue(this, memberName);
|
|
1010
|
-
}
|
|
1011
|
-
const ref = getHostRef(this);
|
|
1012
|
-
const instance = ref ? ref.$lazyInstance$ : prototype;
|
|
1013
|
-
if (!instance) return;
|
|
1014
|
-
return instance[memberName];
|
|
1015
|
-
}
|
|
1016
|
-
},
|
|
1017
|
-
configurable: true,
|
|
1018
|
-
enumerable: true
|
|
1019
|
-
});
|
|
1020
|
-
}
|
|
1021
974
|
Object.defineProperty(prototype, memberName, {
|
|
975
|
+
get() {
|
|
976
|
+
return getValue(this, memberName);
|
|
977
|
+
},
|
|
1022
978
|
set(newValue) {
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
newValue = ref.$instanceValues$.get(memberName);
|
|
1028
|
-
} else if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1029
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1030
|
-
}
|
|
1031
|
-
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1032
|
-
newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1033
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1034
|
-
return;
|
|
1035
|
-
}
|
|
1036
|
-
{
|
|
1037
|
-
if ((flags & 1 /* isElementConstructor */) === 0 || (cmpMeta.$members$[memberName][0] & 4096 /* Setter */) === 0) {
|
|
1038
|
-
setValue(this, memberName, newValue, cmpMeta);
|
|
1039
|
-
if (flags & 1 /* isElementConstructor */ && !ref.$lazyInstance$) {
|
|
1040
|
-
ref.$onReadyPromise$.then(() => {
|
|
1041
|
-
if (cmpMeta.$members$[memberName][0] & 4096 /* Setter */ && ref.$lazyInstance$[memberName] !== ref.$instanceValues$.get(memberName)) {
|
|
1042
|
-
ref.$lazyInstance$[memberName] = newValue;
|
|
1043
|
-
}
|
|
1044
|
-
});
|
|
1045
|
-
}
|
|
1046
|
-
return;
|
|
1047
|
-
}
|
|
1048
|
-
const setterSetVal = () => {
|
|
1049
|
-
const currentValue = ref.$lazyInstance$[memberName];
|
|
1050
|
-
if (!ref.$instanceValues$.get(memberName) && currentValue) {
|
|
1051
|
-
ref.$instanceValues$.set(memberName, currentValue);
|
|
1052
|
-
}
|
|
1053
|
-
ref.$lazyInstance$[memberName] = parsePropertyValue(newValue, memberFlags);
|
|
1054
|
-
setValue(this, memberName, ref.$lazyInstance$[memberName], cmpMeta);
|
|
1055
|
-
};
|
|
1056
|
-
if (ref.$lazyInstance$) {
|
|
1057
|
-
setterSetVal();
|
|
1058
|
-
} else {
|
|
1059
|
-
ref.$onReadyPromise$.then(() => setterSetVal());
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
979
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
980
|
+
},
|
|
981
|
+
configurable: true,
|
|
982
|
+
enumerable: true
|
|
1063
983
|
});
|
|
1064
984
|
}
|
|
1065
985
|
});
|
|
@@ -1069,7 +989,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1069
989
|
plt.jmp(() => {
|
|
1070
990
|
var _a2;
|
|
1071
991
|
const propName = attrNameToPropName.get(attrName);
|
|
1072
|
-
if (this.hasOwnProperty(propName)
|
|
992
|
+
if (this.hasOwnProperty(propName)) {
|
|
1073
993
|
newValue = this[propName];
|
|
1074
994
|
delete this[propName];
|
|
1075
995
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1089,11 +1009,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1089
1009
|
}
|
|
1090
1010
|
return;
|
|
1091
1011
|
}
|
|
1092
|
-
|
|
1093
|
-
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1094
|
-
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1095
|
-
this[propName] = newValue;
|
|
1096
|
-
}
|
|
1012
|
+
this[propName] = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1097
1013
|
});
|
|
1098
1014
|
};
|
|
1099
1015
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1122,7 +1038,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1122
1038
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1123
1039
|
const bundleId = cmpMeta.$lazyBundleId$;
|
|
1124
1040
|
if (bundleId) {
|
|
1125
|
-
const CstrImport = loadModule(cmpMeta
|
|
1041
|
+
const CstrImport = loadModule(cmpMeta);
|
|
1126
1042
|
if (CstrImport && "then" in CstrImport) {
|
|
1127
1043
|
const endLoad = uniqueTime();
|
|
1128
1044
|
Cstr = await CstrImport;
|
|
@@ -1147,7 +1063,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1147
1063
|
try {
|
|
1148
1064
|
new Cstr(hostRef);
|
|
1149
1065
|
} catch (e) {
|
|
1150
|
-
consoleError(e
|
|
1066
|
+
consoleError(e);
|
|
1151
1067
|
}
|
|
1152
1068
|
{
|
|
1153
1069
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1156,7 +1072,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1156
1072
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1157
1073
|
}
|
|
1158
1074
|
endNewInstance();
|
|
1159
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1075
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1160
1076
|
} else {
|
|
1161
1077
|
Cstr = elm.constructor;
|
|
1162
1078
|
const cmpTag = elm.localName;
|
|
@@ -1183,9 +1099,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1183
1099
|
schedule();
|
|
1184
1100
|
}
|
|
1185
1101
|
};
|
|
1186
|
-
var fireConnectedCallback = (instance
|
|
1102
|
+
var fireConnectedCallback = (instance) => {
|
|
1187
1103
|
{
|
|
1188
|
-
safeCall(instance, "connectedCallback"
|
|
1104
|
+
safeCall(instance, "connectedCallback");
|
|
1189
1105
|
}
|
|
1190
1106
|
};
|
|
1191
1107
|
|
|
@@ -1221,17 +1137,17 @@ var connectedCallback = (elm) => {
|
|
|
1221
1137
|
} else {
|
|
1222
1138
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1223
1139
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1224
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1140
|
+
fireConnectedCallback(hostRef.$lazyInstance$);
|
|
1225
1141
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1226
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
1142
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$));
|
|
1227
1143
|
}
|
|
1228
1144
|
}
|
|
1229
1145
|
endConnected();
|
|
1230
1146
|
}
|
|
1231
1147
|
};
|
|
1232
|
-
var disconnectInstance = (instance
|
|
1148
|
+
var disconnectInstance = (instance) => {
|
|
1233
1149
|
{
|
|
1234
|
-
safeCall(instance, "disconnectedCallback"
|
|
1150
|
+
safeCall(instance, "disconnectedCallback");
|
|
1235
1151
|
}
|
|
1236
1152
|
};
|
|
1237
1153
|
var disconnectedCallback = async (elm) => {
|
|
@@ -1244,17 +1160,11 @@ var disconnectedCallback = async (elm) => {
|
|
|
1244
1160
|
}
|
|
1245
1161
|
}
|
|
1246
1162
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1247
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1163
|
+
disconnectInstance(hostRef.$lazyInstance$);
|
|
1248
1164
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1249
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1165
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$));
|
|
1250
1166
|
}
|
|
1251
1167
|
}
|
|
1252
|
-
if (rootAppliedStyles.has(elm)) {
|
|
1253
|
-
rootAppliedStyles.delete(elm);
|
|
1254
|
-
}
|
|
1255
|
-
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1256
|
-
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1257
|
-
}
|
|
1258
1168
|
};
|
|
1259
1169
|
|
|
1260
1170
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1339,17 +1249,6 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1339
1249
|
}
|
|
1340
1250
|
disconnectedCallback() {
|
|
1341
1251
|
plt.jmp(() => disconnectedCallback(this));
|
|
1342
|
-
plt.raf(() => {
|
|
1343
|
-
var _a3;
|
|
1344
|
-
const hostRef = getHostRef(this);
|
|
1345
|
-
const i2 = deferredConnectedCallbacks.findIndex((host) => host === this);
|
|
1346
|
-
if (i2 > -1) {
|
|
1347
|
-
deferredConnectedCallbacks.splice(i2, 1);
|
|
1348
|
-
}
|
|
1349
|
-
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1350
|
-
delete hostRef.$vnode$.$elm$;
|
|
1351
|
-
}
|
|
1352
|
-
});
|
|
1353
1252
|
}
|
|
1354
1253
|
componentOnReady() {
|
|
1355
1254
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1413,7 +1312,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1413
1312
|
}
|
|
1414
1313
|
}
|
|
1415
1314
|
} catch (e) {
|
|
1416
|
-
consoleError(e
|
|
1315
|
+
consoleError(e);
|
|
1417
1316
|
}
|
|
1418
1317
|
};
|
|
1419
1318
|
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-01420a64.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
const defineCustomElements = async (win, options) => {
|
|
@@ -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-01420a64.js');
|
|
6
6
|
const locale_utils = require('./locale.utils-345d0792.js');
|
|
7
7
|
const tooltipIcon = require('./tooltipIcon-7e9ee226.js');
|
|
8
8
|
|
|
@@ -14,23 +14,27 @@ const ToggleCheckboxInput = class {
|
|
|
14
14
|
index.registerInstance(this, hostRef);
|
|
15
15
|
this.sendValidityState = index.createEvent(this, "sendValidityState", 7);
|
|
16
16
|
this.sendInputValue = index.createEvent(this, "sendInputValue", 7);
|
|
17
|
-
/**
|
|
18
|
-
* Default value for the input.
|
|
19
|
-
*/
|
|
20
|
-
this.defaultValue = '';
|
|
21
|
-
/**
|
|
22
|
-
* Client custom styling via inline style
|
|
23
|
-
*/
|
|
24
|
-
this.clientStyling = '';
|
|
25
|
-
this.limitStylingAppends = false;
|
|
26
|
-
this.showTooltip = false;
|
|
27
|
-
this.showFields = this.defaultValue === 'true';
|
|
28
17
|
this.value = '';
|
|
29
18
|
this.setClientStyling = () => {
|
|
30
19
|
let sheet = document.createElement('style');
|
|
31
20
|
sheet.innerHTML = this.clientStyling;
|
|
32
21
|
this.stylingContainer.prepend(sheet);
|
|
33
22
|
};
|
|
23
|
+
this.name = undefined;
|
|
24
|
+
this.displayName = undefined;
|
|
25
|
+
this.defaultValue = '';
|
|
26
|
+
this.options = undefined;
|
|
27
|
+
this.autofilled = undefined;
|
|
28
|
+
this.tooltip = undefined;
|
|
29
|
+
this.validation = undefined;
|
|
30
|
+
this.language = undefined;
|
|
31
|
+
this.emitValue = undefined;
|
|
32
|
+
this.clientStyling = '';
|
|
33
|
+
this.errorMessage = undefined;
|
|
34
|
+
this.isValid = undefined;
|
|
35
|
+
this.limitStylingAppends = false;
|
|
36
|
+
this.showTooltip = false;
|
|
37
|
+
this.showFields = this.defaultValue === 'true';
|
|
34
38
|
}
|
|
35
39
|
validityStateHandler(inputStateEvent) {
|
|
36
40
|
this.sendValidityState.emit(inputStateEvent);
|