@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-77074.0 → 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/DataBinder-3b083480.js +445 -0
- package/dist/cjs/FocusResolver-885f2173.js +35 -0
- 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 +13 -20
- package/dist/cjs/ez-chart.cjs.entry.js +2 -2
- 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 +49 -13
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +5 -4
- package/dist/cjs/ez-date-input.cjs.entry.js +9 -3
- package/dist/cjs/ez-date-time-input.cjs.entry.js +9 -3
- package/dist/cjs/ez-dialog.cjs.entry.js +10 -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 +3 -3
- package/dist/cjs/ez-form.cjs.entry.js +6 -326
- package/dist/cjs/ez-grid.cjs.entry.js +14615 -70501
- 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 +152 -101
- 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 +9 -2
- package/dist/cjs/ez-popover.cjs.entry.js +2 -2
- 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 +69 -20
- 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 +67 -5
- package/dist/cjs/ez-text-input.cjs.entry.js +80 -8
- package/dist/cjs/ez-time-input.cjs.entry.js +7 -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 +2 -2
- 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 +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ez-button/ez-button.css +2 -2
- package/dist/collection/components/ez-card-item/ez-card-item.css +14 -5
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +12 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +76 -15
- package/dist/collection/components/ez-date-input/ez-date-input.js +35 -4
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +35 -4
- package/dist/collection/components/ez-dialog/ez-dialog.js +9 -1
- package/dist/collection/components/ez-filter-input/ez-filter-input.css +0 -11
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +22 -52
- package/dist/collection/components/ez-form/ez-form.js +1 -0
- package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +3 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +96 -27
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +8 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +164 -46
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +7 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +4 -1
- package/dist/collection/components/ez-grid/ez-grid.js +90 -3
- package/dist/collection/components/ez-list/ez-list.css +5 -5
- package/dist/collection/components/ez-list/ez-list.js +152 -170
- 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-number-input/ez-number-input.js +25 -0
- package/dist/collection/components/ez-popover/ez-popover.css +3 -10
- package/dist/collection/components/ez-popup/ez-popup.js +1 -1
- package/dist/collection/components/ez-search/ez-search.css +1 -1
- package/dist/collection/components/ez-search/ez-search.js +95 -21
- package/dist/collection/components/ez-split-button/ez-split-button.css +2 -2
- package/dist/collection/components/ez-text-area/ez-text-area.css +49 -0
- package/dist/collection/components/ez-text-area/ez-text-area.js +102 -2
- package/dist/collection/components/ez-text-input/ez-text-input.css +33 -53
- package/dist/collection/components/ez-text-input/ez-text-input.js +88 -6
- package/dist/collection/components/ez-time-input/ez-time-input.js +24 -0
- package/dist/collection/utils/FocusResolver.js +31 -0
- package/dist/collection/utils/ResponsiveInputUtils.js +26 -0
- package/dist/collection/utils/form/DataBinder.js +18 -3
- package/dist/collection/utils/form/FormMetadata.js +1 -1
- package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
- package/dist/custom-elements/index.js +15360 -70903
- package/dist/esm/DataBinder-02fa9bb9.js +441 -0
- package/dist/esm/FocusResolver-1ccbf850.js +33 -0
- 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 +13 -20
- package/dist/esm/ez-chart.entry.js +2 -2
- 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 +50 -14
- package/dist/esm/ez-custom-form-input_2.entry.js +5 -4
- package/dist/esm/ez-date-input.entry.js +9 -3
- package/dist/esm/ez-date-time-input.entry.js +9 -3
- package/dist/esm/ez-dialog.entry.js +10 -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 +3 -3
- package/dist/esm/ez-form.entry.js +5 -325
- package/dist/esm/ez-grid.entry.js +14585 -70471
- 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 +153 -102
- 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 +9 -2
- package/dist/esm/ez-popover.entry.js +2 -2
- 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 +69 -20
- 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 +67 -5
- package/dist/esm/ez-text-input.entry.js +80 -8
- package/dist/esm/ez-time-input.entry.js +7 -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 +3 -3
- 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 +3 -3
- 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-16e21a40.entry.js +1 -0
- 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-33675dae.entry.js +1 -0
- package/dist/ezui/p-3af64edd.entry.js +1 -0
- package/dist/ezui/p-3cc9b84a.entry.js +1 -0
- package/dist/ezui/p-3d38bfea.entry.js +1 -0
- package/dist/ezui/{p-7bc07c31.entry.js → p-3f8c33e0.entry.js} +1 -1
- package/dist/ezui/p-455e737c.js +1 -0
- 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-6f0422ff.entry.js +309 -0
- 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-7f5afb1f.entry.js +1 -0
- 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-8f026744.entry.js +1 -0
- 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-bfc30e61.entry.js +1 -0
- package/dist/ezui/p-bfc59380.entry.js +1 -0
- package/dist/ezui/{p-9f5fa3f9.entry.js → p-c2b20f78.entry.js} +1 -1
- package/dist/ezui/p-d27b4b3e.entry.js +1 -0
- package/dist/ezui/p-d960a031.entry.js +1 -0
- package/dist/ezui/p-dc628ed3.js +1 -0
- package/dist/ezui/p-dfca5946.entry.js +1 -0
- 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-combo-box/ez-combo-box.d.ts +7 -1
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +6 -1
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +6 -1
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +2 -0
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +4 -11
- package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +12 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +7 -2
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +2 -1
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +19 -7
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +3 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +11 -1
- package/dist/types/components/ez-list/ez-list.d.ts +3 -26
- package/dist/types/components/ez-modal/ez-modal.d.ts +1 -1
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +4 -0
- package/dist/types/components/ez-search/ez-search.d.ts +10 -2
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +17 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +9 -0
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +4 -0
- package/dist/types/components.d.ts +109 -44
- package/dist/types/utils/FocusResolver.d.ts +5 -0
- package/dist/types/utils/ResponsiveInputUtils.d.ts +6 -0
- package/dist/types/utils/form/DataBinder.d.ts +3 -0
- package/package.json +11 -4
- package/dist/cjs/RecordValidationProcessor-10846595.js +0 -108
- package/dist/esm/RecordValidationProcessor-9c6cc267.js +0 -105
- package/dist/ezui/p-10820c20.entry.js +0 -1
- package/dist/ezui/p-188f1c4c.entry.js +0 -1
- package/dist/ezui/p-49456b34.entry.js +0 -1
- package/dist/ezui/p-5a90d7d1.entry.js +0 -1
- package/dist/ezui/p-5b205c80.entry.js +0 -1
- package/dist/ezui/p-62732269.entry.js +0 -1
- package/dist/ezui/p-86b6aa01.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-b3b94f72.entry.js +0 -1
- package/dist/ezui/p-b95632e8.entry.js +0 -1
- package/dist/ezui/p-bc2f844e.entry.js +0 -1
- package/dist/ezui/p-bcd47eda.entry.js +0 -1
- package/dist/ezui/p-c3c3d640.entry.js +0 -304
- package/dist/ezui/p-cdc472cc.entry.js +0 -1
- package/dist/ezui/p-d2c06f38.entry.js +0 -1
- package/dist/ezui/p-d8f64bb7.entry.js +0 -1
- package/dist/ezui/p-dc4ada32.entry.js +0 -1
- package/dist/ezui/p-e85c48d7.entry.js +0 -1
- package/dist/ezui/p-f299c608.entry.js +0 -1
- package/dist/ezui/p-f42855b9.js +0 -1
- package/dist/ezui/p-f80ac647.entry.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementIDUtils, FloatingManager, ObjectUtils } from "@sankhyalabs/core";
|
|
1
|
+
import { ElementIDUtils, FloatingManager, ObjectUtils, StringUtils } from "@sankhyalabs/core";
|
|
2
2
|
import { h, Host } from "@stencil/core";
|
|
3
3
|
import { CSSVarsUtils } from "../../utils";
|
|
4
4
|
export class EzComboBox {
|
|
@@ -25,12 +25,13 @@ export class EzComboBox {
|
|
|
25
25
|
this.suppressSearch = false;
|
|
26
26
|
this.optionLoader = undefined;
|
|
27
27
|
this.suppressEmptyOption = false;
|
|
28
|
-
this.stopPropagateEnterKeyEvent =
|
|
28
|
+
this.stopPropagateEnterKeyEvent = true;
|
|
29
29
|
this.canShowError = true;
|
|
30
30
|
this.mode = "regular";
|
|
31
31
|
this.hideErrorOnFocusOut = true;
|
|
32
32
|
this.listOptionsPosition = undefined;
|
|
33
33
|
this.isTextSearch = false;
|
|
34
|
+
this.autoFocus = false;
|
|
34
35
|
}
|
|
35
36
|
observeErrorMessage() {
|
|
36
37
|
var _a;
|
|
@@ -93,9 +94,9 @@ export class EzComboBox {
|
|
|
93
94
|
/**
|
|
94
95
|
* Aplica o foco no campo.
|
|
95
96
|
*/
|
|
96
|
-
async setFocus() {
|
|
97
|
+
async setFocus(options) {
|
|
97
98
|
if (this._textInput) {
|
|
98
|
-
this._textInput.setFocus();
|
|
99
|
+
this._textInput.setFocus(options);
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
/**
|
|
@@ -255,11 +256,15 @@ export class EzComboBox {
|
|
|
255
256
|
: undefined, h("span", { class: "item__label " + (this.showOptionValue ? "item__label--bold" : ""), title: opt.label }, opt.label));
|
|
256
257
|
}
|
|
257
258
|
showOptions() {
|
|
259
|
+
var _a, _b;
|
|
258
260
|
if (!this.enabled)
|
|
259
261
|
return;
|
|
260
262
|
if (this.isOptionsVisible()) {
|
|
261
263
|
return;
|
|
262
264
|
}
|
|
265
|
+
const valueString = (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : this.value;
|
|
266
|
+
const indexValue = this._visibleOptions.findIndex(option => option.value === valueString);
|
|
267
|
+
this._preSelection = indexValue === -1 ? 0 : indexValue;
|
|
263
268
|
if (!!this._resizeObserver)
|
|
264
269
|
this._resizeObserver.observe(this._textInput);
|
|
265
270
|
this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, isFixed: true, backClickListener: () => this.hideOptions() });
|
|
@@ -301,11 +306,26 @@ export class EzComboBox {
|
|
|
301
306
|
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
302
307
|
});
|
|
303
308
|
}
|
|
304
|
-
selectCurrentOption() {
|
|
309
|
+
selectCurrentOption(focusOnInput = true) {
|
|
305
310
|
if (this._preSelection !== undefined) {
|
|
306
|
-
this.selectOption(this._visibleOptions[this._preSelection]);
|
|
311
|
+
this.selectOption(this._visibleOptions[this._preSelection], focusOnInput);
|
|
307
312
|
this._preSelection = undefined;
|
|
308
313
|
}
|
|
314
|
+
else {
|
|
315
|
+
this.controlListWithOnlyOne(focusOnInput);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
controlListWithOnlyOne(focusOnInput = true) {
|
|
319
|
+
var _a;
|
|
320
|
+
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
321
|
+
if ((source === null || source === void 0 ? void 0 : source.length) > 0) {
|
|
322
|
+
let title = StringUtils.decodeHtmlEntities(source[0].label);
|
|
323
|
+
const option = {
|
|
324
|
+
value: source[0].value,
|
|
325
|
+
label: title,
|
|
326
|
+
};
|
|
327
|
+
this.selectOption(option, focusOnInput);
|
|
328
|
+
}
|
|
309
329
|
}
|
|
310
330
|
updateSource(source) {
|
|
311
331
|
this._startLoading = false;
|
|
@@ -331,7 +351,7 @@ export class EzComboBox {
|
|
|
331
351
|
}
|
|
332
352
|
}
|
|
333
353
|
}
|
|
334
|
-
selectOption(newOption) {
|
|
354
|
+
selectOption(newOption, focusOnInput = true) {
|
|
335
355
|
var _a, _b;
|
|
336
356
|
const currentValue = this.getSelectedOption(this.value);
|
|
337
357
|
if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.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()))
|
|
@@ -342,6 +362,11 @@ export class EzComboBox {
|
|
|
342
362
|
else {
|
|
343
363
|
this.resetOptions();
|
|
344
364
|
}
|
|
365
|
+
if (focusOnInput) {
|
|
366
|
+
setTimeout(() => {
|
|
367
|
+
this.setFocus();
|
|
368
|
+
}, 0);
|
|
369
|
+
}
|
|
345
370
|
}
|
|
346
371
|
loadOptions(mode, argument = "") {
|
|
347
372
|
this._criteria = argument;
|
|
@@ -425,6 +450,11 @@ export class EzComboBox {
|
|
|
425
450
|
}
|
|
426
451
|
});
|
|
427
452
|
});
|
|
453
|
+
if (this.autoFocus) {
|
|
454
|
+
requestAnimationFrame(() => {
|
|
455
|
+
this.setFocus({ selectText: true });
|
|
456
|
+
});
|
|
457
|
+
}
|
|
428
458
|
}
|
|
429
459
|
//---------------------------------------------
|
|
430
460
|
// Event handlers
|
|
@@ -479,18 +509,24 @@ export class EzComboBox {
|
|
|
479
509
|
}
|
|
480
510
|
switch (event.key) {
|
|
481
511
|
case "ArrowDown":
|
|
512
|
+
event.stopPropagation();
|
|
513
|
+
if (this.canShowListOptions())
|
|
514
|
+
event.preventDefault();
|
|
482
515
|
this.showOptions();
|
|
483
516
|
this.nextOption();
|
|
484
|
-
event.stopPropagation();
|
|
485
517
|
break;
|
|
486
518
|
case "ArrowUp":
|
|
519
|
+
event.stopPropagation();
|
|
520
|
+
if (this.canShowListOptions())
|
|
521
|
+
event.preventDefault();
|
|
487
522
|
this.showOptions();
|
|
488
523
|
this.previousOption();
|
|
489
|
-
event.stopPropagation();
|
|
490
524
|
break;
|
|
491
525
|
case "Enter":
|
|
492
526
|
this.handleEventPropagation(event);
|
|
493
|
-
this.
|
|
527
|
+
if (this.isOptionsVisible()) {
|
|
528
|
+
this.selectCurrentOption();
|
|
529
|
+
}
|
|
494
530
|
break;
|
|
495
531
|
case "Escape":
|
|
496
532
|
if (this.isOptionsVisible()) {
|
|
@@ -502,7 +538,7 @@ export class EzComboBox {
|
|
|
502
538
|
case "Tab":
|
|
503
539
|
this._tabPressed = true;
|
|
504
540
|
if (this.isOptionsVisible()) {
|
|
505
|
-
this.selectCurrentOption();
|
|
541
|
+
this.selectCurrentOption(false);
|
|
506
542
|
}
|
|
507
543
|
this.resetOptions();
|
|
508
544
|
break;
|
|
@@ -528,7 +564,7 @@ export class EzComboBox {
|
|
|
528
564
|
}
|
|
529
565
|
render() {
|
|
530
566
|
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
531
|
-
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : ""
|
|
567
|
+
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: `text-input-slot-container ${this.suppressSearch ? "suppressed-search-input" : ""}`, ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: "chevron-down" }))), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
|
|
532
568
|
&& this._visibleOptions.length === 0
|
|
533
569
|
&& h("div", { class: "message" }, h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
|
|
534
570
|
&& h("div", { class: "message" }, h("div", { class: "message__loading" })), this.showOptionValue
|
|
@@ -778,7 +814,7 @@ export class EzComboBox {
|
|
|
778
814
|
},
|
|
779
815
|
"attribute": "stop-propagate-enter-key-event",
|
|
780
816
|
"reflect": false,
|
|
781
|
-
"defaultValue": "
|
|
817
|
+
"defaultValue": "true"
|
|
782
818
|
},
|
|
783
819
|
"canShowError": {
|
|
784
820
|
"type": "boolean",
|
|
@@ -870,6 +906,24 @@ export class EzComboBox {
|
|
|
870
906
|
"attribute": "is-text-search",
|
|
871
907
|
"reflect": false,
|
|
872
908
|
"defaultValue": "false"
|
|
909
|
+
},
|
|
910
|
+
"autoFocus": {
|
|
911
|
+
"type": "boolean",
|
|
912
|
+
"mutable": false,
|
|
913
|
+
"complexType": {
|
|
914
|
+
"original": "boolean",
|
|
915
|
+
"resolved": "boolean",
|
|
916
|
+
"references": {}
|
|
917
|
+
},
|
|
918
|
+
"required": false,
|
|
919
|
+
"optional": false,
|
|
920
|
+
"docs": {
|
|
921
|
+
"tags": [],
|
|
922
|
+
"text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
|
|
923
|
+
},
|
|
924
|
+
"attribute": "auto-focus",
|
|
925
|
+
"reflect": false,
|
|
926
|
+
"defaultValue": "false"
|
|
873
927
|
}
|
|
874
928
|
};
|
|
875
929
|
}
|
|
@@ -924,11 +978,18 @@ export class EzComboBox {
|
|
|
924
978
|
},
|
|
925
979
|
"setFocus": {
|
|
926
980
|
"complexType": {
|
|
927
|
-
"signature": "() => Promise<void>",
|
|
928
|
-
"parameters": [
|
|
981
|
+
"signature": "(options?: TFocusOptions) => Promise<void>",
|
|
982
|
+
"parameters": [{
|
|
983
|
+
"tags": [],
|
|
984
|
+
"text": ""
|
|
985
|
+
}],
|
|
929
986
|
"references": {
|
|
930
987
|
"Promise": {
|
|
931
988
|
"location": "global"
|
|
989
|
+
},
|
|
990
|
+
"TFocusOptions": {
|
|
991
|
+
"location": "import",
|
|
992
|
+
"path": "../ez-text-input/ez-text-input"
|
|
932
993
|
}
|
|
933
994
|
},
|
|
934
995
|
"return": "Promise<void>"
|
|
@@ -12,6 +12,7 @@ export class EzDateInput {
|
|
|
12
12
|
this.errorMessage = undefined;
|
|
13
13
|
this.mode = "regular";
|
|
14
14
|
this.canShowError = true;
|
|
15
|
+
this.autoFocus = false;
|
|
15
16
|
}
|
|
16
17
|
observeLabel() {
|
|
17
18
|
if (this._textInput) {
|
|
@@ -48,8 +49,8 @@ export class EzDateInput {
|
|
|
48
49
|
/**
|
|
49
50
|
* Aplica o foco no campo.
|
|
50
51
|
*/
|
|
51
|
-
async setFocus() {
|
|
52
|
-
this._textInput.setFocus();
|
|
52
|
+
async setFocus(options) {
|
|
53
|
+
this._textInput.setFocus(options);
|
|
53
54
|
}
|
|
54
55
|
/**
|
|
55
56
|
* Remove o foco do campo.
|
|
@@ -167,6 +168,11 @@ export class EzDateInput {
|
|
|
167
168
|
componentDidLoad() {
|
|
168
169
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
169
170
|
this.setInputValue();
|
|
171
|
+
if (this.autoFocus) {
|
|
172
|
+
requestAnimationFrame(() => {
|
|
173
|
+
this.setFocus({ selectText: true });
|
|
174
|
+
});
|
|
175
|
+
}
|
|
170
176
|
}
|
|
171
177
|
render() {
|
|
172
178
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
@@ -292,6 +298,24 @@ export class EzDateInput {
|
|
|
292
298
|
"attribute": "can-show-error",
|
|
293
299
|
"reflect": true,
|
|
294
300
|
"defaultValue": "true"
|
|
301
|
+
},
|
|
302
|
+
"autoFocus": {
|
|
303
|
+
"type": "boolean",
|
|
304
|
+
"mutable": false,
|
|
305
|
+
"complexType": {
|
|
306
|
+
"original": "boolean",
|
|
307
|
+
"resolved": "boolean",
|
|
308
|
+
"references": {}
|
|
309
|
+
},
|
|
310
|
+
"required": false,
|
|
311
|
+
"optional": false,
|
|
312
|
+
"docs": {
|
|
313
|
+
"tags": [],
|
|
314
|
+
"text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
|
|
315
|
+
},
|
|
316
|
+
"attribute": "auto-focus",
|
|
317
|
+
"reflect": false,
|
|
318
|
+
"defaultValue": "false"
|
|
295
319
|
}
|
|
296
320
|
};
|
|
297
321
|
}
|
|
@@ -356,11 +380,18 @@ export class EzDateInput {
|
|
|
356
380
|
return {
|
|
357
381
|
"setFocus": {
|
|
358
382
|
"complexType": {
|
|
359
|
-
"signature": "() => Promise<void>",
|
|
360
|
-
"parameters": [
|
|
383
|
+
"signature": "(options?: TFocusOptions) => Promise<void>",
|
|
384
|
+
"parameters": [{
|
|
385
|
+
"tags": [],
|
|
386
|
+
"text": ""
|
|
387
|
+
}],
|
|
361
388
|
"references": {
|
|
362
389
|
"Promise": {
|
|
363
390
|
"location": "global"
|
|
391
|
+
},
|
|
392
|
+
"TFocusOptions": {
|
|
393
|
+
"location": "import",
|
|
394
|
+
"path": "../ez-text-input/ez-text-input"
|
|
364
395
|
}
|
|
365
396
|
},
|
|
366
397
|
"return": "Promise<void>"
|
|
@@ -13,6 +13,7 @@ export class EzDateTimeInput {
|
|
|
13
13
|
this.showSeconds = false;
|
|
14
14
|
this.mode = "regular";
|
|
15
15
|
this.canShowError = true;
|
|
16
|
+
this.autoFocus = false;
|
|
16
17
|
}
|
|
17
18
|
observeLabel() {
|
|
18
19
|
if (this._textInput) {
|
|
@@ -49,8 +50,8 @@ export class EzDateTimeInput {
|
|
|
49
50
|
/**
|
|
50
51
|
* Aplica o foco no campo.
|
|
51
52
|
*/
|
|
52
|
-
async setFocus() {
|
|
53
|
-
this._textInput.setFocus();
|
|
53
|
+
async setFocus(options) {
|
|
54
|
+
this._textInput.setFocus(options);
|
|
54
55
|
}
|
|
55
56
|
/**
|
|
56
57
|
* Remove o foco do campo.
|
|
@@ -217,6 +218,11 @@ export class EzDateTimeInput {
|
|
|
217
218
|
componentDidLoad() {
|
|
218
219
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
219
220
|
this.setInputValue();
|
|
221
|
+
if (this.autoFocus) {
|
|
222
|
+
requestAnimationFrame(() => {
|
|
223
|
+
this.setFocus({ selectText: true });
|
|
224
|
+
});
|
|
225
|
+
}
|
|
220
226
|
}
|
|
221
227
|
render() {
|
|
222
228
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
@@ -360,6 +366,24 @@ export class EzDateTimeInput {
|
|
|
360
366
|
"attribute": "can-show-error",
|
|
361
367
|
"reflect": true,
|
|
362
368
|
"defaultValue": "true"
|
|
369
|
+
},
|
|
370
|
+
"autoFocus": {
|
|
371
|
+
"type": "boolean",
|
|
372
|
+
"mutable": false,
|
|
373
|
+
"complexType": {
|
|
374
|
+
"original": "boolean",
|
|
375
|
+
"resolved": "boolean",
|
|
376
|
+
"references": {}
|
|
377
|
+
},
|
|
378
|
+
"required": false,
|
|
379
|
+
"optional": false,
|
|
380
|
+
"docs": {
|
|
381
|
+
"tags": [],
|
|
382
|
+
"text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
|
|
383
|
+
},
|
|
384
|
+
"attribute": "auto-focus",
|
|
385
|
+
"reflect": false,
|
|
386
|
+
"defaultValue": "false"
|
|
363
387
|
}
|
|
364
388
|
};
|
|
365
389
|
}
|
|
@@ -424,11 +448,18 @@ export class EzDateTimeInput {
|
|
|
424
448
|
return {
|
|
425
449
|
"setFocus": {
|
|
426
450
|
"complexType": {
|
|
427
|
-
"signature": "() => Promise<void>",
|
|
428
|
-
"parameters": [
|
|
451
|
+
"signature": "(options?: TFocusOptions) => Promise<void>",
|
|
452
|
+
"parameters": [{
|
|
453
|
+
"tags": [],
|
|
454
|
+
"text": ""
|
|
455
|
+
}],
|
|
429
456
|
"references": {
|
|
430
457
|
"Promise": {
|
|
431
458
|
"location": "global"
|
|
459
|
+
},
|
|
460
|
+
"TFocusOptions": {
|
|
461
|
+
"location": "import",
|
|
462
|
+
"path": "../ez-text-input/ez-text-input"
|
|
432
463
|
}
|
|
433
464
|
},
|
|
434
465
|
"return": "Promise<void>"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { h, forceUpdate, } from '@stencil/core';
|
|
2
2
|
import { DialogType } from "./DialogType";
|
|
3
3
|
import { ElementIDUtils, FloatingManager } from "@sankhyalabs/core";
|
|
4
|
+
import FocusResolver from '../../utils/FocusResolver';
|
|
4
5
|
class Message {
|
|
5
6
|
constructor(title, message, dialogType, confirm, icon, labelCancel, labelConfirm, btnConfirmDanger, callBack, beforeClose) {
|
|
6
7
|
this.title = title;
|
|
@@ -164,6 +165,7 @@ export class EzDialog {
|
|
|
164
165
|
const dialog = this._element.shadowRoot.querySelector('.overlay .dialog');
|
|
165
166
|
if (dialog instanceof HTMLDivElement) {
|
|
166
167
|
dialog.style.outline = 'none';
|
|
168
|
+
this._lastActiveElement = document.activeElement;
|
|
167
169
|
dialog.focus();
|
|
168
170
|
}
|
|
169
171
|
}
|
|
@@ -176,7 +178,13 @@ export class EzDialog {
|
|
|
176
178
|
focusOnPrimaryButton() {
|
|
177
179
|
const btnConfirm = this._element.shadowRoot.querySelector(`#${this.PRIMARY_BUTTON_ID}`);
|
|
178
180
|
const buttonElement = btnConfirm === null || btnConfirm === void 0 ? void 0 : btnConfirm.shadowRoot.querySelector('button');
|
|
179
|
-
|
|
181
|
+
requestAnimationFrame(() => {
|
|
182
|
+
buttonElement === null || buttonElement === void 0 ? void 0 : buttonElement.focus();
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
disconnectedCallback() {
|
|
186
|
+
FocusResolver.resolveFocus(this._lastActiveElement);
|
|
187
|
+
this._lastActiveElement = undefined;
|
|
180
188
|
}
|
|
181
189
|
render() {
|
|
182
190
|
if (this.opened && this._currentMessage) {
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
:host {
|
|
2
|
-
/*@doc Define a largura do slot direito.*/
|
|
3
|
-
--ez-filter-slot--right--width: 70px;
|
|
4
|
-
|
|
5
2
|
display: block;
|
|
6
3
|
width: 100%;
|
|
7
4
|
}
|
|
8
|
-
|
|
9
|
-
.pointerCursor {
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
ez-text-input {
|
|
14
|
-
--ez-text-input__icon--right--width: var(--ez-filter-slot--right--width)
|
|
15
|
-
}
|
|
@@ -5,16 +5,13 @@ export class EzFilterInput {
|
|
|
5
5
|
constructor() {
|
|
6
6
|
this._searchingText = "";
|
|
7
7
|
this.handleFocus = () => {
|
|
8
|
-
this.ezFocusIn.emit();
|
|
9
|
-
if (!this.asyncSearch) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
8
|
if (this._searchingText === "") {
|
|
13
9
|
this._textInput.value = "";
|
|
14
10
|
}
|
|
15
11
|
else {
|
|
16
12
|
this._textInput.value = this._searchingText;
|
|
17
13
|
}
|
|
14
|
+
this.ezFocusIn.emit();
|
|
18
15
|
};
|
|
19
16
|
this.label = undefined;
|
|
20
17
|
this.value = undefined;
|
|
@@ -24,7 +21,7 @@ export class EzFilterInput {
|
|
|
24
21
|
this.mode = "regular";
|
|
25
22
|
this.asyncSearch = false;
|
|
26
23
|
this.canShowError = true;
|
|
27
|
-
this.
|
|
24
|
+
this.autoFocus = false;
|
|
28
25
|
}
|
|
29
26
|
observeLabel() {
|
|
30
27
|
if (this._textInput) {
|
|
@@ -45,8 +42,8 @@ export class EzFilterInput {
|
|
|
45
42
|
/**
|
|
46
43
|
* Aplica o foco no campo.
|
|
47
44
|
*/
|
|
48
|
-
async setFocus() {
|
|
49
|
-
this._textInput.setFocus();
|
|
45
|
+
async setFocus(options) {
|
|
46
|
+
this._textInput.setFocus(options);
|
|
50
47
|
}
|
|
51
48
|
/**
|
|
52
49
|
* Remove o foco do campo.
|
|
@@ -86,14 +83,6 @@ export class EzFilterInput {
|
|
|
86
83
|
this._textInput.value = this.value;
|
|
87
84
|
}
|
|
88
85
|
}
|
|
89
|
-
/**
|
|
90
|
-
* Método usado para emitir o evento de clique no ícone
|
|
91
|
-
*/
|
|
92
|
-
async handleIconClick() {
|
|
93
|
-
if (this.enabledIconClick) {
|
|
94
|
-
this.ezIconClick.emit(true);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
86
|
handleChange(evt) {
|
|
98
87
|
const newValue = evt.detail;
|
|
99
88
|
this.errorMessage = "";
|
|
@@ -107,10 +96,15 @@ export class EzFilterInput {
|
|
|
107
96
|
}
|
|
108
97
|
componentDidLoad() {
|
|
109
98
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
99
|
+
if (this.autoFocus) {
|
|
100
|
+
requestAnimationFrame(() => {
|
|
101
|
+
this.setFocus({ selectText: true });
|
|
102
|
+
});
|
|
103
|
+
}
|
|
110
104
|
}
|
|
111
105
|
render() {
|
|
112
106
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
113
|
-
return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.handleChange(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, mode: this.mode, onFocusin: this.handleFocus, canShowError: this.canShowError }, h("ez-icon", { slot: "leftIcon", iconName: "search"
|
|
107
|
+
return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.handleChange(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, mode: this.mode, onFocusin: this.handleFocus, canShowError: this.canShowError }, h("ez-icon", { slot: "leftIcon", iconName: "search" })));
|
|
114
108
|
}
|
|
115
109
|
static get is() { return "ez-filter-input"; }
|
|
116
110
|
static get encapsulation() { return "shadow"; }
|
|
@@ -266,7 +260,7 @@ export class EzFilterInput {
|
|
|
266
260
|
"reflect": true,
|
|
267
261
|
"defaultValue": "true"
|
|
268
262
|
},
|
|
269
|
-
"
|
|
263
|
+
"autoFocus": {
|
|
270
264
|
"type": "boolean",
|
|
271
265
|
"mutable": false,
|
|
272
266
|
"complexType": {
|
|
@@ -278,9 +272,9 @@ export class EzFilterInput {
|
|
|
278
272
|
"optional": false,
|
|
279
273
|
"docs": {
|
|
280
274
|
"tags": [],
|
|
281
|
-
"text": "Se true
|
|
275
|
+
"text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
|
|
282
276
|
},
|
|
283
|
-
"attribute": "
|
|
277
|
+
"attribute": "auto-focus",
|
|
284
278
|
"reflect": false,
|
|
285
279
|
"defaultValue": "false"
|
|
286
280
|
}
|
|
@@ -332,32 +326,24 @@ export class EzFilterInput {
|
|
|
332
326
|
"resolved": "void",
|
|
333
327
|
"references": {}
|
|
334
328
|
}
|
|
335
|
-
}, {
|
|
336
|
-
"method": "ezIconClick",
|
|
337
|
-
"name": "ezIconClick",
|
|
338
|
-
"bubbles": true,
|
|
339
|
-
"cancelable": true,
|
|
340
|
-
"composed": true,
|
|
341
|
-
"docs": {
|
|
342
|
-
"tags": [],
|
|
343
|
-
"text": "Emitido quando tem intera\u00E7\u00E3o com o \u00CDcone de pesquisa"
|
|
344
|
-
},
|
|
345
|
-
"complexType": {
|
|
346
|
-
"original": "boolean",
|
|
347
|
-
"resolved": "boolean",
|
|
348
|
-
"references": {}
|
|
349
|
-
}
|
|
350
329
|
}];
|
|
351
330
|
}
|
|
352
331
|
static get methods() {
|
|
353
332
|
return {
|
|
354
333
|
"setFocus": {
|
|
355
334
|
"complexType": {
|
|
356
|
-
"signature": "() => Promise<void>",
|
|
357
|
-
"parameters": [
|
|
335
|
+
"signature": "(options?: TFocusOptions) => Promise<void>",
|
|
336
|
+
"parameters": [{
|
|
337
|
+
"tags": [],
|
|
338
|
+
"text": ""
|
|
339
|
+
}],
|
|
358
340
|
"references": {
|
|
359
341
|
"Promise": {
|
|
360
342
|
"location": "global"
|
|
343
|
+
},
|
|
344
|
+
"TFocusOptions": {
|
|
345
|
+
"location": "import",
|
|
346
|
+
"path": "../ez-text-input/ez-text-input"
|
|
361
347
|
}
|
|
362
348
|
},
|
|
363
349
|
"return": "Promise<void>"
|
|
@@ -433,22 +419,6 @@ export class EzFilterInput {
|
|
|
433
419
|
"text": "M\u00E9todo respons\u00E1vel por resetar o valor do campo para o ultimo valor inputado.",
|
|
434
420
|
"tags": []
|
|
435
421
|
}
|
|
436
|
-
},
|
|
437
|
-
"handleIconClick": {
|
|
438
|
-
"complexType": {
|
|
439
|
-
"signature": "() => Promise<void>",
|
|
440
|
-
"parameters": [],
|
|
441
|
-
"references": {
|
|
442
|
-
"Promise": {
|
|
443
|
-
"location": "global"
|
|
444
|
-
}
|
|
445
|
-
},
|
|
446
|
-
"return": "Promise<void>"
|
|
447
|
-
},
|
|
448
|
-
"docs": {
|
|
449
|
-
"text": "M\u00E9todo usado para emitir o evento de clique no \u00EDcone",
|
|
450
|
-
"tags": []
|
|
451
|
-
}
|
|
452
422
|
}
|
|
453
423
|
};
|
|
454
424
|
}
|
|
@@ -94,6 +94,7 @@ export class EzForm {
|
|
|
94
94
|
if (this.dataUnit === undefined) {
|
|
95
95
|
this.dataUnit = new DataUnit("ez-form");
|
|
96
96
|
}
|
|
97
|
+
this.dataUnit.unsubscribe(this.onDataUnitAction);
|
|
97
98
|
this.dataUnit.subscribe(this.onDataUnitAction);
|
|
98
99
|
this._dataBinder = new DataBinder(this.dataUnit);
|
|
99
100
|
this._store = createStore(formReducer);
|
|
@@ -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) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
export const buildTextInput = ({ name, label, readOnly, contextName, canShowError }) => {
|
|
3
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-text-input", { label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError })));
|
|
2
|
+
export const buildTextInput = ({ name, label, readOnly, contextName, canShowError, props }) => {
|
|
3
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-text-input", { label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError, mask: props === null || props === void 0 ? void 0 : props.mask, "clean-value-mask": props === null || props === void 0 ? void 0 : props.cleanValueMask })));
|
|
4
4
|
};
|