@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/column-tool-panel/columnToolPanel/primaryColsListPanel.js
ADDED
|
@@ -0,0 +1,546 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
|
|
3
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
4
|
+
|
|
5
|
+
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); }; }
|
|
6
|
+
|
|
7
|
+
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); }
|
|
8
|
+
|
|
9
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
10
|
+
|
|
11
|
+
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; } }
|
|
12
|
+
|
|
13
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
14
|
+
|
|
15
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
16
|
+
|
|
17
|
+
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); } }
|
|
18
|
+
|
|
19
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
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, Component, Events, ProvidedColumnGroup, VirtualList, PreDestroy } from '@ag-grid-community/core';
|
|
34
|
+
import { PrimaryColsListPanelItemDragFeature } from "./primaryColsListPanelItemDragFeature";
|
|
35
|
+
import { ToolPanelColumnGroupComp } from "./toolPanelColumnGroupComp";
|
|
36
|
+
import { ToolPanelColumnComp } from "./toolPanelColumnComp";
|
|
37
|
+
import { ExpandState } from "./primaryColsHeaderPanel";
|
|
38
|
+
import { ColumnModelItem } from "./columnModelItem";
|
|
39
|
+
|
|
40
|
+
var UIColumnModel = /*#__PURE__*/function () {
|
|
41
|
+
function UIColumnModel(items) {
|
|
42
|
+
_classCallCheck(this, UIColumnModel);
|
|
43
|
+
|
|
44
|
+
this.items = items;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
_createClass(UIColumnModel, [{
|
|
48
|
+
key: "getRowCount",
|
|
49
|
+
value: function getRowCount() {
|
|
50
|
+
return this.items.length;
|
|
51
|
+
}
|
|
52
|
+
}, {
|
|
53
|
+
key: "getRow",
|
|
54
|
+
value: function getRow(index) {
|
|
55
|
+
return this.items[index];
|
|
56
|
+
}
|
|
57
|
+
}]);
|
|
58
|
+
|
|
59
|
+
return UIColumnModel;
|
|
60
|
+
}();
|
|
61
|
+
|
|
62
|
+
var PRIMARY_COLS_LIST_PANEL_CLASS = 'ag-column-select-list';
|
|
63
|
+
export var PrimaryColsListPanel = /*#__PURE__*/function (_Component) {
|
|
64
|
+
_inherits(PrimaryColsListPanel, _Component);
|
|
65
|
+
|
|
66
|
+
var _super = _createSuper(PrimaryColsListPanel);
|
|
67
|
+
|
|
68
|
+
function PrimaryColsListPanel() {
|
|
69
|
+
var _this;
|
|
70
|
+
|
|
71
|
+
_classCallCheck(this, PrimaryColsListPanel);
|
|
72
|
+
|
|
73
|
+
_this = _super.call(this, PrimaryColsListPanel.TEMPLATE);
|
|
74
|
+
_this.destroyColumnItemFuncs = [];
|
|
75
|
+
return _this;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
_createClass(PrimaryColsListPanel, [{
|
|
79
|
+
key: "destroyColumnTree",
|
|
80
|
+
value: function destroyColumnTree() {
|
|
81
|
+
this.allColsTree = [];
|
|
82
|
+
this.destroyColumnItemFuncs.forEach(function (f) {
|
|
83
|
+
return f();
|
|
84
|
+
});
|
|
85
|
+
this.destroyColumnItemFuncs = [];
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
key: "init",
|
|
89
|
+
value: function init(params, allowDragging, eventType) {
|
|
90
|
+
var _this2 = this;
|
|
91
|
+
|
|
92
|
+
this.params = params;
|
|
93
|
+
this.allowDragging = allowDragging;
|
|
94
|
+
this.eventType = eventType;
|
|
95
|
+
|
|
96
|
+
if (!this.params.suppressSyncLayoutWithGrid) {
|
|
97
|
+
this.addManagedListener(this.eventService, Events.EVENT_COLUMN_MOVED, this.onColumnsChanged.bind(this));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onColumnsChanged.bind(this));
|
|
101
|
+
var eventsImpactingCheckedState = [Events.EVENT_COLUMN_PIVOT_CHANGED, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, Events.EVENT_COLUMN_VALUE_CHANGED, Events.EVENT_COLUMN_VISIBLE, Events.EVENT_NEW_COLUMNS_LOADED];
|
|
102
|
+
eventsImpactingCheckedState.forEach(function (event) {
|
|
103
|
+
// update header select all checkbox with current selection state
|
|
104
|
+
_this2.addManagedListener(_this2.eventService, event, _this2.fireSelectionChangedEvent.bind(_this2));
|
|
105
|
+
});
|
|
106
|
+
this.expandGroupsByDefault = !this.params.contractColumnSelection;
|
|
107
|
+
var translate = this.gridOptionsWrapper.getLocaleTextFunc();
|
|
108
|
+
var columnListName = translate('ariaColumnList', 'Column List');
|
|
109
|
+
this.virtualList = this.createManagedBean(new VirtualList('column-select', 'tree', columnListName));
|
|
110
|
+
this.appendChild(this.virtualList.getGui());
|
|
111
|
+
this.virtualList.setComponentCreator(function (item, listItemElement) {
|
|
112
|
+
_.setAriaLevel(listItemElement, item.getDept() + 1);
|
|
113
|
+
|
|
114
|
+
return _this2.createComponentFromItem(item, listItemElement);
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
if (this.columnModel.isReady()) {
|
|
118
|
+
this.onColumnsChanged();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (!params.suppressColumnMove && !this.gridOptionsWrapper.isSuppressMovableColumns()) {
|
|
122
|
+
this.createManagedBean(new PrimaryColsListPanelItemDragFeature(this, this.virtualList));
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}, {
|
|
126
|
+
key: "createComponentFromItem",
|
|
127
|
+
value: function createComponentFromItem(item, listItemElement) {
|
|
128
|
+
if (item.isGroup()) {
|
|
129
|
+
var renderedGroup = new ToolPanelColumnGroupComp(item, this.allowDragging, this.eventType, listItemElement);
|
|
130
|
+
this.getContext().createBean(renderedGroup);
|
|
131
|
+
return renderedGroup;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
var columnComp = new ToolPanelColumnComp(item.getColumn(), item.getDept(), this.allowDragging, this.groupsExist, listItemElement);
|
|
135
|
+
this.getContext().createBean(columnComp);
|
|
136
|
+
return columnComp;
|
|
137
|
+
}
|
|
138
|
+
}, {
|
|
139
|
+
key: "onColumnsChanged",
|
|
140
|
+
value: function onColumnsChanged() {
|
|
141
|
+
var expandedStates = this.getExpandedStates();
|
|
142
|
+
var pivotModeActive = this.columnModel.isPivotMode();
|
|
143
|
+
var shouldSyncColumnLayoutWithGrid = !this.params.suppressSyncLayoutWithGrid && !pivotModeActive;
|
|
144
|
+
|
|
145
|
+
if (shouldSyncColumnLayoutWithGrid) {
|
|
146
|
+
this.buildTreeFromWhatGridIsDisplaying();
|
|
147
|
+
} else {
|
|
148
|
+
this.buildTreeFromProvidedColumnDefs();
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
this.setExpandedStates(expandedStates);
|
|
152
|
+
this.markFilteredColumns();
|
|
153
|
+
this.flattenAndFilterModel();
|
|
154
|
+
}
|
|
155
|
+
}, {
|
|
156
|
+
key: "getDisplayedColsList",
|
|
157
|
+
value: function getDisplayedColsList() {
|
|
158
|
+
return this.displayedColsList;
|
|
159
|
+
}
|
|
160
|
+
}, {
|
|
161
|
+
key: "getExpandedStates",
|
|
162
|
+
value: function getExpandedStates() {
|
|
163
|
+
if (!this.allColsTree) {
|
|
164
|
+
return {};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
var res = {};
|
|
168
|
+
this.forEachItem(function (item) {
|
|
169
|
+
if (!item.isGroup()) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
var colGroup = item.getColumnGroup();
|
|
174
|
+
|
|
175
|
+
if (colGroup) {
|
|
176
|
+
// group should always exist, this is defensive
|
|
177
|
+
res[colGroup.getId()] = item.isExpanded();
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
return res;
|
|
181
|
+
}
|
|
182
|
+
}, {
|
|
183
|
+
key: "setExpandedStates",
|
|
184
|
+
value: function setExpandedStates(states) {
|
|
185
|
+
if (!this.allColsTree) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
this.forEachItem(function (item) {
|
|
190
|
+
if (!item.isGroup()) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
var colGroup = item.getColumnGroup();
|
|
195
|
+
|
|
196
|
+
if (colGroup) {
|
|
197
|
+
// group should always exist, this is defensive
|
|
198
|
+
var expanded = states[colGroup.getId()];
|
|
199
|
+
var groupExistedLastTime = expanded != null;
|
|
200
|
+
|
|
201
|
+
if (groupExistedLastTime) {
|
|
202
|
+
item.setExpanded(expanded);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
}, {
|
|
208
|
+
key: "buildTreeFromWhatGridIsDisplaying",
|
|
209
|
+
value: function buildTreeFromWhatGridIsDisplaying() {
|
|
210
|
+
this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this));
|
|
211
|
+
}
|
|
212
|
+
}, {
|
|
213
|
+
key: "setColumnLayout",
|
|
214
|
+
value: function setColumnLayout(colDefs) {
|
|
215
|
+
var columnTree = this.colDefService.createColumnTree(colDefs);
|
|
216
|
+
this.buildListModel(columnTree); // using col defs to check if groups exist as it could be a custom layout
|
|
217
|
+
|
|
218
|
+
this.groupsExist = colDefs.some(function (colDef) {
|
|
219
|
+
return colDef && typeof colDef.children !== 'undefined';
|
|
220
|
+
});
|
|
221
|
+
this.markFilteredColumns();
|
|
222
|
+
this.flattenAndFilterModel();
|
|
223
|
+
}
|
|
224
|
+
}, {
|
|
225
|
+
key: "buildTreeFromProvidedColumnDefs",
|
|
226
|
+
value: function buildTreeFromProvidedColumnDefs() {
|
|
227
|
+
// add column / group comps to tool panel
|
|
228
|
+
this.buildListModel(this.columnModel.getPrimaryColumnTree());
|
|
229
|
+
this.groupsExist = this.columnModel.isPrimaryColumnGroupsPresent();
|
|
230
|
+
}
|
|
231
|
+
}, {
|
|
232
|
+
key: "buildListModel",
|
|
233
|
+
value: function buildListModel(columnTree) {
|
|
234
|
+
var _this3 = this;
|
|
235
|
+
|
|
236
|
+
var columnExpandedListener = this.onColumnExpanded.bind(this);
|
|
237
|
+
|
|
238
|
+
var addListeners = function addListeners(item) {
|
|
239
|
+
item.addEventListener(ColumnModelItem.EVENT_EXPANDED_CHANGED, columnExpandedListener);
|
|
240
|
+
var removeFunc = item.removeEventListener.bind(item, ColumnModelItem.EVENT_EXPANDED_CHANGED, columnExpandedListener);
|
|
241
|
+
|
|
242
|
+
_this3.destroyColumnItemFuncs.push(removeFunc);
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
var recursivelyBuild = function recursivelyBuild(tree, dept, parentList) {
|
|
246
|
+
tree.forEach(function (child) {
|
|
247
|
+
if (child instanceof ProvidedColumnGroup) {
|
|
248
|
+
createGroupItem(child, dept, parentList);
|
|
249
|
+
} else {
|
|
250
|
+
createColumnItem(child, dept, parentList);
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
var createGroupItem = function createGroupItem(columnGroup, dept, parentList) {
|
|
256
|
+
var columnGroupDef = columnGroup.getColGroupDef();
|
|
257
|
+
var skipThisGroup = columnGroupDef && columnGroupDef.suppressColumnsToolPanel;
|
|
258
|
+
|
|
259
|
+
if (skipThisGroup) {
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (columnGroup.isPadding()) {
|
|
264
|
+
recursivelyBuild(columnGroup.getChildren(), dept, parentList);
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
var displayName = _this3.columnModel.getDisplayNameForProvidedColumnGroup(null, columnGroup, _this3.eventType);
|
|
269
|
+
|
|
270
|
+
var item = new ColumnModelItem(displayName, columnGroup, dept, true, _this3.expandGroupsByDefault);
|
|
271
|
+
parentList.push(item);
|
|
272
|
+
addListeners(item);
|
|
273
|
+
recursivelyBuild(columnGroup.getChildren(), dept + 1, item.getChildren());
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
var createColumnItem = function createColumnItem(column, dept, parentList) {
|
|
277
|
+
var skipThisColumn = column.getColDef() && column.getColDef().suppressColumnsToolPanel;
|
|
278
|
+
|
|
279
|
+
if (skipThisColumn) {
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
var displayName = _this3.columnModel.getDisplayNameForColumn(column, 'columnToolPanel');
|
|
284
|
+
|
|
285
|
+
parentList.push(new ColumnModelItem(displayName, column, dept));
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
this.destroyColumnTree();
|
|
289
|
+
recursivelyBuild(columnTree, 0, this.allColsTree);
|
|
290
|
+
}
|
|
291
|
+
}, {
|
|
292
|
+
key: "onColumnExpanded",
|
|
293
|
+
value: function onColumnExpanded() {
|
|
294
|
+
this.flattenAndFilterModel();
|
|
295
|
+
}
|
|
296
|
+
}, {
|
|
297
|
+
key: "flattenAndFilterModel",
|
|
298
|
+
value: function flattenAndFilterModel() {
|
|
299
|
+
var _this4 = this;
|
|
300
|
+
|
|
301
|
+
this.displayedColsList = [];
|
|
302
|
+
|
|
303
|
+
var recursiveFunc = function recursiveFunc(item) {
|
|
304
|
+
if (!item.isPassesFilter()) {
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
_this4.displayedColsList.push(item);
|
|
309
|
+
|
|
310
|
+
if (item.isGroup() && item.isExpanded()) {
|
|
311
|
+
item.getChildren().forEach(recursiveFunc);
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
this.allColsTree.forEach(recursiveFunc);
|
|
316
|
+
this.virtualList.setModel(new UIColumnModel(this.displayedColsList));
|
|
317
|
+
var focusedRow = this.virtualList.getLastFocusedRow();
|
|
318
|
+
this.virtualList.refresh();
|
|
319
|
+
|
|
320
|
+
if (focusedRow != null) {
|
|
321
|
+
this.focusRowIfAlive(focusedRow);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
this.notifyListeners();
|
|
325
|
+
}
|
|
326
|
+
}, {
|
|
327
|
+
key: "focusRowIfAlive",
|
|
328
|
+
value: function focusRowIfAlive(rowIndex) {
|
|
329
|
+
var _this5 = this;
|
|
330
|
+
|
|
331
|
+
window.setTimeout(function () {
|
|
332
|
+
if (_this5.isAlive()) {
|
|
333
|
+
_this5.virtualList.focusRow(rowIndex);
|
|
334
|
+
}
|
|
335
|
+
}, 0);
|
|
336
|
+
}
|
|
337
|
+
}, {
|
|
338
|
+
key: "forEachItem",
|
|
339
|
+
value: function forEachItem(callback) {
|
|
340
|
+
var recursiveFunc = function recursiveFunc(items) {
|
|
341
|
+
items.forEach(function (item) {
|
|
342
|
+
callback(item);
|
|
343
|
+
|
|
344
|
+
if (item.isGroup()) {
|
|
345
|
+
recursiveFunc(item.getChildren());
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
recursiveFunc(this.allColsTree);
|
|
351
|
+
}
|
|
352
|
+
}, {
|
|
353
|
+
key: "doSetExpandedAll",
|
|
354
|
+
value: function doSetExpandedAll(value) {
|
|
355
|
+
this.forEachItem(function (item) {
|
|
356
|
+
if (item.isGroup()) {
|
|
357
|
+
item.setExpanded(value);
|
|
358
|
+
}
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
}, {
|
|
362
|
+
key: "setGroupsExpanded",
|
|
363
|
+
value: function setGroupsExpanded(expand, groupIds) {
|
|
364
|
+
if (!groupIds) {
|
|
365
|
+
this.doSetExpandedAll(expand);
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
var expandedGroupIds = [];
|
|
370
|
+
this.forEachItem(function (item) {
|
|
371
|
+
if (!item.isGroup()) {
|
|
372
|
+
return;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
var groupId = item.getColumnGroup().getId();
|
|
376
|
+
|
|
377
|
+
if (groupIds.indexOf(groupId) >= 0) {
|
|
378
|
+
item.setExpanded(expand);
|
|
379
|
+
expandedGroupIds.push(groupId);
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
var unrecognisedGroupIds = groupIds.filter(function (groupId) {
|
|
383
|
+
return !_.includes(expandedGroupIds, groupId);
|
|
384
|
+
});
|
|
385
|
+
|
|
386
|
+
if (unrecognisedGroupIds.length > 0) {
|
|
387
|
+
console.warn('AG Grid: unable to find group(s) for supplied groupIds:', unrecognisedGroupIds);
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}, {
|
|
391
|
+
key: "getExpandState",
|
|
392
|
+
value: function getExpandState() {
|
|
393
|
+
var expandedCount = 0;
|
|
394
|
+
var notExpandedCount = 0;
|
|
395
|
+
this.forEachItem(function (item) {
|
|
396
|
+
if (!item.isGroup()) {
|
|
397
|
+
return;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
if (item.isExpanded()) {
|
|
401
|
+
expandedCount++;
|
|
402
|
+
} else {
|
|
403
|
+
notExpandedCount++;
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
|
|
407
|
+
if (expandedCount > 0 && notExpandedCount > 0) {
|
|
408
|
+
return ExpandState.INDETERMINATE;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
if (notExpandedCount > 0) {
|
|
412
|
+
return ExpandState.COLLAPSED;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
return ExpandState.EXPANDED;
|
|
416
|
+
}
|
|
417
|
+
}, {
|
|
418
|
+
key: "doSetSelectedAll",
|
|
419
|
+
value: function doSetSelectedAll(selectAllChecked) {
|
|
420
|
+
this.modelItemUtils.selectAllChildren(this.allColsTree, selectAllChecked, this.eventType);
|
|
421
|
+
}
|
|
422
|
+
}, {
|
|
423
|
+
key: "getSelectionState",
|
|
424
|
+
value: function getSelectionState() {
|
|
425
|
+
var checkedCount = 0;
|
|
426
|
+
var uncheckedCount = 0;
|
|
427
|
+
var pivotMode = this.columnModel.isPivotMode();
|
|
428
|
+
this.forEachItem(function (item) {
|
|
429
|
+
if (item.isGroup()) {
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
if (!item.isPassesFilter()) {
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
var column = item.getColumn();
|
|
438
|
+
var colDef = column.getColDef();
|
|
439
|
+
var checked;
|
|
440
|
+
|
|
441
|
+
if (pivotMode) {
|
|
442
|
+
var noPivotModeOptionsAllowed = !column.isAllowPivot() && !column.isAllowRowGroup() && !column.isAllowValue();
|
|
443
|
+
|
|
444
|
+
if (noPivotModeOptionsAllowed) {
|
|
445
|
+
return;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
checked = column.isValueActive() || column.isPivotActive() || column.isRowGroupActive();
|
|
449
|
+
} else {
|
|
450
|
+
if (colDef.lockVisible) {
|
|
451
|
+
return;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
checked = column.isVisible();
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
checked ? checkedCount++ : uncheckedCount++;
|
|
458
|
+
});
|
|
459
|
+
|
|
460
|
+
if (checkedCount > 0 && uncheckedCount > 0) {
|
|
461
|
+
return undefined;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
return !(checkedCount === 0 || uncheckedCount > 0);
|
|
465
|
+
}
|
|
466
|
+
}, {
|
|
467
|
+
key: "setFilterText",
|
|
468
|
+
value: function setFilterText(filterText) {
|
|
469
|
+
this.filterText = _.exists(filterText) ? filterText.toLowerCase() : null;
|
|
470
|
+
this.markFilteredColumns();
|
|
471
|
+
this.flattenAndFilterModel();
|
|
472
|
+
}
|
|
473
|
+
}, {
|
|
474
|
+
key: "markFilteredColumns",
|
|
475
|
+
value: function markFilteredColumns() {
|
|
476
|
+
var _this6 = this;
|
|
477
|
+
|
|
478
|
+
var passesFilter = function passesFilter(item) {
|
|
479
|
+
if (!_.exists(_this6.filterText)) {
|
|
480
|
+
return true;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
var displayName = item.getDisplayName();
|
|
484
|
+
return displayName == null || displayName.toLowerCase().indexOf(_this6.filterText) !== -1;
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
var recursivelyCheckFilter = function recursivelyCheckFilter(item, parentPasses) {
|
|
488
|
+
var atLeastOneChildPassed = false;
|
|
489
|
+
|
|
490
|
+
if (item.isGroup()) {
|
|
491
|
+
var groupPasses = passesFilter(item);
|
|
492
|
+
item.getChildren().forEach(function (child) {
|
|
493
|
+
var childPasses = recursivelyCheckFilter(child, groupPasses || parentPasses);
|
|
494
|
+
|
|
495
|
+
if (childPasses) {
|
|
496
|
+
atLeastOneChildPassed = childPasses;
|
|
497
|
+
}
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
var filterPasses = parentPasses || atLeastOneChildPassed ? true : passesFilter(item);
|
|
502
|
+
item.setPassesFilter(filterPasses);
|
|
503
|
+
return filterPasses;
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
this.allColsTree.forEach(function (item) {
|
|
507
|
+
return recursivelyCheckFilter(item, false);
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
}, {
|
|
511
|
+
key: "notifyListeners",
|
|
512
|
+
value: function notifyListeners() {
|
|
513
|
+
this.fireGroupExpandedEvent();
|
|
514
|
+
this.fireSelectionChangedEvent();
|
|
515
|
+
}
|
|
516
|
+
}, {
|
|
517
|
+
key: "fireGroupExpandedEvent",
|
|
518
|
+
value: function fireGroupExpandedEvent() {
|
|
519
|
+
var expandState = this.getExpandState();
|
|
520
|
+
this.dispatchEvent({
|
|
521
|
+
type: 'groupExpanded',
|
|
522
|
+
state: expandState
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
}, {
|
|
526
|
+
key: "fireSelectionChangedEvent",
|
|
527
|
+
value: function fireSelectionChangedEvent() {
|
|
528
|
+
var selectionState = this.getSelectionState();
|
|
529
|
+
this.dispatchEvent({
|
|
530
|
+
type: 'selectionChanged',
|
|
531
|
+
state: selectionState
|
|
532
|
+
});
|
|
533
|
+
}
|
|
534
|
+
}]);
|
|
535
|
+
|
|
536
|
+
return PrimaryColsListPanel;
|
|
537
|
+
}(Component);
|
|
538
|
+
PrimaryColsListPanel.TEMPLATE = "<div class=\"".concat(PRIMARY_COLS_LIST_PANEL_CLASS, "\" role=\"presentation\"></div>");
|
|
539
|
+
|
|
540
|
+
__decorate([Autowired('columnModel')], PrimaryColsListPanel.prototype, 'columnModel', void 0);
|
|
541
|
+
|
|
542
|
+
__decorate([Autowired('toolPanelColDefService')], PrimaryColsListPanel.prototype, 'colDefService', void 0);
|
|
543
|
+
|
|
544
|
+
__decorate([Autowired('modelItemUtils')], PrimaryColsListPanel.prototype, 'modelItemUtils', void 0);
|
|
545
|
+
|
|
546
|
+
__decorate([PreDestroy], PrimaryColsListPanel.prototype, 'destroyColumnTree', null);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BeanStub, VirtualList } from '@ag-grid-community/core';
|
|
2
|
+
import { PrimaryColsListPanel } from './primaryColsListPanel';
|
|
3
|
+
export declare class PrimaryColsListPanelItemDragFeature extends BeanStub {
|
|
4
|
+
private readonly comp;
|
|
5
|
+
private readonly virtualList;
|
|
6
|
+
private columnModel;
|
|
7
|
+
private dragAndDropService;
|
|
8
|
+
private currentDragColumn;
|
|
9
|
+
private lastHoveredColumnItem;
|
|
10
|
+
private autoScrollService;
|
|
11
|
+
private moveBlocked;
|
|
12
|
+
constructor(comp: PrimaryColsListPanel, virtualList: VirtualList);
|
|
13
|
+
private postConstruct;
|
|
14
|
+
private columnPanelItemDragStart;
|
|
15
|
+
private columnPanelItemDragEnd;
|
|
16
|
+
private createDropTarget;
|
|
17
|
+
private createAutoScrollService;
|
|
18
|
+
private onDragging;
|
|
19
|
+
private getDragColumnItem;
|
|
20
|
+
private onDragStop;
|
|
21
|
+
private getMoveDiff;
|
|
22
|
+
private getCurrentColumns;
|
|
23
|
+
private getTargetIndex;
|
|
24
|
+
private onDragLeave;
|
|
25
|
+
private clearHoveredItems;
|
|
26
|
+
}
|