@sankhyalabs/ezui 5.22.0-dev.7 → 5.22.0-dev.71
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-b4ef826a.js +445 -0
- package/dist/cjs/FocusResolver-885f2173.js +35 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +4 -3
- 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 +12 -6
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item_2.cjs.entry.js +76 -0
- package/dist/cjs/ez-chart.cjs.entry.js +1 -1
- package/dist/cjs/ez-check.cjs.entry.js +2 -2
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +2 -2
- package/dist/cjs/ez-combo-box.cjs.entry.js +68 -14
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +37 -7
- package/dist/cjs/ez-date-input.cjs.entry.js +15 -5
- package/dist/cjs/ez-date-time-input.cjs.entry.js +12 -5
- package/dist/cjs/ez-dialog.cjs.entry.js +11 -3
- package/dist/cjs/ez-double-list.cjs.entry.js +287 -0
- package/dist/cjs/{ez-dropdown.cjs.entry.js → ez-dropdown_2.cjs.entry.js} +76 -9
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-filter-input.cjs.entry.js +130 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +30 -23
- package/dist/cjs/ez-form.cjs.entry.js +7 -326
- package/dist/cjs/ez-grid.cjs.entry.js +14946 -69807
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-icon.cjs.entry.js +2 -2
- package/dist/cjs/ez-list.cjs.entry.js +259 -212
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +3 -2
- package/dist/cjs/ez-modal.cjs.entry.js +20 -5
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +3 -3
- package/dist/cjs/ez-number-input.cjs.entry.js +16 -3
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +25 -3
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller_2.cjs.entry.js +4 -4
- package/dist/cjs/ez-search.cjs.entry.js +106 -46
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +2 -2
- package/dist/cjs/ez-split-button.cjs.entry.js +3 -3
- package/dist/cjs/ez-split-item.cjs.entry.js +4 -3
- package/dist/cjs/ez-split-panel.cjs.entry.js +69 -7
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +68 -6
- package/dist/cjs/ez-text-input.cjs.entry.js +154 -17
- package/dist/cjs/ez-time-input.cjs.entry.js +9 -2
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ez-tooltip.cjs.entry.js +55 -0
- 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/ezListHelper-0d3970b4.js +90 -0
- package/dist/cjs/ezui.cjs.js +2 -2
- package/dist/cjs/filter-column.cjs.entry.js +3 -3
- package/dist/cjs/{index-9e5554cb.js → index-a7b0c73d.js} +16 -11
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/ez-actions-button/ez-actions-button.js +3 -2
- package/dist/collection/components/ez-button/ez-button.css +23 -13
- package/dist/collection/components/ez-button/ez-button.js +12 -6
- package/dist/collection/components/ez-card-item/ez-card-item.css +60 -10
- package/dist/collection/components/ez-card-item/ez-card-item.js +30 -3
- package/dist/collection/components/ez-check/ez-check.css +1 -6
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +2 -2
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +13 -1
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +130 -15
- package/dist/collection/components/ez-date-input/ez-date-input.css +1 -1
- package/dist/collection/components/ez-date-input/ez-date-input.js +58 -5
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +1 -1
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +55 -5
- package/dist/collection/components/ez-dialog/ez-dialog.css +3 -3
- package/dist/collection/components/ez-dialog/ez-dialog.js +9 -1
- package/dist/collection/components/ez-double-list/doubleListHelper.js +82 -0
- package/dist/collection/components/ez-double-list/ez-double-list.css +62 -0
- package/dist/collection/components/ez-double-list/ez-double-list.js +440 -0
- package/dist/collection/components/ez-dropdown/ez-dropdown.js +33 -8
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +55 -5
- package/dist/collection/components/ez-form/ez-form.js +1 -0
- package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +49 -6
- package/dist/collection/components/ez-form-view/ez-form-view.css +5 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +2 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +8 -4
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +3 -2
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js +1 -1
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +282 -57
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +107 -5
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSourceInterceptor.js +2 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +219 -42
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +16 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +8 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +2 -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 +8 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +4 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +2 -0
- package/dist/collection/components/ez-grid/ez-grid.css +47 -8
- package/dist/collection/components/ez-grid/ez-grid.js +220 -7
- package/dist/collection/components/ez-grid/subcomponents/filter-column.css +4 -0
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +1 -1
- package/dist/collection/components/ez-icon/ez-icon.css +153 -149
- package/dist/collection/components/ez-list/ez-list.css +2 -1
- package/dist/collection/components/ez-list/ez-list.js +301 -212
- package/dist/collection/components/ez-list/ezListHelper.js +85 -0
- package/dist/collection/components/ez-modal/ez-modal.css +5 -1
- package/dist/collection/components/ez-modal/ez-modal.js +38 -5
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +20 -1
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +2 -3
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +1 -1
- package/dist/collection/components/ez-number-input/ez-number-input.css +8 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js +68 -1
- package/dist/collection/components/ez-popup/ez-popup.css +8 -3
- package/dist/collection/components/ez-popup/ez-popup.js +43 -3
- package/dist/collection/components/ez-scroller/ez-scroller.css +1 -0
- package/dist/collection/components/ez-search/ez-search.css +21 -10
- package/dist/collection/components/ez-search/ez-search.js +189 -49
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css +3 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +1 -1
- package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css +3 -1
- package/dist/collection/components/ez-split-button/ez-split-button.css +50 -14
- package/dist/collection/components/ez-split-button/ez-split-button.js +3 -3
- package/dist/collection/components/ez-split-panel/ez-split-panel.css +15 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.js +106 -5
- package/dist/collection/components/ez-split-panel/interfaces/IPanelSizeInfo.js +1 -0
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +14 -2
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +20 -1
- package/dist/collection/components/ez-text-area/ez-text-area.css +73 -28
- package/dist/collection/components/ez-text-area/ez-text-area.js +103 -3
- package/dist/collection/components/ez-text-input/ez-text-input.css +106 -91
- package/dist/collection/components/ez-text-input/ez-text-input.js +185 -15
- package/dist/collection/components/ez-time-input/ez-time-input.js +44 -1
- package/dist/collection/components/ez-tooltip/ez-tooltip.css +20 -0
- package/dist/collection/components/ez-tooltip/ez-tooltip.js +116 -0
- package/dist/collection/sw.js +46 -0
- package/dist/collection/utils/FocusResolver.js +31 -0
- package/dist/collection/utils/ResponsiveInputUtils.js +26 -0
- package/dist/collection/utils/form/DataBinder.js +20 -5
- package/dist/collection/utils/form/FormMetadata.js +2 -1
- package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
- package/dist/collection/utils/validators/recordvalidator/IInvalidCells.js +1 -0
- package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +7 -1
- package/dist/custom-elements/index.d.ts +12 -0
- package/dist/custom-elements/index.js +16564 -70385
- package/dist/esm/DataBinder-d2ecbb0f.js +441 -0
- package/dist/esm/FocusResolver-1ccbf850.js +33 -0
- package/dist/esm/ez-actions-button.entry.js +4 -3
- 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 +12 -6
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-card-item_2.entry.js +71 -0
- package/dist/esm/ez-chart.entry.js +1 -1
- package/dist/esm/ez-check.entry.js +2 -2
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +2 -2
- package/dist/esm/ez-combo-box.entry.js +69 -15
- package/dist/esm/ez-custom-form-input_2.entry.js +38 -8
- package/dist/esm/ez-date-input.entry.js +15 -5
- package/dist/esm/ez-date-time-input.entry.js +12 -5
- package/dist/esm/ez-dialog.entry.js +11 -3
- package/dist/esm/ez-double-list.entry.js +283 -0
- package/dist/esm/{ez-dropdown.entry.js → ez-dropdown_2.entry.js} +76 -10
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-filter-input.entry.js +126 -0
- package/dist/esm/ez-form-view.entry.js +30 -23
- package/dist/esm/ez-form.entry.js +6 -325
- package/dist/esm/ez-grid.entry.js +14945 -69806
- package/dist/esm/ez-guide-navigator.entry.js +1 -1
- package/dist/esm/ez-icon.entry.js +2 -2
- package/dist/esm/ez-list.entry.js +259 -212
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +3 -2
- package/dist/esm/ez-modal.entry.js +20 -5
- package/dist/esm/ez-multi-selection-list.entry.js +3 -3
- package/dist/esm/ez-number-input.entry.js +16 -3
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +25 -3
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-scroller_2.entry.js +4 -4
- package/dist/esm/ez-search.entry.js +106 -46
- package/dist/esm/ez-sidebar-navigator.entry.js +2 -2
- package/dist/esm/ez-split-button.entry.js +3 -3
- package/dist/esm/ez-split-item.entry.js +4 -3
- package/dist/esm/ez-split-panel.entry.js +69 -7
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +68 -6
- package/dist/esm/ez-text-input.entry.js +154 -17
- package/dist/esm/ez-time-input.entry.js +9 -2
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ez-tooltip.entry.js +51 -0
- 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/ezListHelper-00fb9b8d.js +87 -0
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/filter-column.entry.js +3 -3
- package/dist/esm/{index-5a720e56.js → index-baa5e267.js} +17 -11
- package/dist/esm/loader.js +3 -3
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-e6b38ade.entry.js → p-0306dff7.entry.js} +1 -1
- package/dist/ezui/{p-91ccae0c.entry.js → p-09de35a2.entry.js} +1 -1
- package/dist/ezui/p-14b769d7.entry.js +1 -0
- package/dist/ezui/p-16e612fc.entry.js +1 -0
- package/dist/ezui/{p-b2f6bc0a.entry.js → p-17be134a.entry.js} +1 -1
- package/dist/ezui/p-17eabf46.entry.js +1 -0
- package/dist/ezui/p-181b5ae8.entry.js +1 -0
- package/dist/ezui/{p-81461d2f.entry.js → p-1e7a8633.entry.js} +1 -1
- package/dist/ezui/{p-6b51c9cc.entry.js → p-1f50fa05.entry.js} +1 -1
- package/dist/ezui/{p-e4c7eb39.js → p-23a36bb6.js} +2 -2
- package/dist/ezui/p-2475fd6e.entry.js +1 -0
- package/dist/ezui/p-2bb2a0c4.entry.js +1 -0
- package/dist/ezui/p-3175fe8c.entry.js +1 -0
- package/dist/ezui/{p-30951bd7.entry.js → p-35d467a8.entry.js} +1 -1
- package/dist/ezui/p-3f2dd525.entry.js +1 -0
- package/dist/ezui/{p-0378416a.entry.js → p-44caad9a.entry.js} +1 -1
- package/dist/ezui/p-50d83a46.entry.js +1 -0
- package/dist/ezui/{p-7567ccdd.entry.js → p-555c9018.entry.js} +1 -1
- package/dist/ezui/{p-044d46d5.entry.js → p-5b205c80.entry.js} +1 -1
- package/dist/ezui/{p-6fc26622.entry.js → p-5ed81457.entry.js} +1 -1
- package/dist/ezui/{p-f1c2c19e.entry.js → p-650e4b6d.entry.js} +1 -1
- package/dist/ezui/p-654b3f99.entry.js +1 -0
- package/dist/ezui/p-65f471bc.entry.js +1 -0
- package/dist/ezui/p-66924de6.entry.js +1 -0
- package/dist/ezui/p-6cdd3e0a.entry.js +1 -0
- package/dist/ezui/p-6d79930d.entry.js +1 -0
- package/dist/ezui/{p-fc194825.entry.js → p-6e429cff.entry.js} +1 -1
- package/dist/ezui/p-6f22a385.entry.js +1 -0
- package/dist/ezui/p-7409eeaa.entry.js +1 -0
- package/dist/ezui/{p-11bfeca3.entry.js → p-77a4bd35.entry.js} +1 -1
- package/dist/ezui/p-7e677b7b.entry.js +1 -0
- package/dist/ezui/p-7ed30844.entry.js +1 -0
- package/dist/ezui/p-7fdd479f.entry.js +1 -0
- package/dist/ezui/p-80dfc50b.js +1 -0
- package/dist/ezui/{p-1b08bf3c.entry.js → p-8888d9ed.entry.js} +1 -1
- package/dist/ezui/{p-82fa4b09.entry.js → p-8df1ca33.entry.js} +1 -1
- package/dist/ezui/p-990b4318.entry.js +1 -0
- package/dist/ezui/{p-c2b20f78.entry.js → p-9f5fa3f9.entry.js} +1 -1
- package/dist/ezui/p-a6fe527a.entry.js +1 -0
- package/dist/ezui/{p-dfca5946.entry.js → p-a80b1287.entry.js} +1 -1
- package/dist/ezui/p-b6a4e6de.entry.js +1 -0
- package/dist/ezui/p-bc2f844e.entry.js +1 -0
- package/dist/ezui/{p-92748142.entry.js → p-c0d9c4f8.entry.js} +1 -1
- package/dist/ezui/p-c3045972.entry.js +1 -0
- package/dist/ezui/{p-82ac8b06.entry.js → p-c4320a39.entry.js} +1 -1
- package/dist/ezui/p-ca6340a9.entry.js +1 -0
- package/dist/ezui/p-ceadecd9.js +1 -0
- package/dist/ezui/p-d0ca26fe.entry.js +1 -0
- package/dist/ezui/p-d520839d.entry.js +1 -0
- package/dist/ezui/p-dc628ed3.js +1 -0
- package/dist/ezui/p-dc8b36c3.entry.js +1 -0
- package/dist/ezui/p-dd48941c.entry.js +309 -0
- package/dist/ezui/{p-9aa27e69.entry.js → p-e347df9c.entry.js} +1 -1
- package/dist/ezui/p-e3e3fd7a.entry.js +1 -0
- package/dist/ezui/p-fa6732f2.entry.js +1 -0
- package/dist/ezui/p-fec696ab.entry.js +1 -0
- package/dist/types/components/ez-button/ez-button.d.ts +2 -1
- package/dist/types/components/ez-card-item/ez-card-item.d.ts +5 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +16 -1
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +10 -1
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +10 -1
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +2 -0
- package/dist/types/components/ez-double-list/doubleListHelper.d.ts +10 -0
- package/dist/types/components/ez-double-list/ez-double-list.d.ts +87 -0
- package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +4 -0
- package/dist/types/components/ez-dropdown/structure/DropdownItem.d.ts +1 -1
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +10 -1
- package/dist/types/components/ez-form-view/custom-input/ez-custom-form-input.d.ts +7 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +2 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.d.ts +1 -1
- package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +60 -4
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +36 -4
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +23 -1
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +33 -7
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +4 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +2 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +37 -1
- package/dist/types/components/ez-list/ez-list.d.ts +23 -2
- package/dist/types/components/ez-list/ezListHelper.d.ts +20 -0
- package/dist/types/components/ez-modal/ez-modal.d.ts +7 -1
- package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +4 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +12 -0
- package/dist/types/components/ez-popup/ez-popup.d.ts +8 -1
- package/dist/types/components/ez-search/ez-search.d.ts +29 -5
- package/dist/types/components/ez-split-button/ez-split-button.d.ts +1 -1
- package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +11 -0
- package/dist/types/components/ez-split-panel/interfaces/IPanelSizeInfo.d.ts +9 -0
- package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +4 -0
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +17 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +28 -2
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +8 -0
- package/dist/types/components/ez-tooltip/ez-tooltip.d.ts +21 -0
- package/dist/types/components.d.ts +448 -25
- package/dist/types/utils/FocusResolver.d.ts +5 -0
- package/dist/types/utils/ResponsiveInputUtils.d.ts +6 -0
- package/dist/types/utils/customEditor/interfaces/ICustomEditor.d.ts +2 -0
- package/dist/types/utils/form/DataBinder.d.ts +3 -0
- package/dist/types/utils/validators/recordvalidator/IInvalidCells.d.ts +5 -0
- package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +1 -1
- package/package.json +12 -4
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/RecordValidationProcessor-4c893e04.js +0 -102
- package/dist/cjs/ez-card-item_3.cjs.entry.js +0 -183
- package/dist/cjs/ez-skeleton.cjs.entry.js +0 -67
- package/dist/esm/RecordValidationProcessor-b00b8b77.js +0 -99
- package/dist/esm/ez-card-item_3.entry.js +0 -177
- package/dist/esm/ez-skeleton.entry.js +0 -63
- package/dist/ezui/p-04f24913.js +0 -1
- package/dist/ezui/p-11b09aa1.entry.js +0 -1
- package/dist/ezui/p-24ca32a3.entry.js +0 -1
- package/dist/ezui/p-2af4e2de.entry.js +0 -1
- package/dist/ezui/p-31674f8e.entry.js +0 -1
- package/dist/ezui/p-33792b2b.entry.js +0 -1
- package/dist/ezui/p-33b08253.entry.js +0 -304
- package/dist/ezui/p-36180f4d.entry.js +0 -1
- package/dist/ezui/p-3f8c33e0.entry.js +0 -1
- package/dist/ezui/p-5fefcdc9.entry.js +0 -1
- package/dist/ezui/p-6ec40dec.entry.js +0 -1
- package/dist/ezui/p-752c4069.entry.js +0 -1
- package/dist/ezui/p-81cffa53.entry.js +0 -1
- package/dist/ezui/p-81f99ace.entry.js +0 -1
- package/dist/ezui/p-868b56f7.entry.js +0 -1
- package/dist/ezui/p-8eef0f70.entry.js +0 -1
- package/dist/ezui/p-9634631d.entry.js +0 -1
- package/dist/ezui/p-9a11e223.entry.js +0 -1
- package/dist/ezui/p-9a23d513.entry.js +0 -1
- package/dist/ezui/p-9c2e2d68.entry.js +0 -1
- package/dist/ezui/p-a35b41e6.entry.js +0 -1
- package/dist/ezui/p-acbf0e76.entry.js +0 -1
- package/dist/ezui/p-b0e71d23.entry.js +0 -1
- package/dist/ezui/p-c3b7a23e.entry.js +0 -1
- package/dist/ezui/p-cd1a2e6b.entry.js +0 -1
- package/dist/ezui/p-dbeee5aa.entry.js +0 -1
- package/dist/ezui/p-de870657.entry.js +0 -1
- package/dist/ezui/p-e151e795.entry.js +0 -1
- package/dist/ezui/p-ee9315ff.entry.js +0 -1
- package/dist/ezui/p-f1c3f85d.entry.js +0 -1
- package/dist/ezui/p-f291db18.entry.js +0 -1
|
@@ -1,53 +1,144 @@
|
|
|
1
|
-
import { UserInterface } from
|
|
2
|
-
import { KeyCode } from "ag-grid-community";
|
|
3
|
-
import { RecordValidationProcessor } from
|
|
4
|
-
import EzCellEditor from
|
|
5
|
-
import EzGridCustomCellEditor from
|
|
6
|
-
import EzGridCustomCellRender from
|
|
1
|
+
import { LockManager, LockManagerOperation, UserInterface } from '@sankhyalabs/core';
|
|
2
|
+
import { KeyCode, } from "@ag-grid-community/core";
|
|
3
|
+
import { RecordValidationProcessor } from '../../../../utils/validators/recordvalidator/RecordValidationProcessor';
|
|
4
|
+
import EzCellEditor from './editor/EzCellEditor';
|
|
5
|
+
import EzGridCustomCellEditor from './components/EzGridCustomCellEditor';
|
|
6
|
+
import EzGridCustomCellRender from './components/EzGridCustomCellRender';
|
|
7
|
+
import { DataBinder } from '../../../../utils';
|
|
7
8
|
export default class GridEditionManager {
|
|
8
|
-
constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders) {
|
|
9
|
+
constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders, enableContinuousInsert, enableGridInsert, lockerId) {
|
|
9
10
|
this._dataUnit = dataUnit;
|
|
10
11
|
this._recordValidationProcessor = new RecordValidationProcessor(this._dataUnit, {
|
|
11
12
|
getRequiredFields: () => this.getRequiredFields(),
|
|
12
|
-
markAsInvalid: () => { },
|
|
13
|
-
getMessageForField: () => null
|
|
13
|
+
markAsInvalid: (invalidField, recordId) => { this.pushInvalidCell(invalidField, recordId); },
|
|
14
|
+
getMessageForField: () => null,
|
|
14
15
|
}, recordsValidator);
|
|
15
16
|
this._useEnterLikeTab = useEnterLikeTab;
|
|
16
17
|
this._editionIsDisabled = editionIsDisabled;
|
|
18
|
+
this._enableContinuousInsert = enableContinuousInsert;
|
|
19
|
+
this._enableGridInsert = enableGridInsert;
|
|
17
20
|
this._customEditors = customEditors;
|
|
18
21
|
this._customRenders = customRenders;
|
|
22
|
+
this._lockerId = lockerId;
|
|
19
23
|
}
|
|
20
24
|
configureGrid(options) {
|
|
21
25
|
this._gridOptions = options;
|
|
22
26
|
options.readOnlyEdit = true;
|
|
23
27
|
options.onCellEditRequest = evt => this.onCellEditRequest(evt);
|
|
28
|
+
options.onCellEditingStarted = async (evt) => {
|
|
29
|
+
var _a;
|
|
30
|
+
if (this._dataUnit.hasNewRecord()) {
|
|
31
|
+
this.handleCellEditingStartedRowAdd(evt);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
this._lastCellOpened = this._lastCellEdited = { rowIndex: evt.rowIndex, column: evt.column, rowPinned: undefined };
|
|
35
|
+
}
|
|
36
|
+
(_a = this._currentEditLock) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
37
|
+
this._currentEditLock = LockManager.lock(this._lockerId, LockManagerOperation.TASKBAR_CLICK);
|
|
38
|
+
};
|
|
39
|
+
options.onCellEditingStopped = () => {
|
|
40
|
+
var _a;
|
|
41
|
+
(_a = this._currentEditLock) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
42
|
+
};
|
|
24
43
|
options.onCellKeyDown = evt => {
|
|
25
44
|
if (evt.event && evt["column"]) {
|
|
26
45
|
this.onCellKeyDown(evt);
|
|
27
46
|
}
|
|
28
47
|
};
|
|
48
|
+
options.isRowSelectable = (node) => this.isSelectableRow(node);
|
|
49
|
+
options.onCellFocused = () => this.lockFocusWhenAddRow();
|
|
29
50
|
return options;
|
|
30
51
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
52
|
+
updateCurrentEditorGuiValue(updatedRowValue) {
|
|
53
|
+
const editorInstances = this._gridOptions.api.getCellEditorInstances();
|
|
54
|
+
if (!editorInstances || !editorInstances.length)
|
|
55
|
+
return;
|
|
56
|
+
const currentEditor = editorInstances[0];
|
|
57
|
+
const fieldMetadata = currentEditor.getFieldMetadata();
|
|
58
|
+
const fieldName = fieldMetadata.name;
|
|
59
|
+
const value = updatedRowValue[fieldName];
|
|
60
|
+
currentEditor.setGuiValue(value);
|
|
61
|
+
}
|
|
62
|
+
lockFocusWhenAddRow() {
|
|
63
|
+
var _a, _b, _c, _d;
|
|
64
|
+
const api = this._gridOptions.api;
|
|
65
|
+
const newFocusCell = api.getFocusedCell();
|
|
66
|
+
const rowIndex = newFocusCell === null || newFocusCell === void 0 ? void 0 : newFocusCell.rowIndex;
|
|
67
|
+
const recordId = (_b = (_a = this._dataUnit.getAddedRecords()) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.__record__id__;
|
|
68
|
+
const rowNode = api.getRowNode(recordId);
|
|
69
|
+
if (!this._dataUnit.hasNewRecord() || rowIndex == (rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex)) {
|
|
34
70
|
return;
|
|
35
71
|
}
|
|
36
|
-
|
|
72
|
+
const lastCell = (_d = (_c = this._lastCellOpened) !== null && _c !== void 0 ? _c : this._lastCellEdited) !== null && _d !== void 0 ? _d : this._lastCellClicked;
|
|
73
|
+
if ((lastCell === null || lastCell === void 0 ? void 0 : lastCell.rowIndex) < (rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex)) {
|
|
37
74
|
return;
|
|
38
75
|
}
|
|
39
|
-
|
|
40
|
-
if (
|
|
76
|
+
api.clearFocusedCell();
|
|
77
|
+
if (!lastCell || (rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex) == undefined) {
|
|
41
78
|
return;
|
|
42
79
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
80
|
+
lastCell.rowIndex = rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex;
|
|
81
|
+
this.focusOnCell(lastCell);
|
|
82
|
+
}
|
|
83
|
+
handleCellEditingStartedRowAdd(evt) {
|
|
84
|
+
var _a, _b, _c, _d, _e;
|
|
85
|
+
const nodeId = (_a = evt.node) === null || _a === void 0 ? void 0 : _a.id;
|
|
86
|
+
const addedRecordId = (_c = (_b = this._dataUnit.getAddedRecords()) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.__record__id__;
|
|
87
|
+
if (nodeId == addedRecordId) {
|
|
88
|
+
this._lastCellOpened = this._lastCellEdited = { rowIndex: evt.rowIndex, column: evt === null || evt === void 0 ? void 0 : evt.column, rowPinned: undefined };
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
evt.api.stopEditing();
|
|
92
|
+
const rowIndex = (_d = evt.api.getRowNode(addedRecordId)) === null || _d === void 0 ? void 0 : _d.rowIndex;
|
|
93
|
+
this._lastCellOpened = this._lastCellEdited = { rowIndex: rowIndex, column: (_e = this._lastCellEdited) === null || _e === void 0 ? void 0 : _e.column, rowPinned: undefined };
|
|
94
|
+
}
|
|
95
|
+
isSelectableRow(node) {
|
|
96
|
+
if (!this._dataUnit.hasNewRecord()) {
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
if (!this._dataUnit.isNewRecord(node.id)) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
canContinuousInsert() {
|
|
105
|
+
var _a;
|
|
106
|
+
return this._enableContinuousInsert && (this._dataUnit.records.length - 1) === ((_a = this._lastCellEdited) === null || _a === void 0 ? void 0 : _a.rowIndex);
|
|
107
|
+
}
|
|
108
|
+
async proceedAutoSave() {
|
|
109
|
+
if (!this._dataUnit.isDirty()) {
|
|
110
|
+
this.saveSuccess();
|
|
111
|
+
return true;
|
|
112
|
+
}
|
|
113
|
+
const currentRecord = this._dataUnit.getSelectedRecord();
|
|
114
|
+
if (currentRecord == undefined) {
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
this.clearInvalidCells(false);
|
|
118
|
+
try {
|
|
119
|
+
await this._recordValidationProcessor.validate(true);
|
|
120
|
+
await this.saveDataUnit();
|
|
121
|
+
this.saveSuccess();
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
catch (reason) {
|
|
125
|
+
this.saveFail(reason);
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
async saveDataUnit() {
|
|
130
|
+
await this._dataUnit.saveData();
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
async recordValidate() {
|
|
134
|
+
if (!this._dataUnit.isDirty())
|
|
135
|
+
return;
|
|
136
|
+
try {
|
|
137
|
+
this.clearInvalidCells(false);
|
|
138
|
+
await this._recordValidationProcessor.validate(false);
|
|
139
|
+
}
|
|
140
|
+
catch (error) { }
|
|
141
|
+
this._gridOptions.api.refreshCells({ force: true });
|
|
51
142
|
}
|
|
52
143
|
navigateByEnterKey(keyboardEvent) {
|
|
53
144
|
const backwards = keyboardEvent.shiftKey;
|
|
@@ -71,6 +162,13 @@ export default class GridEditionManager {
|
|
|
71
162
|
return { ezCellEditor: EzCellEditor };
|
|
72
163
|
}
|
|
73
164
|
verifyClickToEdition(api, cellClicked) {
|
|
165
|
+
var _a, _b;
|
|
166
|
+
const selectedRecordID = (_a = this._dataUnit.getSelectedRecord()) === null || _a === void 0 ? void 0 : _a.__record__id__;
|
|
167
|
+
if (this._dataUnit.hasNewRecord() && selectedRecordID) {
|
|
168
|
+
const dataUnitRecordIndex = (_b = api.getRowNode(selectedRecordID)) === null || _b === void 0 ? void 0 : _b.rowIndex;
|
|
169
|
+
if (dataUnitRecordIndex != cellClicked.rowIndex)
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
74
172
|
if (this.isSecondClick(cellClicked)) {
|
|
75
173
|
api.startEditingCell({ rowIndex: cellClicked.rowIndex, colKey: cellClicked.column.getColId() });
|
|
76
174
|
}
|
|
@@ -80,6 +178,9 @@ export default class GridEditionManager {
|
|
|
80
178
|
col.cellEditor = 'ezCellEditor';
|
|
81
179
|
col.editable = params => this.canEdit(params);
|
|
82
180
|
col.suppressKeyboardEvent = (params) => {
|
|
181
|
+
if (params.event.key === KeyCode.ESCAPE && params.editing) {
|
|
182
|
+
return this._dataUnit.isDirty();
|
|
183
|
+
}
|
|
83
184
|
return params.event.key === KeyCode.ENTER;
|
|
84
185
|
};
|
|
85
186
|
col.cellEditorSelector = (params) => {
|
|
@@ -109,10 +210,21 @@ export default class GridEditionManager {
|
|
|
109
210
|
return col;
|
|
110
211
|
}
|
|
111
212
|
getRequiredFields() {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
213
|
+
const formRequiredFields = this.getFormRequiredFields();
|
|
214
|
+
return this._gridOptions.columnApi.getAllDisplayedColumns()
|
|
215
|
+
.filter(column => {
|
|
216
|
+
const fieldDefinition = this._dataUnit.getField(column.getColId());
|
|
217
|
+
return (fieldDefinition && fieldDefinition.required) || formRequiredFields.includes(column.getColId());
|
|
218
|
+
})
|
|
219
|
+
.map(column => column.getColId());
|
|
220
|
+
}
|
|
221
|
+
getFormRequiredFields() {
|
|
222
|
+
const formRequiredFields = [];
|
|
223
|
+
const dataBinders = DataBinder.getDataBindersByDataUnit(this._dataUnit);
|
|
224
|
+
dataBinders.forEach(dataBinder => {
|
|
225
|
+
formRequiredFields.push(...dataBinder.getFormRequiredFields());
|
|
226
|
+
});
|
|
227
|
+
return formRequiredFields;
|
|
116
228
|
}
|
|
117
229
|
saveSuccess() {
|
|
118
230
|
var _a;
|
|
@@ -125,18 +237,20 @@ export default class GridEditionManager {
|
|
|
125
237
|
this._isGridEdition = false;
|
|
126
238
|
}
|
|
127
239
|
saveFail(reason) {
|
|
128
|
-
|
|
240
|
+
var _a;
|
|
241
|
+
this.focusOnCell((_a = this._lastCellOpened) !== null && _a !== void 0 ? _a : this._lastCellEdited);
|
|
129
242
|
this._isGridEdition = false;
|
|
130
243
|
if (reason) {
|
|
131
|
-
|
|
244
|
+
throw reason;
|
|
132
245
|
}
|
|
133
246
|
}
|
|
134
247
|
focusOnCell(cell) {
|
|
248
|
+
var _a;
|
|
135
249
|
if (cell == undefined) {
|
|
136
250
|
return;
|
|
137
251
|
}
|
|
138
252
|
const { rowIndex, column } = cell;
|
|
139
|
-
this._gridOptions.api.getDisplayedRowAtIndex(rowIndex).setSelected(true, true);
|
|
253
|
+
(_a = this._gridOptions.api.getDisplayedRowAtIndex(rowIndex)) === null || _a === void 0 ? void 0 : _a.setSelected(true, true);
|
|
140
254
|
this._gridOptions.api.clearRangeSelection();
|
|
141
255
|
this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [column] });
|
|
142
256
|
this._gridOptions.api.startEditingCell({ colKey: column.getColId(), rowIndex });
|
|
@@ -176,9 +290,10 @@ export default class GridEditionManager {
|
|
|
176
290
|
}
|
|
177
291
|
}
|
|
178
292
|
else {
|
|
293
|
+
const actualRowIndex = rowIndex;
|
|
179
294
|
rowIndex = rowIndex + 1;
|
|
180
295
|
if (rowIndex >= this._dataUnit.records.length) {
|
|
181
|
-
rowIndex = 0;
|
|
296
|
+
rowIndex = !this._enableGridInsert ? 0 : actualRowIndex;
|
|
182
297
|
}
|
|
183
298
|
}
|
|
184
299
|
this._targetEditionCell = new TargetEdition(rowIndex, column, true);
|
|
@@ -191,6 +306,9 @@ export default class GridEditionManager {
|
|
|
191
306
|
this.moveEditionVertically(api, 1);
|
|
192
307
|
}
|
|
193
308
|
moveEditionVertically(api, offset) {
|
|
309
|
+
if (this._dataUnit.hasNewRecord() && this._isGridEdition) {
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
194
312
|
const editionCell = api.getEditingCells()[0];
|
|
195
313
|
if (!editionCell) {
|
|
196
314
|
return;
|
|
@@ -235,28 +353,87 @@ export default class GridEditionManager {
|
|
|
235
353
|
return true;
|
|
236
354
|
}
|
|
237
355
|
onCellEditRequest(event) {
|
|
238
|
-
|
|
356
|
+
var _a;
|
|
239
357
|
const value = event.newValue;
|
|
240
|
-
if (event.oldValue
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
358
|
+
if (event.oldValue == value) {
|
|
359
|
+
(_a = this._currentEditLock) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
if (value instanceof Promise) {
|
|
363
|
+
this.handlePromiseValue(event, value);
|
|
364
|
+
return;
|
|
365
|
+
}
|
|
366
|
+
this.updateCellValue(event, value);
|
|
367
|
+
}
|
|
368
|
+
async handlePromiseValue(event, value) {
|
|
369
|
+
const fieldName = event.colDef.field;
|
|
370
|
+
const fieldDescriptor = this._dataUnit.getField(event.colDef.colId);
|
|
371
|
+
const initialValue = (fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.userInterface) === UserInterface.SEARCH ? value : event.oldValue;
|
|
372
|
+
event.node.setData(Object.assign(Object.assign({}, event.data), { [fieldName]: initialValue }));
|
|
373
|
+
const resolved = await value;
|
|
374
|
+
return this.updateCellValue(event, resolved);
|
|
375
|
+
}
|
|
376
|
+
updateCellValue(event, newValue) {
|
|
377
|
+
var _a;
|
|
378
|
+
const fieldName = event.colDef.field;
|
|
379
|
+
event.node.setData(Object.assign(Object.assign({}, event.data), { [fieldName]: newValue }));
|
|
380
|
+
(_a = this._currentEditLock) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
381
|
+
if (event.oldValue !== newValue) {
|
|
249
382
|
this._isGridEdition = true;
|
|
250
|
-
this._dataUnit.setFieldValue(fieldName,
|
|
383
|
+
this._dataUnit.setFieldValue(fieldName, newValue, [event.data.__record__id__], { suppressCreateNewRecord: true });
|
|
251
384
|
this._lastCellEdited = { rowIndex: event.rowIndex, column: event.column, rowPinned: undefined };
|
|
252
385
|
}
|
|
253
386
|
}
|
|
254
387
|
setCellEditors(customEditors) {
|
|
388
|
+
var _a;
|
|
255
389
|
this._customEditors = customEditors;
|
|
390
|
+
(_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api.stopEditing();
|
|
256
391
|
}
|
|
257
392
|
setCellRenders(customRenders) {
|
|
258
393
|
this._customRenders = customRenders;
|
|
259
394
|
}
|
|
395
|
+
pushInvalidCell(invalidField, recordId) {
|
|
396
|
+
this._invalidCells.push({ field: invalidField, recordId });
|
|
397
|
+
this._nextInvalidCell = this._invalidCells[0];
|
|
398
|
+
}
|
|
399
|
+
getInvalidCells() {
|
|
400
|
+
return this._invalidCells;
|
|
401
|
+
}
|
|
402
|
+
getNextInvalidCell() {
|
|
403
|
+
return this._nextInvalidCell;
|
|
404
|
+
}
|
|
405
|
+
async processContinuousInsert() {
|
|
406
|
+
if (!this.canContinuousInsert())
|
|
407
|
+
return;
|
|
408
|
+
this._dataUnit.addRecord();
|
|
409
|
+
}
|
|
410
|
+
clearInvalidCells(stopEdition) {
|
|
411
|
+
this._invalidCells = [];
|
|
412
|
+
this._nextInvalidCell = undefined;
|
|
413
|
+
if (stopEdition) {
|
|
414
|
+
this._isGridEdition = false;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
setEnableContinuousInsert(enable) {
|
|
418
|
+
this._enableContinuousInsert = enable;
|
|
419
|
+
}
|
|
420
|
+
hasInvalidField(fieldName, recordId) {
|
|
421
|
+
if (!this.hasInvalidCell())
|
|
422
|
+
return false;
|
|
423
|
+
this._nextInvalidCell = this._invalidCells[0];
|
|
424
|
+
const containsFieldName = this._nextInvalidCell.field.name === fieldName;
|
|
425
|
+
const containsRecordId = this._nextInvalidCell.recordId === recordId;
|
|
426
|
+
return containsFieldName && containsRecordId;
|
|
427
|
+
}
|
|
428
|
+
hasInvalidCell() {
|
|
429
|
+
var _a, _b, _c;
|
|
430
|
+
const hasInvalidCell = ((_a = this._invalidCells) === null || _a === void 0 ? void 0 : _a.length) > 0;
|
|
431
|
+
const hasField = (_b = this._invalidCells) === null || _b === void 0 ? void 0 : _b.filter(invalidCell => { invalidCell.field; });
|
|
432
|
+
const hasRecordId = (_c = this._invalidCells) === null || _c === void 0 ? void 0 : _c.filter(invalidCell => { invalidCell.recordId; });
|
|
433
|
+
if (!hasInvalidCell || !hasField || !hasRecordId)
|
|
434
|
+
return false;
|
|
435
|
+
return true;
|
|
436
|
+
}
|
|
260
437
|
}
|
|
261
438
|
class TargetEdition {
|
|
262
439
|
constructor(rowIndex, column, backwards) {
|
package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { HTMLBuilder } from "@sankhyalabs/core";
|
|
2
2
|
import { CustomEditorSource } from "../../../../../utils/customEditor/interfaces/ICustomEditor";
|
|
3
3
|
import EzCellEditor from "../editor/EzCellEditor";
|
|
4
|
+
import { getViewPortHeight } from "../editor/GridEditorUtils";
|
|
5
|
+
import FocusResolver from "../../../../../utils/FocusResolver";
|
|
4
6
|
export default class EzGridCustomCellEditor extends EzCellEditor {
|
|
5
7
|
init(params) {
|
|
6
8
|
var _a, _b;
|
|
@@ -11,6 +13,8 @@ export default class EzGridCustomCellEditor extends EzCellEditor {
|
|
|
11
13
|
this._defaultGui = this.getDefaultGui();
|
|
12
14
|
const fieldMetadata = super.getFieldMetadata();
|
|
13
15
|
this._params = {
|
|
16
|
+
cellPossition: getViewPortHeight(params.eGridCell),
|
|
17
|
+
eGridCell: params.eGridCell,
|
|
14
18
|
value: params.value,
|
|
15
19
|
charPress: params.charPress,
|
|
16
20
|
currentEditor: this._defaultGui,
|
|
@@ -48,12 +52,24 @@ export default class EzGridCustomCellEditor extends EzCellEditor {
|
|
|
48
52
|
const element = HTMLBuilder.parseElement(editorElement);
|
|
49
53
|
return element;
|
|
50
54
|
}
|
|
55
|
+
this._customGui = editorElement;
|
|
51
56
|
return editorElement;
|
|
52
57
|
}
|
|
53
58
|
setValue(value) {
|
|
54
59
|
this._value = value;
|
|
55
60
|
}
|
|
56
61
|
getValue() {
|
|
62
|
+
var _a, _b;
|
|
63
|
+
if ((_a = this._customGui) === null || _a === void 0 ? void 0 : _a.getValue)
|
|
64
|
+
return this._customGui.getValue();
|
|
65
|
+
if ((_b = this._customGui) === null || _b === void 0 ? void 0 : _b.hasAttribute('value'))
|
|
66
|
+
return this._customGui.value;
|
|
57
67
|
return this._value;
|
|
58
68
|
}
|
|
69
|
+
afterGuiAttached() {
|
|
70
|
+
this.focusIn();
|
|
71
|
+
}
|
|
72
|
+
focusIn() {
|
|
73
|
+
FocusResolver.resolveFocus(this._customGui);
|
|
74
|
+
}
|
|
59
75
|
}
|
|
@@ -44,6 +44,14 @@ export default class EzCellEditor {
|
|
|
44
44
|
getValue() {
|
|
45
45
|
return this._gui.valueGetter != undefined ? this._gui.valueGetter() : this._gui.value;
|
|
46
46
|
}
|
|
47
|
+
setGuiValue(value) {
|
|
48
|
+
if (this._gui.valueSetter != undefined) {
|
|
49
|
+
this._gui.valueSetter(value);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
this._gui.value = value;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
47
55
|
isPopup() {
|
|
48
56
|
return this._gui.isPopUp;
|
|
49
57
|
}
|
package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js
CHANGED
|
@@ -17,7 +17,9 @@ export const buildComboBox = ({ required, props, eGridCell }) => {
|
|
|
17
17
|
mode="slim"
|
|
18
18
|
/>`);
|
|
19
19
|
combo.options = options;
|
|
20
|
+
combo.stopPropagateEnterKeyEvent = true;
|
|
20
21
|
combo.listOptionsPosition = { verticalPosition: 29, bottomLimit: getViewPortHeight(eGridCell), hardPosition: true };
|
|
22
|
+
combo.autoFocus = true;
|
|
21
23
|
return combo;
|
|
22
24
|
};
|
|
23
25
|
export const buildSwitch = (fieldMetadata) => {
|
package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ApplicationContext, HTMLBuilder } from '@sankhyalabs/core';
|
|
2
2
|
import { getViewPortHeight } from '../GridEditorUtils';
|
|
3
|
+
import { StringUtils } from "@sankhyalabs/core";
|
|
3
4
|
export const buildSearch = ({ name, required, readOnly, eGridCell, dataUnit }) => {
|
|
5
|
+
var _a;
|
|
4
6
|
const ezSearch = HTMLBuilder.parseElement(`<ez-search
|
|
5
7
|
class="ez-grid grid_editor"
|
|
6
8
|
mode="slim"
|
|
@@ -8,9 +10,14 @@ export const buildSearch = ({ name, required, readOnly, eGridCell, dataUnit }) =
|
|
|
8
10
|
enabled=${!readOnly}
|
|
9
11
|
/>`);
|
|
10
12
|
const loader = ApplicationContext.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");
|
|
13
|
+
const metadata = dataUnit.getField(name);
|
|
11
14
|
ezSearch.optionLoader = (argument) => loader(argument, name, dataUnit);
|
|
12
|
-
ezSearch.
|
|
15
|
+
ezSearch.ensureClearButtonVisible = true;
|
|
16
|
+
ezSearch.suppressPreLoad = true;
|
|
13
17
|
ezSearch.listOptionsPosition = { verticalPosition: 29, bottomLimit: getViewPortHeight(eGridCell), hardPosition: true };
|
|
18
|
+
ezSearch.stopPropagateEnterKeyEvent = true;
|
|
19
|
+
ezSearch.ignoreLimitCharsToSearch = StringUtils.getBooleanValue((_a = metadata === null || metadata === void 0 ? void 0 : metadata.properties) === null || _a === void 0 ? void 0 : _a.ignoreLimitCharsToSearch);
|
|
20
|
+
ezSearch.autoFocus = true;
|
|
14
21
|
ezSearch.valueGetter = () => ezSearch.getValueAsync();
|
|
15
22
|
return ezSearch;
|
|
16
23
|
};
|
package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js
CHANGED
|
@@ -2,12 +2,14 @@ import { HTMLBuilder } from "@sankhyalabs/core";
|
|
|
2
2
|
const MINIMIUM_WIDTH_TEXTAREA = 210;
|
|
3
3
|
const PADDING_VALUE_TEXTAREA = 12;
|
|
4
4
|
export const buildTextInput = ({ name, contextName }) => {
|
|
5
|
-
|
|
5
|
+
const textInput = HTMLBuilder.parseElement(`<ez-text-input
|
|
6
6
|
class="ez-grid grid_editor"
|
|
7
7
|
data-field-name=${name}
|
|
8
8
|
data-context-name=${contextName}
|
|
9
9
|
mode="slim"
|
|
10
10
|
/>`);
|
|
11
|
+
textInput.autoFocus = true;
|
|
12
|
+
return textInput;
|
|
11
13
|
};
|
|
12
14
|
export const buildTextAreaInput = ({ eGridCell, editionManager }) => {
|
|
13
15
|
const element = HTMLBuilder.parseElement(`<ez-text-area
|
|
@@ -17,6 +19,7 @@ export const buildTextAreaInput = ({ eGridCell, editionManager }) => {
|
|
|
17
19
|
element.addEventListener('keydown', event => handlePressEnterEvent(event, element, editionManager));
|
|
18
20
|
setElementInitialWidth(eGridCell, element);
|
|
19
21
|
element.isPopUp = true;
|
|
22
|
+
element.autoFocus = true;
|
|
20
23
|
return element;
|
|
21
24
|
};
|
|
22
25
|
function setElementInitialWidth(eGridCell, element) {
|
|
@@ -11,9 +11,19 @@
|
|
|
11
11
|
/*@doc Define o z-index do componente selection counter.*/
|
|
12
12
|
--ez-grid__selection-counter--z-index: var(--visible, 1);
|
|
13
13
|
/*@doc Define o sombreamento usado como borda.*/
|
|
14
|
-
--ez-grid__container--shadow:
|
|
14
|
+
--ez-grid__container--shadow: var(--shadow);
|
|
15
15
|
/*@doc Define altura mínima da grid */
|
|
16
16
|
--ez-grid--min-height: 300px;
|
|
17
|
+
/*@doc Define o outline usado como borda.*/
|
|
18
|
+
--ez-grid__container--shadow--outline: var(--shadow--outline) var(--color--strokes);
|
|
19
|
+
/*@doc Define a sombra do header.*/
|
|
20
|
+
--ez-grid__header--shadow: var(--shadow--xsmall);
|
|
21
|
+
/*@doc Define o outline usado como borda do header.*/
|
|
22
|
+
--ez-grid__header--shadow--outline: var(--shadow--outline) var(--color--strokes);
|
|
23
|
+
/*@doc Define o outline do header.*/
|
|
24
|
+
--ez-grid__header--outline: none;
|
|
25
|
+
/*@doc Define a borda do header.*/
|
|
26
|
+
--ez-grid__header--border: none;
|
|
17
27
|
|
|
18
28
|
min-height: var(--ez-grid--min-height);
|
|
19
29
|
}
|
|
@@ -27,6 +37,18 @@
|
|
|
27
37
|
background-color: var(--ez-grid__header--background-color, #FFF);
|
|
28
38
|
}
|
|
29
39
|
|
|
40
|
+
.grid-header.shadow-mode {
|
|
41
|
+
box-shadow: var(--ez-grid__header--shadow);
|
|
42
|
+
border: var(--ez-grid__header--border);
|
|
43
|
+
outline: var(--ez-grid__header--outline);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.grid-header.outline-mode {
|
|
47
|
+
box-shadow: var(--ez-grid__header--shadow--outline);
|
|
48
|
+
border: var(--ez-grid__header--border);
|
|
49
|
+
outline: var(--ez-grid__header--outline);
|
|
50
|
+
}
|
|
51
|
+
|
|
30
52
|
.grid__container {
|
|
31
53
|
/*private*/
|
|
32
54
|
padding-top: 15px;
|
|
@@ -38,6 +60,13 @@
|
|
|
38
60
|
background-color: var(--ez-grid__header--background-color);
|
|
39
61
|
}
|
|
40
62
|
|
|
63
|
+
.grid__container.outline-mode {
|
|
64
|
+
/*public*/
|
|
65
|
+
box-shadow: var(--ez-grid__container--shadow--outline);
|
|
66
|
+
border: none;
|
|
67
|
+
outline: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
41
70
|
.grid-header__popover {
|
|
42
71
|
position: relative;
|
|
43
72
|
top: var(--space--sm, 16px);
|
|
@@ -99,14 +128,8 @@
|
|
|
99
128
|
}
|
|
100
129
|
|
|
101
130
|
.grid-header__pagination{
|
|
102
|
-
width: 30%;
|
|
103
|
-
min-width: 100px;
|
|
104
131
|
justify-content: flex-end;
|
|
105
|
-
flex-wrap:
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.grid-header__left-container{
|
|
109
|
-
width: 70%
|
|
132
|
+
flex-wrap: nowrap;
|
|
110
133
|
}
|
|
111
134
|
|
|
112
135
|
.grid-header__pagination-label {
|
|
@@ -117,3 +140,19 @@
|
|
|
117
140
|
.overflowed {
|
|
118
141
|
display: none;
|
|
119
142
|
}
|
|
143
|
+
|
|
144
|
+
.pagination-contracted {
|
|
145
|
+
width: 100px;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.pagination-expanded{
|
|
149
|
+
min-width: 150px;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.left__header-contracted {
|
|
153
|
+
width: calc(100% - 100px);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.left__header-expanded{
|
|
157
|
+
flex-grow: 1;
|
|
158
|
+
}
|