@lemon-fe/components 0.1.153 → 1.1.0-alpha.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/es/{Actions → actions}/index.d.ts +8 -5
- package/es/{Actions → actions}/index.js +56 -39
- package/es/{Actions → actions}/index.less +5 -5
- package/es/alert/index.d.ts +3 -0
- package/es/alert/index.js +18 -0
- package/es/{BaseTable/Actions.js → base-table/actions.js} +13 -10
- package/es/{BaseTable → base-table}/index.d.ts +0 -1
- package/es/{BaseTable → base-table}/index.js +48 -22
- package/es/{BaseTable/ResizeHeaderCell.js → base-table/resize-header-cell.js} +3 -3
- package/es/{BaseTable → base-table}/utils.d.ts +1 -1
- package/es/{BaseTable/VirtualBody.js → base-table/virtual-body.js} +12 -13
- package/es/{ColorPicker → color-picker}/index.js +7 -7
- package/es/{ColorPicker → color-picker}/index.less +1 -1
- package/es/component-configure/index.d.ts +12 -0
- package/es/component-configure/index.js +4 -0
- package/es/data-grid/cell-editors/date.d.ts +19 -0
- package/es/data-grid/cell-editors/date.js +92 -0
- package/es/data-grid/cell-editors/number.d.ts +32 -0
- package/es/data-grid/cell-editors/number.js +120 -0
- package/es/data-grid/cell-editors/row.d.ts +23 -0
- package/es/data-grid/cell-editors/row.js +119 -0
- package/es/data-grid/cell-editors/select.d.ts +33 -0
- package/es/data-grid/cell-editors/select.js +102 -0
- package/es/data-grid/cell-editors/text.d.ts +10 -0
- package/es/data-grid/cell-editors/text.js +81 -0
- package/es/data-grid/cell-editors/utils.d.ts +10 -0
- package/es/data-grid/cell-editors/utils.js +45 -0
- package/es/data-grid/cell-editors/wrapper.d.ts +5 -0
- package/es/data-grid/cell-editors/wrapper.js +8 -0
- package/es/data-grid/components/custom-panel/drag-context.d.ts +4 -0
- package/es/data-grid/components/custom-panel/drag-context.js +3 -0
- package/es/data-grid/components/custom-panel/field-modal.d.ts +10 -0
- package/es/data-grid/components/custom-panel/field-modal.js +223 -0
- package/es/data-grid/components/custom-panel/index.d.ts +5 -0
- package/es/data-grid/components/custom-panel/index.js +321 -0
- package/es/data-grid/components/custom-panel/item.d.ts +14 -0
- package/es/data-grid/components/custom-panel/item.js +181 -0
- package/es/data-grid/components/custom-panel/typings.d.ts +25 -0
- package/es/data-grid/components/search.d.ts +4 -0
- package/es/data-grid/components/search.js +159 -0
- package/es/data-grid/components/selected.d.ts +7 -0
- package/es/data-grid/components/selected.js +24 -0
- package/es/data-grid/context/grid-store.d.ts +4 -0
- package/es/data-grid/context/grid-store.js +4 -0
- package/es/data-grid/hooks.d.ts +20 -0
- package/es/data-grid/hooks.js +71 -0
- package/es/data-grid/index.d.ts +102 -0
- package/es/data-grid/index.js +1684 -0
- package/es/data-grid/index.less +659 -0
- package/es/data-grid/modules/clipboard/clipboard/clipboardService.d.ts +62 -0
- package/es/data-grid/modules/clipboard/clipboard/clipboardService.js +1007 -0
- package/es/data-grid/modules/clipboard/clipboardModule.d.ts +2 -0
- package/es/data-grid/modules/clipboard/clipboardModule.js +10 -0
- package/es/data-grid/modules/clipboard/main.d.ts +1 -0
- package/es/data-grid/modules/clipboard/main.js +1 -0
- package/es/data-grid/modules/clipboard/version.d.ts +1 -0
- package/es/data-grid/modules/clipboard/version.js +2 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnModelItem.d.ts +26 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnModelItem.js +94 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnToolPanel.d.ts +32 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/columnToolPanel.js +272 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/modelItemUtils.d.ts +16 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/modelItemUtils.js +209 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/pivotModePanel.d.ts +9 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/pivotModePanel.js +68 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.d.ts +32 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsHeaderPanel.js +150 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.d.ts +44 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanel.js +455 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.d.ts +26 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsListPanelItemDragFeature.js +224 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.d.ts +24 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/primaryColsPanel.js +123 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.d.ts +37 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnComp.js +314 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.d.ts +51 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelColumnGroupComp.js +406 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.d.ts +24 -0
- package/es/data-grid/modules/column-tool-panel/columnToolPanel/toolPanelContextMenu.js +264 -0
- package/es/data-grid/modules/column-tool-panel/columnsToolPanelModule.d.ts +2 -0
- package/es/data-grid/modules/column-tool-panel/columnsToolPanelModule.js +29 -0
- package/es/data-grid/modules/column-tool-panel/main.d.ts +2 -0
- package/es/data-grid/modules/column-tool-panel/main.js +3 -0
- package/es/data-grid/modules/column-tool-panel/version.d.ts +1 -0
- package/es/data-grid/modules/column-tool-panel/version.js +2 -0
- package/es/data-grid/modules/master-detail/main.d.ts +1 -0
- package/es/data-grid/modules/master-detail/main.js +1 -0
- package/es/data-grid/modules/master-detail/masterDetail/detailCellRenderer.d.ts +14 -0
- package/es/data-grid/modules/master-detail/masterDetail/detailCellRenderer.js +144 -0
- package/es/data-grid/modules/master-detail/masterDetail/detailCellRendererCtrl.d.ts +19 -0
- package/es/data-grid/modules/master-detail/masterDetail/detailCellRendererCtrl.js +203 -0
- package/es/data-grid/modules/master-detail/masterDetailModule.d.ts +2 -0
- package/es/data-grid/modules/master-detail/masterDetailModule.js +18 -0
- package/es/data-grid/modules/master-detail/version.d.ts +1 -0
- package/es/data-grid/modules/master-detail/version.js +2 -0
- package/es/data-grid/modules/menu/main.d.ts +1 -0
- package/es/data-grid/modules/menu/main.js +1 -0
- package/es/data-grid/modules/menu/menu/chartMenuItemMapper.d.ts +13 -0
- package/es/data-grid/modules/menu/menu/chartMenuItemMapper.js +351 -0
- package/es/data-grid/modules/menu/menu/contextMenu.d.ts +13 -0
- package/es/data-grid/modules/menu/menu/contextMenu.js +267 -0
- package/es/data-grid/modules/menu/menu/enterpriseMenu.d.ts +66 -0
- package/es/data-grid/modules/menu/menu/enterpriseMenu.js +592 -0
- package/es/data-grid/modules/menu/menu/menuItemMapper.d.ts +13 -0
- package/es/data-grid/modules/menu/menu/menuItemMapper.js +328 -0
- package/es/data-grid/modules/menu/menuModule.d.ts +2 -0
- package/es/data-grid/modules/menu/menuModule.js +12 -0
- package/es/data-grid/modules/menu/version.d.ts +1 -0
- package/es/data-grid/modules/menu/version.js +2 -0
- package/es/data-grid/modules/row-grouping/main.d.ts +4 -0
- package/es/data-grid/modules/row-grouping/main.js +4 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/aggFuncService.d.ts +23 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/aggFuncService.js +250 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/aggregationStage.d.ts +22 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/aggregationStage.js +285 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/batchRemover.d.ts +12 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/batchRemover.js +77 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.d.ts +75 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/baseDropZonePanel.js +516 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.d.ts +40 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/dropZoneColumnComp.js +367 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.d.ts +11 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.js +85 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.d.ts +17 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/pivotDropZonePanel.js +139 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.d.ts +15 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.js +105 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.d.ts +15 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/valueDropZonePanel.js +105 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/filterAggregatesStage.d.ts +9 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/filterAggregatesStage.js +136 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFilter.d.ts +39 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFilter.js +319 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFloatingFilter.d.ts +23 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/groupFilter/groupFloatingFilter.js +163 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/groupStage.d.ts +48 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/groupStage.js +740 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/pivotColDefService.d.ts +24 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/pivotColDefService.js +396 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/pivotStage.d.ts +19 -0
- package/es/data-grid/modules/row-grouping/rowGrouping/pivotStage.js +182 -0
- package/es/data-grid/modules/row-grouping/rowGroupingModule.d.ts +2 -0
- package/es/data-grid/modules/row-grouping/rowGroupingModule.js +28 -0
- package/es/data-grid/modules/row-grouping/version.d.ts +1 -0
- package/es/data-grid/modules/row-grouping/version.js +2 -0
- package/es/data-grid/modules/side-bar/main.d.ts +2 -0
- package/es/data-grid/modules/side-bar/main.js +2 -0
- package/es/data-grid/modules/side-bar/sideBar/common/toolPanelColDefService.d.ts +11 -0
- package/es/data-grid/modules/side-bar/sideBar/common/toolPanelColDefService.js +216 -0
- package/es/data-grid/modules/side-bar/sideBar/horizontalResizeComp.d.ts +19 -0
- package/es/data-grid/modules/side-bar/sideBar/horizontalResizeComp.js +108 -0
- package/es/data-grid/modules/side-bar/sideBar/sideBarButtonComp.d.ts +16 -0
- package/es/data-grid/modules/side-bar/sideBar/sideBarButtonComp.js +84 -0
- package/es/data-grid/modules/side-bar/sideBar/sideBarButtonsComp.d.ts +18 -0
- package/es/data-grid/modules/side-bar/sideBar/sideBarButtonsComp.js +89 -0
- package/es/data-grid/modules/side-bar/sideBar/sideBarComp.d.ts +28 -0
- package/es/data-grid/modules/side-bar/sideBar/sideBarComp.js +325 -0
- package/es/data-grid/modules/side-bar/sideBar/sideBarDefParser.d.ts +10 -0
- package/es/data-grid/modules/side-bar/sideBar/sideBarDefParser.js +95 -0
- package/es/data-grid/modules/side-bar/sideBar/toolPanelWrapper.d.ts +17 -0
- package/es/data-grid/modules/side-bar/sideBar/toolPanelWrapper.js +103 -0
- package/es/data-grid/modules/side-bar/sideBarModule.d.ts +2 -0
- package/es/data-grid/modules/side-bar/sideBarModule.js +22 -0
- package/es/data-grid/modules/side-bar/version.d.ts +1 -0
- package/es/data-grid/modules/side-bar/version.js +2 -0
- package/es/data-grid/renderer/actions-renderer.d.ts +3 -0
- package/es/data-grid/renderer/actions-renderer.js +50 -0
- package/es/data-grid/renderer/actions.d.ts +11 -0
- package/es/data-grid/renderer/actions.js +72 -0
- package/es/data-grid/renderer/cell-delete-renderer.d.ts +5 -0
- package/es/data-grid/renderer/cell-delete-renderer.js +49 -0
- package/es/data-grid/renderer/cell-index-renderer.d.ts +4 -0
- package/es/data-grid/renderer/cell-index-renderer.js +43 -0
- package/es/data-grid/renderer/cell-renderer.d.ts +4 -0
- package/es/data-grid/renderer/cell-renderer.js +58 -0
- package/es/data-grid/renderer/detali-cell-renderer.d.ts +9 -0
- package/es/data-grid/renderer/detali-cell-renderer.js +59 -0
- package/es/data-grid/renderer/header-renderer.d.ts +6 -0
- package/es/data-grid/renderer/header-renderer.js +98 -0
- package/es/data-grid/typings.d.ts +226 -0
- package/es/data-grid/typings.js +1 -0
- package/es/data-grid/utils.d.ts +51 -0
- package/es/data-grid/utils.js +293 -0
- package/es/dropdown/index.d.ts +14 -0
- package/es/dropdown/index.js +42 -0
- package/es/dropdown/index.less +5 -0
- package/es/{DurationPicker → duration-picker}/index.d.ts +12 -9
- package/es/duration-picker/index.js +204 -0
- package/es/duration-picker/index.less +12 -0
- package/es/{EditableTable/EditableCell.d.ts → editable-table/editable-cell.d.ts} +1 -1
- package/es/editable-table/editable-cell.js +41 -0
- package/es/{EditableTable/EditableTableFormItem.d.ts → editable-table/editable-table-form-item.d.ts} +1 -1
- package/es/{EditableTable/EditableTableFormItem.js → editable-table/editable-table-form-item.js} +3 -5
- package/es/{EditableTable → editable-table}/index.d.ts +3 -3
- package/es/editable-table/index.js +8 -0
- package/es/{EditableTable/Table.d.ts → editable-table/table.d.ts} +1 -1
- package/es/{EditableTable/Table.js → editable-table/table.js} +27 -22
- package/es/{EditableTable → editable-table}/typings.d.ts +2 -2
- package/es/editable-table/util.js +311 -0
- package/es/empty-image/index.d.ts +2 -0
- package/es/empty-image/index.js +78 -0
- package/es/{Filter → filter}/index.d.ts +3 -3
- package/es/filter/index.js +615 -0
- package/es/{Filter → filter}/index.less +5 -5
- package/es/filter/typings.d.ts +70 -0
- package/es/{FormLayout → form-layout}/index.d.ts +5 -0
- package/es/form-layout/index.js +48 -0
- package/es/{FormLayout → form-layout}/index.less +21 -8
- package/es/grey-panel/index.d.ts +6 -0
- package/es/grey-panel/index.js +15 -0
- package/es/grey-panel/index.less +11 -0
- package/es/icons/add.d.ts +6 -0
- package/es/icons/add.js +39 -0
- package/es/{Icons/BigTip → icons/big-tip}/index.d.ts +1 -1
- package/es/{Icons/BigTip → icons/big-tip}/index.js +6 -8
- package/es/{Icons/Down.d.ts → icons/calendar.d.ts} +1 -1
- package/es/icons/calendar.js +35 -0
- package/es/icons/clear.d.ts +3 -0
- package/es/icons/clear.js +18 -0
- package/es/icons/clock.d.ts +5 -0
- package/es/icons/clock.js +27 -0
- package/es/icons/close-light.d.ts +5 -0
- package/es/icons/close-light.js +31 -0
- package/es/{Icons/Close.d.ts → icons/close.d.ts} +1 -1
- package/es/icons/close.js +22 -0
- package/es/{Icons/CollapseUp.d.ts → icons/collapse-up.d.ts} +1 -1
- package/es/icons/collapse-up.js +24 -0
- package/es/{Icons/Search.d.ts → icons/dark-search.d.ts} +1 -1
- package/es/{Icons/DarkSearch.js → icons/dark-search.js} +3 -5
- package/es/icons/delete.d.ts +3 -0
- package/es/icons/delete.js +37 -0
- package/es/icons/down.d.ts +3 -0
- package/es/icons/down.js +18 -0
- package/es/icons/drag/drag.svg +7 -0
- package/es/icons/drag/index.d.ts +3 -0
- package/es/icons/drag/index.js +31 -0
- package/es/{Icons/Empty.d.ts → icons/empty.d.ts} +1 -0
- package/es/icons/index.d.ts +45 -0
- package/es/icons/index.js +45 -0
- package/es/{Icons/LookUp.d.ts → icons/look-up.d.ts} +1 -1
- package/es/{Icons/LookUp.js → icons/look-up.js} +3 -5
- package/es/icons/more.d.ts +3 -0
- package/es/icons/more.js +37 -0
- package/es/icons/new-tag.d.ts +3 -0
- package/es/icons/new-tag.js +19 -0
- package/es/icons/plus/index.d.ts +3 -0
- package/es/icons/plus/index.js +27 -0
- package/es/icons/plus/plus.svg +6 -0
- package/es/icons/question.d.ts +3 -0
- package/es/icons/question.js +18 -0
- package/es/icons/reload.d.ts +3 -0
- package/es/icons/reload.js +18 -0
- package/es/icons/search.d.ts +3 -0
- package/es/icons/search.js +18 -0
- package/es/icons/tip.d.ts +5 -0
- package/es/{Icons/Tip.js → icons/tip.js} +64 -75
- package/es/index.d.ts +43 -32
- package/es/index.js +36 -28
- package/es/input-compact/index.d.ts +11 -0
- package/es/input-compact/index.js +63 -0
- package/es/input-compact/index.less +33 -0
- package/es/input-number/index.d.ts +8 -0
- package/es/input-number/index.js +35 -0
- package/es/input-number/index.less +58 -0
- package/es/{Layout → layout}/index.d.ts +26 -8
- package/es/layout/index.js +253 -0
- package/es/{Layout → layout}/index.less +43 -25
- package/es/{PageLoading → page-loading}/index.d.ts +2 -1
- package/es/{PageLoading → page-loading}/index.js +5 -3
- package/es/popup/index.d.ts +80 -0
- package/es/popup/index.js +260 -0
- package/es/popup/index.less +34 -0
- package/es/portal/index.d.ts +18 -0
- package/es/{Portal → portal}/index.js +48 -14
- package/es/{Section → section}/index.d.ts +10 -2
- package/es/section/index.js +99 -0
- package/es/{Section → section}/index.less +22 -6
- package/es/{Section/TabBar.d.ts → section/tab-bar.d.ts} +2 -1
- package/es/{Section/TabBar.js → section/tab-bar.js} +6 -3
- package/es/select-panel/index.d.ts +17 -0
- package/es/select-panel/index.js +63 -0
- package/es/select-panel/index.less +112 -0
- package/es/select-view/index.d.ts +63 -0
- package/es/select-view/index.js +269 -0
- package/es/select-view/index.less +57 -0
- package/es/{SiderTree → sider-tree}/index.d.ts +6 -12
- package/es/{SiderTree → sider-tree}/index.js +58 -82
- package/es/sider-tree/index.less +151 -0
- package/es/{SiderTree/TreeNodeTitle.js → sider-tree/tree-node-title.js} +13 -10
- package/es/{SiderTree → sider-tree}/typings.d.ts +2 -2
- package/es/state/index.d.ts +8 -0
- package/es/state/index.js +20 -0
- package/es/state/index.less +131 -0
- package/es/styles/empty.png +0 -0
- package/es/styles/index.less +28 -0
- package/es/styles/overrides.less +347 -0
- package/es/styles/theme.less +29 -0
- package/es/{utils.less → styles/utils.less} +18 -18
- package/es/symbol-icon/index.js +30 -0
- package/es/{TabBar → tab-bar}/index.d.ts +2 -3
- package/es/tab-bar/index.js +31 -0
- package/es/tab-bar/index.less +5 -0
- package/es/table/index.js +201 -0
- package/es/{Table → table}/typings.d.ts +2 -3
- package/es/{Table → table}/utils.d.ts +1 -1
- package/es/tip-mark/index.d.ts +8 -0
- package/es/tip-mark/index.js +44 -0
- package/es/utils.d.ts +2 -1
- package/es/utils.js +10 -2
- package/package.json +50 -21
- package/README.md +0 -11
- package/es/Dropdown/index.d.ts +0 -15
- package/es/Dropdown/index.js +0 -45
- package/es/Dropdown/index.less +0 -13
- package/es/DurationPicker/index.js +0 -174
- package/es/DurationPicker/index.less +0 -61
- package/es/EditableTable/EditableCell.js +0 -41
- package/es/EditableTable/index.js +0 -8
- package/es/EditableTable/util.js +0 -311
- package/es/Filter/index.js +0 -555
- package/es/Filter/typings.d.ts +0 -37
- package/es/FormHorizontal/index.d.ts +0 -6
- package/es/FormHorizontal/index.js +0 -30
- package/es/FormHorizontal/index.less +0 -14
- package/es/FormInline/index.d.ts +0 -15
- package/es/FormInline/index.js +0 -74
- package/es/FormInline/index.less +0 -26
- package/es/FormLayout/index.js +0 -36
- package/es/FormTable/index.d.ts +0 -6
- package/es/FormTable/index.js +0 -125
- package/es/FormTable/index.less +0 -11
- package/es/FormTable/typings.d.ts +0 -38
- package/es/Icons/Calendar.d.ts +0 -5
- package/es/Icons/Calendar.js +0 -42
- package/es/Icons/Close.js +0 -24
- package/es/Icons/CollapseUp.js +0 -26
- package/es/Icons/DarkSearch.d.ts +0 -5
- package/es/Icons/Down.js +0 -30
- package/es/Icons/More.d.ts +0 -5
- package/es/Icons/More.js +0 -39
- package/es/Icons/Search.js +0 -30
- package/es/Icons/Tip.d.ts +0 -6
- package/es/Icons/index.d.ts +0 -24
- package/es/Icons/index.js +0 -25
- package/es/InputMaxLength/index.d.ts +0 -14
- package/es/InputMaxLength/index.js +0 -72
- package/es/InputMaxLength/index.less +0 -8
- package/es/Layout/index.js +0 -184
- package/es/MainFramework/components/DropMenu/index.d.ts +0 -11
- package/es/MainFramework/components/DropMenu/index.js +0 -93
- package/es/MainFramework/components/DropMenu/index.less +0 -59
- package/es/MainFramework/components/Menu/index.d.ts +0 -10
- package/es/MainFramework/components/Menu/index.js +0 -603
- package/es/MainFramework/components/Menu/index.less +0 -445
- package/es/MainFramework/components/RefreshButton/index.d.ts +0 -6
- package/es/MainFramework/components/RefreshButton/index.js +0 -63
- package/es/MainFramework/components/RefreshButton/index.less +0 -30
- package/es/MainFramework/components/TabBar/index.d.ts +0 -10
- package/es/MainFramework/components/TabBar/index.js +0 -101
- package/es/MainFramework/components/TabBar/index.less +0 -155
- package/es/MainFramework/components/WaterMark/index.d.ts +0 -6
- package/es/MainFramework/components/WaterMark/index.js +0 -65
- package/es/MainFramework/index.d.ts +0 -28
- package/es/MainFramework/index.js +0 -78
- package/es/MainFramework/index.less +0 -97
- package/es/MainFramework/typings.d.ts +0 -10
- package/es/Popup/index.d.ts +0 -39
- package/es/Popup/index.js +0 -180
- package/es/Popup/index.less +0 -12
- package/es/Portal/index.d.ts +0 -17
- package/es/Section/index.js +0 -90
- package/es/SelectView/index.d.ts +0 -56
- package/es/SelectView/index.js +0 -227
- package/es/SelectView/index.less +0 -60
- package/es/SiderTree/index.less +0 -222
- package/es/SymbolIcon/index.js +0 -27
- package/es/TabBar/index.js +0 -42
- package/es/TabBar/index.less +0 -31
- package/es/Table/index.js +0 -205
- package/es/TipMark/index.d.ts +0 -10
- package/es/TipMark/index.js +0 -35
- package/es/TipMark/index.less +0 -6
- package/es/index.less +0 -26
- package/es/init.d.ts +0 -3
- package/es/init.js +0 -134
- package/es/overrides.less +0 -183
- package/es/theme.less +0 -9
- /package/es/{BaseTable/Actions.d.ts → base-table/actions.d.ts} +0 -0
- /package/es/{BaseTable/BaseTableContext.d.ts → base-table/base-table-context.d.ts} +0 -0
- /package/es/{BaseTable/BaseTableContext.js → base-table/base-table-context.js} +0 -0
- /package/es/{BaseTable → base-table}/empty.png +0 -0
- /package/es/{BaseTable → base-table}/index.less +0 -0
- /package/es/{BaseTable/ResizeHeaderCell.d.ts → base-table/resize-header-cell.d.ts} +0 -0
- /package/es/{BaseTable → base-table}/typings.d.ts +0 -0
- /package/es/{BaseTable → base-table}/utils.js +0 -0
- /package/es/{BaseTable/VirtualBody.d.ts → base-table/virtual-body.d.ts} +0 -0
- /package/es/{ColorPicker → color-picker}/index.d.ts +0 -0
- /package/es/{EditableTable → editable-table}/index.less +0 -0
- /package/es/{EditableTable → editable-table}/util.d.ts +0 -0
- /package/es/{Icons/BigTip → icons/big-tip}/error.png +0 -0
- /package/es/{Icons/BigTip → icons/big-tip}/info.png +0 -0
- /package/es/{Icons/BigTip → icons/big-tip}/success.png +0 -0
- /package/es/{Icons/BigTip → icons/big-tip}/warning.png +0 -0
- /package/es/{Icons/Empty.js → icons/empty.js} +0 -0
- /package/es/{PageLoading → page-loading}/index.less +0 -0
- /package/es/{SiderTree → sider-tree}/empty.png +0 -0
- /package/es/{SiderTree/TreeNodeTitle.d.ts → sider-tree/tree-node-title.d.ts} +0 -0
- /package/es/{SymbolIcon → symbol-icon}/index.d.ts +0 -0
- /package/es/{SymbolIcon → symbol-icon}/index.less +0 -0
- /package/es/{Table → table}/index.d.ts +0 -0
- /package/es/{Table → table}/utils.js +0 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2
|
+
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
+
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); }
|
|
7
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
8
|
+
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); }; }
|
|
9
|
+
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); }
|
|
10
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
13
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
|
+
var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length,
|
|
16
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
17
|
+
d;
|
|
18
|
+
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--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
19
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
|
+
};
|
|
21
|
+
import { DragSourceType, Component, Autowired, Events, TouchListener, DragAndDropService, PostConstruct, Column, RefSelector, Optional, VirtualList, KeyCode, _ } from "@ag-grid-community/core";
|
|
22
|
+
export var DropZoneColumnComp = /*#__PURE__*/function (_Component) {
|
|
23
|
+
_inherits(DropZoneColumnComp, _Component);
|
|
24
|
+
var _super = _createSuper(DropZoneColumnComp);
|
|
25
|
+
function DropZoneColumnComp(column, dragSourceDropTarget, ghost, dropZonePurpose, horizontal) {
|
|
26
|
+
var _this;
|
|
27
|
+
_classCallCheck(this, DropZoneColumnComp);
|
|
28
|
+
_this = _super.call(this);
|
|
29
|
+
_this.column = column;
|
|
30
|
+
_this.dragSourceDropTarget = dragSourceDropTarget;
|
|
31
|
+
_this.ghost = ghost;
|
|
32
|
+
_this.dropZonePurpose = dropZonePurpose;
|
|
33
|
+
_this.horizontal = horizontal;
|
|
34
|
+
_this.popupShowing = false;
|
|
35
|
+
return _this;
|
|
36
|
+
}
|
|
37
|
+
_createClass(DropZoneColumnComp, [{
|
|
38
|
+
key: "init",
|
|
39
|
+
value: function init() {
|
|
40
|
+
var _this2 = this;
|
|
41
|
+
this.setTemplate(DropZoneColumnComp.TEMPLATE);
|
|
42
|
+
var eGui = this.getGui();
|
|
43
|
+
var isFunctionsReadOnly = this.gridOptionsService.is('functionsReadOnly');
|
|
44
|
+
this.addElementClasses(eGui);
|
|
45
|
+
this.addElementClasses(this.eDragHandle, 'drag-handle');
|
|
46
|
+
this.addElementClasses(this.eText, 'text');
|
|
47
|
+
this.addElementClasses(this.eButton, 'button');
|
|
48
|
+
this.eDragHandle.appendChild(_.createIconNoSpan('columnDrag', this.gridOptionsService));
|
|
49
|
+
this.eButton.appendChild(_.createIconNoSpan('cancel', this.gridOptionsService));
|
|
50
|
+
this.setupSort();
|
|
51
|
+
this.displayName = this.columnModel.getDisplayNameForColumn(this.column, 'columnDrop');
|
|
52
|
+
this.setupComponents();
|
|
53
|
+
if (!this.ghost && !isFunctionsReadOnly) {
|
|
54
|
+
this.addDragSource();
|
|
55
|
+
}
|
|
56
|
+
this.setupAria();
|
|
57
|
+
this.addManagedListener(this.eventService, Column.EVENT_SORT_CHANGED, function () {
|
|
58
|
+
_this2.setupAria();
|
|
59
|
+
});
|
|
60
|
+
this.setupTooltip();
|
|
61
|
+
}
|
|
62
|
+
}, {
|
|
63
|
+
key: "setupAria",
|
|
64
|
+
value: function setupAria() {
|
|
65
|
+
var translate = this.localeService.getLocaleTextFunc();
|
|
66
|
+
var _this$getColumnAndAgg = this.getColumnAndAggFuncName(),
|
|
67
|
+
name = _this$getColumnAndAgg.name,
|
|
68
|
+
aggFuncName = _this$getColumnAndAgg.aggFuncName;
|
|
69
|
+
var aggSeparator = translate('ariaDropZoneColumnComponentAggFuncSeperator', ' of ');
|
|
70
|
+
var sortDirection = {
|
|
71
|
+
asc: translate('ariaDropZoneColumnComponentSortAscending', 'ascending'),
|
|
72
|
+
desc: translate('ariaDropZoneColumnComponentSortDescending', 'descending')
|
|
73
|
+
};
|
|
74
|
+
var columnSort = this.column.getSort();
|
|
75
|
+
var isSortSuppressed = this.gridOptionsService.is('rowGroupPanelSuppressSort');
|
|
76
|
+
var ariaInstructions = [[aggFuncName && "".concat(aggFuncName).concat(aggSeparator), name, this.isGroupingZone() && !isSortSuppressed && columnSort && ", ".concat(sortDirection[columnSort])].filter(function (part) {
|
|
77
|
+
return !!part;
|
|
78
|
+
}).join('')];
|
|
79
|
+
var isFunctionsReadOnly = this.gridOptionsService.is('functionsReadOnly');
|
|
80
|
+
if (this.isAggregationZone() && !isFunctionsReadOnly) {
|
|
81
|
+
var aggregationMenuAria = translate('ariaDropZoneColumnValueItemDescription', 'Press ENTER to change the aggregation type');
|
|
82
|
+
ariaInstructions.push(aggregationMenuAria);
|
|
83
|
+
}
|
|
84
|
+
if (this.isGroupingZone() && this.column.getColDef().sortable && !isSortSuppressed) {
|
|
85
|
+
var sortProgressAria = translate('ariaDropZoneColumnGroupItemDescription', 'Press ENTER to sort');
|
|
86
|
+
ariaInstructions.push(sortProgressAria);
|
|
87
|
+
}
|
|
88
|
+
var deleteAria = translate('ariaDropZoneColumnComponentDescription', 'Press DELETE to remove');
|
|
89
|
+
ariaInstructions.push(deleteAria);
|
|
90
|
+
_.setAriaLabel(this.getGui(), ariaInstructions.join('. '));
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
key: "setupTooltip",
|
|
94
|
+
value: function setupTooltip() {
|
|
95
|
+
var _this3 = this;
|
|
96
|
+
var refresh = function refresh() {
|
|
97
|
+
var newTooltipText = _this3.column.getColDef().headerTooltip;
|
|
98
|
+
_this3.setTooltip(newTooltipText);
|
|
99
|
+
};
|
|
100
|
+
refresh();
|
|
101
|
+
this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, refresh);
|
|
102
|
+
}
|
|
103
|
+
}, {
|
|
104
|
+
key: "setupSort",
|
|
105
|
+
value: function setupSort() {
|
|
106
|
+
var _this4 = this;
|
|
107
|
+
var canSort = this.column.getColDef().sortable;
|
|
108
|
+
var isGroupingZone = this.isGroupingZone();
|
|
109
|
+
if (!canSort || !isGroupingZone) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (!this.gridOptionsService.is('rowGroupPanelSuppressSort')) {
|
|
113
|
+
this.eSortIndicator.setupSort(this.column, true);
|
|
114
|
+
var performSort = function performSort(event) {
|
|
115
|
+
event.preventDefault();
|
|
116
|
+
var sortUsingCtrl = _this4.gridOptionsService.get('multiSortKey') === 'ctrl';
|
|
117
|
+
var multiSort = sortUsingCtrl ? event.ctrlKey || event.metaKey : event.shiftKey;
|
|
118
|
+
_this4.sortController.progressSort(_this4.column, multiSort, 'uiColumnSorted');
|
|
119
|
+
};
|
|
120
|
+
this.addGuiEventListener('click', performSort);
|
|
121
|
+
this.addGuiEventListener('keydown', function (e) {
|
|
122
|
+
var isEnter = e.key === KeyCode.ENTER;
|
|
123
|
+
if (isEnter && _this4.isGroupingZone()) {
|
|
124
|
+
performSort(e);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}, {
|
|
130
|
+
key: "addDragSource",
|
|
131
|
+
value: function addDragSource() {
|
|
132
|
+
var _this5 = this;
|
|
133
|
+
var dragSource = {
|
|
134
|
+
type: DragSourceType.ToolPanel,
|
|
135
|
+
eElement: this.eDragHandle,
|
|
136
|
+
defaultIconName: DragAndDropService.ICON_HIDE,
|
|
137
|
+
getDragItem: function getDragItem() {
|
|
138
|
+
return _this5.createDragItem();
|
|
139
|
+
},
|
|
140
|
+
dragItemName: this.displayName,
|
|
141
|
+
dragSourceDropTarget: this.dragSourceDropTarget
|
|
142
|
+
};
|
|
143
|
+
this.dragAndDropService.addDragSource(dragSource, true);
|
|
144
|
+
this.addDestroyFunc(function () {
|
|
145
|
+
return _this5.dragAndDropService.removeDragSource(dragSource);
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}, {
|
|
149
|
+
key: "createDragItem",
|
|
150
|
+
value: function createDragItem() {
|
|
151
|
+
var visibleState = {};
|
|
152
|
+
visibleState[this.column.getId()] = this.column.isVisible();
|
|
153
|
+
return {
|
|
154
|
+
columns: [this.column],
|
|
155
|
+
visibleState: visibleState
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}, {
|
|
159
|
+
key: "setupComponents",
|
|
160
|
+
value: function setupComponents() {
|
|
161
|
+
this.setTextValue();
|
|
162
|
+
this.setupRemove();
|
|
163
|
+
if (this.ghost) {
|
|
164
|
+
this.addCssClass('ag-column-drop-cell-ghost');
|
|
165
|
+
}
|
|
166
|
+
if (this.isAggregationZone() && !this.gridOptionsService.is('functionsReadOnly')) {
|
|
167
|
+
this.addGuiEventListener('click', this.onShowAggFuncSelection.bind(this));
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}, {
|
|
171
|
+
key: "setupRemove",
|
|
172
|
+
value: function setupRemove() {
|
|
173
|
+
var _this6 = this;
|
|
174
|
+
_.setDisplayed(this.eButton, !this.gridOptionsService.is('functionsReadOnly'));
|
|
175
|
+
var agEvent = {
|
|
176
|
+
type: DropZoneColumnComp.EVENT_COLUMN_REMOVE
|
|
177
|
+
};
|
|
178
|
+
this.addGuiEventListener('keydown', function (e) {
|
|
179
|
+
var isEnter = e.key === KeyCode.ENTER;
|
|
180
|
+
var isDelete = e.key === KeyCode.DELETE;
|
|
181
|
+
if (isDelete) {
|
|
182
|
+
e.preventDefault();
|
|
183
|
+
_this6.dispatchEvent(agEvent);
|
|
184
|
+
}
|
|
185
|
+
if (isEnter && _this6.isAggregationZone() && !_this6.gridOptionsService.is('functionsReadOnly')) {
|
|
186
|
+
e.preventDefault();
|
|
187
|
+
_this6.onShowAggFuncSelection();
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
this.addManagedListener(this.eButton, 'click', function (mouseEvent) {
|
|
191
|
+
_this6.dispatchEvent(agEvent);
|
|
192
|
+
mouseEvent.stopPropagation();
|
|
193
|
+
});
|
|
194
|
+
var touchListener = new TouchListener(this.eButton);
|
|
195
|
+
this.addManagedListener(touchListener, TouchListener.EVENT_TAP, function () {
|
|
196
|
+
_this6.dispatchEvent(agEvent);
|
|
197
|
+
});
|
|
198
|
+
this.addDestroyFunc(touchListener.destroy.bind(touchListener));
|
|
199
|
+
}
|
|
200
|
+
}, {
|
|
201
|
+
key: "getColumnAndAggFuncName",
|
|
202
|
+
value: function getColumnAndAggFuncName() {
|
|
203
|
+
var name = this.displayName;
|
|
204
|
+
var aggFuncName = '';
|
|
205
|
+
if (this.isAggregationZone()) {
|
|
206
|
+
var aggFunc = this.column.getAggFunc();
|
|
207
|
+
// if aggFunc is a string, we can use it, but if it's a function, then we swap with 'func'
|
|
208
|
+
var aggFuncString = typeof aggFunc === 'string' ? aggFunc : 'agg';
|
|
209
|
+
var localeTextFunc = this.localeService.getLocaleTextFunc();
|
|
210
|
+
aggFuncName = localeTextFunc(aggFuncString, aggFuncString);
|
|
211
|
+
}
|
|
212
|
+
return {
|
|
213
|
+
name: name,
|
|
214
|
+
aggFuncName: aggFuncName
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
}, {
|
|
218
|
+
key: "setTextValue",
|
|
219
|
+
value: function setTextValue() {
|
|
220
|
+
var _this$getColumnAndAgg2 = this.getColumnAndAggFuncName(),
|
|
221
|
+
name = _this$getColumnAndAgg2.name,
|
|
222
|
+
aggFuncName = _this$getColumnAndAgg2.aggFuncName;
|
|
223
|
+
var displayValue = this.isAggregationZone() ? "".concat(aggFuncName, "(").concat(name, ")") : name;
|
|
224
|
+
var displayValueSanitised = _.escapeString(displayValue);
|
|
225
|
+
this.eText.innerHTML = displayValueSanitised;
|
|
226
|
+
}
|
|
227
|
+
}, {
|
|
228
|
+
key: "onShowAggFuncSelection",
|
|
229
|
+
value: function onShowAggFuncSelection() {
|
|
230
|
+
var _this7 = this;
|
|
231
|
+
if (this.popupShowing) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
this.popupShowing = true;
|
|
235
|
+
var virtualList = new VirtualList('select-agg-func');
|
|
236
|
+
var rows = this.aggFuncService.getFuncNames(this.column);
|
|
237
|
+
var eGui = this.getGui();
|
|
238
|
+
var virtualListGui = virtualList.getGui();
|
|
239
|
+
virtualList.setModel({
|
|
240
|
+
getRow: function getRow(index) {
|
|
241
|
+
return rows[index];
|
|
242
|
+
},
|
|
243
|
+
getRowCount: function getRowCount() {
|
|
244
|
+
return rows.length;
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
this.getContext().createBean(virtualList);
|
|
248
|
+
var ePopup = _.loadTemplate( /* html*/"<div class=\"ag-select-agg-func-popup\"></div>");
|
|
249
|
+
ePopup.style.top = '0px';
|
|
250
|
+
ePopup.style.left = '0px';
|
|
251
|
+
ePopup.appendChild(virtualListGui);
|
|
252
|
+
// ePopup.style.height = this.gridOptionsService.getAggFuncPopupHeight() + 'px';
|
|
253
|
+
ePopup.style.width = "".concat(eGui.clientWidth, "px");
|
|
254
|
+
var popupHiddenFunc = function popupHiddenFunc() {
|
|
255
|
+
_this7.destroyBean(virtualList);
|
|
256
|
+
_this7.popupShowing = false;
|
|
257
|
+
eGui.focus();
|
|
258
|
+
};
|
|
259
|
+
var translate = this.localeService.getLocaleTextFunc();
|
|
260
|
+
var addPopupRes = this.popupService.addPopup({
|
|
261
|
+
modal: true,
|
|
262
|
+
eChild: ePopup,
|
|
263
|
+
closeOnEsc: true,
|
|
264
|
+
closedCallback: popupHiddenFunc,
|
|
265
|
+
ariaLabel: translate('ariaLabelAggregationFunction', 'Aggregation Function')
|
|
266
|
+
});
|
|
267
|
+
if (addPopupRes) {
|
|
268
|
+
virtualList.setComponentCreator(this.createAggSelect.bind(this, addPopupRes.hideFunc));
|
|
269
|
+
}
|
|
270
|
+
virtualList.addGuiEventListener('keydown', function (e) {
|
|
271
|
+
if (e.key === KeyCode.ENTER || e.key === KeyCode.SPACE) {
|
|
272
|
+
var row = virtualList.getLastFocusedRow();
|
|
273
|
+
if (row == null) {
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
var comp = virtualList.getComponentAt(row);
|
|
277
|
+
if (comp) {
|
|
278
|
+
comp.selectItem();
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
this.popupService.positionPopupByComponent({
|
|
283
|
+
type: 'aggFuncSelect',
|
|
284
|
+
eventSource: eGui,
|
|
285
|
+
ePopup: ePopup,
|
|
286
|
+
keepWithinBounds: true,
|
|
287
|
+
column: this.column,
|
|
288
|
+
position: 'under'
|
|
289
|
+
});
|
|
290
|
+
virtualList.refresh();
|
|
291
|
+
var rowToFocus = rows.findIndex(function (r) {
|
|
292
|
+
return r === _this7.column.getAggFunc();
|
|
293
|
+
});
|
|
294
|
+
if (rowToFocus === -1) {
|
|
295
|
+
rowToFocus = 0;
|
|
296
|
+
}
|
|
297
|
+
virtualList.focusRow(rowToFocus);
|
|
298
|
+
}
|
|
299
|
+
}, {
|
|
300
|
+
key: "createAggSelect",
|
|
301
|
+
value: function createAggSelect(hidePopup, value) {
|
|
302
|
+
var _this8 = this;
|
|
303
|
+
var itemSelected = function itemSelected() {
|
|
304
|
+
hidePopup();
|
|
305
|
+
if (_this8.gridOptionsService.is('functionsPassive')) {
|
|
306
|
+
var event = {
|
|
307
|
+
type: Events.EVENT_COLUMN_AGG_FUNC_CHANGE_REQUEST,
|
|
308
|
+
columns: [_this8.column],
|
|
309
|
+
aggFunc: value
|
|
310
|
+
};
|
|
311
|
+
_this8.eventService.dispatchEvent(event);
|
|
312
|
+
} else {
|
|
313
|
+
_this8.columnModel.setColumnAggFunc(_this8.column, value, "toolPanelDragAndDrop");
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
var localeTextFunc = this.localeService.getLocaleTextFunc();
|
|
317
|
+
var aggFuncString = value.toString();
|
|
318
|
+
var aggFuncStringTranslated = localeTextFunc(aggFuncString, aggFuncString);
|
|
319
|
+
var comp = new AggItemComp(itemSelected, aggFuncStringTranslated);
|
|
320
|
+
return comp;
|
|
321
|
+
}
|
|
322
|
+
}, {
|
|
323
|
+
key: "addElementClasses",
|
|
324
|
+
value: function addElementClasses(el, suffix) {
|
|
325
|
+
suffix = suffix ? "-".concat(suffix) : '';
|
|
326
|
+
var direction = this.horizontal ? 'horizontal' : 'vertical';
|
|
327
|
+
el.classList.add("ag-column-drop-cell".concat(suffix), "ag-column-drop-".concat(direction, "-cell").concat(suffix));
|
|
328
|
+
}
|
|
329
|
+
}, {
|
|
330
|
+
key: "isAggregationZone",
|
|
331
|
+
value: function isAggregationZone() {
|
|
332
|
+
return this.dropZonePurpose === 'aggregation';
|
|
333
|
+
}
|
|
334
|
+
}, {
|
|
335
|
+
key: "isGroupingZone",
|
|
336
|
+
value: function isGroupingZone() {
|
|
337
|
+
return this.dropZonePurpose === 'rowGroup';
|
|
338
|
+
}
|
|
339
|
+
}]);
|
|
340
|
+
return DropZoneColumnComp;
|
|
341
|
+
}(Component);
|
|
342
|
+
DropZoneColumnComp.EVENT_COLUMN_REMOVE = 'columnRemove';
|
|
343
|
+
DropZoneColumnComp.TEMPLATE = "<span role=\"option\" tabindex=\"0\">\n <span ref=\"eDragHandle\" class=\"ag-drag-handle ag-column-drop-cell-drag-handle\" role=\"presentation\"></span>\n <span ref=\"eText\" class=\"ag-column-drop-cell-text\" aria-hidden=\"true\"></span>\n <ag-sort-indicator ref=\"eSortIndicator\"></ag-sort-indicator>\n <span ref=\"eButton\" class=\"ag-column-drop-cell-button\" role=\"presentation\"></span>\n </span>";
|
|
344
|
+
__decorate([Autowired('dragAndDropService')], DropZoneColumnComp.prototype, "dragAndDropService", void 0);
|
|
345
|
+
__decorate([Autowired('columnModel')], DropZoneColumnComp.prototype, "columnModel", void 0);
|
|
346
|
+
__decorate([Autowired('popupService')], DropZoneColumnComp.prototype, "popupService", void 0);
|
|
347
|
+
__decorate([Optional('aggFuncService')], DropZoneColumnComp.prototype, "aggFuncService", void 0);
|
|
348
|
+
__decorate([Autowired('sortController')], DropZoneColumnComp.prototype, "sortController", void 0);
|
|
349
|
+
__decorate([RefSelector('eText')], DropZoneColumnComp.prototype, "eText", void 0);
|
|
350
|
+
__decorate([RefSelector('eDragHandle')], DropZoneColumnComp.prototype, "eDragHandle", void 0);
|
|
351
|
+
__decorate([RefSelector('eButton')], DropZoneColumnComp.prototype, "eButton", void 0);
|
|
352
|
+
__decorate([RefSelector('eSortIndicator')], DropZoneColumnComp.prototype, "eSortIndicator", void 0);
|
|
353
|
+
__decorate([PostConstruct], DropZoneColumnComp.prototype, "init", null);
|
|
354
|
+
var AggItemComp = /*#__PURE__*/function (_Component2) {
|
|
355
|
+
_inherits(AggItemComp, _Component2);
|
|
356
|
+
var _super2 = _createSuper(AggItemComp);
|
|
357
|
+
function AggItemComp(itemSelected, value) {
|
|
358
|
+
var _this9;
|
|
359
|
+
_classCallCheck(this, AggItemComp);
|
|
360
|
+
_this9 = _super2.call(this, /* html */"<div class=\"ag-select-agg-func-item\"/>");
|
|
361
|
+
_this9.selectItem = itemSelected;
|
|
362
|
+
_this9.getGui().innerText = value;
|
|
363
|
+
_this9.addGuiEventListener('click', _this9.selectItem);
|
|
364
|
+
return _this9;
|
|
365
|
+
}
|
|
366
|
+
return _createClass(AggItemComp);
|
|
367
|
+
}(Component);
|
package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/gridHeaderDropZones.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Component } from "@ag-grid-community/core";
|
|
2
|
+
export declare class GridHeaderDropZones extends Component {
|
|
3
|
+
private columnModel;
|
|
4
|
+
private rowGroupComp;
|
|
5
|
+
private pivotComp;
|
|
6
|
+
constructor();
|
|
7
|
+
private postConstruct;
|
|
8
|
+
private createNorthPanel;
|
|
9
|
+
private onDropPanelVisible;
|
|
10
|
+
private onRowGroupChanged;
|
|
11
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2
|
+
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
+
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); }
|
|
7
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
8
|
+
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); }; }
|
|
9
|
+
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); }
|
|
10
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
11
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
13
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
|
+
var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
|
|
15
|
+
var c = arguments.length,
|
|
16
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
17
|
+
d;
|
|
18
|
+
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--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
19
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
20
|
+
};
|
|
21
|
+
import { Autowired, Component, Events, PostConstruct, _ } from "@ag-grid-community/core";
|
|
22
|
+
import { RowGroupDropZonePanel } from "./rowGroupDropZonePanel";
|
|
23
|
+
import { PivotDropZonePanel } from "./pivotDropZonePanel";
|
|
24
|
+
export var GridHeaderDropZones = /*#__PURE__*/function (_Component) {
|
|
25
|
+
_inherits(GridHeaderDropZones, _Component);
|
|
26
|
+
var _super = _createSuper(GridHeaderDropZones);
|
|
27
|
+
function GridHeaderDropZones() {
|
|
28
|
+
_classCallCheck(this, GridHeaderDropZones);
|
|
29
|
+
return _super.call(this);
|
|
30
|
+
}
|
|
31
|
+
_createClass(GridHeaderDropZones, [{
|
|
32
|
+
key: "postConstruct",
|
|
33
|
+
value: function postConstruct() {
|
|
34
|
+
this.setGui(this.createNorthPanel());
|
|
35
|
+
this.addManagedListener(this.eventService, Events.EVENT_COLUMN_ROW_GROUP_CHANGED, this.onRowGroupChanged.bind(this));
|
|
36
|
+
this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.onRowGroupChanged.bind(this));
|
|
37
|
+
this.addManagedPropertyListener('rowGroupPanelShow', this.onRowGroupChanged.bind(this));
|
|
38
|
+
this.onRowGroupChanged();
|
|
39
|
+
}
|
|
40
|
+
}, {
|
|
41
|
+
key: "createNorthPanel",
|
|
42
|
+
value: function createNorthPanel() {
|
|
43
|
+
var topPanelGui = document.createElement('div');
|
|
44
|
+
var dropPanelVisibleListener = this.onDropPanelVisible.bind(this);
|
|
45
|
+
topPanelGui.classList.add('ag-column-drop-wrapper');
|
|
46
|
+
_.setAriaRole(topPanelGui, 'presentation');
|
|
47
|
+
this.rowGroupComp = new RowGroupDropZonePanel(true);
|
|
48
|
+
this.createManagedBean(this.rowGroupComp);
|
|
49
|
+
this.pivotComp = new PivotDropZonePanel(true);
|
|
50
|
+
this.createManagedBean(this.pivotComp);
|
|
51
|
+
topPanelGui.appendChild(this.rowGroupComp.getGui());
|
|
52
|
+
topPanelGui.appendChild(this.pivotComp.getGui());
|
|
53
|
+
this.addManagedListener(this.rowGroupComp, Component.EVENT_DISPLAYED_CHANGED, dropPanelVisibleListener);
|
|
54
|
+
this.addManagedListener(this.pivotComp, Component.EVENT_DISPLAYED_CHANGED, dropPanelVisibleListener);
|
|
55
|
+
this.onDropPanelVisible();
|
|
56
|
+
return topPanelGui;
|
|
57
|
+
}
|
|
58
|
+
}, {
|
|
59
|
+
key: "onDropPanelVisible",
|
|
60
|
+
value: function onDropPanelVisible() {
|
|
61
|
+
var bothDisplayed = this.rowGroupComp.isDisplayed() && this.pivotComp.isDisplayed();
|
|
62
|
+
this.rowGroupComp.addOrRemoveCssClass('ag-column-drop-horizontal-half-width', bothDisplayed);
|
|
63
|
+
this.pivotComp.addOrRemoveCssClass('ag-column-drop-horizontal-half-width', bothDisplayed);
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
key: "onRowGroupChanged",
|
|
67
|
+
value: function onRowGroupChanged() {
|
|
68
|
+
if (!this.rowGroupComp) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
var rowGroupPanelShow = this.gridOptionsService.get('rowGroupPanelShow');
|
|
72
|
+
if (rowGroupPanelShow === 'always') {
|
|
73
|
+
this.rowGroupComp.setDisplayed(true);
|
|
74
|
+
} else if (rowGroupPanelShow === 'onlyWhenGrouping') {
|
|
75
|
+
var grouping = !this.columnModel.isRowGroupEmpty();
|
|
76
|
+
this.rowGroupComp.setDisplayed(grouping);
|
|
77
|
+
} else {
|
|
78
|
+
this.rowGroupComp.setDisplayed(false);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}]);
|
|
82
|
+
return GridHeaderDropZones;
|
|
83
|
+
}(Component);
|
|
84
|
+
__decorate([Autowired('columnModel')], GridHeaderDropZones.prototype, "columnModel", void 0);
|
|
85
|
+
__decorate([PostConstruct], GridHeaderDropZones.prototype, "postConstruct", null);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Column, ITooltipParams, WithoutGridCommon } from "@ag-grid-community/core";
|
|
2
|
+
import { BaseDropZonePanel } from "./baseDropZonePanel";
|
|
3
|
+
export declare class PivotDropZonePanel extends BaseDropZonePanel {
|
|
4
|
+
private columnModel;
|
|
5
|
+
private loggerFactory;
|
|
6
|
+
private dragAndDropService;
|
|
7
|
+
constructor(horizontal: boolean);
|
|
8
|
+
private passBeansUp;
|
|
9
|
+
protected getAriaLabel(): string;
|
|
10
|
+
getTooltipParams(): WithoutGridCommon<ITooltipParams>;
|
|
11
|
+
private refresh;
|
|
12
|
+
private checkVisibility;
|
|
13
|
+
protected isColumnDroppable(column: Column): boolean;
|
|
14
|
+
protected updateColumns(columns: Column[]): void;
|
|
15
|
+
protected getIconName(): string;
|
|
16
|
+
protected getExistingColumns(): Column[];
|
|
17
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
2
|
+
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
3
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
+
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); }
|
|
7
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
8
|
+
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); }
|
|
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
|
+
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); }; }
|
|
11
|
+
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); }
|
|
12
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
13
|
+
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; } }
|
|
14
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
15
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
16
|
+
var __decorate = this && this.__decorate || function (decorators, target, key, desc) {
|
|
17
|
+
var c = arguments.length,
|
|
18
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
19
|
+
d;
|
|
20
|
+
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--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
import { _, Autowired, DragAndDropService, Events, PostConstruct } from "@ag-grid-community/core";
|
|
24
|
+
import { BaseDropZonePanel } from "./baseDropZonePanel";
|
|
25
|
+
export var PivotDropZonePanel = /*#__PURE__*/function (_BaseDropZonePanel) {
|
|
26
|
+
_inherits(PivotDropZonePanel, _BaseDropZonePanel);
|
|
27
|
+
var _super = _createSuper(PivotDropZonePanel);
|
|
28
|
+
function PivotDropZonePanel(horizontal) {
|
|
29
|
+
_classCallCheck(this, PivotDropZonePanel);
|
|
30
|
+
return _super.call(this, horizontal, 'pivot');
|
|
31
|
+
}
|
|
32
|
+
_createClass(PivotDropZonePanel, [{
|
|
33
|
+
key: "passBeansUp",
|
|
34
|
+
value: function passBeansUp() {
|
|
35
|
+
_get(_getPrototypeOf(PivotDropZonePanel.prototype), "setBeans", this).call(this, {
|
|
36
|
+
gridOptionsService: this.gridOptionsService,
|
|
37
|
+
eventService: this.eventService,
|
|
38
|
+
context: this.getContext(),
|
|
39
|
+
loggerFactory: this.loggerFactory,
|
|
40
|
+
dragAndDropService: this.dragAndDropService
|
|
41
|
+
});
|
|
42
|
+
var localeTextFunc = this.localeService.getLocaleTextFunc();
|
|
43
|
+
var emptyMessage = localeTextFunc('pivotColumnsEmptyMessage', 'Drag here to set column labels');
|
|
44
|
+
var title = localeTextFunc('pivots', 'Column Labels');
|
|
45
|
+
_get(_getPrototypeOf(PivotDropZonePanel.prototype), "init", this).call(this, {
|
|
46
|
+
dragAndDropIcon: DragAndDropService.ICON_GROUP,
|
|
47
|
+
icon: _.createIconNoSpan('pivotPanel', this.gridOptionsService, null),
|
|
48
|
+
emptyMessage: emptyMessage,
|
|
49
|
+
title: title
|
|
50
|
+
});
|
|
51
|
+
this.addManagedListener(this.eventService, Events.EVENT_NEW_COLUMNS_LOADED, this.refresh.bind(this));
|
|
52
|
+
this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_CHANGED, this.refresh.bind(this));
|
|
53
|
+
this.addManagedListener(this.eventService, Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, this.checkVisibility.bind(this));
|
|
54
|
+
this.refresh();
|
|
55
|
+
}
|
|
56
|
+
}, {
|
|
57
|
+
key: "getAriaLabel",
|
|
58
|
+
value: function getAriaLabel() {
|
|
59
|
+
var translate = this.localeService.getLocaleTextFunc();
|
|
60
|
+
var label = translate('ariaPivotDropZonePanelLabel', 'Column Labels');
|
|
61
|
+
return label;
|
|
62
|
+
}
|
|
63
|
+
}, {
|
|
64
|
+
key: "getTooltipParams",
|
|
65
|
+
value: function getTooltipParams() {
|
|
66
|
+
var res = _get(_getPrototypeOf(PivotDropZonePanel.prototype), "getTooltipParams", this).call(this);
|
|
67
|
+
res.location = 'pivotColumnsList';
|
|
68
|
+
return res;
|
|
69
|
+
}
|
|
70
|
+
}, {
|
|
71
|
+
key: "refresh",
|
|
72
|
+
value: function refresh() {
|
|
73
|
+
this.checkVisibility();
|
|
74
|
+
this.refreshGui();
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
key: "checkVisibility",
|
|
78
|
+
value: function checkVisibility() {
|
|
79
|
+
var pivotMode = this.columnModel.isPivotMode();
|
|
80
|
+
if (this.isHorizontal()) {
|
|
81
|
+
// what we do for horizontal (ie the pivot panel at the top) depends
|
|
82
|
+
// on the user property as well as pivotMode.
|
|
83
|
+
switch (this.gridOptionsService.get('pivotPanelShow')) {
|
|
84
|
+
case 'always':
|
|
85
|
+
this.setDisplayed(pivotMode);
|
|
86
|
+
break;
|
|
87
|
+
case 'onlyWhenPivoting':
|
|
88
|
+
var pivotActive = this.columnModel.isPivotActive();
|
|
89
|
+
this.setDisplayed(pivotMode && pivotActive);
|
|
90
|
+
break;
|
|
91
|
+
default:
|
|
92
|
+
// never show it
|
|
93
|
+
this.setDisplayed(false);
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
} else {
|
|
97
|
+
// in toolPanel, the pivot panel is always shown when pivot mode is on
|
|
98
|
+
this.setDisplayed(pivotMode);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}, {
|
|
102
|
+
key: "isColumnDroppable",
|
|
103
|
+
value: function isColumnDroppable(column) {
|
|
104
|
+
// we never allow grouping of secondary columns
|
|
105
|
+
if (this.gridOptionsService.is('functionsReadOnly') || !column.isPrimary()) {
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
return column.isAllowPivot() && !column.isPivotActive();
|
|
109
|
+
}
|
|
110
|
+
}, {
|
|
111
|
+
key: "updateColumns",
|
|
112
|
+
value: function updateColumns(columns) {
|
|
113
|
+
if (this.gridOptionsService.is('functionsPassive')) {
|
|
114
|
+
var event = {
|
|
115
|
+
type: Events.EVENT_COLUMN_PIVOT_CHANGE_REQUEST,
|
|
116
|
+
columns: columns
|
|
117
|
+
};
|
|
118
|
+
this.eventService.dispatchEvent(event);
|
|
119
|
+
} else {
|
|
120
|
+
this.columnModel.setPivotColumns(columns, "toolPanelUi");
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}, {
|
|
124
|
+
key: "getIconName",
|
|
125
|
+
value: function getIconName() {
|
|
126
|
+
return this.isPotentialDndColumns() ? DragAndDropService.ICON_PIVOT : DragAndDropService.ICON_NOT_ALLOWED;
|
|
127
|
+
}
|
|
128
|
+
}, {
|
|
129
|
+
key: "getExistingColumns",
|
|
130
|
+
value: function getExistingColumns() {
|
|
131
|
+
return this.columnModel.getPivotColumns();
|
|
132
|
+
}
|
|
133
|
+
}]);
|
|
134
|
+
return PivotDropZonePanel;
|
|
135
|
+
}(BaseDropZonePanel);
|
|
136
|
+
__decorate([Autowired('columnModel')], PivotDropZonePanel.prototype, "columnModel", void 0);
|
|
137
|
+
__decorate([Autowired('loggerFactory')], PivotDropZonePanel.prototype, "loggerFactory", void 0);
|
|
138
|
+
__decorate([Autowired('dragAndDropService')], PivotDropZonePanel.prototype, "dragAndDropService", void 0);
|
|
139
|
+
__decorate([PostConstruct], PivotDropZonePanel.prototype, "passBeansUp", null);
|
package/es/data-grid/modules/row-grouping/rowGrouping/columnDropZones/rowGroupDropZonePanel.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Column, ITooltipParams, WithoutGridCommon } from "@ag-grid-community/core";
|
|
2
|
+
import { BaseDropZonePanel } from "./baseDropZonePanel";
|
|
3
|
+
export declare class RowGroupDropZonePanel extends BaseDropZonePanel {
|
|
4
|
+
private columnModel;
|
|
5
|
+
private loggerFactory;
|
|
6
|
+
private dragAndDropService;
|
|
7
|
+
constructor(horizontal: boolean);
|
|
8
|
+
private passBeansUp;
|
|
9
|
+
protected getAriaLabel(): string;
|
|
10
|
+
getTooltipParams(): WithoutGridCommon<ITooltipParams>;
|
|
11
|
+
protected isColumnDroppable(column: Column): boolean;
|
|
12
|
+
protected updateColumns(columns: Column[]): void;
|
|
13
|
+
protected getIconName(): string;
|
|
14
|
+
protected getExistingColumns(): Column[];
|
|
15
|
+
}
|