@sankhyalabs/ezui 5.22.0-dev.20 → 5.22.0-dev.21
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/{RecordValidationProcessor-4c893e04.js → RecordValidationProcessor-10846595.js} +7 -1
- package/dist/cjs/ez-form.cjs.entry.js +2 -2
- package/dist/cjs/ez-grid.cjs.entry.js +252 -15
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +106 -4
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +83 -5
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +57 -6
- package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +1 -0
- package/dist/collection/components/ez-grid/ez-grid.js +42 -0
- package/dist/collection/utils/form/DataBinder.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.js +260 -17
- package/dist/esm/{RecordValidationProcessor-b00b8b77.js → RecordValidationProcessor-9c6cc267.js} +7 -1
- package/dist/esm/ez-form.entry.js +2 -2
- package/dist/esm/ez-grid.entry.js +252 -15
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-fcf0acce.entry.js → p-4d64a3e4.entry.js} +1 -1
- package/dist/ezui/{p-5ee2dc4e.entry.js → p-a9156fef.entry.js} +2 -2
- package/dist/ezui/p-f42855b9.js +1 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +32 -4
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +19 -3
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +18 -0
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +13 -2
- package/dist/types/components/ez-grid/ez-grid.d.ts +9 -0
- package/dist/types/components.d.ts +16 -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 +1 -1
- package/dist/ezui/p-04f24913.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy(JSON.parse("[[\"ez-grid.cjs\",[[6,\"ez-grid\",{\"multipleSelection\":[4,\"multiple-selection\"],\"config\":[1040],\"selectionToastConfig\":[16],\"serverUrl\":[1,\"server-url\"],\"dataUnit\":[16],\"statusResolver\":[16],\"columnfilterDataSource\":[16],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"recordsValidator\":[16],\"canEdit\":[4,\"can-edit\"],\"autoFocus\":[4,\"auto-focus\"],\"_paginationInfo\":[32],\"_paginationChangedByKeyboard\":[32],\"_showSelectionCounter\":[32],\"_isAllSelection\":[32],\"_currentPageSelected\":[32],\"_selectionCount\":[32],\"_hasLeftButtons\":[32],\"_customFormatters\":[32],\"setColumnsDef\":[64],\"addColumnMenuItem\":[64],\"setColumnsState\":[64],\"setData\":[64],\"getSelection\":[64],\"getColumnsState\":[64],\"getColumns\":[64],\"quickFilter\":[64],\"locateColumn\":[64],\"filterColumns\":[64],\"addCustomEditor\":[64],\"addGridCustomRender\":[64],\"addCustomValueFormatter\":[64],\"removeCustomValueFormatter\":[64],\"refreshSelectedRows\":[64],\"getCustomValueFormatter\":[64],\"setFocus\":[64]},[[0,\"ezSelectionChange\",\"onSelectionChange\"]]]]],[\"ez-guide-navigator.cjs\",[[1,\"ez-guide-navigator\",{\"open\":[1540],\"selectedId\":[1537,\"selected-id\"],\"items\":[16],\"tooltipResolver\":[16],\"filterText\":[32],\"disableItem\":[64],\"openGuideNavidator\":[64],\"enableItem\":[64],\"updateItem\":[64],\"getItem\":[64],\"getCurrentPath\":[64],\"selectGuide\":[64],\"getParent\":[64]}]]],[\"ez-alert-list.cjs\",[[1,\"ez-alert-list\",{\"alerts\":[1040],\"enableDragAndDrop\":[516,\"enable-drag-and-drop\"],\"enableExpand\":[516,\"enable-expand\"],\"itemRightSlotBuilder\":[16],\"opened\":[1540],\"expanded\":[1540],\"_container\":[32]}]]],[\"ez-sidebar-navigator.cjs\",[[1,\"ez-sidebar-navigator\",{\"type\":[1],\"mode\":[1025],\"size\":[1],\"isResponsive\":[4,\"is-responsive\"],\"titleMenu\":[1,\"title-menu\"],\"showCollapseMenu\":[4,\"show-collapse-menu\"],\"showFixedButton\":[4,\"show-fixed-button\"],\"open\":[32],\"changeModeMenu\":[64],\"closeSidebar\":[64],\"openSidebar\":[64]}]]],[\"ez-actions-button.cjs\",[[1,\"ez-actions-button\",{\"enabled\":[516],\"actions\":[1040],\"size\":[513],\"showLabel\":[516,\"show-label\"],\"displayIcon\":[513,\"display-icon\"],\"checkOption\":[516,\"check-option\"],\"value\":[513],\"isTransparent\":[516,\"is-transparent\"],\"arrowActive\":[516,\"arrow-active\"],\"_selectedAction\":[32],\"hideActions\":[64],\"showActions\":[64],\"isOpened\":[64]}]]],[\"ez-breadcrumb.cjs\",[[1,\"ez-breadcrumb\",{\"items\":[1040],\"fillMode\":[1025,\"fill-mode\"],\"maxItems\":[1026,\"max-items\"],\"positionEllipsis\":[1026,\"position-ellipsis\"],\"visibleItems\":[32],\"hiddenItems\":[32],\"showDropdown\":[32],\"collapseConfigPosition\":[32]}]]],[\"ez-dialog.cjs\",[[1,\"ez-dialog\",{\"confirm\":[1028],\"dialogType\":[1025,\"dialog-type\"],\"message\":[1025],\"opened\":[1540],\"personalizedIconPath\":[1025,\"personalized-icon-path\"],\"ezTitle\":[1025,\"ez-title\"],\"beforeClose\":[1040],\"show\":[64]},[[8,\"keydown\",\"handleKeyDown\"]]]]],[\"ez-modal-container.cjs\",[[6,\"ez-modal-container\",{\"modalTitle\":[1,\"modal-title\"],\"modalSubTitle\":[1,\"modal-sub-title\"],\"showTitleBar\":[4,\"show-title-bar\"],\"cancelButtonLabel\":[1,\"cancel-button-label\"],\"okButtonLabel\":[1,\"ok-button-label\"],\"cancelButtonStatus\":[1,\"cancel-button-status\"],\"okButtonStatus\":[1,\"ok-button-status\"],\"showCloseButton\":[4,\"show-close-button\"]},[[4,\"ezCloseModal\",\"handleEzModalAction\"]]]]],[\"ez-split-button.cjs\",[[1,\"ez-split-button\",{\"enabled\":[516],\"iconName\":[513,\"icon-name\"],\"image\":[513],\"items\":[16],\"label\":[513],\"leftTitle\":[513,\"left-title\"],\"rightTitle\":[513,\"right-title\"],\"mode\":[513],\"size\":[513],\"show\":[32],\"setBlur\":[64],\"setLeftButtonFocus\":[64],\"setRightButtonFocus\":[64]},[[2,\"click\",\"clickListener\"]]]]],[\"ez-split-item.cjs\",[[4,\"ez-split-item\",{\"label\":[1],\"enableExpand\":[516,\"enable-expand\"],\"size\":[1],\"_expanded\":[32]}]]],[\"ez-alert.cjs\",[[1,\"ez-alert\",{\"alertType\":[513,\"alert-type\"]}]]],[\"ez-badge.cjs\",[[1,\"ez-badge\",{\"size\":[513],\"label\":[513],\"iconLeft\":[513,\"icon-left\"],\"iconRight\":[513,\"icon-right\"],\"position\":[1040],\"hasSlot\":[32]}]]],[\"ez-chip.cjs\",[[1,\"ez-chip\",{\"label\":[513],\"enabled\":[516],\"removePosition\":[513,\"remove-position\"],\"mode\":[513],\"value\":[1540],\"showNativeTooltip\":[4,\"show-native-tooltip\"],\"setFocus\":[64],\"setBlur\":[64]}]]],[\"ez-file-item.cjs\",[[1,\"ez-file-item\",{\"canRemove\":[4,\"can-remove\"],\"fileName\":[1,\"file-name\"],\"iconName\":[1,\"icon-name\"],\"fileSize\":[2,\"file-size\"],\"progress\":[2]}]]],[\"ez-application.cjs\",[[0,\"ez-application\"]]],[\"ez-chart.cjs\",[[1,\"ez-chart\",{\"type\":[1],\"xAxis\":[16],\"yAxis\":[16],\"chartTitle\":[1,\"chart-title\"],\"chartSubTitle\":[1,\"chart-sub-title\"],\"legendEnabled\":[4,\"legend-enabled\"],\"series\":[16],\"width\":[2],\"height\":[2]}]]],[\"ez-loading-bar.cjs\",[[1,\"ez-loading-bar\",{\"_showLoading\":[32],\"hide\":[64],\"show\":[64]}]]],[\"ez-modal.cjs\",[[1,\"ez-modal\",{\"modalSize\":[1,\"modal-size\"],\"align\":[1],\"heightMode\":[1,\"height-mode\"],\"opened\":[1028],\"closeEsc\":[4,\"close-esc\"],\"closeOutsideClick\":[4,\"close-outside-click\"],\"closeOutsideLeave\":[4,\"close-outside-leave\"],\"scrim\":[1]}]]],[\"ez-popup.cjs\",[[1,\"ez-popup\",{\"size\":[1],\"opened\":[1540],\"useHeader\":[516,\"use-header\"],\"heightMode\":[513,\"height-mode\"],\"ezTitle\":[1,\"ez-title\"],\"enabledScroll\":[4,\"enabled-scroll\"]}]]],[\"ez-radio-button.cjs\",[[1,\"ez-radio-button\",{\"value\":[1544],\"options\":[1040],\"enabled\":[516],\"label\":[513],\"direction\":[1537]}]]],[\"ez-skeleton.cjs\",[[0,\"ez-skeleton\",{\"count\":[2],\"variant\":[1],\"width\":[1],\"height\":[1],\"marginBottom\":[1,\"margin-bottom\"],\"animation\":[1]}]]],[\"ez-split-panel.cjs\",[[0,\"ez-split-panel\",{\"direction\":[1],\"anchorToExpand\":[4,\"anchor-to-expand\"],\"rebuildLayout\":[64]}]]],[\"ez-toast.cjs\",[[1,\"ez-toast\",{\"message\":[1025],\"fadeTime\":[1026,\"fade-time\"],\"useIcon\":[1028,\"use-icon\"],\"canClose\":[1028,\"can-close\"],\"show\":[64]}]]],[\"ez-view-stack.cjs\",[[0,\"ez-view-stack\",{\"show\":[64],\"getSelectedIndex\":[64]}]]],[\"ez-tabselector.cjs\",[[1,\"ez-tabselector\",{\"selectedIndex\":[1538,\"selected-index\"],\"selectedTab\":[1537,\"selected-tab\"],\"tabs\":[1],\"_processedTabs\":[32],\"goToTab\":[64]}]]],[\"ez-tree.cjs\",[[1,\"ez-tree\",{\"items\":[1040],\"value\":[1040],\"selectedId\":[1537,\"selected-id\"],\"iconResolver\":[16],\"tooltipResolver\":[16],\"_tree\":[32],\"_waintingForLoad\":[32],\"selectItem\":[64],\"openItem\":[64],\"disableItem\":[64],\"enableItem\":[64],\"addChild\":[64],\"applyFilter\":[64],\"updateItem\":[64],\"getItem\":[64],\"getCurrentPath\":[64],\"getParent\":[64]},[[2,\"keydown\",\"onKeyDownListener\"]]]]],[\"ez-multi-selection-list.cjs\",[[2,\"ez-multi-selection-list\",{\"columnName\":[1,\"column-name\"],\"dataSource\":[16],\"useOptions\":[1028,\"use-options\"],\"options\":[1040],\"isTextSearch\":[4,\"is-text-search\"],\"filteredOptions\":[32],\"displayOptions\":[32],\"viewScenario\":[32],\"displayOptionToCheckAllItems\":[32],\"clearFilteredOptions\":[64]}]]],[\"ez-collapsible-box.cjs\",[[1,\"ez-collapsible-box\",{\"value\":[1540],\"boxBordered\":[4,\"box-bordered\"],\"label\":[513],\"subtitle\":[513],\"headerSize\":[513,\"header-size\"],\"iconPlacement\":[513,\"icon-placement\"],\"headerAlign\":[513,\"header-align\"],\"removable\":[516],\"editable\":[516],\"conditionalSave\":[16],\"_activeEditText\":[32],\"showHide\":[64],\"applyFocusTextEdit\":[64],\"cancelEdition\":[64]}]]],[\"ez-combo-box.cjs\",[[1,\"ez-combo-box\",{\"limitCharsToSearch\":[2,\"limit-chars-to-search\"],\"value\":[1537],\"label\":[513],\"enabled\":[516],\"options\":[1040],\"errorMessage\":[1537,\"error-message\"],\"showSelectedValue\":[4,\"show-selected-value\"],\"showOptionValue\":[4,\"show-option-value\"],\"suppressSearch\":[4,\"suppress-search\"],\"optionLoader\":[16],\"suppressEmptyOption\":[4,\"suppress-empty-option\"],\"canShowError\":[516,\"can-show-error\"],\"mode\":[513],\"hideErrorOnFocusOut\":[4,\"hide-error-on-focus-out\"],\"listOptionsPosition\":[16],\"isTextSearch\":[4,\"is-text-search\"],\"_preSelection\":[32],\"_visibleOptions\":[32],\"_startLoading\":[32],\"_showLoading\":[32],\"_criteria\":[32],\"getValueAsync\":[64],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64],\"clearValue\":[64]},[[11,\"scroll\",\"scrollListener\"]]]]],[\"ez-time-input.cjs\",[[1,\"ez-time-input\",{\"label\":[513],\"value\":[1026],\"enabled\":[516],\"errorMessage\":[1537,\"error-message\"],\"showSeconds\":[516,\"show-seconds\"],\"mode\":[513],\"canShowError\":[516,\"can-show-error\"],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64]}]]],[\"ez-number-input.cjs\",[[1,\"ez-number-input\",{\"label\":[1],\"value\":[1538],\"enabled\":[4],\"canShowError\":[516,\"can-show-error\"],\"errorMessage\":[1537,\"error-message\"],\"precision\":[2],\"prettyPrecision\":[2,\"pretty-precision\"],\"mode\":[513],\"_value\":[32],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64],\"getValueAsync\":[64]}]]],[\"ez-popover.cjs\",[[1,\"ez-popover\",{\"autoClose\":[516,\"auto-close\"],\"boxWidth\":[513,\"box-width\"],\"opened\":[1540],\"innerElement\":[1537,\"inner-element\"],\"overlayType\":[513,\"overlay-type\"],\"updatePosition\":[64],\"show\":[64],\"showUnder\":[64],\"hide\":[64]}]]],[\"ez-list.cjs\",[[1,\"ez-list\",{\"dataSource\":[1040],\"listMode\":[1,\"list-mode\"],\"useGroups\":[1540,\"use-groups\"],\"ezDraggable\":[1028,\"ez-draggable\"],\"ezSelectable\":[1028,\"ez-selectable\"],\"itemSlotBuilder\":[1040],\"itemLeftSlotBuilder\":[1040],\"hoverFeedback\":[1028,\"hover-feedback\"],\"_listItems\":[32],\"_listGroupItems\":[32],\"clearHistory\":[64],\"scrollToTop\":[64],\"setSelection\":[64],\"getSelection\":[64],\"getList\":[64],\"removeSelection\":[64]}]]],[\"ez-calendar.cjs\",[[1,\"ez-calendar\",{\"value\":[1040],\"floating\":[516],\"time\":[516],\"showSeconds\":[516,\"show-seconds\"],\"show\":[64],\"fitVertical\":[64],\"fitHorizontal\":[64],\"hide\":[64]},[[11,\"scroll\",\"scrollListener\"]]]]],[\"ez-text-input.cjs\",[[1,\"ez-text-input\",{\"label\":[513],\"value\":[1537],\"enabled\":[516],\"errorMessage\":[1537,\"error-message\"],\"mask\":[1],\"canShowError\":[516,\"can-show-error\"],\"restrict\":[1],\"mode\":[513],\"noBorder\":[516,\"no-border\"],\"password\":[4],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64]}]]],[\"ez-date-input.cjs\",[[1,\"ez-date-input\",{\"label\":[513],\"value\":[1040],\"enabled\":[516],\"errorMessage\":[1537,\"error-message\"],\"mode\":[513],\"canShowError\":[516,\"can-show-error\"],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64],\"getValueAsync\":[64]}]]],[\"ez-date-time-input.cjs\",[[1,\"ez-date-time-input\",{\"label\":[513],\"value\":[1040],\"enabled\":[516],\"errorMessage\":[1537,\"error-message\"],\"showSeconds\":[516,\"show-seconds\"],\"mode\":[513],\"canShowError\":[516,\"can-show-error\"],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64],\"getValueAsync\":[64]}]]],[\"ez-dropdown.cjs\",[[1,\"ez-dropdown\",{\"items\":[1040],\"value\":[1040],\"itemBuilder\":[16]},[[4,\"click\",\"handleClickOutside\"]]]]],[\"ez-text-area.cjs\",[[1,\"ez-text-area\",{\"label\":[513],\"value\":[1537],\"enabled\":[516],\"errorMessage\":[1537,\"error-message\"],\"rows\":[1538],\"canShowError\":[516,\"can-show-error\"],\"mode\":[513],\"enableResize\":[516,\"enable-resize\"],\"appendTextToSelection\":[64],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64]}]]],[\"ez-upload.cjs\",[[1,\"ez-upload\",{\"label\":[1],\"subtitle\":[1],\"enabled\":[4],\"maxFileSize\":[2,\"max-file-size\"],\"maxFiles\":[2,\"max-files\"],\"requestHeaders\":[8,\"request-headers\"],\"urlUpload\":[1,\"url-upload\"],\"urlDelete\":[1,\"url-delete\"],\"value\":[1040],\"addFiles\":[64],\"setFocus\":[64],\"setBlur\":[64]}]]],[\"ez-card-item_3.cjs\",[[0,\"multi-selection-box-message\",{\"message\":[1]}],[1,\"ez-filter-input\",{\"label\":[1],\"value\":[1537],\"enabled\":[4],\"errorMessage\":[1537,\"error-message\"],\"restrict\":[1],\"mode\":[513],\"asyncSearch\":[516,\"async-search\"],\"canShowError\":[516,\"can-show-error\"],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64],\"setValue\":[64],\"endSearch\":[64]}],[1,\"ez-card-item\",{\"item\":[16],\"enableKey\":[4,\"enable-key\"]}]]],[\"ez-search.cjs\",[[1,\"ez-search\",{\"value\":[1537],\"label\":[1537],\"enabled\":[1540],\"errorMessage\":[1537,\"error-message\"],\"optionLoader\":[16],\"showSelectedValue\":[4,\"show-selected-value\"],\"showOptionValue\":[4,\"show-option-value\"],\"suppressEmptyOption\":[4,\"suppress-empty-option\"],\"mode\":[513],\"canShowError\":[516,\"can-show-error\"],\"hideErrorOnFocusOut\":[4,\"hide-error-on-focus-out\"],\"listOptionsPosition\":[16],\"isTextSearch\":[4,\"is-text-search\"],\"ignoreLimitCharsToSearch\":[4,\"ignore-limit-chars-to-search\"],\"options\":[1040],\"suppressSearch\":[4,\"suppress-search\"],\"fromGrid\":[4,\"from-grid\"],\"_preSelection\":[32],\"_visibleOptions\":[32],\"_startLoading\":[32],\"_showLoading\":[32],\"_criteria\":[32],\"getValueAsync\":[64],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64],\"clearValue\":[64]},[[11,\"scroll\",\"scrollListener\"]]]]],[\"ez-check.cjs\",[[1,\"ez-check\",{\"label\":[513],\"value\":[1540],\"enabled\":[1540],\"indeterminate\":[1540],\"mode\":[513],\"compact\":[4],\"getMode\":[64],\"setFocus\":[64]}]]],[\"ez-icon.cjs\",[[1,\"ez-icon\",{\"size\":[513],\"href\":[513],\"iconName\":[513,\"icon-name\"]}]]],[\"ez-button.cjs\",[[1,\"ez-button\",{\"label\":[513],\"enabled\":[516],\"mode\":[513],\"image\":[513],\"iconName\":[513,\"icon-name\"],\"size\":[513],\"setFocus\":[64],\"setBlur\":[64]},[[2,\"click\",\"clickListener\"]]]]],[\"ez-custom-form-input_2.cjs\",[[2,\"ez-custom-form-input\",{\"customEditor\":[16],\"formViewField\":[16],\"value\":[1032],\"detailContext\":[1,\"detail-context\"],\"builderFallback\":[16],\"selectedRecord\":[16],\"gui\":[32],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64]}],[1,\"ez-text-edit\",{\"value\":[1],\"styled\":[16],\"_newValue\":[32],\"applyFocusSelect\":[64]}]]],[\"ez-form-view.cjs\",[[2,\"ez-form-view\",{\"fields\":[16],\"selectedRecord\":[16],\"_customEditors\":[32],\"showUp\":[64],\"addCustomEditor\":[64],\"setFieldProp\":[64]}]]],[\"ez-form.cjs\",[[2,\"ez-form\",{\"dataUnit\":[1040],\"config\":[16],\"recordsValidator\":[16],\"fieldToFocus\":[1,\"field-to-focus\"],\"onlyStaticFields\":[4,\"only-static-fields\"],\"_fieldsProps\":[32],\"validate\":[64],\"addCustomEditor\":[64],\"setFieldProp\":[64]}]]],[\"filter-column.cjs\",[[0,\"filter-column\",{\"opened\":[4],\"columnName\":[1,\"column-name\"],\"columnLabel\":[1,\"column-label\"],\"gridHeaderHidden\":[4,\"grid-header-hidden\"],\"noHeaderTaskBar\":[1028,\"no-header-task-bar\"],\"dataSource\":[16],\"dataUnit\":[16],\"options\":[1040],\"selectedItems\":[32],\"fieldDescriptor\":[32],\"useOptions\":[32],\"isTextSearch\":[32],\"hide\":[64],\"show\":[64]}]]],[\"ez-scroller_2.cjs\",[[1,\"ez-sidebar-button\"],[1,\"ez-scroller\",{\"direction\":[1],\"locked\":[4],\"activeShadow\":[4,\"active-shadow\"],\"isActive\":[32]},[[2,\"click\",\"clickListener\"],[1,\"mousedown\",\"mouseDownHandler\"],[1,\"mouseup\",\"mouseUpHandler\"],[1,\"mousemove\",\"mouseMoveHandler\"]]]]]]"), options);
|
|
17
|
+
return index.bootstrapLazy(JSON.parse("[[\"ez-grid.cjs\",[[6,\"ez-grid\",{\"multipleSelection\":[4,\"multiple-selection\"],\"config\":[1040],\"selectionToastConfig\":[16],\"serverUrl\":[1,\"server-url\"],\"dataUnit\":[16],\"statusResolver\":[16],\"columnfilterDataSource\":[16],\"useEnterLikeTab\":[4,\"use-enter-like-tab\"],\"recordsValidator\":[16],\"canEdit\":[4,\"can-edit\"],\"autoFocus\":[4,\"auto-focus\"],\"enableGridInsert\":[4,\"enable-grid-insert\"],\"enableContinuousInsert\":[4,\"enable-continuous-insert\"],\"_paginationInfo\":[32],\"_paginationChangedByKeyboard\":[32],\"_showSelectionCounter\":[32],\"_isAllSelection\":[32],\"_currentPageSelected\":[32],\"_selectionCount\":[32],\"_hasLeftButtons\":[32],\"_customFormatters\":[32],\"setColumnsDef\":[64],\"addColumnMenuItem\":[64],\"setColumnsState\":[64],\"setData\":[64],\"getSelection\":[64],\"getColumnsState\":[64],\"getColumns\":[64],\"quickFilter\":[64],\"locateColumn\":[64],\"filterColumns\":[64],\"addCustomEditor\":[64],\"addGridCustomRender\":[64],\"addCustomValueFormatter\":[64],\"removeCustomValueFormatter\":[64],\"refreshSelectedRows\":[64],\"getCustomValueFormatter\":[64],\"setFocus\":[64]},[[0,\"ezSelectionChange\",\"onSelectionChange\"]]]]],[\"ez-guide-navigator.cjs\",[[1,\"ez-guide-navigator\",{\"open\":[1540],\"selectedId\":[1537,\"selected-id\"],\"items\":[16],\"tooltipResolver\":[16],\"filterText\":[32],\"disableItem\":[64],\"openGuideNavidator\":[64],\"enableItem\":[64],\"updateItem\":[64],\"getItem\":[64],\"getCurrentPath\":[64],\"selectGuide\":[64],\"getParent\":[64]}]]],[\"ez-alert-list.cjs\",[[1,\"ez-alert-list\",{\"alerts\":[1040],\"enableDragAndDrop\":[516,\"enable-drag-and-drop\"],\"enableExpand\":[516,\"enable-expand\"],\"itemRightSlotBuilder\":[16],\"opened\":[1540],\"expanded\":[1540],\"_container\":[32]}]]],[\"ez-sidebar-navigator.cjs\",[[1,\"ez-sidebar-navigator\",{\"type\":[1],\"mode\":[1025],\"size\":[1],\"isResponsive\":[4,\"is-responsive\"],\"titleMenu\":[1,\"title-menu\"],\"showCollapseMenu\":[4,\"show-collapse-menu\"],\"showFixedButton\":[4,\"show-fixed-button\"],\"open\":[32],\"changeModeMenu\":[64],\"closeSidebar\":[64],\"openSidebar\":[64]}]]],[\"ez-actions-button.cjs\",[[1,\"ez-actions-button\",{\"enabled\":[516],\"actions\":[1040],\"size\":[513],\"showLabel\":[516,\"show-label\"],\"displayIcon\":[513,\"display-icon\"],\"checkOption\":[516,\"check-option\"],\"value\":[513],\"isTransparent\":[516,\"is-transparent\"],\"arrowActive\":[516,\"arrow-active\"],\"_selectedAction\":[32],\"hideActions\":[64],\"showActions\":[64],\"isOpened\":[64]}]]],[\"ez-breadcrumb.cjs\",[[1,\"ez-breadcrumb\",{\"items\":[1040],\"fillMode\":[1025,\"fill-mode\"],\"maxItems\":[1026,\"max-items\"],\"positionEllipsis\":[1026,\"position-ellipsis\"],\"visibleItems\":[32],\"hiddenItems\":[32],\"showDropdown\":[32],\"collapseConfigPosition\":[32]}]]],[\"ez-dialog.cjs\",[[1,\"ez-dialog\",{\"confirm\":[1028],\"dialogType\":[1025,\"dialog-type\"],\"message\":[1025],\"opened\":[1540],\"personalizedIconPath\":[1025,\"personalized-icon-path\"],\"ezTitle\":[1025,\"ez-title\"],\"beforeClose\":[1040],\"show\":[64]},[[8,\"keydown\",\"handleKeyDown\"]]]]],[\"ez-modal-container.cjs\",[[6,\"ez-modal-container\",{\"modalTitle\":[1,\"modal-title\"],\"modalSubTitle\":[1,\"modal-sub-title\"],\"showTitleBar\":[4,\"show-title-bar\"],\"cancelButtonLabel\":[1,\"cancel-button-label\"],\"okButtonLabel\":[1,\"ok-button-label\"],\"cancelButtonStatus\":[1,\"cancel-button-status\"],\"okButtonStatus\":[1,\"ok-button-status\"],\"showCloseButton\":[4,\"show-close-button\"]},[[4,\"ezCloseModal\",\"handleEzModalAction\"]]]]],[\"ez-split-button.cjs\",[[1,\"ez-split-button\",{\"enabled\":[516],\"iconName\":[513,\"icon-name\"],\"image\":[513],\"items\":[16],\"label\":[513],\"leftTitle\":[513,\"left-title\"],\"rightTitle\":[513,\"right-title\"],\"mode\":[513],\"size\":[513],\"show\":[32],\"setBlur\":[64],\"setLeftButtonFocus\":[64],\"setRightButtonFocus\":[64]},[[2,\"click\",\"clickListener\"]]]]],[\"ez-split-item.cjs\",[[4,\"ez-split-item\",{\"label\":[1],\"enableExpand\":[516,\"enable-expand\"],\"size\":[1],\"_expanded\":[32]}]]],[\"ez-alert.cjs\",[[1,\"ez-alert\",{\"alertType\":[513,\"alert-type\"]}]]],[\"ez-badge.cjs\",[[1,\"ez-badge\",{\"size\":[513],\"label\":[513],\"iconLeft\":[513,\"icon-left\"],\"iconRight\":[513,\"icon-right\"],\"position\":[1040],\"hasSlot\":[32]}]]],[\"ez-chip.cjs\",[[1,\"ez-chip\",{\"label\":[513],\"enabled\":[516],\"removePosition\":[513,\"remove-position\"],\"mode\":[513],\"value\":[1540],\"showNativeTooltip\":[4,\"show-native-tooltip\"],\"setFocus\":[64],\"setBlur\":[64]}]]],[\"ez-file-item.cjs\",[[1,\"ez-file-item\",{\"canRemove\":[4,\"can-remove\"],\"fileName\":[1,\"file-name\"],\"iconName\":[1,\"icon-name\"],\"fileSize\":[2,\"file-size\"],\"progress\":[2]}]]],[\"ez-application.cjs\",[[0,\"ez-application\"]]],[\"ez-chart.cjs\",[[1,\"ez-chart\",{\"type\":[1],\"xAxis\":[16],\"yAxis\":[16],\"chartTitle\":[1,\"chart-title\"],\"chartSubTitle\":[1,\"chart-sub-title\"],\"legendEnabled\":[4,\"legend-enabled\"],\"series\":[16],\"width\":[2],\"height\":[2]}]]],[\"ez-loading-bar.cjs\",[[1,\"ez-loading-bar\",{\"_showLoading\":[32],\"hide\":[64],\"show\":[64]}]]],[\"ez-modal.cjs\",[[1,\"ez-modal\",{\"modalSize\":[1,\"modal-size\"],\"align\":[1],\"heightMode\":[1,\"height-mode\"],\"opened\":[1028],\"closeEsc\":[4,\"close-esc\"],\"closeOutsideClick\":[4,\"close-outside-click\"],\"closeOutsideLeave\":[4,\"close-outside-leave\"],\"scrim\":[1]}]]],[\"ez-popup.cjs\",[[1,\"ez-popup\",{\"size\":[1],\"opened\":[1540],\"useHeader\":[516,\"use-header\"],\"heightMode\":[513,\"height-mode\"],\"ezTitle\":[1,\"ez-title\"],\"enabledScroll\":[4,\"enabled-scroll\"]}]]],[\"ez-radio-button.cjs\",[[1,\"ez-radio-button\",{\"value\":[1544],\"options\":[1040],\"enabled\":[516],\"label\":[513],\"direction\":[1537]}]]],[\"ez-skeleton.cjs\",[[0,\"ez-skeleton\",{\"count\":[2],\"variant\":[1],\"width\":[1],\"height\":[1],\"marginBottom\":[1,\"margin-bottom\"],\"animation\":[1]}]]],[\"ez-split-panel.cjs\",[[0,\"ez-split-panel\",{\"direction\":[1],\"anchorToExpand\":[4,\"anchor-to-expand\"],\"rebuildLayout\":[64]}]]],[\"ez-toast.cjs\",[[1,\"ez-toast\",{\"message\":[1025],\"fadeTime\":[1026,\"fade-time\"],\"useIcon\":[1028,\"use-icon\"],\"canClose\":[1028,\"can-close\"],\"show\":[64]}]]],[\"ez-view-stack.cjs\",[[0,\"ez-view-stack\",{\"show\":[64],\"getSelectedIndex\":[64]}]]],[\"ez-tabselector.cjs\",[[1,\"ez-tabselector\",{\"selectedIndex\":[1538,\"selected-index\"],\"selectedTab\":[1537,\"selected-tab\"],\"tabs\":[1],\"_processedTabs\":[32],\"goToTab\":[64]}]]],[\"ez-tree.cjs\",[[1,\"ez-tree\",{\"items\":[1040],\"value\":[1040],\"selectedId\":[1537,\"selected-id\"],\"iconResolver\":[16],\"tooltipResolver\":[16],\"_tree\":[32],\"_waintingForLoad\":[32],\"selectItem\":[64],\"openItem\":[64],\"disableItem\":[64],\"enableItem\":[64],\"addChild\":[64],\"applyFilter\":[64],\"updateItem\":[64],\"getItem\":[64],\"getCurrentPath\":[64],\"getParent\":[64]},[[2,\"keydown\",\"onKeyDownListener\"]]]]],[\"ez-multi-selection-list.cjs\",[[2,\"ez-multi-selection-list\",{\"columnName\":[1,\"column-name\"],\"dataSource\":[16],\"useOptions\":[1028,\"use-options\"],\"options\":[1040],\"isTextSearch\":[4,\"is-text-search\"],\"filteredOptions\":[32],\"displayOptions\":[32],\"viewScenario\":[32],\"displayOptionToCheckAllItems\":[32],\"clearFilteredOptions\":[64]}]]],[\"ez-collapsible-box.cjs\",[[1,\"ez-collapsible-box\",{\"value\":[1540],\"boxBordered\":[4,\"box-bordered\"],\"label\":[513],\"subtitle\":[513],\"headerSize\":[513,\"header-size\"],\"iconPlacement\":[513,\"icon-placement\"],\"headerAlign\":[513,\"header-align\"],\"removable\":[516],\"editable\":[516],\"conditionalSave\":[16],\"_activeEditText\":[32],\"showHide\":[64],\"applyFocusTextEdit\":[64],\"cancelEdition\":[64]}]]],[\"ez-combo-box.cjs\",[[1,\"ez-combo-box\",{\"limitCharsToSearch\":[2,\"limit-chars-to-search\"],\"value\":[1537],\"label\":[513],\"enabled\":[516],\"options\":[1040],\"errorMessage\":[1537,\"error-message\"],\"showSelectedValue\":[4,\"show-selected-value\"],\"showOptionValue\":[4,\"show-option-value\"],\"suppressSearch\":[4,\"suppress-search\"],\"optionLoader\":[16],\"suppressEmptyOption\":[4,\"suppress-empty-option\"],\"canShowError\":[516,\"can-show-error\"],\"mode\":[513],\"hideErrorOnFocusOut\":[4,\"hide-error-on-focus-out\"],\"listOptionsPosition\":[16],\"isTextSearch\":[4,\"is-text-search\"],\"_preSelection\":[32],\"_visibleOptions\":[32],\"_startLoading\":[32],\"_showLoading\":[32],\"_criteria\":[32],\"getValueAsync\":[64],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64],\"clearValue\":[64]},[[11,\"scroll\",\"scrollListener\"]]]]],[\"ez-time-input.cjs\",[[1,\"ez-time-input\",{\"label\":[513],\"value\":[1026],\"enabled\":[516],\"errorMessage\":[1537,\"error-message\"],\"showSeconds\":[516,\"show-seconds\"],\"mode\":[513],\"canShowError\":[516,\"can-show-error\"],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64]}]]],[\"ez-number-input.cjs\",[[1,\"ez-number-input\",{\"label\":[1],\"value\":[1538],\"enabled\":[4],\"canShowError\":[516,\"can-show-error\"],\"errorMessage\":[1537,\"error-message\"],\"precision\":[2],\"prettyPrecision\":[2,\"pretty-precision\"],\"mode\":[513],\"_value\":[32],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64],\"getValueAsync\":[64]}]]],[\"ez-popover.cjs\",[[1,\"ez-popover\",{\"autoClose\":[516,\"auto-close\"],\"boxWidth\":[513,\"box-width\"],\"opened\":[1540],\"innerElement\":[1537,\"inner-element\"],\"overlayType\":[513,\"overlay-type\"],\"updatePosition\":[64],\"show\":[64],\"showUnder\":[64],\"hide\":[64]}]]],[\"ez-list.cjs\",[[1,\"ez-list\",{\"dataSource\":[1040],\"listMode\":[1,\"list-mode\"],\"useGroups\":[1540,\"use-groups\"],\"ezDraggable\":[1028,\"ez-draggable\"],\"ezSelectable\":[1028,\"ez-selectable\"],\"itemSlotBuilder\":[1040],\"itemLeftSlotBuilder\":[1040],\"hoverFeedback\":[1028,\"hover-feedback\"],\"_listItems\":[32],\"_listGroupItems\":[32],\"clearHistory\":[64],\"scrollToTop\":[64],\"setSelection\":[64],\"getSelection\":[64],\"getList\":[64],\"removeSelection\":[64]}]]],[\"ez-calendar.cjs\",[[1,\"ez-calendar\",{\"value\":[1040],\"floating\":[516],\"time\":[516],\"showSeconds\":[516,\"show-seconds\"],\"show\":[64],\"fitVertical\":[64],\"fitHorizontal\":[64],\"hide\":[64]},[[11,\"scroll\",\"scrollListener\"]]]]],[\"ez-text-input.cjs\",[[1,\"ez-text-input\",{\"label\":[513],\"value\":[1537],\"enabled\":[516],\"errorMessage\":[1537,\"error-message\"],\"mask\":[1],\"canShowError\":[516,\"can-show-error\"],\"restrict\":[1],\"mode\":[513],\"noBorder\":[516,\"no-border\"],\"password\":[4],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64]}]]],[\"ez-date-input.cjs\",[[1,\"ez-date-input\",{\"label\":[513],\"value\":[1040],\"enabled\":[516],\"errorMessage\":[1537,\"error-message\"],\"mode\":[513],\"canShowError\":[516,\"can-show-error\"],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64],\"getValueAsync\":[64]}]]],[\"ez-date-time-input.cjs\",[[1,\"ez-date-time-input\",{\"label\":[513],\"value\":[1040],\"enabled\":[516],\"errorMessage\":[1537,\"error-message\"],\"showSeconds\":[516,\"show-seconds\"],\"mode\":[513],\"canShowError\":[516,\"can-show-error\"],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64],\"getValueAsync\":[64]}]]],[\"ez-dropdown.cjs\",[[1,\"ez-dropdown\",{\"items\":[1040],\"value\":[1040],\"itemBuilder\":[16]},[[4,\"click\",\"handleClickOutside\"]]]]],[\"ez-text-area.cjs\",[[1,\"ez-text-area\",{\"label\":[513],\"value\":[1537],\"enabled\":[516],\"errorMessage\":[1537,\"error-message\"],\"rows\":[1538],\"canShowError\":[516,\"can-show-error\"],\"mode\":[513],\"enableResize\":[516,\"enable-resize\"],\"appendTextToSelection\":[64],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64]}]]],[\"ez-upload.cjs\",[[1,\"ez-upload\",{\"label\":[1],\"subtitle\":[1],\"enabled\":[4],\"maxFileSize\":[2,\"max-file-size\"],\"maxFiles\":[2,\"max-files\"],\"requestHeaders\":[8,\"request-headers\"],\"urlUpload\":[1,\"url-upload\"],\"urlDelete\":[1,\"url-delete\"],\"value\":[1040],\"addFiles\":[64],\"setFocus\":[64],\"setBlur\":[64]}]]],[\"ez-card-item_3.cjs\",[[0,\"multi-selection-box-message\",{\"message\":[1]}],[1,\"ez-filter-input\",{\"label\":[1],\"value\":[1537],\"enabled\":[4],\"errorMessage\":[1537,\"error-message\"],\"restrict\":[1],\"mode\":[513],\"asyncSearch\":[516,\"async-search\"],\"canShowError\":[516,\"can-show-error\"],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64],\"setValue\":[64],\"endSearch\":[64]}],[1,\"ez-card-item\",{\"item\":[16],\"enableKey\":[4,\"enable-key\"]}]]],[\"ez-search.cjs\",[[1,\"ez-search\",{\"value\":[1537],\"label\":[1537],\"enabled\":[1540],\"errorMessage\":[1537,\"error-message\"],\"optionLoader\":[16],\"showSelectedValue\":[4,\"show-selected-value\"],\"showOptionValue\":[4,\"show-option-value\"],\"suppressEmptyOption\":[4,\"suppress-empty-option\"],\"mode\":[513],\"canShowError\":[516,\"can-show-error\"],\"hideErrorOnFocusOut\":[4,\"hide-error-on-focus-out\"],\"listOptionsPosition\":[16],\"isTextSearch\":[4,\"is-text-search\"],\"ignoreLimitCharsToSearch\":[4,\"ignore-limit-chars-to-search\"],\"options\":[1040],\"suppressSearch\":[4,\"suppress-search\"],\"fromGrid\":[4,\"from-grid\"],\"_preSelection\":[32],\"_visibleOptions\":[32],\"_startLoading\":[32],\"_showLoading\":[32],\"_criteria\":[32],\"getValueAsync\":[64],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64],\"clearValue\":[64]},[[11,\"scroll\",\"scrollListener\"]]]]],[\"ez-check.cjs\",[[1,\"ez-check\",{\"label\":[513],\"value\":[1540],\"enabled\":[1540],\"indeterminate\":[1540],\"mode\":[513],\"compact\":[4],\"getMode\":[64],\"setFocus\":[64]}]]],[\"ez-icon.cjs\",[[1,\"ez-icon\",{\"size\":[513],\"href\":[513],\"iconName\":[513,\"icon-name\"]}]]],[\"ez-button.cjs\",[[1,\"ez-button\",{\"label\":[513],\"enabled\":[516],\"mode\":[513],\"image\":[513],\"iconName\":[513,\"icon-name\"],\"size\":[513],\"setFocus\":[64],\"setBlur\":[64]},[[2,\"click\",\"clickListener\"]]]]],[\"ez-custom-form-input_2.cjs\",[[2,\"ez-custom-form-input\",{\"customEditor\":[16],\"formViewField\":[16],\"value\":[1032],\"detailContext\":[1,\"detail-context\"],\"builderFallback\":[16],\"selectedRecord\":[16],\"gui\":[32],\"setFocus\":[64],\"setBlur\":[64],\"isInvalid\":[64]}],[1,\"ez-text-edit\",{\"value\":[1],\"styled\":[16],\"_newValue\":[32],\"applyFocusSelect\":[64]}]]],[\"ez-form-view.cjs\",[[2,\"ez-form-view\",{\"fields\":[16],\"selectedRecord\":[16],\"_customEditors\":[32],\"showUp\":[64],\"addCustomEditor\":[64],\"setFieldProp\":[64]}]]],[\"ez-form.cjs\",[[2,\"ez-form\",{\"dataUnit\":[1040],\"config\":[16],\"recordsValidator\":[16],\"fieldToFocus\":[1,\"field-to-focus\"],\"onlyStaticFields\":[4,\"only-static-fields\"],\"_fieldsProps\":[32],\"validate\":[64],\"addCustomEditor\":[64],\"setFieldProp\":[64]}]]],[\"filter-column.cjs\",[[0,\"filter-column\",{\"opened\":[4],\"columnName\":[1,\"column-name\"],\"columnLabel\":[1,\"column-label\"],\"gridHeaderHidden\":[4,\"grid-header-hidden\"],\"noHeaderTaskBar\":[1028,\"no-header-task-bar\"],\"dataSource\":[16],\"dataUnit\":[16],\"options\":[1040],\"selectedItems\":[32],\"fieldDescriptor\":[32],\"useOptions\":[32],\"isTextSearch\":[32],\"hide\":[64],\"show\":[64]}]]],[\"ez-scroller_2.cjs\",[[1,\"ez-sidebar-button\"],[1,\"ez-scroller\",{\"direction\":[1],\"locked\":[4],\"activeShadow\":[4,\"active-shadow\"],\"isActive\":[32]},[[2,\"click\",\"clickListener\"],[1,\"mousedown\",\"mouseDownHandler\"],[1,\"mouseup\",\"mouseUpHandler\"],[1,\"mousemove\",\"mouseMoveHandler\"]]]]]]"), options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -41,6 +41,8 @@ export default class AgGridController {
|
|
|
41
41
|
this._filteredColumns = new Map();
|
|
42
42
|
this._filterColumnleftPosition = 0;
|
|
43
43
|
this._customFormatters = new Map();
|
|
44
|
+
this._gridShowDom = false;
|
|
45
|
+
this.peddingExecutionsOnGridShow = [];
|
|
44
46
|
this._enterprise = enterprise;
|
|
45
47
|
}
|
|
46
48
|
getGridConfig() {
|
|
@@ -126,7 +128,7 @@ export default class AgGridController {
|
|
|
126
128
|
this._doubleClickCallBack = options.onDoubleClick;
|
|
127
129
|
this._multipleSelection = options.allowMultipleSelection;
|
|
128
130
|
this._dataUnit = options.dataUnit;
|
|
129
|
-
this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled, options.customEditors || this._customEditors, options.customRenders || this._customRenders);
|
|
131
|
+
this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled, options.customEditors || this._customEditors, options.customRenders || this._customRenders, options.enableContinuousInsert);
|
|
130
132
|
this._statusResolver = options.statusResolver;
|
|
131
133
|
if (this._dataUnit) {
|
|
132
134
|
this._dataUnit.sortingProvider = this;
|
|
@@ -146,6 +148,9 @@ export default class AgGridController {
|
|
|
146
148
|
defaultColDef: {
|
|
147
149
|
headerClass: 'ez-grid__cell-header',
|
|
148
150
|
cellClass: 'ez-grid__cell-body',
|
|
151
|
+
cellClassRules: {
|
|
152
|
+
'invalidValue': (params) => this._editionManager.hasInvalidField(params.colDef.field, params.data["__record__id__"]),
|
|
153
|
+
},
|
|
149
154
|
cellStyle: {
|
|
150
155
|
height: '100%'
|
|
151
156
|
}
|
|
@@ -185,6 +190,23 @@ export default class AgGridController {
|
|
|
185
190
|
}
|
|
186
191
|
this._gridOptions.api.setHeaderHeight(this.getHeaderRowHeight());
|
|
187
192
|
this._customFormatters = options.customFormatters;
|
|
193
|
+
const observerCallback = (entries) => {
|
|
194
|
+
entries.forEach(entry => {
|
|
195
|
+
if (entry.isIntersecting) {
|
|
196
|
+
this._gridShowDom = true;
|
|
197
|
+
this.peddingExecutionsOnGridShow.forEach(func => func());
|
|
198
|
+
this.peddingExecutionsOnGridShow = [];
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
this._gridShowDom = false;
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
};
|
|
205
|
+
this.observer = new IntersectionObserver(observerCallback, {
|
|
206
|
+
root: null,
|
|
207
|
+
threshold: 0.1
|
|
208
|
+
});
|
|
209
|
+
this.observer.observe(container);
|
|
188
210
|
}
|
|
189
211
|
}
|
|
190
212
|
processFormatterCellCallback(params) {
|
|
@@ -375,10 +397,16 @@ export default class AgGridController {
|
|
|
375
397
|
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
376
398
|
}
|
|
377
399
|
}
|
|
378
|
-
updateRows() {
|
|
400
|
+
updateRows(rows) {
|
|
379
401
|
if (this._grid === undefined) {
|
|
380
402
|
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
381
403
|
}
|
|
404
|
+
rows === null || rows === void 0 ? void 0 : rows.forEach(row => this.updateRowData(row));
|
|
405
|
+
}
|
|
406
|
+
updateRowData(row) {
|
|
407
|
+
const node = this._gridOptions.api.getRowNode(row[this._idAttribName]);
|
|
408
|
+
node.setData(Object.assign({}, row));
|
|
409
|
+
this._editionManager.recordValidate();
|
|
382
410
|
}
|
|
383
411
|
selectAll(quietly = false) {
|
|
384
412
|
try {
|
|
@@ -461,14 +489,42 @@ export default class AgGridController {
|
|
|
461
489
|
});
|
|
462
490
|
r.setData(data);
|
|
463
491
|
});
|
|
492
|
+
this._gridOptions.api.refreshCells({ force: true });
|
|
493
|
+
const invalidCell = this._editionManager.getInvalidCell();
|
|
494
|
+
if (invalidCell) {
|
|
495
|
+
const rowNode = this._gridOptions.api.getRowNode(invalidCell.recordId);
|
|
496
|
+
if (rowNode && invalidCell.field) {
|
|
497
|
+
this.startEdition(rowNode.rowIndex, this._gridOptions.columnApi.getColumn(invalidCell.field.name));
|
|
498
|
+
}
|
|
499
|
+
}
|
|
464
500
|
}
|
|
465
501
|
}
|
|
466
|
-
|
|
502
|
+
savingCanceled(fields, recordId) {
|
|
503
|
+
const displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
|
|
504
|
+
const rowIndex = this._gridOptions.api.getRowNode(recordId).rowIndex;
|
|
505
|
+
const columnFocus = displayedColumns.find(column => this.isColumnEditable(rowIndex, column) && fields.find(field => field.name === column.getColId()));
|
|
506
|
+
this.focusByCollAndRow(columnFocus, rowIndex);
|
|
507
|
+
this.startEdition(rowIndex, columnFocus);
|
|
508
|
+
}
|
|
509
|
+
refresh(scrollToSelectedRow = false) {
|
|
467
510
|
if (this._grid === undefined) {
|
|
468
511
|
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
469
512
|
}
|
|
470
513
|
this._gridOptions.api.refreshServerSide({ purge: true });
|
|
471
514
|
this._options.onRefresh();
|
|
515
|
+
if (scrollToSelectedRow)
|
|
516
|
+
this.scrollToSelectedRow();
|
|
517
|
+
}
|
|
518
|
+
scrollToSelectedRow() {
|
|
519
|
+
const rowNode = this._gridOptions.api.getSelectedNodes();
|
|
520
|
+
if (!rowNode || rowNode.length === 0)
|
|
521
|
+
return;
|
|
522
|
+
if (this._gridShowDom) {
|
|
523
|
+
this._gridOptions.api.ensureNodeVisible(rowNode[0]);
|
|
524
|
+
}
|
|
525
|
+
else {
|
|
526
|
+
this.peddingExecutionsOnGridShow.push(() => this._gridOptions.api.ensureNodeVisible(rowNode[0]));
|
|
527
|
+
}
|
|
472
528
|
}
|
|
473
529
|
focusOnGridContainer() {
|
|
474
530
|
this._container.setAttribute('tabindex', '-1');
|
|
@@ -487,6 +543,14 @@ export default class AgGridController {
|
|
|
487
543
|
var _a;
|
|
488
544
|
(_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.setAutoFocus(autoFocus);
|
|
489
545
|
}
|
|
546
|
+
setEnableGridInsert(enable) {
|
|
547
|
+
var _a;
|
|
548
|
+
(_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.setEnableGridInsert(enable);
|
|
549
|
+
}
|
|
550
|
+
setEnableContinuousInsert(enable) {
|
|
551
|
+
var _a;
|
|
552
|
+
(_a = this._editionManager) === null || _a === void 0 ? void 0 : _a.setEnableContinuousInsert(enable);
|
|
553
|
+
}
|
|
490
554
|
setFocusFirstRow() {
|
|
491
555
|
const firstRow = this._gridOptions.api.getDisplayedRowAtIndex(0);
|
|
492
556
|
if (firstRow) {
|
|
@@ -502,9 +566,38 @@ export default class AgGridController {
|
|
|
502
566
|
this.setFocusOnRow(lastRow.rowIndex);
|
|
503
567
|
}
|
|
504
568
|
}
|
|
569
|
+
startEditionOnRowByIndex(rowIndex) {
|
|
570
|
+
const firstCol = this.getFirstEditableColl(rowIndex);
|
|
571
|
+
this.focusByCollAndRow(firstCol, rowIndex);
|
|
572
|
+
this.startEdition(rowIndex, firstCol);
|
|
573
|
+
}
|
|
574
|
+
startEdition(rowIndex, firstCol) {
|
|
575
|
+
this._gridOptions.api.clearRangeSelection();
|
|
576
|
+
this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [firstCol] });
|
|
577
|
+
this._gridOptions.api.setFocusedCell(rowIndex, firstCol);
|
|
578
|
+
this._gridOptions.api.startEditingCell({ rowIndex, colKey: firstCol });
|
|
579
|
+
const cellEditor = this._gridOptions.api.getCellEditorInstances()[0];
|
|
580
|
+
if (cellEditor) {
|
|
581
|
+
cellEditor.focusIn();
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
getFirstEditableColl(rowIndex) {
|
|
585
|
+
const displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
|
|
586
|
+
return displayedColumns.find(column => this.isColumnEditable(rowIndex, column));
|
|
587
|
+
}
|
|
588
|
+
isColumnEditable(rowIndex, column) {
|
|
589
|
+
if (column.getColDef().headerName === '' || rowIndex === -1)
|
|
590
|
+
return false;
|
|
591
|
+
const rowId = this._dataUnit.records[rowIndex][this._idAttribName];
|
|
592
|
+
const rowNode = this._gridOptions.api.getRowNode(rowId);
|
|
593
|
+
return column.isCellEditable(rowNode);
|
|
594
|
+
}
|
|
505
595
|
setFocusOnRow(rowIndex) {
|
|
506
596
|
let displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
|
|
507
|
-
let
|
|
597
|
+
let firstColl = displayedColumns.find(column => column.getColDef().headerName !== '');
|
|
598
|
+
this.focusByCollAndRow(firstColl, rowIndex);
|
|
599
|
+
}
|
|
600
|
+
focusByCollAndRow(firstCell, rowIndex) {
|
|
508
601
|
this._gridOptions.api.ensureColumnVisible(firstCell);
|
|
509
602
|
this._gridOptions.api.ensureIndexVisible(rowIndex);
|
|
510
603
|
this._gridOptions.api.setFocusedCell(rowIndex, firstCell);
|
|
@@ -884,4 +977,13 @@ export default class AgGridController {
|
|
|
884
977
|
this._editionManager.setCellRenders(customRenders);
|
|
885
978
|
(_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api.redrawRows();
|
|
886
979
|
}
|
|
980
|
+
clearInvalidCells(action) {
|
|
981
|
+
if (!this._editionManager)
|
|
982
|
+
return;
|
|
983
|
+
this._editionManager.clearInvalidCells(action);
|
|
984
|
+
this._gridOptions.api.refreshCells({ force: true });
|
|
985
|
+
}
|
|
986
|
+
destroy() {
|
|
987
|
+
this.observer.disconnect();
|
|
988
|
+
}
|
|
887
989
|
}
|
|
@@ -2,6 +2,73 @@ import { Action, ObjectUtils } from '@sankhyalabs/core';
|
|
|
2
2
|
import { EZ_GRID_LOADING_SOURCE } from "../../../../utils/constants";
|
|
3
3
|
import { DataSourceInterceptor } from "./DataSourceInterceptor";
|
|
4
4
|
export default class DataSource {
|
|
5
|
+
handleSavingCanceled(action) {
|
|
6
|
+
var _a, _b, _c, _d;
|
|
7
|
+
if (!((_a = action.payload) === null || _a === void 0 ? void 0 : _a.fields) || !((_b = action.payload) === null || _b === void 0 ? void 0 : _b.recordId))
|
|
8
|
+
return;
|
|
9
|
+
this._controller.savingCanceled((_c = action.payload) === null || _c === void 0 ? void 0 : _c.fields, (_d = action.payload) === null || _d === void 0 ? void 0 : _d.recordId);
|
|
10
|
+
}
|
|
11
|
+
handleDataChanged(action) {
|
|
12
|
+
var _a, _b;
|
|
13
|
+
if (!this._options.enableGridInsert) {
|
|
14
|
+
this.handleRefresh(action);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
this.updateGridRowNodes((_b = (_a = action.payload) === null || _a === void 0 ? void 0 : _a.records) !== null && _b !== void 0 ? _b : []);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Nesse ponto, o registro já se encontra atualizado no DU,
|
|
21
|
+
* basta então passar seu valor para que a garde possa atualizar sua linha.
|
|
22
|
+
*/
|
|
23
|
+
updateGridRowNodes(recordIDList) {
|
|
24
|
+
const recordsToUpdate = recordIDList === null || recordIDList === void 0 ? void 0 : recordIDList.map(id => this.getRecordById(id));
|
|
25
|
+
this._controller.updateRows(recordsToUpdate);
|
|
26
|
+
}
|
|
27
|
+
getRecordById(recordId) {
|
|
28
|
+
return this._dataUnit.records.find(record => record['__record__id__'] === recordId);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Em caso de necessidade de reload (isWaitingToReload), eh preciso chamar o dataUnit.gotoPage, pois ele aplica tambem a ordenacao dos registros,
|
|
32
|
+
* enquanto que o _controller.refresh apenas recarrega os dados na ordem que atua.
|
|
33
|
+
*/
|
|
34
|
+
handleRefreshOrReload(action) {
|
|
35
|
+
if (this._dataUnit.isWaitingToReload()) {
|
|
36
|
+
this.handleReload();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
this.handleRefresh(action);
|
|
40
|
+
}
|
|
41
|
+
handleReload() {
|
|
42
|
+
this._dataUnit.setWaitingToReload(false);
|
|
43
|
+
this._dataUnit.gotoPage(0);
|
|
44
|
+
}
|
|
45
|
+
handleRefresh(action) {
|
|
46
|
+
if (this.isSilentChange(action)) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this._controller.refresh(action.type === Action.DATA_SAVED);
|
|
50
|
+
}
|
|
51
|
+
handleRecordsAdded() {
|
|
52
|
+
if (this._options.enableGridInsert) {
|
|
53
|
+
this._controller.refresh();
|
|
54
|
+
this.focusOnNewRecord();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
focusOnNewRecord() {
|
|
58
|
+
/**
|
|
59
|
+
* O SetTimeout eh utilizado pois é preciso aguardar que o novo registro seja renderizado na grade.
|
|
60
|
+
* Tentamos utilizar a api da grade para adicionar um event listener, porém na versão que utilizamos, não existe
|
|
61
|
+
* algo que resolva nosso cenário.
|
|
62
|
+
*
|
|
63
|
+
* Sugiro no futuro utilizar algo como o applyServerSideTransaction, porém será preciso lidar com os handlers
|
|
64
|
+
* e callbacks implementados no AgGridController e GridEditionManager.
|
|
65
|
+
*/
|
|
66
|
+
setTimeout(() => {
|
|
67
|
+
var _a;
|
|
68
|
+
const newRowIndex = ((_a = this._dataUnit.records) === null || _a === void 0 ? void 0 : _a.length) - 1;
|
|
69
|
+
this._controller.startEditionOnRowByIndex(newRowIndex);
|
|
70
|
+
}, 500);
|
|
71
|
+
}
|
|
5
72
|
updateLoadedRecords(action) {
|
|
6
73
|
const records = action.payload;
|
|
7
74
|
if ((records === null || records === void 0 ? void 0 : records.length) > 0) {
|
|
@@ -53,15 +120,20 @@ export default class DataSource {
|
|
|
53
120
|
this._options.onPaginationUpdate(this._dataUnit.getPaginationInfo());
|
|
54
121
|
}
|
|
55
122
|
break;
|
|
56
|
-
case Action.
|
|
123
|
+
case Action.RECORDS_ADDED:
|
|
124
|
+
this.handleRecordsAdded();
|
|
125
|
+
break;
|
|
57
126
|
case Action.DATA_SAVED:
|
|
58
127
|
case Action.EDITION_CANCELED:
|
|
128
|
+
this._controller.clearInvalidCells(action.type);
|
|
129
|
+
this.handleRefreshOrReload(action);
|
|
130
|
+
break;
|
|
59
131
|
case Action.DATA_CHANGED:
|
|
60
132
|
case Action.DATA_RESOLVED:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
this.
|
|
133
|
+
this.handleDataChanged(action);
|
|
134
|
+
break;
|
|
135
|
+
case Action.RECORDS_REMOVED:
|
|
136
|
+
this.handleRefresh(action);
|
|
65
137
|
break;
|
|
66
138
|
case Action.SELECTION_CHANGED:
|
|
67
139
|
case Action.NEXT_SELECTED:
|
|
@@ -71,6 +143,9 @@ export default class DataSource {
|
|
|
71
143
|
case Action.RECORD_LOADED:
|
|
72
144
|
this.updateLoadedRecords(action);
|
|
73
145
|
break;
|
|
146
|
+
case Action.SAVING_CANCELED:
|
|
147
|
+
this.handleSavingCanceled(action);
|
|
148
|
+
break;
|
|
74
149
|
}
|
|
75
150
|
};
|
|
76
151
|
this._dataUnit = dataUnit;
|
|
@@ -92,6 +167,9 @@ export default class DataSource {
|
|
|
92
167
|
setAutoFocus(autoFocus) {
|
|
93
168
|
this._options.autoFocus = autoFocus;
|
|
94
169
|
}
|
|
170
|
+
setEnableGridInsert(enable) {
|
|
171
|
+
this._options.enableGridInsert = enable;
|
|
172
|
+
}
|
|
95
173
|
getRows(params) {
|
|
96
174
|
if (this.needReload(params)) {
|
|
97
175
|
this._lastLoadingParams = params;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { UserInterface } from "@sankhyalabs/core";
|
|
1
|
+
import { Action, UserInterface } from "@sankhyalabs/core";
|
|
2
2
|
import { KeyCode } from "ag-grid-community";
|
|
3
3
|
import { RecordValidationProcessor } from "../../../../utils/validators/recordvalidator/RecordValidationProcessor";
|
|
4
4
|
import EzCellEditor from "./editor/EzCellEditor";
|
|
5
5
|
import EzGridCustomCellEditor from "./components/EzGridCustomCellEditor";
|
|
6
6
|
import EzGridCustomCellRender from "./components/EzGridCustomCellRender";
|
|
7
7
|
export default class GridEditionManager {
|
|
8
|
-
constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders) {
|
|
8
|
+
constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled, customEditors, customRenders, enableContinuousInsert) {
|
|
9
9
|
this._dataUnit = dataUnit;
|
|
10
10
|
this._recordValidationProcessor = new RecordValidationProcessor(this._dataUnit, {
|
|
11
11
|
getRequiredFields: () => this.getRequiredFields(),
|
|
12
|
-
markAsInvalid: () => { },
|
|
13
|
-
getMessageForField: () => null
|
|
12
|
+
markAsInvalid: (invalidField, recordId) => { this.setInvalidCell(invalidField, recordId); },
|
|
13
|
+
getMessageForField: () => null,
|
|
14
14
|
}, recordsValidator);
|
|
15
15
|
this._useEnterLikeTab = useEnterLikeTab;
|
|
16
16
|
this._editionIsDisabled = editionIsDisabled;
|
|
17
|
+
this._enableContinuousInsert = enableContinuousInsert;
|
|
17
18
|
this._customEditors = customEditors;
|
|
18
19
|
this._customRenders = customRenders;
|
|
19
20
|
}
|
|
@@ -28,6 +29,10 @@ export default class GridEditionManager {
|
|
|
28
29
|
};
|
|
29
30
|
return options;
|
|
30
31
|
}
|
|
32
|
+
canContinuousInsert() {
|
|
33
|
+
var _a;
|
|
34
|
+
return this._enableContinuousInsert && (this._dataUnit.records.length - 1) === ((_a = this._lastCellEdited) === null || _a === void 0 ? void 0 : _a.rowIndex);
|
|
35
|
+
}
|
|
31
36
|
proceedAutoSave() {
|
|
32
37
|
if (!this._dataUnit.isDirty()) {
|
|
33
38
|
this.saveSuccess();
|
|
@@ -40,15 +45,33 @@ export default class GridEditionManager {
|
|
|
40
45
|
if (currentRercord == undefined) {
|
|
41
46
|
return;
|
|
42
47
|
}
|
|
48
|
+
this._invalidCell = undefined;
|
|
43
49
|
this._recordValidationProcessor
|
|
44
|
-
.validate()
|
|
50
|
+
.validate(true)
|
|
45
51
|
.then(() => {
|
|
46
52
|
this._dataUnit.saveData()
|
|
47
|
-
.then(() =>
|
|
53
|
+
.then(() => {
|
|
54
|
+
if (this.canContinuousInsert()) {
|
|
55
|
+
this._dataUnit.addRecord();
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
this.saveSuccess();
|
|
59
|
+
}
|
|
60
|
+
})
|
|
48
61
|
.catch(reason => this.saveFail(reason));
|
|
49
62
|
})
|
|
50
63
|
.catch(reason => this.saveFail(reason));
|
|
51
64
|
}
|
|
65
|
+
async recordValidate() {
|
|
66
|
+
if (!this._dataUnit.isDirty())
|
|
67
|
+
return;
|
|
68
|
+
try {
|
|
69
|
+
this._invalidCell = undefined;
|
|
70
|
+
await this._recordValidationProcessor.validate(false);
|
|
71
|
+
}
|
|
72
|
+
catch (error) { }
|
|
73
|
+
this._gridOptions.api.refreshCells({ force: true });
|
|
74
|
+
}
|
|
52
75
|
navigateByEnterKey(keyboardEvent) {
|
|
53
76
|
const backwards = keyboardEvent.shiftKey;
|
|
54
77
|
if (this._useEnterLikeTab) {
|
|
@@ -257,6 +280,34 @@ export default class GridEditionManager {
|
|
|
257
280
|
setCellRenders(customRenders) {
|
|
258
281
|
this._customRenders = customRenders;
|
|
259
282
|
}
|
|
283
|
+
setInvalidCell(invalidCell, recordId) {
|
|
284
|
+
this._invalidCell = { field: invalidCell, recordId };
|
|
285
|
+
}
|
|
286
|
+
getInvalidCell() {
|
|
287
|
+
return this._invalidCell;
|
|
288
|
+
}
|
|
289
|
+
clearInvalidCells(action) {
|
|
290
|
+
this._invalidCell = undefined;
|
|
291
|
+
if (action === Action.EDITION_CANCELED) {
|
|
292
|
+
this._isGridEdition = false;
|
|
293
|
+
}
|
|
294
|
+
else if (action === Action.DATA_SAVED && this.canContinuousInsert()) {
|
|
295
|
+
this._dataUnit.addRecord();
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
setEnableContinuousInsert(enable) {
|
|
299
|
+
this._enableContinuousInsert = enable;
|
|
300
|
+
}
|
|
301
|
+
hasInvalidField(fieldName, recordId) {
|
|
302
|
+
if (!this.hasInvalidCell())
|
|
303
|
+
return false;
|
|
304
|
+
return this._invalidCell.field.name === fieldName && this._invalidCell.recordId === recordId;
|
|
305
|
+
}
|
|
306
|
+
hasInvalidCell() {
|
|
307
|
+
if (!this._invalidCell || !this._invalidCell.field || !this._invalidCell.recordId)
|
|
308
|
+
return false;
|
|
309
|
+
return true;
|
|
310
|
+
}
|
|
260
311
|
}
|
|
261
312
|
class TargetEdition {
|
|
262
313
|
constructor(rowIndex, column, backwards) {
|
|
@@ -36,6 +36,8 @@ export class EzGrid {
|
|
|
36
36
|
this.recordsValidator = undefined;
|
|
37
37
|
this.canEdit = true;
|
|
38
38
|
this.autoFocus = true;
|
|
39
|
+
this.enableGridInsert = false;
|
|
40
|
+
this.enableContinuousInsert = true;
|
|
39
41
|
}
|
|
40
42
|
/**
|
|
41
43
|
* Aplica a definição de colunas.
|
|
@@ -362,6 +364,8 @@ export class EzGrid {
|
|
|
362
364
|
editionIsDisabled: () => !this.canEdit,
|
|
363
365
|
customFormatters: this._customFormatters,
|
|
364
366
|
autoFocus: this.autoFocus,
|
|
367
|
+
enableGridInsert: this.enableGridInsert,
|
|
368
|
+
enableContinuousInsert: this.enableContinuousInsert,
|
|
365
369
|
onRefresh: () => {
|
|
366
370
|
if (this.dataUnit) {
|
|
367
371
|
this.setSelection(this.dataUnit.getSelectionInfo());
|
|
@@ -454,6 +458,8 @@ export class EzGrid {
|
|
|
454
458
|
}
|
|
455
459
|
componentDidUpdate() {
|
|
456
460
|
this._gridController.setAutoFocus(this.autoFocus);
|
|
461
|
+
this._gridController.setEnableGridInsert(this.enableGridInsert);
|
|
462
|
+
this._gridController.setEnableContinuousInsert(this.enableContinuousInsert);
|
|
457
463
|
if (this.dataUnit) {
|
|
458
464
|
this.setSelection(this.dataUnit.getSelectionInfo());
|
|
459
465
|
}
|
|
@@ -697,6 +703,42 @@ export class EzGrid {
|
|
|
697
703
|
"attribute": "auto-focus",
|
|
698
704
|
"reflect": false,
|
|
699
705
|
"defaultValue": "true"
|
|
706
|
+
},
|
|
707
|
+
"enableGridInsert": {
|
|
708
|
+
"type": "boolean",
|
|
709
|
+
"mutable": false,
|
|
710
|
+
"complexType": {
|
|
711
|
+
"original": "boolean",
|
|
712
|
+
"resolved": "boolean",
|
|
713
|
+
"references": {}
|
|
714
|
+
},
|
|
715
|
+
"required": false,
|
|
716
|
+
"optional": true,
|
|
717
|
+
"docs": {
|
|
718
|
+
"tags": [],
|
|
719
|
+
"text": "Ativa inser\u00E7\u00E3o de registros no modo grade."
|
|
720
|
+
},
|
|
721
|
+
"attribute": "enable-grid-insert",
|
|
722
|
+
"reflect": false,
|
|
723
|
+
"defaultValue": "false"
|
|
724
|
+
},
|
|
725
|
+
"enableContinuousInsert": {
|
|
726
|
+
"type": "boolean",
|
|
727
|
+
"mutable": false,
|
|
728
|
+
"complexType": {
|
|
729
|
+
"original": "boolean",
|
|
730
|
+
"resolved": "boolean",
|
|
731
|
+
"references": {}
|
|
732
|
+
},
|
|
733
|
+
"required": false,
|
|
734
|
+
"optional": true,
|
|
735
|
+
"docs": {
|
|
736
|
+
"tags": [],
|
|
737
|
+
"text": "Ativa/desativa a inser\u00E7\u00E3o continua na grade\nS\u00F3 funciona quando a prop enableGridInsert est\u00E1 ativa"
|
|
738
|
+
},
|
|
739
|
+
"attribute": "enable-continuous-insert",
|
|
740
|
+
"reflect": false,
|
|
741
|
+
"defaultValue": "true"
|
|
700
742
|
}
|
|
701
743
|
};
|
|
702
744
|
}
|
|
@@ -69,7 +69,7 @@ export default class DataBinder {
|
|
|
69
69
|
this._recordValidatorProcessor = new RecordValidationProcessor(this._dataUnit, {
|
|
70
70
|
getRequiredFields: () => this._formMetadata.getRequiredFields(),
|
|
71
71
|
markAsInvalid: field => this.markInvalid(field),
|
|
72
|
-
getMessageForField: field => this.getErrorMessage(field)
|
|
72
|
+
getMessageForField: field => this.getErrorMessage(field),
|
|
73
73
|
}, recordsValidator);
|
|
74
74
|
}
|
|
75
75
|
disconnectDataUnit() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,7 +5,7 @@ export class RecordValidationProcessor {
|
|
|
5
5
|
this._validationSource = validationSource;
|
|
6
6
|
this._validator = validator;
|
|
7
7
|
}
|
|
8
|
-
validate() {
|
|
8
|
+
validate(isSaving = true) {
|
|
9
9
|
return new Promise((accept, reject) => {
|
|
10
10
|
const records = this._dataUnit.getModifiedRecords();
|
|
11
11
|
for (let i = 0; i < records.length; i++) {
|
|
@@ -22,6 +22,11 @@ export class RecordValidationProcessor {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
if (invalidResults.length > 0) {
|
|
25
|
+
if (!isSaving && invalidResults[0].invalidFields.length > 0) {
|
|
26
|
+
this._validationSource.markAsInvalid(invalidResults[0].invalidFields[0], record.__record__id__);
|
|
27
|
+
reject();
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
25
30
|
this.processValidationResult(invalidResults, record.__record__id__);
|
|
26
31
|
reject();
|
|
27
32
|
break;
|
|
@@ -53,6 +58,7 @@ export class RecordValidationProcessor {
|
|
|
53
58
|
processValidationResult(validationResult, recordId) {
|
|
54
59
|
validationResult.forEach(invalidResult => {
|
|
55
60
|
const invalidFields = invalidResult.invalidFields;
|
|
61
|
+
this._dataUnit.savingCanceled(invalidFields, recordId);
|
|
56
62
|
if (invalidFields) {
|
|
57
63
|
invalidFields.forEach(field => {
|
|
58
64
|
this.markAsInvalid(field, recordId);
|