@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-38445.0 → 0.0.0-bugfix-dev-kb-67792.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/ez-chart.cjs.entry.js +0 -2
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +28 -31
- package/dist/collection/components/ez-chart/ez-chart.js +0 -2
- package/dist/collection/components/ez-popup/ez-popup.css +2 -1
- package/dist/collection/components/ez-search/ez-search.js +28 -31
- package/dist/custom-elements/index.js +29 -34
- package/dist/esm/ez-chart.entry.js +0 -2
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +28 -31
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-d9401ea0.entry.js → p-2f8bcd75.entry.js} +1 -1
- package/dist/ezui/p-61d638fa.entry.js +1 -0
- package/dist/ezui/{p-5b205c80.entry.js → p-ffef392d.entry.js} +1 -1
- package/dist/types/components/ez-search/ez-search.d.ts +2 -1
- package/package.json +1 -1
- package/dist/ezui/p-1c462106.entry.js +0 -1
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-a7b0c73d.js');
|
|
6
6
|
const core = require('@sankhyalabs/core');
|
|
7
7
|
|
|
8
|
-
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__container--auto{height:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;height:calc(100% - 44px)}.popup__header{width:100%;display:flex}.popup__header--padding{padding-bottom:var(--ez-popup__header--padding-bottom)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
8
|
+
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding);overflow-y:auto}.popup__container--auto{height:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;height:calc(100% - 44px)}.popup__header{width:100%;display:flex}.popup__header--padding{padding-bottom:var(--ez-popup__header--padding-bottom)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
9
9
|
|
|
10
10
|
const EzPopup = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -24,7 +24,6 @@ const EzSearch = class {
|
|
|
24
24
|
this._tabPressed = false;
|
|
25
25
|
this._textEmptyList = "Nenhum resultado encontrado";
|
|
26
26
|
this._textEmptySearch = "Nenhum resultado de {0} encontrado";
|
|
27
|
-
this._lookupMode = false;
|
|
28
27
|
this._startHighlightTag = "<span class='card-item__highlight'>";
|
|
29
28
|
this._endHighlightTag = "</span>";
|
|
30
29
|
this._preSelection = undefined;
|
|
@@ -53,36 +52,30 @@ const EzSearch = class {
|
|
|
53
52
|
var _a;
|
|
54
53
|
if (this._textInput) {
|
|
55
54
|
this._textInput.errorMessage = this.errorMessage;
|
|
56
|
-
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
55
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim()) && this.errorMessage) {
|
|
57
56
|
this.setInputValue();
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
}
|
|
60
|
+
validateNewValue(newValue, oldValue) {
|
|
61
|
+
const getValue = (val) => typeof val === 'object' ? val === null || val === void 0 ? void 0 : val.value : val;
|
|
62
|
+
return (getValue(newValue) !== getValue(oldValue));
|
|
63
|
+
}
|
|
61
64
|
async observeValue(newValue, oldValue) {
|
|
62
|
-
if (this._textInput && newValue
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
const newValueSelected = this.getSelectedOption(newValue);
|
|
69
|
-
const oldValueSelected = this.getSelectedOption(oldValue);
|
|
70
|
-
const currentValue = this.getSelectedOption(this.value);
|
|
71
|
-
if (this.isDifferentValues(currentValue, newValueSelected)) {
|
|
72
|
-
this.value = newValueSelected;
|
|
73
|
-
}
|
|
74
|
-
if (this.isDifferentValues(newValueSelected, oldValueSelected)) {
|
|
75
|
-
this.setInputValue();
|
|
76
|
-
const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
|
|
77
|
-
if (!this._lookupMode) {
|
|
78
|
-
this.ezChange.emit(valueEmitted);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
this.resetOptions();
|
|
65
|
+
if (this._textInput && newValue !== oldValue && this.validateNewValue(newValue, oldValue)) {
|
|
66
|
+
if (typeof newValue === "string") {
|
|
67
|
+
await this.handleValueAsString(newValue);
|
|
68
|
+
return;
|
|
82
69
|
}
|
|
83
|
-
|
|
84
|
-
|
|
70
|
+
const newValueSelected = this.getSelectedOption(newValue);
|
|
71
|
+
const currentValue = this.getSelectedOption(this._currentValue);
|
|
72
|
+
if (this.isDifferentValues(currentValue, newValueSelected)) {
|
|
73
|
+
this._currentValue = newValueSelected;
|
|
74
|
+
this.setInputValue();
|
|
75
|
+
const valueEmitted = newValueSelected !== null && newValueSelected !== void 0 ? newValueSelected : undefined;
|
|
76
|
+
this.ezChange.emit(valueEmitted);
|
|
85
77
|
}
|
|
78
|
+
this.resetOptions();
|
|
86
79
|
}
|
|
87
80
|
}
|
|
88
81
|
observeOptions(newOptions, oldOptions) {
|
|
@@ -155,7 +148,9 @@ const EzSearch = class {
|
|
|
155
148
|
return;
|
|
156
149
|
}
|
|
157
150
|
await this.loadDescriptionValue(value);
|
|
151
|
+
this.setInputValue();
|
|
158
152
|
this.ezChange.emit(this.value);
|
|
153
|
+
this._currentValue = this.value;
|
|
159
154
|
}
|
|
160
155
|
updateListPosition() {
|
|
161
156
|
let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
|
|
@@ -212,7 +207,7 @@ const EzSearch = class {
|
|
|
212
207
|
return text;
|
|
213
208
|
}
|
|
214
209
|
getText() {
|
|
215
|
-
const currentValue = this.getSelectedOption(this.
|
|
210
|
+
const currentValue = this.getSelectedOption(this._currentValue);
|
|
216
211
|
const text = this.getFormattedText(currentValue);
|
|
217
212
|
if (text == undefined) {
|
|
218
213
|
return;
|
|
@@ -387,6 +382,7 @@ const EzSearch = class {
|
|
|
387
382
|
|| (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
|
|
388
383
|
const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
|
|
389
384
|
this.value = adjustedOpt;
|
|
385
|
+
this._currentValue = adjustedOpt;
|
|
390
386
|
}
|
|
391
387
|
else {
|
|
392
388
|
this.setInputValue();
|
|
@@ -407,7 +403,7 @@ const EzSearch = class {
|
|
|
407
403
|
}
|
|
408
404
|
}
|
|
409
405
|
cancelPreselection() {
|
|
410
|
-
if (!this._textInput.value && this.
|
|
406
|
+
if (!this._textInput.value && this._currentValue) {
|
|
411
407
|
this.selectOption(undefined);
|
|
412
408
|
}
|
|
413
409
|
else {
|
|
@@ -428,6 +424,7 @@ const EzSearch = class {
|
|
|
428
424
|
}
|
|
429
425
|
clearSearch() {
|
|
430
426
|
this.value = null;
|
|
427
|
+
this._currentValue = null;
|
|
431
428
|
}
|
|
432
429
|
controlListWithOnlyOne() {
|
|
433
430
|
var _a, _b;
|
|
@@ -457,11 +454,11 @@ const EzSearch = class {
|
|
|
457
454
|
if (core.StringUtils.isEmpty(this.value)) {
|
|
458
455
|
return;
|
|
459
456
|
}
|
|
460
|
-
|
|
461
|
-
if (typeof value === "object") {
|
|
457
|
+
if (!this.validateNewValue(this.value, this._currentValue)) {
|
|
462
458
|
return;
|
|
463
459
|
}
|
|
464
|
-
|
|
460
|
+
let value = this.value;
|
|
461
|
+
if (typeof value === "object") {
|
|
465
462
|
return;
|
|
466
463
|
}
|
|
467
464
|
this.loadDescriptionValue(value);
|
|
@@ -498,8 +495,8 @@ const EzSearch = class {
|
|
|
498
495
|
this.showNoResultMessage();
|
|
499
496
|
return;
|
|
500
497
|
}
|
|
501
|
-
this.
|
|
502
|
-
this.value =
|
|
498
|
+
this._currentValue = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
|
|
499
|
+
this.value = this._currentValue;
|
|
503
500
|
}
|
|
504
501
|
loadOptionValue(argument) {
|
|
505
502
|
var _a;
|
|
@@ -68,7 +68,8 @@
|
|
|
68
68
|
border-radius: 12px;
|
|
69
69
|
box-shadow: 0px 0px 16px rgba(0, 38, 111, 0.122);
|
|
70
70
|
box-sizing: border-box;
|
|
71
|
-
padding: var(--ez-popup__container--padding)
|
|
71
|
+
padding: var(--ez-popup__container--padding);
|
|
72
|
+
overflow-y: auto;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
.popup__container--auto {
|
|
@@ -12,7 +12,6 @@ export class EzSearch {
|
|
|
12
12
|
this._tabPressed = false;
|
|
13
13
|
this._textEmptyList = "Nenhum resultado encontrado";
|
|
14
14
|
this._textEmptySearch = "Nenhum resultado de {0} encontrado";
|
|
15
|
-
this._lookupMode = false;
|
|
16
15
|
this._startHighlightTag = "<span class='card-item__highlight'>";
|
|
17
16
|
this._endHighlightTag = "</span>";
|
|
18
17
|
this._preSelection = undefined;
|
|
@@ -41,36 +40,30 @@ export class EzSearch {
|
|
|
41
40
|
var _a;
|
|
42
41
|
if (this._textInput) {
|
|
43
42
|
this._textInput.errorMessage = this.errorMessage;
|
|
44
|
-
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
43
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim()) && this.errorMessage) {
|
|
45
44
|
this.setInputValue();
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
47
|
}
|
|
48
|
+
validateNewValue(newValue, oldValue) {
|
|
49
|
+
const getValue = (val) => typeof val === 'object' ? val === null || val === void 0 ? void 0 : val.value : val;
|
|
50
|
+
return (getValue(newValue) !== getValue(oldValue));
|
|
51
|
+
}
|
|
49
52
|
async observeValue(newValue, oldValue) {
|
|
50
|
-
if (this._textInput && newValue
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
const newValueSelected = this.getSelectedOption(newValue);
|
|
57
|
-
const oldValueSelected = this.getSelectedOption(oldValue);
|
|
58
|
-
const currentValue = this.getSelectedOption(this.value);
|
|
59
|
-
if (this.isDifferentValues(currentValue, newValueSelected)) {
|
|
60
|
-
this.value = newValueSelected;
|
|
61
|
-
}
|
|
62
|
-
if (this.isDifferentValues(newValueSelected, oldValueSelected)) {
|
|
63
|
-
this.setInputValue();
|
|
64
|
-
const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
|
|
65
|
-
if (!this._lookupMode) {
|
|
66
|
-
this.ezChange.emit(valueEmitted);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
this.resetOptions();
|
|
53
|
+
if (this._textInput && newValue !== oldValue && this.validateNewValue(newValue, oldValue)) {
|
|
54
|
+
if (typeof newValue === "string") {
|
|
55
|
+
await this.handleValueAsString(newValue);
|
|
56
|
+
return;
|
|
70
57
|
}
|
|
71
|
-
|
|
72
|
-
|
|
58
|
+
const newValueSelected = this.getSelectedOption(newValue);
|
|
59
|
+
const currentValue = this.getSelectedOption(this._currentValue);
|
|
60
|
+
if (this.isDifferentValues(currentValue, newValueSelected)) {
|
|
61
|
+
this._currentValue = newValueSelected;
|
|
62
|
+
this.setInputValue();
|
|
63
|
+
const valueEmitted = newValueSelected !== null && newValueSelected !== void 0 ? newValueSelected : undefined;
|
|
64
|
+
this.ezChange.emit(valueEmitted);
|
|
73
65
|
}
|
|
66
|
+
this.resetOptions();
|
|
74
67
|
}
|
|
75
68
|
}
|
|
76
69
|
observeOptions(newOptions, oldOptions) {
|
|
@@ -143,7 +136,9 @@ export class EzSearch {
|
|
|
143
136
|
return;
|
|
144
137
|
}
|
|
145
138
|
await this.loadDescriptionValue(value);
|
|
139
|
+
this.setInputValue();
|
|
146
140
|
this.ezChange.emit(this.value);
|
|
141
|
+
this._currentValue = this.value;
|
|
147
142
|
}
|
|
148
143
|
updateListPosition() {
|
|
149
144
|
let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
|
|
@@ -200,7 +195,7 @@ export class EzSearch {
|
|
|
200
195
|
return text;
|
|
201
196
|
}
|
|
202
197
|
getText() {
|
|
203
|
-
const currentValue = this.getSelectedOption(this.
|
|
198
|
+
const currentValue = this.getSelectedOption(this._currentValue);
|
|
204
199
|
const text = this.getFormattedText(currentValue);
|
|
205
200
|
if (text == undefined) {
|
|
206
201
|
return;
|
|
@@ -375,6 +370,7 @@ export class EzSearch {
|
|
|
375
370
|
|| (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
|
|
376
371
|
const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
|
|
377
372
|
this.value = adjustedOpt;
|
|
373
|
+
this._currentValue = adjustedOpt;
|
|
378
374
|
}
|
|
379
375
|
else {
|
|
380
376
|
this.setInputValue();
|
|
@@ -395,7 +391,7 @@ export class EzSearch {
|
|
|
395
391
|
}
|
|
396
392
|
}
|
|
397
393
|
cancelPreselection() {
|
|
398
|
-
if (!this._textInput.value && this.
|
|
394
|
+
if (!this._textInput.value && this._currentValue) {
|
|
399
395
|
this.selectOption(undefined);
|
|
400
396
|
}
|
|
401
397
|
else {
|
|
@@ -416,6 +412,7 @@ export class EzSearch {
|
|
|
416
412
|
}
|
|
417
413
|
clearSearch() {
|
|
418
414
|
this.value = null;
|
|
415
|
+
this._currentValue = null;
|
|
419
416
|
}
|
|
420
417
|
controlListWithOnlyOne() {
|
|
421
418
|
var _a, _b;
|
|
@@ -445,11 +442,11 @@ export class EzSearch {
|
|
|
445
442
|
if (StringUtils.isEmpty(this.value)) {
|
|
446
443
|
return;
|
|
447
444
|
}
|
|
448
|
-
|
|
449
|
-
if (typeof value === "object") {
|
|
445
|
+
if (!this.validateNewValue(this.value, this._currentValue)) {
|
|
450
446
|
return;
|
|
451
447
|
}
|
|
452
|
-
|
|
448
|
+
let value = this.value;
|
|
449
|
+
if (typeof value === "object") {
|
|
453
450
|
return;
|
|
454
451
|
}
|
|
455
452
|
this.loadDescriptionValue(value);
|
|
@@ -486,8 +483,8 @@ export class EzSearch {
|
|
|
486
483
|
this.showNoResultMessage();
|
|
487
484
|
return;
|
|
488
485
|
}
|
|
489
|
-
this.
|
|
490
|
-
this.value =
|
|
486
|
+
this._currentValue = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
|
|
487
|
+
this.value = this._currentValue;
|
|
491
488
|
}
|
|
492
489
|
loadOptionValue(argument) {
|
|
493
490
|
var _a;
|
|
@@ -2491,8 +2491,6 @@ const EzChart$1 = class extends HTMLElement$1 {
|
|
|
2491
2491
|
subTitle: this.chartSubTitle,
|
|
2492
2492
|
legendEnabled: this.legendEnabled,
|
|
2493
2493
|
onClickSerie: this.ezSerieClick,
|
|
2494
|
-
width: this.width,
|
|
2495
|
-
height: this.height
|
|
2496
2494
|
});
|
|
2497
2495
|
}
|
|
2498
2496
|
componentWillLoad() {
|
|
@@ -128371,7 +128369,7 @@ const EzPopover$1 = class extends HTMLElement$1 {
|
|
|
128371
128369
|
static get style() { return ezPopoverCss; }
|
|
128372
128370
|
};
|
|
128373
128371
|
|
|
128374
|
-
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__container--auto{height:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;height:calc(100% - 44px)}.popup__header{width:100%;display:flex}.popup__header--padding{padding-bottom:var(--ez-popup__header--padding-bottom)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
128372
|
+
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding);overflow-y:auto}.popup__container--auto{height:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;height:calc(100% - 44px)}.popup__header{width:100%;display:flex}.popup__header--padding{padding-bottom:var(--ez-popup__header--padding-bottom)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
128375
128373
|
|
|
128376
128374
|
const EzPopup$1 = class extends HTMLElement$1 {
|
|
128377
128375
|
constructor() {
|
|
@@ -128692,7 +128690,6 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
128692
128690
|
this._tabPressed = false;
|
|
128693
128691
|
this._textEmptyList = "Nenhum resultado encontrado";
|
|
128694
128692
|
this._textEmptySearch = "Nenhum resultado de {0} encontrado";
|
|
128695
|
-
this._lookupMode = false;
|
|
128696
128693
|
this._startHighlightTag = "<span class='card-item__highlight'>";
|
|
128697
128694
|
this._endHighlightTag = "</span>";
|
|
128698
128695
|
this._preSelection = undefined;
|
|
@@ -128721,36 +128718,30 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
128721
128718
|
var _a;
|
|
128722
128719
|
if (this._textInput) {
|
|
128723
128720
|
this._textInput.errorMessage = this.errorMessage;
|
|
128724
|
-
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
128721
|
+
if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim()) && this.errorMessage) {
|
|
128725
128722
|
this.setInputValue();
|
|
128726
128723
|
}
|
|
128727
128724
|
}
|
|
128728
128725
|
}
|
|
128726
|
+
validateNewValue(newValue, oldValue) {
|
|
128727
|
+
const getValue = (val) => typeof val === 'object' ? val === null || val === void 0 ? void 0 : val.value : val;
|
|
128728
|
+
return (getValue(newValue) !== getValue(oldValue));
|
|
128729
|
+
}
|
|
128729
128730
|
async observeValue(newValue, oldValue) {
|
|
128730
|
-
if (this._textInput && newValue
|
|
128731
|
-
|
|
128732
|
-
|
|
128733
|
-
|
|
128734
|
-
return;
|
|
128735
|
-
}
|
|
128736
|
-
const newValueSelected = this.getSelectedOption(newValue);
|
|
128737
|
-
const oldValueSelected = this.getSelectedOption(oldValue);
|
|
128738
|
-
const currentValue = this.getSelectedOption(this.value);
|
|
128739
|
-
if (this.isDifferentValues(currentValue, newValueSelected)) {
|
|
128740
|
-
this.value = newValueSelected;
|
|
128741
|
-
}
|
|
128742
|
-
if (this.isDifferentValues(newValueSelected, oldValueSelected)) {
|
|
128743
|
-
this.setInputValue();
|
|
128744
|
-
const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
|
|
128745
|
-
if (!this._lookupMode) {
|
|
128746
|
-
this.ezChange.emit(valueEmitted);
|
|
128747
|
-
}
|
|
128748
|
-
}
|
|
128749
|
-
this.resetOptions();
|
|
128731
|
+
if (this._textInput && newValue !== oldValue && this.validateNewValue(newValue, oldValue)) {
|
|
128732
|
+
if (typeof newValue === "string") {
|
|
128733
|
+
await this.handleValueAsString(newValue);
|
|
128734
|
+
return;
|
|
128750
128735
|
}
|
|
128751
|
-
|
|
128752
|
-
|
|
128736
|
+
const newValueSelected = this.getSelectedOption(newValue);
|
|
128737
|
+
const currentValue = this.getSelectedOption(this._currentValue);
|
|
128738
|
+
if (this.isDifferentValues(currentValue, newValueSelected)) {
|
|
128739
|
+
this._currentValue = newValueSelected;
|
|
128740
|
+
this.setInputValue();
|
|
128741
|
+
const valueEmitted = newValueSelected !== null && newValueSelected !== void 0 ? newValueSelected : undefined;
|
|
128742
|
+
this.ezChange.emit(valueEmitted);
|
|
128753
128743
|
}
|
|
128744
|
+
this.resetOptions();
|
|
128754
128745
|
}
|
|
128755
128746
|
}
|
|
128756
128747
|
observeOptions(newOptions, oldOptions) {
|
|
@@ -128823,7 +128814,9 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
128823
128814
|
return;
|
|
128824
128815
|
}
|
|
128825
128816
|
await this.loadDescriptionValue(value);
|
|
128817
|
+
this.setInputValue();
|
|
128826
128818
|
this.ezChange.emit(this.value);
|
|
128819
|
+
this._currentValue = this.value;
|
|
128827
128820
|
}
|
|
128828
128821
|
updateListPosition() {
|
|
128829
128822
|
let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
|
|
@@ -128880,7 +128873,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
128880
128873
|
return text;
|
|
128881
128874
|
}
|
|
128882
128875
|
getText() {
|
|
128883
|
-
const currentValue = this.getSelectedOption(this.
|
|
128876
|
+
const currentValue = this.getSelectedOption(this._currentValue);
|
|
128884
128877
|
const text = this.getFormattedText(currentValue);
|
|
128885
128878
|
if (text == undefined) {
|
|
128886
128879
|
return;
|
|
@@ -129055,6 +129048,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129055
129048
|
|| (currentValue == undefined && newOptionsReplaced != undefined && "value" in newOptionsReplaced)) {
|
|
129056
129049
|
const adjustedOpt = !(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value) ? undefined : newOptionsReplaced;
|
|
129057
129050
|
this.value = adjustedOpt;
|
|
129051
|
+
this._currentValue = adjustedOpt;
|
|
129058
129052
|
}
|
|
129059
129053
|
else {
|
|
129060
129054
|
this.setInputValue();
|
|
@@ -129075,7 +129069,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129075
129069
|
}
|
|
129076
129070
|
}
|
|
129077
129071
|
cancelPreselection() {
|
|
129078
|
-
if (!this._textInput.value && this.
|
|
129072
|
+
if (!this._textInput.value && this._currentValue) {
|
|
129079
129073
|
this.selectOption(undefined);
|
|
129080
129074
|
}
|
|
129081
129075
|
else {
|
|
@@ -129096,6 +129090,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129096
129090
|
}
|
|
129097
129091
|
clearSearch() {
|
|
129098
129092
|
this.value = null;
|
|
129093
|
+
this._currentValue = null;
|
|
129099
129094
|
}
|
|
129100
129095
|
controlListWithOnlyOne() {
|
|
129101
129096
|
var _a, _b;
|
|
@@ -129125,11 +129120,11 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129125
129120
|
if (StringUtils$1.isEmpty(this.value)) {
|
|
129126
129121
|
return;
|
|
129127
129122
|
}
|
|
129128
|
-
|
|
129129
|
-
if (typeof value === "object") {
|
|
129123
|
+
if (!this.validateNewValue(this.value, this._currentValue)) {
|
|
129130
129124
|
return;
|
|
129131
129125
|
}
|
|
129132
|
-
|
|
129126
|
+
let value = this.value;
|
|
129127
|
+
if (typeof value === "object") {
|
|
129133
129128
|
return;
|
|
129134
129129
|
}
|
|
129135
129130
|
this.loadDescriptionValue(value);
|
|
@@ -129166,8 +129161,8 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129166
129161
|
this.showNoResultMessage();
|
|
129167
129162
|
return;
|
|
129168
129163
|
}
|
|
129169
|
-
this.
|
|
129170
|
-
this.value =
|
|
129164
|
+
this._currentValue = value ? Object.assign(Object.assign({}, value), { value: this.replaceHighlight(value.value), label: this.replaceHighlight(value.label) }) : value;
|
|
129165
|
+
this.value = this._currentValue;
|
|
129171
129166
|
}
|
|
129172
129167
|
loadOptionValue(argument) {
|
|
129173
129168
|
var _a;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, F as Fragment, H as Host, g as getElement } from './index-baa5e267.js';
|
|
2
2
|
import { KeyboardManager, FloatingManager } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
|
-
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__container--auto{height:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;height:calc(100% - 44px)}.popup__header{width:100%;display:flex}.popup__header--padding{padding-bottom:var(--ez-popup__header--padding-bottom)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
4
|
+
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding);overflow-y:auto}.popup__container--auto{height:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;height:calc(100% - 44px)}.popup__header{width:100%;display:flex}.popup__header--padding{padding-bottom:var(--ez-popup__header--padding-bottom)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
5
5
|
|
|
6
6
|
const EzPopup = class {
|
|
7
7
|
constructor(hostRef) {
|