@sankhyalabs/ezui 5.22.0-dev.37 → 5.22.0-dev.39
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-aff1dcc7.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 +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item_3.cjs.entry.js +9 -3
- 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 +47 -11
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +2 -2
- 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 +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +4 -325
- package/dist/cjs/ez-grid.cjs.entry.js +255 -63
- 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 +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +8 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- 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 +29 -13
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js +1 -1
- 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 +7 -1
- package/dist/cjs/ez-text-input.cjs.entry.js +8 -2
- 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-combo-box/ez-combo-box.js +75 -14
- 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.js +35 -4
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +52 -14
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +3 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +166 -45
- 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 +83 -1
- package/dist/collection/components/ez-number-input/ez-number-input.js +25 -0
- package/dist/collection/components/ez-search/ez-search.js +55 -14
- package/dist/collection/components/ez-text-area/ez-text-area.js +24 -0
- package/dist/collection/components/ez-text-input/ez-text-input.css +14 -38
- package/dist/collection/components/ez-text-input/ez-text-input.js +24 -0
- 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/form/DataBinder.js +18 -3
- package/dist/custom-elements/index.js +443 -103
- package/dist/esm/DataBinder-bd240826.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 +1 -1
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-card-item_3.entry.js +9 -3
- 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 +48 -12
- package/dist/esm/ez-custom-form-input_2.entry.js +2 -2
- 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 +1 -1
- package/dist/esm/ez-form.entry.js +3 -324
- package/dist/esm/ez-grid.entry.js +254 -62
- 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 +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +8 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- 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 +29 -13
- package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js +1 -1
- 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 +7 -1
- package/dist/esm/ez-text-input.entry.js +8 -2
- 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-5b205c80.entry.js → p-044d46d5.entry.js} +1 -1
- package/dist/ezui/p-076e868b.entry.js +1 -0
- package/dist/ezui/{p-b54e17d2.entry.js → p-0e1cc2d1.entry.js} +1 -1
- 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-8888d9ed.entry.js → p-1b08bf3c.entry.js} +1 -1
- package/dist/ezui/p-2c3ac210.entry.js +1 -0
- package/dist/ezui/{p-abce5219.entry.js → p-2de9f0aa.entry.js} +1 -1
- package/dist/ezui/{p-baf80b13.entry.js → p-30951bd7.entry.js} +1 -1
- package/dist/ezui/{p-a2e5b8c3.entry.js → p-3b546374.entry.js} +1 -1
- package/dist/ezui/{p-37219d42.entry.js → p-3cc9b84a.entry.js} +1 -1
- 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-cdc472cc.entry.js → p-52100a6e.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-6bc25bc8.entry.js +1 -0
- package/dist/ezui/p-6ec40dec.entry.js +1 -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-bfad39eb.entry.js → p-7f5afb1f.entry.js} +1 -1
- package/dist/ezui/p-802dc63e.entry.js +1 -0
- package/dist/ezui/{p-1e7a8633.entry.js → p-81461d2f.entry.js} +1 -1
- package/dist/ezui/p-81f06699.js +1 -0
- 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-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-940760bf.entry.js +1 -0
- 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-be34c77f.entry.js +1 -0
- 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-dc628ed3.js +1 -0
- 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-9d9ecb7c.entry.js → p-e3ec7422.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-650e4b6d.entry.js → p-f1c2c19e.entry.js} +1 -1
- package/dist/ezui/{p-6e429cff.entry.js → p-fc194825.entry.js} +1 -1
- package/dist/ezui/{p-c3c3d640.entry.js → p-fc8b1807.entry.js} +2 -2
- package/dist/ezui/p-fe10f986.entry.js +1 -0
- 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 +6 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +10 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +18 -6
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +2 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +1 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +10 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +4 -0
- package/dist/types/components/ez-search/ez-search.d.ts +6 -1
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -0
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +4 -0
- package/dist/types/components.d.ts +91 -6
- package/dist/types/utils/FocusResolver.d.ts +5 -0
- package/dist/types/utils/form/DataBinder.d.ts +3 -0
- package/package.json +1 -1
- package/dist/cjs/RecordValidationProcessor-10846595.js +0 -108
- package/dist/esm/RecordValidationProcessor-9c6cc267.js +0 -105
- package/dist/ezui/p-0f3b2e67.entry.js +0 -1
- package/dist/ezui/p-10820c20.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-62732269.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-c25f0e92.entry.js +0 -1
- package/dist/ezui/p-d2c06f38.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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLElement as HTMLElement$1, createEvent, h, Host, forceUpdate, Fragment, proxyCustomElement } from '@stencil/core/internal/client';
|
|
2
2
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
|
-
import { UserInterface, DateUtils as DateUtils$1, Action, StringUtils as StringUtils$1, ApplicationContext, WaitingChangeException, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, HTMLBuilder, TimeFormatter, DataUnit, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, FieldComparator, ArrayUtils as ArrayUtils$1, OverflowWatcher, OVERFLOWED_CLASS_NAME, KeyboardManager } from '@sankhyalabs/core';
|
|
3
|
+
import { UserInterface, DateUtils as DateUtils$1, Action, StringUtils as StringUtils$1, ApplicationContext, WaitingChangeException, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, HTMLBuilder, TimeFormatter, DataUnit, LockManager, LockManagerOperation, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, FieldComparator, ArrayUtils as ArrayUtils$1, OverflowWatcher, OVERFLOWED_CLASS_NAME, KeyboardManager } from '@sankhyalabs/core';
|
|
4
4
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
5
5
|
|
|
6
6
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
@@ -609,6 +609,7 @@ class DataBinder {
|
|
|
609
609
|
(_a = this._fields) === null || _a === void 0 ? void 0 : _a.forEach(field => {
|
|
610
610
|
this.updateValue(field.fieldName, field.field);
|
|
611
611
|
});
|
|
612
|
+
this.clearFieldError(Object.keys(action.payload)[0]);
|
|
612
613
|
break;
|
|
613
614
|
case Action.FIELD_INVALIDATED:
|
|
614
615
|
(_b = this._fields) === null || _b === void 0 ? void 0 : _b.forEach(field => {
|
|
@@ -654,11 +655,14 @@ class DataBinder {
|
|
|
654
655
|
});
|
|
655
656
|
this._formMetadata = formMetadata;
|
|
656
657
|
this._recordValidatorProcessor = new RecordValidationProcessor(this._dataUnit, {
|
|
657
|
-
getRequiredFields: () => this.
|
|
658
|
+
getRequiredFields: () => this.getFormRequiredFields(),
|
|
658
659
|
markAsInvalid: field => this.markInvalid(field),
|
|
659
660
|
getMessageForField: field => this.getErrorMessage(field),
|
|
660
661
|
}, recordsValidator);
|
|
661
662
|
}
|
|
663
|
+
getFormRequiredFields() {
|
|
664
|
+
return this._formMetadata.getRequiredFields();
|
|
665
|
+
}
|
|
662
666
|
disconnectDataUnit() {
|
|
663
667
|
const dataBindersByDataUnit = ApplicationContext.getContextValue("__DATABINDER_BY_DATAUNIT__") || new Map();
|
|
664
668
|
const dataBinders = dataBindersByDataUnit.get(this._dataUnit.dataUnitId);
|
|
@@ -698,6 +702,14 @@ class DataBinder {
|
|
|
698
702
|
fieldElement["errorMessage"] = "";
|
|
699
703
|
});
|
|
700
704
|
}
|
|
705
|
+
clearFieldError(fieldName) {
|
|
706
|
+
var _a;
|
|
707
|
+
const field = (_a = this._fields.get(fieldName)) === null || _a === void 0 ? void 0 : _a.field;
|
|
708
|
+
if (field["errorMessage"]) {
|
|
709
|
+
field["errorMessage"] = "";
|
|
710
|
+
this._dataUnit.clearInvalid(this.getCurrentRecordId(), fieldName);
|
|
711
|
+
}
|
|
712
|
+
}
|
|
701
713
|
updateValue(fieldName, field) {
|
|
702
714
|
const bind = this._fields.get(fieldName);
|
|
703
715
|
try {
|
|
@@ -718,8 +730,7 @@ class DataBinder {
|
|
|
718
730
|
}
|
|
719
731
|
static async validateByDataunit(dataUnit) {
|
|
720
732
|
try {
|
|
721
|
-
const
|
|
722
|
-
const dataBinders = dataBindersByDataUnit.get(dataUnit.dataUnitId) || [];
|
|
733
|
+
const dataBinders = this.getDataBindersByDataUnit(dataUnit);
|
|
723
734
|
await Promise.all(dataBinders.map((dataBinder) => dataBinder.validate()));
|
|
724
735
|
return true;
|
|
725
736
|
}
|
|
@@ -727,6 +738,10 @@ class DataBinder {
|
|
|
727
738
|
return false;
|
|
728
739
|
}
|
|
729
740
|
}
|
|
741
|
+
static getDataBindersByDataUnit(dataUnit) {
|
|
742
|
+
const dataBindersByDataUnit = ApplicationContext.getContextValue("__DATABINDER_BY_DATAUNIT__");
|
|
743
|
+
return dataBindersByDataUnit.get(dataUnit.dataUnitId) || [];
|
|
744
|
+
}
|
|
730
745
|
updateErrorMessage(fieldName, field, message) {
|
|
731
746
|
if (message == undefined) {
|
|
732
747
|
message = this._dataUnit.getInvalidMessage(this.getCurrentRecordId(), fieldName);
|
|
@@ -2903,12 +2918,13 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2903
2918
|
this.suppressSearch = false;
|
|
2904
2919
|
this.optionLoader = undefined;
|
|
2905
2920
|
this.suppressEmptyOption = false;
|
|
2906
|
-
this.stopPropagateEnterKeyEvent =
|
|
2921
|
+
this.stopPropagateEnterKeyEvent = true;
|
|
2907
2922
|
this.canShowError = true;
|
|
2908
2923
|
this.mode = "regular";
|
|
2909
2924
|
this.hideErrorOnFocusOut = true;
|
|
2910
2925
|
this.listOptionsPosition = undefined;
|
|
2911
2926
|
this.isTextSearch = false;
|
|
2927
|
+
this.autoFocus = false;
|
|
2912
2928
|
}
|
|
2913
2929
|
observeErrorMessage() {
|
|
2914
2930
|
var _a;
|
|
@@ -2971,9 +2987,9 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
2971
2987
|
/**
|
|
2972
2988
|
* Aplica o foco no campo.
|
|
2973
2989
|
*/
|
|
2974
|
-
async setFocus() {
|
|
2990
|
+
async setFocus(options) {
|
|
2975
2991
|
if (this._textInput) {
|
|
2976
|
-
this._textInput.setFocus();
|
|
2992
|
+
this._textInput.setFocus(options);
|
|
2977
2993
|
}
|
|
2978
2994
|
}
|
|
2979
2995
|
/**
|
|
@@ -3133,11 +3149,15 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3133
3149
|
: undefined, h("span", { class: "item__label " + (this.showOptionValue ? "item__label--bold" : ""), title: opt.label }, opt.label));
|
|
3134
3150
|
}
|
|
3135
3151
|
showOptions() {
|
|
3152
|
+
var _a, _b;
|
|
3136
3153
|
if (!this.enabled)
|
|
3137
3154
|
return;
|
|
3138
3155
|
if (this.isOptionsVisible()) {
|
|
3139
3156
|
return;
|
|
3140
3157
|
}
|
|
3158
|
+
const valueString = (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : this.value;
|
|
3159
|
+
const indexValue = this._visibleOptions.findIndex(option => option.value === valueString);
|
|
3160
|
+
this._preSelection = indexValue === -1 ? 0 : indexValue;
|
|
3141
3161
|
if (!!this._resizeObserver)
|
|
3142
3162
|
this._resizeObserver.observe(this._textInput);
|
|
3143
3163
|
this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, isFixed: true, backClickListener: () => this.hideOptions() });
|
|
@@ -3179,11 +3199,26 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3179
3199
|
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
3180
3200
|
});
|
|
3181
3201
|
}
|
|
3182
|
-
selectCurrentOption() {
|
|
3202
|
+
selectCurrentOption(focusOnInput = true) {
|
|
3183
3203
|
if (this._preSelection !== undefined) {
|
|
3184
|
-
this.selectOption(this._visibleOptions[this._preSelection]);
|
|
3204
|
+
this.selectOption(this._visibleOptions[this._preSelection], focusOnInput);
|
|
3185
3205
|
this._preSelection = undefined;
|
|
3186
3206
|
}
|
|
3207
|
+
else {
|
|
3208
|
+
this.controlListWithOnlyOne(focusOnInput);
|
|
3209
|
+
}
|
|
3210
|
+
}
|
|
3211
|
+
controlListWithOnlyOne(focusOnInput = true) {
|
|
3212
|
+
var _a;
|
|
3213
|
+
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
3214
|
+
if ((source === null || source === void 0 ? void 0 : source.length) > 0) {
|
|
3215
|
+
let title = StringUtils$1.decodeHtmlEntities(source[0].label);
|
|
3216
|
+
const option = {
|
|
3217
|
+
value: source[0].value,
|
|
3218
|
+
label: title,
|
|
3219
|
+
};
|
|
3220
|
+
this.selectOption(option, focusOnInput);
|
|
3221
|
+
}
|
|
3187
3222
|
}
|
|
3188
3223
|
updateSource(source) {
|
|
3189
3224
|
this._startLoading = false;
|
|
@@ -3209,7 +3244,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3209
3244
|
}
|
|
3210
3245
|
}
|
|
3211
3246
|
}
|
|
3212
|
-
selectOption(newOption) {
|
|
3247
|
+
selectOption(newOption, focusOnInput = true) {
|
|
3213
3248
|
var _a, _b;
|
|
3214
3249
|
const currentValue = this.getSelectedOption(this.value);
|
|
3215
3250
|
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()))
|
|
@@ -3220,6 +3255,11 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3220
3255
|
else {
|
|
3221
3256
|
this.resetOptions();
|
|
3222
3257
|
}
|
|
3258
|
+
if (focusOnInput) {
|
|
3259
|
+
setTimeout(() => {
|
|
3260
|
+
this.setFocus();
|
|
3261
|
+
}, 0);
|
|
3262
|
+
}
|
|
3223
3263
|
}
|
|
3224
3264
|
loadOptions(mode, argument = "") {
|
|
3225
3265
|
this._criteria = argument;
|
|
@@ -3303,6 +3343,11 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3303
3343
|
}
|
|
3304
3344
|
});
|
|
3305
3345
|
});
|
|
3346
|
+
if (this.autoFocus) {
|
|
3347
|
+
requestAnimationFrame(() => {
|
|
3348
|
+
this.setFocus({ selectText: true });
|
|
3349
|
+
});
|
|
3350
|
+
}
|
|
3306
3351
|
}
|
|
3307
3352
|
//---------------------------------------------
|
|
3308
3353
|
// Event handlers
|
|
@@ -3357,18 +3402,24 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3357
3402
|
}
|
|
3358
3403
|
switch (event.key) {
|
|
3359
3404
|
case "ArrowDown":
|
|
3405
|
+
event.stopPropagation();
|
|
3406
|
+
if (this.canShowListOptions())
|
|
3407
|
+
event.preventDefault();
|
|
3360
3408
|
this.showOptions();
|
|
3361
3409
|
this.nextOption();
|
|
3362
|
-
event.stopPropagation();
|
|
3363
3410
|
break;
|
|
3364
3411
|
case "ArrowUp":
|
|
3412
|
+
event.stopPropagation();
|
|
3413
|
+
if (this.canShowListOptions())
|
|
3414
|
+
event.preventDefault();
|
|
3365
3415
|
this.showOptions();
|
|
3366
3416
|
this.previousOption();
|
|
3367
|
-
event.stopPropagation();
|
|
3368
3417
|
break;
|
|
3369
3418
|
case "Enter":
|
|
3370
3419
|
this.handleEventPropagation(event);
|
|
3371
|
-
this.
|
|
3420
|
+
if (this.isOptionsVisible()) {
|
|
3421
|
+
this.selectCurrentOption();
|
|
3422
|
+
}
|
|
3372
3423
|
break;
|
|
3373
3424
|
case "Escape":
|
|
3374
3425
|
if (this.isOptionsVisible()) {
|
|
@@ -3380,7 +3431,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
|
|
|
3380
3431
|
case "Tab":
|
|
3381
3432
|
this._tabPressed = true;
|
|
3382
3433
|
if (this.isOptionsVisible()) {
|
|
3383
|
-
this.selectCurrentOption();
|
|
3434
|
+
this.selectCurrentOption(false);
|
|
3384
3435
|
}
|
|
3385
3436
|
this.resetOptions();
|
|
3386
3437
|
break;
|
|
@@ -3574,6 +3625,7 @@ const EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
3574
3625
|
this.errorMessage = undefined;
|
|
3575
3626
|
this.mode = "regular";
|
|
3576
3627
|
this.canShowError = true;
|
|
3628
|
+
this.autoFocus = false;
|
|
3577
3629
|
}
|
|
3578
3630
|
observeLabel() {
|
|
3579
3631
|
if (this._textInput) {
|
|
@@ -3610,8 +3662,8 @@ const EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
3610
3662
|
/**
|
|
3611
3663
|
* Aplica o foco no campo.
|
|
3612
3664
|
*/
|
|
3613
|
-
async setFocus() {
|
|
3614
|
-
this._textInput.setFocus();
|
|
3665
|
+
async setFocus(options) {
|
|
3666
|
+
this._textInput.setFocus(options);
|
|
3615
3667
|
}
|
|
3616
3668
|
/**
|
|
3617
3669
|
* Remove o foco do campo.
|
|
@@ -3729,6 +3781,11 @@ const EzDateInput$1 = class extends HTMLElement$1 {
|
|
|
3729
3781
|
componentDidLoad() {
|
|
3730
3782
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
3731
3783
|
this.setInputValue();
|
|
3784
|
+
if (this.autoFocus) {
|
|
3785
|
+
requestAnimationFrame(() => {
|
|
3786
|
+
this.setFocus({ selectText: true });
|
|
3787
|
+
});
|
|
3788
|
+
}
|
|
3732
3789
|
}
|
|
3733
3790
|
render() {
|
|
3734
3791
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
@@ -3763,6 +3820,7 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
3763
3820
|
this.showSeconds = false;
|
|
3764
3821
|
this.mode = "regular";
|
|
3765
3822
|
this.canShowError = true;
|
|
3823
|
+
this.autoFocus = false;
|
|
3766
3824
|
}
|
|
3767
3825
|
observeLabel() {
|
|
3768
3826
|
if (this._textInput) {
|
|
@@ -3799,8 +3857,8 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
3799
3857
|
/**
|
|
3800
3858
|
* Aplica o foco no campo.
|
|
3801
3859
|
*/
|
|
3802
|
-
async setFocus() {
|
|
3803
|
-
this._textInput.setFocus();
|
|
3860
|
+
async setFocus(options) {
|
|
3861
|
+
this._textInput.setFocus(options);
|
|
3804
3862
|
}
|
|
3805
3863
|
/**
|
|
3806
3864
|
* Remove o foco do campo.
|
|
@@ -3967,6 +4025,11 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
3967
4025
|
componentDidLoad() {
|
|
3968
4026
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
3969
4027
|
this.setInputValue();
|
|
4028
|
+
if (this.autoFocus) {
|
|
4029
|
+
requestAnimationFrame(() => {
|
|
4030
|
+
this.setFocus({ selectText: true });
|
|
4031
|
+
});
|
|
4032
|
+
}
|
|
3970
4033
|
}
|
|
3971
4034
|
render() {
|
|
3972
4035
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
@@ -3981,6 +4044,38 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
|
|
|
3981
4044
|
static get style() { return ezDateTimeInputCss; }
|
|
3982
4045
|
};
|
|
3983
4046
|
|
|
4047
|
+
class FocusResolver {
|
|
4048
|
+
static resolveFocus(element, selectText = true) {
|
|
4049
|
+
var _a;
|
|
4050
|
+
if (!element)
|
|
4051
|
+
return;
|
|
4052
|
+
(_a = element.focus) === null || _a === void 0 ? void 0 : _a.call(element);
|
|
4053
|
+
if (element.setFocus) {
|
|
4054
|
+
element.setFocus({ selectText });
|
|
4055
|
+
return;
|
|
4056
|
+
}
|
|
4057
|
+
this.resolveFocusOnChild(element, selectText);
|
|
4058
|
+
}
|
|
4059
|
+
static resolveFocusOnChild(element, selectText = true) {
|
|
4060
|
+
var _a, _b;
|
|
4061
|
+
if (this.isGridCell(element) && element.firstElementChild) {
|
|
4062
|
+
this.resolveFocusOnChild(element.firstElementChild);
|
|
4063
|
+
return;
|
|
4064
|
+
}
|
|
4065
|
+
if (!element || !element.classList.contains('hydrated'))
|
|
4066
|
+
return;
|
|
4067
|
+
const firstChild = element.firstElementChild;
|
|
4068
|
+
if (!(firstChild === null || firstChild === void 0 ? void 0 : firstChild.focus) && !(firstChild === null || firstChild === void 0 ? void 0 : firstChild.setFocus))
|
|
4069
|
+
return;
|
|
4070
|
+
(_a = firstChild === null || firstChild === void 0 ? void 0 : firstChild.focus) === null || _a === void 0 ? void 0 : _a.call(firstChild);
|
|
4071
|
+
(_b = firstChild === null || firstChild === void 0 ? void 0 : firstChild.setFocus) === null || _b === void 0 ? void 0 : _b.call(firstChild, { selectText });
|
|
4072
|
+
}
|
|
4073
|
+
static isGridCell(element) {
|
|
4074
|
+
var _a;
|
|
4075
|
+
return ((_a = element === null || element === void 0 ? void 0 : element.getAttribute) === null || _a === void 0 ? void 0 : _a.call(element, "role")) === 'gridcell';
|
|
4076
|
+
}
|
|
4077
|
+
}
|
|
4078
|
+
|
|
3984
4079
|
const ezDialogCss = ":host{--dialog__container-padding:var(--space--large, 24px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__btn__close__image:url('data:image/svg+xml;utf8,<svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" xmlns=\"http://www.w3.org/2000/svg%22%3E<path d=\"M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z\"/></svg>');--dialog__title--font-pattern:var(--font-pattern, \"Roboto\");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, \"Roboto\");--dialog__body--text-shadow:var(--text-shadow, \"0 0 0 #353535, 0 0 1px transparent\");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--large, 24px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__icon--color:var(--text--inverted, #fff);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog__success--background-color:var(--color--alert-success-500, #00523c);--dialog-z-index:var(--elevation--100, 100);--dialog--warning__image:url('data: image/svg+xml;utf8,<svg width=\"15\" height=\"15\" viewBox=\"0 0 15 15\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895\"/></svg>');--dialog--critical__image:url('data: image/svg+xml;utf8,<svg width=\"13\" height=\"13\" viewBox=\"0 0 13 13\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z\"/></svg>')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;background-color:rgba(var(--rgb-background--overlay), var(--opacity--soft));backdrop-filter:blur(var(--background-blur--medium))}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__container--default{border-radius:6px 6px 6px 6px}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.dialog__success--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__success--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:24px;overflow-y:auto}.changeable__icon{background:var(--dialog__warning--background-color);--ez-icon--color:var(--dialog__icon--color);display:grid;place-items:center;width:26px;height:26px;border-radius:50%}.changeable__icon.critical{background:var(--dialog__critical--background-color)}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:0;color:var(--title--primary)}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title__label{padding-left:var(--dialog__title--padding-left)}.title__label--no-icon{padding-left:0}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.title-icon--success{background-color:var(--dialog__success--background-color)}.title-icon--warn{background-color:var(--dialog__warning--background-color)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:'';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__cancel{padding-right:var(--dialog__btn__no--padding-right)}.button__confirm{--ez-button--background-color:var(--color--primary);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color--primary-600);--ez-button--hover-color:var(--color--inverted)}.button__confirm--danger{--ez-button--background-color:var(--color--alert-error-800, #BD0025);--ez-button--color:var(--color--inverted);--ez-button--hover--background-color:var(--color-alert--error-900, #a10020);--ez-button--hover-color:var(--color--inverted)}.button__confirm--container{display:flex;justify-content:flex-end}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
3985
4080
|
|
|
3986
4081
|
class Message {
|
|
@@ -4151,6 +4246,7 @@ const EzDialog$1 = class extends HTMLElement$1 {
|
|
|
4151
4246
|
const dialog = this._element.shadowRoot.querySelector('.overlay .dialog');
|
|
4152
4247
|
if (dialog instanceof HTMLDivElement) {
|
|
4153
4248
|
dialog.style.outline = 'none';
|
|
4249
|
+
this._lastActiveElement = document.activeElement;
|
|
4154
4250
|
dialog.focus();
|
|
4155
4251
|
}
|
|
4156
4252
|
}
|
|
@@ -4163,7 +4259,13 @@ const EzDialog$1 = class extends HTMLElement$1 {
|
|
|
4163
4259
|
focusOnPrimaryButton() {
|
|
4164
4260
|
const btnConfirm = this._element.shadowRoot.querySelector(`#${this.PRIMARY_BUTTON_ID}`);
|
|
4165
4261
|
const buttonElement = btnConfirm === null || btnConfirm === void 0 ? void 0 : btnConfirm.shadowRoot.querySelector('button');
|
|
4166
|
-
|
|
4262
|
+
requestAnimationFrame(() => {
|
|
4263
|
+
buttonElement === null || buttonElement === void 0 ? void 0 : buttonElement.focus();
|
|
4264
|
+
});
|
|
4265
|
+
}
|
|
4266
|
+
disconnectedCallback() {
|
|
4267
|
+
FocusResolver.resolveFocus(this._lastActiveElement);
|
|
4268
|
+
this._lastActiveElement = undefined;
|
|
4167
4269
|
}
|
|
4168
4270
|
render() {
|
|
4169
4271
|
if (this.opened && this._currentMessage) {
|
|
@@ -4797,6 +4899,7 @@ const EzFilterInput$1 = class extends HTMLElement$1 {
|
|
|
4797
4899
|
this.mode = "regular";
|
|
4798
4900
|
this.asyncSearch = false;
|
|
4799
4901
|
this.canShowError = true;
|
|
4902
|
+
this.autoFocus = false;
|
|
4800
4903
|
}
|
|
4801
4904
|
observeLabel() {
|
|
4802
4905
|
if (this._textInput) {
|
|
@@ -4817,8 +4920,8 @@ const EzFilterInput$1 = class extends HTMLElement$1 {
|
|
|
4817
4920
|
/**
|
|
4818
4921
|
* Aplica o foco no campo.
|
|
4819
4922
|
*/
|
|
4820
|
-
async setFocus() {
|
|
4821
|
-
this._textInput.setFocus();
|
|
4923
|
+
async setFocus(options) {
|
|
4924
|
+
this._textInput.setFocus(options);
|
|
4822
4925
|
}
|
|
4823
4926
|
/**
|
|
4824
4927
|
* Remove o foco do campo.
|
|
@@ -4871,6 +4974,11 @@ const EzFilterInput$1 = class extends HTMLElement$1 {
|
|
|
4871
4974
|
}
|
|
4872
4975
|
componentDidLoad() {
|
|
4873
4976
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
4977
|
+
if (this.autoFocus) {
|
|
4978
|
+
requestAnimationFrame(() => {
|
|
4979
|
+
this.setFocus({ selectText: true });
|
|
4980
|
+
});
|
|
4981
|
+
}
|
|
4874
4982
|
}
|
|
4875
4983
|
render() {
|
|
4876
4984
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
@@ -124509,12 +124617,14 @@ class DataSource {
|
|
|
124509
124617
|
this._controller.clearInvalidCells();
|
|
124510
124618
|
this.handleRefreshOrReload(action);
|
|
124511
124619
|
this._controller.processContinuousInsert();
|
|
124620
|
+
this._controller.showSelectionColumn();
|
|
124512
124621
|
}
|
|
124513
124622
|
handleEditionCanceled(action) {
|
|
124514
124623
|
if (this._options.enableGridInsert) {
|
|
124515
124624
|
this._controller.processEditionCanceled();
|
|
124516
124625
|
}
|
|
124517
124626
|
this.handleRefreshOrReload(action);
|
|
124627
|
+
this._controller.showSelectionColumn();
|
|
124518
124628
|
}
|
|
124519
124629
|
handleSavingCanceled(action) {
|
|
124520
124630
|
var _a, _b, _c, _d;
|
|
@@ -124569,6 +124679,7 @@ class DataSource {
|
|
|
124569
124679
|
}
|
|
124570
124680
|
handleRecordsAdded() {
|
|
124571
124681
|
if (this._options.enableGridInsert) {
|
|
124682
|
+
this._controller.hideSelectionColumn();
|
|
124572
124683
|
this._controller.refresh();
|
|
124573
124684
|
this.focusOnNewRecord();
|
|
124574
124685
|
}
|
|
@@ -124995,12 +125106,14 @@ const buildEditorMetadata = (descriptor, eGridCell, dataUnit, editionManager) =>
|
|
|
124995
125106
|
const MINIMIUM_WIDTH_TEXTAREA = 210;
|
|
124996
125107
|
const PADDING_VALUE_TEXTAREA = 12;
|
|
124997
125108
|
const buildTextInput = ({ name, contextName }) => {
|
|
124998
|
-
|
|
125109
|
+
const textInput = HTMLBuilder.parseElement(`<ez-text-input
|
|
124999
125110
|
class="ez-grid grid_editor"
|
|
125000
125111
|
data-field-name=${name}
|
|
125001
125112
|
data-context-name=${contextName}
|
|
125002
125113
|
mode="slim"
|
|
125003
125114
|
/>`);
|
|
125115
|
+
textInput.autoFocus = true;
|
|
125116
|
+
return textInput;
|
|
125004
125117
|
};
|
|
125005
125118
|
const buildTextAreaInput = ({ eGridCell, editionManager }) => {
|
|
125006
125119
|
const element = HTMLBuilder.parseElement(`<ez-text-area
|
|
@@ -125010,6 +125123,7 @@ const buildTextAreaInput = ({ eGridCell, editionManager }) => {
|
|
|
125010
125123
|
element.addEventListener('keydown', event => handlePressEnterEvent(event, element, editionManager));
|
|
125011
125124
|
setElementInitialWidth(eGridCell, element);
|
|
125012
125125
|
element.isPopUp = true;
|
|
125126
|
+
element.autoFocus = true;
|
|
125013
125127
|
return element;
|
|
125014
125128
|
};
|
|
125015
125129
|
function setElementInitialWidth(eGridCell, element) {
|
|
@@ -125041,6 +125155,7 @@ const buildDate = () => {
|
|
|
125041
125155
|
data-is-fixed="true"
|
|
125042
125156
|
/>`);
|
|
125043
125157
|
dateInput.valueGetter = () => dateInput.getValueAsync();
|
|
125158
|
+
dateInput.autoFocus = true;
|
|
125044
125159
|
return dateInput;
|
|
125045
125160
|
};
|
|
125046
125161
|
const buildTime = ({ readOnly }) => {
|
|
@@ -125091,6 +125206,7 @@ function buildNumeric(readOnly, precision, prettyPrecision) {
|
|
|
125091
125206
|
mode="slim"
|
|
125092
125207
|
/>`);
|
|
125093
125208
|
input.valueGetter = () => input.getValueAsync();
|
|
125209
|
+
input.autoFocus = true;
|
|
125094
125210
|
return input;
|
|
125095
125211
|
}
|
|
125096
125212
|
|
|
@@ -125124,6 +125240,7 @@ const buildComboBox = ({ required, props, eGridCell }) => {
|
|
|
125124
125240
|
combo.options = options;
|
|
125125
125241
|
combo.stopPropagateEnterKeyEvent = true;
|
|
125126
125242
|
combo.listOptionsPosition = { verticalPosition: 29, bottomLimit: getViewPortHeight(eGridCell), hardPosition: true };
|
|
125243
|
+
combo.autoFocus = true;
|
|
125127
125244
|
return combo;
|
|
125128
125245
|
};
|
|
125129
125246
|
const buildSwitch = (fieldMetadata) => {
|
|
@@ -125156,6 +125273,7 @@ const buildSearch = ({ name, required, readOnly, eGridCell, dataUnit }) => {
|
|
|
125156
125273
|
ezSearch.suppressPreLoad = true;
|
|
125157
125274
|
ezSearch.listOptionsPosition = { verticalPosition: 29, bottomLimit: getViewPortHeight(eGridCell), hardPosition: true };
|
|
125158
125275
|
ezSearch.stopPropagateEnterKeyEvent = true;
|
|
125276
|
+
ezSearch.autoFocus = true;
|
|
125159
125277
|
ezSearch.valueGetter = () => ezSearch.getValueAsync();
|
|
125160
125278
|
return ezSearch;
|
|
125161
125279
|
};
|
|
@@ -125281,6 +125399,12 @@ class EzGridCustomCellEditor extends EzCellEditor {
|
|
|
125281
125399
|
return this._customGui.value;
|
|
125282
125400
|
return this._value;
|
|
125283
125401
|
}
|
|
125402
|
+
afterGuiAttached() {
|
|
125403
|
+
this.focusIn();
|
|
125404
|
+
}
|
|
125405
|
+
focusIn() {
|
|
125406
|
+
FocusResolver.resolveFocus(this._customGui);
|
|
125407
|
+
}
|
|
125284
125408
|
}
|
|
125285
125409
|
|
|
125286
125410
|
class EzCellRender {
|
|
@@ -125362,11 +125486,11 @@ class EzGridCustomCellRender extends EzCellRender {
|
|
|
125362
125486
|
}
|
|
125363
125487
|
|
|
125364
125488
|
class GridEditionManager {
|
|
125365
|
-
constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders, enableContinuousInsert, enableGridInsert) {
|
|
125489
|
+
constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders, enableContinuousInsert, enableGridInsert, lockerId) {
|
|
125366
125490
|
this._dataUnit = dataUnit;
|
|
125367
125491
|
this._recordValidationProcessor = new RecordValidationProcessor(this._dataUnit, {
|
|
125368
125492
|
getRequiredFields: () => this.getRequiredFields(),
|
|
125369
|
-
markAsInvalid: (invalidField, recordId) => { this.
|
|
125493
|
+
markAsInvalid: (invalidField, recordId) => { this.pushInvalidCell(invalidField, recordId); },
|
|
125370
125494
|
getMessageForField: () => null,
|
|
125371
125495
|
}, recordsValidator);
|
|
125372
125496
|
this._useEnterLikeTab = useEnterLikeTab;
|
|
@@ -125375,16 +125499,34 @@ class GridEditionManager {
|
|
|
125375
125499
|
this._enableGridInsert = enableGridInsert;
|
|
125376
125500
|
this._customEditors = customEditors;
|
|
125377
125501
|
this._customRenders = customRenders;
|
|
125502
|
+
this._lockerId = lockerId;
|
|
125378
125503
|
}
|
|
125379
125504
|
configureGrid(options) {
|
|
125380
125505
|
this._gridOptions = options;
|
|
125381
125506
|
options.readOnlyEdit = true;
|
|
125382
125507
|
options.onCellEditRequest = evt => this.onCellEditRequest(evt);
|
|
125508
|
+
options.onCellEditingStarted = async (evt) => {
|
|
125509
|
+
var _a;
|
|
125510
|
+
if (this._dataUnit.hasNewRecord()) {
|
|
125511
|
+
this.handleCellEditingStartedRowAdd(evt);
|
|
125512
|
+
}
|
|
125513
|
+
else {
|
|
125514
|
+
this._lastCellOpened = this._lastCellEdited = { rowIndex: evt.rowIndex, column: evt.column, rowPinned: undefined };
|
|
125515
|
+
}
|
|
125516
|
+
(_a = this._currentEditLock) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
125517
|
+
this._currentEditLock = LockManager.lock(this._lockerId, LockManagerOperation.TASKBAR_CLICK);
|
|
125518
|
+
};
|
|
125519
|
+
options.onCellEditingStopped = () => {
|
|
125520
|
+
var _a;
|
|
125521
|
+
(_a = this._currentEditLock) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
125522
|
+
};
|
|
125383
125523
|
options.onCellKeyDown = evt => {
|
|
125384
125524
|
if (evt.event && evt["column"]) {
|
|
125385
125525
|
this.onCellKeyDown(evt);
|
|
125386
125526
|
}
|
|
125387
125527
|
};
|
|
125528
|
+
options.isRowSelectable = (node) => this.isSelectableRow(node);
|
|
125529
|
+
options.onCellFocused = () => this.lockFocusWhenAddRow();
|
|
125388
125530
|
return options;
|
|
125389
125531
|
}
|
|
125390
125532
|
updateCurrentEditorGuiValue(updatedRowValue) {
|
|
@@ -125397,37 +125539,82 @@ class GridEditionManager {
|
|
|
125397
125539
|
const value = updatedRowValue[fieldName];
|
|
125398
125540
|
currentEditor.setGuiValue(value);
|
|
125399
125541
|
}
|
|
125542
|
+
lockFocusWhenAddRow() {
|
|
125543
|
+
var _a, _b, _c, _d;
|
|
125544
|
+
const api = this._gridOptions.api;
|
|
125545
|
+
const newFocusCell = api.getFocusedCell();
|
|
125546
|
+
const rowIndex = newFocusCell === null || newFocusCell === void 0 ? void 0 : newFocusCell.rowIndex;
|
|
125547
|
+
const recordId = (_b = (_a = this._dataUnit.getAddedRecords()) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.__record__id__;
|
|
125548
|
+
const rowNode = api.getRowNode(recordId);
|
|
125549
|
+
if (!this._dataUnit.hasNewRecord() || rowIndex == (rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex)) {
|
|
125550
|
+
return;
|
|
125551
|
+
}
|
|
125552
|
+
const lastCell = (_d = (_c = this._lastCellOpened) !== null && _c !== void 0 ? _c : this._lastCellEdited) !== null && _d !== void 0 ? _d : this._lastCellClicked;
|
|
125553
|
+
if ((lastCell === null || lastCell === void 0 ? void 0 : lastCell.rowIndex) < (rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex)) {
|
|
125554
|
+
return;
|
|
125555
|
+
}
|
|
125556
|
+
api.clearFocusedCell();
|
|
125557
|
+
if (!lastCell || (rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex) == undefined) {
|
|
125558
|
+
return;
|
|
125559
|
+
}
|
|
125560
|
+
lastCell.rowIndex = rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex;
|
|
125561
|
+
this.focusOnCell(lastCell);
|
|
125562
|
+
}
|
|
125563
|
+
handleCellEditingStartedRowAdd(evt) {
|
|
125564
|
+
var _a, _b, _c, _d, _e;
|
|
125565
|
+
const nodeId = (_a = evt.node) === null || _a === void 0 ? void 0 : _a.id;
|
|
125566
|
+
const addedRecordId = (_c = (_b = this._dataUnit.getAddedRecords()) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.__record__id__;
|
|
125567
|
+
if (nodeId == addedRecordId) {
|
|
125568
|
+
this._lastCellOpened = this._lastCellEdited = { rowIndex: evt.rowIndex, column: evt === null || evt === void 0 ? void 0 : evt.column, rowPinned: undefined };
|
|
125569
|
+
return;
|
|
125570
|
+
}
|
|
125571
|
+
evt.api.stopEditing();
|
|
125572
|
+
const rowIndex = (_d = evt.api.getRowNode(addedRecordId)) === null || _d === void 0 ? void 0 : _d.rowIndex;
|
|
125573
|
+
this._lastCellOpened = this._lastCellEdited = { rowIndex: rowIndex, column: (_e = this._lastCellEdited) === null || _e === void 0 ? void 0 : _e.column, rowPinned: undefined };
|
|
125574
|
+
}
|
|
125575
|
+
isSelectableRow(node) {
|
|
125576
|
+
if (!this._dataUnit.hasNewRecord()) {
|
|
125577
|
+
return true;
|
|
125578
|
+
}
|
|
125579
|
+
if (!this._dataUnit.isNewRecord(node.id)) {
|
|
125580
|
+
return false;
|
|
125581
|
+
}
|
|
125582
|
+
return true;
|
|
125583
|
+
}
|
|
125400
125584
|
canContinuousInsert() {
|
|
125401
125585
|
var _a;
|
|
125402
125586
|
return this._enableContinuousInsert && (this._dataUnit.records.length - 1) === ((_a = this._lastCellEdited) === null || _a === void 0 ? void 0 : _a.rowIndex);
|
|
125403
125587
|
}
|
|
125404
|
-
proceedAutoSave() {
|
|
125588
|
+
async proceedAutoSave() {
|
|
125405
125589
|
if (!this._dataUnit.isDirty()) {
|
|
125406
125590
|
this.saveSuccess();
|
|
125407
|
-
return;
|
|
125591
|
+
return true;
|
|
125408
125592
|
}
|
|
125409
|
-
|
|
125410
|
-
|
|
125593
|
+
const currentRecord = this._dataUnit.getSelectedRecord();
|
|
125594
|
+
if (currentRecord == undefined) {
|
|
125595
|
+
return true;
|
|
125411
125596
|
}
|
|
125412
|
-
|
|
125413
|
-
|
|
125414
|
-
|
|
125597
|
+
this.clearInvalidCells(false);
|
|
125598
|
+
try {
|
|
125599
|
+
await this._recordValidationProcessor.validate(true);
|
|
125600
|
+
await this.saveDataUnit();
|
|
125601
|
+
this.saveSuccess();
|
|
125602
|
+
return true;
|
|
125415
125603
|
}
|
|
125416
|
-
|
|
125417
|
-
|
|
125418
|
-
|
|
125419
|
-
|
|
125420
|
-
|
|
125421
|
-
|
|
125422
|
-
|
|
125423
|
-
|
|
125424
|
-
.catch(reason => this.saveFail(reason));
|
|
125604
|
+
catch (reason) {
|
|
125605
|
+
this.saveFail(reason);
|
|
125606
|
+
return false;
|
|
125607
|
+
}
|
|
125608
|
+
}
|
|
125609
|
+
async saveDataUnit() {
|
|
125610
|
+
await this._dataUnit.saveData();
|
|
125611
|
+
return true;
|
|
125425
125612
|
}
|
|
125426
125613
|
async recordValidate() {
|
|
125427
125614
|
if (!this._dataUnit.isDirty())
|
|
125428
125615
|
return;
|
|
125429
125616
|
try {
|
|
125430
|
-
this.
|
|
125617
|
+
this.clearInvalidCells(false);
|
|
125431
125618
|
await this._recordValidationProcessor.validate(false);
|
|
125432
125619
|
}
|
|
125433
125620
|
catch (error) { }
|
|
@@ -125455,6 +125642,13 @@ class GridEditionManager {
|
|
|
125455
125642
|
return { ezCellEditor: EzCellEditor };
|
|
125456
125643
|
}
|
|
125457
125644
|
verifyClickToEdition(api, cellClicked) {
|
|
125645
|
+
var _a, _b;
|
|
125646
|
+
const selectedRecordID = (_a = this._dataUnit.getSelectedRecord()) === null || _a === void 0 ? void 0 : _a.__record__id__;
|
|
125647
|
+
if (this._dataUnit.hasNewRecord() && selectedRecordID) {
|
|
125648
|
+
const dataUnitRecordIndex = (_b = api.getRowNode(selectedRecordID)) === null || _b === void 0 ? void 0 : _b.rowIndex;
|
|
125649
|
+
if (dataUnitRecordIndex != cellClicked.rowIndex)
|
|
125650
|
+
return;
|
|
125651
|
+
}
|
|
125458
125652
|
if (this.isSecondClick(cellClicked)) {
|
|
125459
125653
|
api.startEditingCell({ rowIndex: cellClicked.rowIndex, colKey: cellClicked.column.getColId() });
|
|
125460
125654
|
}
|
|
@@ -125464,6 +125658,9 @@ class GridEditionManager {
|
|
|
125464
125658
|
col.cellEditor = 'ezCellEditor';
|
|
125465
125659
|
col.editable = params => this.canEdit(params);
|
|
125466
125660
|
col.suppressKeyboardEvent = (params) => {
|
|
125661
|
+
if (params.event.key === KeyCode.ESCAPE && params.editing) {
|
|
125662
|
+
return this._dataUnit.isDirty();
|
|
125663
|
+
}
|
|
125467
125664
|
return params.event.key === KeyCode.ENTER;
|
|
125468
125665
|
};
|
|
125469
125666
|
col.cellEditorSelector = (params) => {
|
|
@@ -125493,10 +125690,21 @@ class GridEditionManager {
|
|
|
125493
125690
|
return col;
|
|
125494
125691
|
}
|
|
125495
125692
|
getRequiredFields() {
|
|
125496
|
-
|
|
125497
|
-
|
|
125498
|
-
|
|
125499
|
-
|
|
125693
|
+
const formRequiredFields = this.getFormRequiredFields();
|
|
125694
|
+
return this._gridOptions.columnApi.getAllDisplayedColumns()
|
|
125695
|
+
.filter(column => {
|
|
125696
|
+
const fieldDefinition = this._dataUnit.getField(column.getColId());
|
|
125697
|
+
return (fieldDefinition && fieldDefinition.required) || formRequiredFields.includes(column.getColId());
|
|
125698
|
+
})
|
|
125699
|
+
.map(column => column.getColId());
|
|
125700
|
+
}
|
|
125701
|
+
getFormRequiredFields() {
|
|
125702
|
+
const formRequiredFields = [];
|
|
125703
|
+
const dataBinders = DataBinder.getDataBindersByDataUnit(this._dataUnit);
|
|
125704
|
+
dataBinders.forEach(dataBinder => {
|
|
125705
|
+
formRequiredFields.push(...dataBinder.getFormRequiredFields());
|
|
125706
|
+
});
|
|
125707
|
+
return formRequiredFields;
|
|
125500
125708
|
}
|
|
125501
125709
|
saveSuccess() {
|
|
125502
125710
|
var _a;
|
|
@@ -125509,10 +125717,11 @@ class GridEditionManager {
|
|
|
125509
125717
|
this._isGridEdition = false;
|
|
125510
125718
|
}
|
|
125511
125719
|
saveFail(reason) {
|
|
125512
|
-
|
|
125720
|
+
var _a;
|
|
125721
|
+
this.focusOnCell((_a = this._lastCellOpened) !== null && _a !== void 0 ? _a : this._lastCellEdited);
|
|
125513
125722
|
this._isGridEdition = false;
|
|
125514
125723
|
if (reason) {
|
|
125515
|
-
|
|
125724
|
+
throw reason;
|
|
125516
125725
|
}
|
|
125517
125726
|
}
|
|
125518
125727
|
focusOnCell(cell) {
|
|
@@ -125577,6 +125786,9 @@ class GridEditionManager {
|
|
|
125577
125786
|
this.moveEditionVertically(api, 1);
|
|
125578
125787
|
}
|
|
125579
125788
|
moveEditionVertically(api, offset) {
|
|
125789
|
+
if (this._dataUnit.hasNewRecord() && this._isGridEdition) {
|
|
125790
|
+
return;
|
|
125791
|
+
}
|
|
125580
125792
|
const editionCell = api.getEditingCells()[0];
|
|
125581
125793
|
if (!editionCell) {
|
|
125582
125794
|
return;
|
|
@@ -125621,41 +125833,66 @@ class GridEditionManager {
|
|
|
125621
125833
|
return true;
|
|
125622
125834
|
}
|
|
125623
125835
|
onCellEditRequest(event) {
|
|
125624
|
-
|
|
125836
|
+
var _a;
|
|
125625
125837
|
const value = event.newValue;
|
|
125626
|
-
if (event.oldValue
|
|
125627
|
-
|
|
125628
|
-
|
|
125629
|
-
|
|
125630
|
-
|
|
125631
|
-
|
|
125632
|
-
|
|
125633
|
-
|
|
125634
|
-
|
|
125838
|
+
if (event.oldValue == value) {
|
|
125839
|
+
(_a = this._currentEditLock) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
125840
|
+
return;
|
|
125841
|
+
}
|
|
125842
|
+
if (value instanceof Promise) {
|
|
125843
|
+
this.handlePromiseValue(event, value);
|
|
125844
|
+
return;
|
|
125845
|
+
}
|
|
125846
|
+
this.updateCellValue(event, value);
|
|
125847
|
+
}
|
|
125848
|
+
async handlePromiseValue(event, value) {
|
|
125849
|
+
const fieldName = event.colDef.field;
|
|
125850
|
+
const fieldDescriptor = this._dataUnit.getField(event.colDef.colId);
|
|
125851
|
+
const initialValue = (fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.userInterface) === UserInterface.SEARCH ? value : event.oldValue;
|
|
125852
|
+
event.node.setData(Object.assign(Object.assign({}, event.data), { [fieldName]: initialValue }));
|
|
125853
|
+
const resolved = await value;
|
|
125854
|
+
return this.updateCellValue(event, resolved);
|
|
125855
|
+
}
|
|
125856
|
+
updateCellValue(event, newValue) {
|
|
125857
|
+
var _a;
|
|
125858
|
+
const fieldName = event.colDef.field;
|
|
125859
|
+
event.node.setData(Object.assign(Object.assign({}, event.data), { [fieldName]: newValue }));
|
|
125860
|
+
(_a = this._currentEditLock) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
125861
|
+
if (event.oldValue !== newValue) {
|
|
125635
125862
|
this._isGridEdition = true;
|
|
125636
|
-
this._dataUnit.setFieldValue(fieldName,
|
|
125863
|
+
this._dataUnit.setFieldValue(fieldName, newValue, [event.data.__record__id__], { suppressCreateNewRecord: true });
|
|
125637
125864
|
this._lastCellEdited = { rowIndex: event.rowIndex, column: event.column, rowPinned: undefined };
|
|
125638
125865
|
}
|
|
125639
125866
|
}
|
|
125640
125867
|
setCellEditors(customEditors) {
|
|
125868
|
+
var _a, _b;
|
|
125641
125869
|
this._customEditors = customEditors;
|
|
125870
|
+
if (!customEditors.has((_b = (_a = this._lastCellOpened) === null || _a === void 0 ? void 0 : _a.column) === null || _b === void 0 ? void 0 : _b.getColId()))
|
|
125871
|
+
return;
|
|
125872
|
+
this._gridOptions.api.stopEditing();
|
|
125873
|
+
window.requestAnimationFrame(() => this.focusOnCell(this._lastCellOpened));
|
|
125642
125874
|
}
|
|
125643
125875
|
setCellRenders(customRenders) {
|
|
125644
125876
|
this._customRenders = customRenders;
|
|
125645
125877
|
}
|
|
125646
|
-
|
|
125647
|
-
this.
|
|
125878
|
+
pushInvalidCell(invalidField, recordId) {
|
|
125879
|
+
this._invalidCells.push({ field: invalidField, recordId });
|
|
125880
|
+
this._nextInvalidCell = this._invalidCells[0];
|
|
125648
125881
|
}
|
|
125649
|
-
|
|
125650
|
-
return this.
|
|
125882
|
+
getInvalidCells() {
|
|
125883
|
+
return this._invalidCells;
|
|
125651
125884
|
}
|
|
125652
|
-
|
|
125885
|
+
getNextInvalidCell() {
|
|
125886
|
+
return this._nextInvalidCell;
|
|
125887
|
+
}
|
|
125888
|
+
async processContinuousInsert() {
|
|
125653
125889
|
if (!this.canContinuousInsert())
|
|
125654
125890
|
return;
|
|
125655
125891
|
this._dataUnit.addRecord();
|
|
125656
125892
|
}
|
|
125657
125893
|
clearInvalidCells(stopEdition) {
|
|
125658
|
-
this.
|
|
125894
|
+
this._invalidCells = [];
|
|
125895
|
+
this._nextInvalidCell = undefined;
|
|
125659
125896
|
if (stopEdition) {
|
|
125660
125897
|
this._isGridEdition = false;
|
|
125661
125898
|
}
|
|
@@ -125666,10 +125903,17 @@ class GridEditionManager {
|
|
|
125666
125903
|
hasInvalidField(fieldName, recordId) {
|
|
125667
125904
|
if (!this.hasInvalidCell())
|
|
125668
125905
|
return false;
|
|
125669
|
-
|
|
125906
|
+
this._nextInvalidCell = this._invalidCells[0];
|
|
125907
|
+
const containsFieldName = this._nextInvalidCell.field.name === fieldName;
|
|
125908
|
+
const containsRecordId = this._nextInvalidCell.recordId === recordId;
|
|
125909
|
+
return containsFieldName && containsRecordId;
|
|
125670
125910
|
}
|
|
125671
125911
|
hasInvalidCell() {
|
|
125672
|
-
|
|
125912
|
+
var _a, _b, _c;
|
|
125913
|
+
const hasInvalidCell = ((_a = this._invalidCells) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
125914
|
+
const hasField = (_b = this._invalidCells) === null || _b === void 0 ? void 0 : _b.filter(invalidCell => { });
|
|
125915
|
+
const hasRecordId = (_c = this._invalidCells) === null || _c === void 0 ? void 0 : _c.filter(invalidCell => { });
|
|
125916
|
+
if (!hasInvalidCell || !hasField || !hasRecordId)
|
|
125673
125917
|
return false;
|
|
125674
125918
|
return true;
|
|
125675
125919
|
}
|
|
@@ -125796,6 +126040,7 @@ class AgGridController {
|
|
|
125796
126040
|
var _a;
|
|
125797
126041
|
this._options = options;
|
|
125798
126042
|
this._container = container;
|
|
126043
|
+
const lockerId = options.enableLockManger ? LockManager.addLockManagerCtxId(this._container) : null;
|
|
125799
126044
|
if (this._grid === undefined) {
|
|
125800
126045
|
LicenseManager.setLicenseKey(ApplicationContext.getContextValue('__EZUI__GRID_LICENSE__'));
|
|
125801
126046
|
this._columnStateChangeCallback = options.onColumnStateChange;
|
|
@@ -125803,7 +126048,7 @@ class AgGridController {
|
|
|
125803
126048
|
this._doubleClickCallBack = options.onDoubleClick;
|
|
125804
126049
|
this._multipleSelection = options.allowMultipleSelection;
|
|
125805
126050
|
this._dataUnit = options.dataUnit;
|
|
125806
|
-
this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled, options.customEditors || this._customEditors, options.customRenders || this._customRenders, options.enableContinuousInsert, options.enableGridInsert);
|
|
126051
|
+
this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled, options.customEditors || this._customEditors, options.customRenders || this._customRenders, options.enableContinuousInsert, options.enableGridInsert, lockerId);
|
|
125807
126052
|
this._statusResolver = options.statusResolver;
|
|
125808
126053
|
if (this._dataUnit) {
|
|
125809
126054
|
this._dataUnit.sortingProvider = this;
|
|
@@ -126166,7 +126411,7 @@ class AgGridController {
|
|
|
126166
126411
|
r.setData(data);
|
|
126167
126412
|
});
|
|
126168
126413
|
this._gridOptions.api.refreshCells({ force: true });
|
|
126169
|
-
const invalidCell = this._editionManager.
|
|
126414
|
+
const invalidCell = this._editionManager.getNextInvalidCell();
|
|
126170
126415
|
if (invalidCell) {
|
|
126171
126416
|
const rowNode = this._gridOptions.api.getRowNode(invalidCell.recordId);
|
|
126172
126417
|
if (rowNode && invalidCell.field) {
|
|
@@ -126186,6 +126431,7 @@ class AgGridController {
|
|
|
126186
126431
|
if (this._grid === undefined) {
|
|
126187
126432
|
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
126188
126433
|
}
|
|
126434
|
+
this._gridOptions.api.clearRangeSelection();
|
|
126189
126435
|
this._gridOptions.api.refreshServerSide({ purge: true });
|
|
126190
126436
|
this._options.onRefresh();
|
|
126191
126437
|
if (scrollToSelectedRow)
|
|
@@ -126208,12 +126454,15 @@ class AgGridController {
|
|
|
126208
126454
|
}
|
|
126209
126455
|
setFocus() {
|
|
126210
126456
|
var _a, _b;
|
|
126211
|
-
if ((_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.length) {
|
|
126212
|
-
this.setFocusFirstRow();
|
|
126213
|
-
}
|
|
126214
|
-
else {
|
|
126457
|
+
if (!((_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
126215
126458
|
this.focusOnGridContainer();
|
|
126459
|
+
return;
|
|
126460
|
+
}
|
|
126461
|
+
if (!this._dataUnit.getSelectedRecord()) {
|
|
126462
|
+
this.setFocusFirstRow();
|
|
126463
|
+
return;
|
|
126216
126464
|
}
|
|
126465
|
+
this.syncSelectWithDataUnit();
|
|
126217
126466
|
}
|
|
126218
126467
|
setAutoFocus(autoFocus) {
|
|
126219
126468
|
var _a;
|
|
@@ -126257,6 +126506,23 @@ class AgGridController {
|
|
|
126257
126506
|
this.startEditionOnRowByIndex(newRowIndex);
|
|
126258
126507
|
}
|
|
126259
126508
|
}
|
|
126509
|
+
syncSelectWithDataUnit() {
|
|
126510
|
+
const rowNode = this._gridOptions.api.getRowNode(this._dataUnit.getSelectedRecord().__record__id__);
|
|
126511
|
+
if ((rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex) < 0)
|
|
126512
|
+
return;
|
|
126513
|
+
const rowRange = this._gridOptions.api.getCellRanges().find(row => row.startRow.rowIndex === rowNode.rowIndex);
|
|
126514
|
+
if ((rowRange === null || rowRange === void 0 ? void 0 : rowRange.columns.length) > 0) {
|
|
126515
|
+
if (this._dataUnit.hasNewRecord()) {
|
|
126516
|
+
this.startEdition(rowNode.rowIndex, rowRange.columns[0]);
|
|
126517
|
+
return;
|
|
126518
|
+
}
|
|
126519
|
+
this.focusByCollAndRow(rowRange.columns[0], rowNode.rowIndex);
|
|
126520
|
+
this._gridOptions.api.addCellRange({ rowStartIndex: rowNode.rowIndex, rowEndIndex: rowNode.rowIndex, columns: rowRange.columns });
|
|
126521
|
+
return;
|
|
126522
|
+
}
|
|
126523
|
+
this._gridOptions.api.clearRangeSelection();
|
|
126524
|
+
this.setFocusOnRow(rowNode.rowIndex);
|
|
126525
|
+
}
|
|
126260
126526
|
startEdition(rowIndex, firstCol) {
|
|
126261
126527
|
this._gridOptions.api.clearRangeSelection();
|
|
126262
126528
|
this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [firstCol] });
|
|
@@ -126287,6 +126553,7 @@ class AgGridController {
|
|
|
126287
126553
|
let displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
|
|
126288
126554
|
let firstColl = displayedColumns.find(column => column.getColDef().headerName !== '');
|
|
126289
126555
|
this.focusByCollAndRow(firstColl, rowIndex);
|
|
126556
|
+
this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [firstColl] });
|
|
126290
126557
|
}
|
|
126291
126558
|
focusByCollAndRow(firstCell, rowIndex) {
|
|
126292
126559
|
this._gridOptions.api.ensureColumnVisible(firstCell);
|
|
@@ -126326,6 +126593,14 @@ class AgGridController {
|
|
|
126326
126593
|
this._gridOptions.api.setColumnDefs(this._colDefs);
|
|
126327
126594
|
}
|
|
126328
126595
|
}
|
|
126596
|
+
hideSelectionColumn() {
|
|
126597
|
+
var _a, _b;
|
|
126598
|
+
(_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.columnApi) === null || _b === void 0 ? void 0 : _b.setColumnVisible(this.CHECK_BOX_COL_ID, false);
|
|
126599
|
+
}
|
|
126600
|
+
showSelectionColumn() {
|
|
126601
|
+
var _a, _b;
|
|
126602
|
+
(_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.columnApi) === null || _b === void 0 ? void 0 : _b.setColumnVisible(this.CHECK_BOX_COL_ID, true);
|
|
126603
|
+
}
|
|
126329
126604
|
getColumnsDef() {
|
|
126330
126605
|
if (this._grid === undefined) {
|
|
126331
126606
|
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
@@ -126610,18 +126885,24 @@ class AgGridController {
|
|
|
126610
126885
|
return false;
|
|
126611
126886
|
}
|
|
126612
126887
|
onSelectionChange(event) {
|
|
126888
|
+
var _a, _b;
|
|
126889
|
+
const selectedRowId = (_b = (_a = event.api.getSelectedNodes()) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id;
|
|
126890
|
+
const isNewRecord = this._dataUnit.isNewRecord(selectedRowId);
|
|
126613
126891
|
if (!this._selectionChangeCallback)
|
|
126614
126892
|
return;
|
|
126615
126893
|
clearTimeout(this._selectionChangeDeboucing);
|
|
126616
|
-
this._selectionChangeDeboucing = window.setTimeout(() => {
|
|
126617
|
-
this.handleExecuteProceedAutosave();
|
|
126894
|
+
this._selectionChangeDeboucing = window.setTimeout(async () => {
|
|
126895
|
+
const saveSuccess = (!isNewRecord && selectedRowId) ? await this.handleExecuteProceedAutosave() : true;
|
|
126896
|
+
if (!saveSuccess)
|
|
126897
|
+
return;
|
|
126618
126898
|
this.processBuildSelectionChangeCallback(event);
|
|
126619
126899
|
}, 0);
|
|
126620
126900
|
}
|
|
126621
|
-
handleExecuteProceedAutosave() {
|
|
126901
|
+
async handleExecuteProceedAutosave() {
|
|
126622
126902
|
if (this._gridShowDom) {
|
|
126623
|
-
this._editionManager.proceedAutoSave();
|
|
126903
|
+
return await this._editionManager.proceedAutoSave();
|
|
126624
126904
|
}
|
|
126905
|
+
return true;
|
|
126625
126906
|
}
|
|
126626
126907
|
processBuildSelectionChangeCallback(event) {
|
|
126627
126908
|
if (this._dataUnit) {
|
|
@@ -126646,7 +126927,7 @@ class AgGridController {
|
|
|
126646
126927
|
});
|
|
126647
126928
|
}
|
|
126648
126929
|
onRowDoubleClick(evt) {
|
|
126649
|
-
if (this._doubleClickCallBack) {
|
|
126930
|
+
if (this._doubleClickCallBack && (!this._options.enableGridInsert || !this._dataUnit.hasNewRecord())) {
|
|
126650
126931
|
this._doubleClickCallBack(evt.data);
|
|
126651
126932
|
}
|
|
126652
126933
|
}
|
|
@@ -126662,13 +126943,11 @@ class AgGridController {
|
|
|
126662
126943
|
}
|
|
126663
126944
|
}
|
|
126664
126945
|
setCellEditors(customEditors) {
|
|
126665
|
-
var _a;
|
|
126666
126946
|
if (!this._editionManager) {
|
|
126667
126947
|
this._customEditors = customEditors;
|
|
126668
126948
|
return;
|
|
126669
126949
|
}
|
|
126670
126950
|
this._editionManager.setCellEditors(customEditors);
|
|
126671
|
-
(_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api.redrawRows();
|
|
126672
126951
|
}
|
|
126673
126952
|
setCellRenders(customRenders) {
|
|
126674
126953
|
var _a;
|
|
@@ -126691,6 +126970,9 @@ class AgGridController {
|
|
|
126691
126970
|
destroy() {
|
|
126692
126971
|
this.observer.disconnect();
|
|
126693
126972
|
}
|
|
126973
|
+
stopEdit() {
|
|
126974
|
+
this._gridOptions.api.stopEditing();
|
|
126975
|
+
}
|
|
126694
126976
|
}
|
|
126695
126977
|
|
|
126696
126978
|
function enableSelectAll(total) {
|
|
@@ -126941,6 +127223,7 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
126941
127223
|
this.paginationCounterMode = 'show';
|
|
126942
127224
|
this.enableGridInsert = false;
|
|
126943
127225
|
this.enableContinuousInsert = true;
|
|
127226
|
+
this.enableLockManger = true;
|
|
126944
127227
|
}
|
|
126945
127228
|
/**
|
|
126946
127229
|
* Aplica a definição de colunas.
|
|
@@ -127065,6 +127348,18 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
127065
127348
|
async setFocus() {
|
|
127066
127349
|
this._gridController.setFocus();
|
|
127067
127350
|
}
|
|
127351
|
+
/**
|
|
127352
|
+
* Para a edição da grade.
|
|
127353
|
+
*/
|
|
127354
|
+
async stopEdit() {
|
|
127355
|
+
this._gridController.stopEdit();
|
|
127356
|
+
}
|
|
127357
|
+
async checkStopEditOutsideClick(event) {
|
|
127358
|
+
var _a;
|
|
127359
|
+
if ((_a = this._container) === null || _a === void 0 ? void 0 : _a.contains(event.target))
|
|
127360
|
+
return;
|
|
127361
|
+
this._gridController.stopEdit();
|
|
127362
|
+
}
|
|
127068
127363
|
observeConfig(config) {
|
|
127069
127364
|
this._gridController.setColumnsState(config === null || config === void 0 ? void 0 : config.columns);
|
|
127070
127365
|
}
|
|
@@ -127090,6 +127385,9 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
127090
127385
|
this.setSelection(this.dataUnit.getSelectionInfo());
|
|
127091
127386
|
}
|
|
127092
127387
|
}
|
|
127388
|
+
async handleClick(event) {
|
|
127389
|
+
this.checkStopEditOutsideClick(event);
|
|
127390
|
+
}
|
|
127093
127391
|
setSelection(selectionInfo) {
|
|
127094
127392
|
var _a;
|
|
127095
127393
|
this._selectionCount = (_a = selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.length) !== null && _a !== void 0 ? _a : 0;
|
|
@@ -127286,7 +127584,8 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
127286
127584
|
if (this.dataUnit) {
|
|
127287
127585
|
this.setSelection(this.dataUnit.getSelectionInfo());
|
|
127288
127586
|
}
|
|
127289
|
-
}
|
|
127587
|
+
},
|
|
127588
|
+
enableLockManger: this.enableLockManger
|
|
127290
127589
|
});
|
|
127291
127590
|
if (this.config) {
|
|
127292
127591
|
this.observeConfig(this.config);
|
|
@@ -128493,6 +128792,7 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
128493
128792
|
this.precision = undefined;
|
|
128494
128793
|
this.prettyPrecision = undefined;
|
|
128495
128794
|
this.mode = "regular";
|
|
128795
|
+
this.autoFocus = false;
|
|
128496
128796
|
}
|
|
128497
128797
|
/**
|
|
128498
128798
|
* Aplica o foco no campo.
|
|
@@ -128633,11 +128933,17 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
|
|
|
128633
128933
|
const textValue = this.getTextValue(this.value) || '';
|
|
128634
128934
|
if ((this._value || '') !== textValue) {
|
|
128635
128935
|
this._value = textValue;
|
|
128936
|
+
this._textInput.value = this._value;
|
|
128636
128937
|
}
|
|
128637
128938
|
}
|
|
128638
128939
|
componentDidLoad() {
|
|
128639
128940
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
128640
128941
|
this.setInputValue();
|
|
128942
|
+
if (this.autoFocus) {
|
|
128943
|
+
requestAnimationFrame(() => {
|
|
128944
|
+
this.setFocus({ selectText: true });
|
|
128945
|
+
});
|
|
128946
|
+
}
|
|
128641
128947
|
}
|
|
128642
128948
|
render() {
|
|
128643
128949
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
@@ -129175,6 +129481,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129175
129481
|
this.suppressSearch = false;
|
|
129176
129482
|
this.ensureClearButtonVisible = false;
|
|
129177
129483
|
this.suppressPreLoad = false;
|
|
129484
|
+
this.autoFocus = false;
|
|
129178
129485
|
}
|
|
129179
129486
|
observeErrorMessage() {
|
|
129180
129487
|
var _a;
|
|
@@ -129233,9 +129540,9 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129233
129540
|
/**
|
|
129234
129541
|
* Aplica o foco no campo.
|
|
129235
129542
|
*/
|
|
129236
|
-
async setFocus() {
|
|
129543
|
+
async setFocus(options) {
|
|
129237
129544
|
if (this._textInput) {
|
|
129238
|
-
this._textInput.setFocus();
|
|
129545
|
+
this._textInput.setFocus(options);
|
|
129239
129546
|
}
|
|
129240
129547
|
}
|
|
129241
129548
|
/**
|
|
@@ -129508,15 +129815,16 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129508
129815
|
replaceHighlight(value) {
|
|
129509
129816
|
const startHighlight = new RegExp(this._startHighlightTag, 'g');
|
|
129510
129817
|
const endHighlight = new RegExp(this._endHighlightTag, 'g');
|
|
129511
|
-
return (value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
|
|
129818
|
+
return String(value !== null && value !== void 0 ? value : "").replace(startHighlight, '').replace(endHighlight, '');
|
|
129512
129819
|
}
|
|
129513
|
-
selectOption(newOption) {
|
|
129820
|
+
selectOption(newOption, focusOnInput = true) {
|
|
129514
129821
|
var _a, _b;
|
|
129515
129822
|
const currentValue = this.getSelectedOption(this.value);
|
|
129516
129823
|
const newOptionsReplaced = Object.assign(Object.assign({}, newOption), { value: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.value), label: this.replaceHighlight(newOption === null || newOption === void 0 ? void 0 : newOption.label) });
|
|
129517
|
-
|
|
129518
|
-
|
|
129519
|
-
|
|
129824
|
+
const newOptionsFormatted = Object.assign(Object.assign({}, newOptionsReplaced), { value: this.replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.value), label: this.replaceQuotes(newOptionsReplaced === null || newOptionsReplaced === void 0 ? void 0 : newOptionsReplaced.label) });
|
|
129825
|
+
if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOptionsFormatted === null || newOptionsFormatted === void 0 ? void 0 : newOptionsFormatted.value) === null || _b === void 0 ? void 0 : _b.toString()))
|
|
129826
|
+
|| (currentValue == undefined && newOptionsFormatted != undefined && "value" in newOptionsFormatted)) {
|
|
129827
|
+
const adjustedOpt = !(newOptionsFormatted === null || newOptionsFormatted === void 0 ? void 0 : newOptionsFormatted.value) ? undefined : newOptionsFormatted;
|
|
129520
129828
|
this.value = adjustedOpt;
|
|
129521
129829
|
this._currentValue = adjustedOpt;
|
|
129522
129830
|
}
|
|
@@ -129526,6 +129834,11 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129526
129834
|
}
|
|
129527
129835
|
this._visibleOptions = [];
|
|
129528
129836
|
this.clearSource();
|
|
129837
|
+
if (focusOnInput) {
|
|
129838
|
+
setTimeout(() => {
|
|
129839
|
+
this.setFocus();
|
|
129840
|
+
}, 0);
|
|
129841
|
+
}
|
|
129529
129842
|
}
|
|
129530
129843
|
loadOptions(mode, argument = "") {
|
|
129531
129844
|
this._criteria = argument;
|
|
@@ -129562,7 +129875,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129562
129875
|
this.value = null;
|
|
129563
129876
|
this._currentValue = null;
|
|
129564
129877
|
}
|
|
129565
|
-
controlListWithOnlyOne() {
|
|
129878
|
+
controlListWithOnlyOne(focusOnInput = true) {
|
|
129566
129879
|
var _a, _b;
|
|
129567
129880
|
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
129568
129881
|
if ((source === null || source === void 0 ? void 0 : source.length) > 0) {
|
|
@@ -129573,7 +129886,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129573
129886
|
value: (_b = source[0].value) === null || _b === void 0 ? void 0 : _b.replace(startHighlight, '').replace(endHighlight, ''),
|
|
129574
129887
|
label: title === null || title === void 0 ? void 0 : title.replace(startHighlight, '').replace(endHighlight, '')
|
|
129575
129888
|
};
|
|
129576
|
-
this.selectOption(option);
|
|
129889
|
+
this.selectOption(option, focusOnInput);
|
|
129577
129890
|
}
|
|
129578
129891
|
}
|
|
129579
129892
|
controlEmptySearch() {
|
|
@@ -129699,6 +130012,11 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129699
130012
|
}
|
|
129700
130013
|
});
|
|
129701
130014
|
});
|
|
130015
|
+
if (this.autoFocus) {
|
|
130016
|
+
requestAnimationFrame(() => {
|
|
130017
|
+
this.setFocus({ selectText: true });
|
|
130018
|
+
});
|
|
130019
|
+
}
|
|
129702
130020
|
}
|
|
129703
130021
|
//---------------------------------------------
|
|
129704
130022
|
// Event handlers
|
|
@@ -129768,12 +130086,16 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129768
130086
|
}
|
|
129769
130087
|
switch (event.key) {
|
|
129770
130088
|
case "ArrowDown":
|
|
129771
|
-
this.nextOption();
|
|
129772
130089
|
event.stopPropagation();
|
|
130090
|
+
if (this.canShowListOptions())
|
|
130091
|
+
event.preventDefault();
|
|
130092
|
+
this.nextOption();
|
|
129773
130093
|
break;
|
|
129774
130094
|
case "ArrowUp":
|
|
129775
|
-
this.previousOption();
|
|
129776
130095
|
event.stopPropagation();
|
|
130096
|
+
if (this.canShowListOptions())
|
|
130097
|
+
event.preventDefault();
|
|
130098
|
+
this.previousOption();
|
|
129777
130099
|
break;
|
|
129778
130100
|
case "Enter":
|
|
129779
130101
|
this.handleEventPropagation(event);
|
|
@@ -129784,7 +130106,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
|
|
|
129784
130106
|
break;
|
|
129785
130107
|
case "Tab":
|
|
129786
130108
|
this._tabPressed = true;
|
|
129787
|
-
this.controlListWithOnlyOne();
|
|
130109
|
+
this.controlListWithOnlyOne(false);
|
|
129788
130110
|
break;
|
|
129789
130111
|
}
|
|
129790
130112
|
//ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
|
|
@@ -131266,6 +131588,7 @@ const EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
131266
131588
|
this.mode = "regular";
|
|
131267
131589
|
this.enableResize = false;
|
|
131268
131590
|
this.autoRows = false;
|
|
131591
|
+
this.autoFocus = false;
|
|
131269
131592
|
}
|
|
131270
131593
|
observeErrorMessage() {
|
|
131271
131594
|
var _a, _b, _c, _d;
|
|
@@ -131454,6 +131777,11 @@ const EzTextArea$1 = class extends HTMLElement$1 {
|
|
|
131454
131777
|
this.observeErrorMessage();
|
|
131455
131778
|
this.adjustFloatingLabel();
|
|
131456
131779
|
this.observeMode();
|
|
131780
|
+
if (this.autoFocus) {
|
|
131781
|
+
requestAnimationFrame(() => {
|
|
131782
|
+
this.setFocus();
|
|
131783
|
+
});
|
|
131784
|
+
}
|
|
131457
131785
|
}
|
|
131458
131786
|
render() {
|
|
131459
131787
|
ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
|
|
@@ -131574,7 +131902,7 @@ const EzTextEdit$1 = class extends HTMLElement$1 {
|
|
|
131574
131902
|
static get style() { return ezTextEditCss; }
|
|
131575
131903
|
};
|
|
131576
131904
|
|
|
131577
|
-
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--height--slim:32px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__input--background-color:var(--background--light, #ffffff);--ez-text-input__input--border:var(--border--small, 1px solid);--ez-text-input__input--border-color:var(--color--strokes,#DCE0E8);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--background--medium, #F0F3F7);--ez-text-input__input--disabled--color:var(--text--primary, #626E82);--ez-text-input__input--error--border-color:var(--color-alert--error-800,#BD0025);--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__message_box--font-size:var(--text--extra-small, 10px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color-alert--error-800,#BD0025);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;--ez-text-input__input--focus--icon-color:var(--title--primary, #2B3A54);--ez-text-input__input--disabled--focus--icon-color:var(--text--primary, #626E82);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}:host(.grid_editor){--ez-text-input--height--slim:25px}input{width:100%;box-sizing:border-box;height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color);font-weight:var(--ez-text-input--font-weight);padding:var(--ez-text-input__input--padding)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:disabled,input:read-only{cursor:not-allowed}.message-box{min-height:14px;min-width:100%;margin-top:3px;line-height:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input__slim--title{font-size:16px;font-weight:bold}.input--slim::-webkit-input-placeholder
|
|
131905
|
+
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--height--slim:32px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__input--background-color:var(--background--light, #ffffff);--ez-text-input__input--border:var(--border--small, 1px solid);--ez-text-input__input--border-color:var(--color--strokes,#DCE0E8);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--background--medium, #F0F3F7);--ez-text-input__input--disabled--color:var(--text--primary, #626E82);--ez-text-input__input--error--border-color:var(--color-alert--error-800,#BD0025);--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__placeholder--color:var(--text--secondary, #a2abb9);--ez-text-input__message_box--font-size:var(--text--extra-small, 10px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color-alert--error-800,#BD0025);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;--ez-text-input__input--focus--icon-color:var(--title--primary, #2B3A54);--ez-text-input__input--disabled--focus--icon-color:var(--text--primary, #626E82);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}:host(.grid_editor){--ez-text-input--height--slim:25px}input{width:100%;box-sizing:border-box;height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color);font-weight:var(--ez-text-input--font-weight);padding:var(--ez-text-input__input--padding)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:disabled,input:read-only{cursor:not-allowed}.message-box{min-height:14px;min-width:100%;margin-top:3px;line-height:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color);cursor:not-allowed}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input__slim--title{font-size:16px;font-weight:bold}.input--slim::-webkit-input-placeholder,.input--slim:-moz-placeholder,.input--slim::-moz-placeholder,.input--slim:-ms-input-placeholder,.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input__placeholder--color)}.input--slim:disabled::-webkit-input-placeholder,.input--slim:disabled:-moz-placeholder,.input--slim:disabled::-moz-placeholder,.input--slim:disabled:-ms-input-placeholder,.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}input.input__slim--noborder{box-shadow:0 0 0 0;border:0 none;outline:0;background:var(--ez-text-input__input--noborder-color)}";
|
|
131578
131906
|
|
|
131579
131907
|
const EzTextInput$1 = class extends HTMLElement$1 {
|
|
131580
131908
|
constructor() {
|
|
@@ -131592,6 +131920,7 @@ const EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
131592
131920
|
this.mode = "regular";
|
|
131593
131921
|
this.noBorder = false;
|
|
131594
131922
|
this.password = false;
|
|
131923
|
+
this.autoFocus = false;
|
|
131595
131924
|
}
|
|
131596
131925
|
observeErrorMessage() {
|
|
131597
131926
|
if (this._inputElem) {
|
|
@@ -131782,6 +132111,11 @@ const EzTextInput$1 = class extends HTMLElement$1 {
|
|
|
131782
132111
|
this.observeMask();
|
|
131783
132112
|
this.adjustFloatingLabel();
|
|
131784
132113
|
this.adjustBorderInput();
|
|
132114
|
+
if (this.autoFocus) {
|
|
132115
|
+
requestAnimationFrame(() => {
|
|
132116
|
+
this.setFocus({ selectText: true });
|
|
132117
|
+
});
|
|
132118
|
+
}
|
|
131785
132119
|
this._inputElem.addEventListener('focus', () => {
|
|
131786
132120
|
this._inputElem.setSelectionRange(0, this._inputElem.value.length);
|
|
131787
132121
|
});
|
|
@@ -131836,6 +132170,7 @@ const EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
131836
132170
|
this.showSeconds = false;
|
|
131837
132171
|
this.mode = "regular";
|
|
131838
132172
|
this.canShowError = true;
|
|
132173
|
+
this.autoFocus = false;
|
|
131839
132174
|
}
|
|
131840
132175
|
observeErrorMessage() {
|
|
131841
132176
|
var _a;
|
|
@@ -131956,6 +132291,11 @@ const EzTimeInput$1 = class extends HTMLElement$1 {
|
|
|
131956
132291
|
//---------------------------------------------
|
|
131957
132292
|
componentDidLoad() {
|
|
131958
132293
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
132294
|
+
if (this.autoFocus) {
|
|
132295
|
+
requestAnimationFrame(() => {
|
|
132296
|
+
this.setFocus({ selectText: true });
|
|
132297
|
+
});
|
|
132298
|
+
}
|
|
131959
132299
|
}
|
|
131960
132300
|
componentWillLoad() {
|
|
131961
132301
|
this.observeShowSeconds();
|
|
@@ -133322,17 +133662,17 @@ const EzChart = /*@__PURE__*/proxyCustomElement(EzChart$1, [1,"ez-chart",{"type"
|
|
|
133322
133662
|
const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4]}]);
|
|
133323
133663
|
const EzChip = /*@__PURE__*/proxyCustomElement(EzChip$1, [1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"showNativeTooltip":[4,"show-native-tooltip"]}]);
|
|
133324
133664
|
const EzCollapsibleBox = /*@__PURE__*/proxyCustomElement(EzCollapsibleBox$1, [1,"ez-collapsible-box",{"value":[1540],"boxBordered":[4,"box-bordered"],"label":[513],"subtitle":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32]}]);
|
|
133325
|
-
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"limitCharsToSearch":[2,"limit-chars-to-search"],"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"canShowError":[516,"can-show-error"],"mode":[513],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
133665
|
+
const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"limitCharsToSearch":[2,"limit-chars-to-search"],"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"canShowError":[516,"can-show-error"],"mode":[513],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"autoFocus":[4,"auto-focus"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
133326
133666
|
const EzCustomFormInput = /*@__PURE__*/proxyCustomElement(EzCustomFormInput$1, [2,"ez-custom-form-input",{"customEditor":[16],"formViewField":[16],"value":[1032],"detailContext":[1,"detail-context"],"builderFallback":[16],"selectedRecord":[16],"gui":[32]}]);
|
|
133327
|
-
const EzDateInput = /*@__PURE__*/proxyCustomElement(EzDateInput$1, [1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"canShowError":[516,"can-show-error"]}]);
|
|
133328
|
-
const EzDateTimeInput = /*@__PURE__*/proxyCustomElement(EzDateTimeInput$1, [1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"]}]);
|
|
133667
|
+
const EzDateInput = /*@__PURE__*/proxyCustomElement(EzDateInput$1, [1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"]}]);
|
|
133668
|
+
const EzDateTimeInput = /*@__PURE__*/proxyCustomElement(EzDateTimeInput$1, [1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"]}]);
|
|
133329
133669
|
const EzDialog = /*@__PURE__*/proxyCustomElement(EzDialog$1, [1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"beforeClose":[1040]},[[8,"keydown","handleKeyDown"]]]);
|
|
133330
133670
|
const EzDropdown = /*@__PURE__*/proxyCustomElement(EzDropdown$1, [1,"ez-dropdown",{"items":[1040],"value":[1040],"itemBuilder":[16]},[[4,"click","handleClickOutside"]]]);
|
|
133331
133671
|
const EzFileItem = /*@__PURE__*/proxyCustomElement(EzFileItem$1, [1,"ez-file-item",{"canRemove":[4,"can-remove"],"fileName":[1,"file-name"],"iconName":[1,"icon-name"],"fileSize":[2,"file-size"],"progress":[2]}]);
|
|
133332
|
-
const EzFilterInput = /*@__PURE__*/proxyCustomElement(EzFilterInput$1, [1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"]}]);
|
|
133672
|
+
const EzFilterInput = /*@__PURE__*/proxyCustomElement(EzFilterInput$1, [1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"]}]);
|
|
133333
133673
|
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"],"onlyStaticFields":[4,"only-static-fields"],"_fieldsProps":[32]}]);
|
|
133334
133674
|
const EzFormView = /*@__PURE__*/proxyCustomElement(EzFormView$1, [2,"ez-form-view",{"fields":[16],"selectedRecord":[16],"_customEditors":[32]}]);
|
|
133335
|
-
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"autoFocus":[4,"auto-focus"],"paginationCounterMode":[1,"pagination-counter-mode"],"enableGridInsert":[4,"enable-grid-insert"],"enableContinuousInsert":[4,"enable-continuous-insert"],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32],"_customFormatters":[32]},[[0,"ezSelectionChange","onSelectionChange"]]]);
|
|
133675
|
+
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"autoFocus":[4,"auto-focus"],"paginationCounterMode":[1,"pagination-counter-mode"],"enableGridInsert":[4,"enable-grid-insert"],"enableContinuousInsert":[4,"enable-continuous-insert"],"enableLockManger":[4,"enable-lock-manger"],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32],"_customFormatters":[32]},[[0,"ezSelectionChange","onSelectionChange"],[2,"click","handleClick"]]]);
|
|
133336
133676
|
const EzGuideNavigator = /*@__PURE__*/proxyCustomElement(EzGuideNavigator$1, [1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32]}]);
|
|
133337
133677
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
|
|
133338
133678
|
const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [2,"ez-list",{"dataSource":[1040],"listMode":[1,"list-mode"],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"_listItems":[32],"_listGroupItems":[32]}]);
|
|
@@ -133340,12 +133680,12 @@ const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-load
|
|
|
133340
133680
|
const EzModal = /*@__PURE__*/proxyCustomElement(EzModal$1, [1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"closeOutsideLeave":[4,"close-outside-leave"],"scrim":[1]}]);
|
|
133341
133681
|
const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"],"showCloseButton":[4,"show-close-button"]},[[4,"ezCloseModal","handleEzModalAction"]]]);
|
|
133342
133682
|
const EzMultiSelectionList = /*@__PURE__*/proxyCustomElement(EzMuiltiSelectionList, [2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[1040],"isTextSearch":[4,"is-text-search"],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32]}]);
|
|
133343
|
-
const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"allowNegative":[4,"allow-negative"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"_value":[32]}]);
|
|
133683
|
+
const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"allowNegative":[4,"allow-negative"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513],"autoFocus":[4,"auto-focus"],"_value":[32]}]);
|
|
133344
133684
|
const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"]}]);
|
|
133345
133685
|
const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"],"enabledScroll":[4,"enabled-scroll"]}]);
|
|
133346
133686
|
const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
|
|
133347
133687
|
const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]);
|
|
133348
|
-
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [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"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"options":[1040],"suppressSearch":[4,"suppress-search"],"ensureClearButtonVisible":[4,"ensure-clear-button-visible"],"suppressPreLoad":[4,"suppress-pre-load"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_showLoadingDescription":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
133688
|
+
const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [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"],"stopPropagateEnterKeyEvent":[4,"stop-propagate-enter-key-event"],"mode":[513],"canShowError":[516,"can-show-error"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"ignoreLimitCharsToSearch":[4,"ignore-limit-chars-to-search"],"options":[1040],"suppressSearch":[4,"suppress-search"],"ensureClearButtonVisible":[4,"ensure-clear-button-visible"],"suppressPreLoad":[4,"suppress-pre-load"],"autoFocus":[4,"auto-focus"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_showLoadingDescription":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
|
|
133349
133689
|
const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
|
|
133350
133690
|
const EzSidebarNavigator = /*@__PURE__*/proxyCustomElement(EzSidebarNavigator$1, [1,"ez-sidebar-navigator",{"type":[1],"mode":[1025],"size":[1],"isResponsive":[4,"is-responsive"],"titleMenu":[1,"title-menu"],"showCollapseMenu":[4,"show-collapse-menu"],"showFixedButton":[4,"show-fixed-button"],"open":[32]}]);
|
|
133351
133691
|
const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
|
|
@@ -133353,10 +133693,10 @@ const EzSplitButton = /*@__PURE__*/proxyCustomElement(EzSplitButton$1, [1,"ez-sp
|
|
|
133353
133693
|
const EzSplitItem = /*@__PURE__*/proxyCustomElement(SplitItem, [4,"ez-split-item",{"label":[1],"enableExpand":[516,"enable-expand"],"size":[1],"_expanded":[32]}]);
|
|
133354
133694
|
const EzSplitPanel = /*@__PURE__*/proxyCustomElement(SplitPanel, [0,"ez-split-panel",{"direction":[1],"anchorToExpand":[4,"anchor-to-expand"]}]);
|
|
133355
133695
|
const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
|
|
133356
|
-
const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"enableResize":[516,"enable-resize"],"autoRows":[516,"auto-rows"]}]);
|
|
133696
|
+
const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"enableResize":[516,"enable-resize"],"autoRows":[516,"auto-rows"],"autoFocus":[4,"auto-focus"]}]);
|
|
133357
133697
|
const EzTextEdit = /*@__PURE__*/proxyCustomElement(EzTextEdit$1, [1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32]}]);
|
|
133358
|
-
const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"password":[4]}]);
|
|
133359
|
-
const EzTimeInput = /*@__PURE__*/proxyCustomElement(EzTimeInput$1, [1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"]}]);
|
|
133698
|
+
const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"],"password":[4],"autoFocus":[4,"auto-focus"]}]);
|
|
133699
|
+
const EzTimeInput = /*@__PURE__*/proxyCustomElement(EzTimeInput$1, [1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"]}]);
|
|
133360
133700
|
const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"message":[1025],"fadeTime":[1026,"fade-time"],"useIcon":[1028,"use-icon"],"canClose":[1028,"can-close"]}]);
|
|
133361
133701
|
const EzTree = /*@__PURE__*/proxyCustomElement(EzTree$1, [1,"ez-tree",{"items":[1040],"value":[1040],"selectedId":[1537,"selected-id"],"iconResolver":[16],"tooltipResolver":[16],"_tree":[32],"_waintingForLoad":[32]},[[2,"keydown","onKeyDownListener"]]]);
|
|
133362
133702
|
const EzUpload = /*@__PURE__*/proxyCustomElement(EzUpload$1, [1,"ez-upload",{"label":[1],"subtitle":[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]}]);
|