@lemon-fe/kits 0.1.136 → 1.0.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -5
- package/es/app.d.ts +1 -0
- package/es/app.js +3 -0
- package/es/components/Actions/index.d.ts +26 -0
- package/es/components/Actions/index.js +169 -0
- package/es/components/Actions/index.less +67 -0
- package/es/components/BaseTable/Actions.d.ts +9 -0
- package/es/components/BaseTable/Actions.js +136 -0
- package/es/components/BaseTable/BaseTableContext.d.ts +7 -0
- package/es/components/BaseTable/BaseTableContext.js +7 -0
- package/es/components/BaseTable/ResizeHeaderCell.d.ts +8 -0
- package/es/components/BaseTable/ResizeHeaderCell.js +130 -0
- package/es/components/BaseTable/VirtualBody.d.ts +8 -0
- package/es/components/BaseTable/VirtualBody.js +163 -0
- package/es/components/BaseTable/empty.png +0 -0
- package/es/components/BaseTable/index.d.ts +9 -0
- package/es/components/BaseTable/index.js +482 -0
- package/es/components/BaseTable/index.less +189 -0
- package/es/components/BaseTable/typings.d.ts +48 -0
- package/es/components/BaseTable/utils.d.ts +4 -0
- package/es/components/BaseTable/utils.js +26 -0
- package/es/components/ColorPicker/index.d.ts +13 -0
- package/es/components/ColorPicker/index.js +114 -0
- package/es/components/ColorPicker/index.less +47 -0
- package/es/components/DataGrid/Actions.d.ts +9 -0
- package/es/components/DataGrid/Actions.js +119 -0
- package/es/components/DataGrid/CellRenderer.d.ts +4 -0
- package/es/components/DataGrid/CellRenderer.js +68 -0
- package/es/components/DataGrid/GridContext.d.ts +4 -0
- package/es/components/DataGrid/GridContext.js +4 -0
- package/es/components/DataGrid/HeaderRenderer.d.ts +6 -0
- package/es/components/DataGrid/HeaderRenderer.js +93 -0
- package/es/components/DataGrid/cell-editors/Custom.d.ts +9 -0
- package/es/components/DataGrid/cell-editors/Custom.js +105 -0
- package/es/components/DataGrid/cell-editors/Date.d.ts +8 -0
- package/es/components/DataGrid/cell-editors/Date.js +78 -0
- package/es/components/DataGrid/cell-editors/Number.d.ts +9 -0
- package/es/components/DataGrid/cell-editors/Number.js +86 -0
- package/es/components/DataGrid/cell-editors/Select.d.ts +7 -0
- package/es/components/DataGrid/cell-editors/Select.js +70 -0
- package/es/components/DataGrid/cell-editors/Text.d.ts +5 -0
- package/es/components/DataGrid/cell-editors/Text.js +60 -0
- package/es/components/DataGrid/cell-editors/Wrapper.d.ts +4 -0
- package/es/components/DataGrid/cell-editors/Wrapper.js +7 -0
- package/es/components/DataGrid/cell-editors/utils.d.ts +1 -0
- package/es/components/DataGrid/cell-editors/utils.js +2 -0
- package/es/components/DataGrid/empty.png +0 -0
- package/es/components/DataGrid/hooks.d.ts +2 -0
- package/es/components/DataGrid/hooks.js +45 -0
- package/es/components/DataGrid/index.d.ts +77 -0
- package/es/components/DataGrid/index.js +1051 -0
- package/es/components/DataGrid/index.less +304 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideNodeManager.d.ts +57 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideNodeManager.js +378 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideRowModel.d.ts +120 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideRowModel.js +1160 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterService.d.ts +7 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterService.js +137 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterStage.d.ts +5 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterStage.js +60 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/flattenStage.d.ts +10 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/flattenStage.js +199 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/immutableService.d.ts +13 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/immutableService.js +175 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortService.d.ts +21 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortService.js +330 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortStage.d.ts +7 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortStage.js +75 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModelModule.d.ts +15 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModelModule.js +15 -0
- package/es/components/DataGrid/modules/client-side-row-model/index.d.ts +1 -0
- package/es/components/DataGrid/modules/client-side-row-model/index.js +1 -0
- package/es/components/DataGrid/modules/clipboard/clipboard/clipboardService.d.ts +62 -0
- package/es/components/DataGrid/modules/clipboard/clipboard/clipboardService.js +923 -0
- package/es/components/DataGrid/modules/clipboard/clipboardModule.d.ts +7 -0
- package/es/components/DataGrid/modules/clipboard/clipboardModule.js +8 -0
- package/es/components/DataGrid/modules/clipboard/index.d.ts +1 -0
- package/es/components/DataGrid/modules/clipboard/index.js +1 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnModelItem.d.ts +32 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnModelItem.js +100 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnToolPanel.d.ts +51 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnToolPanel.js +320 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/modelItemUtils.d.ts +20 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/modelItemUtils.js +247 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/pivotModePanel.d.ts +9 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/pivotModePanel.js +93 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.d.ts +32 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.js +186 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.d.ts +49 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.js +546 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.d.ts +26 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.js +264 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.d.ts +32 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.js +151 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.d.ts +43 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.js +369 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.d.ts +62 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.js +475 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.d.ts +24 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.js +322 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnsToolPanelModule.d.ts +24 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnsToolPanelModule.js +24 -0
- package/es/components/DataGrid/modules/column-tool-panel/index.d.ts +2 -0
- package/es/components/DataGrid/modules/column-tool-panel/index.js +3 -0
- package/es/components/DataGrid/modules/menu/index.d.ts +1 -0
- package/es/components/DataGrid/modules/menu/index.js +1 -0
- package/es/components/DataGrid/modules/menu/menu/contextMenu.d.ts +26 -0
- package/es/components/DataGrid/modules/menu/menu/contextMenu.js +329 -0
- package/es/components/DataGrid/modules/menu/menu/enterpriseMenu.d.ts +85 -0
- package/es/components/DataGrid/modules/menu/menu/enterpriseMenu.js +639 -0
- package/es/components/DataGrid/modules/menu/menu/menuItemMapper.d.ts +15 -0
- package/es/components/DataGrid/modules/menu/menu/menuItemMapper.js +565 -0
- package/es/components/DataGrid/modules/menu/menuModule.d.ts +8 -0
- package/es/components/DataGrid/modules/menu/menuModule.js +8 -0
- package/es/components/DataGrid/modules/row-grouping/index.d.ts +4 -0
- package/es/components/DataGrid/modules/row-grouping/index.js +4 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggFuncService.d.ts +23 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggFuncService.js +303 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggregationStage.d.ts +20 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggregationStage.js +326 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/batchRemover.d.ts +10 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/batchRemover.js +71 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.d.ts +75 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.js +618 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.d.ts +40 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.js +460 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.d.ts +11 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.js +108 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.d.ts +17 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.js +170 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.d.ts +15 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.js +133 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.d.ts +15 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.js +133 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/filterAggregatesStage.d.ts +9 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/filterAggregatesStage.js +175 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupStage.d.ts +47 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupStage.js +814 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotColDefService.d.ts +24 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotColDefService.js +478 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotStage.d.ts +19 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotStage.js +219 -0
- package/es/components/DataGrid/modules/row-grouping/rowGroupingModule.d.ts +16 -0
- package/es/components/DataGrid/modules/row-grouping/rowGroupingModule.js +16 -0
- package/es/components/DataGrid/modules/server-side-row-model/index.d.ts +1 -0
- package/es/components/DataGrid/modules/server-side-row-model/index.js +1 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/blockUtils.d.ts +47 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/blockUtils.js +444 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/infiniteStoreBlock.d.ts +92 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/infiniteStoreBlock.js +510 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/expandListener.d.ts +9 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/expandListener.js +115 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/filterListener.d.ts +9 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/filterListener.js +114 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/listenerUtils.d.ts +5 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/listenerUtils.js +68 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/sortListener.d.ts +13 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/sortListener.js +194 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/nodeManager.d.ts +7 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/nodeManager.js +63 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/serverSideRowModel.d.ts +88 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/serverSideRowModel.js +572 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/fullStore.d.ts +108 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/fullStore.js +876 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/infiniteStore.d.ts +102 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/infiniteStore.js +918 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeFactory.d.ts +12 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeFactory.js +141 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeUtils.d.ts +35 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeUtils.js +154 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/transactionManager.d.ts +23 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/transactionManager.js +210 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModelModule.d.ts +18 -0
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModelModule.js +18 -0
- package/es/components/DataGrid/modules/side-bar/index.d.ts +2 -0
- package/es/components/DataGrid/modules/side-bar/index.js +2 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/common/toolPanelColDefService.d.ts +11 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/common/toolPanelColDefService.js +280 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/horizontalResizeComp.d.ts +19 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/horizontalResizeComp.js +132 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonComp.d.ts +16 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonComp.js +108 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonsComp.d.ts +18 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonsComp.js +115 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarComp.d.ts +29 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarComp.js +353 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/toolPanelWrapper.d.ts +17 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/toolPanelWrapper.js +128 -0
- package/es/components/DataGrid/modules/side-bar/sideBarModule.d.ts +19 -0
- package/es/components/DataGrid/modules/side-bar/sideBarModule.js +19 -0
- package/es/components/DataGrid/typings.d.ts +138 -0
- package/es/components/DataGrid/typings.js +1 -0
- package/es/components/DataGrid/utils.d.ts +43 -0
- package/es/components/DataGrid/utils.js +242 -0
- package/es/components/Dropdown/index.d.ts +15 -0
- package/es/components/Dropdown/index.js +55 -0
- package/es/components/Dropdown/index.less +13 -0
- package/es/components/DurationPicker/index.d.ts +26 -0
- package/es/components/DurationPicker/index.js +204 -0
- package/es/components/DurationPicker/index.less +61 -0
- package/es/components/EditableTable/EditableCell.d.ts +12 -0
- package/es/components/EditableTable/EditableCell.js +41 -0
- package/es/components/EditableTable/EditableTableFormItem.d.ts +6 -0
- package/es/components/EditableTable/EditableTableFormItem.js +47 -0
- package/es/components/EditableTable/Table.d.ts +6 -0
- package/es/components/EditableTable/Table.js +362 -0
- package/es/components/EditableTable/index.d.ts +9 -0
- package/es/components/EditableTable/index.js +8 -0
- package/es/components/EditableTable/index.less +29 -0
- package/es/components/EditableTable/typings.d.ts +90 -0
- package/es/components/EditableTable/util.d.ts +25 -0
- package/es/components/EditableTable/util.js +399 -0
- package/es/components/Filter/index.d.ts +15 -0
- package/es/components/Filter/index.js +644 -0
- package/es/components/Filter/index.less +82 -0
- package/es/components/Filter/typings.d.ts +35 -0
- package/es/components/FormLayout/index.d.ts +32 -0
- package/es/components/FormLayout/index.js +41 -0
- package/es/components/FormLayout/index.less +109 -0
- package/es/components/Icons/BigTip/error.png +0 -0
- package/es/components/Icons/BigTip/index.d.ts +6 -0
- package/es/components/Icons/BigTip/index.js +46 -0
- package/es/components/Icons/BigTip/info.png +0 -0
- package/es/components/Icons/BigTip/success.png +0 -0
- package/es/components/Icons/BigTip/warning.png +0 -0
- package/es/components/Icons/Calendar.d.ts +5 -0
- package/es/components/Icons/Calendar.js +43 -0
- package/es/components/Icons/Close.d.ts +5 -0
- package/es/components/Icons/Close.js +25 -0
- package/es/components/Icons/CollapseUp.d.ts +5 -0
- package/es/components/Icons/CollapseUp.js +27 -0
- package/es/components/Icons/DarkSearch.d.ts +5 -0
- package/es/components/Icons/DarkSearch.js +34 -0
- package/es/components/Icons/Down.d.ts +5 -0
- package/es/components/Icons/Down.js +31 -0
- package/es/components/Icons/Empty.d.ts +3 -0
- package/es/components/Icons/Empty.js +267 -0
- package/es/components/Icons/LookUp.d.ts +5 -0
- package/es/components/Icons/LookUp.js +70 -0
- package/es/components/Icons/More.d.ts +5 -0
- package/es/components/Icons/More.js +40 -0
- package/es/components/Icons/Search.d.ts +5 -0
- package/es/components/Icons/Search.js +31 -0
- package/es/components/Icons/Tip.d.ts +6 -0
- package/es/components/Icons/Tip.js +165 -0
- package/es/components/Icons/index.d.ts +25 -0
- package/es/components/Icons/index.js +25 -0
- package/es/components/Layout/index.d.ts +41 -0
- package/es/components/Layout/index.js +173 -0
- package/es/components/Layout/index.less +136 -0
- package/es/components/PageLoading/index.d.ts +5 -0
- package/es/components/PageLoading/index.js +15 -0
- package/es/components/PageLoading/index.less +8 -0
- package/es/components/Popup/index.d.ts +39 -0
- package/es/components/Popup/index.js +223 -0
- package/es/components/Popup/index.less +12 -0
- package/es/components/Portal/index.d.ts +17 -0
- package/es/components/Portal/index.js +141 -0
- package/es/components/Section/TabBar.d.ts +12 -0
- package/es/components/Section/TabBar.js +51 -0
- package/es/components/Section/index.d.ts +54 -0
- package/es/components/Section/index.js +96 -0
- package/es/components/Section/index.less +130 -0
- package/es/components/SelectView/index.d.ts +47 -0
- package/es/components/SelectView/index.js +244 -0
- package/es/components/SelectView/index.less +60 -0
- package/es/components/SiderTree/TreeNodeTitle.d.ts +9 -0
- package/es/components/SiderTree/TreeNodeTitle.js +107 -0
- package/es/components/SiderTree/empty.png +0 -0
- package/es/components/SiderTree/index.d.ts +37 -0
- package/es/components/SiderTree/index.js +217 -0
- package/es/components/SiderTree/index.less +222 -0
- package/es/components/SiderTree/typings.d.ts +19 -0
- package/es/components/SymbolIcon/index.d.ts +8 -0
- package/es/components/SymbolIcon/index.js +32 -0
- package/es/components/SymbolIcon/index.less +7 -0
- package/es/components/TabBar/index.d.ts +14 -0
- package/es/components/TabBar/index.js +52 -0
- package/es/components/TabBar/index.less +31 -0
- package/es/components/Table/index.d.ts +3 -0
- package/es/components/Table/index.js +242 -0
- package/es/components/Table/typings.d.ts +25 -0
- package/es/components/Table/utils.d.ts +2 -0
- package/es/components/Table/utils.js +3 -0
- package/es/components/utils.d.ts +3 -0
- package/es/components/utils.js +20 -0
- package/es/constants.d.ts +1 -0
- package/es/constants.js +1 -0
- package/es/{useBatchOperator → hooks/useBatchOperator}/index.d.ts +2 -2
- package/es/{useBatchOperator → hooks/useBatchOperator}/index.js +120 -57
- package/es/{usePageTrack → hooks/usePageTrack}/index.d.ts +0 -0
- package/es/{usePageTrack → hooks/usePageTrack}/index.js +0 -0
- package/es/index.d.ts +33 -6
- package/es/index.js +30 -6
- package/es/index.less +25 -1
- package/es/init.d.ts +3 -0
- package/es/init.js +153 -0
- package/es/layouts/BasicLayout/components/Main.d.ts +10 -0
- package/es/layouts/BasicLayout/components/Main.js +390 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/DropMenu/index.d.ts +11 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/DropMenu/index.js +104 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/DropMenu/index.less +59 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/Menu/index.d.ts +10 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/Menu/index.js +667 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/Menu/index.less +445 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/RefreshButton/index.d.ts +6 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/RefreshButton/index.js +72 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/RefreshButton/index.less +30 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/TabBar/index.d.ts +10 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/TabBar/index.js +116 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/TabBar/index.less +155 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/WaterMark/index.d.ts +6 -0
- package/es/layouts/BasicLayout/components/MainFramework/components/WaterMark/index.js +70 -0
- package/es/layouts/BasicLayout/components/MainFramework/index.d.ts +28 -0
- package/es/layouts/BasicLayout/components/MainFramework/index.js +78 -0
- package/es/layouts/BasicLayout/components/MainFramework/index.less +97 -0
- package/es/layouts/BasicLayout/components/MainFramework/typings.d.ts +10 -0
- package/es/layouts/BasicLayout/index.d.ts +3 -0
- package/es/layouts/BasicLayout/index.js +98 -0
- package/es/layouts/BasicLayout/typings.d.ts +82 -0
- package/es/layouts/BlankLayout/index.d.ts +5 -0
- package/es/layouts/BlankLayout/index.js +5 -0
- package/es/layouts/Breadcrumb/index.d.ts +6 -0
- package/es/layouts/Breadcrumb/index.js +75 -0
- package/es/layouts/MicroLayout/index.d.ts +10 -0
- package/es/layouts/MicroLayout/index.js +105 -0
- package/es/layouts/MicroLayout/typings.d.ts +25 -0
- package/es/layouts/components/CachableRoute.d.ts +2 -0
- package/es/layouts/components/CachableRoute.js +38 -0
- package/es/layouts/components/RouteTab.d.ts +20 -0
- package/es/layouts/components/RouteTab.js +40 -0
- package/es/layouts/components/Switch.d.ts +2 -0
- package/es/layouts/components/Switch.js +63 -0
- package/es/layouts/index.d.ts +4 -0
- package/es/layouts/index.js +4 -0
- package/es/layouts/typings.d.ts +29 -0
- package/es/layouts/utils.d.ts +23 -0
- package/es/layouts/utils.js +175 -0
- package/es/styles/overrides.less +191 -0
- package/es/styles/theme.less +9 -0
- package/es/styles/utils.less +110 -0
- package/package.json +75 -22
- package/es/subject.d.ts +0 -12
- package/es/subject.js +0 -30
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2
|
+
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
4
|
+
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
|
+
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
|
|
9
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10
|
+
|
|
11
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
|
+
|
|
13
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
14
|
+
|
|
15
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
16
|
+
|
|
17
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
18
|
+
|
|
19
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
20
|
+
|
|
21
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
22
|
+
|
|
23
|
+
var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
|
|
24
|
+
var c = arguments.length,
|
|
25
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
26
|
+
d;
|
|
27
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === 'object' && typeof Reflect.decorate === 'function') r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
|
|
28
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
29
|
+
}
|
|
30
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
import { Autowired, Component, PostConstruct, PreDestroy, _, KeyCode } from '@ag-grid-community/core';
|
|
34
|
+
import { SideBarButtonComp } from "./sideBarButtonComp";
|
|
35
|
+
export var SideBarButtonsComp = /*#__PURE__*/function (_Component) {
|
|
36
|
+
_inherits(SideBarButtonsComp, _Component);
|
|
37
|
+
|
|
38
|
+
var _super = _createSuper(SideBarButtonsComp);
|
|
39
|
+
|
|
40
|
+
function SideBarButtonsComp() {
|
|
41
|
+
var _this;
|
|
42
|
+
|
|
43
|
+
_classCallCheck(this, SideBarButtonsComp);
|
|
44
|
+
|
|
45
|
+
_this = _super.call(this, SideBarButtonsComp.TEMPLATE);
|
|
46
|
+
_this.buttonComps = [];
|
|
47
|
+
return _this;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
_createClass(SideBarButtonsComp, [{
|
|
51
|
+
key: "postConstruct",
|
|
52
|
+
value: function postConstruct() {
|
|
53
|
+
this.addManagedListener(this.getFocusableElement(), 'keydown', this.handleKeyDown.bind(this));
|
|
54
|
+
}
|
|
55
|
+
}, {
|
|
56
|
+
key: "handleKeyDown",
|
|
57
|
+
value: function handleKeyDown(e) {
|
|
58
|
+
if (e.key !== KeyCode.TAB || !e.shiftKey) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
var lastColumn = _.last(this.columnModel.getAllDisplayedColumns());
|
|
63
|
+
|
|
64
|
+
if (this.focusService.focusGridView(lastColumn, true)) {
|
|
65
|
+
e.preventDefault();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}, {
|
|
69
|
+
key: "setToolPanelDefs",
|
|
70
|
+
value: function setToolPanelDefs(toolPanelDefs) {
|
|
71
|
+
toolPanelDefs.forEach(this.addButtonComp.bind(this));
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
key: "setActiveButton",
|
|
75
|
+
value: function setActiveButton(id) {
|
|
76
|
+
this.buttonComps.forEach(function (comp) {
|
|
77
|
+
comp.setSelected(id === comp.getToolPanelId());
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}, {
|
|
81
|
+
key: "addButtonComp",
|
|
82
|
+
value: function addButtonComp(def) {
|
|
83
|
+
var _this2 = this;
|
|
84
|
+
|
|
85
|
+
var buttonComp = this.createBean(new SideBarButtonComp(def));
|
|
86
|
+
this.buttonComps.push(buttonComp);
|
|
87
|
+
this.appendChild(buttonComp);
|
|
88
|
+
buttonComp.addEventListener(SideBarButtonComp.EVENT_TOGGLE_BUTTON_CLICKED, function () {
|
|
89
|
+
_this2.dispatchEvent({
|
|
90
|
+
type: SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED,
|
|
91
|
+
toolPanelId: def.id
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}, {
|
|
96
|
+
key: "clearButtons",
|
|
97
|
+
value: function clearButtons() {
|
|
98
|
+
this.buttonComps = this.destroyBeans(this.buttonComps);
|
|
99
|
+
|
|
100
|
+
_.clearElement(this.getGui());
|
|
101
|
+
}
|
|
102
|
+
}]);
|
|
103
|
+
|
|
104
|
+
return SideBarButtonsComp;
|
|
105
|
+
}(Component);
|
|
106
|
+
SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED = 'sideBarButtonClicked';
|
|
107
|
+
SideBarButtonsComp.TEMPLATE = "<div class=\"ag-side-buttons\" role=\"tablist\"></div>";
|
|
108
|
+
|
|
109
|
+
__decorate([Autowired('focusService')], SideBarButtonsComp.prototype, 'focusService', void 0);
|
|
110
|
+
|
|
111
|
+
__decorate([Autowired('columnModel')], SideBarButtonsComp.prototype, 'columnModel', void 0);
|
|
112
|
+
|
|
113
|
+
__decorate([PostConstruct], SideBarButtonsComp.prototype, 'postConstruct', null);
|
|
114
|
+
|
|
115
|
+
__decorate([PreDestroy], SideBarButtonsComp.prototype, 'clearButtons', null);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Component, IComponent, ISideBar, IToolPanel } from '@ag-grid-community/core';
|
|
2
|
+
export interface IToolPanelChildComp extends IComponent<any> {
|
|
3
|
+
refresh(): void;
|
|
4
|
+
}
|
|
5
|
+
export declare class SideBarComp extends Component implements ISideBar {
|
|
6
|
+
private gridApi;
|
|
7
|
+
private focusService;
|
|
8
|
+
private sideBarButtonsComp;
|
|
9
|
+
private toolPanelWrappers;
|
|
10
|
+
private static readonly TEMPLATE;
|
|
11
|
+
constructor();
|
|
12
|
+
private postConstruct;
|
|
13
|
+
protected onTabKeyDown(e: KeyboardEvent): void;
|
|
14
|
+
protected handleKeyDown(e: KeyboardEvent): void;
|
|
15
|
+
private onToolPanelButtonClicked;
|
|
16
|
+
private clearDownUi;
|
|
17
|
+
private setSideBarDef;
|
|
18
|
+
setSideBarPosition(position?: 'left' | 'right'): this;
|
|
19
|
+
private setupToolPanels;
|
|
20
|
+
refresh(): void;
|
|
21
|
+
openToolPanel(key: string | undefined): void;
|
|
22
|
+
getToolPanelInstance(key: string): IToolPanel | undefined;
|
|
23
|
+
private raiseToolPanelVisibleEvent;
|
|
24
|
+
close(): void;
|
|
25
|
+
isToolPanelShowing(): boolean;
|
|
26
|
+
openedItem(): string | null;
|
|
27
|
+
private destroyToolPanelWrappers;
|
|
28
|
+
protected destroy(): void;
|
|
29
|
+
}
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2
|
+
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
4
|
+
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
|
+
|
|
7
|
+
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
8
|
+
|
|
9
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
10
|
+
|
|
11
|
+
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); }
|
|
12
|
+
|
|
13
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
14
|
+
|
|
15
|
+
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); }; }
|
|
16
|
+
|
|
17
|
+
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); }
|
|
18
|
+
|
|
19
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
20
|
+
|
|
21
|
+
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; } }
|
|
22
|
+
|
|
23
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
|
+
|
|
25
|
+
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); }
|
|
26
|
+
|
|
27
|
+
var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
|
|
28
|
+
var c = arguments.length,
|
|
29
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
30
|
+
d;
|
|
31
|
+
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--) {
|
|
32
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
33
|
+
}
|
|
34
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
import { _, Component, Events, ModuleNames, ModuleRegistry, PostConstruct, RefSelector, Autowired, ManagedFocusFeature, KeyCode } from '@ag-grid-community/core';
|
|
38
|
+
import { SideBarButtonsComp } from "./sideBarButtonsComp";
|
|
39
|
+
import { ToolPanelWrapper } from "./toolPanelWrapper";
|
|
40
|
+
export var SideBarComp = /*#__PURE__*/function (_Component) {
|
|
41
|
+
_inherits(SideBarComp, _Component);
|
|
42
|
+
|
|
43
|
+
var _super = _createSuper(SideBarComp);
|
|
44
|
+
|
|
45
|
+
function SideBarComp() {
|
|
46
|
+
var _this;
|
|
47
|
+
|
|
48
|
+
_classCallCheck(this, SideBarComp);
|
|
49
|
+
|
|
50
|
+
_this = _super.call(this, SideBarComp.TEMPLATE);
|
|
51
|
+
_this.toolPanelWrappers = [];
|
|
52
|
+
return _this;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
_createClass(SideBarComp, [{
|
|
56
|
+
key: "postConstruct",
|
|
57
|
+
value: function postConstruct() {
|
|
58
|
+
var _this2 = this;
|
|
59
|
+
|
|
60
|
+
this.sideBarButtonsComp.addEventListener(SideBarButtonsComp.EVENT_SIDE_BAR_BUTTON_CLICKED, this.onToolPanelButtonClicked.bind(this));
|
|
61
|
+
this.setSideBarDef();
|
|
62
|
+
this.gridOptionsWrapper.addEventListener('sideBar', function () {
|
|
63
|
+
_this2.clearDownUi();
|
|
64
|
+
|
|
65
|
+
_this2.setSideBarDef();
|
|
66
|
+
});
|
|
67
|
+
this.gridApi.registerSideBarComp(this);
|
|
68
|
+
this.createManagedBean(new ManagedFocusFeature(this.getFocusableElement(), {
|
|
69
|
+
onTabKeyDown: this.onTabKeyDown.bind(this),
|
|
70
|
+
handleKeyDown: this.handleKeyDown.bind(this)
|
|
71
|
+
}));
|
|
72
|
+
}
|
|
73
|
+
}, {
|
|
74
|
+
key: "onTabKeyDown",
|
|
75
|
+
value: function onTabKeyDown(e) {
|
|
76
|
+
if (e.defaultPrevented) {
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
var focusService = this.focusService,
|
|
81
|
+
sideBarButtonsComp = this.sideBarButtonsComp;
|
|
82
|
+
var eGui = this.getGui();
|
|
83
|
+
var sideBarGui = sideBarButtonsComp.getGui();
|
|
84
|
+
var eDocument = this.gridOptionsWrapper.getDocument();
|
|
85
|
+
var activeElement = eDocument.activeElement;
|
|
86
|
+
var openPanel = eGui.querySelector('.ag-tool-panel-wrapper:not(.ag-hidden)');
|
|
87
|
+
|
|
88
|
+
if (!openPanel) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (sideBarGui.contains(activeElement)) {
|
|
93
|
+
if (focusService.focusInto(openPanel, e.shiftKey)) {
|
|
94
|
+
e.preventDefault();
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
if (!focusService.isFocusUnderManagedComponent(openPanel) && e.shiftKey) {
|
|
98
|
+
var firstFocusableEl = focusService.findFocusableElements(openPanel)[0];
|
|
99
|
+
|
|
100
|
+
var _eDocument = this.gridOptionsWrapper.getDocument();
|
|
101
|
+
|
|
102
|
+
if (_eDocument.activeElement === firstFocusableEl) {
|
|
103
|
+
var selectedButton = sideBarGui.querySelector('.ag-selected button');
|
|
104
|
+
|
|
105
|
+
if (selectedButton) {
|
|
106
|
+
e.preventDefault();
|
|
107
|
+
selectedButton.focus();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}, {
|
|
114
|
+
key: "handleKeyDown",
|
|
115
|
+
value: function handleKeyDown(e) {
|
|
116
|
+
var eDocument = this.gridOptionsWrapper.getDocument();
|
|
117
|
+
|
|
118
|
+
if (!this.sideBarButtonsComp.getGui().contains(eDocument.activeElement)) {
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
var sideBarGui = this.sideBarButtonsComp.getGui();
|
|
123
|
+
var buttons = Array.prototype.slice.call(sideBarGui.querySelectorAll('.ag-side-button'));
|
|
124
|
+
var currentButton = eDocument.activeElement;
|
|
125
|
+
var currentPos = buttons.findIndex(function (button) {
|
|
126
|
+
return button.contains(currentButton);
|
|
127
|
+
});
|
|
128
|
+
var nextPos = null;
|
|
129
|
+
|
|
130
|
+
switch (e.key) {
|
|
131
|
+
case KeyCode.LEFT:
|
|
132
|
+
case KeyCode.UP:
|
|
133
|
+
nextPos = Math.max(0, currentPos - 1);
|
|
134
|
+
break;
|
|
135
|
+
|
|
136
|
+
case KeyCode.RIGHT:
|
|
137
|
+
case KeyCode.DOWN:
|
|
138
|
+
nextPos = Math.min(currentPos + 1, buttons.length - 1);
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (nextPos === null) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
var innerButton = buttons[nextPos].querySelector('button');
|
|
147
|
+
|
|
148
|
+
if (innerButton) {
|
|
149
|
+
innerButton.focus();
|
|
150
|
+
e.preventDefault();
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}, {
|
|
154
|
+
key: "onToolPanelButtonClicked",
|
|
155
|
+
value: function onToolPanelButtonClicked(event) {
|
|
156
|
+
var id = event.toolPanelId;
|
|
157
|
+
var openedItem = this.openedItem(); // if item was already open, we close it
|
|
158
|
+
|
|
159
|
+
if (openedItem === id) {
|
|
160
|
+
this.openToolPanel(undefined); // passing undefined closes
|
|
161
|
+
} else {
|
|
162
|
+
this.openToolPanel(id);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}, {
|
|
166
|
+
key: "clearDownUi",
|
|
167
|
+
value: function clearDownUi() {
|
|
168
|
+
this.sideBarButtonsComp.clearButtons();
|
|
169
|
+
this.destroyToolPanelWrappers();
|
|
170
|
+
}
|
|
171
|
+
}, {
|
|
172
|
+
key: "setSideBarDef",
|
|
173
|
+
value: function setSideBarDef() {
|
|
174
|
+
// initially hide side bar
|
|
175
|
+
this.setDisplayed(false);
|
|
176
|
+
var sideBar = this.gridOptionsWrapper.getSideBar();
|
|
177
|
+
var sideBarExists = !!sideBar && !!sideBar.toolPanels;
|
|
178
|
+
|
|
179
|
+
if (!sideBarExists) {
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
var shouldDisplaySideBar = sideBarExists && !sideBar.hiddenByDefault;
|
|
184
|
+
this.setDisplayed(shouldDisplaySideBar);
|
|
185
|
+
var toolPanelDefs = sideBar.toolPanels;
|
|
186
|
+
this.sideBarButtonsComp.setToolPanelDefs(toolPanelDefs);
|
|
187
|
+
this.setupToolPanels(toolPanelDefs);
|
|
188
|
+
this.setSideBarPosition(sideBar.position);
|
|
189
|
+
|
|
190
|
+
if (!sideBar.hiddenByDefault) {
|
|
191
|
+
this.openToolPanel(sideBar.defaultToolPanel);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}, {
|
|
195
|
+
key: "setSideBarPosition",
|
|
196
|
+
value: function setSideBarPosition(position) {
|
|
197
|
+
if (!position) {
|
|
198
|
+
position = 'right';
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
var isLeft = position === 'left';
|
|
202
|
+
var resizerSide = isLeft ? 'right' : 'left';
|
|
203
|
+
this.addOrRemoveCssClass('ag-side-bar-left', isLeft);
|
|
204
|
+
this.addOrRemoveCssClass('ag-side-bar-right', !isLeft);
|
|
205
|
+
this.toolPanelWrappers.forEach(function (wrapper) {
|
|
206
|
+
wrapper.setResizerSizerSide(resizerSide);
|
|
207
|
+
});
|
|
208
|
+
return this;
|
|
209
|
+
}
|
|
210
|
+
}, {
|
|
211
|
+
key: "setupToolPanels",
|
|
212
|
+
value: function setupToolPanels(defs) {
|
|
213
|
+
var _this3 = this;
|
|
214
|
+
|
|
215
|
+
defs.forEach(function (def) {
|
|
216
|
+
if (def.id == null) {
|
|
217
|
+
console.warn("AG Grid: please review all your toolPanel components, it seems like at least one of them doesn't have an id");
|
|
218
|
+
return;
|
|
219
|
+
} // helpers, in case user doesn't have the right module loaded
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
if (def.toolPanel === 'agColumnsToolPanel') {
|
|
223
|
+
var moduleMissing = !ModuleRegistry.assertRegistered(ModuleNames.ColumnToolPanelModule, 'Column Tool Panel');
|
|
224
|
+
|
|
225
|
+
if (moduleMissing) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (def.toolPanel === 'agFiltersToolPanel') {
|
|
231
|
+
var _moduleMissing = !ModuleRegistry.assertRegistered(ModuleNames.FiltersToolPanelModule, 'Filters Tool Panel');
|
|
232
|
+
|
|
233
|
+
if (_moduleMissing) {
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
var wrapper = new ToolPanelWrapper();
|
|
239
|
+
|
|
240
|
+
_this3.getContext().createBean(wrapper);
|
|
241
|
+
|
|
242
|
+
wrapper.setToolPanelDef(def);
|
|
243
|
+
wrapper.setDisplayed(false);
|
|
244
|
+
|
|
245
|
+
_this3.getGui().appendChild(wrapper.getGui());
|
|
246
|
+
|
|
247
|
+
_this3.toolPanelWrappers.push(wrapper);
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
}, {
|
|
251
|
+
key: "refresh",
|
|
252
|
+
value: function refresh() {
|
|
253
|
+
this.toolPanelWrappers.forEach(function (wrapper) {
|
|
254
|
+
return wrapper.refresh();
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
}, {
|
|
258
|
+
key: "openToolPanel",
|
|
259
|
+
value: function openToolPanel(key) {
|
|
260
|
+
var currentlyOpenedKey = this.openedItem();
|
|
261
|
+
|
|
262
|
+
if (currentlyOpenedKey === key) {
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
this.toolPanelWrappers.forEach(function (wrapper) {
|
|
267
|
+
var show = key === wrapper.getToolPanelId();
|
|
268
|
+
wrapper.setDisplayed(show);
|
|
269
|
+
});
|
|
270
|
+
var newlyOpenedKey = this.openedItem();
|
|
271
|
+
var openToolPanelChanged = currentlyOpenedKey !== newlyOpenedKey;
|
|
272
|
+
|
|
273
|
+
if (openToolPanelChanged) {
|
|
274
|
+
this.sideBarButtonsComp.setActiveButton(key);
|
|
275
|
+
this.raiseToolPanelVisibleEvent(key);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}, {
|
|
279
|
+
key: "getToolPanelInstance",
|
|
280
|
+
value: function getToolPanelInstance(key) {
|
|
281
|
+
var toolPanelWrapper = this.toolPanelWrappers.filter(function (toolPanel) {
|
|
282
|
+
return toolPanel.getToolPanelId() === key;
|
|
283
|
+
})[0];
|
|
284
|
+
|
|
285
|
+
if (!toolPanelWrapper) {
|
|
286
|
+
console.warn("AG Grid: unable to lookup Tool Panel as invalid key supplied: ".concat(key));
|
|
287
|
+
return;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
return toolPanelWrapper.getToolPanelInstance();
|
|
291
|
+
}
|
|
292
|
+
}, {
|
|
293
|
+
key: "raiseToolPanelVisibleEvent",
|
|
294
|
+
value: function raiseToolPanelVisibleEvent(key) {
|
|
295
|
+
var event = {
|
|
296
|
+
type: Events.EVENT_TOOL_PANEL_VISIBLE_CHANGED,
|
|
297
|
+
source: key
|
|
298
|
+
};
|
|
299
|
+
this.eventService.dispatchEvent(event);
|
|
300
|
+
}
|
|
301
|
+
}, {
|
|
302
|
+
key: "close",
|
|
303
|
+
value: function close() {
|
|
304
|
+
this.openToolPanel(undefined);
|
|
305
|
+
}
|
|
306
|
+
}, {
|
|
307
|
+
key: "isToolPanelShowing",
|
|
308
|
+
value: function isToolPanelShowing() {
|
|
309
|
+
return !!this.openedItem();
|
|
310
|
+
}
|
|
311
|
+
}, {
|
|
312
|
+
key: "openedItem",
|
|
313
|
+
value: function openedItem() {
|
|
314
|
+
var activeToolPanel = null;
|
|
315
|
+
this.toolPanelWrappers.forEach(function (wrapper) {
|
|
316
|
+
if (wrapper.isDisplayed()) {
|
|
317
|
+
activeToolPanel = wrapper.getToolPanelId();
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
return activeToolPanel;
|
|
321
|
+
}
|
|
322
|
+
}, {
|
|
323
|
+
key: "destroyToolPanelWrappers",
|
|
324
|
+
value: function destroyToolPanelWrappers() {
|
|
325
|
+
var _this4 = this;
|
|
326
|
+
|
|
327
|
+
this.toolPanelWrappers.forEach(function (wrapper) {
|
|
328
|
+
_.removeFromParent(wrapper.getGui());
|
|
329
|
+
|
|
330
|
+
_this4.destroyBean(wrapper);
|
|
331
|
+
});
|
|
332
|
+
this.toolPanelWrappers.length = 0;
|
|
333
|
+
}
|
|
334
|
+
}, {
|
|
335
|
+
key: "destroy",
|
|
336
|
+
value: function destroy() {
|
|
337
|
+
this.destroyToolPanelWrappers();
|
|
338
|
+
|
|
339
|
+
_get(_getPrototypeOf(SideBarComp.prototype), "destroy", this).call(this);
|
|
340
|
+
}
|
|
341
|
+
}]);
|
|
342
|
+
|
|
343
|
+
return SideBarComp;
|
|
344
|
+
}(Component);
|
|
345
|
+
SideBarComp.TEMPLATE = "<div class=\"ag-side-bar ag-unselectable\">\n <ag-side-bar-buttons ref=\"sideBarButtons\"></ag-side-bar-buttons>\n </div>";
|
|
346
|
+
|
|
347
|
+
__decorate([Autowired('gridApi')], SideBarComp.prototype, 'gridApi', void 0);
|
|
348
|
+
|
|
349
|
+
__decorate([Autowired('focusService')], SideBarComp.prototype, 'focusService', void 0);
|
|
350
|
+
|
|
351
|
+
__decorate([RefSelector('sideBarButtons')], SideBarComp.prototype, 'sideBarButtonsComp', void 0);
|
|
352
|
+
|
|
353
|
+
__decorate([PostConstruct], SideBarComp.prototype, 'postConstruct', null);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Component, IToolPanelComp, ToolPanelDef } from '@ag-grid-community/core';
|
|
2
|
+
export declare class ToolPanelWrapper extends Component {
|
|
3
|
+
private userComponentFactory;
|
|
4
|
+
private static TEMPLATE;
|
|
5
|
+
private toolPanelCompInstance;
|
|
6
|
+
private toolPanelId;
|
|
7
|
+
private resizeBar;
|
|
8
|
+
private width;
|
|
9
|
+
constructor();
|
|
10
|
+
private setupResize;
|
|
11
|
+
getToolPanelId(): string;
|
|
12
|
+
setToolPanelDef(toolPanelDef: ToolPanelDef): void;
|
|
13
|
+
private setToolPanelComponent;
|
|
14
|
+
getToolPanelInstance(): IToolPanelComp;
|
|
15
|
+
setResizerSizerSide(side: 'right' | 'left'): void;
|
|
16
|
+
refresh(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2
|
+
|
|
3
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
4
|
+
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
|
+
|
|
7
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
8
|
+
|
|
9
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
10
|
+
|
|
11
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
12
|
+
|
|
13
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
14
|
+
|
|
15
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
16
|
+
|
|
17
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
18
|
+
|
|
19
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
20
|
+
|
|
21
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
22
|
+
|
|
23
|
+
var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
|
|
24
|
+
var c = arguments.length,
|
|
25
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
26
|
+
d;
|
|
27
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === 'object' && typeof Reflect.decorate === 'function') r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
|
|
28
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
29
|
+
}
|
|
30
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
import { Autowired, Component, PostConstruct } from '@ag-grid-community/core';
|
|
34
|
+
import { HorizontalResizeComp } from "./horizontalResizeComp";
|
|
35
|
+
export var ToolPanelWrapper = /*#__PURE__*/function (_Component) {
|
|
36
|
+
_inherits(ToolPanelWrapper, _Component);
|
|
37
|
+
|
|
38
|
+
var _super = _createSuper(ToolPanelWrapper);
|
|
39
|
+
|
|
40
|
+
function ToolPanelWrapper() {
|
|
41
|
+
_classCallCheck(this, ToolPanelWrapper);
|
|
42
|
+
|
|
43
|
+
return _super.call(this, ToolPanelWrapper.TEMPLATE);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
_createClass(ToolPanelWrapper, [{
|
|
47
|
+
key: "setupResize",
|
|
48
|
+
value: function setupResize() {
|
|
49
|
+
var eGui = this.getGui();
|
|
50
|
+
var resizeBar = this.resizeBar = this.createManagedBean(new HorizontalResizeComp());
|
|
51
|
+
resizeBar.setElementToResize(eGui);
|
|
52
|
+
this.appendChild(resizeBar);
|
|
53
|
+
}
|
|
54
|
+
}, {
|
|
55
|
+
key: "getToolPanelId",
|
|
56
|
+
value: function getToolPanelId() {
|
|
57
|
+
return this.toolPanelId;
|
|
58
|
+
}
|
|
59
|
+
}, {
|
|
60
|
+
key: "setToolPanelDef",
|
|
61
|
+
value: function setToolPanelDef(toolPanelDef) {
|
|
62
|
+
var id = toolPanelDef.id,
|
|
63
|
+
minWidth = toolPanelDef.minWidth,
|
|
64
|
+
maxWidth = toolPanelDef.maxWidth,
|
|
65
|
+
width = toolPanelDef.width;
|
|
66
|
+
this.toolPanelId = id;
|
|
67
|
+
this.width = width;
|
|
68
|
+
var params = {};
|
|
69
|
+
var compDetails = this.userComponentFactory.getToolPanelCompDetails(toolPanelDef, params);
|
|
70
|
+
var componentPromise = compDetails.newAgStackInstance();
|
|
71
|
+
|
|
72
|
+
if (componentPromise == null) {
|
|
73
|
+
console.warn("AG Grid: error processing tool panel component ".concat(id, ". You need to specify either 'toolPanel' or 'toolPanelFramework'"));
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
componentPromise.then(this.setToolPanelComponent.bind(this));
|
|
78
|
+
|
|
79
|
+
if (minWidth != null) {
|
|
80
|
+
this.resizeBar.setMinWidth(minWidth);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (maxWidth != null) {
|
|
84
|
+
this.resizeBar.setMaxWidth(maxWidth);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}, {
|
|
88
|
+
key: "setToolPanelComponent",
|
|
89
|
+
value: function setToolPanelComponent(compInstance) {
|
|
90
|
+
var _this = this;
|
|
91
|
+
|
|
92
|
+
this.toolPanelCompInstance = compInstance;
|
|
93
|
+
this.appendChild(compInstance.getGui());
|
|
94
|
+
this.addDestroyFunc(function () {
|
|
95
|
+
_this.destroyBean(compInstance);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
if (this.width) {
|
|
99
|
+
this.getGui().style.width = "".concat(this.width, "px");
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
key: "getToolPanelInstance",
|
|
104
|
+
value: function getToolPanelInstance() {
|
|
105
|
+
return this.toolPanelCompInstance;
|
|
106
|
+
}
|
|
107
|
+
}, {
|
|
108
|
+
key: "setResizerSizerSide",
|
|
109
|
+
value: function setResizerSizerSide(side) {
|
|
110
|
+
var isRtl = this.gridOptionsWrapper.isEnableRtl();
|
|
111
|
+
var isLeft = side === 'left';
|
|
112
|
+
var inverted = isRtl ? isLeft : !isLeft;
|
|
113
|
+
this.resizeBar.setInverted(inverted);
|
|
114
|
+
}
|
|
115
|
+
}, {
|
|
116
|
+
key: "refresh",
|
|
117
|
+
value: function refresh() {
|
|
118
|
+
this.toolPanelCompInstance.refresh();
|
|
119
|
+
}
|
|
120
|
+
}]);
|
|
121
|
+
|
|
122
|
+
return ToolPanelWrapper;
|
|
123
|
+
}(Component);
|
|
124
|
+
ToolPanelWrapper.TEMPLATE = "<div class=\"ag-tool-panel-wrapper\"/>";
|
|
125
|
+
|
|
126
|
+
__decorate([Autowired('userComponentFactory')], ToolPanelWrapper.prototype, 'userComponentFactory', void 0);
|
|
127
|
+
|
|
128
|
+
__decorate([PostConstruct], ToolPanelWrapper.prototype, 'setupResize', null);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ModuleNames } from '@ag-grid-community/core';
|
|
2
|
+
import { HorizontalResizeComp } from './sideBar/horizontalResizeComp';
|
|
3
|
+
import { SideBarComp } from './sideBar/sideBarComp';
|
|
4
|
+
import { SideBarButtonsComp } from './sideBar/sideBarButtonsComp';
|
|
5
|
+
import { ToolPanelColDefService } from './sideBar/common/toolPanelColDefService';
|
|
6
|
+
export declare const SideBarModule: {
|
|
7
|
+
moduleName: ModuleNames;
|
|
8
|
+
beans: (typeof ToolPanelColDefService)[];
|
|
9
|
+
agStackComponents: ({
|
|
10
|
+
componentName: string;
|
|
11
|
+
componentClass: typeof HorizontalResizeComp;
|
|
12
|
+
} | {
|
|
13
|
+
componentName: string;
|
|
14
|
+
componentClass: typeof SideBarComp;
|
|
15
|
+
} | {
|
|
16
|
+
componentName: string;
|
|
17
|
+
componentClass: typeof SideBarButtonsComp;
|
|
18
|
+
})[];
|
|
19
|
+
};
|