@sankhyalabs/ezui 1.1.141 → 1.1.144
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-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item.cjs.entry.js +44 -0
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +3 -2
- package/dist/cjs/ez-combo-box.cjs.entry.js +41 -20
- package/dist/cjs/ez-date-input.cjs.entry.js +16 -5
- package/dist/cjs/ez-date-time-input.cjs.entry.js +7 -1
- package/dist/cjs/ez-form.cjs.entry.js +74 -21
- package/dist/cjs/ez-grid.cjs.entry.js +2 -0
- package/dist/cjs/ez-number-input.cjs.entry.js +8 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +35 -22
- package/dist/cjs/ez-text-input.cjs.entry.js +11 -9
- package/dist/cjs/ez-time-input.cjs.entry.js +5 -0
- package/dist/cjs/ez-upload.cjs.entry.js +28 -9
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ez-button/ez-button.css +6 -0
- package/dist/collection/components/ez-card-item/ez-card-item.css +115 -0
- package/dist/collection/components/ez-card-item/ez-card-item.js +86 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +4 -0
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +2 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +43 -21
- package/dist/collection/components/ez-date-input/ez-date-input.js +49 -5
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +40 -1
- package/dist/collection/components/ez-form/DataBinder.js +54 -8
- package/dist/collection/components/ez-form/ez-form.js +14 -7
- package/dist/collection/components/ez-form/structure/FormSheetMetadata.js +7 -7
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +2 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js +41 -1
- package/dist/collection/components/ez-text-area/ez-text-area.js +35 -22
- package/dist/collection/components/ez-text-input/ez-text-input.js +11 -9
- package/dist/collection/components/ez-time-input/ez-time-input.js +38 -0
- package/dist/collection/components/ez-upload/RemoteFile.js +6 -1
- package/dist/collection/components/ez-upload/ez-upload.js +36 -8
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +275 -94
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-card-item.entry.js +40 -0
- package/dist/esm/ez-collapsible-box.entry.js +3 -2
- package/dist/esm/ez-combo-box.entry.js +41 -20
- package/dist/esm/ez-date-input.entry.js +16 -5
- package/dist/esm/ez-date-time-input.entry.js +7 -1
- package/dist/esm/ez-form.entry.js +75 -22
- package/dist/esm/ez-grid.entry.js +2 -0
- package/dist/esm/ez-number-input.entry.js +8 -1
- package/dist/esm/ez-text-area.entry.js +35 -22
- package/dist/esm/ez-text-input.entry.js +11 -9
- package/dist/esm/ez-time-input.entry.js +5 -0
- package/dist/esm/ez-upload.entry.js +28 -9
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-024df41e.entry.js +1 -0
- package/dist/ezui/p-140f7085.entry.js +1 -0
- package/dist/ezui/p-24e98dc1.entry.js +1 -0
- package/dist/ezui/p-49fdfa4b.entry.js +1 -0
- package/dist/ezui/p-4fdceb7d.entry.js +1 -0
- package/dist/ezui/p-5a05f1ea.entry.js +1 -0
- package/dist/ezui/p-6395ed55.entry.js +1 -0
- package/dist/ezui/{p-1b2bf15d.entry.js → p-6816c9ee.entry.js} +1 -1
- package/dist/ezui/p-7746460e.entry.js +1 -0
- package/dist/ezui/p-b524dfca.entry.js +1 -0
- package/dist/ezui/{p-8cb2c629.entry.js → p-c15d4d6f.entry.js} +1 -1
- package/dist/ezui/p-c77c0022.entry.js +1 -0
- package/dist/ezui/p-ec21ecce.entry.js +1 -0
- package/dist/types/components/ez-card-item/ez-card-item.d.ts +23 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +5 -1
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +12 -1
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +11 -0
- package/dist/types/components/ez-form/DataBinder.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +11 -0
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -3
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +1 -1
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +10 -0
- package/dist/types/components/ez-upload/ez-upload.d.ts +5 -0
- package/dist/types/components.d.ts +53 -0
- package/package.json +2 -2
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-248361f5.entry.js +0 -1
- package/dist/ezui/p-347b145b.entry.js +0 -1
- package/dist/ezui/p-9b82c2fe.entry.js +0 -1
- package/dist/ezui/p-b8d64970.entry.js +0 -1
- package/dist/ezui/p-c620258b.entry.js +0 -1
- package/dist/ezui/p-cabe3671.entry.js +0 -1
- package/dist/ezui/p-cb73bee7.entry.js +0 -1
- package/dist/ezui/p-db0981c1.entry.js +0 -1
- package/dist/ezui/p-dd6f4872.entry.js +0 -1
- package/dist/ezui/p-ec8419f1.entry.js +0 -1
|
@@ -52,17 +52,19 @@ let EzTextInput = class {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
observeValue() {
|
|
55
|
+
observeValue(newValue, oldValue) {
|
|
56
56
|
if (this._inputElem) {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
if (newValue != oldValue) {
|
|
58
|
+
this._inputElem.value = this.value || "";
|
|
59
|
+
this.handleChange();
|
|
60
|
+
this.adjustFloatingLabel();
|
|
61
|
+
if (this.slaveMode) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
this.errorMessage = "";
|
|
65
|
+
this.ezChange.emit(this.value);
|
|
66
|
+
}
|
|
63
67
|
}
|
|
64
|
-
this.errorMessage = "";
|
|
65
|
-
this.ezChange.emit(this.value);
|
|
66
68
|
}
|
|
67
69
|
adjustFloatingLabel() {
|
|
68
70
|
if (this.label && this._labelElem) {
|
|
@@ -12,6 +12,8 @@ let EzTimeInput = class {
|
|
|
12
12
|
constructor(hostRef) {
|
|
13
13
|
index.registerInstance(this, hostRef);
|
|
14
14
|
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
15
|
+
this.ezStartChange = index.createEvent(this, "ezStartChange", 7);
|
|
16
|
+
this.ezCancelWaitingChange = index.createEvent(this, "ezCancelWaitingChange", 7);
|
|
15
17
|
/**
|
|
16
18
|
* Deixa o campo disponível ou não para digitação.
|
|
17
19
|
*/
|
|
@@ -72,10 +74,12 @@ let EzTimeInput = class {
|
|
|
72
74
|
this.prepareValue(this.viewValue);
|
|
73
75
|
if (this.viewValue && !core.TimeFormatter.validateTime(this.viewValue, this.showSeconds)) {
|
|
74
76
|
this._oldViewValue = this.viewValue;
|
|
77
|
+
this.ezCancelWaitingChange.emit();
|
|
75
78
|
this.errorMessage = "Favor inserir um horário válido.";
|
|
76
79
|
}
|
|
77
80
|
else {
|
|
78
81
|
if (this.viewValue === this._oldViewValue) {
|
|
82
|
+
this.ezCancelWaitingChange.emit();
|
|
79
83
|
return;
|
|
80
84
|
}
|
|
81
85
|
this._oldViewValue = this.viewValue;
|
|
@@ -94,6 +98,7 @@ let EzTimeInput = class {
|
|
|
94
98
|
}
|
|
95
99
|
}
|
|
96
100
|
handleChange() {
|
|
101
|
+
this.ezStartChange.emit({ waitmessage: "", blocking: false });
|
|
97
102
|
this.viewValue = this._inputElem.value;
|
|
98
103
|
this.value = core.NumberUtils.stringToNumber(this.viewValue.replace(/\D/g, ""));
|
|
99
104
|
}
|
|
@@ -50,7 +50,12 @@ class RemoteFile {
|
|
|
50
50
|
}
|
|
51
51
|
const response = xhr.response;
|
|
52
52
|
if (response) {
|
|
53
|
-
|
|
53
|
+
try {
|
|
54
|
+
resolve(JSON.parse(response));
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
reject(`Servidor não retornou um objeto válido: ${response}.\n${error}`);
|
|
58
|
+
}
|
|
54
59
|
}
|
|
55
60
|
}
|
|
56
61
|
};
|
|
@@ -102,6 +107,7 @@ let EzUpload = class {
|
|
|
102
107
|
index.registerInstance(this, hostRef);
|
|
103
108
|
this.ezChange = index.createEvent(this, "ezChange", 7);
|
|
104
109
|
this.ezStartChange = index.createEvent(this, "ezStartChange", 7);
|
|
110
|
+
this.ezCancelWaitingChange = index.createEvent(this, "ezCancelWaitingChange", 7);
|
|
105
111
|
this._filePointers = new Map();
|
|
106
112
|
/**
|
|
107
113
|
* Deixa o campo disponível ou não para digitação.
|
|
@@ -190,14 +196,27 @@ let EzUpload = class {
|
|
|
190
196
|
}
|
|
191
197
|
}
|
|
192
198
|
async doAddFile(file) {
|
|
193
|
-
|
|
194
|
-
this.
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
try {
|
|
200
|
+
if (this.validateFile(file)) {
|
|
201
|
+
this.ezStartChange.emit({ waitmessage: "Há arquivos sendo enviados. Por favor aguarde a conclusão ou cancele o envio.", blocking: true });
|
|
202
|
+
const uploadingFile = new RemoteFile(file);
|
|
203
|
+
const oldPointer = this._filePointers.get(file.name);
|
|
204
|
+
if (oldPointer && this.isRemoteFile(oldPointer)) {
|
|
205
|
+
oldPointer.abortUpload();
|
|
206
|
+
}
|
|
207
|
+
this._filePointers.set(file.name, uploadingFile);
|
|
208
|
+
uploadingFile.upload(this.urlUpload, this._requestHeaders, (file) => this.updateFeedback(file))
|
|
209
|
+
.then((files) => files.forEach(ezFile => this.finishUpload(ezFile)))
|
|
210
|
+
.catch(msg => {
|
|
211
|
+
this.ezCancelWaitingChange.emit();
|
|
212
|
+
this.showError(msg);
|
|
213
|
+
});
|
|
214
|
+
index.forceUpdate(this);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
catch (error) {
|
|
218
|
+
this.ezCancelWaitingChange.emit();
|
|
219
|
+
throw error;
|
|
201
220
|
}
|
|
202
221
|
}
|
|
203
222
|
finishUpload(ezFile) {
|
package/dist/cjs/ezui.cjs.js
CHANGED
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["
|
|
18
|
+
return index.bootstrapLazy([["test-du.cjs",[[0,"test-du",{"isDirty":[32]}]]],["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-card-item.cjs",[[1,"ez-card-item",{"item":[16]}]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"showHide":[64]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"refresh":[64],"quickFilter":[64],"nextPage":[64],"previousPage":[64],"hasNextPage":[64],"hasPreviousPage":[64],"isLastOfPage":[64],"isFirstOfPage":[64],"nextRecord":[64],"previousRecord":[64],"hasNextRecord":[64],"hasPreviousRecord":[64],"openGridConfig":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"slaveMode":[516,"slave-mode"],"setFocus":[64],"setBlur":[64]}]]],["select-box.cjs",[[1,"select-box",{"selectedOption":[1,"selected-option"]}]]],["grid-config.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-upload.cjs",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]]], options);
|
|
19
19
|
});
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["
|
|
17
|
+
return index.bootstrapLazy([["test-du.cjs",[[0,"test-du",{"isDirty":[32]}]]],["ez-filter-input.cjs",[[1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"loading":[516],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-application.cjs",[[0,"ez-application"]]],["ez-card-item.cjs",[[1,"ez-card-item",{"item":[16]}]]],["ez-loading-bar.cjs",[[1,"ez-loading-bar",{"_showLoading":[32],"hide":[64],"show":[64]}]]],["ez-popover.cjs",[[1,"ez-popover",{"autoClose":[516,"auto-close"],"top":[1537],"left":[1537],"bottom":[1537],"right":[1537],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"updatePosition":[64],"show":[64],"hide":[64]}]]],["ez-toast.cjs",[[1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"],"show":[64]}]]],["ez-view-stack.cjs",[[0,"ez-view-stack",{"show":[64]}]]],["ez-modal.cjs",[[1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"]}]]],["ez-collapsible-box.cjs",[[1,"ez-collapsible-box",{"value":[1540],"label":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"stretchTitle":[516,"stretch-title"],"showHide":[64]}]]],["ez-list.cjs",[[1,"ez-list",{"dataSource":[1040],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"_listItems":[32],"_listGroupItems":[32],"clearHistory":[64],"scrollToTop":[64],"setSelection":[64],"getSelection":[64],"getList":[64]}]]],["ez-button.cjs",[[1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-grid.cjs",[[6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"pageSize":[2,"page-size"],"serverUrl":[1,"server-url"],"dataUnit":[16],"_navigationHasPrevious":[32],"_navigationHasNext":[32],"_navigationFirstRow":[32],"_navigationLastRow":[32],"_navigationTotalRows":[32],"_popUpGridConfig":[32],"setColumnsDef":[64],"addColumnMenuItem":[64],"setColumnsState":[64],"setData":[64],"getSelection":[64],"getColumnsState":[64],"getColumns":[64],"refresh":[64],"quickFilter":[64],"nextPage":[64],"previousPage":[64],"hasNextPage":[64],"hasPreviousPage":[64],"isLastOfPage":[64],"isFirstOfPage":[64],"nextRecord":[64],"previousRecord":[64],"hasNextRecord":[64],"hasPreviousRecord":[64],"openGridConfig":[64]}]]],["ez-dialog.cjs",[[1,"ez-dialog",{"confirm":[1028],"critical":[1028],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"handleButtonClick":[64],"show":[64]}]]],["ez-chip.cjs",[[1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"setFocus":[64],"setBlur":[64]}]]],["ez-popup.cjs",[[1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[1540,"use-header"],"ezTitle":[1,"ez-title"]}]]],["ez-text-input.cjs",[[1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"slaveMode":[516,"slave-mode"],"setFocus":[64],"setBlur":[64]}]]],["select-box.cjs",[[1,"select-box",{"selectedOption":[1,"selected-option"]}]]],["grid-config.cjs",[[2,"grid-config",{"selectedTab":[1025,"selected-tab"],"columns":[1040],"config":[1040]}]]],["ez-search.cjs",[[1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-calendar.cjs",[[1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"],"show":[64],"fitVertical":[64],"hide":[64]}]]],["ez-date-input.cjs",[[1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-date-time-input.cjs",[[1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-time-input.cjs",[[1,"ez-time-input",{"label":[513],"viewValue":[1537,"view-value"],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-number-input.cjs",[[1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-text-area.cjs",[[1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"loading":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"setFocus":[64],"setBlur":[64]}]]],["ez-upload.cjs",[[1,"ez-upload",{"label":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040],"addFiles":[64],"setFocus":[64],"setBlur":[64]}]]],["ez-check.cjs",[[1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"mode":[513],"getMode":[64],"setFocus":[64]}]]],["ez-tabselector.cjs",[[1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1]}]]],["ez-icon.cjs",[[1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]]],["ez-combo-box.cjs",[[1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"setFocus":[64],"setBlur":[64]}]]],["ez-form.cjs",[[0,"ez-form",{"dataUnit":[1040],"config":[16],"submit":[64],"cancel":[64],"validate":[64]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -107,6 +107,12 @@ button:hover {
|
|
|
107
107
|
--ez-icon--color: var(--ez-button--hover-color);
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
+
button:focus {
|
|
111
|
+
outline: none;
|
|
112
|
+
outline: var(--ez-button--focus--border);
|
|
113
|
+
box-shadow: var(--ez-button--focus--box-shadow);
|
|
114
|
+
}
|
|
115
|
+
|
|
110
116
|
button:active {
|
|
111
117
|
outline: none;
|
|
112
118
|
box-shadow: none;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
/*@doc Define o tamanho da fonte do componente.*/
|
|
3
|
+
--ez-card-item--font-size: var(--text--medium, 14px);
|
|
4
|
+
|
|
5
|
+
/*@doc Define a família da fonte do componente.*/
|
|
6
|
+
--ez-card-item--font-family: var(--font-pattern, Arial);
|
|
7
|
+
|
|
8
|
+
/*@doc Define o peso da fonte do componente.*/
|
|
9
|
+
--ez-card-item--font-weight: var(--text-weight--medium, 400);
|
|
10
|
+
|
|
11
|
+
/*@doc Define o peso da fonte do title do componente.*/
|
|
12
|
+
--ez-card-item--font-weight-large: var(--text-weight--large, 600);
|
|
13
|
+
|
|
14
|
+
/*@doc Define a cor da fonte do componente.*/
|
|
15
|
+
--ez-card-item--color: var(--title--primary, #626e82);
|
|
16
|
+
|
|
17
|
+
/*@doc Define a cor da fonte do label do detalhe do componente.*/
|
|
18
|
+
--ez-card-item__detail-label--color: var(--text--secondary, #A2ABB9);
|
|
19
|
+
|
|
20
|
+
/*@doc Define o espaçamento inferior dos detalhes do componente.*/
|
|
21
|
+
--ez-card-item__detail--padding-bottom: var(--space--extra-small, 3px);
|
|
22
|
+
|
|
23
|
+
/*@doc Define o espaçamento inferior do title do componente.*/
|
|
24
|
+
--ez-card-item__title--padding-bottom: var(--space--extra-small, 3px);
|
|
25
|
+
|
|
26
|
+
/*@doc Define a cor do highlight / marcação nos textos do componente.*/
|
|
27
|
+
--ez-card-item__highlight--color: var(--color--primary-300, #E2F4EF);
|
|
28
|
+
|
|
29
|
+
width: 100%;
|
|
30
|
+
display: flex;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.card-item {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
width: 100%;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
padding: 12px;
|
|
40
|
+
z-index: 0;
|
|
41
|
+
position: relative;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.card-item:hover {
|
|
45
|
+
background: #F0F3F7;
|
|
46
|
+
border-radius: 12px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.card-item__title {
|
|
50
|
+
line-height: 18px;
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
|
|
53
|
+
/*public*/
|
|
54
|
+
font-size: var(--ez-card-item--font-size);
|
|
55
|
+
font-family: var(--ez-card-item--font-family);
|
|
56
|
+
font-weight: var(--ez-card-item--font-weight-large);
|
|
57
|
+
color: var(--ez-card-item--color);
|
|
58
|
+
padding-bottom: var(--ez-card-item__title--padding-bottom);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.card-item__details {
|
|
62
|
+
display: flex;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
justify-content: space-between;
|
|
65
|
+
gap: var(--space--small, 6px);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.card-item__details-left {
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
width: 50%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.card-item__details-right {
|
|
74
|
+
width: 50%;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.card-item__detail:not(:last-child) {
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
|
|
81
|
+
/*public*/
|
|
82
|
+
padding-bottom: var(--ez-card-item__detail--padding-bottom);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.card-item__detail-label {
|
|
86
|
+
cursor: pointer;
|
|
87
|
+
|
|
88
|
+
/*public*/
|
|
89
|
+
font-size: var(--ez-card-item--font-size);
|
|
90
|
+
font-family: var(--ez-card-item--font-family);
|
|
91
|
+
font-weight: var(--ez-card-item--font-weight);
|
|
92
|
+
color: var(--ez-card-item__detail-label--color);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.card-item__detail-value {
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
|
|
98
|
+
/*public*/
|
|
99
|
+
font-size: var(--ez-card-item--font-size);
|
|
100
|
+
font-family: var(--ez-card-item--font-family);
|
|
101
|
+
font-weight: var(--ez-card-item--font-weight);
|
|
102
|
+
color: var(--ez-card-item--color);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.card-item__highlight {
|
|
106
|
+
position: relative;
|
|
107
|
+
border-radius: 8px;
|
|
108
|
+
z-index: -1;
|
|
109
|
+
|
|
110
|
+
/*public*/
|
|
111
|
+
background-color: var(--ez-card-item__highlight--color);
|
|
112
|
+
outline: 2px solid var(--ez-card-item__highlight--color);
|
|
113
|
+
box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color),
|
|
114
|
+
4px 0px 0px 0px var(--ez-card-item__highlight--color);
|
|
115
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Component, Event, h, Host, Prop } from '@stencil/core';
|
|
2
|
+
export class EzCardItem {
|
|
3
|
+
componentWillRender() {
|
|
4
|
+
this.createDetailList();
|
|
5
|
+
}
|
|
6
|
+
createDetailList() {
|
|
7
|
+
var _a, _b, _c;
|
|
8
|
+
this._details = { detailsLeft: [], detailsRight: [] };
|
|
9
|
+
let cont = 0;
|
|
10
|
+
if ((_a = this.item) === null || _a === void 0 ? void 0 : _a.details) {
|
|
11
|
+
for (const attribute in this.item.details) {
|
|
12
|
+
cont < 3 ?
|
|
13
|
+
this._details.detailsLeft.push({ label: attribute, value: (_b = this.item.details[attribute]) === null || _b === void 0 ? void 0 : _b.toString() }) :
|
|
14
|
+
this._details.detailsRight.push({ label: attribute, value: (_c = this.item.details[attribute]) === null || _c === void 0 ? void 0 : _c.toString() });
|
|
15
|
+
cont++;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
buildDetailContent(detail) {
|
|
20
|
+
return h("div", { class: "card-item__detail" },
|
|
21
|
+
h("label", { class: "card-item__detail-label" }, detail.label),
|
|
22
|
+
": ",
|
|
23
|
+
h("label", { class: "card-item__detail-value", innerHTML: detail.value }));
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
return (h(Host, null, this.item &&
|
|
27
|
+
h("div", { class: "card-item", onClick: () => { this.ezClick.emit(this.item); } },
|
|
28
|
+
h("label", { class: "card-item__title", innerHTML: this.item.key + ' - ' + this.item.title }),
|
|
29
|
+
h("div", { class: "card-item__details" },
|
|
30
|
+
h("div", { class: "card-item__details-left" }, this._details.detailsLeft.map(detail => {
|
|
31
|
+
return this.buildDetailContent(detail);
|
|
32
|
+
})),
|
|
33
|
+
h("div", { class: "card-item__details-right" }, this._details.detailsRight.map(detail => {
|
|
34
|
+
return this.buildDetailContent(detail);
|
|
35
|
+
}))))));
|
|
36
|
+
}
|
|
37
|
+
static get is() { return "ez-card-item"; }
|
|
38
|
+
static get encapsulation() { return "shadow"; }
|
|
39
|
+
static get originalStyleUrls() { return {
|
|
40
|
+
"$": ["ez-card-item.css"]
|
|
41
|
+
}; }
|
|
42
|
+
static get styleUrls() { return {
|
|
43
|
+
"$": ["ez-card-item.css"]
|
|
44
|
+
}; }
|
|
45
|
+
static get properties() { return {
|
|
46
|
+
"item": {
|
|
47
|
+
"type": "unknown",
|
|
48
|
+
"mutable": false,
|
|
49
|
+
"complexType": {
|
|
50
|
+
"original": "CardItem",
|
|
51
|
+
"resolved": "CardItem",
|
|
52
|
+
"references": {
|
|
53
|
+
"CardItem": {
|
|
54
|
+
"location": "local"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"required": false,
|
|
59
|
+
"optional": false,
|
|
60
|
+
"docs": {
|
|
61
|
+
"tags": [],
|
|
62
|
+
"text": ""
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}; }
|
|
66
|
+
static get events() { return [{
|
|
67
|
+
"method": "ezClick",
|
|
68
|
+
"name": "ezClick",
|
|
69
|
+
"bubbles": true,
|
|
70
|
+
"cancelable": true,
|
|
71
|
+
"composed": true,
|
|
72
|
+
"docs": {
|
|
73
|
+
"tags": [],
|
|
74
|
+
"text": ""
|
|
75
|
+
},
|
|
76
|
+
"complexType": {
|
|
77
|
+
"original": "CardItem",
|
|
78
|
+
"resolved": "CardItem",
|
|
79
|
+
"references": {
|
|
80
|
+
"CardItem": {
|
|
81
|
+
"location": "local"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}]; }
|
|
86
|
+
}
|
|
@@ -42,7 +42,8 @@ export class EzCollapsibleBox {
|
|
|
42
42
|
h("div", { class: "collapsible-box__header" },
|
|
43
43
|
h("button", { onClick: () => this.showHide(), class: "collapsible-box__title" +
|
|
44
44
|
(this.iconPlacement === "right" ? " collapsible-box__title--icon-right" : "") +
|
|
45
|
-
(this.stretchTitle ? " collapsible-box__title--stretched" : "")
|
|
45
|
+
(this.stretchTitle ? " collapsible-box__title--stretched" : "") +
|
|
46
|
+
(this.value ? " collapsible-box__title--no-margin" : "") },
|
|
46
47
|
h("ez-icon", { slot: "icon", "icon-name": "chevron-right", size: this.getHeaderSize(), class: "collapsible-box__icon collapsible-box__icon--" + this.getHeaderSize() + (this.value ? " collapsible-box__icon--collapsed" : "") }),
|
|
47
48
|
h("label", { class: "collapsible-box__label font--" + this.getHeaderSize(), title: this.label }, this.label))),
|
|
48
49
|
h("div", { class: "collapsible-box__content" + (this.value ? "" : " collapsible-box__content--show") },
|
|
@@ -3,6 +3,9 @@ import { Component, h, Host, Prop, State, Event, Element, Watch, Method } from "
|
|
|
3
3
|
import CSSVarsUtils from "../../utils/CSSVarsUtils";
|
|
4
4
|
export class EzComboBox {
|
|
5
5
|
constructor() {
|
|
6
|
+
this._limitCharsToSearch = 3;
|
|
7
|
+
this._deboucingTime = 300;
|
|
8
|
+
this._startLoading = false;
|
|
6
9
|
/**
|
|
7
10
|
* Deixa o campo disponível ou não para interação com usuário.
|
|
8
11
|
*/
|
|
@@ -141,19 +144,8 @@ export class EzComboBox {
|
|
|
141
144
|
this._preSelection = undefined;
|
|
142
145
|
}
|
|
143
146
|
}
|
|
144
|
-
selectOption(opt) {
|
|
145
|
-
const currentOpt = this.getSelectedOption();
|
|
146
|
-
if (currentOpt !== opt) {
|
|
147
|
-
const adjustedOpt = !(opt === null || opt === void 0 ? void 0 : opt.value) ? undefined : opt;
|
|
148
|
-
this.value = adjustedOpt;
|
|
149
|
-
this.errorMessage = "";
|
|
150
|
-
this.ezChange.emit(adjustedOpt);
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
this.observeValue();
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
147
|
updateSource(source) {
|
|
148
|
+
this._startLoading = false;
|
|
157
149
|
if (source instanceof Promise) {
|
|
158
150
|
source.then(result => this.updateSource(result));
|
|
159
151
|
this.updateVisibleOptions();
|
|
@@ -164,12 +156,26 @@ export class EzComboBox {
|
|
|
164
156
|
this.updateVisibleOptions();
|
|
165
157
|
}
|
|
166
158
|
else {
|
|
167
|
-
this.
|
|
159
|
+
this.selectOption(source);
|
|
168
160
|
}
|
|
169
161
|
}
|
|
170
162
|
}
|
|
163
|
+
selectOption(newOption) {
|
|
164
|
+
var _a, _b;
|
|
165
|
+
const currentOpt = this.getSelectedOption();
|
|
166
|
+
if (((_a = currentOpt === null || currentOpt === void 0 ? void 0 : currentOpt.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString())) {
|
|
167
|
+
const adjustedOpt = !(newOption === null || newOption === void 0 ? void 0 : newOption.value) ? undefined : newOption;
|
|
168
|
+
this.value = adjustedOpt;
|
|
169
|
+
this.errorMessage = "";
|
|
170
|
+
this.ezChange.emit(this.value);
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
this.observeValue();
|
|
174
|
+
}
|
|
175
|
+
}
|
|
171
176
|
loadOptions(mode, argument = "") {
|
|
172
177
|
this._criteria = argument;
|
|
178
|
+
this._startLoading = true;
|
|
173
179
|
if (this.optionLoader) {
|
|
174
180
|
this.updateSource(this.optionLoader({ mode, argument }));
|
|
175
181
|
}
|
|
@@ -226,25 +232,40 @@ export class EzComboBox {
|
|
|
226
232
|
this.searchMode ? this.loadOptions("ADVANCED") : this.showOptions();
|
|
227
233
|
}
|
|
228
234
|
onTextInputChangeHandler(event) {
|
|
235
|
+
var _a;
|
|
236
|
+
this.clearDeboucingTimeout();
|
|
237
|
+
if (this._startLoading) {
|
|
238
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
239
|
+
this.onTextInputChangeHandler(event);
|
|
240
|
+
}, this._deboucingTime);
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
229
243
|
if (!this._criteria) {
|
|
230
244
|
this._inputElement.value = event.data;
|
|
231
245
|
}
|
|
232
|
-
const argument = event.target.value;
|
|
246
|
+
const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
|
|
247
|
+
const argumentNumber = Number(argument || undefined);
|
|
233
248
|
this._criteria = argument;
|
|
234
|
-
if (this.
|
|
249
|
+
if (argument && (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch)) {
|
|
235
250
|
if (this.searchMode) {
|
|
236
|
-
if (this._changeDeboucingTimeout) {
|
|
237
|
-
window.clearTimeout(this._changeDeboucingTimeout);
|
|
238
|
-
}
|
|
239
251
|
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
240
|
-
this.loadOptions("PREDICTIVE", argument);
|
|
241
|
-
},
|
|
252
|
+
this.loadOptions("PREDICTIVE", isNaN(argumentNumber) ? argument : argumentNumber.toString());
|
|
253
|
+
}, this._deboucingTime);
|
|
242
254
|
}
|
|
243
255
|
else {
|
|
244
256
|
this.updateVisibleOptions();
|
|
245
257
|
}
|
|
246
258
|
this.showOptions();
|
|
247
259
|
}
|
|
260
|
+
else {
|
|
261
|
+
this.hideOptions();
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
clearDeboucingTimeout() {
|
|
265
|
+
if (this._changeDeboucingTimeout) {
|
|
266
|
+
window.clearTimeout(this._changeDeboucingTimeout);
|
|
267
|
+
this._changeDeboucingTimeout = undefined;
|
|
268
|
+
}
|
|
248
269
|
}
|
|
249
270
|
onTextInputClickHandler() {
|
|
250
271
|
if (!this.searchMode) {
|
|
@@ -530,7 +551,8 @@ export class EzComboBox {
|
|
|
530
551
|
}; }
|
|
531
552
|
static get states() { return {
|
|
532
553
|
"_preSelection": {},
|
|
533
|
-
"_visibleOptions": {}
|
|
554
|
+
"_visibleOptions": {},
|
|
555
|
+
"_startLoading": {}
|
|
534
556
|
}; }
|
|
535
557
|
static get events() { return [{
|
|
536
558
|
"method": "ezChange",
|