@lemon-fe/kits 0.1.136 → 1.0.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -5
- package/es/app.d.ts +1 -0
- package/es/app.js +3 -0
- package/es/components/Actions/index.d.ts +26 -0
- package/es/components/Actions/index.js +169 -0
- package/es/components/Actions/index.less +67 -0
- package/es/components/BaseTable/Actions.d.ts +9 -0
- package/es/components/BaseTable/Actions.js +136 -0
- package/es/components/BaseTable/BaseTableContext.d.ts +7 -0
- package/es/components/BaseTable/BaseTableContext.js +7 -0
- package/es/components/BaseTable/ResizeHeaderCell.d.ts +8 -0
- package/es/components/BaseTable/ResizeHeaderCell.js +130 -0
- package/es/components/BaseTable/VirtualBody.d.ts +8 -0
- package/es/components/BaseTable/VirtualBody.js +163 -0
- package/es/components/BaseTable/empty.png +0 -0
- package/es/components/BaseTable/index.d.ts +9 -0
- package/es/components/BaseTable/index.js +482 -0
- package/es/components/BaseTable/index.less +189 -0
- package/es/components/BaseTable/typings.d.ts +48 -0
- package/es/components/BaseTable/utils.d.ts +4 -0
- package/es/components/BaseTable/utils.js +26 -0
- package/es/components/ColorPicker/index.d.ts +13 -0
- package/es/components/ColorPicker/index.js +114 -0
- package/es/components/ColorPicker/index.less +47 -0
- package/es/components/DataGrid/Actions.d.ts +9 -0
- package/es/components/DataGrid/Actions.js +119 -0
- package/es/components/DataGrid/CellRenderer.d.ts +4 -0
- package/es/components/DataGrid/CellRenderer.js +68 -0
- package/es/components/DataGrid/GridContext.d.ts +4 -0
- package/es/components/DataGrid/GridContext.js +4 -0
- package/es/components/DataGrid/HeaderRenderer.d.ts +6 -0
- package/es/components/DataGrid/HeaderRenderer.js +93 -0
- package/es/components/DataGrid/cell-editors/Custom.d.ts +9 -0
- package/es/components/DataGrid/cell-editors/Custom.js +105 -0
- package/es/components/DataGrid/cell-editors/Date.d.ts +8 -0
- package/es/components/DataGrid/cell-editors/Date.js +78 -0
- package/es/components/DataGrid/cell-editors/Number.d.ts +9 -0
- package/es/components/DataGrid/cell-editors/Number.js +86 -0
- package/es/components/DataGrid/cell-editors/Select.d.ts +7 -0
- package/es/components/DataGrid/cell-editors/Select.js +70 -0
- package/es/components/DataGrid/cell-editors/Text.d.ts +5 -0
- package/es/components/DataGrid/cell-editors/Text.js +60 -0
- package/es/components/DataGrid/cell-editors/Wrapper.d.ts +4 -0
- package/es/components/DataGrid/cell-editors/Wrapper.js +7 -0
- package/es/components/DataGrid/cell-editors/utils.d.ts +1 -0
- package/es/components/DataGrid/cell-editors/utils.js +2 -0
- package/es/components/DataGrid/empty.png +0 -0
- package/es/components/DataGrid/hooks.d.ts +2 -0
- package/es/components/DataGrid/hooks.js +45 -0
- package/es/components/DataGrid/index.d.ts +77 -0
- package/es/components/DataGrid/index.js +1051 -0
- package/es/components/DataGrid/index.less +304 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideNodeManager.d.ts +57 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideNodeManager.js +378 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideRowModel.d.ts +120 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideRowModel.js +1160 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterService.d.ts +7 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterService.js +137 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterStage.d.ts +5 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterStage.js +60 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/flattenStage.d.ts +10 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/flattenStage.js +199 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/immutableService.d.ts +13 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/immutableService.js +175 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortService.d.ts +21 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortService.js +330 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortStage.d.ts +7 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortStage.js +75 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModelModule.d.ts +15 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModelModule.js +15 -0
- package/es/components/DataGrid/modules/client-side-row-model/index.d.ts +1 -0
- package/es/components/DataGrid/modules/client-side-row-model/index.js +1 -0
- package/es/components/DataGrid/modules/clipboard/clipboard/clipboardService.d.ts +62 -0
- package/es/components/DataGrid/modules/clipboard/clipboard/clipboardService.js +923 -0
- package/es/components/DataGrid/modules/clipboard/clipboardModule.d.ts +7 -0
- package/es/components/DataGrid/modules/clipboard/clipboardModule.js +8 -0
- package/es/components/DataGrid/modules/clipboard/index.d.ts +1 -0
- package/es/components/DataGrid/modules/clipboard/index.js +1 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnModelItem.d.ts +32 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnModelItem.js +100 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnToolPanel.d.ts +51 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnToolPanel.js +320 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/modelItemUtils.d.ts +20 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/modelItemUtils.js +247 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/pivotModePanel.d.ts +9 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/pivotModePanel.js +93 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.d.ts +32 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.js +186 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.d.ts +49 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.js +546 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.d.ts +26 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.js +264 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.d.ts +32 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.js +151 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.d.ts +43 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.js +369 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.d.ts +62 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.js +475 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.d.ts +24 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.js +322 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnsToolPanelModule.d.ts +24 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnsToolPanelModule.js +24 -0
- package/es/components/DataGrid/modules/column-tool-panel/index.d.ts +2 -0
- package/es/components/DataGrid/modules/column-tool-panel/index.js +3 -0
- package/es/components/DataGrid/modules/menu/index.d.ts +1 -0
- package/es/components/DataGrid/modules/menu/index.js +1 -0
- package/es/components/DataGrid/modules/menu/menu/contextMenu.d.ts +26 -0
- package/es/components/DataGrid/modules/menu/menu/contextMenu.js +329 -0
- package/es/components/DataGrid/modules/menu/menu/enterpriseMenu.d.ts +85 -0
- package/es/components/DataGrid/modules/menu/menu/enterpriseMenu.js +639 -0
- package/es/components/DataGrid/modules/menu/menu/menuItemMapper.d.ts +15 -0
- package/es/components/DataGrid/modules/menu/menu/menuItemMapper.js +565 -0
- package/es/components/DataGrid/modules/menu/menuModule.d.ts +8 -0
- package/es/components/DataGrid/modules/menu/menuModule.js +8 -0
- package/es/components/DataGrid/modules/row-grouping/index.d.ts +4 -0
- package/es/components/DataGrid/modules/row-grouping/index.js +4 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggFuncService.d.ts +23 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggFuncService.js +303 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggregationStage.d.ts +20 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggregationStage.js +326 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/batchRemover.d.ts +10 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/batchRemover.js +71 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.d.ts +75 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.js +618 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.d.ts +40 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.js +460 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.d.ts +11 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.js +108 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.d.ts +17 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.js +170 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.d.ts +15 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.js +133 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.d.ts +15 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.js +133 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/filterAggregatesStage.d.ts +9 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/filterAggregatesStage.js +175 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupStage.d.ts +47 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupStage.js +814 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotColDefService.d.ts +24 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotColDefService.js +478 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotStage.d.ts +19 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotStage.js +219 -0
- package/es/components/DataGrid/modules/row-grouping/rowGroupingModule.d.ts +16 -0
- package/es/components/DataGrid/modules/row-grouping/rowGroupingModule.js +16 -0
- package/es/components/DataGrid/modules/server-side-row-model/index.d.ts +1 -0
- package/es/components/DataGrid/modules/server-side-row-model/index.js +1 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/blockUtils.d.ts +47 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/blockUtils.js +444 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/infiniteStoreBlock.d.ts +92 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/infiniteStoreBlock.js +510 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/expandListener.d.ts +9 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/expandListener.js +115 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/filterListener.d.ts +9 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/filterListener.js +114 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/listenerUtils.d.ts +5 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/listenerUtils.js +68 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/sortListener.d.ts +13 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/sortListener.js +194 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/nodeManager.d.ts +7 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/nodeManager.js +63 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/serverSideRowModel.d.ts +88 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/serverSideRowModel.js +572 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/fullStore.d.ts +108 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/fullStore.js +876 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/infiniteStore.d.ts +102 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/infiniteStore.js +918 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeFactory.d.ts +12 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeFactory.js +141 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeUtils.d.ts +35 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeUtils.js +154 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/transactionManager.d.ts +23 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/transactionManager.js +210 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModelModule.d.ts +18 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModelModule.js +18 -0
- package/es/components/DataGrid/modules/side-bar/index.d.ts +2 -0
- package/es/components/DataGrid/modules/side-bar/index.js +2 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/common/toolPanelColDefService.d.ts +11 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/common/toolPanelColDefService.js +280 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/horizontalResizeComp.d.ts +19 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/horizontalResizeComp.js +132 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonComp.d.ts +16 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonComp.js +108 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonsComp.d.ts +18 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonsComp.js +115 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarComp.d.ts +29 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarComp.js +353 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/toolPanelWrapper.d.ts +17 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/toolPanelWrapper.js +128 -0
- package/es/components/DataGrid/modules/side-bar/sideBarModule.d.ts +19 -0
- package/es/components/DataGrid/modules/side-bar/sideBarModule.js +19 -0
- package/es/components/DataGrid/typings.d.ts +138 -0
- package/es/components/DataGrid/typings.js +1 -0
- package/es/components/DataGrid/utils.d.ts +43 -0
- package/es/components/DataGrid/utils.js +242 -0
- package/es/components/Dropdown/index.d.ts +15 -0
- package/es/components/Dropdown/index.js +55 -0
- package/es/components/Dropdown/index.less +13 -0
- package/es/components/DurationPicker/index.d.ts +26 -0
- package/es/components/DurationPicker/index.js +204 -0
- package/es/components/DurationPicker/index.less +61 -0
- package/es/components/EditableTable/EditableCell.d.ts +12 -0
- package/es/components/EditableTable/EditableCell.js +41 -0
- package/es/components/EditableTable/EditableTableFormItem.d.ts +6 -0
- package/es/components/EditableTable/EditableTableFormItem.js +47 -0
- package/es/components/EditableTable/Table.d.ts +6 -0
- package/es/components/EditableTable/Table.js +362 -0
- package/es/components/EditableTable/index.d.ts +9 -0
- package/es/components/EditableTable/index.js +8 -0
- package/es/components/EditableTable/index.less +29 -0
- package/es/components/EditableTable/typings.d.ts +90 -0
- package/es/components/EditableTable/util.d.ts +25 -0
- package/es/components/EditableTable/util.js +399 -0
- package/es/components/Filter/index.d.ts +15 -0
- package/es/components/Filter/index.js +644 -0
- package/es/components/Filter/index.less +82 -0
- package/es/components/Filter/typings.d.ts +35 -0
- package/es/components/FormLayout/index.d.ts +32 -0
- package/es/components/FormLayout/index.js +41 -0
- package/es/components/FormLayout/index.less +109 -0
- package/es/components/Icons/BigTip/error.png +0 -0
- package/es/components/Icons/BigTip/index.d.ts +6 -0
- package/es/components/Icons/BigTip/index.js +46 -0
- package/es/components/Icons/BigTip/info.png +0 -0
- package/es/components/Icons/BigTip/success.png +0 -0
- package/es/components/Icons/BigTip/warning.png +0 -0
- package/es/components/Icons/Calendar.d.ts +5 -0
- package/es/components/Icons/Calendar.js +43 -0
- package/es/components/Icons/Close.d.ts +5 -0
- package/es/components/Icons/Close.js +25 -0
- package/es/components/Icons/CollapseUp.d.ts +5 -0
- package/es/components/Icons/CollapseUp.js +27 -0
- package/es/components/Icons/DarkSearch.d.ts +5 -0
- package/es/components/Icons/DarkSearch.js +34 -0
- package/es/components/Icons/Down.d.ts +5 -0
- package/es/components/Icons/Down.js +31 -0
- package/es/components/Icons/Empty.d.ts +3 -0
- package/es/components/Icons/Empty.js +267 -0
- package/es/components/Icons/LookUp.d.ts +5 -0
- package/es/components/Icons/LookUp.js +70 -0
- package/es/components/Icons/More.d.ts +5 -0
- package/es/components/Icons/More.js +40 -0
- package/es/components/Icons/Search.d.ts +5 -0
- package/es/components/Icons/Search.js +31 -0
- package/es/components/Icons/Tip.d.ts +6 -0
- package/es/components/Icons/Tip.js +165 -0
- package/es/components/Icons/index.d.ts +25 -0
- package/es/components/Icons/index.js +25 -0
- package/es/components/Layout/index.d.ts +41 -0
- package/es/components/Layout/index.js +173 -0
- package/es/components/Layout/index.less +136 -0
- package/es/components/PageLoading/index.d.ts +5 -0
- package/es/components/PageLoading/index.js +15 -0
- package/es/components/PageLoading/index.less +8 -0
- package/es/components/Popup/index.d.ts +39 -0
- package/es/components/Popup/index.js +223 -0
- package/es/components/Popup/index.less +12 -0
- package/es/components/Portal/index.d.ts +17 -0
- package/es/components/Portal/index.js +141 -0
- package/es/components/Section/TabBar.d.ts +12 -0
- package/es/components/Section/TabBar.js +51 -0
- package/es/components/Section/index.d.ts +54 -0
- package/es/components/Section/index.js +96 -0
- package/es/components/Section/index.less +130 -0
- package/es/components/SelectView/index.d.ts +47 -0
- package/es/components/SelectView/index.js +244 -0
- package/es/components/SelectView/index.less +60 -0
- package/es/components/SiderTree/TreeNodeTitle.d.ts +9 -0
- package/es/components/SiderTree/TreeNodeTitle.js +107 -0
- package/es/components/SiderTree/empty.png +0 -0
- package/es/components/SiderTree/index.d.ts +37 -0
- package/es/components/SiderTree/index.js +217 -0
- package/es/components/SiderTree/index.less +222 -0
- package/es/components/SiderTree/typings.d.ts +19 -0
- package/es/components/SymbolIcon/index.d.ts +8 -0
- package/es/components/SymbolIcon/index.js +32 -0
- package/es/components/SymbolIcon/index.less +7 -0
- package/es/components/TabBar/index.d.ts +14 -0
- package/es/components/TabBar/index.js +52 -0
- package/es/components/TabBar/index.less +31 -0
- package/es/components/Table/index.d.ts +3 -0
- package/es/components/Table/index.js +242 -0
- package/es/components/Table/typings.d.ts +25 -0
- package/es/components/Table/utils.d.ts +2 -0
- package/es/components/Table/utils.js +3 -0
- package/es/components/utils.d.ts +3 -0
- package/es/components/utils.js +20 -0
- package/es/constants.d.ts +1 -0
- package/es/constants.js +1 -0
- package/es/{useBatchOperator → hooks/useBatchOperator}/index.d.ts +2 -2
- package/es/{useBatchOperator → hooks/useBatchOperator}/index.js +120 -57
- package/es/{usePageTrack → hooks/usePageTrack}/index.d.ts +0 -0
- package/es/{usePageTrack → hooks/usePageTrack}/index.js +0 -0
- package/es/index.d.ts +33 -6
- package/es/index.js +30 -6
- package/es/index.less +25 -1
- package/es/init.d.ts +3 -0
- package/es/init.js +153 -0
- package/es/layouts/BasicLayout/components/Main.d.ts +10 -0
- package/es/layouts/BasicLayout/components/Main.js +390 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/DropMenu/index.d.ts +11 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/DropMenu/index.js +104 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/DropMenu/index.less +59 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/Menu/index.d.ts +10 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/Menu/index.js +667 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/Menu/index.less +445 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/RefreshButton/index.d.ts +6 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/RefreshButton/index.js +72 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/RefreshButton/index.less +30 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/TabBar/index.d.ts +10 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/TabBar/index.js +116 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/TabBar/index.less +155 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/WaterMark/index.d.ts +6 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/WaterMark/index.js +70 -0
- package/es/layouts/BasicLayout/components/MainFramework/index.d.ts +28 -0
- package/es/layouts/BasicLayout/components/MainFramework/index.js +78 -0
- package/es/layouts/BasicLayout/components/MainFramework/index.less +97 -0
- package/es/layouts/BasicLayout/components/MainFramework/typings.d.ts +10 -0
- package/es/layouts/BasicLayout/index.d.ts +3 -0
- package/es/layouts/BasicLayout/index.js +98 -0
- package/es/layouts/BasicLayout/typings.d.ts +82 -0
- package/es/layouts/BlankLayout/index.d.ts +5 -0
- package/es/layouts/BlankLayout/index.js +5 -0
- package/es/layouts/Breadcrumb/index.d.ts +6 -0
- package/es/layouts/Breadcrumb/index.js +75 -0
- package/es/layouts/MicroLayout/index.d.ts +10 -0
- package/es/layouts/MicroLayout/index.js +105 -0
- package/es/layouts/MicroLayout/typings.d.ts +25 -0
- package/es/layouts/components/CachableRoute.d.ts +2 -0
- package/es/layouts/components/CachableRoute.js +38 -0
- package/es/layouts/components/RouteTab.d.ts +20 -0
- package/es/layouts/components/RouteTab.js +40 -0
- package/es/layouts/components/Switch.d.ts +2 -0
- package/es/layouts/components/Switch.js +63 -0
- package/es/layouts/index.d.ts +4 -0
- package/es/layouts/index.js +4 -0
- package/es/layouts/typings.d.ts +29 -0
- package/es/layouts/utils.d.ts +23 -0
- package/es/layouts/utils.js +175 -0
- package/es/styles/overrides.less +191 -0
- package/es/styles/theme.less +9 -0
- package/es/styles/utils.less +110 -0
- package/package.json +75 -22
- package/es/subject.d.ts +0 -12
- package/es/subject.js +0 -30
package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/fullStore.js
ADDED
|
@@ -0,0 +1,876 @@
|
|
|
1
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2
|
+
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
4
|
+
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
|
+
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
|
|
9
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10
|
+
|
|
11
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
|
+
|
|
13
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
14
|
+
|
|
15
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
16
|
+
|
|
17
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
18
|
+
|
|
19
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
20
|
+
|
|
21
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
22
|
+
|
|
23
|
+
var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
|
|
24
|
+
var c = arguments.length,
|
|
25
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
26
|
+
d;
|
|
27
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === 'object' && typeof Reflect.decorate === 'function') r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
|
|
28
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
29
|
+
}
|
|
30
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
import { _, Autowired, Events, NumberSequence, PostConstruct, PreDestroy, RowNodeBlock, ServerSideTransactionResultStatus } from '@ag-grid-community/core';
|
|
34
|
+
export var FullStore = /*#__PURE__*/function (_RowNodeBlock) {
|
|
35
|
+
_inherits(FullStore, _RowNodeBlock);
|
|
36
|
+
|
|
37
|
+
var _super = _createSuper(FullStore);
|
|
38
|
+
|
|
39
|
+
function FullStore(ssrmParams, storeParams, parentRowNode) {
|
|
40
|
+
var _this;
|
|
41
|
+
|
|
42
|
+
_classCallCheck(this, FullStore);
|
|
43
|
+
|
|
44
|
+
// finite block represents a cache with just one block, thus 0 is the id, it's the first block
|
|
45
|
+
_this = _super.call(this, 0);
|
|
46
|
+
_this.nodeIdSequence = new NumberSequence();
|
|
47
|
+
_this.info = {};
|
|
48
|
+
_this.ssrmParams = ssrmParams;
|
|
49
|
+
_this.parentRowNode = parentRowNode;
|
|
50
|
+
_this.level = parentRowNode.level + 1;
|
|
51
|
+
_this.groupLevel = ssrmParams.rowGroupCols ? _this.level < ssrmParams.rowGroupCols.length : undefined;
|
|
52
|
+
_this.leafGroup = ssrmParams.rowGroupCols ? _this.level === ssrmParams.rowGroupCols.length - 1 : false;
|
|
53
|
+
return _this;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
_createClass(FullStore, [{
|
|
57
|
+
key: "postConstruct",
|
|
58
|
+
value: function postConstruct() {
|
|
59
|
+
var _this2 = this;
|
|
60
|
+
|
|
61
|
+
this.usingTreeData = this.gridOptionsWrapper.isTreeData();
|
|
62
|
+
this.nodeIdPrefix = this.blockUtils.createNodeIdPrefix(this.parentRowNode);
|
|
63
|
+
|
|
64
|
+
if (!this.usingTreeData && this.groupLevel) {
|
|
65
|
+
var groupColVo = this.ssrmParams.rowGroupCols[this.level];
|
|
66
|
+
this.groupField = groupColVo.field;
|
|
67
|
+
this.rowGroupColumn = this.columnModel.getRowGroupColumns()[this.level];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
var initialRowCount = 1;
|
|
71
|
+
var isRootStore = this.parentRowNode.level === -1;
|
|
72
|
+
var userInitialRowCount = this.gridOptionsWrapper.getServerSideInitialRowCount();
|
|
73
|
+
|
|
74
|
+
if (isRootStore && userInitialRowCount !== undefined) {
|
|
75
|
+
initialRowCount = userInitialRowCount;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
this.initialiseRowNodes(initialRowCount);
|
|
79
|
+
this.rowNodeBlockLoader.addBlock(this);
|
|
80
|
+
this.addDestroyFunc(function () {
|
|
81
|
+
return _this2.rowNodeBlockLoader.removeBlock(_this2);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
}, {
|
|
85
|
+
key: "destroyRowNodes",
|
|
86
|
+
value: function destroyRowNodes() {
|
|
87
|
+
this.blockUtils.destroyRowNodes(this.allRowNodes);
|
|
88
|
+
this.allRowNodes = [];
|
|
89
|
+
this.nodesAfterSort = [];
|
|
90
|
+
this.nodesAfterFilter = [];
|
|
91
|
+
this.allNodesMap = {};
|
|
92
|
+
}
|
|
93
|
+
}, {
|
|
94
|
+
key: "initialiseRowNodes",
|
|
95
|
+
value: function initialiseRowNodes(loadingRowsCount) {
|
|
96
|
+
var failedLoad = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
97
|
+
this.destroyRowNodes();
|
|
98
|
+
|
|
99
|
+
for (var i = 0; i < loadingRowsCount; i++) {
|
|
100
|
+
var loadingRowNode = this.blockUtils.createRowNode({
|
|
101
|
+
field: this.groupField,
|
|
102
|
+
group: this.groupLevel,
|
|
103
|
+
leafGroup: this.leafGroup,
|
|
104
|
+
level: this.level,
|
|
105
|
+
parent: this.parentRowNode,
|
|
106
|
+
rowGroupColumn: this.rowGroupColumn
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
if (failedLoad) {
|
|
110
|
+
loadingRowNode.failedLoad = true;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
this.allRowNodes.push(loadingRowNode);
|
|
114
|
+
this.nodesAfterFilter.push(loadingRowNode);
|
|
115
|
+
this.nodesAfterSort.push(loadingRowNode);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}, {
|
|
119
|
+
key: "getBlockStateJson",
|
|
120
|
+
value: function getBlockStateJson() {
|
|
121
|
+
return {
|
|
122
|
+
id: this.nodeIdPrefix ? this.nodeIdPrefix : '',
|
|
123
|
+
state: this.getState()
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}, {
|
|
127
|
+
key: "loadFromDatasource",
|
|
128
|
+
value: function loadFromDatasource() {
|
|
129
|
+
this.storeUtils.loadFromDatasource({
|
|
130
|
+
startRow: undefined,
|
|
131
|
+
endRow: undefined,
|
|
132
|
+
parentBlock: this,
|
|
133
|
+
parentNode: this.parentRowNode,
|
|
134
|
+
storeParams: this.ssrmParams,
|
|
135
|
+
successCallback: this.pageLoaded.bind(this, this.getVersion()),
|
|
136
|
+
success: this.success.bind(this, this.getVersion()),
|
|
137
|
+
failCallback: this.pageLoadFailed.bind(this, this.getVersion()),
|
|
138
|
+
fail: this.pageLoadFailed.bind(this, this.getVersion())
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}, {
|
|
142
|
+
key: "getStartRow",
|
|
143
|
+
value: function getStartRow() {
|
|
144
|
+
return 0; // always zero as not in a cache
|
|
145
|
+
}
|
|
146
|
+
}, {
|
|
147
|
+
key: "getEndRow",
|
|
148
|
+
value: function getEndRow() {
|
|
149
|
+
return this.nodesAfterSort.length;
|
|
150
|
+
}
|
|
151
|
+
}, {
|
|
152
|
+
key: "createDataNode",
|
|
153
|
+
value: function createDataNode(data, index) {
|
|
154
|
+
var rowNode = this.blockUtils.createRowNode({
|
|
155
|
+
field: this.groupField,
|
|
156
|
+
group: this.groupLevel,
|
|
157
|
+
leafGroup: this.leafGroup,
|
|
158
|
+
level: this.level,
|
|
159
|
+
parent: this.parentRowNode,
|
|
160
|
+
rowGroupColumn: this.rowGroupColumn
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
if (index != null) {
|
|
164
|
+
_.insertIntoArray(this.allRowNodes, rowNode, index);
|
|
165
|
+
} else {
|
|
166
|
+
this.allRowNodes.push(rowNode);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
var defaultId = this.prefixId(this.nodeIdSequence.next());
|
|
170
|
+
this.blockUtils.setDataIntoRowNode(rowNode, data, defaultId, undefined);
|
|
171
|
+
this.nodeManager.addRowNode(rowNode);
|
|
172
|
+
this.blockUtils.checkOpenByDefault(rowNode);
|
|
173
|
+
this.allNodesMap[rowNode.id] = rowNode;
|
|
174
|
+
return rowNode;
|
|
175
|
+
}
|
|
176
|
+
}, {
|
|
177
|
+
key: "prefixId",
|
|
178
|
+
value: function prefixId(id) {
|
|
179
|
+
if (this.nodeIdPrefix) {
|
|
180
|
+
return this.nodeIdPrefix + '-' + id;
|
|
181
|
+
} else {
|
|
182
|
+
return id.toString();
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}, {
|
|
186
|
+
key: "processServerFail",
|
|
187
|
+
value: function processServerFail() {
|
|
188
|
+
this.initialiseRowNodes(1, true);
|
|
189
|
+
this.fireStoreUpdatedEvent();
|
|
190
|
+
this.flushAsyncTransactions();
|
|
191
|
+
}
|
|
192
|
+
}, {
|
|
193
|
+
key: "processServerResult",
|
|
194
|
+
value: function processServerResult(params) {
|
|
195
|
+
if (!this.isAlive()) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
var info = params.storeInfo || params.groupLevelInfo;
|
|
200
|
+
|
|
201
|
+
if (info) {
|
|
202
|
+
Object.assign(this.info, info);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
var nodesToRecycle = this.allRowNodes.length > 0 ? this.allNodesMap : undefined;
|
|
206
|
+
this.allRowNodes = [];
|
|
207
|
+
this.nodesAfterSort = [];
|
|
208
|
+
this.nodesAfterFilter = [];
|
|
209
|
+
this.allNodesMap = {};
|
|
210
|
+
|
|
211
|
+
if (!params.rowData) {
|
|
212
|
+
var message = 'AG Grid: "params.data" is missing from Server-Side Row Model success() callback. Please use the "data" attribute. If no data is returned, set an empty list.';
|
|
213
|
+
|
|
214
|
+
_.doOnce(function () {
|
|
215
|
+
return console.warn(message, params);
|
|
216
|
+
}, 'FullStore.noData');
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
this.createOrRecycleNodes(nodesToRecycle, params.rowData);
|
|
220
|
+
|
|
221
|
+
if (nodesToRecycle) {
|
|
222
|
+
this.blockUtils.destroyRowNodes(_.getAllValuesInObject(nodesToRecycle));
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
this.filterAndSortNodes();
|
|
226
|
+
this.fireStoreUpdatedEvent();
|
|
227
|
+
this.flushAsyncTransactions();
|
|
228
|
+
}
|
|
229
|
+
}, {
|
|
230
|
+
key: "createOrRecycleNodes",
|
|
231
|
+
value: function createOrRecycleNodes(nodesToRecycle, rowData) {
|
|
232
|
+
var _this3 = this;
|
|
233
|
+
|
|
234
|
+
if (!rowData) {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
var lookupNodeToRecycle = function lookupNodeToRecycle(data) {
|
|
239
|
+
if (!nodesToRecycle) {
|
|
240
|
+
return undefined;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
var getRowIdFunc = _this3.gridOptionsWrapper.getRowIdFunc();
|
|
244
|
+
|
|
245
|
+
if (!getRowIdFunc) {
|
|
246
|
+
return undefined;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
var parentKeys = _this3.parentRowNode.getGroupKeys();
|
|
250
|
+
|
|
251
|
+
var level = _this3.level;
|
|
252
|
+
var id = getRowIdFunc({
|
|
253
|
+
data: data,
|
|
254
|
+
parentKeys: parentKeys.length > 0 ? parentKeys : undefined,
|
|
255
|
+
level: level
|
|
256
|
+
});
|
|
257
|
+
var foundNode = nodesToRecycle[id];
|
|
258
|
+
|
|
259
|
+
if (!foundNode) {
|
|
260
|
+
return undefined;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
delete nodesToRecycle[id];
|
|
264
|
+
return foundNode;
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
var recycleNode = function recycleNode(rowNode, dataItem) {
|
|
268
|
+
_this3.allNodesMap[rowNode.id] = rowNode;
|
|
269
|
+
|
|
270
|
+
_this3.blockUtils.updateDataIntoRowNode(rowNode, dataItem);
|
|
271
|
+
|
|
272
|
+
_this3.allRowNodes.push(rowNode);
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
rowData.forEach(function (dataItem) {
|
|
276
|
+
var nodeToRecycle = lookupNodeToRecycle(dataItem);
|
|
277
|
+
|
|
278
|
+
if (nodeToRecycle) {
|
|
279
|
+
recycleNode(nodeToRecycle, dataItem);
|
|
280
|
+
} else {
|
|
281
|
+
_this3.createDataNode(dataItem);
|
|
282
|
+
}
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
}, {
|
|
286
|
+
key: "flushAsyncTransactions",
|
|
287
|
+
value: function flushAsyncTransactions() {
|
|
288
|
+
var _this4 = this;
|
|
289
|
+
|
|
290
|
+
// we want to update the store with any outstanding transactions straight away,
|
|
291
|
+
// as otherwise if waitTimeMillis is large (eg 5s), then the user could be looking
|
|
292
|
+
// at old data for a few seconds before the transactions is applied, which isn't what
|
|
293
|
+
// you would expect when we advertise 'transaction is applied when data is loaded'.
|
|
294
|
+
// we do this in a timeout as flushAsyncTransactions expects the grid to be in a settled
|
|
295
|
+
// state, not in the middle of loading rows! keeps the VM Turns more simple and deterministic.
|
|
296
|
+
window.setTimeout(function () {
|
|
297
|
+
return _this4.transactionManager.flushAsyncTransactions();
|
|
298
|
+
}, 0);
|
|
299
|
+
}
|
|
300
|
+
}, {
|
|
301
|
+
key: "filterAndSortNodes",
|
|
302
|
+
value: function filterAndSortNodes() {
|
|
303
|
+
this.filterRowNodes();
|
|
304
|
+
this.sortRowNodes();
|
|
305
|
+
}
|
|
306
|
+
}, {
|
|
307
|
+
key: "sortRowNodes",
|
|
308
|
+
value: function sortRowNodes() {
|
|
309
|
+
var serverIsSorting = this.gridOptionsWrapper.isServerSideSortAllLevels() || this.gridOptionsWrapper.isServerSideSortOnServer();
|
|
310
|
+
var sortOptions = this.sortController.getSortOptions();
|
|
311
|
+
var noSortApplied = !sortOptions || sortOptions.length == 0;
|
|
312
|
+
|
|
313
|
+
if (serverIsSorting || noSortApplied) {
|
|
314
|
+
this.nodesAfterSort = this.nodesAfterFilter;
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
this.nodesAfterSort = this.rowNodeSorter.doFullSort(this.nodesAfterFilter, sortOptions);
|
|
319
|
+
}
|
|
320
|
+
}, {
|
|
321
|
+
key: "filterRowNodes",
|
|
322
|
+
value: function filterRowNodes() {
|
|
323
|
+
var _this5 = this;
|
|
324
|
+
|
|
325
|
+
var serverIsFiltering = this.gridOptionsWrapper.isServerSideFilterAllLevels() || this.gridOptionsWrapper.isServerSideFilterOnServer(); // filtering for InFullStore only works at lowest level details.
|
|
326
|
+
// reason is the logic for group filtering was to difficult to work out how it should work at time of writing.
|
|
327
|
+
|
|
328
|
+
var groupLevel = this.groupLevel;
|
|
329
|
+
|
|
330
|
+
if (serverIsFiltering || groupLevel) {
|
|
331
|
+
this.nodesAfterFilter = this.allRowNodes;
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
this.nodesAfterFilter = this.allRowNodes.filter(function (rowNode) {
|
|
336
|
+
return _this5.filterManager.doesRowPassFilter({
|
|
337
|
+
rowNode: rowNode
|
|
338
|
+
});
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
}, {
|
|
342
|
+
key: "clearDisplayIndexes",
|
|
343
|
+
value: function clearDisplayIndexes() {
|
|
344
|
+
var _this6 = this;
|
|
345
|
+
|
|
346
|
+
this.displayIndexStart = undefined;
|
|
347
|
+
this.displayIndexEnd = undefined;
|
|
348
|
+
this.allRowNodes.forEach(function (rowNode) {
|
|
349
|
+
return _this6.blockUtils.clearDisplayIndex(rowNode);
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
}, {
|
|
353
|
+
key: "getDisplayIndexEnd",
|
|
354
|
+
value: function getDisplayIndexEnd() {
|
|
355
|
+
return this.displayIndexEnd;
|
|
356
|
+
}
|
|
357
|
+
}, {
|
|
358
|
+
key: "isDisplayIndexInStore",
|
|
359
|
+
value: function isDisplayIndexInStore(displayIndex) {
|
|
360
|
+
if (this.getRowCount() === 0) {
|
|
361
|
+
return false;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
return displayIndex >= this.displayIndexStart && displayIndex < this.displayIndexEnd;
|
|
365
|
+
}
|
|
366
|
+
}, {
|
|
367
|
+
key: "setDisplayIndexes",
|
|
368
|
+
value: function setDisplayIndexes(displayIndexSeq, nextRowTop) {
|
|
369
|
+
var _this7 = this;
|
|
370
|
+
|
|
371
|
+
this.displayIndexStart = displayIndexSeq.peek();
|
|
372
|
+
this.topPx = nextRowTop.value;
|
|
373
|
+
var visibleNodeIds = {}; // set on all visible nodes
|
|
374
|
+
|
|
375
|
+
this.nodesAfterSort.forEach(function (rowNode) {
|
|
376
|
+
_this7.blockUtils.setDisplayIndex(rowNode, displayIndexSeq, nextRowTop);
|
|
377
|
+
|
|
378
|
+
visibleNodeIds[rowNode.id] = true;
|
|
379
|
+
}); // and clear on all non-visible nodes
|
|
380
|
+
|
|
381
|
+
this.allRowNodes.forEach(function (rowNode) {
|
|
382
|
+
if (!visibleNodeIds[rowNode.id]) {
|
|
383
|
+
_this7.blockUtils.clearDisplayIndex(rowNode);
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
this.displayIndexEnd = displayIndexSeq.peek();
|
|
387
|
+
this.heightPx = nextRowTop.value - this.topPx;
|
|
388
|
+
}
|
|
389
|
+
}, {
|
|
390
|
+
key: "forEachNodeDeep",
|
|
391
|
+
value: function forEachNodeDeep(callback) {
|
|
392
|
+
var sequence = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new NumberSequence();
|
|
393
|
+
this.allRowNodes.forEach(function (rowNode) {
|
|
394
|
+
callback(rowNode, sequence.next());
|
|
395
|
+
var childCache = rowNode.childStore;
|
|
396
|
+
|
|
397
|
+
if (childCache) {
|
|
398
|
+
childCache.forEachNodeDeep(callback, sequence);
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
}, {
|
|
403
|
+
key: "forEachNodeDeepAfterFilterAndSort",
|
|
404
|
+
value: function forEachNodeDeepAfterFilterAndSort(callback) {
|
|
405
|
+
var sequence = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new NumberSequence();
|
|
406
|
+
this.nodesAfterSort.forEach(function (rowNode) {
|
|
407
|
+
callback(rowNode, sequence.next());
|
|
408
|
+
var childCache = rowNode.childStore;
|
|
409
|
+
|
|
410
|
+
if (childCache) {
|
|
411
|
+
childCache.forEachNodeDeepAfterFilterAndSort(callback, sequence);
|
|
412
|
+
}
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
}, {
|
|
416
|
+
key: "getRowUsingDisplayIndex",
|
|
417
|
+
value: function getRowUsingDisplayIndex(displayRowIndex) {
|
|
418
|
+
// this can happen if asking for a row that doesn't exist in the model,
|
|
419
|
+
// eg if a cell range is selected, and the user filters so rows no longer exists
|
|
420
|
+
if (!this.isDisplayIndexInStore(displayRowIndex)) {
|
|
421
|
+
return undefined;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
var res = this.blockUtils.binarySearchForDisplayIndex(displayRowIndex, this.nodesAfterSort);
|
|
425
|
+
return res;
|
|
426
|
+
}
|
|
427
|
+
}, {
|
|
428
|
+
key: "getRowBounds",
|
|
429
|
+
value: function getRowBounds(index) {
|
|
430
|
+
for (var i = 0; i < this.nodesAfterSort.length; i++) {
|
|
431
|
+
var rowNode = this.nodesAfterSort[i];
|
|
432
|
+
var res = this.blockUtils.extractRowBounds(rowNode, index);
|
|
433
|
+
|
|
434
|
+
if (res) {
|
|
435
|
+
return res;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
return null;
|
|
440
|
+
}
|
|
441
|
+
}, {
|
|
442
|
+
key: "isPixelInRange",
|
|
443
|
+
value: function isPixelInRange(pixel) {
|
|
444
|
+
return pixel >= this.topPx && pixel < this.topPx + this.heightPx;
|
|
445
|
+
}
|
|
446
|
+
}, {
|
|
447
|
+
key: "getRowIndexAtPixel",
|
|
448
|
+
value: function getRowIndexAtPixel(pixel) {
|
|
449
|
+
var _this8 = this;
|
|
450
|
+
|
|
451
|
+
// if pixel before block, return first row
|
|
452
|
+
var pixelBeforeThisStore = pixel <= this.topPx;
|
|
453
|
+
|
|
454
|
+
if (pixelBeforeThisStore) {
|
|
455
|
+
var firstNode = this.nodesAfterSort[0];
|
|
456
|
+
return firstNode.rowIndex;
|
|
457
|
+
} // if pixel after store, return last row, however the last
|
|
458
|
+
// row could be a child store
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
var pixelAfterThisStore = pixel >= this.topPx + this.heightPx;
|
|
462
|
+
|
|
463
|
+
if (pixelAfterThisStore) {
|
|
464
|
+
var lastRowNode = this.nodesAfterSort[this.nodesAfterSort.length - 1];
|
|
465
|
+
var lastRowNodeBottomPx = lastRowNode.rowTop + lastRowNode.rowHeight;
|
|
466
|
+
|
|
467
|
+
if (pixel >= lastRowNodeBottomPx && lastRowNode.expanded) {
|
|
468
|
+
if (lastRowNode.childStore && lastRowNode.childStore.getRowCount() > 0) {
|
|
469
|
+
return lastRowNode.childStore.getRowIndexAtPixel(pixel);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
if (lastRowNode.detailNode) {
|
|
473
|
+
return lastRowNode.detailNode.rowIndex;
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
return lastRowNode.rowIndex;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
var res = null;
|
|
481
|
+
this.nodesAfterSort.forEach(function (rowNode) {
|
|
482
|
+
var res2 = _this8.blockUtils.getIndexAtPixel(rowNode, pixel);
|
|
483
|
+
|
|
484
|
+
if (res2 != null) {
|
|
485
|
+
res = res2;
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
var pixelIsPastLastRow = res == null;
|
|
489
|
+
|
|
490
|
+
if (pixelIsPastLastRow) {
|
|
491
|
+
return this.displayIndexEnd - 1;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
return res;
|
|
495
|
+
}
|
|
496
|
+
}, {
|
|
497
|
+
key: "getChildStore",
|
|
498
|
+
value: function getChildStore(keys) {
|
|
499
|
+
var _this9 = this;
|
|
500
|
+
|
|
501
|
+
return this.storeUtils.getChildStore(keys, this, function (key) {
|
|
502
|
+
var rowNode = _this9.allRowNodes.find(function (currentRowNode) {
|
|
503
|
+
return currentRowNode.key == key;
|
|
504
|
+
});
|
|
505
|
+
|
|
506
|
+
return rowNode;
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
}, {
|
|
510
|
+
key: "forEachChildStoreShallow",
|
|
511
|
+
value: function forEachChildStoreShallow(callback) {
|
|
512
|
+
this.allRowNodes.forEach(function (rowNode) {
|
|
513
|
+
var childStore = rowNode.childStore;
|
|
514
|
+
|
|
515
|
+
if (childStore) {
|
|
516
|
+
callback(childStore);
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
}, {
|
|
521
|
+
key: "refreshAfterFilter",
|
|
522
|
+
value: function refreshAfterFilter(params) {
|
|
523
|
+
var serverIsFiltering = this.gridOptionsWrapper.isServerSideFilterOnServer();
|
|
524
|
+
var storeIsImpacted = this.storeUtils.isServerRefreshNeeded(this.parentRowNode, this.ssrmParams.rowGroupCols, params);
|
|
525
|
+
var serverIsFilteringAllLevels = this.gridOptionsWrapper.isServerSideFilterAllLevels();
|
|
526
|
+
|
|
527
|
+
if (serverIsFilteringAllLevels || serverIsFiltering && storeIsImpacted) {
|
|
528
|
+
this.refreshStore(true);
|
|
529
|
+
this.sortRowNodes();
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
this.filterRowNodes();
|
|
534
|
+
this.sortRowNodes();
|
|
535
|
+
this.forEachChildStoreShallow(function (store) {
|
|
536
|
+
return store.refreshAfterFilter(params);
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
}, {
|
|
540
|
+
key: "refreshAfterSort",
|
|
541
|
+
value: function refreshAfterSort(params) {
|
|
542
|
+
var serverIsSorting = this.gridOptionsWrapper.isServerSideSortOnServer();
|
|
543
|
+
var storeIsImpacted = this.storeUtils.isServerRefreshNeeded(this.parentRowNode, this.ssrmParams.rowGroupCols, params);
|
|
544
|
+
var serverIsSortingAllLevels = this.gridOptionsWrapper.isServerSideSortAllLevels();
|
|
545
|
+
|
|
546
|
+
if (serverIsSortingAllLevels || serverIsSorting && storeIsImpacted) {
|
|
547
|
+
this.refreshStore(true);
|
|
548
|
+
this.filterRowNodes();
|
|
549
|
+
return;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
this.filterRowNodes();
|
|
553
|
+
this.sortRowNodes();
|
|
554
|
+
this.forEachChildStoreShallow(function (store) {
|
|
555
|
+
return store.refreshAfterSort(params);
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
}, {
|
|
559
|
+
key: "applyTransaction",
|
|
560
|
+
value: function applyTransaction(transaction) {
|
|
561
|
+
// we only apply transactions to loaded state
|
|
562
|
+
switch (this.getState()) {
|
|
563
|
+
case RowNodeBlock.STATE_FAILED:
|
|
564
|
+
return {
|
|
565
|
+
status: ServerSideTransactionResultStatus.StoreLoadingFailed
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
case RowNodeBlock.STATE_LOADING:
|
|
569
|
+
return {
|
|
570
|
+
status: ServerSideTransactionResultStatus.StoreLoading
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
case RowNodeBlock.STATE_WAITING_TO_LOAD:
|
|
574
|
+
return {
|
|
575
|
+
status: ServerSideTransactionResultStatus.StoreWaitingToLoad
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
var applyCallback = this.gridOptionsWrapper.getIsApplyServerSideTransactionFunc();
|
|
580
|
+
|
|
581
|
+
if (applyCallback) {
|
|
582
|
+
var params = {
|
|
583
|
+
transaction: transaction,
|
|
584
|
+
parentNode: this.parentRowNode,
|
|
585
|
+
storeInfo: this.info,
|
|
586
|
+
groupLevelInfo: this.info
|
|
587
|
+
};
|
|
588
|
+
var apply = applyCallback(params);
|
|
589
|
+
|
|
590
|
+
if (!apply) {
|
|
591
|
+
return {
|
|
592
|
+
status: ServerSideTransactionResultStatus.Cancelled
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
var res = {
|
|
598
|
+
status: ServerSideTransactionResultStatus.Applied,
|
|
599
|
+
remove: [],
|
|
600
|
+
update: [],
|
|
601
|
+
add: []
|
|
602
|
+
};
|
|
603
|
+
var nodesToUnselect = [];
|
|
604
|
+
this.executeAdd(transaction, res);
|
|
605
|
+
this.executeRemove(transaction, res, nodesToUnselect);
|
|
606
|
+
this.executeUpdate(transaction, res, nodesToUnselect);
|
|
607
|
+
this.filterAndSortNodes();
|
|
608
|
+
this.updateSelection(nodesToUnselect);
|
|
609
|
+
return res;
|
|
610
|
+
}
|
|
611
|
+
}, {
|
|
612
|
+
key: "updateSelection",
|
|
613
|
+
value: function updateSelection(nodesToUnselect) {
|
|
614
|
+
var selectionChanged = nodesToUnselect.length > 0;
|
|
615
|
+
|
|
616
|
+
if (selectionChanged) {
|
|
617
|
+
nodesToUnselect.forEach(function (rowNode) {
|
|
618
|
+
rowNode.setSelected(false, false, true);
|
|
619
|
+
});
|
|
620
|
+
var event = {
|
|
621
|
+
type: Events.EVENT_SELECTION_CHANGED
|
|
622
|
+
};
|
|
623
|
+
this.eventService.dispatchEvent(event);
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}, {
|
|
627
|
+
key: "executeAdd",
|
|
628
|
+
value: function executeAdd(rowDataTran, rowNodeTransaction) {
|
|
629
|
+
var _this10 = this;
|
|
630
|
+
|
|
631
|
+
var add = rowDataTran.add,
|
|
632
|
+
addIndex = rowDataTran.addIndex;
|
|
633
|
+
|
|
634
|
+
if (_.missingOrEmpty(add)) {
|
|
635
|
+
return;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
var useIndex = typeof addIndex === 'number' && addIndex >= 0;
|
|
639
|
+
|
|
640
|
+
if (useIndex) {
|
|
641
|
+
// items get inserted in reverse order for index insertion
|
|
642
|
+
add.reverse().forEach(function (item) {
|
|
643
|
+
var newRowNode = _this10.createDataNode(item, addIndex);
|
|
644
|
+
|
|
645
|
+
rowNodeTransaction.add.push(newRowNode);
|
|
646
|
+
});
|
|
647
|
+
} else {
|
|
648
|
+
add.forEach(function (item) {
|
|
649
|
+
var newRowNode = _this10.createDataNode(item);
|
|
650
|
+
|
|
651
|
+
rowNodeTransaction.add.push(newRowNode);
|
|
652
|
+
});
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}, {
|
|
656
|
+
key: "executeRemove",
|
|
657
|
+
value: function executeRemove(rowDataTran, rowNodeTransaction, nodesToUnselect) {
|
|
658
|
+
var _this11 = this;
|
|
659
|
+
|
|
660
|
+
var remove = rowDataTran.remove;
|
|
661
|
+
|
|
662
|
+
if (remove == null) {
|
|
663
|
+
return;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
var rowIdsRemoved = {};
|
|
667
|
+
remove.forEach(function (item) {
|
|
668
|
+
var rowNode = _this11.lookupRowNode(item);
|
|
669
|
+
|
|
670
|
+
if (!rowNode) {
|
|
671
|
+
return;
|
|
672
|
+
} // do delete - setting 'suppressFinishActions = true' to ensure EVENT_SELECTION_CHANGED is not raised for
|
|
673
|
+
// each row node updated, instead it is raised once by the calling code if any selected nodes exist.
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
if (rowNode.isSelected()) {
|
|
677
|
+
nodesToUnselect.push(rowNode);
|
|
678
|
+
} // so row renderer knows to fade row out (and not reposition it)
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
rowNode.clearRowTopAndRowIndex(); // NOTE: were we could remove from allLeaveChildren, however _.removeFromArray() is expensive, especially
|
|
682
|
+
// if called multiple times (eg deleting lots of rows) and if allLeafChildren is a large list
|
|
683
|
+
|
|
684
|
+
rowIdsRemoved[rowNode.id] = true; // _.removeFromArray(this.rootNode.allLeafChildren, rowNode);
|
|
685
|
+
|
|
686
|
+
delete _this11.allNodesMap[rowNode.id];
|
|
687
|
+
rowNodeTransaction.remove.push(rowNode);
|
|
688
|
+
|
|
689
|
+
_this11.nodeManager.removeNode(rowNode);
|
|
690
|
+
});
|
|
691
|
+
this.allRowNodes = this.allRowNodes.filter(function (rowNode) {
|
|
692
|
+
return !rowIdsRemoved[rowNode.id];
|
|
693
|
+
});
|
|
694
|
+
}
|
|
695
|
+
}, {
|
|
696
|
+
key: "executeUpdate",
|
|
697
|
+
value: function executeUpdate(rowDataTran, rowNodeTransaction, nodesToUnselect) {
|
|
698
|
+
var _this12 = this;
|
|
699
|
+
|
|
700
|
+
var update = rowDataTran.update;
|
|
701
|
+
|
|
702
|
+
if (update == null) {
|
|
703
|
+
return;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
update.forEach(function (item) {
|
|
707
|
+
var rowNode = _this12.lookupRowNode(item);
|
|
708
|
+
|
|
709
|
+
if (!rowNode) {
|
|
710
|
+
return;
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
rowNode.updateData(item);
|
|
714
|
+
|
|
715
|
+
if (!rowNode.selectable && rowNode.isSelected()) {
|
|
716
|
+
nodesToUnselect.push(rowNode);
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
rowNodeTransaction.update.push(rowNode);
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
}, {
|
|
723
|
+
key: "lookupRowNode",
|
|
724
|
+
value: function lookupRowNode(data) {
|
|
725
|
+
var getRowIdFunc = this.gridOptionsWrapper.getRowIdFunc();
|
|
726
|
+
var rowNode;
|
|
727
|
+
|
|
728
|
+
if (getRowIdFunc != null) {
|
|
729
|
+
// find rowNode using id
|
|
730
|
+
var level = this.level;
|
|
731
|
+
var parentKeys = this.parentRowNode.getGroupKeys();
|
|
732
|
+
var id = getRowIdFunc({
|
|
733
|
+
data: data,
|
|
734
|
+
parentKeys: parentKeys.length > 0 ? parentKeys : undefined,
|
|
735
|
+
level: level
|
|
736
|
+
});
|
|
737
|
+
rowNode = this.allNodesMap[id];
|
|
738
|
+
|
|
739
|
+
if (!rowNode) {
|
|
740
|
+
console.error("AG Grid: could not find row id=".concat(id, ", data item was not found for this id"));
|
|
741
|
+
return null;
|
|
742
|
+
}
|
|
743
|
+
} else {
|
|
744
|
+
// find rowNode using object references
|
|
745
|
+
rowNode = this.allRowNodes.find(function (currentRowNode) {
|
|
746
|
+
return currentRowNode.data === data;
|
|
747
|
+
});
|
|
748
|
+
|
|
749
|
+
if (!rowNode) {
|
|
750
|
+
console.error("AG Grid: could not find data item as object was not found", data);
|
|
751
|
+
return null;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
return rowNode;
|
|
756
|
+
}
|
|
757
|
+
}, {
|
|
758
|
+
key: "addStoreStates",
|
|
759
|
+
value: function addStoreStates(result) {
|
|
760
|
+
result.push({
|
|
761
|
+
infiniteScroll: false,
|
|
762
|
+
route: this.parentRowNode.getGroupKeys(),
|
|
763
|
+
rowCount: this.allRowNodes.length,
|
|
764
|
+
info: this.info
|
|
765
|
+
});
|
|
766
|
+
this.forEachChildStoreShallow(function (childStore) {
|
|
767
|
+
return childStore.addStoreStates(result);
|
|
768
|
+
});
|
|
769
|
+
}
|
|
770
|
+
}, {
|
|
771
|
+
key: "refreshStore",
|
|
772
|
+
value: function refreshStore(purge) {
|
|
773
|
+
if (purge) {
|
|
774
|
+
var loadingRowsToShow = this.nodesAfterSort ? this.nodesAfterSort.length : 1;
|
|
775
|
+
this.initialiseRowNodes(loadingRowsToShow);
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
this.scheduleLoad();
|
|
779
|
+
this.fireStoreUpdatedEvent();
|
|
780
|
+
}
|
|
781
|
+
}, {
|
|
782
|
+
key: "retryLoads",
|
|
783
|
+
value: function retryLoads() {
|
|
784
|
+
if (this.getState() === RowNodeBlock.STATE_FAILED) {
|
|
785
|
+
this.initialiseRowNodes(1);
|
|
786
|
+
this.scheduleLoad();
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
this.forEachChildStoreShallow(function (store) {
|
|
790
|
+
return store.retryLoads();
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
}, {
|
|
794
|
+
key: "scheduleLoad",
|
|
795
|
+
value: function scheduleLoad() {
|
|
796
|
+
this.setStateWaitingToLoad();
|
|
797
|
+
this.rowNodeBlockLoader.checkBlockToLoad();
|
|
798
|
+
} // gets called 1) row count changed 2) cache purged 3) items inserted
|
|
799
|
+
|
|
800
|
+
}, {
|
|
801
|
+
key: "fireStoreUpdatedEvent",
|
|
802
|
+
value: function fireStoreUpdatedEvent() {
|
|
803
|
+
// this results in row model firing ModelUpdated.
|
|
804
|
+
// server side row model also updates the row indexes first
|
|
805
|
+
var event = {
|
|
806
|
+
type: Events.EVENT_STORE_UPDATED
|
|
807
|
+
};
|
|
808
|
+
this.eventService.dispatchEvent(event);
|
|
809
|
+
}
|
|
810
|
+
}, {
|
|
811
|
+
key: "getRowCount",
|
|
812
|
+
value: function getRowCount() {
|
|
813
|
+
return this.nodesAfterSort.length;
|
|
814
|
+
}
|
|
815
|
+
}, {
|
|
816
|
+
key: "getTopLevelRowDisplayedIndex",
|
|
817
|
+
value: function getTopLevelRowDisplayedIndex(topLevelIndex) {
|
|
818
|
+
var rowNode = this.nodesAfterSort[topLevelIndex];
|
|
819
|
+
return rowNode.rowIndex;
|
|
820
|
+
}
|
|
821
|
+
}, {
|
|
822
|
+
key: "isLastRowIndexKnown",
|
|
823
|
+
value: function isLastRowIndexKnown() {
|
|
824
|
+
return this.getState() == RowNodeBlock.STATE_LOADED;
|
|
825
|
+
}
|
|
826
|
+
}, {
|
|
827
|
+
key: "getRowNodesInRange",
|
|
828
|
+
value: function getRowNodesInRange(firstInRange, lastInRange) {
|
|
829
|
+
var result = [];
|
|
830
|
+
var inActiveRange = false; // if only one node passed, we start the selection at the top
|
|
831
|
+
|
|
832
|
+
if (_.missing(firstInRange)) {
|
|
833
|
+
inActiveRange = true;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
this.nodesAfterSort.forEach(function (rowNode) {
|
|
837
|
+
var hitFirstOrLast = rowNode === firstInRange || rowNode === lastInRange;
|
|
838
|
+
|
|
839
|
+
if (inActiveRange || hitFirstOrLast) {
|
|
840
|
+
result.push(rowNode);
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
if (hitFirstOrLast) {
|
|
844
|
+
inActiveRange = !inActiveRange;
|
|
845
|
+
}
|
|
846
|
+
}); // inActiveRange will be still true if we never hit the second rowNode
|
|
847
|
+
|
|
848
|
+
var invalidRange = inActiveRange;
|
|
849
|
+
return invalidRange ? [] : result;
|
|
850
|
+
}
|
|
851
|
+
}]);
|
|
852
|
+
|
|
853
|
+
return FullStore;
|
|
854
|
+
}(RowNodeBlock);
|
|
855
|
+
|
|
856
|
+
__decorate([Autowired('ssrmStoreUtils')], FullStore.prototype, 'storeUtils', void 0);
|
|
857
|
+
|
|
858
|
+
__decorate([Autowired('ssrmBlockUtils')], FullStore.prototype, 'blockUtils', void 0);
|
|
859
|
+
|
|
860
|
+
__decorate([Autowired('columnModel')], FullStore.prototype, 'columnModel', void 0);
|
|
861
|
+
|
|
862
|
+
__decorate([Autowired('rowNodeBlockLoader')], FullStore.prototype, 'rowNodeBlockLoader', void 0);
|
|
863
|
+
|
|
864
|
+
__decorate([Autowired('rowNodeSorter')], FullStore.prototype, 'rowNodeSorter', void 0);
|
|
865
|
+
|
|
866
|
+
__decorate([Autowired('sortController')], FullStore.prototype, 'sortController', void 0);
|
|
867
|
+
|
|
868
|
+
__decorate([Autowired('ssrmNodeManager')], FullStore.prototype, 'nodeManager', void 0);
|
|
869
|
+
|
|
870
|
+
__decorate([Autowired('filterManager')], FullStore.prototype, 'filterManager', void 0);
|
|
871
|
+
|
|
872
|
+
__decorate([Autowired('ssrmTransactionManager')], FullStore.prototype, 'transactionManager', void 0);
|
|
873
|
+
|
|
874
|
+
__decorate([PostConstruct], FullStore.prototype, 'postConstruct', null);
|
|
875
|
+
|
|
876
|
+
__decorate([PreDestroy], FullStore.prototype, 'destroyRowNodes', null);
|