@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
|
@@ -1,51 +1,75 @@
|
|
|
1
1
|
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); }
|
|
2
|
+
|
|
2
3
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
|
|
4
|
+
|
|
3
5
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
6
|
+
|
|
4
7
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
8
|
+
|
|
5
9
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
10
|
+
|
|
6
11
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
12
|
+
|
|
7
13
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
14
|
+
|
|
8
15
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
16
|
+
|
|
9
17
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
18
|
+
|
|
10
19
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
20
|
+
|
|
11
21
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
22
|
+
|
|
12
23
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
24
|
+
|
|
13
25
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
26
|
+
|
|
14
27
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
28
|
+
|
|
15
29
|
import React, { useMemo, useState, useRef, useEffect } from 'react';
|
|
16
30
|
import { Modal, Row, Spin } from 'antd';
|
|
17
31
|
import { PlayCircleOutlined, DeleteTwoTone, PauseCircleOutlined, ReloadOutlined } from '@ant-design/icons';
|
|
18
32
|
import { get } from 'lodash';
|
|
19
|
-
import { BaseTable, Section, Layout, Icons, Actions } from '@lemon-fe/components';
|
|
20
33
|
import { useThrottle } from '@lemon-fe/hooks';
|
|
34
|
+
import DataGrid from "../../components/DataGrid";
|
|
35
|
+
import Icons from "../../components/Icons";
|
|
36
|
+
import Layout from "../../components/Layout";
|
|
37
|
+
import Actions from "../../components/Actions";
|
|
38
|
+
import Section from "../../components/Section";
|
|
21
39
|
var loading = Symbol('loading');
|
|
22
40
|
export default function useBatchOperate(options) {
|
|
23
41
|
var _options$modalTitle = options.modalTitle,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
42
|
+
modalTitle = _options$modalTitle === void 0 ? '批量操作' : _options$modalTitle,
|
|
43
|
+
handler = options.handler,
|
|
44
|
+
columns = options.columns,
|
|
45
|
+
onClose = options.onClose,
|
|
46
|
+
rowKey = options.rowKey;
|
|
47
|
+
|
|
29
48
|
var _useState = useState(false),
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
49
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
50
|
+
visible = _useState2[0],
|
|
51
|
+
setVisible = _useState2[1];
|
|
52
|
+
|
|
33
53
|
var _useState3 = useState([]),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
54
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
55
|
+
data = _useState4[0],
|
|
56
|
+
setData = _useState4[1];
|
|
57
|
+
|
|
37
58
|
var _useState5 = useState(new Map()),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
59
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
60
|
+
results = _useState6[0],
|
|
61
|
+
setResults = _useState6[1];
|
|
62
|
+
|
|
41
63
|
var _useState7 = useState(-1),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
64
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
65
|
+
active = _useState8[0],
|
|
66
|
+
setActive = _useState8[1];
|
|
67
|
+
|
|
45
68
|
var _useState9 = useState(true),
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
69
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
70
|
+
paused = _useState10[0],
|
|
71
|
+
setPaused = _useState10[1];
|
|
72
|
+
|
|
49
73
|
var mounted = useRef(false);
|
|
50
74
|
var pausedRef = useRef(paused);
|
|
51
75
|
pausedRef.current = paused;
|
|
@@ -55,39 +79,48 @@ export default function useBatchOperate(options) {
|
|
|
55
79
|
mounted.current = false;
|
|
56
80
|
};
|
|
57
81
|
}, [visible]);
|
|
58
|
-
|
|
82
|
+
|
|
83
|
+
var getRowKey = function getRowKey(record) {
|
|
59
84
|
if (typeof rowKey === 'function') {
|
|
60
|
-
return rowKey(record
|
|
85
|
+
return rowKey(record);
|
|
61
86
|
}
|
|
87
|
+
|
|
62
88
|
if (rowKey !== undefined) {
|
|
63
89
|
return get(record, rowKey);
|
|
64
90
|
}
|
|
91
|
+
|
|
65
92
|
return get(record, 'key');
|
|
66
93
|
};
|
|
94
|
+
|
|
67
95
|
var mCols = useMemo(function () {
|
|
68
96
|
var cols = columns ? _toConsumableArray(columns) : [{
|
|
69
97
|
title: '编号',
|
|
70
98
|
key: 'id',
|
|
71
99
|
dataIndex: typeof rowKey === 'string' ? rowKey : undefined,
|
|
72
|
-
render: function render(
|
|
73
|
-
|
|
100
|
+
render: function render(_1, _2, _3, _ref) {
|
|
101
|
+
var node = _ref.node;
|
|
102
|
+
return node.id || '';
|
|
74
103
|
}
|
|
75
104
|
}];
|
|
76
105
|
cols.unshift({
|
|
77
106
|
title: '',
|
|
78
107
|
key: 'delete',
|
|
79
108
|
width: 32,
|
|
80
|
-
render: function render(
|
|
81
|
-
var
|
|
109
|
+
render: function render(_1, _2, index, _ref2) {
|
|
110
|
+
var context = _ref2.context,
|
|
111
|
+
node = _ref2.node;
|
|
112
|
+
var key = node.id;
|
|
82
113
|
return /*#__PURE__*/React.createElement(DeleteTwoTone, {
|
|
83
114
|
onClick: function onClick() {
|
|
84
|
-
if (!paused) {
|
|
115
|
+
if (!context.paused) {
|
|
85
116
|
return;
|
|
86
117
|
}
|
|
118
|
+
|
|
87
119
|
setActive(function (prev) {
|
|
88
120
|
if (prev >= index) {
|
|
89
121
|
return prev - 1;
|
|
90
122
|
}
|
|
123
|
+
|
|
91
124
|
return prev;
|
|
92
125
|
});
|
|
93
126
|
setResults(function (prev) {
|
|
@@ -96,10 +129,12 @@ export default function useBatchOperate(options) {
|
|
|
96
129
|
next.delete(key);
|
|
97
130
|
return next;
|
|
98
131
|
}
|
|
132
|
+
|
|
99
133
|
return prev;
|
|
100
134
|
});
|
|
101
135
|
setData(function (prev) {
|
|
102
136
|
var next = _toConsumableArray(prev);
|
|
137
|
+
|
|
103
138
|
next.splice(index, 1);
|
|
104
139
|
return next;
|
|
105
140
|
});
|
|
@@ -109,12 +144,16 @@ export default function useBatchOperate(options) {
|
|
|
109
144
|
});
|
|
110
145
|
cols.push({
|
|
111
146
|
title: '状态',
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
var
|
|
117
|
-
|
|
147
|
+
dataIndex: 'status',
|
|
148
|
+
flex: 1,
|
|
149
|
+
resizable: false,
|
|
150
|
+
render: function render(_, record, index, _ref3) {
|
|
151
|
+
var context = _ref3.context,
|
|
152
|
+
node = _ref3.node;
|
|
153
|
+
var key = node.id;
|
|
154
|
+
var result = context.results.get(key);
|
|
155
|
+
|
|
156
|
+
if (context.active === index && !context.paused || result === loading) {
|
|
118
157
|
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Spin, {
|
|
119
158
|
size: "small",
|
|
120
159
|
style: {
|
|
@@ -122,27 +161,31 @@ export default function useBatchOperate(options) {
|
|
|
122
161
|
}
|
|
123
162
|
}), /*#__PURE__*/React.createElement("span", null, " \u8FDB\u884C\u4E2D"));
|
|
124
163
|
}
|
|
125
|
-
|
|
164
|
+
|
|
165
|
+
if (!context.results.has(key)) {
|
|
126
166
|
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Icons.Tip, {
|
|
127
167
|
type: "warning"
|
|
128
168
|
}), /*#__PURE__*/React.createElement("span", null, " \u5F85\u5904\u7406"));
|
|
129
169
|
}
|
|
170
|
+
|
|
130
171
|
if (result instanceof Error) {
|
|
131
172
|
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Icons.Tip, {
|
|
132
173
|
type: "error"
|
|
133
174
|
}), /*#__PURE__*/React.createElement("span", null, " ", result.message, " "), /*#__PURE__*/React.createElement(ReloadOutlined, {
|
|
134
175
|
onClick: function onClick() {
|
|
135
|
-
return reload(record,
|
|
176
|
+
return reload(record, key);
|
|
136
177
|
}
|
|
137
178
|
}));
|
|
138
179
|
}
|
|
180
|
+
|
|
139
181
|
return /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Icons.Tip, {
|
|
140
182
|
type: "success"
|
|
141
|
-
}), /*#__PURE__*/React.createElement("span", null, " ", result || '操作成功'));
|
|
183
|
+
}), /*#__PURE__*/React.createElement("span", null, " ", (result || '操作成功').toString()));
|
|
142
184
|
}
|
|
143
185
|
});
|
|
144
186
|
return cols;
|
|
145
187
|
}, [columns, paused, active, results]);
|
|
188
|
+
|
|
146
189
|
var changeResult = function changeResult(key, val) {
|
|
147
190
|
if (mounted.current) {
|
|
148
191
|
setResults(function (prev) {
|
|
@@ -152,36 +195,40 @@ export default function useBatchOperate(options) {
|
|
|
152
195
|
});
|
|
153
196
|
}
|
|
154
197
|
};
|
|
198
|
+
|
|
155
199
|
var reload = useThrottle( /*#__PURE__*/function () {
|
|
156
|
-
var
|
|
157
|
-
var
|
|
200
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(item, key) {
|
|
201
|
+
var res;
|
|
158
202
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
159
203
|
while (1) {
|
|
160
204
|
switch (_context.prev = _context.next) {
|
|
161
205
|
case 0:
|
|
162
|
-
|
|
163
|
-
_context.prev = 1;
|
|
206
|
+
_context.prev = 0;
|
|
164
207
|
changeResult(key, loading);
|
|
165
|
-
_context.next =
|
|
208
|
+
_context.next = 4;
|
|
166
209
|
return handler(item);
|
|
167
|
-
|
|
210
|
+
|
|
211
|
+
case 4:
|
|
168
212
|
res = _context.sent;
|
|
169
213
|
changeResult(key, res);
|
|
170
|
-
_context.next =
|
|
214
|
+
_context.next = 11;
|
|
171
215
|
break;
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
_context.
|
|
216
|
+
|
|
217
|
+
case 8:
|
|
218
|
+
_context.prev = 8;
|
|
219
|
+
_context.t0 = _context["catch"](0);
|
|
175
220
|
changeResult(key, _context.t0);
|
|
176
|
-
|
|
221
|
+
|
|
222
|
+
case 11:
|
|
177
223
|
case "end":
|
|
178
224
|
return _context.stop();
|
|
179
225
|
}
|
|
180
226
|
}
|
|
181
|
-
}, _callee, null, [[
|
|
227
|
+
}, _callee, null, [[0, 8]]);
|
|
182
228
|
}));
|
|
229
|
+
|
|
183
230
|
return function (_x, _x2) {
|
|
184
|
-
return
|
|
231
|
+
return _ref4.apply(this, arguments);
|
|
185
232
|
};
|
|
186
233
|
}(), 500);
|
|
187
234
|
var start = useThrottle( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
@@ -192,47 +239,58 @@ export default function useBatchOperate(options) {
|
|
|
192
239
|
case 0:
|
|
193
240
|
setPaused(false);
|
|
194
241
|
i = active + 1;
|
|
242
|
+
|
|
195
243
|
case 2:
|
|
196
244
|
if (!(i < data.length)) {
|
|
197
245
|
_context2.next = 23;
|
|
198
246
|
break;
|
|
199
247
|
}
|
|
248
|
+
|
|
200
249
|
setActive(i);
|
|
201
250
|
item = data[i];
|
|
202
|
-
key = getRowKey(item
|
|
251
|
+
key = getRowKey(item);
|
|
203
252
|
_context2.prev = 6;
|
|
204
253
|
_context2.next = 9;
|
|
205
254
|
return handler(item);
|
|
255
|
+
|
|
206
256
|
case 9:
|
|
207
257
|
res = _context2.sent;
|
|
208
258
|
changeResult(key, res);
|
|
209
259
|
_context2.next = 16;
|
|
210
260
|
break;
|
|
261
|
+
|
|
211
262
|
case 13:
|
|
212
263
|
_context2.prev = 13;
|
|
213
264
|
_context2.t0 = _context2["catch"](6);
|
|
214
265
|
changeResult(key, _context2.t0);
|
|
266
|
+
|
|
215
267
|
case 16:
|
|
216
268
|
if (!pausedRef.current) {
|
|
217
269
|
_context2.next = 18;
|
|
218
270
|
break;
|
|
219
271
|
}
|
|
272
|
+
|
|
220
273
|
return _context2.abrupt("return");
|
|
274
|
+
|
|
221
275
|
case 18:
|
|
222
276
|
if (mounted.current) {
|
|
223
277
|
_context2.next = 20;
|
|
224
278
|
break;
|
|
225
279
|
}
|
|
280
|
+
|
|
226
281
|
return _context2.abrupt("break", 23);
|
|
282
|
+
|
|
227
283
|
case 20:
|
|
228
284
|
i += 1;
|
|
229
285
|
_context2.next = 2;
|
|
230
286
|
break;
|
|
287
|
+
|
|
231
288
|
case 23:
|
|
232
289
|
if (mounted.current) {
|
|
233
290
|
setActive(-1);
|
|
234
291
|
setPaused(true);
|
|
235
292
|
}
|
|
293
|
+
|
|
236
294
|
case 24:
|
|
237
295
|
case "end":
|
|
238
296
|
return _context2.stop();
|
|
@@ -240,16 +298,20 @@ export default function useBatchOperate(options) {
|
|
|
240
298
|
}
|
|
241
299
|
}, _callee2, null, [[6, 13]]);
|
|
242
300
|
})), 500);
|
|
301
|
+
|
|
243
302
|
var run = function run(data) {
|
|
244
303
|
setVisible(true);
|
|
245
304
|
setData(data);
|
|
246
305
|
};
|
|
306
|
+
|
|
247
307
|
var handleClose = function handleClose() {
|
|
248
308
|
setVisible(false);
|
|
309
|
+
|
|
249
310
|
if (onClose) {
|
|
250
311
|
onClose(results);
|
|
251
312
|
}
|
|
252
313
|
};
|
|
314
|
+
|
|
253
315
|
var node = /*#__PURE__*/React.createElement(Modal, {
|
|
254
316
|
title: modalTitle,
|
|
255
317
|
visible: visible,
|
|
@@ -271,7 +333,6 @@ export default function useBatchOperate(options) {
|
|
|
271
333
|
},
|
|
272
334
|
keyboard: false
|
|
273
335
|
}, /*#__PURE__*/React.createElement(Layout, {
|
|
274
|
-
full: true,
|
|
275
336
|
header: /*#__PURE__*/React.createElement(Row, {
|
|
276
337
|
justify: "space-between"
|
|
277
338
|
}, /*#__PURE__*/React.createElement("span", null, "\u660E\u7EC6".concat(results.size > 0 ? "(".concat(results.size, "/").concat(data.length, ")") : '')), /*#__PURE__*/React.createElement(Actions, {
|
|
@@ -290,12 +351,14 @@ export default function useBatchOperate(options) {
|
|
|
290
351
|
}]
|
|
291
352
|
}))
|
|
292
353
|
}, /*#__PURE__*/React.createElement(Section, {
|
|
293
|
-
|
|
294
|
-
}, /*#__PURE__*/React.createElement(
|
|
295
|
-
scroll: {
|
|
296
|
-
y: true
|
|
297
|
-
},
|
|
354
|
+
flex: 1
|
|
355
|
+
}, /*#__PURE__*/React.createElement(DataGrid, {
|
|
298
356
|
pagination: false,
|
|
357
|
+
context: {
|
|
358
|
+
results: results,
|
|
359
|
+
paused: paused,
|
|
360
|
+
active: active
|
|
361
|
+
},
|
|
299
362
|
dataSource: data,
|
|
300
363
|
columns: mCols,
|
|
301
364
|
rowKey: rowKey
|
|
File without changes
|
|
File without changes
|
package/es/index.d.ts
CHANGED
|
@@ -1,6 +1,33 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
export {
|
|
4
|
-
export { default as
|
|
5
|
-
export {
|
|
6
|
-
export { default as
|
|
1
|
+
export * from 'antd';
|
|
2
|
+
export * from './constants';
|
|
3
|
+
export { default as init } from './init';
|
|
4
|
+
export { default as BaseTable } from './components/BaseTable';
|
|
5
|
+
export type { BaseTableProps } from './components/BaseTable/typings';
|
|
6
|
+
export { default as EditableTable } from './components/EditableTable';
|
|
7
|
+
export { default as EditableCell } from './components/EditableTable/EditableCell';
|
|
8
|
+
export { default as EditableTableFormItem } from './components/EditableTable/EditableTableFormItem';
|
|
9
|
+
export type { EditableTableProps, EditableTableColumnType, EditableCellFocusedType, EditableTableRef, EditableTableRule, } from './components/EditableTable/typings';
|
|
10
|
+
export { default as Table } from './components/Table';
|
|
11
|
+
export { default as PageLoading } from './components/PageLoading';
|
|
12
|
+
export { default as Actions } from './components/Actions';
|
|
13
|
+
export { default as Filter } from './components/Filter';
|
|
14
|
+
export type { FilterItemType } from './components/Filter/typings';
|
|
15
|
+
export { default as Section } from './components/Section';
|
|
16
|
+
export { default as Layout } from './components/Layout';
|
|
17
|
+
export { default as DurationPicker } from './components/DurationPicker';
|
|
18
|
+
export { default as ColorPicker } from './components/ColorPicker';
|
|
19
|
+
export { default as Popup } from './components/Popup';
|
|
20
|
+
export { default as SiderTree } from './components/SiderTree';
|
|
21
|
+
export { default as Icons } from './components/Icons';
|
|
22
|
+
export { default as FormLayout } from './components/FormLayout';
|
|
23
|
+
export { default as TabBar } from './components/TabBar';
|
|
24
|
+
export { default as SymbolIcon } from './components/SymbolIcon';
|
|
25
|
+
export { default as Dropdown } from './components/Dropdown';
|
|
26
|
+
export { default as SelectView } from './components/SelectView';
|
|
27
|
+
export { default as DataGrid } from './components/DataGrid';
|
|
28
|
+
export * from './components/DataGrid/typings';
|
|
29
|
+
export { default as BasicLayout } from './layouts/BasicLayout';
|
|
30
|
+
export { default as BlankLayout } from './layouts/BlankLayout';
|
|
31
|
+
export { default as MicroLayout } from './layouts/MicroLayout';
|
|
32
|
+
export { default as Breadcrumb } from './layouts/Breadcrumb';
|
|
33
|
+
export { default as useBatchOperator } from './hooks/useBatchOperator';
|
package/es/index.js
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from
|
|
3
|
-
export {
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as
|
|
6
|
-
export { default as
|
|
1
|
+
export * from 'antd';
|
|
2
|
+
export * from "./constants";
|
|
3
|
+
export { default as init } from "./init";
|
|
4
|
+
export { default as BaseTable } from "./components/BaseTable";
|
|
5
|
+
export { default as EditableTable } from "./components/EditableTable";
|
|
6
|
+
export { default as EditableCell } from "./components/EditableTable/EditableCell";
|
|
7
|
+
export { default as EditableTableFormItem } from "./components/EditableTable/EditableTableFormItem";
|
|
8
|
+
export { default as Table } from "./components/Table";
|
|
9
|
+
export { default as PageLoading } from "./components/PageLoading";
|
|
10
|
+
export { default as Actions } from "./components/Actions";
|
|
11
|
+
export { default as Filter } from "./components/Filter";
|
|
12
|
+
export { default as Section } from "./components/Section";
|
|
13
|
+
export { default as Layout } from "./components/Layout";
|
|
14
|
+
export { default as DurationPicker } from "./components/DurationPicker";
|
|
15
|
+
export { default as ColorPicker } from "./components/ColorPicker";
|
|
16
|
+
export { default as Popup } from "./components/Popup";
|
|
17
|
+
export { default as SiderTree } from "./components/SiderTree";
|
|
18
|
+
export { default as Icons } from "./components/Icons";
|
|
19
|
+
export { default as FormLayout } from "./components/FormLayout";
|
|
20
|
+
export { default as TabBar } from "./components/TabBar";
|
|
21
|
+
export { default as SymbolIcon } from "./components/SymbolIcon";
|
|
22
|
+
export { default as Dropdown } from "./components/Dropdown";
|
|
23
|
+
export { default as SelectView } from "./components/SelectView";
|
|
24
|
+
export { default as DataGrid } from "./components/DataGrid";
|
|
25
|
+
export * from "./components/DataGrid/typings";
|
|
26
|
+
export { default as BasicLayout } from "./layouts/BasicLayout";
|
|
27
|
+
export { default as BlankLayout } from "./layouts/BlankLayout";
|
|
28
|
+
export { default as MicroLayout } from "./layouts/MicroLayout";
|
|
29
|
+
export { default as Breadcrumb } from "./layouts/Breadcrumb";
|
|
30
|
+
export { default as useBatchOperator } from "./hooks/useBatchOperator";
|
package/es/index.less
CHANGED
|
@@ -1 +1,25 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '~antd/dist/antd.variable.less';
|
|
2
|
+
|
|
3
|
+
@import './styles/utils.less';
|
|
4
|
+
@import './styles/overrides.less';
|
|
5
|
+
@import './styles/theme.less';
|
|
6
|
+
|
|
7
|
+
@import './components/BaseTable/index.less';
|
|
8
|
+
@import './components/EditableTable/index.less';
|
|
9
|
+
@import './components/Actions/index.less';
|
|
10
|
+
@import './components/Layout/index.less';
|
|
11
|
+
@import './components/Section/index.less';
|
|
12
|
+
@import './components/Filter/index.less';
|
|
13
|
+
@import './components/DurationPicker/index.less';
|
|
14
|
+
@import './components/ColorPicker/index.less';
|
|
15
|
+
@import './components/Popup/index.less';
|
|
16
|
+
@import './components/SiderTree/index.less';
|
|
17
|
+
@import './components/FormLayout/index.less';
|
|
18
|
+
@import './components/PageLoading/index.less';
|
|
19
|
+
@import './components/TabBar/index.less';
|
|
20
|
+
@import './components/SymbolIcon/index.less';
|
|
21
|
+
@import './components/Dropdown/index.less';
|
|
22
|
+
@import './components/SelectView/index.less';
|
|
23
|
+
@import './components/DataGrid/index.less';
|
|
24
|
+
|
|
25
|
+
@import './layouts/BasicLayout/components/MainFramework/index.less';
|
package/es/init.d.ts
ADDED