@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,12 +1,13 @@
|
|
|
1
|
-
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-
|
|
2
|
-
import { Action, ObjectUtils as ObjectUtils$1, HTMLBuilder, ApplicationContext, UserInterface, StringUtils as StringUtils$1, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, ElementIDUtils, FieldComparator, DateUtils as DateUtils$1, ArrayUtils as ArrayUtils$1, JSUtils, OverflowWatcher, OVERFLOWED_CLASS_NAME } from '@sankhyalabs/core';
|
|
1
|
+
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-5a720e56.js';
|
|
2
|
+
import { Action, ObjectUtils as ObjectUtils$1, HTMLBuilder, ApplicationContext, UserInterface, LockManager, LockManagerOperation, StringUtils as StringUtils$1, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, ElementIDUtils, FieldComparator, DateUtils as DateUtils$1, ArrayUtils as ArrayUtils$1, JSUtils, OverflowWatcher, OVERFLOWED_CLASS_NAME } from '@sankhyalabs/core';
|
|
3
3
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
4
4
|
import { A as ApplicationUtils } from './ApplicationUtils-eaf91331.js';
|
|
5
5
|
import './DialogType-54a62731.js';
|
|
6
6
|
import './CheckMode-bdb2ec19.js';
|
|
7
7
|
import { C as CustomEditorSource, a as CustomRenderSource } from './ICustomRender-875b5a40.js';
|
|
8
8
|
import { D as DISTINCT_FILTER_NAME_PREFIX, E as EZ_GRID_LOADING_SOURCE } from './constants-4e0d35b7.js';
|
|
9
|
-
import { b as buildFieldMetadata, R as RecordValidationProcessor } from './
|
|
9
|
+
import { b as buildFieldMetadata, R as RecordValidationProcessor, D as DataBinder } from './DataBinder-bd240826.js';
|
|
10
|
+
import { F as FocusResolver } from './FocusResolver-1ccbf850.js';
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* @ag-grid-community/all-modules - Advanced Data Grid / Data Table supporting Javascript / Typescript / React / Angular / Vue * @version v28.2.1
|
|
@@ -118853,12 +118854,14 @@ class DataSource {
|
|
|
118853
118854
|
this._controller.clearInvalidCells();
|
|
118854
118855
|
this.handleRefreshOrReload(action);
|
|
118855
118856
|
this._controller.processContinuousInsert();
|
|
118857
|
+
this._controller.showSelectionColumn();
|
|
118856
118858
|
}
|
|
118857
118859
|
handleEditionCanceled(action) {
|
|
118858
118860
|
if (this._options.enableGridInsert) {
|
|
118859
118861
|
this._controller.processEditionCanceled();
|
|
118860
118862
|
}
|
|
118861
118863
|
this.handleRefreshOrReload(action);
|
|
118864
|
+
this._controller.showSelectionColumn();
|
|
118862
118865
|
}
|
|
118863
118866
|
handleSavingCanceled(action) {
|
|
118864
118867
|
var _a, _b, _c, _d;
|
|
@@ -118913,6 +118916,7 @@ class DataSource {
|
|
|
118913
118916
|
}
|
|
118914
118917
|
handleRecordsAdded() {
|
|
118915
118918
|
if (this._options.enableGridInsert) {
|
|
118919
|
+
this._controller.hideSelectionColumn();
|
|
118916
118920
|
this._controller.refresh();
|
|
118917
118921
|
this.focusOnNewRecord();
|
|
118918
118922
|
}
|
|
@@ -119339,12 +119343,14 @@ const buildEditorMetadata = (descriptor, eGridCell, dataUnit, editionManager) =>
|
|
|
119339
119343
|
const MINIMIUM_WIDTH_TEXTAREA = 210;
|
|
119340
119344
|
const PADDING_VALUE_TEXTAREA = 12;
|
|
119341
119345
|
const buildTextInput = ({ name, contextName }) => {
|
|
119342
|
-
|
|
119346
|
+
const textInput = HTMLBuilder.parseElement(`<ez-text-input
|
|
119343
119347
|
class="ez-grid grid_editor"
|
|
119344
119348
|
data-field-name=${name}
|
|
119345
119349
|
data-context-name=${contextName}
|
|
119346
119350
|
mode="slim"
|
|
119347
119351
|
/>`);
|
|
119352
|
+
textInput.autoFocus = true;
|
|
119353
|
+
return textInput;
|
|
119348
119354
|
};
|
|
119349
119355
|
const buildTextAreaInput = ({ eGridCell, editionManager }) => {
|
|
119350
119356
|
const element = HTMLBuilder.parseElement(`<ez-text-area
|
|
@@ -119354,6 +119360,7 @@ const buildTextAreaInput = ({ eGridCell, editionManager }) => {
|
|
|
119354
119360
|
element.addEventListener('keydown', event => handlePressEnterEvent(event, element, editionManager));
|
|
119355
119361
|
setElementInitialWidth(eGridCell, element);
|
|
119356
119362
|
element.isPopUp = true;
|
|
119363
|
+
element.autoFocus = true;
|
|
119357
119364
|
return element;
|
|
119358
119365
|
};
|
|
119359
119366
|
function setElementInitialWidth(eGridCell, element) {
|
|
@@ -119385,6 +119392,7 @@ const buildDate = () => {
|
|
|
119385
119392
|
data-is-fixed="true"
|
|
119386
119393
|
/>`);
|
|
119387
119394
|
dateInput.valueGetter = () => dateInput.getValueAsync();
|
|
119395
|
+
dateInput.autoFocus = true;
|
|
119388
119396
|
return dateInput;
|
|
119389
119397
|
};
|
|
119390
119398
|
const buildTime = ({ readOnly }) => {
|
|
@@ -119435,6 +119443,7 @@ function buildNumeric(readOnly, precision, prettyPrecision) {
|
|
|
119435
119443
|
mode="slim"
|
|
119436
119444
|
/>`);
|
|
119437
119445
|
input.valueGetter = () => input.getValueAsync();
|
|
119446
|
+
input.autoFocus = true;
|
|
119438
119447
|
return input;
|
|
119439
119448
|
}
|
|
119440
119449
|
|
|
@@ -119468,6 +119477,7 @@ const buildComboBox = ({ required, props, eGridCell }) => {
|
|
|
119468
119477
|
combo.options = options;
|
|
119469
119478
|
combo.stopPropagateEnterKeyEvent = true;
|
|
119470
119479
|
combo.listOptionsPosition = { verticalPosition: 29, bottomLimit: getViewPortHeight(eGridCell), hardPosition: true };
|
|
119480
|
+
combo.autoFocus = true;
|
|
119471
119481
|
return combo;
|
|
119472
119482
|
};
|
|
119473
119483
|
const buildSwitch = (fieldMetadata) => {
|
|
@@ -119500,6 +119510,7 @@ const buildSearch = ({ name, required, readOnly, eGridCell, dataUnit }) => {
|
|
|
119500
119510
|
ezSearch.suppressPreLoad = true;
|
|
119501
119511
|
ezSearch.listOptionsPosition = { verticalPosition: 29, bottomLimit: getViewPortHeight(eGridCell), hardPosition: true };
|
|
119502
119512
|
ezSearch.stopPropagateEnterKeyEvent = true;
|
|
119513
|
+
ezSearch.autoFocus = true;
|
|
119503
119514
|
ezSearch.valueGetter = () => ezSearch.getValueAsync();
|
|
119504
119515
|
return ezSearch;
|
|
119505
119516
|
};
|
|
@@ -119625,6 +119636,12 @@ class EzGridCustomCellEditor extends EzCellEditor {
|
|
|
119625
119636
|
return this._customGui.value;
|
|
119626
119637
|
return this._value;
|
|
119627
119638
|
}
|
|
119639
|
+
afterGuiAttached() {
|
|
119640
|
+
this.focusIn();
|
|
119641
|
+
}
|
|
119642
|
+
focusIn() {
|
|
119643
|
+
FocusResolver.resolveFocus(this._customGui);
|
|
119644
|
+
}
|
|
119628
119645
|
}
|
|
119629
119646
|
|
|
119630
119647
|
class EzCellRender {
|
|
@@ -119706,11 +119723,11 @@ class EzGridCustomCellRender extends EzCellRender {
|
|
|
119706
119723
|
}
|
|
119707
119724
|
|
|
119708
119725
|
class GridEditionManager {
|
|
119709
|
-
constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders, enableContinuousInsert, enableGridInsert) {
|
|
119726
|
+
constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders, enableContinuousInsert, enableGridInsert, lockerId) {
|
|
119710
119727
|
this._dataUnit = dataUnit;
|
|
119711
119728
|
this._recordValidationProcessor = new RecordValidationProcessor(this._dataUnit, {
|
|
119712
119729
|
getRequiredFields: () => this.getRequiredFields(),
|
|
119713
|
-
markAsInvalid: (invalidField, recordId) => { this.
|
|
119730
|
+
markAsInvalid: (invalidField, recordId) => { this.pushInvalidCell(invalidField, recordId); },
|
|
119714
119731
|
getMessageForField: () => null,
|
|
119715
119732
|
}, recordsValidator);
|
|
119716
119733
|
this._useEnterLikeTab = useEnterLikeTab;
|
|
@@ -119719,16 +119736,34 @@ class GridEditionManager {
|
|
|
119719
119736
|
this._enableGridInsert = enableGridInsert;
|
|
119720
119737
|
this._customEditors = customEditors;
|
|
119721
119738
|
this._customRenders = customRenders;
|
|
119739
|
+
this._lockerId = lockerId;
|
|
119722
119740
|
}
|
|
119723
119741
|
configureGrid(options) {
|
|
119724
119742
|
this._gridOptions = options;
|
|
119725
119743
|
options.readOnlyEdit = true;
|
|
119726
119744
|
options.onCellEditRequest = evt => this.onCellEditRequest(evt);
|
|
119745
|
+
options.onCellEditingStarted = async (evt) => {
|
|
119746
|
+
var _a;
|
|
119747
|
+
if (this._dataUnit.hasNewRecord()) {
|
|
119748
|
+
this.handleCellEditingStartedRowAdd(evt);
|
|
119749
|
+
}
|
|
119750
|
+
else {
|
|
119751
|
+
this._lastCellOpened = this._lastCellEdited = { rowIndex: evt.rowIndex, column: evt.column, rowPinned: undefined };
|
|
119752
|
+
}
|
|
119753
|
+
(_a = this._currentEditLock) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
119754
|
+
this._currentEditLock = LockManager.lock(this._lockerId, LockManagerOperation.TASKBAR_CLICK);
|
|
119755
|
+
};
|
|
119756
|
+
options.onCellEditingStopped = () => {
|
|
119757
|
+
var _a;
|
|
119758
|
+
(_a = this._currentEditLock) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
119759
|
+
};
|
|
119727
119760
|
options.onCellKeyDown = evt => {
|
|
119728
119761
|
if (evt.event && evt["column"]) {
|
|
119729
119762
|
this.onCellKeyDown(evt);
|
|
119730
119763
|
}
|
|
119731
119764
|
};
|
|
119765
|
+
options.isRowSelectable = (node) => this.isSelectableRow(node);
|
|
119766
|
+
options.onCellFocused = () => this.lockFocusWhenAddRow();
|
|
119732
119767
|
return options;
|
|
119733
119768
|
}
|
|
119734
119769
|
updateCurrentEditorGuiValue(updatedRowValue) {
|
|
@@ -119741,37 +119776,82 @@ class GridEditionManager {
|
|
|
119741
119776
|
const value = updatedRowValue[fieldName];
|
|
119742
119777
|
currentEditor.setGuiValue(value);
|
|
119743
119778
|
}
|
|
119779
|
+
lockFocusWhenAddRow() {
|
|
119780
|
+
var _a, _b, _c, _d;
|
|
119781
|
+
const api = this._gridOptions.api;
|
|
119782
|
+
const newFocusCell = api.getFocusedCell();
|
|
119783
|
+
const rowIndex = newFocusCell === null || newFocusCell === void 0 ? void 0 : newFocusCell.rowIndex;
|
|
119784
|
+
const recordId = (_b = (_a = this._dataUnit.getAddedRecords()) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.__record__id__;
|
|
119785
|
+
const rowNode = api.getRowNode(recordId);
|
|
119786
|
+
if (!this._dataUnit.hasNewRecord() || rowIndex == (rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex)) {
|
|
119787
|
+
return;
|
|
119788
|
+
}
|
|
119789
|
+
const lastCell = (_d = (_c = this._lastCellOpened) !== null && _c !== void 0 ? _c : this._lastCellEdited) !== null && _d !== void 0 ? _d : this._lastCellClicked;
|
|
119790
|
+
if ((lastCell === null || lastCell === void 0 ? void 0 : lastCell.rowIndex) < (rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex)) {
|
|
119791
|
+
return;
|
|
119792
|
+
}
|
|
119793
|
+
api.clearFocusedCell();
|
|
119794
|
+
if (!lastCell || (rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex) == undefined) {
|
|
119795
|
+
return;
|
|
119796
|
+
}
|
|
119797
|
+
lastCell.rowIndex = rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex;
|
|
119798
|
+
this.focusOnCell(lastCell);
|
|
119799
|
+
}
|
|
119800
|
+
handleCellEditingStartedRowAdd(evt) {
|
|
119801
|
+
var _a, _b, _c, _d, _e;
|
|
119802
|
+
const nodeId = (_a = evt.node) === null || _a === void 0 ? void 0 : _a.id;
|
|
119803
|
+
const addedRecordId = (_c = (_b = this._dataUnit.getAddedRecords()) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.__record__id__;
|
|
119804
|
+
if (nodeId == addedRecordId) {
|
|
119805
|
+
this._lastCellOpened = this._lastCellEdited = { rowIndex: evt.rowIndex, column: evt === null || evt === void 0 ? void 0 : evt.column, rowPinned: undefined };
|
|
119806
|
+
return;
|
|
119807
|
+
}
|
|
119808
|
+
evt.api.stopEditing();
|
|
119809
|
+
const rowIndex = (_d = evt.api.getRowNode(addedRecordId)) === null || _d === void 0 ? void 0 : _d.rowIndex;
|
|
119810
|
+
this._lastCellOpened = this._lastCellEdited = { rowIndex: rowIndex, column: (_e = this._lastCellEdited) === null || _e === void 0 ? void 0 : _e.column, rowPinned: undefined };
|
|
119811
|
+
}
|
|
119812
|
+
isSelectableRow(node) {
|
|
119813
|
+
if (!this._dataUnit.hasNewRecord()) {
|
|
119814
|
+
return true;
|
|
119815
|
+
}
|
|
119816
|
+
if (!this._dataUnit.isNewRecord(node.id)) {
|
|
119817
|
+
return false;
|
|
119818
|
+
}
|
|
119819
|
+
return true;
|
|
119820
|
+
}
|
|
119744
119821
|
canContinuousInsert() {
|
|
119745
119822
|
var _a;
|
|
119746
119823
|
return this._enableContinuousInsert && (this._dataUnit.records.length - 1) === ((_a = this._lastCellEdited) === null || _a === void 0 ? void 0 : _a.rowIndex);
|
|
119747
119824
|
}
|
|
119748
|
-
proceedAutoSave() {
|
|
119825
|
+
async proceedAutoSave() {
|
|
119749
119826
|
if (!this._dataUnit.isDirty()) {
|
|
119750
119827
|
this.saveSuccess();
|
|
119751
|
-
return;
|
|
119828
|
+
return true;
|
|
119752
119829
|
}
|
|
119753
|
-
|
|
119754
|
-
|
|
119830
|
+
const currentRecord = this._dataUnit.getSelectedRecord();
|
|
119831
|
+
if (currentRecord == undefined) {
|
|
119832
|
+
return true;
|
|
119755
119833
|
}
|
|
119756
|
-
|
|
119757
|
-
|
|
119758
|
-
|
|
119834
|
+
this.clearInvalidCells(false);
|
|
119835
|
+
try {
|
|
119836
|
+
await this._recordValidationProcessor.validate(true);
|
|
119837
|
+
await this.saveDataUnit();
|
|
119838
|
+
this.saveSuccess();
|
|
119839
|
+
return true;
|
|
119840
|
+
}
|
|
119841
|
+
catch (reason) {
|
|
119842
|
+
this.saveFail(reason);
|
|
119843
|
+
return false;
|
|
119759
119844
|
}
|
|
119760
|
-
|
|
119761
|
-
|
|
119762
|
-
|
|
119763
|
-
|
|
119764
|
-
this._dataUnit.saveData()
|
|
119765
|
-
.then(() => this.saveSuccess())
|
|
119766
|
-
.catch(reason => this.saveFail(reason));
|
|
119767
|
-
})
|
|
119768
|
-
.catch(reason => this.saveFail(reason));
|
|
119845
|
+
}
|
|
119846
|
+
async saveDataUnit() {
|
|
119847
|
+
await this._dataUnit.saveData();
|
|
119848
|
+
return true;
|
|
119769
119849
|
}
|
|
119770
119850
|
async recordValidate() {
|
|
119771
119851
|
if (!this._dataUnit.isDirty())
|
|
119772
119852
|
return;
|
|
119773
119853
|
try {
|
|
119774
|
-
this.
|
|
119854
|
+
this.clearInvalidCells(false);
|
|
119775
119855
|
await this._recordValidationProcessor.validate(false);
|
|
119776
119856
|
}
|
|
119777
119857
|
catch (error) { }
|
|
@@ -119799,6 +119879,13 @@ class GridEditionManager {
|
|
|
119799
119879
|
return { ezCellEditor: EzCellEditor };
|
|
119800
119880
|
}
|
|
119801
119881
|
verifyClickToEdition(api, cellClicked) {
|
|
119882
|
+
var _a, _b;
|
|
119883
|
+
const selectedRecordID = (_a = this._dataUnit.getSelectedRecord()) === null || _a === void 0 ? void 0 : _a.__record__id__;
|
|
119884
|
+
if (this._dataUnit.hasNewRecord() && selectedRecordID) {
|
|
119885
|
+
const dataUnitRecordIndex = (_b = api.getRowNode(selectedRecordID)) === null || _b === void 0 ? void 0 : _b.rowIndex;
|
|
119886
|
+
if (dataUnitRecordIndex != cellClicked.rowIndex)
|
|
119887
|
+
return;
|
|
119888
|
+
}
|
|
119802
119889
|
if (this.isSecondClick(cellClicked)) {
|
|
119803
119890
|
api.startEditingCell({ rowIndex: cellClicked.rowIndex, colKey: cellClicked.column.getColId() });
|
|
119804
119891
|
}
|
|
@@ -119808,6 +119895,9 @@ class GridEditionManager {
|
|
|
119808
119895
|
col.cellEditor = 'ezCellEditor';
|
|
119809
119896
|
col.editable = params => this.canEdit(params);
|
|
119810
119897
|
col.suppressKeyboardEvent = (params) => {
|
|
119898
|
+
if (params.event.key === KeyCode.ESCAPE && params.editing) {
|
|
119899
|
+
return this._dataUnit.isDirty();
|
|
119900
|
+
}
|
|
119811
119901
|
return params.event.key === KeyCode.ENTER;
|
|
119812
119902
|
};
|
|
119813
119903
|
col.cellEditorSelector = (params) => {
|
|
@@ -119837,10 +119927,21 @@ class GridEditionManager {
|
|
|
119837
119927
|
return col;
|
|
119838
119928
|
}
|
|
119839
119929
|
getRequiredFields() {
|
|
119840
|
-
|
|
119841
|
-
|
|
119842
|
-
|
|
119843
|
-
|
|
119930
|
+
const formRequiredFields = this.getFormRequiredFields();
|
|
119931
|
+
return this._gridOptions.columnApi.getAllDisplayedColumns()
|
|
119932
|
+
.filter(column => {
|
|
119933
|
+
const fieldDefinition = this._dataUnit.getField(column.getColId());
|
|
119934
|
+
return (fieldDefinition && fieldDefinition.required) || formRequiredFields.includes(column.getColId());
|
|
119935
|
+
})
|
|
119936
|
+
.map(column => column.getColId());
|
|
119937
|
+
}
|
|
119938
|
+
getFormRequiredFields() {
|
|
119939
|
+
const formRequiredFields = [];
|
|
119940
|
+
const dataBinders = DataBinder.getDataBindersByDataUnit(this._dataUnit);
|
|
119941
|
+
dataBinders.forEach(dataBinder => {
|
|
119942
|
+
formRequiredFields.push(...dataBinder.getFormRequiredFields());
|
|
119943
|
+
});
|
|
119944
|
+
return formRequiredFields;
|
|
119844
119945
|
}
|
|
119845
119946
|
saveSuccess() {
|
|
119846
119947
|
var _a;
|
|
@@ -119853,10 +119954,11 @@ class GridEditionManager {
|
|
|
119853
119954
|
this._isGridEdition = false;
|
|
119854
119955
|
}
|
|
119855
119956
|
saveFail(reason) {
|
|
119856
|
-
|
|
119957
|
+
var _a;
|
|
119958
|
+
this.focusOnCell((_a = this._lastCellOpened) !== null && _a !== void 0 ? _a : this._lastCellEdited);
|
|
119857
119959
|
this._isGridEdition = false;
|
|
119858
119960
|
if (reason) {
|
|
119859
|
-
|
|
119961
|
+
throw reason;
|
|
119860
119962
|
}
|
|
119861
119963
|
}
|
|
119862
119964
|
focusOnCell(cell) {
|
|
@@ -119921,6 +120023,9 @@ class GridEditionManager {
|
|
|
119921
120023
|
this.moveEditionVertically(api, 1);
|
|
119922
120024
|
}
|
|
119923
120025
|
moveEditionVertically(api, offset) {
|
|
120026
|
+
if (this._dataUnit.hasNewRecord() && this._isGridEdition) {
|
|
120027
|
+
return;
|
|
120028
|
+
}
|
|
119924
120029
|
const editionCell = api.getEditingCells()[0];
|
|
119925
120030
|
if (!editionCell) {
|
|
119926
120031
|
return;
|
|
@@ -119965,41 +120070,66 @@ class GridEditionManager {
|
|
|
119965
120070
|
return true;
|
|
119966
120071
|
}
|
|
119967
120072
|
onCellEditRequest(event) {
|
|
119968
|
-
|
|
120073
|
+
var _a;
|
|
119969
120074
|
const value = event.newValue;
|
|
119970
|
-
if (event.oldValue
|
|
119971
|
-
|
|
119972
|
-
|
|
119973
|
-
|
|
119974
|
-
|
|
119975
|
-
|
|
119976
|
-
|
|
119977
|
-
|
|
119978
|
-
|
|
120075
|
+
if (event.oldValue == value) {
|
|
120076
|
+
(_a = this._currentEditLock) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
120077
|
+
return;
|
|
120078
|
+
}
|
|
120079
|
+
if (value instanceof Promise) {
|
|
120080
|
+
this.handlePromiseValue(event, value);
|
|
120081
|
+
return;
|
|
120082
|
+
}
|
|
120083
|
+
this.updateCellValue(event, value);
|
|
120084
|
+
}
|
|
120085
|
+
async handlePromiseValue(event, value) {
|
|
120086
|
+
const fieldName = event.colDef.field;
|
|
120087
|
+
const fieldDescriptor = this._dataUnit.getField(event.colDef.colId);
|
|
120088
|
+
const initialValue = (fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.userInterface) === UserInterface.SEARCH ? value : event.oldValue;
|
|
120089
|
+
event.node.setData(Object.assign(Object.assign({}, event.data), { [fieldName]: initialValue }));
|
|
120090
|
+
const resolved = await value;
|
|
120091
|
+
return this.updateCellValue(event, resolved);
|
|
120092
|
+
}
|
|
120093
|
+
updateCellValue(event, newValue) {
|
|
120094
|
+
var _a;
|
|
120095
|
+
const fieldName = event.colDef.field;
|
|
120096
|
+
event.node.setData(Object.assign(Object.assign({}, event.data), { [fieldName]: newValue }));
|
|
120097
|
+
(_a = this._currentEditLock) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
120098
|
+
if (event.oldValue !== newValue) {
|
|
119979
120099
|
this._isGridEdition = true;
|
|
119980
|
-
this._dataUnit.setFieldValue(fieldName,
|
|
120100
|
+
this._dataUnit.setFieldValue(fieldName, newValue, [event.data.__record__id__], { suppressCreateNewRecord: true });
|
|
119981
120101
|
this._lastCellEdited = { rowIndex: event.rowIndex, column: event.column, rowPinned: undefined };
|
|
119982
120102
|
}
|
|
119983
120103
|
}
|
|
119984
120104
|
setCellEditors(customEditors) {
|
|
120105
|
+
var _a, _b;
|
|
119985
120106
|
this._customEditors = customEditors;
|
|
120107
|
+
if (!customEditors.has((_b = (_a = this._lastCellOpened) === null || _a === void 0 ? void 0 : _a.column) === null || _b === void 0 ? void 0 : _b.getColId()))
|
|
120108
|
+
return;
|
|
120109
|
+
this._gridOptions.api.stopEditing();
|
|
120110
|
+
window.requestAnimationFrame(() => this.focusOnCell(this._lastCellOpened));
|
|
119986
120111
|
}
|
|
119987
120112
|
setCellRenders(customRenders) {
|
|
119988
120113
|
this._customRenders = customRenders;
|
|
119989
120114
|
}
|
|
119990
|
-
|
|
119991
|
-
this.
|
|
120115
|
+
pushInvalidCell(invalidField, recordId) {
|
|
120116
|
+
this._invalidCells.push({ field: invalidField, recordId });
|
|
120117
|
+
this._nextInvalidCell = this._invalidCells[0];
|
|
119992
120118
|
}
|
|
119993
|
-
|
|
119994
|
-
return this.
|
|
120119
|
+
getInvalidCells() {
|
|
120120
|
+
return this._invalidCells;
|
|
119995
120121
|
}
|
|
119996
|
-
|
|
120122
|
+
getNextInvalidCell() {
|
|
120123
|
+
return this._nextInvalidCell;
|
|
120124
|
+
}
|
|
120125
|
+
async processContinuousInsert() {
|
|
119997
120126
|
if (!this.canContinuousInsert())
|
|
119998
120127
|
return;
|
|
119999
120128
|
this._dataUnit.addRecord();
|
|
120000
120129
|
}
|
|
120001
120130
|
clearInvalidCells(stopEdition) {
|
|
120002
|
-
this.
|
|
120131
|
+
this._invalidCells = [];
|
|
120132
|
+
this._nextInvalidCell = undefined;
|
|
120003
120133
|
if (stopEdition) {
|
|
120004
120134
|
this._isGridEdition = false;
|
|
120005
120135
|
}
|
|
@@ -120010,10 +120140,17 @@ class GridEditionManager {
|
|
|
120010
120140
|
hasInvalidField(fieldName, recordId) {
|
|
120011
120141
|
if (!this.hasInvalidCell())
|
|
120012
120142
|
return false;
|
|
120013
|
-
|
|
120143
|
+
this._nextInvalidCell = this._invalidCells[0];
|
|
120144
|
+
const containsFieldName = this._nextInvalidCell.field.name === fieldName;
|
|
120145
|
+
const containsRecordId = this._nextInvalidCell.recordId === recordId;
|
|
120146
|
+
return containsFieldName && containsRecordId;
|
|
120014
120147
|
}
|
|
120015
120148
|
hasInvalidCell() {
|
|
120016
|
-
|
|
120149
|
+
var _a, _b, _c;
|
|
120150
|
+
const hasInvalidCell = ((_a = this._invalidCells) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
120151
|
+
const hasField = (_b = this._invalidCells) === null || _b === void 0 ? void 0 : _b.filter(invalidCell => { });
|
|
120152
|
+
const hasRecordId = (_c = this._invalidCells) === null || _c === void 0 ? void 0 : _c.filter(invalidCell => { });
|
|
120153
|
+
if (!hasInvalidCell || !hasField || !hasRecordId)
|
|
120017
120154
|
return false;
|
|
120018
120155
|
return true;
|
|
120019
120156
|
}
|
|
@@ -120140,6 +120277,7 @@ class AgGridController {
|
|
|
120140
120277
|
var _a;
|
|
120141
120278
|
this._options = options;
|
|
120142
120279
|
this._container = container;
|
|
120280
|
+
const lockerId = options.enableLockManger ? LockManager.addLockManagerCtxId(this._container) : null;
|
|
120143
120281
|
if (this._grid === undefined) {
|
|
120144
120282
|
LicenseManager.setLicenseKey(ApplicationContext.getContextValue('__EZUI__GRID_LICENSE__'));
|
|
120145
120283
|
this._columnStateChangeCallback = options.onColumnStateChange;
|
|
@@ -120147,7 +120285,7 @@ class AgGridController {
|
|
|
120147
120285
|
this._doubleClickCallBack = options.onDoubleClick;
|
|
120148
120286
|
this._multipleSelection = options.allowMultipleSelection;
|
|
120149
120287
|
this._dataUnit = options.dataUnit;
|
|
120150
|
-
this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled, options.customEditors || this._customEditors, options.customRenders || this._customRenders, options.enableContinuousInsert, options.enableGridInsert);
|
|
120288
|
+
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);
|
|
120151
120289
|
this._statusResolver = options.statusResolver;
|
|
120152
120290
|
if (this._dataUnit) {
|
|
120153
120291
|
this._dataUnit.sortingProvider = this;
|
|
@@ -120510,7 +120648,7 @@ class AgGridController {
|
|
|
120510
120648
|
r.setData(data);
|
|
120511
120649
|
});
|
|
120512
120650
|
this._gridOptions.api.refreshCells({ force: true });
|
|
120513
|
-
const invalidCell = this._editionManager.
|
|
120651
|
+
const invalidCell = this._editionManager.getNextInvalidCell();
|
|
120514
120652
|
if (invalidCell) {
|
|
120515
120653
|
const rowNode = this._gridOptions.api.getRowNode(invalidCell.recordId);
|
|
120516
120654
|
if (rowNode && invalidCell.field) {
|
|
@@ -120530,6 +120668,7 @@ class AgGridController {
|
|
|
120530
120668
|
if (this._grid === undefined) {
|
|
120531
120669
|
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
120532
120670
|
}
|
|
120671
|
+
this._gridOptions.api.clearRangeSelection();
|
|
120533
120672
|
this._gridOptions.api.refreshServerSide({ purge: true });
|
|
120534
120673
|
this._options.onRefresh();
|
|
120535
120674
|
if (scrollToSelectedRow)
|
|
@@ -120552,12 +120691,15 @@ class AgGridController {
|
|
|
120552
120691
|
}
|
|
120553
120692
|
setFocus() {
|
|
120554
120693
|
var _a, _b;
|
|
120555
|
-
if ((_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.length) {
|
|
120556
|
-
this.setFocusFirstRow();
|
|
120557
|
-
}
|
|
120558
|
-
else {
|
|
120694
|
+
if (!((_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
120559
120695
|
this.focusOnGridContainer();
|
|
120696
|
+
return;
|
|
120697
|
+
}
|
|
120698
|
+
if (!this._dataUnit.getSelectedRecord()) {
|
|
120699
|
+
this.setFocusFirstRow();
|
|
120700
|
+
return;
|
|
120560
120701
|
}
|
|
120702
|
+
this.syncSelectWithDataUnit();
|
|
120561
120703
|
}
|
|
120562
120704
|
setAutoFocus(autoFocus) {
|
|
120563
120705
|
var _a;
|
|
@@ -120601,6 +120743,23 @@ class AgGridController {
|
|
|
120601
120743
|
this.startEditionOnRowByIndex(newRowIndex);
|
|
120602
120744
|
}
|
|
120603
120745
|
}
|
|
120746
|
+
syncSelectWithDataUnit() {
|
|
120747
|
+
const rowNode = this._gridOptions.api.getRowNode(this._dataUnit.getSelectedRecord().__record__id__);
|
|
120748
|
+
if ((rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex) < 0)
|
|
120749
|
+
return;
|
|
120750
|
+
const rowRange = this._gridOptions.api.getCellRanges().find(row => row.startRow.rowIndex === rowNode.rowIndex);
|
|
120751
|
+
if ((rowRange === null || rowRange === void 0 ? void 0 : rowRange.columns.length) > 0) {
|
|
120752
|
+
if (this._dataUnit.hasNewRecord()) {
|
|
120753
|
+
this.startEdition(rowNode.rowIndex, rowRange.columns[0]);
|
|
120754
|
+
return;
|
|
120755
|
+
}
|
|
120756
|
+
this.focusByCollAndRow(rowRange.columns[0], rowNode.rowIndex);
|
|
120757
|
+
this._gridOptions.api.addCellRange({ rowStartIndex: rowNode.rowIndex, rowEndIndex: rowNode.rowIndex, columns: rowRange.columns });
|
|
120758
|
+
return;
|
|
120759
|
+
}
|
|
120760
|
+
this._gridOptions.api.clearRangeSelection();
|
|
120761
|
+
this.setFocusOnRow(rowNode.rowIndex);
|
|
120762
|
+
}
|
|
120604
120763
|
startEdition(rowIndex, firstCol) {
|
|
120605
120764
|
this._gridOptions.api.clearRangeSelection();
|
|
120606
120765
|
this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [firstCol] });
|
|
@@ -120631,6 +120790,7 @@ class AgGridController {
|
|
|
120631
120790
|
let displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
|
|
120632
120791
|
let firstColl = displayedColumns.find(column => column.getColDef().headerName !== '');
|
|
120633
120792
|
this.focusByCollAndRow(firstColl, rowIndex);
|
|
120793
|
+
this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [firstColl] });
|
|
120634
120794
|
}
|
|
120635
120795
|
focusByCollAndRow(firstCell, rowIndex) {
|
|
120636
120796
|
this._gridOptions.api.ensureColumnVisible(firstCell);
|
|
@@ -120670,6 +120830,14 @@ class AgGridController {
|
|
|
120670
120830
|
this._gridOptions.api.setColumnDefs(this._colDefs);
|
|
120671
120831
|
}
|
|
120672
120832
|
}
|
|
120833
|
+
hideSelectionColumn() {
|
|
120834
|
+
var _a, _b;
|
|
120835
|
+
(_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);
|
|
120836
|
+
}
|
|
120837
|
+
showSelectionColumn() {
|
|
120838
|
+
var _a, _b;
|
|
120839
|
+
(_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);
|
|
120840
|
+
}
|
|
120673
120841
|
getColumnsDef() {
|
|
120674
120842
|
if (this._grid === undefined) {
|
|
120675
120843
|
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
@@ -120954,18 +121122,24 @@ class AgGridController {
|
|
|
120954
121122
|
return false;
|
|
120955
121123
|
}
|
|
120956
121124
|
onSelectionChange(event) {
|
|
121125
|
+
var _a, _b;
|
|
121126
|
+
const selectedRowId = (_b = (_a = event.api.getSelectedNodes()) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id;
|
|
121127
|
+
const isNewRecord = this._dataUnit.isNewRecord(selectedRowId);
|
|
120957
121128
|
if (!this._selectionChangeCallback)
|
|
120958
121129
|
return;
|
|
120959
121130
|
clearTimeout(this._selectionChangeDeboucing);
|
|
120960
|
-
this._selectionChangeDeboucing = window.setTimeout(() => {
|
|
120961
|
-
this.handleExecuteProceedAutosave();
|
|
121131
|
+
this._selectionChangeDeboucing = window.setTimeout(async () => {
|
|
121132
|
+
const saveSuccess = (!isNewRecord && selectedRowId) ? await this.handleExecuteProceedAutosave() : true;
|
|
121133
|
+
if (!saveSuccess)
|
|
121134
|
+
return;
|
|
120962
121135
|
this.processBuildSelectionChangeCallback(event);
|
|
120963
121136
|
}, 0);
|
|
120964
121137
|
}
|
|
120965
|
-
handleExecuteProceedAutosave() {
|
|
121138
|
+
async handleExecuteProceedAutosave() {
|
|
120966
121139
|
if (this._gridShowDom) {
|
|
120967
|
-
this._editionManager.proceedAutoSave();
|
|
121140
|
+
return await this._editionManager.proceedAutoSave();
|
|
120968
121141
|
}
|
|
121142
|
+
return true;
|
|
120969
121143
|
}
|
|
120970
121144
|
processBuildSelectionChangeCallback(event) {
|
|
120971
121145
|
if (this._dataUnit) {
|
|
@@ -120990,7 +121164,7 @@ class AgGridController {
|
|
|
120990
121164
|
});
|
|
120991
121165
|
}
|
|
120992
121166
|
onRowDoubleClick(evt) {
|
|
120993
|
-
if (this._doubleClickCallBack) {
|
|
121167
|
+
if (this._doubleClickCallBack && (!this._options.enableGridInsert || !this._dataUnit.hasNewRecord())) {
|
|
120994
121168
|
this._doubleClickCallBack(evt.data);
|
|
120995
121169
|
}
|
|
120996
121170
|
}
|
|
@@ -121006,13 +121180,11 @@ class AgGridController {
|
|
|
121006
121180
|
}
|
|
121007
121181
|
}
|
|
121008
121182
|
setCellEditors(customEditors) {
|
|
121009
|
-
var _a;
|
|
121010
121183
|
if (!this._editionManager) {
|
|
121011
121184
|
this._customEditors = customEditors;
|
|
121012
121185
|
return;
|
|
121013
121186
|
}
|
|
121014
121187
|
this._editionManager.setCellEditors(customEditors);
|
|
121015
|
-
(_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api.redrawRows();
|
|
121016
121188
|
}
|
|
121017
121189
|
setCellRenders(customRenders) {
|
|
121018
121190
|
var _a;
|
|
@@ -121035,6 +121207,9 @@ class AgGridController {
|
|
|
121035
121207
|
destroy() {
|
|
121036
121208
|
this.observer.disconnect();
|
|
121037
121209
|
}
|
|
121210
|
+
stopEdit() {
|
|
121211
|
+
this._gridOptions.api.stopEditing();
|
|
121212
|
+
}
|
|
121038
121213
|
}
|
|
121039
121214
|
|
|
121040
121215
|
function enableSelectAll(total) {
|
|
@@ -121284,6 +121459,7 @@ const EzGrid = class {
|
|
|
121284
121459
|
this.paginationCounterMode = 'show';
|
|
121285
121460
|
this.enableGridInsert = false;
|
|
121286
121461
|
this.enableContinuousInsert = true;
|
|
121462
|
+
this.enableLockManger = true;
|
|
121287
121463
|
}
|
|
121288
121464
|
/**
|
|
121289
121465
|
* Aplica a definição de colunas.
|
|
@@ -121408,6 +121584,18 @@ const EzGrid = class {
|
|
|
121408
121584
|
async setFocus() {
|
|
121409
121585
|
this._gridController.setFocus();
|
|
121410
121586
|
}
|
|
121587
|
+
/**
|
|
121588
|
+
* Para a edição da grade.
|
|
121589
|
+
*/
|
|
121590
|
+
async stopEdit() {
|
|
121591
|
+
this._gridController.stopEdit();
|
|
121592
|
+
}
|
|
121593
|
+
async checkStopEditOutsideClick(event) {
|
|
121594
|
+
var _a;
|
|
121595
|
+
if ((_a = this._container) === null || _a === void 0 ? void 0 : _a.contains(event.target))
|
|
121596
|
+
return;
|
|
121597
|
+
this._gridController.stopEdit();
|
|
121598
|
+
}
|
|
121411
121599
|
observeConfig(config) {
|
|
121412
121600
|
this._gridController.setColumnsState(config === null || config === void 0 ? void 0 : config.columns);
|
|
121413
121601
|
}
|
|
@@ -121433,6 +121621,9 @@ const EzGrid = class {
|
|
|
121433
121621
|
this.setSelection(this.dataUnit.getSelectionInfo());
|
|
121434
121622
|
}
|
|
121435
121623
|
}
|
|
121624
|
+
async handleClick(event) {
|
|
121625
|
+
this.checkStopEditOutsideClick(event);
|
|
121626
|
+
}
|
|
121436
121627
|
setSelection(selectionInfo) {
|
|
121437
121628
|
var _a;
|
|
121438
121629
|
this._selectionCount = (_a = selectionInfo === null || selectionInfo === void 0 ? void 0 : selectionInfo.length) !== null && _a !== void 0 ? _a : 0;
|
|
@@ -121629,7 +121820,8 @@ const EzGrid = class {
|
|
|
121629
121820
|
if (this.dataUnit) {
|
|
121630
121821
|
this.setSelection(this.dataUnit.getSelectionInfo());
|
|
121631
121822
|
}
|
|
121632
|
-
}
|
|
121823
|
+
},
|
|
121824
|
+
enableLockManger: this.enableLockManger
|
|
121633
121825
|
});
|
|
121634
121826
|
if (this.config) {
|
|
121635
121827
|
this.observeConfig(this.config);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-5a720e56.js';
|
|
2
2
|
import { ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
import { E as EzScrollDirection } from './EzScrollDirection-2df26c93.js';
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-5a720e56.js';
|
|
2
2
|
import { StringUtils, ElementIDUtils } from '@sankhyalabs/core';
|
|
3
3
|
|
|
4
4
|
const ezIconCss = ":host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{color:var(--ez-icon--color)}[class^=\"ez-icon-\"],[class*=\" ez-icon-\"]{font-family:'ez-icons' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-2chevron-down:before{content:\"\\ea01\"}.ez-icon-2chevron-up:before{content:\"\\ea02\"}.ez-icon-acao:before{content:\"\\ea03\"}.ez-icon-account-outline:before{content:\"\\ea04\"}.ez-icon-account:before{content:\"\\ea05\"}.ez-icon-alert-circle-inverted:before{content:\"\\ea06\"}.ez-icon-alert-circle:before{content:\"\\ea07\"}.ez-icon-alert-mail:before{content:\"\\ea08\"}.ez-icon-alert-popup:before{content:\"\\ea09\"}.ez-icon-anexo:before{content:\"\\ea0a\"}.ez-icon-antecipacao:before{content:\"\\ea0b\"}.ez-icon-apps:before{content:\"\\ea0c\"}.ez-icon-arrow-forward:before{content:\"\\ea0d\"}.ez-icon-arrow-upward:before{content:\"\\ea0e\"}.ez-icon-arrow_back:before{content:\"\\ea0f\"}.ez-icon-arrow_downward:before{content:\"\\ea10\"}.ez-icon-baixa:before{content:\"\\ea11\"}.ez-icon-balance:before{content:\"\\ea12\"}.ez-icon-bell-inverted:before{content:\"\\ea13\"}.ez-icon-bell:before{content:\"\\ea14\"}.ez-icon-boleto:before{content:\"\\ea15\"}.ez-icon-boolean:before{content:\"\\ea16\"}.ez-icon-business-center:before{content:\"\\ea17\"}.ez-icon-calendar-clock:before{content:\"\\ea18\"}.ez-icon-calendar:before{content:\"\\ea19\"}.ez-icon-cash-remove:before{content:\"\\ea1a\"}.ez-icon-check-circle-inverted:before{content:\"\\ea1b\"}.ez-icon-check-circle:before{content:\"\\ea1c\"}.ez-icon-check:before{content:\"\\ea1d\"}.ez-icon-chevron-down:before{content:\"\\ea1e\"}.ez-icon-chevron-left:before{content:\"\\ea1f\"}.ez-icon-chevron-right:before{content:\"\\ea20\"}.ez-icon-chevron-up:before{content:\"\\ea21\"}.ez-icon-circle--medium:before{content:\"\\ea22\"}.ez-icon-circle:before{content:\"\\ea23\"}.ez-icon-cleaning:before{content:\"\\ea24\"}.ez-icon-clipboard:before{content:\"\\ea25\"}.ez-icon-clock-rotate-left:before{content:\"\\ea26\"}.ez-icon-close:before{content:\"\\ea27\"}.ez-icon-cobrar:before{content:\"\\ea28\"}.ez-icon-code:before{content:\"\\ea29\"}.ez-icon-configuration:before{content:\"\\ea2a\"}.ez-icon-content-cut:before{content:\"\\ea2b\"}.ez-icon-copy:before{content:\"\\ea2c\"}.ez-icon-credit_card:before{content:\"\\ea2d\"}.ez-icon-crop:before{content:\"\\ea2e\"}.ez-icon-custom:before{content:\"\\ea2f\"}.ez-icon-delete-file:before{content:\"\\ea30\"}.ez-icon-delete:before{content:\"\\ea31\"}.ez-icon-description:before{content:\"\\ea32\"}.ez-icon-dividir:before{content:\"\\ea33\"}.ez-icon-docx:before{content:\"\\ea34\"}.ez-icon-dot-notification:before{content:\"\\ea35\"}.ez-icon-dots-horizontal:before{content:\"\\ea36\"}.ez-icon-dots-vertical:before{content:\"\\ea37\"}.ez-icon-drag-indicator:before{content:\"\\ea38\"}.ez-icon-dual-chevron-down:before{content:\"\\ea39\"}.ez-icon-dual-chevron-left:before{content:\"\\ea3a\"}.ez-icon-dual-chevron-right:before{content:\"\\ea3b\"}.ez-icon-dual-chevron-up:before{content:\"\\ea3c\"}.ez-icon-edit-file:before{content:\"\\ea3d\"}.ez-icon-edit-table:before{content:\"\\ea3e\"}.ez-icon-edit-time:before{content:\"\\ea3f\"}.ez-icon-edit-value:before{content:\"\\ea40\"}.ez-icon-edit:before{content:\"\\ea41\"}.ez-icon-email:before{content:\"\\ea42\"}.ez-icon-estorno:before{content:\"\\ea43\"}.ez-icon-exe:before{content:\"\\ea44\"}.ez-icon-expand:before{content:\"\\ea45\"}.ez-icon-expandir_card:before{content:\"\\ea46\"}.ez-icon-extrato:before{content:\"\\ea47\"}.ez-icon-eye-off:before{content:\"\\ea48\"}.ez-icon-eye:before{content:\"\\ea49\"}.ez-icon-favorite:before{content:\"\\ea4a\"}.ez-icon-figma:before{content:\"\\ea4b\"}.ez-icon-file-download:before{content:\"\\ea4c\"}.ez-icon-file-upload:before{content:\"\\ea4d\"}.ez-icon-filter:before{content:\"\\ea4e\"}.ez-icon-find-file:before{content:\"\\ea4f\"}.ez-icon-find-page:before{content:\"\\ea50\"}.ez-icon-format-color-fill:before{content:\"\\ea51\"}.ez-icon-generic:before{content:\"\\ea52\"}.ez-icon-gif:before{content:\"\\ea53\"}.ez-icon-graph_bar:before{content:\"\\ea54\"}.ez-icon-handshake:before{content:\"\\ea55\"}.ez-icon-help-inverted:before{content:\"\\ea56\"}.ez-icon-help:before{content:\"\\ea57\"}.ez-icon-hide_menu:before{content:\"\\ea58\"}.ez-icon-home:before{content:\"\\ea59\"}.ez-icon-icons104:before{content:\"\\ea5a\"}.ez-icon-language:before{content:\"\\ea5b\"}.ez-icon-launch:before{content:\"\\ea5c\"}.ez-icon-lightbulb:before{content:\"\\ea5d\"}.ez-icon-list:before{content:\"\\ea5e\"}.ez-icon-location:before{content:\"\\ea5f\"}.ez-icon-lock-outline:before{content:\"\\ea60\"}.ez-icon-lock:before{content:\"\\ea61\"}.ez-icon-menu:before{content:\"\\ea62\"}.ez-icon-mid:before{content:\"\\ea63\"}.ez-icon-minus:before{content:\"\\ea64\"}.ez-icon-money-off:before{content:\"\\ea65\"}.ez-icon-money:before{content:\"\\ea66\"}.ez-icon-more:before{content:\"\\ea67\"}.ez-icon-mp3:before{content:\"\\ea68\"}.ez-icon-mp4:before{content:\"\\ea69\"}.ez-icon-multiple-files:before{content:\"\\ea6a\"}.ez-icon-north-west:before{content:\"\\ea6b\"}.ez-icon-number:before{content:\"\\ea6c\"}.ez-icon-ordem-ascendente:before{content:\"\\ea6d\"}.ez-icon-ordem-descendente:before{content:\"\\ea6e\"}.ez-icon-parcelar:before{content:\"\\ea6f\"}.ez-icon-pause:before{content:\"\\ea70\"}.ez-icon-payments:before{content:\"\\ea71\"}.ez-icon-pdf:before{content:\"\\ea72\"}.ez-icon-play:before{content:\"\\ea73\"}.ez-icon-plus:before{content:\"\\ea74\"}.ez-icon-png:before{content:\"\\ea75\"}.ez-icon-power:before{content:\"\\ea76\"}.ez-icon-pptx:before{content:\"\\ea77\"}.ez-icon-preview:before{content:\"\\ea78\"}.ez-icon-print:before{content:\"\\ea79\"}.ez-icon-push-pin:before{content:\"\\ea7a\"}.ez-icon-rateio:before{content:\"\\ea7b\"}.ez-icon-receipt:before{content:\"\\ea7c\"}.ez-icon-recolher_card:before{content:\"\\ea7d\"}.ez-icon-restore:before{content:\"\\ea7e\"}.ez-icon-return:before{content:\"\\ea7f\"}.ez-icon-sankhya-place:before{content:\"\\ea80\"}.ez-icon-save:before{content:\"\\ea81\"}.ez-icon-search:before{content:\"\\ea82\"}.ez-icon-settings-inverted:before{content:\"\\ea83\"}.ez-icon-settings:before{content:\"\\ea84\"}.ez-icon-share:before{content:\"\\ea85\"}.ez-icon-shield:before{content:\"\\ea86\"}.ez-icon-show_menu:before{content:\"\\ea87\"}.ez-icon-south-east:before{content:\"\\ea88\"}.ez-icon-sync:before{content:\"\\ea89\"}.ez-icon-table:before{content:\"\\ea8a\"}.ez-icon-tag_code:before{content:\"\\ea8b\"}.ez-icon-text:before{content:\"\\ea8c\"}.ez-icon-timeline:before{content:\"\\ea8d\"}.ez-icon-timer-outline:before{content:\"\\ea8e\"}.ez-icon-trending-up:before{content:\"\\ea8f\"}.ez-icon-tune:before{content:\"\\ea90\"}.ez-icon-txt:before{content:\"\\ea91\"}.ez-icon-un-pin:before{content:\"\\ea92\"}.ez-icon-unfold_less:before{content:\"\\ea93\"}.ez-icon-unfold_more:before{content:\"\\ea94\"}.ez-icon-user-circle:before{content:\"\\ea95\"}.ez-icon-warning-outline:before{content:\"\\ea96\"}.ez-icon-warning_triangle:before{content:\"\\ea97\"}.ez-icon-whatshot:before{content:\"\\ea98\"}.ez-icon-xlsx:before{content:\"\\ea99\"}.ez-icon-zip:before{content:\"\\ea9a\"}.x-small--font{font-size:12px}.small--font{font-size:16px}.medium--font{font-size:20px}.large--font{font-size:24px}.x-large--font{font-size:30px}";
|