@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
|
@@ -0,0 +1,303 @@
|
|
|
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
|
+
var AggFuncService_1;
|
|
34
|
+
import { Bean, BeanStub, PostConstruct, _ } from '@ag-grid-community/core'; // @ts-ignore
|
|
35
|
+
|
|
36
|
+
var AGBigInt = typeof BigInt === 'undefined' ? null : BigInt;
|
|
37
|
+
|
|
38
|
+
var AggFuncService = AggFuncService_1 = /*#__PURE__*/function (_BeanStub) {
|
|
39
|
+
_inherits(AggFuncService, _BeanStub);
|
|
40
|
+
|
|
41
|
+
var _super = _createSuper(AggFuncService);
|
|
42
|
+
|
|
43
|
+
function AggFuncService() {
|
|
44
|
+
var _this;
|
|
45
|
+
|
|
46
|
+
_classCallCheck(this, AggFuncService);
|
|
47
|
+
|
|
48
|
+
_this = _super.apply(this, arguments);
|
|
49
|
+
_this.aggFuncsMap = {};
|
|
50
|
+
_this.initialised = false;
|
|
51
|
+
return _this;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
_createClass(AggFuncService, [{
|
|
55
|
+
key: "init",
|
|
56
|
+
value: function init() {
|
|
57
|
+
if (this.initialised) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
this.initialiseWithDefaultAggregations();
|
|
62
|
+
this.addAggFuncs(this.gridOptionsWrapper.getAggFuncs());
|
|
63
|
+
}
|
|
64
|
+
}, {
|
|
65
|
+
key: "initialiseWithDefaultAggregations",
|
|
66
|
+
value: function initialiseWithDefaultAggregations() {
|
|
67
|
+
this.aggFuncsMap[AggFuncService_1.AGG_SUM] = aggSum;
|
|
68
|
+
this.aggFuncsMap[AggFuncService_1.AGG_FIRST] = aggFirst;
|
|
69
|
+
this.aggFuncsMap[AggFuncService_1.AGG_LAST] = aggLast;
|
|
70
|
+
this.aggFuncsMap[AggFuncService_1.AGG_MIN] = aggMin;
|
|
71
|
+
this.aggFuncsMap[AggFuncService_1.AGG_MAX] = aggMax;
|
|
72
|
+
this.aggFuncsMap[AggFuncService_1.AGG_COUNT] = aggCount;
|
|
73
|
+
this.aggFuncsMap[AggFuncService_1.AGG_AVG] = aggAvg;
|
|
74
|
+
this.initialised = true;
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
key: "isAggFuncPossible",
|
|
78
|
+
value: function isAggFuncPossible(column, func) {
|
|
79
|
+
var allKeys = this.getFuncNames(column);
|
|
80
|
+
|
|
81
|
+
var allowed = _.includes(allKeys, func);
|
|
82
|
+
|
|
83
|
+
var funcExists = _.exists(this.aggFuncsMap[func]);
|
|
84
|
+
|
|
85
|
+
return allowed && funcExists;
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
key: "getDefaultAggFunc",
|
|
89
|
+
value: function getDefaultAggFunc(column) {
|
|
90
|
+
var defaultAgg = column.getColDef().defaultAggFunc;
|
|
91
|
+
|
|
92
|
+
if (_.exists(defaultAgg) && this.isAggFuncPossible(column, defaultAgg)) {
|
|
93
|
+
return defaultAgg;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
if (this.isAggFuncPossible(column, AggFuncService_1.AGG_SUM)) {
|
|
97
|
+
return AggFuncService_1.AGG_SUM;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
var allKeys = this.getFuncNames(column);
|
|
101
|
+
return _.existsAndNotEmpty(allKeys) ? allKeys[0] : null;
|
|
102
|
+
}
|
|
103
|
+
}, {
|
|
104
|
+
key: "addAggFuncs",
|
|
105
|
+
value: function addAggFuncs(aggFuncs) {
|
|
106
|
+
_.iterateObject(aggFuncs, this.addAggFunc.bind(this));
|
|
107
|
+
}
|
|
108
|
+
}, {
|
|
109
|
+
key: "addAggFunc",
|
|
110
|
+
value: function addAggFunc(key, aggFunc) {
|
|
111
|
+
this.init();
|
|
112
|
+
this.aggFuncsMap[key] = aggFunc;
|
|
113
|
+
}
|
|
114
|
+
}, {
|
|
115
|
+
key: "getAggFunc",
|
|
116
|
+
value: function getAggFunc(name) {
|
|
117
|
+
this.init();
|
|
118
|
+
return this.aggFuncsMap[name];
|
|
119
|
+
}
|
|
120
|
+
}, {
|
|
121
|
+
key: "getFuncNames",
|
|
122
|
+
value: function getFuncNames(column) {
|
|
123
|
+
var userAllowedFuncs = column.getColDef().allowedAggFuncs;
|
|
124
|
+
return userAllowedFuncs == null ? Object.keys(this.aggFuncsMap).sort() : userAllowedFuncs;
|
|
125
|
+
}
|
|
126
|
+
}, {
|
|
127
|
+
key: "clear",
|
|
128
|
+
value: function clear() {
|
|
129
|
+
this.aggFuncsMap = {};
|
|
130
|
+
}
|
|
131
|
+
}]);
|
|
132
|
+
|
|
133
|
+
return AggFuncService;
|
|
134
|
+
}(BeanStub);
|
|
135
|
+
|
|
136
|
+
AggFuncService.AGG_SUM = 'sum';
|
|
137
|
+
AggFuncService.AGG_FIRST = 'first';
|
|
138
|
+
AggFuncService.AGG_LAST = 'last';
|
|
139
|
+
AggFuncService.AGG_MIN = 'min';
|
|
140
|
+
AggFuncService.AGG_MAX = 'max';
|
|
141
|
+
AggFuncService.AGG_COUNT = 'count';
|
|
142
|
+
AggFuncService.AGG_AVG = 'avg';
|
|
143
|
+
|
|
144
|
+
__decorate([PostConstruct], AggFuncService.prototype, "init", null);
|
|
145
|
+
|
|
146
|
+
AggFuncService = AggFuncService_1 = __decorate([Bean('aggFuncService')], AggFuncService);
|
|
147
|
+
export { AggFuncService };
|
|
148
|
+
|
|
149
|
+
function aggSum(params) {
|
|
150
|
+
var values = params.values;
|
|
151
|
+
var result = null; // the logic ensures that we never combine bigint arithmetic with numbers, but TS is hard to please
|
|
152
|
+
// for optimum performance, we use a for loop here rather than calling any helper methods or using functional code
|
|
153
|
+
|
|
154
|
+
for (var i = 0; i < values.length; i++) {
|
|
155
|
+
var value = values[i];
|
|
156
|
+
|
|
157
|
+
if (typeof value === 'number') {
|
|
158
|
+
if (result === null) {
|
|
159
|
+
result = value;
|
|
160
|
+
} else {
|
|
161
|
+
if (AGBigInt) {
|
|
162
|
+
result += typeof result === 'number' ? value : AGBigInt(value);
|
|
163
|
+
} else {
|
|
164
|
+
result += value;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
} else if (typeof value === 'bigint') {
|
|
168
|
+
if (result === null) {
|
|
169
|
+
result = value;
|
|
170
|
+
} else {
|
|
171
|
+
result = (typeof result === 'bigint' ? result : AGBigInt(result)) + value;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return result;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function aggFirst(params) {
|
|
180
|
+
return params.values.length > 0 ? params.values[0] : null;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function aggLast(params) {
|
|
184
|
+
return params.values.length > 0 ? _.last(params.values) : null;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function aggMin(params) {
|
|
188
|
+
var values = params.values;
|
|
189
|
+
var result = null; // for optimum performance, we use a for loop here rather than calling any helper methods or using functional code
|
|
190
|
+
|
|
191
|
+
for (var i = 0; i < values.length; i++) {
|
|
192
|
+
var value = values[i];
|
|
193
|
+
|
|
194
|
+
if ((typeof value === 'number' || typeof value === 'bigint') && (result === null || result > value)) {
|
|
195
|
+
result = value;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return result;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function aggMax(params) {
|
|
203
|
+
var values = params.values;
|
|
204
|
+
var result = null; // for optimum performance, we use a for loop here rather than calling any helper methods or using functional code
|
|
205
|
+
|
|
206
|
+
for (var i = 0; i < values.length; i++) {
|
|
207
|
+
var value = values[i];
|
|
208
|
+
|
|
209
|
+
if ((typeof value === 'number' || typeof value === 'bigint') && (result === null || result < value)) {
|
|
210
|
+
result = value;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
return result;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function aggCount(params) {
|
|
218
|
+
var values = params.values;
|
|
219
|
+
var result = 0; // for optimum performance, we use a for loop here rather than calling any helper methods or using functional code
|
|
220
|
+
|
|
221
|
+
for (var i = 0; i < values.length; i++) {
|
|
222
|
+
var value = values[i]; // check if the value is from a group, in which case use the group's count
|
|
223
|
+
|
|
224
|
+
result += value != null && typeof value.value === 'number' ? value.value : 1;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
return result;
|
|
228
|
+
} // the average function is tricky as the multiple levels require weighted averages
|
|
229
|
+
// for the non-leaf node aggregations.
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
function aggAvg(params) {
|
|
233
|
+
var _a, _b, _c;
|
|
234
|
+
|
|
235
|
+
var values = params.values;
|
|
236
|
+
var sum = 0; // the logic ensures that we never combine bigint arithmetic with numbers, but TS is hard to please
|
|
237
|
+
|
|
238
|
+
var count = 0; // for optimum performance, we use a for loop here rather than calling any helper methods or using functional code
|
|
239
|
+
|
|
240
|
+
for (var i = 0; i < values.length; i++) {
|
|
241
|
+
var currentValue = values[i];
|
|
242
|
+
var valueToAdd = null;
|
|
243
|
+
|
|
244
|
+
if (typeof currentValue === 'number' || typeof currentValue === 'bigint') {
|
|
245
|
+
valueToAdd = currentValue;
|
|
246
|
+
count++;
|
|
247
|
+
} else if (currentValue != null && (typeof currentValue.value === 'number' || typeof currentValue.value === 'bigint') && typeof currentValue.count === 'number') {
|
|
248
|
+
// we are aggregating groups, so we take the aggregated values to calculated a weighted average
|
|
249
|
+
if (AGBigInt) {
|
|
250
|
+
valueToAdd = currentValue.value * (typeof currentValue.value === 'number' ? currentValue.count : AGBigInt(currentValue.count));
|
|
251
|
+
} else {
|
|
252
|
+
valueToAdd = currentValue.value * currentValue.count;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
count += currentValue.count;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
if (typeof valueToAdd === 'number') {
|
|
259
|
+
if (AGBigInt) {
|
|
260
|
+
sum += typeof sum === 'number' ? valueToAdd : AGBigInt(valueToAdd);
|
|
261
|
+
} else {
|
|
262
|
+
sum += valueToAdd;
|
|
263
|
+
}
|
|
264
|
+
} else if (typeof valueToAdd === 'bigint') {
|
|
265
|
+
sum = (typeof sum === 'bigint' ? sum : AGBigInt(sum)) + valueToAdd;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
var value = null; // avoid divide by zero error
|
|
270
|
+
|
|
271
|
+
if (count > 0) {
|
|
272
|
+
if (AGBigInt) {
|
|
273
|
+
value = sum / (typeof sum === 'number' ? count : AGBigInt(count));
|
|
274
|
+
} else {
|
|
275
|
+
value = sum / count;
|
|
276
|
+
}
|
|
277
|
+
} // the previous aggregation data
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
var existingAggData = (_b = (_a = params.rowNode) === null || _a === void 0 ? void 0 : _a.aggData) === null || _b === void 0 ? void 0 : _b[(_c = params.column) === null || _c === void 0 ? void 0 : _c.getColId()];
|
|
281
|
+
|
|
282
|
+
if (existingAggData && existingAggData.count === count && existingAggData.value === value) {
|
|
283
|
+
// the underlying values haven't changed, return the old object to avoid triggering change detection
|
|
284
|
+
return existingAggData;
|
|
285
|
+
} // the result will be an object. when this cell is rendered, only the avg is shown.
|
|
286
|
+
// however when this cell is part of another aggregation, the count is also needed
|
|
287
|
+
// to create a weighted average for the next level.
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
return {
|
|
291
|
+
count: count,
|
|
292
|
+
value: value,
|
|
293
|
+
// the grid by default uses toString to render values for an object, so this
|
|
294
|
+
// is a trick to get the default cellRenderer to display the avg value
|
|
295
|
+
toString: function toString() {
|
|
296
|
+
return typeof this.value === 'number' || typeof this.value === 'bigint' ? this.value.toString() : '';
|
|
297
|
+
},
|
|
298
|
+
// used for sorting
|
|
299
|
+
toNumber: function toNumber() {
|
|
300
|
+
return this.value;
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { BeanStub, IRowNodeStage, RowNode, Column, StageExecuteParams, IAggFunc } from "@ag-grid-community/core";
|
|
2
|
+
export declare class AggregationStage extends BeanStub implements IRowNodeStage {
|
|
3
|
+
private columnModel;
|
|
4
|
+
private valueService;
|
|
5
|
+
private pivotStage;
|
|
6
|
+
private aggFuncService;
|
|
7
|
+
private gridApi;
|
|
8
|
+
private columnApi;
|
|
9
|
+
private filteredOnly;
|
|
10
|
+
execute(params: StageExecuteParams): any;
|
|
11
|
+
private createAggDetails;
|
|
12
|
+
private recursivelyCreateAggData;
|
|
13
|
+
private aggregateRowNode;
|
|
14
|
+
private aggregateRowNodeUsingValuesAndPivot;
|
|
15
|
+
private aggregateRowNodeUsingValuesOnly;
|
|
16
|
+
private getValuesPivotNonLeaf;
|
|
17
|
+
private getValuesFromMappedSet;
|
|
18
|
+
private getValuesNormal;
|
|
19
|
+
aggregateValues(values: any[], aggFuncOrString: string | IAggFunc, column?: Column, rowNode?: RowNode): any;
|
|
20
|
+
}
|
|
@@ -0,0 +1,326 @@
|
|
|
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 { Bean, BeanStub, Autowired, _ } from "@ag-grid-community/core";
|
|
34
|
+
|
|
35
|
+
var AggregationStage = /*#__PURE__*/function (_BeanStub) {
|
|
36
|
+
_inherits(AggregationStage, _BeanStub);
|
|
37
|
+
|
|
38
|
+
var _super = _createSuper(AggregationStage);
|
|
39
|
+
|
|
40
|
+
function AggregationStage() {
|
|
41
|
+
_classCallCheck(this, AggregationStage);
|
|
42
|
+
|
|
43
|
+
return _super.apply(this, arguments);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
_createClass(AggregationStage, [{
|
|
47
|
+
key: "execute",
|
|
48
|
+
value: // it's possible to recompute the aggregate without doing the other parts
|
|
49
|
+
// + gridApi.recomputeAggregates()
|
|
50
|
+
function execute(params) {
|
|
51
|
+
// if changed path is active, it means we came from a) change detection or b) transaction update.
|
|
52
|
+
// for both of these, if no value columns are present, it means there is nothing to aggregate now
|
|
53
|
+
// and there is no cleanup to be done (as value columns don't change between transactions or change
|
|
54
|
+
// detections). if no value columns and no changed path, means we have to go through all nodes in
|
|
55
|
+
// case we need to clean up agg data from before.
|
|
56
|
+
var noValueColumns = _.missingOrEmpty(this.columnModel.getValueColumns());
|
|
57
|
+
|
|
58
|
+
var noUserAgg = !this.gridOptionsWrapper.getGroupRowAggFunc();
|
|
59
|
+
var changedPathActive = params.changedPath && params.changedPath.isActive();
|
|
60
|
+
|
|
61
|
+
if (noValueColumns && noUserAgg && changedPathActive) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
var aggDetails = this.createAggDetails(params);
|
|
66
|
+
this.recursivelyCreateAggData(aggDetails);
|
|
67
|
+
}
|
|
68
|
+
}, {
|
|
69
|
+
key: "createAggDetails",
|
|
70
|
+
value: function createAggDetails(params) {
|
|
71
|
+
var pivotActive = this.columnModel.isPivotActive();
|
|
72
|
+
var measureColumns = this.columnModel.getValueColumns();
|
|
73
|
+
var pivotColumns = pivotActive ? this.columnModel.getPivotColumns() : [];
|
|
74
|
+
var aggDetails = {
|
|
75
|
+
changedPath: params.changedPath,
|
|
76
|
+
valueColumns: measureColumns,
|
|
77
|
+
pivotColumns: pivotColumns
|
|
78
|
+
};
|
|
79
|
+
return aggDetails;
|
|
80
|
+
}
|
|
81
|
+
}, {
|
|
82
|
+
key: "recursivelyCreateAggData",
|
|
83
|
+
value: function recursivelyCreateAggData(aggDetails) {
|
|
84
|
+
var _this = this;
|
|
85
|
+
|
|
86
|
+
// update prop, in case changed since last time
|
|
87
|
+
this.filteredOnly = !this.gridOptionsWrapper.isSuppressAggFilteredOnly();
|
|
88
|
+
|
|
89
|
+
var callback = function callback(rowNode) {
|
|
90
|
+
var hasNoChildren = !rowNode.hasChildren();
|
|
91
|
+
|
|
92
|
+
if (hasNoChildren) {
|
|
93
|
+
// this check is needed for TreeData, in case the node is no longer a child,
|
|
94
|
+
// but it was a child previously.
|
|
95
|
+
if (rowNode.aggData) {
|
|
96
|
+
rowNode.setAggData(null);
|
|
97
|
+
} // never agg data for leaf nodes
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
return;
|
|
101
|
+
} //Optionally prevent the aggregation at the root Node
|
|
102
|
+
//https://ag-grid.atlassian.net/browse/AG-388
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
var isRootNode = rowNode.level === -1;
|
|
106
|
+
|
|
107
|
+
if (isRootNode) {
|
|
108
|
+
var notPivoting = !_this.columnModel.isPivotMode();
|
|
109
|
+
|
|
110
|
+
var suppressAggAtRootLevel = _this.gridOptionsWrapper.isSuppressAggAtRootLevel();
|
|
111
|
+
|
|
112
|
+
if (suppressAggAtRootLevel && notPivoting) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
_this.aggregateRowNode(rowNode, aggDetails);
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
aggDetails.changedPath.forEachChangedNodeDepthFirst(callback, true);
|
|
121
|
+
}
|
|
122
|
+
}, {
|
|
123
|
+
key: "aggregateRowNode",
|
|
124
|
+
value: function aggregateRowNode(rowNode, aggDetails) {
|
|
125
|
+
var measureColumnsMissing = aggDetails.valueColumns.length === 0;
|
|
126
|
+
var pivotColumnsMissing = aggDetails.pivotColumns.length === 0;
|
|
127
|
+
var userFunc = this.gridOptionsWrapper.getGroupRowAggFunc();
|
|
128
|
+
var aggResult;
|
|
129
|
+
|
|
130
|
+
if (userFunc) {
|
|
131
|
+
var params = {
|
|
132
|
+
nodes: rowNode.childrenAfterFilter
|
|
133
|
+
};
|
|
134
|
+
aggResult = userFunc(params);
|
|
135
|
+
} else if (measureColumnsMissing) {
|
|
136
|
+
aggResult = null;
|
|
137
|
+
} else if (pivotColumnsMissing) {
|
|
138
|
+
aggResult = this.aggregateRowNodeUsingValuesOnly(rowNode, aggDetails);
|
|
139
|
+
} else {
|
|
140
|
+
aggResult = this.aggregateRowNodeUsingValuesAndPivot(rowNode);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
rowNode.setAggData(aggResult); // if we are grouping, then it's possible there is a sibling footer
|
|
144
|
+
// to the group, so update the data here also if there is one
|
|
145
|
+
|
|
146
|
+
if (rowNode.sibling) {
|
|
147
|
+
rowNode.sibling.setAggData(aggResult);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}, {
|
|
151
|
+
key: "aggregateRowNodeUsingValuesAndPivot",
|
|
152
|
+
value: function aggregateRowNodeUsingValuesAndPivot(rowNode) {
|
|
153
|
+
var _this2 = this;
|
|
154
|
+
|
|
155
|
+
var result = {};
|
|
156
|
+
var pivotColumnDefs = this.pivotStage.getPivotColumnDefs(); // Step 1: process value columns
|
|
157
|
+
|
|
158
|
+
pivotColumnDefs.filter(function (v) {
|
|
159
|
+
return !_.exists(v.pivotTotalColumnIds);
|
|
160
|
+
}) // only process pivot value columns
|
|
161
|
+
.forEach(function (valueColDef) {
|
|
162
|
+
var keys = valueColDef.pivotKeys || [];
|
|
163
|
+
var values;
|
|
164
|
+
var valueColumn = valueColDef.pivotValueColumn;
|
|
165
|
+
var colId = valueColDef.colId;
|
|
166
|
+
|
|
167
|
+
if (rowNode.leafGroup) {
|
|
168
|
+
// lowest level group, get the values from the mapped set
|
|
169
|
+
values = _this2.getValuesFromMappedSet(rowNode.childrenMapped, keys, valueColumn);
|
|
170
|
+
} else {
|
|
171
|
+
// value columns and pivot columns, non-leaf group
|
|
172
|
+
values = _this2.getValuesPivotNonLeaf(rowNode, colId);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
result[colId] = _this2.aggregateValues(values, valueColumn.getAggFunc(), valueColumn, rowNode);
|
|
176
|
+
}); // Step 2: process total columns
|
|
177
|
+
|
|
178
|
+
pivotColumnDefs.filter(function (v) {
|
|
179
|
+
return _.exists(v.pivotTotalColumnIds);
|
|
180
|
+
}) // only process pivot total columns
|
|
181
|
+
.forEach(function (totalColDef) {
|
|
182
|
+
var aggResults = [];
|
|
183
|
+
var pivotValueColumn = totalColDef.pivotValueColumn,
|
|
184
|
+
pivotTotalColumnIds = totalColDef.pivotTotalColumnIds,
|
|
185
|
+
colId = totalColDef.colId; //retrieve results for colIds associated with this pivot total column
|
|
186
|
+
|
|
187
|
+
if (!pivotTotalColumnIds || !pivotTotalColumnIds.length) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
pivotTotalColumnIds.forEach(function (currentColId) {
|
|
192
|
+
aggResults.push(result[currentColId]);
|
|
193
|
+
});
|
|
194
|
+
result[colId] = _this2.aggregateValues(aggResults, pivotValueColumn.getAggFunc(), pivotValueColumn, rowNode);
|
|
195
|
+
});
|
|
196
|
+
return result;
|
|
197
|
+
}
|
|
198
|
+
}, {
|
|
199
|
+
key: "aggregateRowNodeUsingValuesOnly",
|
|
200
|
+
value: function aggregateRowNodeUsingValuesOnly(rowNode, aggDetails) {
|
|
201
|
+
var _this3 = this;
|
|
202
|
+
|
|
203
|
+
var result = {};
|
|
204
|
+
var changedValueColumns = aggDetails.changedPath.isActive() ? aggDetails.changedPath.getValueColumnsForNode(rowNode, aggDetails.valueColumns) : aggDetails.valueColumns;
|
|
205
|
+
var notChangedValueColumns = aggDetails.changedPath.isActive() ? aggDetails.changedPath.getNotValueColumnsForNode(rowNode, aggDetails.valueColumns) : null;
|
|
206
|
+
var values2d = this.getValuesNormal(rowNode, changedValueColumns);
|
|
207
|
+
var oldValues = rowNode.aggData;
|
|
208
|
+
changedValueColumns.forEach(function (valueColumn, index) {
|
|
209
|
+
result[valueColumn.getId()] = _this3.aggregateValues(values2d[index], valueColumn.getAggFunc(), valueColumn, rowNode);
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
if (notChangedValueColumns && oldValues) {
|
|
213
|
+
notChangedValueColumns.forEach(function (valueColumn) {
|
|
214
|
+
result[valueColumn.getId()] = oldValues[valueColumn.getId()];
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
return result;
|
|
219
|
+
}
|
|
220
|
+
}, {
|
|
221
|
+
key: "getValuesPivotNonLeaf",
|
|
222
|
+
value: function getValuesPivotNonLeaf(rowNode, colId) {
|
|
223
|
+
var values = [];
|
|
224
|
+
rowNode.childrenAfterFilter.forEach(function (node) {
|
|
225
|
+
var value = node.aggData[colId];
|
|
226
|
+
values.push(value);
|
|
227
|
+
});
|
|
228
|
+
return values;
|
|
229
|
+
}
|
|
230
|
+
}, {
|
|
231
|
+
key: "getValuesFromMappedSet",
|
|
232
|
+
value: function getValuesFromMappedSet(mappedSet, keys, valueColumn) {
|
|
233
|
+
var _this4 = this;
|
|
234
|
+
|
|
235
|
+
var mapPointer = mappedSet;
|
|
236
|
+
keys.forEach(function (key) {
|
|
237
|
+
return mapPointer = mapPointer ? mapPointer[key] : null;
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
if (!mapPointer) {
|
|
241
|
+
return [];
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
var values = [];
|
|
245
|
+
mapPointer.forEach(function (rowNode) {
|
|
246
|
+
var value = _this4.valueService.getValue(valueColumn, rowNode);
|
|
247
|
+
|
|
248
|
+
values.push(value);
|
|
249
|
+
});
|
|
250
|
+
return values;
|
|
251
|
+
}
|
|
252
|
+
}, {
|
|
253
|
+
key: "getValuesNormal",
|
|
254
|
+
value: function getValuesNormal(rowNode, valueColumns) {
|
|
255
|
+
// create 2d array, of all values for all valueColumns
|
|
256
|
+
var values = [];
|
|
257
|
+
valueColumns.forEach(function () {
|
|
258
|
+
return values.push([]);
|
|
259
|
+
});
|
|
260
|
+
var valueColumnCount = valueColumns.length;
|
|
261
|
+
var nodeList = this.filteredOnly ? rowNode.childrenAfterFilter : rowNode.childrenAfterGroup;
|
|
262
|
+
var rowCount = nodeList.length;
|
|
263
|
+
|
|
264
|
+
for (var i = 0; i < rowCount; i++) {
|
|
265
|
+
var childNode = nodeList[i];
|
|
266
|
+
|
|
267
|
+
for (var j = 0; j < valueColumnCount; j++) {
|
|
268
|
+
var valueColumn = valueColumns[j]; // if the row is a group, then it will only have an agg result value,
|
|
269
|
+
// which means valueGetter is never used.
|
|
270
|
+
|
|
271
|
+
var value = this.valueService.getValue(valueColumn, childNode);
|
|
272
|
+
values[j].push(value);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
return values;
|
|
277
|
+
}
|
|
278
|
+
}, {
|
|
279
|
+
key: "aggregateValues",
|
|
280
|
+
value: function aggregateValues(values, aggFuncOrString, column, rowNode) {
|
|
281
|
+
var aggFunc = typeof aggFuncOrString === 'string' ? this.aggFuncService.getAggFunc(aggFuncOrString) : aggFuncOrString;
|
|
282
|
+
|
|
283
|
+
if (typeof aggFunc !== 'function') {
|
|
284
|
+
console.error("AG Grid: unrecognised aggregation function ".concat(aggFuncOrString));
|
|
285
|
+
return null;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
var deprecationWarning = function deprecationWarning() {
|
|
289
|
+
_.doOnce(function () {
|
|
290
|
+
console.warn('AG Grid: since v24.0, custom aggregation functions take a params object. Please alter your aggregation function to use params.values');
|
|
291
|
+
}, 'aggregationStage.aggregateValues Deprecation');
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
var aggFuncAny = aggFunc;
|
|
295
|
+
var params = {
|
|
296
|
+
values: values,
|
|
297
|
+
column: column,
|
|
298
|
+
colDef: column ? column.getColDef() : undefined,
|
|
299
|
+
rowNode: rowNode,
|
|
300
|
+
data: rowNode ? rowNode.data : undefined,
|
|
301
|
+
api: this.gridApi,
|
|
302
|
+
columnApi: this.columnApi,
|
|
303
|
+
context: this.gridOptionsWrapper.getContext()
|
|
304
|
+
}; // the "as any" is needed to allow the deprecation warning messages
|
|
305
|
+
|
|
306
|
+
return aggFuncAny(params);
|
|
307
|
+
}
|
|
308
|
+
}]);
|
|
309
|
+
|
|
310
|
+
return AggregationStage;
|
|
311
|
+
}(BeanStub);
|
|
312
|
+
|
|
313
|
+
__decorate([Autowired('columnModel')], AggregationStage.prototype, "columnModel", void 0);
|
|
314
|
+
|
|
315
|
+
__decorate([Autowired('valueService')], AggregationStage.prototype, "valueService", void 0);
|
|
316
|
+
|
|
317
|
+
__decorate([Autowired('pivotStage')], AggregationStage.prototype, "pivotStage", void 0);
|
|
318
|
+
|
|
319
|
+
__decorate([Autowired('aggFuncService')], AggregationStage.prototype, "aggFuncService", void 0);
|
|
320
|
+
|
|
321
|
+
__decorate([Autowired('gridApi')], AggregationStage.prototype, "gridApi", void 0);
|
|
322
|
+
|
|
323
|
+
__decorate([Autowired('columnApi')], AggregationStage.prototype, "columnApi", void 0);
|
|
324
|
+
|
|
325
|
+
AggregationStage = __decorate([Bean('aggregationStage')], AggregationStage);
|
|
326
|
+
export { AggregationStage };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RowNode } from "@ag-grid-community/core";
|
|
2
|
+
export declare class BatchRemover {
|
|
3
|
+
private allSets;
|
|
4
|
+
private allParents;
|
|
5
|
+
removeFromChildrenAfterGroup(parent: RowNode, child: RowNode): void;
|
|
6
|
+
removeFromAllLeafChildren(parent: RowNode, child: RowNode): void;
|
|
7
|
+
private getSet;
|
|
8
|
+
getAllParents(): RowNode[];
|
|
9
|
+
flush(): void;
|
|
10
|
+
}
|