@everymatrix/general-input 1.53.0 → 1.53.10
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 +1707 -584
- package/dist/cjs/general-input.cjs.entry.js +17 -18
- package/dist/cjs/general-input.cjs.js +2 -2
- package/dist/cjs/{index-01420a64.js → index-1277658a.js} +171 -76
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/toggle-checkbox-input.cjs.entry.js +12 -16
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +33 -17
- package/dist/collection/components/checkbox-input/checkbox-input.js +29 -14
- package/dist/collection/components/date-input/date-input.js +35 -17
- package/dist/collection/components/email-input/email-input.js +29 -16
- package/dist/collection/components/general-input/general-input.js +51 -18
- package/dist/collection/components/number-input/number-input.js +27 -15
- package/dist/collection/components/password-input/password-input.js +34 -19
- package/dist/collection/components/radio-input/radio-input.js +24 -14
- package/dist/collection/components/select-input/select-input.js +39 -17
- package/dist/collection/components/tel-input/tel-input.js +31 -17
- package/dist/collection/components/text-input/text-input.js +36 -17
- package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +33 -17
- package/dist/esm/checkbox-group-input_10.entry.js +1742 -619
- package/dist/esm/general-input.entry.js +17 -18
- package/dist/esm/general-input.js +3 -3
- package/dist/esm/{index-542cff81.js → index-b1fc8a5f.js} +171 -76
- package/dist/esm/loader.js +2 -2
- package/dist/esm/toggle-checkbox-input.entry.js +12 -16
- package/dist/general-input/general-input.esm.js +1 -1
- package/dist/general-input/p-09c73744.js +2 -0
- package/dist/general-input/p-1922ef4e.entry.js +1 -0
- package/dist/general-input/{p-cc4fcb3f.entry.js → p-5b3e1098.entry.js} +1912 -926
- package/dist/general-input/p-ab0375f4.entry.js +1 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/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-3cab3b95.entry.js +0 -1
- package/dist/general-input/p-3ce1e382.js +0 -2
- package/dist/general-input/p-e5532cb1.entry.js +0 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +0 -2
|
@@ -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-1277658a.js');
|
|
6
6
|
const locale_utils = require('./locale.utils-345d0792.js');
|
|
7
7
|
|
|
8
8
|
const generalInputCss = ":host{display:block;height:100%}";
|
|
@@ -11,29 +11,28 @@ 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;
|
|
14
30
|
this.handleClick = (event) => {
|
|
15
31
|
if (this.emitOnClick) {
|
|
16
32
|
event.stopPropagation();
|
|
17
33
|
window.postMessage({ type: `registration${this.name}Clicked` }, window.location.href);
|
|
18
34
|
}
|
|
19
35
|
};
|
|
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;
|
|
37
36
|
}
|
|
38
37
|
connectedCallback() {
|
|
39
38
|
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-1277658a.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.25.1 | 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,19 +21,23 @@ 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, 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 };
|
|
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, modernPropertyDecls: 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.25.1 | MIT Licensed | https://stenciljs.com
|
|
28
28
|
*/
|
|
29
29
|
var __defProp = Object.defineProperty;
|
|
30
30
|
var __export = (target, all) => {
|
|
31
31
|
for (var name in all)
|
|
32
32
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
33
33
|
};
|
|
34
|
+
|
|
35
|
+
// src/client/client-host-ref.ts
|
|
34
36
|
var hostRefs = /* @__PURE__ */ new WeakMap();
|
|
35
37
|
var getHostRef = (ref) => hostRefs.get(ref);
|
|
36
|
-
var registerInstance = (lazyInstance, hostRef) =>
|
|
38
|
+
var registerInstance = (lazyInstance, hostRef) => {
|
|
39
|
+
hostRefs.set(hostRef.$lazyInstance$ = lazyInstance, hostRef);
|
|
40
|
+
};
|
|
37
41
|
var registerHost = (hostElement, cmpMeta) => {
|
|
38
42
|
const hostRef = {
|
|
39
43
|
$flags$: 0,
|
|
@@ -46,7 +50,8 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
46
50
|
hostElement["s-p"] = [];
|
|
47
51
|
hostElement["s-rc"] = [];
|
|
48
52
|
}
|
|
49
|
-
|
|
53
|
+
const ref = hostRefs.set(hostElement, hostRef);
|
|
54
|
+
return ref;
|
|
50
55
|
};
|
|
51
56
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
52
57
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
@@ -91,16 +96,22 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
91
96
|
/* webpackExclude: /\.system\.entry\.js$/ */
|
|
92
97
|
/* webpackMode: "lazy" */
|
|
93
98
|
`./${bundleId}.entry.js${""}`
|
|
94
|
-
)); }).then(
|
|
95
|
-
{
|
|
96
|
-
|
|
99
|
+
)); }).then(
|
|
100
|
+
(importedModule) => {
|
|
101
|
+
{
|
|
102
|
+
cmpModules.set(bundleId, importedModule);
|
|
103
|
+
}
|
|
104
|
+
return importedModule[exportName];
|
|
105
|
+
},
|
|
106
|
+
(e) => {
|
|
107
|
+
consoleError(e, hostRef.$hostElement$);
|
|
97
108
|
}
|
|
98
|
-
|
|
99
|
-
}, consoleError);
|
|
109
|
+
);
|
|
100
110
|
};
|
|
101
111
|
|
|
102
112
|
// src/client/client-style.ts
|
|
103
113
|
var styles = /* @__PURE__ */ new Map();
|
|
114
|
+
var HYDRATED_STYLE_ID = "sty-id";
|
|
104
115
|
var HYDRATED_CSS = "{visibility:hidden}.hydrated{visibility:inherit}";
|
|
105
116
|
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
106
117
|
var win = typeof window !== "undefined" ? window : {};
|
|
@@ -174,12 +185,6 @@ var flush = () => {
|
|
|
174
185
|
};
|
|
175
186
|
var nextTick = (cb) => promiseResolve().then(cb);
|
|
176
187
|
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;
|
|
183
188
|
var isComplexType = (o) => {
|
|
184
189
|
o = typeof o;
|
|
185
190
|
return o === "object" || o === "function";
|
|
@@ -380,7 +385,7 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
380
385
|
}
|
|
381
386
|
if (!appliedStyles.has(scopeId2)) {
|
|
382
387
|
{
|
|
383
|
-
styleElm = doc.createElement("style");
|
|
388
|
+
styleElm = document.querySelector(`[${HYDRATED_STYLE_ID}="${scopeId2}"]`) || doc.createElement("style");
|
|
384
389
|
styleElm.innerHTML = style;
|
|
385
390
|
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(doc);
|
|
386
391
|
if (nonce != null) {
|
|
@@ -390,7 +395,10 @@ var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
|
390
395
|
if (styleContainerNode.nodeName === "HEAD") {
|
|
391
396
|
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
392
397
|
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
393
|
-
styleContainerNode.insertBefore(
|
|
398
|
+
styleContainerNode.insertBefore(
|
|
399
|
+
styleElm,
|
|
400
|
+
(referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null
|
|
401
|
+
);
|
|
394
402
|
} else if ("host" in styleContainerNode) {
|
|
395
403
|
if (supportsConstructableStylesheets) {
|
|
396
404
|
const stylesheet = new CSSStyleSheet();
|
|
@@ -440,16 +448,18 @@ var attachStyles = (hostRef) => {
|
|
|
440
448
|
endAttachStyles();
|
|
441
449
|
};
|
|
442
450
|
var getScopeId = (cmp, mode) => "sc-" + (cmp.$tagName$);
|
|
443
|
-
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
451
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
444
452
|
if (oldValue !== newValue) {
|
|
445
453
|
let isProp = isMemberInElement(elm, memberName);
|
|
446
454
|
let ln = memberName.toLowerCase();
|
|
447
455
|
if (memberName === "class") {
|
|
448
456
|
const classList = elm.classList;
|
|
449
457
|
const oldClasses = parseClassList(oldValue);
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
458
|
+
let newClasses = parseClassList(newValue);
|
|
459
|
+
{
|
|
460
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
461
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
462
|
+
}
|
|
453
463
|
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
454
464
|
if (newValue) {
|
|
455
465
|
newValue(elm);
|
|
@@ -487,7 +497,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
487
497
|
elm.setAttribute(memberName, n);
|
|
488
498
|
}
|
|
489
499
|
}
|
|
490
|
-
} else {
|
|
500
|
+
} else if (elm[memberName] !== newValue) {
|
|
491
501
|
elm[memberName] = newValue;
|
|
492
502
|
}
|
|
493
503
|
} catch (e) {
|
|
@@ -509,24 +519,44 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags) => {
|
|
|
509
519
|
}
|
|
510
520
|
};
|
|
511
521
|
var parseClassListRegex = /\s/;
|
|
512
|
-
var parseClassList = (value) =>
|
|
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
|
+
};
|
|
513
531
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
514
532
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
515
533
|
|
|
516
534
|
// src/runtime/vdom/update-element.ts
|
|
517
|
-
var updateElement = (oldVnode, newVnode, isSvgMode2) => {
|
|
535
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
518
536
|
const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
519
|
-
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ ||
|
|
520
|
-
const newVnodeAttrs = newVnode.$attrs$ ||
|
|
537
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
538
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
521
539
|
{
|
|
522
540
|
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {
|
|
523
541
|
if (!(memberName in newVnodeAttrs)) {
|
|
524
|
-
setAccessor(
|
|
542
|
+
setAccessor(
|
|
543
|
+
elm,
|
|
544
|
+
memberName,
|
|
545
|
+
oldVnodeAttrs[memberName],
|
|
546
|
+
void 0,
|
|
547
|
+
isSvgMode2,
|
|
548
|
+
newVnode.$flags$);
|
|
525
549
|
}
|
|
526
550
|
}
|
|
527
551
|
}
|
|
528
552
|
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {
|
|
529
|
-
setAccessor(
|
|
553
|
+
setAccessor(
|
|
554
|
+
elm,
|
|
555
|
+
memberName,
|
|
556
|
+
oldVnodeAttrs[memberName],
|
|
557
|
+
newVnodeAttrs[memberName],
|
|
558
|
+
isSvgMode2,
|
|
559
|
+
newVnode.$flags$);
|
|
530
560
|
}
|
|
531
561
|
};
|
|
532
562
|
function sortedAttrNames(attrNames) {
|
|
@@ -538,13 +568,10 @@ function sortedAttrNames(attrNames) {
|
|
|
538
568
|
attrNames
|
|
539
569
|
);
|
|
540
570
|
}
|
|
541
|
-
|
|
542
|
-
// src/runtime/vdom/vdom-render.ts
|
|
543
|
-
var scopeId;
|
|
544
571
|
var hostTagName;
|
|
545
572
|
var useNativeShadowDom = false;
|
|
546
573
|
var isSvgMode = false;
|
|
547
|
-
var createElm = (oldParentVNode, newParentVNode, childIndex
|
|
574
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
548
575
|
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
549
576
|
let i2 = 0;
|
|
550
577
|
let elm;
|
|
@@ -558,11 +585,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
558
585
|
{
|
|
559
586
|
updateElement(null, newVNode2, isSvgMode);
|
|
560
587
|
}
|
|
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
|
-
}
|
|
566
588
|
if (newVNode2.$children$) {
|
|
567
589
|
for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
568
590
|
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
@@ -692,6 +714,9 @@ var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
|
692
714
|
if (!isInitialRender) {
|
|
693
715
|
return leftVNode.$key$ === rightVNode.$key$;
|
|
694
716
|
}
|
|
717
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {
|
|
718
|
+
leftVNode.$key$ = rightVNode.$key$;
|
|
719
|
+
}
|
|
695
720
|
return true;
|
|
696
721
|
}
|
|
697
722
|
return false;
|
|
@@ -731,8 +756,9 @@ var nullifyVNodeRefs = (vNode) => {
|
|
|
731
756
|
}
|
|
732
757
|
};
|
|
733
758
|
var insertBefore = (parent, newNode, reference) => {
|
|
734
|
-
|
|
735
|
-
|
|
759
|
+
{
|
|
760
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
761
|
+
}
|
|
736
762
|
};
|
|
737
763
|
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
738
764
|
const hostElm = hostRef.$hostElement$;
|
|
@@ -757,9 +783,6 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
757
783
|
rootVnode.$flags$ |= 4 /* isHost */;
|
|
758
784
|
hostRef.$vnode$ = rootVnode;
|
|
759
785
|
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;
|
|
760
|
-
{
|
|
761
|
-
scopeId = hostElm["s-sc"];
|
|
762
|
-
}
|
|
763
786
|
useNativeShadowDom = (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) !== 0;
|
|
764
787
|
patch(oldVNode, rootVnode, isInitialLoad);
|
|
765
788
|
};
|
|
@@ -767,7 +790,14 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
|
767
790
|
// src/runtime/update-component.ts
|
|
768
791
|
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
769
792
|
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
770
|
-
ancestorComponent["s-p"].push(
|
|
793
|
+
const index = ancestorComponent["s-p"].push(
|
|
794
|
+
new Promise(
|
|
795
|
+
(r) => hostRef.$onRenderResolve$ = () => {
|
|
796
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
797
|
+
r();
|
|
798
|
+
}
|
|
799
|
+
)
|
|
800
|
+
);
|
|
771
801
|
}
|
|
772
802
|
};
|
|
773
803
|
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
@@ -796,12 +826,12 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
|
796
826
|
{
|
|
797
827
|
hostRef.$flags$ |= 256 /* isListenReady */;
|
|
798
828
|
if (hostRef.$queuedListeners$) {
|
|
799
|
-
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event));
|
|
829
|
+
hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
|
|
800
830
|
hostRef.$queuedListeners$ = void 0;
|
|
801
831
|
}
|
|
802
832
|
}
|
|
803
833
|
{
|
|
804
|
-
maybePromise = safeCall(instance, "componentWillLoad");
|
|
834
|
+
maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
805
835
|
}
|
|
806
836
|
}
|
|
807
837
|
endSchedule();
|
|
@@ -870,7 +900,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
870
900
|
const instance = hostRef.$lazyInstance$ ;
|
|
871
901
|
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
872
902
|
{
|
|
873
|
-
safeCall(instance, "componentDidRender");
|
|
903
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
874
904
|
}
|
|
875
905
|
if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
|
|
876
906
|
hostRef.$flags$ |= 64 /* hasLoadedComponent */;
|
|
@@ -878,7 +908,7 @@ var postUpdateComponent = (hostRef) => {
|
|
|
878
908
|
addHydratedFlag(elm);
|
|
879
909
|
}
|
|
880
910
|
{
|
|
881
|
-
safeCall(instance, "componentDidLoad");
|
|
911
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
882
912
|
}
|
|
883
913
|
endPostUpdate();
|
|
884
914
|
{
|
|
@@ -907,12 +937,12 @@ var appDidLoad = (who) => {
|
|
|
907
937
|
}
|
|
908
938
|
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
909
939
|
};
|
|
910
|
-
var safeCall = (instance, method, arg) => {
|
|
940
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
911
941
|
if (instance && instance[method]) {
|
|
912
942
|
try {
|
|
913
943
|
return instance[method](arg);
|
|
914
944
|
} catch (e) {
|
|
915
|
-
consoleError(e);
|
|
945
|
+
consoleError(e, elm);
|
|
916
946
|
}
|
|
917
947
|
}
|
|
918
948
|
return void 0;
|
|
@@ -971,15 +1001,68 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
971
1001
|
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
972
1002
|
members.map(([memberName, [memberFlags]]) => {
|
|
973
1003
|
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
|
+
}
|
|
974
1024
|
Object.defineProperty(prototype, memberName, {
|
|
975
|
-
get() {
|
|
976
|
-
return getValue(this, memberName);
|
|
977
|
-
},
|
|
978
1025
|
set(newValue) {
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
1026
|
+
const ref = getHostRef(this);
|
|
1027
|
+
if (origSetter) {
|
|
1028
|
+
const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];
|
|
1029
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) {
|
|
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
|
+
}
|
|
983
1066
|
});
|
|
984
1067
|
}
|
|
985
1068
|
});
|
|
@@ -989,7 +1072,7 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
989
1072
|
plt.jmp(() => {
|
|
990
1073
|
var _a2;
|
|
991
1074
|
const propName = attrNameToPropName.get(attrName);
|
|
992
|
-
if (this.hasOwnProperty(propName)) {
|
|
1075
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad) {
|
|
993
1076
|
newValue = this[propName];
|
|
994
1077
|
delete this[propName];
|
|
995
1078
|
} else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && // cast type to number to avoid TS compiler issues
|
|
@@ -1009,7 +1092,11 @@ var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
|
1009
1092
|
}
|
|
1010
1093
|
return;
|
|
1011
1094
|
}
|
|
1012
|
-
|
|
1095
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1096
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1097
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {
|
|
1098
|
+
this[propName] = newValue;
|
|
1099
|
+
}
|
|
1013
1100
|
});
|
|
1014
1101
|
};
|
|
1015
1102
|
Cstr.observedAttributes = Array.from(
|
|
@@ -1036,9 +1123,8 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1036
1123
|
let Cstr;
|
|
1037
1124
|
if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {
|
|
1038
1125
|
hostRef.$flags$ |= 32 /* hasInitializedComponent */;
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
const CstrImport = loadModule(cmpMeta);
|
|
1126
|
+
{
|
|
1127
|
+
const CstrImport = loadModule(cmpMeta, hostRef);
|
|
1042
1128
|
if (CstrImport && "then" in CstrImport) {
|
|
1043
1129
|
const endLoad = uniqueTime();
|
|
1044
1130
|
Cstr = await CstrImport;
|
|
@@ -1063,7 +1149,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1063
1149
|
try {
|
|
1064
1150
|
new Cstr(hostRef);
|
|
1065
1151
|
} catch (e) {
|
|
1066
|
-
consoleError(e);
|
|
1152
|
+
consoleError(e, elm);
|
|
1067
1153
|
}
|
|
1068
1154
|
{
|
|
1069
1155
|
hostRef.$flags$ &= ~8 /* isConstructingInstance */;
|
|
@@ -1072,11 +1158,7 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1072
1158
|
hostRef.$flags$ |= 128 /* isWatchReady */;
|
|
1073
1159
|
}
|
|
1074
1160
|
endNewInstance();
|
|
1075
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1076
|
-
} else {
|
|
1077
|
-
Cstr = elm.constructor;
|
|
1078
|
-
const cmpTag = elm.localName;
|
|
1079
|
-
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);
|
|
1161
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1080
1162
|
}
|
|
1081
1163
|
if (Cstr && Cstr.style) {
|
|
1082
1164
|
let style;
|
|
@@ -1099,9 +1181,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
|
1099
1181
|
schedule();
|
|
1100
1182
|
}
|
|
1101
1183
|
};
|
|
1102
|
-
var fireConnectedCallback = (instance) => {
|
|
1184
|
+
var fireConnectedCallback = (instance, elm) => {
|
|
1103
1185
|
{
|
|
1104
|
-
safeCall(instance, "connectedCallback");
|
|
1186
|
+
safeCall(instance, "connectedCallback", void 0, elm);
|
|
1105
1187
|
}
|
|
1106
1188
|
};
|
|
1107
1189
|
|
|
@@ -1137,17 +1219,17 @@ var connectedCallback = (elm) => {
|
|
|
1137
1219
|
} else {
|
|
1138
1220
|
addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
|
|
1139
1221
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1140
|
-
fireConnectedCallback(hostRef.$lazyInstance
|
|
1222
|
+
fireConnectedCallback(hostRef.$lazyInstance$, elm);
|
|
1141
1223
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1142
|
-
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance
|
|
1224
|
+
hostRef.$onReadyPromise$.then(() => fireConnectedCallback(hostRef.$lazyInstance$, elm));
|
|
1143
1225
|
}
|
|
1144
1226
|
}
|
|
1145
1227
|
endConnected();
|
|
1146
1228
|
}
|
|
1147
1229
|
};
|
|
1148
|
-
var disconnectInstance = (instance) => {
|
|
1230
|
+
var disconnectInstance = (instance, elm) => {
|
|
1149
1231
|
{
|
|
1150
|
-
safeCall(instance, "disconnectedCallback");
|
|
1232
|
+
safeCall(instance, "disconnectedCallback", void 0, elm || instance);
|
|
1151
1233
|
}
|
|
1152
1234
|
};
|
|
1153
1235
|
var disconnectedCallback = async (elm) => {
|
|
@@ -1160,11 +1242,17 @@ var disconnectedCallback = async (elm) => {
|
|
|
1160
1242
|
}
|
|
1161
1243
|
}
|
|
1162
1244
|
if (hostRef == null ? void 0 : hostRef.$lazyInstance$) {
|
|
1163
|
-
disconnectInstance(hostRef.$lazyInstance
|
|
1245
|
+
disconnectInstance(hostRef.$lazyInstance$, elm);
|
|
1164
1246
|
} else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
|
|
1165
|
-
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance
|
|
1247
|
+
hostRef.$onReadyPromise$.then(() => disconnectInstance(hostRef.$lazyInstance$, elm));
|
|
1166
1248
|
}
|
|
1167
1249
|
}
|
|
1250
|
+
if (rootAppliedStyles.has(elm)) {
|
|
1251
|
+
rootAppliedStyles.delete(elm);
|
|
1252
|
+
}
|
|
1253
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {
|
|
1254
|
+
rootAppliedStyles.delete(elm.shadowRoot);
|
|
1255
|
+
}
|
|
1168
1256
|
};
|
|
1169
1257
|
|
|
1170
1258
|
// src/runtime/bootstrap-lazy.ts
|
|
@@ -1249,6 +1337,13 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1249
1337
|
}
|
|
1250
1338
|
disconnectedCallback() {
|
|
1251
1339
|
plt.jmp(() => disconnectedCallback(this));
|
|
1340
|
+
plt.raf(() => {
|
|
1341
|
+
var _a3;
|
|
1342
|
+
const hostRef = getHostRef(this);
|
|
1343
|
+
if (((_a3 = hostRef == null ? void 0 : hostRef.$vnode$) == null ? void 0 : _a3.$elm$) instanceof Node && !hostRef.$vnode$.$elm$.isConnected) {
|
|
1344
|
+
delete hostRef.$vnode$.$elm$;
|
|
1345
|
+
}
|
|
1346
|
+
});
|
|
1252
1347
|
}
|
|
1253
1348
|
componentOnReady() {
|
|
1254
1349
|
return getHostRef(this).$onReadyPromise$;
|
|
@@ -1312,7 +1407,7 @@ var hostListenerProxy = (hostRef, methodName) => (ev) => {
|
|
|
1312
1407
|
}
|
|
1313
1408
|
}
|
|
1314
1409
|
} catch (e) {
|
|
1315
|
-
consoleError(e);
|
|
1410
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1316
1411
|
}
|
|
1317
1412
|
};
|
|
1318
1413
|
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-1277658a.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-1277658a.js');
|
|
6
6
|
const locale_utils = require('./locale.utils-345d0792.js');
|
|
7
7
|
const tooltipIcon = require('./tooltipIcon-7e9ee226.js');
|
|
8
8
|
|
|
@@ -14,27 +14,23 @@ 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';
|
|
17
28
|
this.value = '';
|
|
18
29
|
this.setClientStyling = () => {
|
|
19
30
|
let sheet = document.createElement('style');
|
|
20
31
|
sheet.innerHTML = this.clientStyling;
|
|
21
32
|
this.stylingContainer.prepend(sheet);
|
|
22
33
|
};
|
|
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';
|
|
38
34
|
}
|
|
39
35
|
validityStateHandler(inputStateEvent) {
|
|
40
36
|
this.sendValidityState.emit(inputStateEvent);
|