@lemon-fe/components 0.1.154 → 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
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
function
|
|
1
|
+
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); }
|
|
2
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
3
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
4
|
+
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); }
|
|
2
5
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
6
|
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
7
|
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); }
|
|
5
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
6
|
-
function _iterableToArrayLimit(
|
|
8
|
+
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; }
|
|
9
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
7
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
11
|
import React, { useEffect, useState } from 'react';
|
|
9
12
|
import classNames from 'classnames';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
interface Props<RecordType> {
|
|
3
|
+
header: ReactNode;
|
|
4
|
+
body: ReactNode;
|
|
5
|
+
value?: RecordType[];
|
|
6
|
+
onChange?: (value: RecordType[]) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
fieldsName: {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
};
|
|
12
|
+
loading?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
}
|
|
16
|
+
export default function SelectPanel<RecordType>(props: Props<RecordType>): JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
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); }
|
|
4
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
5
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
6
|
+
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; }
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { prefixClassName } from "../utils";
|
|
9
|
+
import { Spin, Typography } from 'antd';
|
|
10
|
+
import classNames from 'classnames';
|
|
11
|
+
import { get } from 'lodash';
|
|
12
|
+
var emptyValue = [];
|
|
13
|
+
export default function SelectPanel(props) {
|
|
14
|
+
var header = props.header,
|
|
15
|
+
body = props.body,
|
|
16
|
+
_props$value = props.value,
|
|
17
|
+
value = _props$value === void 0 ? emptyValue : _props$value,
|
|
18
|
+
onChange = props.onChange,
|
|
19
|
+
fieldsName = props.fieldsName,
|
|
20
|
+
loading = props.loading,
|
|
21
|
+
style = props.style,
|
|
22
|
+
className = props.className,
|
|
23
|
+
disabled = props.disabled;
|
|
24
|
+
var prefix = prefixClassName('select-panel');
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: classNames(prefix(), className),
|
|
27
|
+
style: style
|
|
28
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
className: prefix('left')
|
|
30
|
+
}, header ? /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: prefix('header')
|
|
32
|
+
}, header) : null, body ? /*#__PURE__*/React.createElement("div", {
|
|
33
|
+
className: prefix('body')
|
|
34
|
+
}, body) : null), /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: prefix('right')
|
|
36
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
37
|
+
className: prefix('right-header')
|
|
38
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u5DF2\u9009\u62E9", value.length, "\u4E2A"), !disabled && /*#__PURE__*/React.createElement(Typography.Link, {
|
|
39
|
+
disabled: value.length === 0,
|
|
40
|
+
onClick: function onClick() {
|
|
41
|
+
onChange === null || onChange === void 0 || onChange(emptyValue);
|
|
42
|
+
}
|
|
43
|
+
}, "\u6E05\u7A7A")), /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: prefix('right-body')
|
|
45
|
+
}, value.map(function (item, idx) {
|
|
46
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
key: get(item, fieldsName.value),
|
|
48
|
+
className: prefix('item')
|
|
49
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: prefix('item-name')
|
|
51
|
+
}, get(item, fieldsName.label)), !disabled && /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: prefix('item-delete'),
|
|
53
|
+
onClick: function onClick() {
|
|
54
|
+
var newValue = _toConsumableArray(value);
|
|
55
|
+
newValue.splice(idx, 1);
|
|
56
|
+
onChange === null || onChange === void 0 || onChange(newValue);
|
|
57
|
+
}
|
|
58
|
+
}));
|
|
59
|
+
}))), loading && /*#__PURE__*/React.createElement(Spin, {
|
|
60
|
+
spinning: true,
|
|
61
|
+
className: prefix('spin')
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
.@{prefixCls}-select-panel {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: flex;
|
|
4
|
+
height: 100%;
|
|
5
|
+
|
|
6
|
+
&-spin {
|
|
7
|
+
position: absolute;
|
|
8
|
+
top: 0;
|
|
9
|
+
right: 0;
|
|
10
|
+
bottom: 0;
|
|
11
|
+
left: 0;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
background-color: rgba(255, 255, 255, 0.6);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-left {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex: 1;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
border: 1px solid @border-color-base;
|
|
24
|
+
border-radius: @border-radius-base;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&-header {
|
|
28
|
+
min-height: 36px;
|
|
29
|
+
padding: 6px 12px;
|
|
30
|
+
background: #f9f9fb;
|
|
31
|
+
border-bottom: 1px solid @border-color-split;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&-body {
|
|
35
|
+
flex: 1;
|
|
36
|
+
min-height: 0;
|
|
37
|
+
padding: 8px @padding-md;
|
|
38
|
+
overflow: auto;
|
|
39
|
+
|
|
40
|
+
.scrollBar();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&-content {
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: 100%;
|
|
46
|
+
.scrollBar();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-right {
|
|
50
|
+
display: flex;
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
width: 180px;
|
|
53
|
+
margin-left: 8px;
|
|
54
|
+
padding: 8px 0;
|
|
55
|
+
font-size: 12px;
|
|
56
|
+
line-height: 20px;
|
|
57
|
+
background: #f9f9fb;
|
|
58
|
+
border: 1px solid @border-color-base;
|
|
59
|
+
border-radius: @border-radius-base;
|
|
60
|
+
|
|
61
|
+
&-header {
|
|
62
|
+
display: flex;
|
|
63
|
+
justify-content: space-between;
|
|
64
|
+
margin-bottom: 8px;
|
|
65
|
+
padding: 0 @padding-md;
|
|
66
|
+
|
|
67
|
+
span {
|
|
68
|
+
color: rgba(102, 102, 102, 0.7);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&-body {
|
|
73
|
+
flex: 1;
|
|
74
|
+
min-height: 0;
|
|
75
|
+
padding: 0 @padding-md;
|
|
76
|
+
overflow: auto;
|
|
77
|
+
.scrollBar();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&-item {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
justify-content: space-between;
|
|
85
|
+
margin-bottom: 8px;
|
|
86
|
+
|
|
87
|
+
&-name {
|
|
88
|
+
flex: 1;
|
|
89
|
+
min-width: 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&-delete {
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
width: 12px;
|
|
97
|
+
height: 12px;
|
|
98
|
+
margin-left: 8px;
|
|
99
|
+
background-color: #bfc4ce;
|
|
100
|
+
border-radius: 50%;
|
|
101
|
+
cursor: pointer;
|
|
102
|
+
|
|
103
|
+
&::after {
|
|
104
|
+
display: block;
|
|
105
|
+
width: 6px;
|
|
106
|
+
height: 1px;
|
|
107
|
+
background: #fff;
|
|
108
|
+
content: '';
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { CSSProperties, ReactElement } from 'react';
|
|
2
|
+
import type { ColType, DataGridProps, PaginationType, SortType } from '../data-grid/typings';
|
|
3
|
+
import type { FilterProps } from '../filter/typings';
|
|
4
|
+
interface Props<RecordType, ParamsType extends Record<string, any>> extends Pick<DataGridProps<RecordType>, 'defaultColDef' | 'rowHeight' | 'cellDisplayFlex' | 'isRowSelectable'> {
|
|
5
|
+
value?: RecordType[];
|
|
6
|
+
onChange?: (value: RecordType[], rowDoubleClicked?: boolean) => void;
|
|
7
|
+
/**
|
|
8
|
+
* @description 页脚
|
|
9
|
+
*/
|
|
10
|
+
pagination?: boolean | PaginationType;
|
|
11
|
+
/**
|
|
12
|
+
* @description 是否多选
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
multiple?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @description 选择列表列设置
|
|
18
|
+
*/
|
|
19
|
+
columns: ColType<RecordType>[];
|
|
20
|
+
/**
|
|
21
|
+
* @description 已选择列表列设置
|
|
22
|
+
*/
|
|
23
|
+
selectedColumns?: ColType<RecordType>[];
|
|
24
|
+
/**
|
|
25
|
+
* @description 请求方法
|
|
26
|
+
*/
|
|
27
|
+
fetch?: (query: {
|
|
28
|
+
current: number;
|
|
29
|
+
pageSize: number;
|
|
30
|
+
sort: SortType[];
|
|
31
|
+
params: ParamsType;
|
|
32
|
+
}) => Promise<{
|
|
33
|
+
total: number;
|
|
34
|
+
data: RecordType[];
|
|
35
|
+
}>;
|
|
36
|
+
/**
|
|
37
|
+
* @description 数据源
|
|
38
|
+
*/
|
|
39
|
+
dataSource?: RecordType[];
|
|
40
|
+
/**
|
|
41
|
+
* @description 用来对本地数据进行筛选
|
|
42
|
+
*/
|
|
43
|
+
rowFilter?: (row: RecordType, params: ParamsType) => boolean;
|
|
44
|
+
rowKey: string | ((item: RecordType) => string);
|
|
45
|
+
/**
|
|
46
|
+
* @description 筛选器设置
|
|
47
|
+
*/
|
|
48
|
+
filter?: {
|
|
49
|
+
sider?: (props: {
|
|
50
|
+
value: ParamsType;
|
|
51
|
+
onChange: (value: Partial<ParamsType>) => void;
|
|
52
|
+
style?: CSSProperties;
|
|
53
|
+
}) => ReactElement;
|
|
54
|
+
} & FilterProps<ParamsType>;
|
|
55
|
+
/**
|
|
56
|
+
* 筛选参数校验,如日期范围,true: 校验通过
|
|
57
|
+
*/
|
|
58
|
+
checkSearchParams?: (params: ParamsType) => boolean;
|
|
59
|
+
loading?: boolean;
|
|
60
|
+
readOnly?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export default function SelectView<RecordType extends Record<string | number, any>, ParamsType extends Record<string, any>>(props: Props<RecordType, ParamsType>): JSX.Element;
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
7
|
+
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); }
|
|
8
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
10
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
12
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
|
+
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."); }
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
17
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
19
|
+
import DataGrid from "../data-grid";
|
|
20
|
+
import Filter from "../filter";
|
|
21
|
+
import { prefixClassName } from "../utils";
|
|
22
|
+
import { Spin, Tabs } from 'antd';
|
|
23
|
+
import { get } from 'lodash';
|
|
24
|
+
export default function SelectView(props) {
|
|
25
|
+
var emptyValue = useMemo(function () {
|
|
26
|
+
return [];
|
|
27
|
+
}, []);
|
|
28
|
+
var value = props.value,
|
|
29
|
+
onChange = props.onChange,
|
|
30
|
+
_props$pagination = props.pagination,
|
|
31
|
+
pagination = _props$pagination === void 0 ? true : _props$pagination,
|
|
32
|
+
columns = props.columns,
|
|
33
|
+
_props$selectedColumn = props.selectedColumns,
|
|
34
|
+
selectedColumns = _props$selectedColumn === void 0 ? columns : _props$selectedColumn,
|
|
35
|
+
fetch = props.fetch,
|
|
36
|
+
_props$multiple = props.multiple,
|
|
37
|
+
multiple = _props$multiple === void 0 ? true : _props$multiple,
|
|
38
|
+
rowKey = props.rowKey,
|
|
39
|
+
filter = props.filter,
|
|
40
|
+
dataSource = props.dataSource,
|
|
41
|
+
rowFilter = props.rowFilter,
|
|
42
|
+
loadingProp = props.loading,
|
|
43
|
+
readOnly = props.readOnly,
|
|
44
|
+
defaultColDef = props.defaultColDef,
|
|
45
|
+
rowHeight = props.rowHeight,
|
|
46
|
+
cellDisplayFlex = props.cellDisplayFlex,
|
|
47
|
+
isRowSelectable = props.isRowSelectable,
|
|
48
|
+
checkSearchParams = props.checkSearchParams;
|
|
49
|
+
var prefix = prefixClassName("select-view");
|
|
50
|
+
var _useState = useState(value || emptyValue),
|
|
51
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
52
|
+
data = _useState2[0],
|
|
53
|
+
setData = _useState2[1];
|
|
54
|
+
var _useState3 = useState((filter === null || filter === void 0 ? void 0 : filter.defaultValue) || {}),
|
|
55
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
56
|
+
params = _useState4[0],
|
|
57
|
+
setParams = _useState4[1];
|
|
58
|
+
var list = useRef(null);
|
|
59
|
+
var _useState5 = useState('list'),
|
|
60
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
61
|
+
tabFlag = _useState6[0],
|
|
62
|
+
setTabFlag = _useState6[1];
|
|
63
|
+
var _useState7 = useState(dataSource),
|
|
64
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
65
|
+
rows = _useState8[0],
|
|
66
|
+
setRows = _useState8[1];
|
|
67
|
+
var _useState9 = useState(false),
|
|
68
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
69
|
+
loading = _useState10[0],
|
|
70
|
+
setLoading = _useState10[1];
|
|
71
|
+
var cParams = (filter === null || filter === void 0 ? void 0 : filter.value) || params;
|
|
72
|
+
var getRowKey = function getRowKey(item) {
|
|
73
|
+
var _get;
|
|
74
|
+
if (typeof rowKey === 'function') {
|
|
75
|
+
return rowKey(item);
|
|
76
|
+
}
|
|
77
|
+
return String((_get = get(item, rowKey)) !== null && _get !== void 0 ? _get : '').toString();
|
|
78
|
+
};
|
|
79
|
+
var request = fetch ? function (_ref) {
|
|
80
|
+
var current = _ref.current,
|
|
81
|
+
pageSize = _ref.pageSize,
|
|
82
|
+
sort = _ref.sort;
|
|
83
|
+
return fetch({
|
|
84
|
+
current: current,
|
|
85
|
+
pageSize: pageSize,
|
|
86
|
+
params: cParams,
|
|
87
|
+
sort: sort
|
|
88
|
+
});
|
|
89
|
+
} : undefined;
|
|
90
|
+
useEffect(function () {
|
|
91
|
+
var mDataSource = dataSource;
|
|
92
|
+
if (rowFilter !== undefined && dataSource !== undefined) {
|
|
93
|
+
mDataSource = dataSource.filter(function (row) {
|
|
94
|
+
return rowFilter(row, cParams);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
setRows(mDataSource);
|
|
98
|
+
if (list.current !== null) {
|
|
99
|
+
if (mDataSource !== undefined) {
|
|
100
|
+
var grid = list.current;
|
|
101
|
+
grid.afterReady(function () {
|
|
102
|
+
grid.api.paginationGoToFirstPage();
|
|
103
|
+
});
|
|
104
|
+
} else {
|
|
105
|
+
list.current.fetch();
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}, [cParams, dataSource]);
|
|
109
|
+
useEffect(function () {
|
|
110
|
+
setData(value || emptyValue);
|
|
111
|
+
}, [value]);
|
|
112
|
+
var handleClear = function handleClear() {
|
|
113
|
+
var empty = [];
|
|
114
|
+
setData(empty);
|
|
115
|
+
onChange === null || onChange === void 0 || onChange(empty);
|
|
116
|
+
};
|
|
117
|
+
var handleChangeData = function handleChangeData(keys, records) {
|
|
118
|
+
var rowDoubleClicked = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
119
|
+
var keySet = new Set(keys);
|
|
120
|
+
var newRows = [].concat(_toConsumableArray(data), _toConsumableArray(records)).filter(function (item) {
|
|
121
|
+
var curKey = getRowKey(item);
|
|
122
|
+
if (keySet.has(curKey)) {
|
|
123
|
+
keySet.delete(curKey);
|
|
124
|
+
return true;
|
|
125
|
+
}
|
|
126
|
+
return false;
|
|
127
|
+
});
|
|
128
|
+
setData(newRows);
|
|
129
|
+
onChange === null || onChange === void 0 || onChange(newRows, rowDoubleClicked);
|
|
130
|
+
};
|
|
131
|
+
var handleChangeParams = function handleChangeParams(mParams) {
|
|
132
|
+
if (filter !== null && filter !== void 0 && filter.onChange) {
|
|
133
|
+
filter.onChange(mParams, 'submit');
|
|
134
|
+
}
|
|
135
|
+
if (checkSearchParams && !checkSearchParams(mParams)) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
setParams(mParams);
|
|
139
|
+
};
|
|
140
|
+
var headerNode = null;
|
|
141
|
+
var siderNode = null;
|
|
142
|
+
if (filter) {
|
|
143
|
+
if (filter.data) {
|
|
144
|
+
headerNode = /*#__PURE__*/React.createElement(Filter, _extends({
|
|
145
|
+
simple: true,
|
|
146
|
+
autoPlaceholder: true
|
|
147
|
+
}, filter, {
|
|
148
|
+
value: cParams,
|
|
149
|
+
onChange: function onChange(val) {
|
|
150
|
+
return handleChangeParams(_objectSpread(_objectSpread({}, cParams), val));
|
|
151
|
+
}
|
|
152
|
+
}));
|
|
153
|
+
}
|
|
154
|
+
if (filter.sider) {
|
|
155
|
+
siderNode = filter.sider({
|
|
156
|
+
value: cParams,
|
|
157
|
+
onChange: function onChange(val) {
|
|
158
|
+
return handleChangeParams(_objectSpread(_objectSpread({}, cParams), val));
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
var dataKeys = useMemo(function () {
|
|
164
|
+
return data.map(getRowKey);
|
|
165
|
+
}, [data, rowKey]);
|
|
166
|
+
var mSelectedCols = useMemo(function () {
|
|
167
|
+
if (readOnly) {
|
|
168
|
+
return selectedColumns;
|
|
169
|
+
}
|
|
170
|
+
var result = [{
|
|
171
|
+
type: 'delete',
|
|
172
|
+
sortable: false
|
|
173
|
+
}].concat(_toConsumableArray(selectedColumns));
|
|
174
|
+
return result;
|
|
175
|
+
}, [selectedColumns, readOnly]);
|
|
176
|
+
var content;
|
|
177
|
+
var renderList = function renderList() {
|
|
178
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
179
|
+
className: prefix('layout')
|
|
180
|
+
}, siderNode !== null && /*#__PURE__*/React.createElement("div", {
|
|
181
|
+
className: prefix('sider')
|
|
182
|
+
}, siderNode), /*#__PURE__*/React.createElement("div", {
|
|
183
|
+
className: prefix('main')
|
|
184
|
+
}, headerNode !== null && /*#__PURE__*/React.createElement("div", {
|
|
185
|
+
className: prefix('head')
|
|
186
|
+
}, headerNode), /*#__PURE__*/React.createElement("div", {
|
|
187
|
+
className: prefix('body')
|
|
188
|
+
}, /*#__PURE__*/React.createElement(DataGrid, {
|
|
189
|
+
ref: list,
|
|
190
|
+
rowKey: rowKey,
|
|
191
|
+
rowSelection: {
|
|
192
|
+
type: multiple ? 'checkbox' : 'radio',
|
|
193
|
+
selectedRowKeys: dataKeys,
|
|
194
|
+
onChange: handleChangeData,
|
|
195
|
+
preserveSelectedRowKeys: true
|
|
196
|
+
},
|
|
197
|
+
onRowDoubleClicked: function onRowDoubleClicked(_ref2) {
|
|
198
|
+
var node = _ref2.node;
|
|
199
|
+
if (!multiple && node.id && node.data) {
|
|
200
|
+
handleChangeData([node.id], [node.data], true);
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
rowHeight: rowHeight,
|
|
204
|
+
defaultColDef: defaultColDef,
|
|
205
|
+
cellDisplayFlex: cellDisplayFlex,
|
|
206
|
+
isRowSelectable: isRowSelectable,
|
|
207
|
+
dataSource: rows,
|
|
208
|
+
columns: columns,
|
|
209
|
+
onLoading: setLoading,
|
|
210
|
+
fetch: request,
|
|
211
|
+
pagination: pagination
|
|
212
|
+
}))));
|
|
213
|
+
};
|
|
214
|
+
var renderSelected = function renderSelected() {
|
|
215
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
216
|
+
className: prefix('layout')
|
|
217
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
218
|
+
className: prefix('main')
|
|
219
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
220
|
+
className: prefix('body')
|
|
221
|
+
}, /*#__PURE__*/React.createElement(DataGrid, {
|
|
222
|
+
dataSource: data,
|
|
223
|
+
defaultColDef: defaultColDef,
|
|
224
|
+
rowHeight: rowHeight,
|
|
225
|
+
cellDisplayFlex: cellDisplayFlex,
|
|
226
|
+
onDataSourceChange: function onDataSourceChange(v) {
|
|
227
|
+
onChange === null || onChange === void 0 || onChange(v);
|
|
228
|
+
setData(v);
|
|
229
|
+
},
|
|
230
|
+
columns: mSelectedCols,
|
|
231
|
+
rowKey: rowKey,
|
|
232
|
+
pagination: pagination,
|
|
233
|
+
context: {
|
|
234
|
+
data: data,
|
|
235
|
+
dataKeys: dataKeys
|
|
236
|
+
}
|
|
237
|
+
}))));
|
|
238
|
+
};
|
|
239
|
+
if (readOnly) {
|
|
240
|
+
content = renderSelected();
|
|
241
|
+
} else if (!multiple) {
|
|
242
|
+
content = renderList();
|
|
243
|
+
} else {
|
|
244
|
+
content = /*#__PURE__*/React.createElement(Tabs, {
|
|
245
|
+
items: [{
|
|
246
|
+
key: 'list',
|
|
247
|
+
label: '列表',
|
|
248
|
+
children: renderList()
|
|
249
|
+
}, {
|
|
250
|
+
key: 'selected',
|
|
251
|
+
label: "\u5DF2\u9009\u62E9(".concat(data.length, ")"),
|
|
252
|
+
children: renderSelected()
|
|
253
|
+
}],
|
|
254
|
+
tabBarGutter: 20,
|
|
255
|
+
onChange: setTabFlag,
|
|
256
|
+
tabBarExtraContent: {
|
|
257
|
+
right: tabFlag === 'selected' && !readOnly ? /*#__PURE__*/React.createElement("a", {
|
|
258
|
+
onClick: handleClear
|
|
259
|
+
}, "\u6E05\u7A7A") : null
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
264
|
+
className: prefix()
|
|
265
|
+
}, content, loadingProp || loading ? /*#__PURE__*/React.createElement(Spin, {
|
|
266
|
+
spinning: true,
|
|
267
|
+
className: prefix('spin')
|
|
268
|
+
}) : null);
|
|
269
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
.@{prefixCls}-select-view {
|
|
2
|
+
position: relative;
|
|
3
|
+
height: 100%;
|
|
4
|
+
|
|
5
|
+
&-spin {
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 0;
|
|
8
|
+
right: 0;
|
|
9
|
+
bottom: 0;
|
|
10
|
+
left: 0;
|
|
11
|
+
display: flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
background-color: rgba(255, 255, 255, 0.6);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
& > .@{ant-prefix}-tabs {
|
|
18
|
+
.fullTabs();
|
|
19
|
+
|
|
20
|
+
& > .@{ant-prefix}-tabs-nav {
|
|
21
|
+
margin-bottom: 0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&-layout {
|
|
26
|
+
display: flex;
|
|
27
|
+
height: 100%;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&-sider {
|
|
31
|
+
width: 200px;
|
|
32
|
+
padding: @padding-md @padding-md @padding-md 0;
|
|
33
|
+
overflow: auto;
|
|
34
|
+
border-right: 1px solid @border-color-split;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&-main {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex: 1;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
min-width: 0;
|
|
42
|
+
padding: @padding-md 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&-sider + &-main {
|
|
46
|
+
padding-left: @padding-md;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-head + &-body {
|
|
50
|
+
margin-top: @padding-md;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&-body {
|
|
54
|
+
flex: 1;
|
|
55
|
+
min-height: 0;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,27 +1,21 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { TreeProps } from 'rc-tree';
|
|
3
|
-
import type { DataNode, EventDataNode } from 'rc-tree/lib/interface';
|
|
4
|
-
import { TabsProps } from 'antd';
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
5
2
|
import type { TreeData, OperationType } from './typings';
|
|
6
|
-
|
|
3
|
+
import { type TabsProps, type TreeProps } from 'antd';
|
|
4
|
+
interface Props<KeyType> extends Omit<TreeProps, 'onSelect' | 'selectedKeys' | 'defaultSelectedKeys' | 'defaultExpandAll' | 'defaultExpandedKeys' | 'prefixCls' | 'height'> {
|
|
7
5
|
data?: TreeData<KeyType>[];
|
|
8
6
|
showSearch?: boolean;
|
|
9
7
|
placeholder?: string;
|
|
10
8
|
header?: ReactNode;
|
|
11
9
|
footer?: ReactNode;
|
|
12
10
|
operation?: OperationType<KeyType>;
|
|
13
|
-
onSelect?: (node: TreeData<KeyType>, info:
|
|
14
|
-
|
|
15
|
-
selected: boolean;
|
|
16
|
-
node: EventDataNode<DataNode>;
|
|
17
|
-
selectedNodes: DataNode[];
|
|
18
|
-
nativeEvent: MouseEvent;
|
|
19
|
-
}) => void;
|
|
11
|
+
onSelect?: (node: TreeData<KeyType>, info: Parameters<Exclude<TreeProps['onSelect'], undefined>>[1]) => void;
|
|
12
|
+
filterNode?: (keywords: string, node: TreeData<KeyType>) => boolean;
|
|
20
13
|
selectedKeys?: KeyType[];
|
|
21
14
|
defaultSelectedKeys?: KeyType[];
|
|
22
15
|
defaultExpandAll?: boolean;
|
|
23
16
|
defaultExpandedKeys?: KeyType[];
|
|
24
17
|
active?: boolean;
|
|
18
|
+
height?: number | 'auto';
|
|
25
19
|
}
|
|
26
20
|
declare function SiderTreeTabs(props: {
|
|
27
21
|
tabs: {
|