@lemon-fe/kits 1.0.0-21 → 1.0.0-211
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 +5 -0
- package/es/components/Actions/index.d.ts +8 -5
- package/es/components/Actions/index.js +44 -28
- package/es/components/Actions/index.less +5 -4
- package/es/components/Alert/index.d.ts +3 -0
- package/es/components/Alert/index.js +23 -0
- package/es/components/BaseTable/Actions.js +2 -2
- package/es/components/BaseTable/VirtualBody.js +2 -2
- package/es/components/BaseTable/index.js +2 -2
- package/es/components/BaseTable/utils.d.ts +1 -1
- package/es/components/DataGrid/cell-editors/Date.d.ts +15 -5
- package/es/components/DataGrid/cell-editors/Date.js +52 -14
- package/es/components/DataGrid/cell-editors/Number.d.ts +14 -6
- package/es/components/DataGrid/cell-editors/Number.js +94 -34
- package/es/components/DataGrid/cell-editors/Row.d.ts +23 -0
- package/es/components/DataGrid/cell-editors/Row.js +146 -0
- package/es/components/DataGrid/cell-editors/Select.d.ts +29 -3
- package/es/components/DataGrid/cell-editors/Select.js +82 -18
- package/es/components/DataGrid/cell-editors/Text.d.ts +7 -5
- package/es/components/DataGrid/cell-editors/Text.js +55 -9
- package/es/components/DataGrid/cell-editors/Wrapper.d.ts +2 -1
- package/es/components/DataGrid/cell-editors/Wrapper.js +4 -2
- package/es/components/DataGrid/cell-editors/utils.d.ts +9 -0
- package/es/components/DataGrid/cell-editors/utils.js +56 -1
- package/es/components/DataGrid/components/CustomColumnPanel/DragContext.d.ts +4 -0
- package/es/components/DataGrid/components/CustomColumnPanel/DragContext.js +3 -0
- package/es/components/DataGrid/components/CustomColumnPanel/FieldModal.d.ts +10 -0
- package/es/components/DataGrid/components/CustomColumnPanel/FieldModal.js +256 -0
- package/es/components/DataGrid/components/CustomColumnPanel/Item.d.ts +14 -0
- package/es/components/DataGrid/components/CustomColumnPanel/Item.js +200 -0
- package/es/components/DataGrid/components/CustomColumnPanel/index.d.ts +5 -0
- package/es/components/DataGrid/components/CustomColumnPanel/index.js +366 -0
- package/es/components/DataGrid/components/CustomColumnPanel/typings.d.ts +25 -0
- package/es/components/DataGrid/components/Search.d.ts +4 -0
- package/es/components/DataGrid/components/Search.js +186 -0
- package/es/components/DataGrid/components/Selected.d.ts +7 -0
- package/es/components/DataGrid/components/Selected.js +32 -0
- package/es/components/DataGrid/context/GridStore.d.ts +4 -0
- package/es/components/DataGrid/context/GridStore.js +4 -0
- package/es/components/DataGrid/hooks.d.ts +18 -0
- package/es/components/DataGrid/hooks.js +46 -3
- package/es/components/DataGrid/index.d.ts +62 -25
- package/es/components/DataGrid/index.js +1299 -504
- package/es/components/DataGrid/index.less +382 -41
- package/es/components/DataGrid/modules/clipboard/clipboard/clipboardService.d.ts +60 -60
- package/es/components/DataGrid/modules/clipboard/clipboard/clipboardService.js +359 -69
- package/es/components/DataGrid/modules/clipboard/clipboardModule.d.ts +2 -7
- package/es/components/DataGrid/modules/clipboard/clipboardModule.js +4 -2
- package/es/components/DataGrid/modules/clipboard/main.d.ts +1 -0
- package/es/components/DataGrid/modules/clipboard/version.d.ts +1 -0
- package/es/components/DataGrid/modules/clipboard/version.js +2 -0
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnModelItem.d.ts +24 -30
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnModelItem.js +1 -1
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnToolPanel.d.ts +30 -49
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/columnToolPanel.js +7 -7
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/modelItemUtils.d.ts +14 -18
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/modelItemUtils.js +7 -7
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/pivotModePanel.d.ts +7 -7
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/pivotModePanel.js +8 -8
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.d.ts +28 -28
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.js +17 -17
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.d.ts +42 -47
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.js +8 -8
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.d.ts +24 -24
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.js +6 -6
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.d.ts +23 -31
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.js +9 -16
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.d.ts +35 -41
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.js +18 -18
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.d.ts +49 -60
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.js +21 -20
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.d.ts +22 -22
- package/es/components/DataGrid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.js +16 -16
- package/es/components/DataGrid/modules/column-tool-panel/columnsToolPanelModule.d.ts +2 -24
- package/es/components/DataGrid/modules/column-tool-panel/columnsToolPanelModule.js +8 -3
- package/es/components/DataGrid/modules/column-tool-panel/main.d.ts +2 -0
- package/es/components/DataGrid/modules/column-tool-panel/version.d.ts +1 -0
- package/es/components/DataGrid/modules/column-tool-panel/version.js +2 -0
- package/es/components/DataGrid/modules/master-detail/main.d.ts +1 -0
- package/es/components/DataGrid/modules/master-detail/main.js +1 -0
- package/es/components/DataGrid/modules/master-detail/masterDetail/detailCellRenderer.d.ts +14 -0
- package/es/components/DataGrid/modules/master-detail/masterDetail/detailCellRenderer.js +170 -0
- package/es/components/DataGrid/modules/master-detail/masterDetail/detailCellRendererCtrl.d.ts +19 -0
- package/es/components/DataGrid/modules/master-detail/masterDetail/detailCellRendererCtrl.js +245 -0
- package/es/components/DataGrid/modules/master-detail/masterDetailModule.d.ts +2 -0
- package/es/components/DataGrid/modules/master-detail/masterDetailModule.js +18 -0
- package/es/components/DataGrid/modules/master-detail/version.d.ts +1 -0
- package/es/components/DataGrid/modules/master-detail/version.js +2 -0
- package/es/components/DataGrid/modules/menu/menu/chartMenuItemMapper.d.ts +13 -0
- package/es/components/DataGrid/modules/menu/menu/chartMenuItemMapper.js +417 -0
- package/es/components/DataGrid/modules/menu/menu/contextMenu.d.ts +11 -24
- package/es/components/DataGrid/modules/menu/menu/contextMenu.js +32 -25
- package/es/components/DataGrid/modules/menu/menu/enterpriseMenu.d.ts +60 -79
- package/es/components/DataGrid/modules/menu/menu/enterpriseMenu.js +182 -129
- package/es/components/DataGrid/modules/menu/menu/menuItemMapper.d.ts +10 -12
- package/es/components/DataGrid/modules/menu/menu/menuItemMapper.js +81 -249
- package/es/components/DataGrid/modules/menu/menuModule.d.ts +2 -8
- package/es/components/DataGrid/modules/menu/menuModule.js +6 -2
- package/es/components/DataGrid/modules/menu/version.d.ts +1 -0
- package/es/components/DataGrid/modules/menu/version.js +2 -0
- package/es/components/DataGrid/modules/row-grouping/main.d.ts +4 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggFuncService.js +1 -1
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggregationStage.d.ts +3 -1
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/aggregationStage.js +30 -12
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/batchRemover.d.ts +2 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/batchRemover.js +12 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.d.ts +2 -2
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.js +12 -10
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.js +20 -21
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.js +5 -5
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.js +7 -7
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.js +6 -6
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.js +6 -6
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/filterAggregatesStage.js +2 -2
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupFilter/groupFilter.d.ts +39 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupFilter/groupFilter.js +395 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupFilter/groupFloatingFilter.d.ts +23 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupFilter/groupFloatingFilter.js +207 -0
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupStage.d.ts +2 -1
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/groupStage.js +66 -20
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotColDefService.js +8 -8
- package/es/components/DataGrid/modules/row-grouping/rowGrouping/pivotStage.js +19 -15
- package/es/components/DataGrid/modules/row-grouping/rowGroupingModule.d.ts +2 -16
- package/es/components/DataGrid/modules/row-grouping/rowGroupingModule.js +14 -2
- package/es/components/DataGrid/modules/row-grouping/version.d.ts +1 -0
- package/es/components/DataGrid/modules/row-grouping/version.js +2 -0
- package/es/components/DataGrid/modules/side-bar/main.d.ts +2 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/common/toolPanelColDefService.d.ts +9 -9
- package/es/components/DataGrid/modules/side-bar/sideBar/common/toolPanelColDefService.js +3 -8
- package/es/components/DataGrid/modules/side-bar/sideBar/horizontalResizeComp.d.ts +17 -17
- package/es/components/DataGrid/modules/side-bar/sideBar/horizontalResizeComp.js +5 -5
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonComp.d.ts +14 -14
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonComp.js +8 -8
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonsComp.d.ts +14 -14
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarButtonsComp.js +6 -6
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarComp.d.ts +26 -27
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarComp.js +82 -45
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarDefParser.d.ts +10 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/sideBarDefParser.js +111 -0
- package/es/components/DataGrid/modules/side-bar/sideBar/toolPanelWrapper.d.ts +15 -15
- package/es/components/DataGrid/modules/side-bar/sideBar/toolPanelWrapper.js +5 -5
- package/es/components/DataGrid/modules/side-bar/sideBarModule.d.ts +2 -19
- package/es/components/DataGrid/modules/side-bar/sideBarModule.js +5 -2
- package/es/components/DataGrid/modules/side-bar/version.d.ts +1 -0
- package/es/components/DataGrid/modules/side-bar/version.js +2 -0
- package/es/components/DataGrid/{Actions.d.ts → renderer/Actions.d.ts} +1 -1
- package/es/components/DataGrid/{Actions.js → renderer/Actions.js} +4 -4
- package/es/components/DataGrid/renderer/CellDeleteRenderer.d.ts +5 -0
- package/es/components/DataGrid/renderer/CellDeleteRenderer.js +64 -0
- package/es/components/DataGrid/renderer/CellIndexRenderer.d.ts +4 -0
- package/es/components/DataGrid/renderer/CellIndexRenderer.js +59 -0
- package/es/components/DataGrid/{CellRenderer.d.ts → renderer/CellRenderer.d.ts} +2 -2
- package/es/components/DataGrid/{CellRenderer.js → renderer/CellRenderer.js} +18 -8
- package/es/components/DataGrid/renderer/DetailCellRenderer.d.ts +9 -0
- package/es/components/DataGrid/renderer/DetailCellRenderer.js +71 -0
- package/es/components/DataGrid/{HeaderRenderer.d.ts → renderer/HeaderRenderer.d.ts} +3 -3
- package/es/components/DataGrid/{HeaderRenderer.js → renderer/HeaderRenderer.js} +35 -15
- package/es/components/DataGrid/typings.d.ts +109 -32
- package/es/components/DataGrid/utils.d.ts +13 -6
- package/es/components/DataGrid/utils.js +116 -28
- package/es/components/Dropdown/index.d.ts +7 -8
- package/es/components/Dropdown/index.js +40 -47
- package/es/components/Dropdown/index.less +2 -10
- package/es/components/DurationPicker/index.d.ts +12 -9
- package/es/components/DurationPicker/index.js +87 -57
- package/es/components/DurationPicker/index.less +3 -52
- package/es/components/EditableTable/EditableCell.d.ts +1 -1
- package/es/components/EditableTable/EditableTableFormItem.d.ts +1 -1
- package/es/components/EditableTable/Table.d.ts +1 -1
- package/es/components/EditableTable/Table.js +7 -7
- package/es/components/EditableTable/typings.d.ts +1 -1
- package/es/components/Filter/index.js +157 -98
- package/es/components/Filter/index.less +1 -5
- package/es/components/Filter/typings.d.ts +36 -2
- package/es/components/FormLayout/index.d.ts +5 -1
- package/es/components/FormLayout/index.js +5 -4
- package/es/components/FormLayout/index.less +18 -8
- package/es/components/GreyPanel/index.d.ts +6 -0
- package/es/components/GreyPanel/index.js +20 -0
- package/es/components/GreyPanel/index.less +11 -0
- package/es/components/Icons/Add.d.ts +6 -0
- package/es/components/Icons/Add.js +42 -0
- package/es/components/Icons/BigTip/index.d.ts +1 -1
- package/es/components/Icons/Calendar.d.ts +1 -1
- package/es/components/Icons/Calendar.js +12 -17
- package/es/components/Icons/Clear.d.ts +3 -0
- package/es/components/Icons/Clear.js +21 -0
- package/es/components/Icons/Clock.d.ts +5 -0
- package/es/components/Icons/Clock.js +30 -0
- package/es/components/Icons/Close.d.ts +1 -1
- package/es/components/Icons/CloseLight.d.ts +5 -0
- package/es/components/Icons/CloseLight.js +34 -0
- package/es/components/Icons/CollapseUp.d.ts +1 -1
- package/es/components/Icons/DarkSearch.d.ts +1 -1
- package/es/components/Icons/Delete.d.ts +3 -0
- package/es/components/Icons/Delete.js +40 -0
- package/es/components/Icons/Down.d.ts +3 -5
- package/es/components/Icons/Down.js +5 -15
- package/es/components/Icons/Drag/drag.svg +7 -0
- package/es/components/Icons/Drag/index.d.ts +3 -0
- package/es/components/Icons/Drag/index.js +34 -0
- package/es/components/Icons/LookUp.d.ts +1 -1
- package/es/components/Icons/More.d.ts +3 -5
- package/es/components/Icons/NewTag.d.ts +3 -0
- package/es/components/Icons/NewTag.js +22 -0
- package/es/components/Icons/Plus/index.d.ts +3 -0
- package/es/components/Icons/Plus/index.js +30 -0
- package/es/components/Icons/Plus/plus.svg +6 -0
- package/es/components/Icons/Question.d.ts +3 -0
- package/es/components/Icons/Question.js +21 -0
- package/es/components/Icons/Reload.d.ts +3 -0
- package/es/components/Icons/Reload.js +21 -0
- package/es/components/Icons/Search.d.ts +3 -5
- package/es/components/Icons/Search.js +7 -17
- package/es/components/Icons/Tip.d.ts +4 -5
- package/es/components/Icons/Tip.js +59 -68
- package/es/components/Icons/index.d.ts +27 -7
- package/es/components/Icons/index.js +29 -9
- package/es/components/InputCompact/index.d.ts +11 -0
- package/es/components/InputCompact/index.js +80 -0
- package/es/components/InputCompact/index.less +33 -0
- package/es/components/InputNumber/index.d.ts +8 -0
- package/es/components/InputNumber/index.js +38 -0
- package/es/components/InputNumber/index.less +58 -0
- package/es/components/Layout/index.d.ts +26 -8
- package/es/components/Layout/index.js +159 -54
- package/es/components/Layout/index.less +58 -33
- package/es/components/Popup/index.d.ts +43 -7
- package/es/components/Popup/index.js +183 -89
- package/es/components/Popup/index.less +23 -1
- package/es/components/Portal/index.d.ts +7 -6
- package/es/components/Portal/index.js +57 -12
- package/es/components/Section/TabBar.d.ts +2 -1
- package/es/components/Section/index.d.ts +6 -2
- package/es/components/Section/index.js +30 -23
- package/es/components/Section/index.less +6 -2
- package/es/components/SelectPanel/index.d.ts +17 -0
- package/es/components/SelectPanel/index.js +70 -0
- package/es/components/SelectPanel/index.less +112 -0
- package/es/components/SelectView/index.d.ts +16 -5
- package/es/components/SelectView/index.js +162 -119
- package/es/components/SelectView/index.less +23 -26
- package/es/components/SiderTree/TreeNodeTitle.js +2 -2
- package/es/components/SiderTree/index.d.ts +4 -2
- package/es/components/SiderTree/index.js +50 -71
- package/es/components/SiderTree/index.less +23 -77
- package/es/components/State/index.d.ts +8 -0
- package/es/components/State/index.js +25 -0
- package/es/components/State/index.less +131 -0
- package/es/components/TabBar/index.d.ts +2 -3
- package/es/components/TabBar/index.js +24 -42
- package/es/components/TabBar/index.less +2 -28
- package/es/components/Table/typings.d.ts +1 -2
- package/es/components/Table/utils.d.ts +1 -1
- package/es/components/TipMark/index.d.ts +8 -0
- package/es/components/{DataGrid/cell-editors/Custom.js → TipMark/index.js} +40 -12
- package/es/components/utils.d.ts +1 -1
- package/es/components/utils.js +2 -2
- package/es/hooks/useBatchOperator/index.d.ts +83 -10
- package/es/hooks/useBatchOperator/index.js +644 -300
- package/es/hooks/useHistoryBlock/index.d.ts +8 -0
- package/es/hooks/useHistoryBlock/index.js +30 -0
- package/es/index.d.ts +20 -4
- package/es/index.js +15 -2
- package/es/index.less +5 -0
- package/es/init.js +82 -24
- package/es/layouts/BasicLayout/components/Main.js +37 -4
- package/es/layouts/BasicLayout/components/MainFramework/components/Menu/index.js +23 -22
- package/es/layouts/BasicLayout/components/MainFramework/index.less +19 -0
- package/es/layouts/BasicLayout/typings.d.ts +3 -3
- package/es/layouts/Breadcrumb/index.d.ts +13 -5
- package/es/layouts/Breadcrumb/index.js +31 -10
- package/es/layouts/Breadcrumb/index.less +5 -1
- package/es/layouts/MicroLayout/index.js +69 -5
- package/es/layouts/MicroLayout/typings.d.ts +5 -3
- package/es/layouts/TabInstance.d.ts +31 -0
- package/es/layouts/TabInstance.js +115 -0
- package/es/layouts/components/RouteTab.d.ts +7 -3
- package/es/layouts/components/RouteTab.js +6 -2
- package/es/layouts/typings.d.ts +0 -2
- package/es/layouts/utils.d.ts +1 -1
- package/es/layouts/utils.js +4 -4
- package/es/styles/empty.png +0 -0
- package/es/styles/overrides.less +203 -59
- package/es/styles/theme.less +21 -1
- package/es/styles/utils.less +18 -18
- package/package.json +28 -12
- package/es/components/DataGrid/GridContext.d.ts +0 -4
- package/es/components/DataGrid/GridContext.js +0 -4
- package/es/components/DataGrid/cell-editors/Custom.d.ts +0 -9
- package/es/components/DataGrid/empty.png +0 -0
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideNodeManager.d.ts +0 -35
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideNodeManager.js +0 -378
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideRowModel.d.ts +0 -99
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/clientSideRowModel.js +0 -1160
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterService.d.ts +0 -7
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterService.js +0 -137
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterStage.d.ts +0 -5
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/filterStage.js +0 -60
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/flattenStage.d.ts +0 -10
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/flattenStage.js +0 -199
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/immutableService.d.ts +0 -13
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/immutableService.js +0 -175
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortService.d.ts +0 -14
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortService.js +0 -330
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortStage.d.ts +0 -7
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModel/sortStage.js +0 -75
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModelModule.d.ts +0 -2
- package/es/components/DataGrid/modules/client-side-row-model/clientSideRowModelModule.js +0 -15
- package/es/components/DataGrid/modules/client-side-row-model/index.d.ts +0 -1
- package/es/components/DataGrid/modules/client-side-row-model/index.js +0 -1
- package/es/components/DataGrid/modules/clipboard/index.d.ts +0 -1
- package/es/components/DataGrid/modules/column-tool-panel/index.d.ts +0 -2
- package/es/components/DataGrid/modules/row-grouping/index.d.ts +0 -4
- package/es/components/DataGrid/modules/server-side-row-model/index.d.ts +0 -1
- package/es/components/DataGrid/modules/server-side-row-model/index.js +0 -1
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/blockUtils.d.ts +0 -47
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/blockUtils.js +0 -444
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/infiniteStoreBlock.d.ts +0 -92
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/blocks/infiniteStoreBlock.js +0 -510
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/expandListener.d.ts +0 -9
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/expandListener.js +0 -115
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/filterListener.d.ts +0 -9
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/filterListener.js +0 -114
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/listenerUtils.d.ts +0 -5
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/listenerUtils.js +0 -68
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/sortListener.d.ts +0 -13
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/listeners/sortListener.js +0 -194
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/nodeManager.d.ts +0 -7
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/nodeManager.js +0 -63
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/serverSideRowModel.d.ts +0 -88
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/serverSideRowModel.js +0 -572
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/fullStore.d.ts +0 -108
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/fullStore.js +0 -876
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/infiniteStore.d.ts +0 -102
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/infiniteStore.js +0 -918
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeFactory.d.ts +0 -12
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeFactory.js +0 -141
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeUtils.d.ts +0 -35
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/stores/storeUtils.js +0 -154
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/transactionManager.d.ts +0 -23
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModel/transactionManager.js +0 -210
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModelModule.d.ts +0 -18
- package/es/components/DataGrid/modules/server-side-row-model/serverSideRowModelModule.js +0 -18
- package/es/components/DataGrid/modules/side-bar/index.d.ts +0 -2
- /package/es/components/DataGrid/modules/clipboard/{index.js → main.js} +0 -0
- /package/es/components/DataGrid/modules/column-tool-panel/{index.js → main.js} +0 -0
- /package/es/components/DataGrid/modules/menu/{index.d.ts → main.d.ts} +0 -0
- /package/es/components/DataGrid/modules/menu/{index.js → main.js} +0 -0
- /package/es/components/DataGrid/modules/row-grouping/{index.js → main.js} +0 -0
- /package/es/components/DataGrid/modules/side-bar/{index.js → main.js} +0 -0
|
@@ -0,0 +1,417 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
3
|
+
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."); }
|
|
4
|
+
|
|
5
|
+
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); }
|
|
6
|
+
|
|
7
|
+
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; }
|
|
8
|
+
|
|
9
|
+
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; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
13
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
|
+
|
|
15
|
+
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); } }
|
|
16
|
+
|
|
17
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
18
|
+
|
|
19
|
+
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); }
|
|
20
|
+
|
|
21
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
22
|
+
|
|
23
|
+
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); }; }
|
|
24
|
+
|
|
25
|
+
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); }
|
|
26
|
+
|
|
27
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
28
|
+
|
|
29
|
+
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; } }
|
|
30
|
+
|
|
31
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
32
|
+
|
|
33
|
+
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); }
|
|
34
|
+
|
|
35
|
+
var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
|
|
36
|
+
var c = arguments.length,
|
|
37
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
38
|
+
d;
|
|
39
|
+
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--) {
|
|
40
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
41
|
+
}
|
|
42
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var ChartMenuItemMapper_1;
|
|
46
|
+
import { Bean, BeanStub, ModuleNames, ModuleRegistry, Optional, _ } from '@ag-grid-community/core';
|
|
47
|
+
|
|
48
|
+
var ChartMenuItemMapper = ChartMenuItemMapper_1 = /*#__PURE__*/function (_BeanStub) {
|
|
49
|
+
_inherits(ChartMenuItemMapper, _BeanStub);
|
|
50
|
+
|
|
51
|
+
var _super = _createSuper(ChartMenuItemMapper);
|
|
52
|
+
|
|
53
|
+
function ChartMenuItemMapper() {
|
|
54
|
+
_classCallCheck(this, ChartMenuItemMapper);
|
|
55
|
+
|
|
56
|
+
return _super.apply(this, arguments);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
_createClass(ChartMenuItemMapper, [{
|
|
60
|
+
key: "getChartItems",
|
|
61
|
+
value: function getChartItems(key) {
|
|
62
|
+
var _a, _b;
|
|
63
|
+
|
|
64
|
+
if (!this.chartService) {
|
|
65
|
+
ModuleRegistry.assertRegistered(ModuleNames.GridChartsModule, "the Context Menu key \"".concat(key, "\""));
|
|
66
|
+
return undefined;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
var builder = key === 'pivotChart' ? new PivotMenuItemMapper(this.gridOptionsService, this.chartService, this.localeService) : new RangeMenuItemMapper(this.gridOptionsService, this.chartService, this.localeService);
|
|
70
|
+
var topLevelMenuItem = builder.getMenuItem();
|
|
71
|
+
var chartGroupsDef = (_b = (_a = this.gridOptionsService.get('chartToolPanelsDef')) === null || _a === void 0 ? void 0 : _a.settingsPanel) === null || _b === void 0 ? void 0 : _b.chartGroupsDef;
|
|
72
|
+
|
|
73
|
+
if (chartGroupsDef) {
|
|
74
|
+
// Apply filtering and ordering if chartGroupsDef provided
|
|
75
|
+
topLevelMenuItem = ChartMenuItemMapper_1.filterAndOrderChartMenu(topLevelMenuItem, chartGroupsDef, builder.getConfigLookup());
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return this.cleanInternals(topLevelMenuItem);
|
|
79
|
+
} // Remove our internal _key properties so this does not leak out of the class on the menu items.
|
|
80
|
+
|
|
81
|
+
}, {
|
|
82
|
+
key: "cleanInternals",
|
|
83
|
+
value: function cleanInternals(menuItem) {
|
|
84
|
+
if (!menuItem) {
|
|
85
|
+
return menuItem;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
var removeKey = function removeKey(m) {
|
|
89
|
+
var _a;
|
|
90
|
+
|
|
91
|
+
m === null || m === void 0 ? true : delete m._key;
|
|
92
|
+
(_a = m === null || m === void 0 ? void 0 : m.subMenu) === null || _a === void 0 ? void 0 : _a.forEach(function (s) {
|
|
93
|
+
return removeKey(s);
|
|
94
|
+
});
|
|
95
|
+
return m;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
return removeKey(menuItem);
|
|
99
|
+
}
|
|
100
|
+
}], [{
|
|
101
|
+
key: "buildLookup",
|
|
102
|
+
value: function buildLookup(menuItem) {
|
|
103
|
+
var itemLookup = {};
|
|
104
|
+
|
|
105
|
+
var addItem = function addItem(item) {
|
|
106
|
+
itemLookup[item._key] = item;
|
|
107
|
+
|
|
108
|
+
if (item.subMenu) {
|
|
109
|
+
item.subMenu.forEach(function (s) {
|
|
110
|
+
return addItem(s);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
addItem(menuItem);
|
|
116
|
+
return itemLookup;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Make the MenuItem match the charts provided and their ordering on the ChartGroupsDef config object as provided by the user.
|
|
120
|
+
*/
|
|
121
|
+
|
|
122
|
+
}, {
|
|
123
|
+
key: "filterAndOrderChartMenu",
|
|
124
|
+
value: function filterAndOrderChartMenu(topLevelMenuItem, chartGroupsDef, configLookup) {
|
|
125
|
+
var _a;
|
|
126
|
+
|
|
127
|
+
var menuItemLookup = this.buildLookup(topLevelMenuItem);
|
|
128
|
+
var orderedAndFiltered = Object.assign(Object.assign({}, topLevelMenuItem), {
|
|
129
|
+
subMenu: []
|
|
130
|
+
});
|
|
131
|
+
Object.entries(chartGroupsDef).forEach(function (_ref) {
|
|
132
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
|
133
|
+
group = _ref2[0],
|
|
134
|
+
chartTypes = _ref2[1];
|
|
135
|
+
|
|
136
|
+
var _a, _b;
|
|
137
|
+
|
|
138
|
+
var chartConfigGroup = configLookup[group];
|
|
139
|
+
|
|
140
|
+
if (chartConfigGroup == undefined) {
|
|
141
|
+
_.doOnce(function () {
|
|
142
|
+
return console.warn("AG Grid - invalid chartGroupsDef config '".concat(group, "'"));
|
|
143
|
+
}, "invalid_chartGroupsDef".concat(group));
|
|
144
|
+
|
|
145
|
+
return undefined;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
var menuItem = menuItemLookup[chartConfigGroup._key];
|
|
149
|
+
|
|
150
|
+
if (menuItem) {
|
|
151
|
+
if (menuItem.subMenu) {
|
|
152
|
+
var subMenus = chartTypes.map(function (chartType) {
|
|
153
|
+
var itemKey = chartConfigGroup[chartType];
|
|
154
|
+
|
|
155
|
+
if (itemKey == undefined) {
|
|
156
|
+
_.doOnce(function () {
|
|
157
|
+
return console.warn("AG Grid - invalid chartGroupsDef config '".concat(group, ".").concat(chartType, "'"));
|
|
158
|
+
}, "invalid_chartGroupsDef".concat(chartType, "_").concat(group));
|
|
159
|
+
|
|
160
|
+
return undefined;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
return menuItemLookup[itemKey];
|
|
164
|
+
}).filter(function (s) {
|
|
165
|
+
return s !== undefined;
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
if (subMenus.length > 0) {
|
|
169
|
+
menuItem.subMenu = subMenus;
|
|
170
|
+
(_a = orderedAndFiltered.subMenu) === null || _a === void 0 ? void 0 : _a.push(menuItem);
|
|
171
|
+
}
|
|
172
|
+
} else {
|
|
173
|
+
// Handles line case which is not actually a sub subMenu
|
|
174
|
+
(_b = orderedAndFiltered.subMenu) === null || _b === void 0 ? void 0 : _b.push(menuItem);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
if (((_a = orderedAndFiltered.subMenu) === null || _a === void 0 ? void 0 : _a.length) == 0) {
|
|
180
|
+
return undefined;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
return orderedAndFiltered;
|
|
184
|
+
}
|
|
185
|
+
}]);
|
|
186
|
+
|
|
187
|
+
return ChartMenuItemMapper;
|
|
188
|
+
}(BeanStub);
|
|
189
|
+
|
|
190
|
+
__decorate([Optional('chartService')], ChartMenuItemMapper.prototype, "chartService", void 0);
|
|
191
|
+
|
|
192
|
+
ChartMenuItemMapper = ChartMenuItemMapper_1 = __decorate([Bean('chartMenuItemMapper')], ChartMenuItemMapper);
|
|
193
|
+
export { ChartMenuItemMapper };
|
|
194
|
+
|
|
195
|
+
var PivotMenuItemMapper = /*#__PURE__*/function () {
|
|
196
|
+
function PivotMenuItemMapper(gridOptionsService, chartService, localeService) {
|
|
197
|
+
_classCallCheck(this, PivotMenuItemMapper);
|
|
198
|
+
|
|
199
|
+
this.gridOptionsService = gridOptionsService;
|
|
200
|
+
this.chartService = chartService;
|
|
201
|
+
this.localeService = localeService;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
_createClass(PivotMenuItemMapper, [{
|
|
205
|
+
key: "getMenuItem",
|
|
206
|
+
value: function getMenuItem() {
|
|
207
|
+
var _this = this;
|
|
208
|
+
|
|
209
|
+
var localeTextFunc = this.localeService.getLocaleTextFunc();
|
|
210
|
+
|
|
211
|
+
var getMenuItem = function getMenuItem(localeKey, defaultText, chartType, key) {
|
|
212
|
+
return {
|
|
213
|
+
name: localeTextFunc(localeKey, defaultText),
|
|
214
|
+
action: function action() {
|
|
215
|
+
return _this.chartService.createPivotChart({
|
|
216
|
+
chartType: chartType
|
|
217
|
+
});
|
|
218
|
+
},
|
|
219
|
+
_key: key
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
return {
|
|
224
|
+
name: localeTextFunc('pivotChart', 'Pivot Chart'),
|
|
225
|
+
_key: 'pivotChart',
|
|
226
|
+
subMenu: [{
|
|
227
|
+
_key: 'pivotColumnChart',
|
|
228
|
+
name: localeTextFunc('columnChart', 'Column'),
|
|
229
|
+
subMenu: [getMenuItem('groupedColumn', 'Grouped‎', 'groupedColumn', 'pivotGroupedColumn'), getMenuItem('stackedColumn', 'Stacked‎', 'stackedColumn', 'pivotStackedColumn'), getMenuItem('normalizedColumn', '100% Stacked‎', 'normalizedColumn', 'pivotNormalizedColumn')]
|
|
230
|
+
}, {
|
|
231
|
+
_key: 'pivotBarChart',
|
|
232
|
+
name: localeTextFunc('barChart', 'Bar'),
|
|
233
|
+
subMenu: [getMenuItem('groupedBar', 'Grouped‎', 'groupedBar', 'pivotGroupedBar'), getMenuItem('stackedBar', 'Stacked‎', 'stackedBar', 'pivotStackedBar'), getMenuItem('normalizedBar', '100% Stacked‎', 'normalizedBar', 'pivotNormalizedBar')]
|
|
234
|
+
}, {
|
|
235
|
+
_key: 'pivotPieChart',
|
|
236
|
+
name: localeTextFunc('pieChart', 'Pie'),
|
|
237
|
+
subMenu: [getMenuItem('pie', 'Pie‎', 'pie', 'pivotPie'), getMenuItem('doughnut', 'Doughnut‎', 'doughnut', 'pivotDoughnut')]
|
|
238
|
+
}, getMenuItem('line', 'Line‎', 'line', 'pivotLineChart'), {
|
|
239
|
+
_key: 'pivotXYChart',
|
|
240
|
+
name: localeTextFunc('xyChart', 'X Y (Scatter)'),
|
|
241
|
+
subMenu: [getMenuItem('scatter', 'Scatter‎', 'scatter', 'pivotScatter'), getMenuItem('bubble', 'Bubble‎', 'bubble', 'pivotBubble')]
|
|
242
|
+
}, {
|
|
243
|
+
_key: 'pivotAreaChart',
|
|
244
|
+
name: localeTextFunc('areaChart', 'Area'),
|
|
245
|
+
subMenu: [getMenuItem('area', 'Area‎', 'area', 'pivotArea'), getMenuItem('stackedArea', 'Stacked‎', 'stackedArea', 'pivotStackedArea'), getMenuItem('normalizedArea', '100% Stacked‎', 'normalizedArea', 'pivotNormalizedArea')]
|
|
246
|
+
}, getMenuItem('histogramChart', 'Histogram‎', 'histogram', 'pivotHistogramChart'), {
|
|
247
|
+
_key: 'pivotCombinationChart',
|
|
248
|
+
name: localeTextFunc('combinationChart', 'Combination'),
|
|
249
|
+
subMenu: [getMenuItem('columnLineCombo', 'Column & Line‎', 'columnLineCombo', 'pivotColumnLineCombo'), getMenuItem('AreaColumnCombo', 'Area & Column‎', 'areaColumnCombo', 'pivotAreaColumnCombo')]
|
|
250
|
+
}],
|
|
251
|
+
icon: _.createIconNoSpan('chart', this.gridOptionsService, undefined)
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
}, {
|
|
255
|
+
key: "getConfigLookup",
|
|
256
|
+
value: function getConfigLookup() {
|
|
257
|
+
return {
|
|
258
|
+
columnGroup: {
|
|
259
|
+
_key: 'pivotColumnChart',
|
|
260
|
+
column: 'pivotGroupedColumn',
|
|
261
|
+
stackedColumn: 'pivotStackedColumn',
|
|
262
|
+
normalizedColumn: 'pivotNormalizedColumn'
|
|
263
|
+
},
|
|
264
|
+
barGroup: {
|
|
265
|
+
_key: 'pivotBarChart',
|
|
266
|
+
bar: 'pivotGroupedBar',
|
|
267
|
+
stackedBar: 'pivotStackedBar',
|
|
268
|
+
normalizedBar: 'pivotNormalizedBar'
|
|
269
|
+
},
|
|
270
|
+
pieGroup: {
|
|
271
|
+
_key: 'pivotPieChart',
|
|
272
|
+
pie: 'pivotPie',
|
|
273
|
+
doughnut: 'pivotDoughnut'
|
|
274
|
+
},
|
|
275
|
+
lineGroup: {
|
|
276
|
+
_key: 'pivotLineChart',
|
|
277
|
+
line: 'pivotLineChart'
|
|
278
|
+
},
|
|
279
|
+
scatterGroup: {
|
|
280
|
+
_key: 'pivotXYChart',
|
|
281
|
+
bubble: 'pivotBubble',
|
|
282
|
+
scatter: 'pivotScatter'
|
|
283
|
+
},
|
|
284
|
+
areaGroup: {
|
|
285
|
+
_key: 'pivotAreaChart',
|
|
286
|
+
area: 'pivotArea',
|
|
287
|
+
stackedArea: 'pivotStackedArea',
|
|
288
|
+
normalizedArea: 'pivotNormalizedArea'
|
|
289
|
+
},
|
|
290
|
+
histogramGroup: {
|
|
291
|
+
_key: 'pivotHistogramChart',
|
|
292
|
+
histogram: 'pivotHistogramChart'
|
|
293
|
+
},
|
|
294
|
+
combinationGroup: {
|
|
295
|
+
_key: 'pivotCombinationChart',
|
|
296
|
+
columnLineCombo: 'pivotColumnLineCombo',
|
|
297
|
+
areaColumnCombo: 'pivotAreaColumnCombo',
|
|
298
|
+
customCombo: '' // Not currently supported but needs a value to separate from a missing value
|
|
299
|
+
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
}]);
|
|
304
|
+
|
|
305
|
+
return PivotMenuItemMapper;
|
|
306
|
+
}();
|
|
307
|
+
|
|
308
|
+
var RangeMenuItemMapper = /*#__PURE__*/function () {
|
|
309
|
+
function RangeMenuItemMapper(gridOptionsService, chartService, localeService) {
|
|
310
|
+
_classCallCheck(this, RangeMenuItemMapper);
|
|
311
|
+
|
|
312
|
+
this.gridOptionsService = gridOptionsService;
|
|
313
|
+
this.chartService = chartService;
|
|
314
|
+
this.localeService = localeService;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
_createClass(RangeMenuItemMapper, [{
|
|
318
|
+
key: "getMenuItem",
|
|
319
|
+
value: function getMenuItem() {
|
|
320
|
+
var _this2 = this;
|
|
321
|
+
|
|
322
|
+
var localeTextFunc = this.localeService.getLocaleTextFunc();
|
|
323
|
+
|
|
324
|
+
var getMenuItem = function getMenuItem(localeKey, defaultText, chartType, key) {
|
|
325
|
+
return {
|
|
326
|
+
name: localeTextFunc(localeKey, defaultText),
|
|
327
|
+
action: function action() {
|
|
328
|
+
return _this2.chartService.createChartFromCurrentRange(chartType);
|
|
329
|
+
},
|
|
330
|
+
_key: key
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
return {
|
|
335
|
+
name: localeTextFunc('chartRange', 'Chart Range'),
|
|
336
|
+
_key: 'chartRange',
|
|
337
|
+
subMenu: [{
|
|
338
|
+
name: localeTextFunc('columnChart', 'Column'),
|
|
339
|
+
subMenu: [getMenuItem('groupedColumn', 'Grouped‎', 'groupedColumn', 'rangeGroupedColumn'), getMenuItem('stackedColumn', 'Stacked‎', 'stackedColumn', 'rangeStackedColumn'), getMenuItem('normalizedColumn', '100% Stacked‎', 'normalizedColumn', 'rangeNormalizedColumn')],
|
|
340
|
+
_key: 'rangeColumnChart'
|
|
341
|
+
}, {
|
|
342
|
+
name: localeTextFunc('barChart', 'Bar'),
|
|
343
|
+
subMenu: [getMenuItem('groupedBar', 'Grouped‎', 'groupedBar', 'rangeGroupedBar'), getMenuItem('stackedBar', 'Stacked‎', 'stackedBar', 'rangeStackedBar'), getMenuItem('normalizedBar', '100% Stacked‎', 'normalizedBar', 'rangeNormalizedBar')],
|
|
344
|
+
_key: 'rangeBarChart'
|
|
345
|
+
}, {
|
|
346
|
+
name: localeTextFunc('pieChart', 'Pie'),
|
|
347
|
+
subMenu: [getMenuItem('pie', 'Pie‎', 'pie', 'rangePie'), getMenuItem('doughnut', 'Doughnut‎', 'doughnut', 'rangeDoughnut')],
|
|
348
|
+
_key: 'rangePieChart'
|
|
349
|
+
}, getMenuItem('line', 'Line‎', 'line', 'rangeLineChart'), {
|
|
350
|
+
name: localeTextFunc('xyChart', 'X Y (Scatter)'),
|
|
351
|
+
subMenu: [getMenuItem('scatter', 'Scatter‎', 'scatter', 'rangeScatter'), getMenuItem('bubble', 'Bubble‎', 'bubble', 'rangeBubble')],
|
|
352
|
+
_key: 'rangeXYChart'
|
|
353
|
+
}, {
|
|
354
|
+
name: localeTextFunc('areaChart', 'Area'),
|
|
355
|
+
subMenu: [getMenuItem('area', 'Area‎', 'area', 'rangeArea'), getMenuItem('stackedArea', 'Stacked‎', 'stackedArea', 'rangeStackedArea'), getMenuItem('normalizedArea', '100% Stacked‎', 'normalizedArea', 'rangeNormalizedArea')],
|
|
356
|
+
_key: 'rangeAreaChart'
|
|
357
|
+
}, getMenuItem('histogramChart', 'Histogram‎', 'histogram', 'rangeHistogramChart'), {
|
|
358
|
+
name: localeTextFunc('combinationChart', 'Combination'),
|
|
359
|
+
subMenu: [getMenuItem('columnLineCombo', 'Column & Line‎', 'columnLineCombo', 'rangeColumnLineCombo'), getMenuItem('AreaColumnCombo', 'Area & Column‎', 'areaColumnCombo', 'rangeAreaColumnCombo')],
|
|
360
|
+
_key: 'rangeCombinationChart'
|
|
361
|
+
}],
|
|
362
|
+
icon: _.createIconNoSpan('chart', this.gridOptionsService, undefined)
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
}, {
|
|
366
|
+
key: "getConfigLookup",
|
|
367
|
+
value: function getConfigLookup() {
|
|
368
|
+
return {
|
|
369
|
+
columnGroup: {
|
|
370
|
+
_key: 'rangeColumnChart',
|
|
371
|
+
column: 'rangeGroupedColumn',
|
|
372
|
+
stackedColumn: 'rangeStackedColumn',
|
|
373
|
+
normalizedColumn: 'rangeNormalizedColumn'
|
|
374
|
+
},
|
|
375
|
+
barGroup: {
|
|
376
|
+
_key: 'rangeBarChart',
|
|
377
|
+
bar: 'rangeGroupedBar',
|
|
378
|
+
stackedBar: 'rangeStackedBar',
|
|
379
|
+
normalizedBar: 'rangeNormalizedBar'
|
|
380
|
+
},
|
|
381
|
+
pieGroup: {
|
|
382
|
+
_key: 'rangePieChart',
|
|
383
|
+
pie: 'rangePie',
|
|
384
|
+
doughnut: 'rangeDoughnut'
|
|
385
|
+
},
|
|
386
|
+
lineGroup: {
|
|
387
|
+
_key: 'rangeLineChart',
|
|
388
|
+
line: 'rangeLineChart'
|
|
389
|
+
},
|
|
390
|
+
scatterGroup: {
|
|
391
|
+
_key: 'rangeXYChart',
|
|
392
|
+
bubble: 'rangeBubble',
|
|
393
|
+
scatter: 'rangeScatter'
|
|
394
|
+
},
|
|
395
|
+
areaGroup: {
|
|
396
|
+
_key: 'rangeAreaChart',
|
|
397
|
+
area: 'rangeArea',
|
|
398
|
+
stackedArea: 'rangeStackedArea',
|
|
399
|
+
normalizedArea: 'rangeNormalizedArea'
|
|
400
|
+
},
|
|
401
|
+
histogramGroup: {
|
|
402
|
+
_key: 'rangeHistogramChart',
|
|
403
|
+
histogram: 'rangeHistogramChart'
|
|
404
|
+
},
|
|
405
|
+
combinationGroup: {
|
|
406
|
+
_key: 'rangeCombinationChart',
|
|
407
|
+
columnLineCombo: 'rangeColumnLineCombo',
|
|
408
|
+
areaColumnCombo: 'rangeAreaColumnCombo',
|
|
409
|
+
customCombo: '' // Not currently supported but needs a value to separate from a missing value
|
|
410
|
+
|
|
411
|
+
}
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
}]);
|
|
415
|
+
|
|
416
|
+
return RangeMenuItemMapper;
|
|
417
|
+
}();
|
|
@@ -1,26 +1,13 @@
|
|
|
1
|
-
import { BeanStub, Column, IContextMenuFactory, RowNode } from
|
|
1
|
+
import { BeanStub, Column, IContextMenuFactory, RowNode } from "@ag-grid-community/core";
|
|
2
2
|
export declare class ContextMenuFactory extends BeanStub implements IContextMenuFactory {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
rowNode: RowNode | null,
|
|
14
|
-
column: Column | null,
|
|
15
|
-
value: any,
|
|
16
|
-
anchorToElement: HTMLElement,
|
|
17
|
-
): void;
|
|
18
|
-
private blockMiddleClickScrollsIfNeeded;
|
|
19
|
-
showMenu(
|
|
20
|
-
node: RowNode | null,
|
|
21
|
-
column: Column | null,
|
|
22
|
-
value: any,
|
|
23
|
-
mouseEvent: MouseEvent | Touch,
|
|
24
|
-
anchorToElement: HTMLElement,
|
|
25
|
-
): boolean;
|
|
3
|
+
private popupService;
|
|
4
|
+
private rangeService;
|
|
5
|
+
private ctrlsService;
|
|
6
|
+
private columnModel;
|
|
7
|
+
private activeMenu;
|
|
8
|
+
hideActiveMenu(): void;
|
|
9
|
+
private getMenuItems;
|
|
10
|
+
onContextMenu(mouseEvent: MouseEvent | null, touchEvent: TouchEvent | null, rowNode: RowNode | null, column: Column | null, value: any, anchorToElement: HTMLElement): void;
|
|
11
|
+
private blockMiddleClickScrollsIfNeeded;
|
|
12
|
+
showMenu(node: RowNode | null, column: Column | null, value: any, mouseEvent: MouseEvent | Touch, anchorToElement: HTMLElement): boolean;
|
|
26
13
|
}
|
|
@@ -28,13 +28,13 @@ var __decorate = this && this.__decorate || function (decorators, target, key, d
|
|
|
28
28
|
var c = arguments.length,
|
|
29
29
|
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
30
30
|
d;
|
|
31
|
-
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) ===
|
|
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
32
|
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
33
33
|
}
|
|
34
34
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
import { _, AgMenuItemComponent, AgMenuList, Autowired, Bean, BeanStub, Component, ModuleNames, ModuleRegistry, Optional, PostConstruct } from
|
|
37
|
+
import { _, AgMenuItemComponent, AgMenuList, Autowired, Bean, BeanStub, Component, ModuleNames, ModuleRegistry, Optional, PostConstruct } from "@ag-grid-community/core";
|
|
38
38
|
var CSS_MENU = 'ag-menu';
|
|
39
39
|
var CSS_CONTEXT_MENU_OPEN = 'ag-context-menu-open';
|
|
40
40
|
|
|
@@ -62,11 +62,15 @@ var ContextMenuFactory = /*#__PURE__*/function (_BeanStub) {
|
|
|
62
62
|
if (_.exists(node) && ModuleRegistry.isRegistered(ModuleNames.ClipboardModule)) {
|
|
63
63
|
if (column) {
|
|
64
64
|
// only makes sense if column exists, could have originated from a row
|
|
65
|
+
if (!this.gridOptionsService.is('suppressCutToClipboard')) {
|
|
66
|
+
defaultMenuOptions.push('cut');
|
|
67
|
+
}
|
|
68
|
+
|
|
65
69
|
defaultMenuOptions.push('copy', 'copyWithHeaders', 'copyWithGroupHeaders', 'paste', 'separator');
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
|
|
69
|
-
if (this.
|
|
73
|
+
if (this.gridOptionsService.is('enableCharts') && ModuleRegistry.isRegistered(ModuleNames.GridChartsModule)) {
|
|
70
74
|
if (this.columnModel.isPivotMode()) {
|
|
71
75
|
defaultMenuOptions.push('pivotChart');
|
|
72
76
|
}
|
|
@@ -80,8 +84,8 @@ var ContextMenuFactory = /*#__PURE__*/function (_BeanStub) {
|
|
|
80
84
|
// if user clicks a cell
|
|
81
85
|
var csvModuleMissing = !ModuleRegistry.isRegistered(ModuleNames.CsvExportModule);
|
|
82
86
|
var excelModuleMissing = !ModuleRegistry.isRegistered(ModuleNames.ExcelExportModule);
|
|
83
|
-
var suppressExcel = this.
|
|
84
|
-
var suppressCsv = this.
|
|
87
|
+
var suppressExcel = this.gridOptionsService.is('suppressExcelExport') || excelModuleMissing;
|
|
88
|
+
var suppressCsv = this.gridOptionsService.is('suppressCsvExport') || csvModuleMissing;
|
|
85
89
|
|
|
86
90
|
var onIPad = _.isIOSUserAgent();
|
|
87
91
|
|
|
@@ -92,15 +96,16 @@ var ContextMenuFactory = /*#__PURE__*/function (_BeanStub) {
|
|
|
92
96
|
}
|
|
93
97
|
}
|
|
94
98
|
|
|
95
|
-
|
|
96
|
-
|
|
99
|
+
var userFunc = this.gridOptionsService.getCallback('getContextMenuItems');
|
|
100
|
+
|
|
101
|
+
if (userFunc) {
|
|
97
102
|
var params = {
|
|
98
103
|
node: node,
|
|
99
104
|
column: column,
|
|
100
105
|
value: value,
|
|
101
106
|
defaultItems: defaultMenuOptions.length ? defaultMenuOptions : undefined
|
|
102
107
|
};
|
|
103
|
-
return userFunc
|
|
108
|
+
return userFunc(params);
|
|
104
109
|
}
|
|
105
110
|
|
|
106
111
|
return defaultMenuOptions;
|
|
@@ -110,7 +115,7 @@ var ContextMenuFactory = /*#__PURE__*/function (_BeanStub) {
|
|
|
110
115
|
value: function onContextMenu(mouseEvent, touchEvent, rowNode, column, value, anchorToElement) {
|
|
111
116
|
// to allow us to debug in chrome, we ignore the event if ctrl is pressed.
|
|
112
117
|
// not everyone wants this, so first 'if' below allows to turn this hack off.
|
|
113
|
-
if (!this.
|
|
118
|
+
if (!this.gridOptionsService.is('allowContextMenuWithControlKey')) {
|
|
114
119
|
// then do the check
|
|
115
120
|
if (mouseEvent && (mouseEvent.ctrlKey || mouseEvent.metaKey)) {
|
|
116
121
|
return;
|
|
@@ -123,7 +128,7 @@ var ContextMenuFactory = /*#__PURE__*/function (_BeanStub) {
|
|
|
123
128
|
this.blockMiddleClickScrollsIfNeeded(mouseEvent);
|
|
124
129
|
}
|
|
125
130
|
|
|
126
|
-
if (this.
|
|
131
|
+
if (this.gridOptionsService.is('suppressContextMenu')) {
|
|
127
132
|
return;
|
|
128
133
|
}
|
|
129
134
|
|
|
@@ -141,10 +146,10 @@ var ContextMenuFactory = /*#__PURE__*/function (_BeanStub) {
|
|
|
141
146
|
// will be consumed by the browser to mean 'scroll' (as you can scroll with the middle mouse
|
|
142
147
|
// button in the browser). so this property allows the user to receive middle button clicks if
|
|
143
148
|
// they want.
|
|
144
|
-
var
|
|
149
|
+
var gridOptionsService = this.gridOptionsService;
|
|
145
150
|
var which = mouseEvent.which;
|
|
146
151
|
|
|
147
|
-
if (
|
|
152
|
+
if (gridOptionsService.is('suppressMiddleClickScrolls') && which === 2) {
|
|
148
153
|
mouseEvent.preventDefault();
|
|
149
154
|
}
|
|
150
155
|
}
|
|
@@ -173,7 +178,7 @@ var ContextMenuFactory = /*#__PURE__*/function (_BeanStub) {
|
|
|
173
178
|
// won't show the browser's contextmenu
|
|
174
179
|
nudgeY: 1
|
|
175
180
|
};
|
|
176
|
-
var translate = this.
|
|
181
|
+
var translate = this.localeService.getLocaleTextFunc();
|
|
177
182
|
var addPopupRes = this.popupService.addPopup({
|
|
178
183
|
modal: true,
|
|
179
184
|
eChild: eMenuGui,
|
|
@@ -185,9 +190,11 @@ var ContextMenuFactory = /*#__PURE__*/function (_BeanStub) {
|
|
|
185
190
|
},
|
|
186
191
|
click: mouseEvent,
|
|
187
192
|
positionCallback: function positionCallback() {
|
|
188
|
-
_this.
|
|
189
|
-
|
|
190
|
-
}, positionParams)
|
|
193
|
+
var isRtl = _this.gridOptionsService.is('enableRtl');
|
|
194
|
+
|
|
195
|
+
_this.popupService.positionPopupUnderMouseEvent(Object.assign(Object.assign({}, positionParams), {
|
|
196
|
+
nudgeX: isRtl ? (eMenuGui.offsetWidth + 1) * -1 : 1
|
|
197
|
+
}));
|
|
191
198
|
},
|
|
192
199
|
// so when browser is scrolled down, or grid is scrolled, context menu stays with cell
|
|
193
200
|
anchorToElement: anchorToElement,
|
|
@@ -229,13 +236,13 @@ var ContextMenuFactory = /*#__PURE__*/function (_BeanStub) {
|
|
|
229
236
|
return ContextMenuFactory;
|
|
230
237
|
}(BeanStub);
|
|
231
238
|
|
|
232
|
-
__decorate([Autowired('popupService')], ContextMenuFactory.prototype,
|
|
239
|
+
__decorate([Autowired('popupService')], ContextMenuFactory.prototype, "popupService", void 0);
|
|
233
240
|
|
|
234
|
-
__decorate([Optional('rangeService')], ContextMenuFactory.prototype,
|
|
241
|
+
__decorate([Optional('rangeService')], ContextMenuFactory.prototype, "rangeService", void 0);
|
|
235
242
|
|
|
236
|
-
__decorate([Autowired('ctrlsService')], ContextMenuFactory.prototype,
|
|
243
|
+
__decorate([Autowired('ctrlsService')], ContextMenuFactory.prototype, "ctrlsService", void 0);
|
|
237
244
|
|
|
238
|
-
__decorate([Autowired('columnModel')], ContextMenuFactory.prototype,
|
|
245
|
+
__decorate([Autowired('columnModel')], ContextMenuFactory.prototype, "columnModel", void 0);
|
|
239
246
|
|
|
240
247
|
ContextMenuFactory = __decorate([Bean('contextMenuFactory')], ContextMenuFactory);
|
|
241
248
|
export { ContextMenuFactory };
|
|
@@ -296,7 +303,7 @@ var ContextMenu = /*#__PURE__*/function (_Component) {
|
|
|
296
303
|
rowIndex = _this$focusedCell.rowIndex,
|
|
297
304
|
rowPinned = _this$focusedCell.rowPinned,
|
|
298
305
|
column = _this$focusedCell.column;
|
|
299
|
-
var doc = this.
|
|
306
|
+
var doc = this.gridOptionsService.getDocument();
|
|
300
307
|
|
|
301
308
|
if (doc.activeElement === doc.body) {
|
|
302
309
|
this.focusService.setFocusedCell({
|
|
@@ -320,10 +327,10 @@ var ContextMenu = /*#__PURE__*/function (_Component) {
|
|
|
320
327
|
return ContextMenu;
|
|
321
328
|
}(Component);
|
|
322
329
|
|
|
323
|
-
__decorate([Autowired('menuItemMapper')], ContextMenu.prototype,
|
|
330
|
+
__decorate([Autowired('menuItemMapper')], ContextMenu.prototype, "menuItemMapper", void 0);
|
|
324
331
|
|
|
325
|
-
__decorate([Autowired('focusService')], ContextMenu.prototype,
|
|
332
|
+
__decorate([Autowired('focusService')], ContextMenu.prototype, "focusService", void 0);
|
|
326
333
|
|
|
327
|
-
__decorate([Autowired('cellPositionUtils')], ContextMenu.prototype,
|
|
334
|
+
__decorate([Autowired('cellPositionUtils')], ContextMenu.prototype, "cellPositionUtils", void 0);
|
|
328
335
|
|
|
329
|
-
__decorate([PostConstruct], ContextMenu.prototype,
|
|
336
|
+
__decorate([PostConstruct], ContextMenu.prototype, "addMenuItems", null);
|