@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,201 @@
|
|
|
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
|
+
var _excluded = ["dataSource", "fetch", "actionRef", "onLoading", "columns", "pagination", "autoLoad"];
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
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); }
|
|
9
|
+
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
10
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
11
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
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
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
19
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
|
+
import React, { useMemo, useState, useImperativeHandle, useEffect } from 'react';
|
|
21
|
+
import BaseTable from "../base-table";
|
|
22
|
+
import { PREFIX_CLS } from "../constants";
|
|
23
|
+
import EmptyImage from "../empty-image";
|
|
24
|
+
import { isSortValue } from "./utils";
|
|
25
|
+
import { useRequest } from '@lemon-fe/hooks';
|
|
26
|
+
export default function Table(props) {
|
|
27
|
+
var _props$dataSource = props.dataSource,
|
|
28
|
+
dataSource = _props$dataSource === void 0 ? [] : _props$dataSource,
|
|
29
|
+
fetch = props.fetch,
|
|
30
|
+
actionRef = props.actionRef,
|
|
31
|
+
onLoading = props.onLoading,
|
|
32
|
+
columns = props.columns,
|
|
33
|
+
pagination = props.pagination,
|
|
34
|
+
autoLoad = props.autoLoad,
|
|
35
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
36
|
+
var defaultPageSize = 50;
|
|
37
|
+
var _useState = useState(1),
|
|
38
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
39
|
+
current = _useState2[0],
|
|
40
|
+
setCurrent = _useState2[1];
|
|
41
|
+
var _useState3 = useState(pagination && pagination.pageSize || defaultPageSize),
|
|
42
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
43
|
+
pageSize = _useState4[0],
|
|
44
|
+
setPageSize = _useState4[1];
|
|
45
|
+
var _useState5 = useState([]),
|
|
46
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
47
|
+
sort = _useState6[0],
|
|
48
|
+
setSort = _useState6[1];
|
|
49
|
+
var _useState7 = useState({}),
|
|
50
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
51
|
+
remote = _useState8[0],
|
|
52
|
+
setRemote = _useState8[1];
|
|
53
|
+
var _useRequest = useRequest( /*#__PURE__*/function () {
|
|
54
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
55
|
+
var result;
|
|
56
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
57
|
+
while (1) switch (_context.prev = _context.next) {
|
|
58
|
+
case 0:
|
|
59
|
+
if (onLoading) {
|
|
60
|
+
onLoading(true);
|
|
61
|
+
}
|
|
62
|
+
result = {
|
|
63
|
+
data: [],
|
|
64
|
+
total: 0
|
|
65
|
+
};
|
|
66
|
+
if (!fetch) {
|
|
67
|
+
_context.next = 6;
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
_context.next = 5;
|
|
71
|
+
return fetch(params);
|
|
72
|
+
case 5:
|
|
73
|
+
result = _context.sent;
|
|
74
|
+
case 6:
|
|
75
|
+
return _context.abrupt("return", {
|
|
76
|
+
result: result,
|
|
77
|
+
pageSize: pageSize,
|
|
78
|
+
current: current
|
|
79
|
+
});
|
|
80
|
+
case 7:
|
|
81
|
+
case "end":
|
|
82
|
+
return _context.stop();
|
|
83
|
+
}
|
|
84
|
+
}, _callee);
|
|
85
|
+
}));
|
|
86
|
+
return function (_x) {
|
|
87
|
+
return _ref.apply(this, arguments);
|
|
88
|
+
};
|
|
89
|
+
}(), {
|
|
90
|
+
loadingState: onLoading === undefined,
|
|
91
|
+
onSuccess: function onSuccess(res) {
|
|
92
|
+
if (onLoading) {
|
|
93
|
+
onLoading(false);
|
|
94
|
+
}
|
|
95
|
+
setRemote(_objectSpread(_objectSpread({}, res.result), {}, {
|
|
96
|
+
error: undefined
|
|
97
|
+
}));
|
|
98
|
+
},
|
|
99
|
+
onError: function onError(error) {
|
|
100
|
+
if (onLoading) {
|
|
101
|
+
onLoading(false);
|
|
102
|
+
}
|
|
103
|
+
setRemote({
|
|
104
|
+
data: [],
|
|
105
|
+
total: 0,
|
|
106
|
+
error: error
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}),
|
|
110
|
+
postData = _useRequest.run,
|
|
111
|
+
loading = _useRequest.loading;
|
|
112
|
+
useImperativeHandle(actionRef, function () {
|
|
113
|
+
return {
|
|
114
|
+
fetch: function fetch(page) {
|
|
115
|
+
var curr = page || 1;
|
|
116
|
+
setCurrent(curr);
|
|
117
|
+
postData({
|
|
118
|
+
current: curr,
|
|
119
|
+
pageSize: pageSize,
|
|
120
|
+
sort: sort
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
refresh: function refresh() {
|
|
124
|
+
return postData({
|
|
125
|
+
current: current,
|
|
126
|
+
pageSize: pageSize,
|
|
127
|
+
sort: sort
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
}, [pageSize, postData, current, sort]);
|
|
132
|
+
useEffect(function () {
|
|
133
|
+
if (autoLoad) {
|
|
134
|
+
postData({
|
|
135
|
+
current: current,
|
|
136
|
+
pageSize: pageSize,
|
|
137
|
+
sort: sort
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}, []);
|
|
141
|
+
var _useMemo = useMemo(function () {
|
|
142
|
+
if (fetch) {
|
|
143
|
+
return [remote.total, remote.data];
|
|
144
|
+
}
|
|
145
|
+
return [dataSource.length, dataSource];
|
|
146
|
+
}, [dataSource, fetch, remote]),
|
|
147
|
+
_useMemo2 = _slicedToArray(_useMemo, 2),
|
|
148
|
+
total = _useMemo2[0],
|
|
149
|
+
data = _useMemo2[1];
|
|
150
|
+
return /*#__PURE__*/React.createElement(BaseTable, _extends({
|
|
151
|
+
columns: columns,
|
|
152
|
+
dataSource: data,
|
|
153
|
+
summaryRecord: remote.summary,
|
|
154
|
+
loading: loading,
|
|
155
|
+
scroll: {
|
|
156
|
+
y: true
|
|
157
|
+
},
|
|
158
|
+
onChange: function onChange(mPage, _, mSort) {
|
|
159
|
+
var _mPage$current = mPage.current,
|
|
160
|
+
page = _mPage$current === void 0 ? 1 : _mPage$current,
|
|
161
|
+
_mPage$pageSize = mPage.pageSize,
|
|
162
|
+
size = _mPage$pageSize === void 0 ? defaultPageSize : _mPage$pageSize;
|
|
163
|
+
setPageSize(size);
|
|
164
|
+
setCurrent(page);
|
|
165
|
+
var result = [];
|
|
166
|
+
if (Array.isArray(mSort)) {
|
|
167
|
+
mSort.forEach(function (item) {
|
|
168
|
+
if (isSortValue(item)) {
|
|
169
|
+
result.push({
|
|
170
|
+
field: item.field,
|
|
171
|
+
order: item.order
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
} else if (isSortValue(mSort)) {
|
|
176
|
+
result.push({
|
|
177
|
+
field: mSort.field,
|
|
178
|
+
order: mSort.order
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
setSort(result);
|
|
182
|
+
if (fetch !== undefined) {
|
|
183
|
+
postData({
|
|
184
|
+
current: page,
|
|
185
|
+
pageSize: size,
|
|
186
|
+
sort: result
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
locale: remote.error ? {
|
|
191
|
+
emptyText: /*#__PURE__*/React.createElement("div", {
|
|
192
|
+
className: "".concat(PREFIX_CLS, "-table-empty")
|
|
193
|
+
}, /*#__PURE__*/React.createElement(EmptyImage, null), /*#__PURE__*/React.createElement("div", null, remote.error.message))
|
|
194
|
+
} : undefined,
|
|
195
|
+
pagination: pagination !== false ? _objectSpread({
|
|
196
|
+
current: current,
|
|
197
|
+
pageSize: pageSize,
|
|
198
|
+
total: total
|
|
199
|
+
}, pagination) : false
|
|
200
|
+
}, restProps));
|
|
201
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { PaginationProps } from 'antd';
|
|
2
|
-
import type { SortOrder } from 'antd/lib/table/interface';
|
|
3
1
|
import type { Key, RefObject } from 'react';
|
|
4
|
-
import type { BaseTableProps } from '../
|
|
2
|
+
import type { BaseTableProps } from '../base-table/typings';
|
|
3
|
+
import type { SortOrder } from 'antd/lib/table/interface';
|
|
5
4
|
|
|
6
5
|
export interface TableRef<RecordType = any> {
|
|
7
6
|
fetch: (page?: number) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SortType } from './typings';
|
|
1
|
+
import type { SortType } from './typings';
|
|
2
2
|
export declare function isSortValue(data: Partial<SortType>): data is SortType;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type TooltipProps } from 'antd';
|
|
3
|
+
interface TipMarkProps extends Omit<TooltipProps, 'title' | 'overlay'> {
|
|
4
|
+
infoContent: string | ReactNode;
|
|
5
|
+
mode?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const TipMark: ({ infoContent, mode, placement, style, className, ...props }: TipMarkProps) => JSX.Element;
|
|
8
|
+
export default TipMark;
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
var _excluded = ["infoContent", "mode", "placement", "style", "className"];
|
|
3
|
+
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); }
|
|
4
|
+
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; }
|
|
5
|
+
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; }
|
|
6
|
+
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; }
|
|
7
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
8
|
+
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); }
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import Icons from "../icons";
|
|
13
|
+
import { prefixClassName } from "../utils";
|
|
14
|
+
import { Tooltip, Popover } from 'antd';
|
|
15
|
+
import classNames from 'classnames';
|
|
16
|
+
var TipMark = function TipMark(_ref) {
|
|
17
|
+
var infoContent = _ref.infoContent,
|
|
18
|
+
_ref$mode = _ref.mode,
|
|
19
|
+
mode = _ref$mode === void 0 ? 'toolTip' : _ref$mode,
|
|
20
|
+
_ref$placement = _ref.placement,
|
|
21
|
+
placement = _ref$placement === void 0 ? 'bottom' : _ref$placement,
|
|
22
|
+
style = _ref.style,
|
|
23
|
+
className = _ref.className,
|
|
24
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
+
var prefix = prefixClassName('tip-mark');
|
|
26
|
+
var icon = /*#__PURE__*/React.createElement(Icons.Question, {
|
|
27
|
+
className: classNames(prefix(), className),
|
|
28
|
+
style: _objectSpread({
|
|
29
|
+
color: '#BFC4CE',
|
|
30
|
+
marginLeft: 1
|
|
31
|
+
}, style)
|
|
32
|
+
});
|
|
33
|
+
if (mode === 'toolTip') {
|
|
34
|
+
return /*#__PURE__*/React.createElement(Tooltip, _extends({
|
|
35
|
+
title: infoContent,
|
|
36
|
+
placement: placement
|
|
37
|
+
}, props), icon);
|
|
38
|
+
}
|
|
39
|
+
return /*#__PURE__*/React.createElement(Popover, _extends({
|
|
40
|
+
content: infoContent,
|
|
41
|
+
placement: placement
|
|
42
|
+
}, props), icon);
|
|
43
|
+
};
|
|
44
|
+
export default TipMark;
|
package/es/utils.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
export declare
|
|
2
|
+
export declare function mapChildren<T>(children: ReactNode, cb: (node: ReactNode, index: number) => T): T[];
|
|
3
|
+
export declare function prefixClassName(prefix: string): (val?: string) => string;
|
package/es/utils.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { PREFIX_CLS } from "./constants";
|
|
2
|
+
|
|
1
3
|
// 不使用Children.map的原因是由于它会给子节点生成一个key与tabs的activeTabKey无法对应
|
|
2
|
-
|
|
4
|
+
|
|
5
|
+
export function mapChildren(children, cb) {
|
|
3
6
|
var nodes = [];
|
|
4
7
|
if (Array.isArray(children)) {
|
|
5
8
|
nodes = children;
|
|
@@ -9,4 +12,9 @@ export var mapChildren = function mapChildren(children, cb) {
|
|
|
9
12
|
return nodes.filter(function (item) {
|
|
10
13
|
return item !== null && item !== undefined;
|
|
11
14
|
}).map(cb);
|
|
12
|
-
}
|
|
15
|
+
}
|
|
16
|
+
export function prefixClassName(prefix) {
|
|
17
|
+
return function (val) {
|
|
18
|
+
return "".concat(PREFIX_CLS, "-").concat(prefix) + (val ? "-".concat(val) : '');
|
|
19
|
+
};
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,43 +1,72 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.0-alpha.0",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
|
-
"author": "鲁盛杰 <lusj@cnlemon.net>",
|
|
6
5
|
"homepage": "",
|
|
7
6
|
"license": "ISC",
|
|
7
|
+
"author": "鲁盛杰 <lusj@cnlemon.net>",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./es/index.js",
|
|
11
|
+
"types": "./es/index.d.ts"
|
|
12
|
+
},
|
|
13
|
+
"./index.less": "./es/index.less"
|
|
14
|
+
},
|
|
8
15
|
"main": "es/index.js",
|
|
9
16
|
"files": [
|
|
10
17
|
"es"
|
|
11
18
|
],
|
|
12
|
-
"scripts": {
|
|
13
|
-
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
14
|
-
},
|
|
15
|
-
"publishConfig": {
|
|
16
|
-
"registry": "https://registry.npmjs.org"
|
|
17
|
-
},
|
|
18
19
|
"dependencies": {
|
|
19
|
-
"@
|
|
20
|
+
"@ag-grid-community/client-side-row-model": "29.2.0",
|
|
21
|
+
"@ag-grid-community/core": "29.2.0",
|
|
22
|
+
"@ag-grid-community/csv-export": "29.2.0",
|
|
23
|
+
"@ag-grid-community/infinite-row-model": "29.2.0",
|
|
24
|
+
"@ag-grid-community/react": "29.2.0",
|
|
25
|
+
"@ag-grid-community/styles": "29.2.0",
|
|
26
|
+
"@ant-design/icons": "^4.7.0",
|
|
27
|
+
"@dnd-kit/core": "^6.0.8",
|
|
28
|
+
"async-validator": "^4.2.5",
|
|
29
|
+
"bignumber.js": ">=9.0.0",
|
|
20
30
|
"classnames": "^2.2.6",
|
|
21
|
-
"color-string": "^1.9.
|
|
31
|
+
"color-string": "^1.9.1",
|
|
32
|
+
"expr-eval": "^2.0.2",
|
|
22
33
|
"lodash": "^4.17.0",
|
|
34
|
+
"memoize-one": "^6.0.0",
|
|
35
|
+
"moment": "^2.29.4",
|
|
23
36
|
"rc-resize-observer": "^1.0.0",
|
|
24
37
|
"react-color": "^2.19.3",
|
|
25
38
|
"react-gcolor-picker": "^1.2.4",
|
|
26
|
-
"react-resizable": "^3.0.4"
|
|
39
|
+
"react-resizable": "^3.0.4",
|
|
40
|
+
"shallowequal": "^1.1.0",
|
|
41
|
+
"@lemon-fe/hooks": "^1.1.0-alpha.0",
|
|
42
|
+
"@lemon-fe/utils": "^1.1.0-alpha.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@ag-grid-enterprise/clipboard": "29.2.0",
|
|
46
|
+
"@ag-grid-enterprise/column-tool-panel": "29.2.0",
|
|
47
|
+
"@ag-grid-enterprise/master-detail": "29.2.0",
|
|
48
|
+
"@ag-grid-enterprise/menu": "29.2.0",
|
|
49
|
+
"@ag-grid-enterprise/row-grouping": "29.2.0",
|
|
50
|
+
"@ag-grid-enterprise/side-bar": "29.2.0",
|
|
51
|
+
"@types/color-string": "^1.5.2",
|
|
52
|
+
"@types/lodash": "^4.14.186",
|
|
53
|
+
"@types/react": "^18.0.18",
|
|
54
|
+
"@types/react-color": "^3.0.6",
|
|
55
|
+
"@types/react-dom": "^18.0.6",
|
|
56
|
+
"@types/react-resizable": "^3.0.4",
|
|
57
|
+
"@types/shallowequal": "^1.1.1"
|
|
27
58
|
},
|
|
28
59
|
"peerDependencies": {
|
|
29
60
|
"antd": ">=4.23",
|
|
30
61
|
"react": ">=16.8",
|
|
31
62
|
"react-dom": ">=16.8"
|
|
32
63
|
},
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"@types/lodash": "^4.14.179",
|
|
36
|
-
"@types/react-color": "^3.0.6",
|
|
37
|
-
"@types/react-resizable": "^1.7.4",
|
|
38
|
-
"antd": "^4.23.5",
|
|
39
|
-
"react": "^17.0.2",
|
|
40
|
-
"react-dom": "^17.0.2"
|
|
64
|
+
"publishConfig": {
|
|
65
|
+
"registry": "https://registry.npmjs.org"
|
|
41
66
|
},
|
|
42
|
-
"
|
|
43
|
-
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "father build",
|
|
69
|
+
"test": "echo \"Error: run tests from root\" && exit 1",
|
|
70
|
+
"prepublish": "npm run build"
|
|
71
|
+
}
|
|
72
|
+
}
|
package/README.md
DELETED
package/es/Dropdown/index.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { PopoverProps } from 'antd';
|
|
2
|
-
import type { ReactElement } from 'react';
|
|
3
|
-
interface Props {
|
|
4
|
-
actions: ({
|
|
5
|
-
text: string | ReactElement;
|
|
6
|
-
onClick: () => void;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
} | null)[];
|
|
9
|
-
overlayClassName?: string;
|
|
10
|
-
placement?: PopoverProps['placement'];
|
|
11
|
-
children?: ReactElement | null;
|
|
12
|
-
trigger?: PopoverProps['trigger'];
|
|
13
|
-
}
|
|
14
|
-
export default function Dropdown(props: Props): JSX.Element;
|
|
15
|
-
export {};
|
package/es/Dropdown/index.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
3
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
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++) { arr2[i] = arr[i]; } return arr2; }
|
|
6
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
7
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
|
-
import { Popover } from 'antd';
|
|
9
|
-
import React, { useState } from 'react';
|
|
10
|
-
import classNames from 'classnames';
|
|
11
|
-
import { PREFIX_CLS } from '../constants';
|
|
12
|
-
export default function Dropdown(props) {
|
|
13
|
-
var actions = props.actions,
|
|
14
|
-
overlayClassName = props.overlayClassName,
|
|
15
|
-
_props$placement = props.placement,
|
|
16
|
-
placement = _props$placement === void 0 ? 'bottomRight' : _props$placement,
|
|
17
|
-
children = props.children,
|
|
18
|
-
_props$trigger = props.trigger,
|
|
19
|
-
trigger = _props$trigger === void 0 ? 'click' : _props$trigger;
|
|
20
|
-
var _useState = useState(false),
|
|
21
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
22
|
-
visible = _useState2[0],
|
|
23
|
-
setVisible = _useState2[1];
|
|
24
|
-
var prefixCls = "".concat(PREFIX_CLS, "-dropdown");
|
|
25
|
-
return /*#__PURE__*/React.createElement(Popover, {
|
|
26
|
-
trigger: trigger,
|
|
27
|
-
placement: placement,
|
|
28
|
-
visible: visible,
|
|
29
|
-
onVisibleChange: setVisible,
|
|
30
|
-
overlayClassName: classNames(prefixCls, overlayClassName),
|
|
31
|
-
content: actions.map(function (item, index) {
|
|
32
|
-
return item !== null && /*#__PURE__*/React.createElement("div", {
|
|
33
|
-
className: classNames("".concat(prefixCls, "-item"), _defineProperty({}, "".concat(prefixCls, "-item-disabled"), item.disabled)),
|
|
34
|
-
key: index,
|
|
35
|
-
onClick: function onClick() {
|
|
36
|
-
if (item.disabled) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
setVisible(false);
|
|
40
|
-
item.onClick();
|
|
41
|
-
}
|
|
42
|
-
}, item.text);
|
|
43
|
-
})
|
|
44
|
-
}, children);
|
|
45
|
-
}
|