@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-77126.1 → 0.0.0-bugfix-dev-KB-75047.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-actions-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-badge.cjs.entry.js +1 -1
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ez-button.cjs.entry.js +2 -2
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item_3.cjs.entry.js +1 -1
- package/dist/cjs/ez-chart.cjs.entry.js +1 -1
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +3 -3
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +5 -4
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-dialog.cjs.entry.js +2 -2
- package/dist/cjs/ez-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +2 -2
- package/dist/cjs/ez-grid.cjs.entry.js +19 -8
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +2 -2
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +2 -2
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +2 -2
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +41 -8
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js +2 -2
- package/dist/cjs/ez-split-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-input.cjs.entry.js +32 -2
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ez-tree.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +1 -1
- package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/filter-column.cjs.entry.js +1 -1
- package/dist/cjs/{index-a7b0c73d.js → index-9e5554cb.js} +3 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-button/ez-button.css +2 -2
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +12 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -1
- package/dist/collection/components/ez-dialog/ez-dialog.css +3 -3
- package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +3 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +16 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +2 -5
- package/dist/collection/components/ez-modal/ez-modal.css +4 -0
- package/dist/collection/components/ez-modal/ez-modal.js +2 -2
- package/dist/collection/components/ez-number-input/ez-number-input.css +8 -0
- package/dist/collection/components/ez-popup/ez-popup.css +1 -1
- package/dist/collection/components/ez-search/ez-search.js +41 -8
- package/dist/collection/components/ez-split-button/ez-split-button.css +2 -2
- package/dist/collection/components/ez-text-input/ez-text-input.css +6 -0
- package/dist/collection/components/ez-text-input/ez-text-input.js +4 -0
- package/dist/collection/utils/ResponsiveInputUtils.js +26 -0
- package/dist/collection/utils/form/FormMetadata.js +1 -1
- package/dist/custom-elements/index.js +101 -26
- package/dist/esm/ez-actions-button.entry.js +1 -1
- package/dist/esm/ez-alert-list.entry.js +1 -1
- package/dist/esm/ez-alert.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-badge.entry.js +1 -1
- package/dist/esm/ez-breadcrumb.entry.js +1 -1
- package/dist/esm/ez-button.entry.js +2 -2
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-card-item_3.entry.js +1 -1
- package/dist/esm/ez-chart.entry.js +1 -1
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +3 -3
- package/dist/esm/ez-custom-form-input_2.entry.js +5 -4
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-dialog.entry.js +2 -2
- package/dist/esm/ez-dropdown_2.entry.js +1 -1
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +2 -2
- package/dist/esm/ez-grid.entry.js +19 -8
- package/dist/esm/ez-guide-navigator.entry.js +1 -1
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +2 -2
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +2 -2
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +2 -2
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-scroller_2.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +41 -8
- package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js +2 -2
- package/dist/esm/ez-split-item.entry.js +1 -1
- package/dist/esm/ez-split-panel.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +1 -1
- package/dist/esm/ez-text-input.entry.js +32 -2
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ez-tree.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +1 -1
- package/dist/esm/ez-view-stack.entry.js +1 -1
- package/dist/esm/ezui.js +2 -2
- package/dist/esm/filter-column.entry.js +1 -1
- package/dist/esm/{index-baa5e267.js → index-5a720e56.js} +3 -1
- package/dist/esm/loader.js +2 -2
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-44caad9a.entry.js → p-0378416a.entry.js} +1 -1
- package/dist/ezui/p-076e868b.entry.js +1 -0
- package/dist/ezui/p-0e1cc2d1.entry.js +1 -0
- package/dist/ezui/{p-1285c902.entry.js → p-11b09aa1.entry.js} +1 -1
- package/dist/ezui/{p-77a4bd35.entry.js → p-11bfeca3.entry.js} +1 -1
- package/dist/ezui/{p-d0ca26fe.entry.js → p-16e21a40.entry.js} +1 -1
- package/dist/ezui/p-1af7fae4.entry.js +1 -0
- package/dist/ezui/{p-8888d9ed.entry.js → p-1b08bf3c.entry.js} +1 -1
- package/dist/ezui/{p-a2e5b8c3.entry.js → p-2f53435e.entry.js} +1 -1
- package/dist/ezui/{p-baf80b13.entry.js → p-30951bd7.entry.js} +1 -1
- package/dist/ezui/{p-91266ddd.entry.js → p-33675dae.entry.js} +1 -1
- package/dist/ezui/p-3af64edd.entry.js +1 -0
- package/dist/ezui/{p-0db68715.entry.js → p-3cc9b84a.entry.js} +1 -1
- package/dist/ezui/{p-0a75bb05.entry.js → p-3d38bfea.entry.js} +1 -1
- package/dist/ezui/{p-7bc07c31.entry.js → p-3f8c33e0.entry.js} +1 -1
- package/dist/ezui/{p-6d79930d.entry.js → p-554522db.entry.js} +1 -1
- package/dist/ezui/{p-1f50fa05.entry.js → p-6b51c9cc.entry.js} +1 -1
- package/dist/ezui/p-6bda82d1.entry.js +1 -0
- package/dist/ezui/p-6d31c43c.entry.js +1 -0
- package/dist/ezui/p-6ec40dec.entry.js +1 -0
- package/dist/ezui/{p-8d0f02c7.entry.js → p-6f0422ff.entry.js} +2 -2
- package/dist/ezui/{p-5ed81457.entry.js → p-6fc26622.entry.js} +1 -1
- package/dist/ezui/{p-f9e551de.entry.js → p-70f1c812.entry.js} +1 -1
- package/dist/ezui/{p-555c9018.entry.js → p-7567ccdd.entry.js} +1 -1
- package/dist/ezui/p-7de7baa3.entry.js +1 -0
- package/dist/ezui/{p-bfad39eb.entry.js → p-7f5afb1f.entry.js} +1 -1
- package/dist/ezui/{p-1e7a8633.entry.js → p-81461d2f.entry.js} +1 -1
- package/dist/ezui/{p-8df1ca33.entry.js → p-82fa4b09.entry.js} +1 -1
- package/dist/ezui/{p-bcb53f27.entry.js → p-868b56f7.entry.js} +1 -1
- package/dist/ezui/{p-cd2e78f0.entry.js → p-8f026744.entry.js} +1 -1
- package/dist/ezui/{p-09de35a2.entry.js → p-91ccae0c.entry.js} +1 -1
- package/dist/ezui/{p-c0d9c4f8.entry.js → p-92748142.entry.js} +1 -1
- package/dist/ezui/{p-c4320a39.entry.js → p-a563df31.entry.js} +1 -1
- package/dist/ezui/{p-990b4318.entry.js → p-a921e3e7.entry.js} +1 -1
- package/dist/ezui/{p-17be134a.entry.js → p-b2f6bc0a.entry.js} +1 -1
- package/dist/ezui/{p-c3045972.entry.js → p-b858fc6e.entry.js} +1 -1
- package/dist/ezui/{p-e347df9c.entry.js → p-bef7daac.entry.js} +1 -1
- package/dist/ezui/{p-ffd246f5.entry.js → p-bfc30e61.entry.js} +1 -1
- package/dist/ezui/{p-19098a3f.entry.js → p-bfc59380.entry.js} +1 -1
- package/dist/ezui/{p-9f5fa3f9.entry.js → p-c2b20f78.entry.js} +1 -1
- package/dist/ezui/{p-97af4b13.entry.js → p-d27b4b3e.entry.js} +1 -1
- package/dist/ezui/{p-a5b91a77.entry.js → p-d960a031.entry.js} +1 -1
- package/dist/ezui/{p-a80b1287.entry.js → p-dfca5946.entry.js} +1 -1
- package/dist/ezui/{p-7fdd479f.entry.js → p-e18d9e6a.entry.js} +1 -1
- package/dist/ezui/{p-23a36bb6.js → p-e4c7eb39.js} +2 -2
- package/dist/ezui/{p-0306dff7.entry.js → p-e6b38ade.entry.js} +1 -1
- package/dist/ezui/{p-90bcd2ba.entry.js → p-e7395eae.entry.js} +1 -1
- package/dist/ezui/p-e80dcf86.entry.js +1 -0
- package/dist/ezui/{p-650e4b6d.entry.js → p-f1c2c19e.entry.js} +1 -1
- package/dist/ezui/{p-6e429cff.entry.js → p-fc194825.entry.js} +1 -1
- package/dist/types/components/ez-modal/ez-modal.d.ts +1 -1
- package/dist/types/components/ez-search/ez-search.d.ts +4 -1
- package/dist/types/components.d.ts +2 -2
- package/dist/types/utils/ResponsiveInputUtils.d.ts +6 -0
- package/package.json +1 -1
- package/dist/ezui/p-10820c20.entry.js +0 -1
- package/dist/ezui/p-1f830a2f.entry.js +0 -1
- package/dist/ezui/p-2aa8e4b2.entry.js +0 -1
- package/dist/ezui/p-3175fe8c.entry.js +0 -1
- package/dist/ezui/p-3dd919b7.entry.js +0 -1
- package/dist/ezui/p-9d9ecb7c.entry.js +0 -1
- package/dist/ezui/p-abce5219.entry.js +0 -1
- package/dist/ezui/p-bc2f844e.entry.js +0 -1
- package/dist/ezui/p-e5e16038.entry.js +0 -1
|
@@ -56,7 +56,7 @@ export class EzCustomFormInput {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
getContent() {
|
|
59
|
-
var _a, _b;
|
|
59
|
+
var _a, _b, _c, _d, _e;
|
|
60
60
|
const fieldProps = new Map();
|
|
61
61
|
for (const prop in this.formViewField.props) {
|
|
62
62
|
fieldProps.set(prop, this.formViewField.props[prop]);
|
|
@@ -94,7 +94,8 @@ export class EzCustomFormInput {
|
|
|
94
94
|
if (typeof gui === 'string') {
|
|
95
95
|
gui = HTMLBuilder.parseElement(gui);
|
|
96
96
|
}
|
|
97
|
-
|
|
97
|
+
const value = (_e = (_d = (_c = this.value) === null || _c === void 0 ? void 0 : _c.value) !== null && _d !== void 0 ? _d : this.value) !== null && _e !== void 0 ? _e : '';
|
|
98
|
+
gui.setAttribute('value', value);
|
|
98
99
|
this.gui = h("div", { key: StringUtils.generateUUID(), ref: el => el && el.appendChild(gui) });
|
|
99
100
|
}
|
|
100
101
|
setValue(value) {
|
|
@@ -1015,7 +1015,12 @@ export default class AgGridController {
|
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
onRowDoubleClick(evt) {
|
|
1018
|
+
var _a, _b;
|
|
1018
1019
|
if (this._doubleClickCallBack && (!this._options.enableGridInsert || !this._dataUnit.hasNewRecord())) {
|
|
1020
|
+
/**
|
|
1021
|
+
* Evita mudança de view e a grade permanecer no modo de edição.
|
|
1022
|
+
*/
|
|
1023
|
+
(_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api) === null || _b === void 0 ? void 0 : _b.stopEditing();
|
|
1019
1024
|
this._doubleClickCallBack(evt.data);
|
|
1020
1025
|
}
|
|
1021
1026
|
}
|
|
@@ -1031,20 +1036,29 @@ export default class AgGridController {
|
|
|
1031
1036
|
}
|
|
1032
1037
|
}
|
|
1033
1038
|
setCellEditors(customEditors) {
|
|
1039
|
+
var _a, _b, _c, _d, _e;
|
|
1034
1040
|
if (!this._editionManager) {
|
|
1035
1041
|
this._customEditors = customEditors;
|
|
1036
1042
|
return;
|
|
1037
1043
|
}
|
|
1044
|
+
const currentEditingCells = (_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api) === null || _b === void 0 ? void 0 : _b.getEditingCells();
|
|
1038
1045
|
this._editionManager.setCellEditors(customEditors);
|
|
1046
|
+
if ((currentEditingCells === null || currentEditingCells === void 0 ? void 0 : currentEditingCells.length) > 0) {
|
|
1047
|
+
this._gridOptions.api.startEditingCell({ colKey: (_d = (_c = currentEditingCells[0]) === null || _c === void 0 ? void 0 : _c.column) === null || _d === void 0 ? void 0 : _d.getColId(), rowIndex: (_e = currentEditingCells[0]) === null || _e === void 0 ? void 0 : _e.rowIndex });
|
|
1048
|
+
}
|
|
1039
1049
|
}
|
|
1040
1050
|
setCellRenders(customRenders) {
|
|
1041
|
-
var _a;
|
|
1051
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1042
1052
|
if (!this._editionManager) {
|
|
1043
1053
|
this._customRenders = customRenders;
|
|
1044
1054
|
return;
|
|
1045
1055
|
}
|
|
1046
1056
|
this._editionManager.setCellRenders(customRenders);
|
|
1047
|
-
(_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api.
|
|
1057
|
+
const currentEditingCells = (_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api) === null || _b === void 0 ? void 0 : _b.getEditingCells();
|
|
1058
|
+
(_c = this._gridOptions) === null || _c === void 0 ? void 0 : _c.api.redrawRows();
|
|
1059
|
+
if ((currentEditingCells === null || currentEditingCells === void 0 ? void 0 : currentEditingCells.length) > 0) {
|
|
1060
|
+
this._gridOptions.api.startEditingCell({ colKey: (_e = (_d = currentEditingCells[0]) === null || _d === void 0 ? void 0 : _d.column) === null || _e === void 0 ? void 0 : _e.getColId(), rowIndex: (_f = currentEditingCells[0]) === null || _f === void 0 ? void 0 : _f.rowIndex });
|
|
1061
|
+
}
|
|
1048
1062
|
}
|
|
1049
1063
|
clearInvalidCells(stopEdition) {
|
|
1050
1064
|
if (!this._editionManager)
|
|
@@ -385,12 +385,9 @@ export default class GridEditionManager {
|
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
setCellEditors(customEditors) {
|
|
388
|
-
var _a
|
|
388
|
+
var _a;
|
|
389
389
|
this._customEditors = customEditors;
|
|
390
|
-
|
|
391
|
-
return;
|
|
392
|
-
this._gridOptions.api.stopEditing();
|
|
393
|
-
window.requestAnimationFrame(() => this.focusOnCell(this._lastCellOpened));
|
|
390
|
+
(_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api.stopEditing();
|
|
394
391
|
}
|
|
395
392
|
setCellRenders(customRenders) {
|
|
396
393
|
this._customRenders = customRenders;
|
|
@@ -211,8 +211,8 @@ export class EzModal {
|
|
|
211
211
|
"type": "string",
|
|
212
212
|
"mutable": false,
|
|
213
213
|
"complexType": {
|
|
214
|
-
"original": "\"medium\" | \"light\"",
|
|
215
|
-
"resolved": "\"light\" | \"medium\"",
|
|
214
|
+
"original": "\"medium\" | \"light\" | \"none\"",
|
|
215
|
+
"resolved": "\"light\" | \"medium\" | \"none\"",
|
|
216
216
|
"references": {}
|
|
217
217
|
},
|
|
218
218
|
"required": false,
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
:host {
|
|
2
|
+
/*@doc Define a largura maxima do componente.*/
|
|
3
|
+
--ez-number-input__min-width: 0px;
|
|
4
|
+
/*@doc Define a largura minima do componente.*/
|
|
5
|
+
--ez-number-input__max-width: 100%;
|
|
6
|
+
|
|
2
7
|
display: block;
|
|
3
8
|
width: 100%;
|
|
4
9
|
}
|
|
5
10
|
|
|
6
11
|
.number__input {
|
|
7
12
|
height: 100%;
|
|
13
|
+
|
|
14
|
+
min-width: var(--ez-number-input__min-width);
|
|
15
|
+
max-width: var(--ez-number-input__max-width);
|
|
8
16
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
/*@doc Define a família da fonte do título do popup.*/
|
|
19
19
|
--ez-popup__title--font-family: var(--font-pattern, "Roboto");
|
|
20
20
|
/*@doc Define o tamanho da fonte do título do popup.*/
|
|
21
|
-
--ez-popup__title--font-size: var(--title--large,
|
|
21
|
+
--ez-popup__title--font-size: var(--title--extra-large, 24px);
|
|
22
22
|
/*@doc Define a cor da fonte do título do popup.*/
|
|
23
23
|
--ez-popup__title--color: var(--title--primary, #2b3a54);
|
|
24
24
|
/*@doc Define o peso da fonte do título do popup.*/
|
|
@@ -38,7 +38,7 @@ export class EzSearch {
|
|
|
38
38
|
this.options = undefined;
|
|
39
39
|
this.suppressSearch = false;
|
|
40
40
|
this.ensureClearButtonVisible = false;
|
|
41
|
-
this.suppressPreLoad =
|
|
41
|
+
this.suppressPreLoad = true;
|
|
42
42
|
this.autoFocus = false;
|
|
43
43
|
}
|
|
44
44
|
observeErrorMessage() {
|
|
@@ -50,12 +50,25 @@ export class EzSearch {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
+
getValue(val) {
|
|
54
|
+
return typeof val === 'object' ? val === null || val === void 0 ? void 0 : val.value : val;
|
|
55
|
+
}
|
|
53
56
|
validateNewValue(newValue, oldValue) {
|
|
54
|
-
const
|
|
55
|
-
|
|
57
|
+
const parsedNewValue = this.getValue(newValue);
|
|
58
|
+
const parsedOldValue = this.getValue(oldValue);
|
|
59
|
+
const newValueIsValid = parsedNewValue !== "[object Object]" && !!parsedNewValue;
|
|
60
|
+
const oldValueIsValid = parsedOldValue !== "[object Object]" && !!parsedOldValue;
|
|
61
|
+
const valuesIsDifferent = parsedNewValue !== parsedOldValue;
|
|
62
|
+
if (!oldValueIsValid && newValueIsValid) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
if (newValueIsValid && oldValueIsValid && valuesIsDifferent) {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
56
69
|
}
|
|
57
70
|
async observeValue(newValue, oldValue) {
|
|
58
|
-
if (this._textInput &&
|
|
71
|
+
if (this._textInput && this.validateNewValue(newValue, oldValue)) {
|
|
59
72
|
if (typeof newValue === "string") {
|
|
60
73
|
await this.handleValueAsString(newValue);
|
|
61
74
|
return;
|
|
@@ -143,6 +156,9 @@ export class EzSearch {
|
|
|
143
156
|
return;
|
|
144
157
|
}
|
|
145
158
|
await this.loadDescriptionValue(value);
|
|
159
|
+
if (!this._currentValue) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
146
162
|
this.setInputValue();
|
|
147
163
|
this.ezChange.emit(this.value);
|
|
148
164
|
this._currentValue = this.value;
|
|
@@ -198,7 +214,7 @@ export class EzSearch {
|
|
|
198
214
|
return;
|
|
199
215
|
}
|
|
200
216
|
let text = (!this.showSelectedValue || currentValue.value == undefined) ? currentValue.label : currentValue.label ? `${currentValue.value} - ${currentValue.label}` : currentValue.value;
|
|
201
|
-
text = text.replace(new RegExp(this._startHighlightTag, 'g'), '').replace(new RegExp(this._endHighlightTag, 'g'), '');
|
|
217
|
+
text = text === null || text === void 0 ? void 0 : text.replace(new RegExp(this._startHighlightTag, 'g'), '').replace(new RegExp(this._endHighlightTag, 'g'), '');
|
|
202
218
|
return text;
|
|
203
219
|
}
|
|
204
220
|
getText() {
|
|
@@ -525,6 +541,19 @@ export class EzSearch {
|
|
|
525
541
|
this._preSelection = undefined;
|
|
526
542
|
this.updateVisibleOptions();
|
|
527
543
|
}
|
|
544
|
+
async handleInitialValue() {
|
|
545
|
+
const valueIsValid = !!this.getValue(this.value);
|
|
546
|
+
if (!valueIsValid) {
|
|
547
|
+
return;
|
|
548
|
+
}
|
|
549
|
+
if (typeof this.value === "string") {
|
|
550
|
+
await this.handleValueAsString(this.value);
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
let text = this.getFormattedText(this.value);
|
|
554
|
+
text = this.replaceQuotes(text);
|
|
555
|
+
this._textInput.value = text;
|
|
556
|
+
}
|
|
528
557
|
//---------------------------------------------
|
|
529
558
|
// Lifecycle web component
|
|
530
559
|
//---------------------------------------------
|
|
@@ -556,10 +585,9 @@ export class EzSearch {
|
|
|
556
585
|
ElementIDUtils.addIDInfoIfNotExists(elem, "itemSearch");
|
|
557
586
|
});
|
|
558
587
|
}
|
|
559
|
-
componentDidLoad() {
|
|
588
|
+
async componentDidLoad() {
|
|
560
589
|
this._currentValue = this.value;
|
|
561
590
|
CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
|
|
562
|
-
this.setInputValue(false);
|
|
563
591
|
this._resizeObserver = new ResizeObserver((entries) => {
|
|
564
592
|
window.requestAnimationFrame(() => {
|
|
565
593
|
if (!Array.isArray(entries) || !entries.length)
|
|
@@ -570,12 +598,17 @@ export class EzSearch {
|
|
|
570
598
|
}
|
|
571
599
|
});
|
|
572
600
|
});
|
|
601
|
+
await this.handleInitialValue();
|
|
573
602
|
if (this.autoFocus) {
|
|
574
603
|
requestAnimationFrame(() => {
|
|
575
604
|
this.setFocus({ selectText: true });
|
|
576
605
|
});
|
|
577
606
|
}
|
|
578
607
|
}
|
|
608
|
+
disconnectedCallback() {
|
|
609
|
+
var _a;
|
|
610
|
+
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
611
|
+
}
|
|
579
612
|
//---------------------------------------------
|
|
580
613
|
// Event handlers
|
|
581
614
|
//---------------------------------------------
|
|
@@ -1070,7 +1103,7 @@ export class EzSearch {
|
|
|
1070
1103
|
},
|
|
1071
1104
|
"attribute": "suppress-pre-load",
|
|
1072
1105
|
"reflect": false,
|
|
1073
|
-
"defaultValue": "
|
|
1106
|
+
"defaultValue": "true"
|
|
1074
1107
|
},
|
|
1075
1108
|
"autoFocus": {
|
|
1076
1109
|
"type": "boolean",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
/*@doc Define a cor de fundo quando o cursor está sobre o botão.*/
|
|
42
42
|
--ez-split-button--hover--background-color: var(--background--light, #ffffff);
|
|
43
43
|
/*@doc Define a cor do texto quando o botão está desabilitado.*/
|
|
44
|
-
--ez-split-button--disabled-color: var(--text--
|
|
44
|
+
--ez-split-button--disabled-color: var(--text--primary);
|
|
45
45
|
/*@doc Define a cor de fundo quando o botão está desabilitado.*/
|
|
46
|
-
--ez-split-button--disabled--background-color: var(--
|
|
46
|
+
--ez-split-button--disabled--background-color: var(--background--medium);
|
|
47
47
|
/*@doc Define o estido da borda quando o botão está selecionado.*/
|
|
48
48
|
--ez-split-button--focus--border: var(--border--medium, 2px) var(--color--primary-300);
|
|
49
49
|
/*@doc Define a sombra do botão quando selecionado.*/
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
--ez-text-input__icon--width: 48px;
|
|
9
9
|
/*@doc Define a altura do componente em modo "slim".*/
|
|
10
10
|
--ez-text-input--height--slim: 32px;
|
|
11
|
+
/*@doc Define a largura maxima do componente.*/
|
|
12
|
+
--ez-text-input__min-width: 0px;
|
|
13
|
+
/*@doc Define a largura minima do componente.*/
|
|
14
|
+
--ez-text-input__max-width: 100%;
|
|
11
15
|
|
|
12
16
|
/* general */
|
|
13
17
|
/*@doc Define o raio da borda do input do componente.*/
|
|
@@ -83,6 +87,8 @@
|
|
|
83
87
|
position: relative;
|
|
84
88
|
/*public*/
|
|
85
89
|
width: var(--ez-text-input--width);
|
|
90
|
+
min-width: var(--ez-text-input__min-width);
|
|
91
|
+
max-width: var(--ez-text-input__max-width);
|
|
86
92
|
}
|
|
87
93
|
|
|
88
94
|
:host(.grid_editor){
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { ElementIDUtils, MaskFormatter } from "@sankhyalabs/core";
|
|
3
|
+
import { applyEllipsisToInput } from "../../utils/ResponsiveInputUtils";
|
|
3
4
|
export class EzTextInput {
|
|
4
5
|
constructor() {
|
|
5
6
|
this.label = undefined;
|
|
@@ -243,6 +244,9 @@ export class EzTextInput {
|
|
|
243
244
|
this._inputElem.addEventListener('focus', () => {
|
|
244
245
|
this._inputElem.setSelectionRange(0, this._inputElem.value.length);
|
|
245
246
|
});
|
|
247
|
+
if (this._inputElem) {
|
|
248
|
+
applyEllipsisToInput(this._inputElem);
|
|
249
|
+
}
|
|
246
250
|
}
|
|
247
251
|
componentWillLoad() {
|
|
248
252
|
this.observeMask();
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aplica comportamento de elipses a um input caso o texto ultrapasse o tamanho disponível.
|
|
3
|
+
*
|
|
4
|
+
* @param inputElement A referência ao elemento input (HTMLInputElement).
|
|
5
|
+
*/
|
|
6
|
+
export const applyEllipsisToInput = (inputElement) => {
|
|
7
|
+
if (!inputElement || !inputElement.style) {
|
|
8
|
+
console.error('[applyEllipsisToInput] Referência ao elemento input é inválida.');
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
inputElement.style.textOverflow = 'ellipsis';
|
|
12
|
+
inputElement.style.overflow = 'hidden';
|
|
13
|
+
inputElement.style.whiteSpace = 'nowrap';
|
|
14
|
+
const adjustEllipsis = () => {
|
|
15
|
+
const value = inputElement.value || '';
|
|
16
|
+
const isOverflowing = inputElement.scrollWidth > inputElement.clientWidth;
|
|
17
|
+
if (isOverflowing) {
|
|
18
|
+
inputElement.setAttribute('title', value);
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
inputElement.removeAttribute('title');
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
inputElement.addEventListener('input', adjustEllipsis);
|
|
25
|
+
adjustEllipsis();
|
|
26
|
+
};
|
|
@@ -97,7 +97,7 @@ export const buildFormMetadata = (config, dataUnit, includeDetails = false) => {
|
|
|
97
97
|
return;
|
|
98
98
|
}
|
|
99
99
|
const descriptor = dataUnit.getField(field.name);
|
|
100
|
-
if (descriptor && tabConfig.visible) {
|
|
100
|
+
if (descriptor && descriptor.visible && tabConfig.visible) {
|
|
101
101
|
if (!sheets.has(tabConfig)) {
|
|
102
102
|
sheets.set(tabConfig, []);
|
|
103
103
|
}
|