@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,204 @@
|
|
|
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 = ["prefixCls", "types", "hideType", "options", "value", "dateFormat", "onChange", "style", "disabled"];
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
10
|
+
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."); }
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
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; } }
|
|
14
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
import React, { useMemo, useState, useEffect } from 'react';
|
|
18
|
+
import { PREFIX_CLS } from "../constants";
|
|
19
|
+
import InputCompact from "../input-compact";
|
|
20
|
+
import { DatePicker, Select } from 'antd';
|
|
21
|
+
import moment from 'moment';
|
|
22
|
+
var emptyValue = [];
|
|
23
|
+
var defaultOptions = [{
|
|
24
|
+
label: '自定义时段',
|
|
25
|
+
value: function value() {
|
|
26
|
+
return emptyValue;
|
|
27
|
+
}
|
|
28
|
+
}, {
|
|
29
|
+
label: '今天',
|
|
30
|
+
value: function value() {
|
|
31
|
+
return [moment().startOf('day'), moment().endOf('day')];
|
|
32
|
+
}
|
|
33
|
+
}, {
|
|
34
|
+
label: '昨天',
|
|
35
|
+
value: function value() {
|
|
36
|
+
return [moment().add(-1, 'days').startOf('day'), moment().add(-1, 'days').endOf('day')];
|
|
37
|
+
}
|
|
38
|
+
}, {
|
|
39
|
+
label: '本周',
|
|
40
|
+
value: function value() {
|
|
41
|
+
return [moment().startOf('isoWeek'), moment().endOf('isoWeek')];
|
|
42
|
+
}
|
|
43
|
+
}, {
|
|
44
|
+
label: '上周',
|
|
45
|
+
value: function value() {
|
|
46
|
+
return [moment().startOf('isoWeek').add(-1, 'week'), moment().endOf('isoWeek').add(-1, 'week')];
|
|
47
|
+
}
|
|
48
|
+
}, {
|
|
49
|
+
label: '本月',
|
|
50
|
+
value: function value() {
|
|
51
|
+
return [moment().startOf('month'), moment().endOf('month')];
|
|
52
|
+
}
|
|
53
|
+
}, {
|
|
54
|
+
label: '上月',
|
|
55
|
+
value: function value() {
|
|
56
|
+
return [moment().add(-1, 'months').startOf('month'), moment().add(-1, 'months').endOf('month')];
|
|
57
|
+
}
|
|
58
|
+
}, {
|
|
59
|
+
label: '最近30日',
|
|
60
|
+
value: function value() {
|
|
61
|
+
return [moment().add(-29, 'days').startOf('day'), moment().endOf('day')];
|
|
62
|
+
}
|
|
63
|
+
}];
|
|
64
|
+
function DurationPicker(props) {
|
|
65
|
+
var _result$type, _result$option;
|
|
66
|
+
var _props$prefixCls = props.prefixCls,
|
|
67
|
+
prefixCls = _props$prefixCls === void 0 ? PREFIX_CLS : _props$prefixCls,
|
|
68
|
+
types = props.types,
|
|
69
|
+
_props$hideType = props.hideType,
|
|
70
|
+
hideType = _props$hideType === void 0 ? false : _props$hideType,
|
|
71
|
+
_props$options = props.options,
|
|
72
|
+
options = _props$options === void 0 ? defaultOptions : _props$options,
|
|
73
|
+
valueProp = props.value,
|
|
74
|
+
_props$dateFormat = props.dateFormat,
|
|
75
|
+
dateFormat = _props$dateFormat === void 0 ? 'YYYY-MM-DD' : _props$dateFormat,
|
|
76
|
+
onChange = props.onChange,
|
|
77
|
+
style = props.style,
|
|
78
|
+
disabled = props.disabled,
|
|
79
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
80
|
+
var defaultDurationPickerValue = useMemo(function () {
|
|
81
|
+
if (valueProp === undefined) {
|
|
82
|
+
return {
|
|
83
|
+
type: types[0].value,
|
|
84
|
+
option: options[0].label,
|
|
85
|
+
dates: options[0].value().map(function (item) {
|
|
86
|
+
return item.format(dateFormat);
|
|
87
|
+
})
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
return valueProp;
|
|
91
|
+
}, []);
|
|
92
|
+
var _useState = useState(defaultDurationPickerValue),
|
|
93
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
94
|
+
value = _useState2[0],
|
|
95
|
+
setDurationPickerValue = _useState2[1];
|
|
96
|
+
useEffect(function () {
|
|
97
|
+
if (valueProp !== undefined) {
|
|
98
|
+
setDurationPickerValue(valueProp);
|
|
99
|
+
}
|
|
100
|
+
}, [valueProp]);
|
|
101
|
+
var result = useMemo(function () {
|
|
102
|
+
var type = types.find(function (item) {
|
|
103
|
+
return item.value === value.type;
|
|
104
|
+
});
|
|
105
|
+
var option = options.find(function (item) {
|
|
106
|
+
return item.label === value.option;
|
|
107
|
+
});
|
|
108
|
+
var dates = value.dates ? value.dates.map(function (date) {
|
|
109
|
+
return moment(date, dateFormat);
|
|
110
|
+
}) : undefined;
|
|
111
|
+
return {
|
|
112
|
+
type: type,
|
|
113
|
+
option: option,
|
|
114
|
+
dates: dates
|
|
115
|
+
};
|
|
116
|
+
}, [value]);
|
|
117
|
+
var handleChangeType = function handleChangeType(item) {
|
|
118
|
+
if (value.type !== item.value) {
|
|
119
|
+
var newDurationPickerValue = _objectSpread(_objectSpread({}, value), {}, {
|
|
120
|
+
type: item.value
|
|
121
|
+
});
|
|
122
|
+
setDurationPickerValue(newDurationPickerValue);
|
|
123
|
+
if (onChange) {
|
|
124
|
+
onChange(newDurationPickerValue);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
var handleChangeOption = function handleChangeOption(item) {
|
|
129
|
+
if (value.option !== item.label) {
|
|
130
|
+
var itemValue = item.value();
|
|
131
|
+
var newDurationPickerValue = _objectSpread(_objectSpread({}, value), {}, {
|
|
132
|
+
dates: itemValue.length > 0 ? itemValue.map(function (date) {
|
|
133
|
+
return date.format(dateFormat);
|
|
134
|
+
}) : value.dates,
|
|
135
|
+
option: item.label
|
|
136
|
+
});
|
|
137
|
+
setDurationPickerValue(newDurationPickerValue);
|
|
138
|
+
if (onChange) {
|
|
139
|
+
onChange(newDurationPickerValue);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
var handleChangeDates = function handleChangeDates(dates) {
|
|
144
|
+
var newDurationPickerValue = _objectSpread({}, value);
|
|
145
|
+
newDurationPickerValue.option = defaultOptions[0].label;
|
|
146
|
+
if (dates === null) {
|
|
147
|
+
newDurationPickerValue.dates = emptyValue;
|
|
148
|
+
} else {
|
|
149
|
+
if (restProps.showTime) {
|
|
150
|
+
newDurationPickerValue.dates = [moment(dates[0]).format(dateFormat), moment(dates[1]).format(dateFormat)];
|
|
151
|
+
} else {
|
|
152
|
+
newDurationPickerValue.dates = [moment(dates[0]).startOf('day').format(dateFormat), moment(dates[1]).endOf('day').format(dateFormat)];
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
setDurationPickerValue(newDurationPickerValue);
|
|
156
|
+
if (onChange) {
|
|
157
|
+
onChange(newDurationPickerValue);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
161
|
+
className: "".concat(prefixCls, "-duration"),
|
|
162
|
+
style: style
|
|
163
|
+
}, !hideType && /*#__PURE__*/React.createElement(Select, {
|
|
164
|
+
options: types.map(function (item) {
|
|
165
|
+
return {
|
|
166
|
+
label: item.label,
|
|
167
|
+
value: item.label,
|
|
168
|
+
item: item
|
|
169
|
+
};
|
|
170
|
+
}),
|
|
171
|
+
disabled: disabled,
|
|
172
|
+
style: {
|
|
173
|
+
marginRight: 8,
|
|
174
|
+
color: '#666'
|
|
175
|
+
},
|
|
176
|
+
onSelect: function onSelect(_, opt) {
|
|
177
|
+
handleChangeType(opt.item);
|
|
178
|
+
},
|
|
179
|
+
value: (_result$type = result.type) === null || _result$type === void 0 ? void 0 : _result$type.label
|
|
180
|
+
}), /*#__PURE__*/React.createElement(InputCompact, {
|
|
181
|
+
disabled: disabled
|
|
182
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
|
183
|
+
style: {
|
|
184
|
+
width: 110,
|
|
185
|
+
color: '#666'
|
|
186
|
+
},
|
|
187
|
+
options: options.map(function (item) {
|
|
188
|
+
return {
|
|
189
|
+
label: item.label,
|
|
190
|
+
value: item.label,
|
|
191
|
+
item: item
|
|
192
|
+
};
|
|
193
|
+
}),
|
|
194
|
+
onSelect: function onSelect(_, opt) {
|
|
195
|
+
handleChangeOption(opt.item);
|
|
196
|
+
},
|
|
197
|
+
value: (_result$option = result.option) === null || _result$option === void 0 ? void 0 : _result$option.label
|
|
198
|
+
}), /*#__PURE__*/React.createElement(DatePicker.RangePicker, _extends({
|
|
199
|
+
value: result.dates,
|
|
200
|
+
onChange: handleChangeDates,
|
|
201
|
+
allowClear: false
|
|
202
|
+
}, restProps))));
|
|
203
|
+
}
|
|
204
|
+
export default DurationPicker;
|
|
@@ -0,0 +1,41 @@
|
|
|
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); }
|
|
5
|
+
import React, { useContext } from 'react';
|
|
6
|
+
import { PREFIX_CLS } from "../constants";
|
|
7
|
+
import Icons from "../icons";
|
|
8
|
+
import { ConfigProvider, message } from 'antd';
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
import { get } from 'lodash';
|
|
11
|
+
export default function EditableCell(props) {
|
|
12
|
+
var focused = props.focused,
|
|
13
|
+
onFocus = props.onFocus,
|
|
14
|
+
children = props.children,
|
|
15
|
+
disableUpDown = props.disableUpDown,
|
|
16
|
+
disableLeftRight = props.disableLeftRight,
|
|
17
|
+
errors = props.errors,
|
|
18
|
+
_props$bordered = props.bordered,
|
|
19
|
+
bordered = _props$bordered === void 0 ? true : _props$bordered,
|
|
20
|
+
_props$noStyle = props.noStyle,
|
|
21
|
+
noStyle = _props$noStyle === void 0 ? false : _props$noStyle;
|
|
22
|
+
var disabled = get(children, 'props.disabled');
|
|
23
|
+
var inputPrefixCls = useContext(ConfigProvider.ConfigContext).getPrefixCls('input');
|
|
24
|
+
var mainProps = {
|
|
25
|
+
onFocus: onFocus,
|
|
26
|
+
'data-up-down': disableUpDown ? '0' : '1',
|
|
27
|
+
'data-left-right': disableLeftRight ? '0' : '1',
|
|
28
|
+
className: noStyle ? "".concat(PREFIX_CLS, "-form-item-no-style") : classNames("".concat(PREFIX_CLS, "-form-item"), _defineProperty(_defineProperty(_defineProperty({}, inputPrefixCls, focused >= 1 && bordered), "".concat(inputPrefixCls, "-focused"), focused >= 2 && bordered), "".concat(inputPrefixCls, "-disabled"), disabled))
|
|
29
|
+
};
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", mainProps, children, errors !== undefined ? /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
className: "".concat(PREFIX_CLS, "-form-item-error"),
|
|
32
|
+
onClick: function onClick() {
|
|
33
|
+
return message.warning(errors.join('\n'));
|
|
34
|
+
},
|
|
35
|
+
onFocus: function onFocus(e) {
|
|
36
|
+
return e.stopPropagation();
|
|
37
|
+
}
|
|
38
|
+
}, /*#__PURE__*/React.createElement(Icons.Tip, {
|
|
39
|
+
type: "warning"
|
|
40
|
+
})) : null);
|
|
41
|
+
}
|
package/es/{EditableTable/EditableTableFormItem.d.ts → editable-table/editable-table-form-item.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { FormItemProps } from 'antd';
|
|
3
2
|
import type { EditableTableProps } from './typings';
|
|
3
|
+
import type { FormItemProps } from 'antd';
|
|
4
4
|
declare type Props<T> = Pick<FormItemProps, 'name' | 'label' | 'labelCol' | 'wrapperCol' | 'className' | 'required' | 'style' | 'colon'> & EditableTableProps<T>;
|
|
5
5
|
export default function EditableTableFormItem<T>(props: Props<T>): JSX.Element;
|
|
6
6
|
export {};
|
package/es/{EditableTable/EditableTableFormItem.js → editable-table/editable-table-form-item.js}
RENAMED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
var _excluded = ["name", "label", "labelCol", "wrapperCol", "className", "required", "style", "colon"];
|
|
2
|
-
function
|
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
|
-
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 _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); }
|
|
5
3
|
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; }
|
|
6
4
|
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; }
|
|
7
5
|
import React, { useRef } from 'react';
|
|
6
|
+
import Table from "./table";
|
|
8
7
|
import { Form } from 'antd';
|
|
9
|
-
import Table from './Table';
|
|
10
8
|
export default function EditableTableFormItem(props) {
|
|
11
9
|
var name = props.name,
|
|
12
10
|
label = props.label,
|
|
@@ -37,7 +35,7 @@ export default function EditableTableFormItem(props) {
|
|
|
37
35
|
return;
|
|
38
36
|
}
|
|
39
37
|
}]
|
|
40
|
-
}, /*#__PURE__*/React.createElement(Table,
|
|
38
|
+
}, /*#__PURE__*/React.createElement(Table, _extends({
|
|
41
39
|
ref: ref
|
|
42
40
|
}, tableProps)));
|
|
43
41
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import EditableCell from './editable-cell';
|
|
2
|
+
import EditableTableFormItem from './editable-table-form-item';
|
|
3
|
+
import EditableTable from './table';
|
|
4
4
|
declare type TableType = typeof EditableTable & {
|
|
5
5
|
EditableCell: typeof EditableCell;
|
|
6
6
|
EditableTableFormItem: typeof EditableTableFormItem;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import EditableCell from "./editable-cell";
|
|
2
|
+
import EditableTableFormItem from "./editable-table-form-item";
|
|
3
|
+
import EditableTable from "./table";
|
|
4
|
+
Object.assign(EditableTable, {
|
|
5
|
+
EditableCell: EditableCell,
|
|
6
|
+
EditableTableFormItem: EditableTableFormItem
|
|
7
|
+
});
|
|
8
|
+
export default EditableTable;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ForwardedRef } from 'react';
|
|
1
|
+
import React, { type ForwardedRef } from 'react';
|
|
2
2
|
import type { EditableTableProps, EditableTableRef } from './typings';
|
|
3
3
|
declare const _default: <T>(props: EditableTableProps<T> & {
|
|
4
4
|
ref?: React.ForwardedRef<EditableTableRef> | undefined;
|
|
@@ -1,21 +1,25 @@
|
|
|
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); }
|
|
1
2
|
var _excluded = ["value", "onChange", "editable", "rowKey", "columns"];
|
|
2
|
-
function
|
|
3
|
-
function
|
|
4
|
-
function
|
|
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); }
|
|
5
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; }
|
|
6
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; }
|
|
7
11
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
8
12
|
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."); }
|
|
9
13
|
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); }
|
|
10
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
11
|
-
function _iterableToArrayLimit(
|
|
14
|
+
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; }
|
|
15
|
+
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; } }
|
|
12
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
17
|
import React, { cloneElement, createContext, useContext, useEffect, useMemo, useState, memo, isValidElement, forwardRef, useImperativeHandle, useRef } from 'react';
|
|
18
|
+
import BaseTable from "../base-table";
|
|
19
|
+
import { PREFIX_CLS } from "../constants";
|
|
20
|
+
import EditableCell from "./editable-cell";
|
|
21
|
+
import { FormStore } from "./util";
|
|
14
22
|
import { get, isEqual } from 'lodash';
|
|
15
|
-
import BaseTable from '../BaseTable';
|
|
16
|
-
import { FormStore } from './util';
|
|
17
|
-
import { PREFIX_CLS } from '../constants';
|
|
18
|
-
import EditableCell from './EditableCell';
|
|
19
23
|
var Context = /*#__PURE__*/createContext(null);
|
|
20
24
|
var getColKey = function getColKey(name) {
|
|
21
25
|
return typeof name === 'string' || typeof name === 'number' ? name : name.join('-');
|
|
@@ -137,7 +141,7 @@ function EditableTable(props, ref) {
|
|
|
137
141
|
disableLeftRight = _item$editable.disableLeftRight,
|
|
138
142
|
disableUpDown = _item$editable.disableUpDown;
|
|
139
143
|
if ( /*#__PURE__*/isValidElement(renderFormItem)) {
|
|
140
|
-
render = function render(
|
|
144
|
+
render = function render(val, _1, _2, opts) {
|
|
141
145
|
return /*#__PURE__*/React.createElement(EditableCell, {
|
|
142
146
|
disableLeftRight: disableLeftRight,
|
|
143
147
|
disableUpDown: disableUpDown,
|
|
@@ -146,13 +150,13 @@ function EditableTable(props, ref) {
|
|
|
146
150
|
onFocus: opts.onFocus
|
|
147
151
|
}, /*#__PURE__*/cloneElement(renderFormItem, {
|
|
148
152
|
bordered: false,
|
|
149
|
-
value:
|
|
153
|
+
value: val,
|
|
150
154
|
onChange: function onChange(e) {
|
|
151
|
-
var
|
|
155
|
+
var result = e;
|
|
152
156
|
if (e !== undefined && e !== null && e.currentTarget instanceof HTMLInputElement) {
|
|
153
|
-
|
|
157
|
+
result = e.currentTarget.value;
|
|
154
158
|
}
|
|
155
|
-
opts.onChange(_defineProperty({}, path,
|
|
159
|
+
opts.onChange(_defineProperty({}, path, result));
|
|
156
160
|
}
|
|
157
161
|
}));
|
|
158
162
|
};
|
|
@@ -176,6 +180,7 @@ function EditableTable(props, ref) {
|
|
|
176
180
|
store.setValidators(validators);
|
|
177
181
|
return mCols;
|
|
178
182
|
}, [columns, editable]);
|
|
183
|
+
|
|
179
184
|
// 键盘事件
|
|
180
185
|
var tableRef = useRef(null);
|
|
181
186
|
useEffect(function () {
|
|
@@ -184,7 +189,7 @@ function EditableTable(props, ref) {
|
|
|
184
189
|
return;
|
|
185
190
|
}
|
|
186
191
|
var handleKeyUp = function handleKeyUp(e) {
|
|
187
|
-
var _cell$parentElement, _cell$parentElement2, _cell$parentElement3, _cell$
|
|
192
|
+
var _cell$parentElement, _cell$parentElement2, _cell$parentElement3, _cell$parentElement4;
|
|
188
193
|
var inputElm = e.target;
|
|
189
194
|
var editableCell = inputElm.closest(".".concat(PREFIX_CLS, "-form-item"));
|
|
190
195
|
if (editableCell === null) {
|
|
@@ -228,10 +233,10 @@ function EditableTable(props, ref) {
|
|
|
228
233
|
nodes = (_cell$parentElement2 = cell.parentElement) === null || _cell$parentElement2 === void 0 ? void 0 : _cell$parentElement2.querySelectorAll('input');
|
|
229
234
|
if (nodes !== undefined) {
|
|
230
235
|
var _target;
|
|
231
|
-
for (var
|
|
232
|
-
var _item = nodes[
|
|
236
|
+
for (var _i = 0; _i < nodes.length; _i += 1) {
|
|
237
|
+
var _item = nodes[_i];
|
|
233
238
|
if (_item === inputElm) {
|
|
234
|
-
_target = nodes[
|
|
239
|
+
_target = nodes[_i - 1];
|
|
235
240
|
}
|
|
236
241
|
}
|
|
237
242
|
if (_target !== undefined && _target.tabIndex >= 0) {
|
|
@@ -244,7 +249,7 @@ function EditableTable(props, ref) {
|
|
|
244
249
|
if (editableCell.dataset.upDown === '0') {
|
|
245
250
|
break;
|
|
246
251
|
}
|
|
247
|
-
elm = (_cell$parentElement3 = cell.parentElement) === null || _cell$parentElement3 === void 0
|
|
252
|
+
elm = (_cell$parentElement3 = cell.parentElement) === null || _cell$parentElement3 === void 0 || (_cell$parentElement3 = _cell$parentElement3.nextElementSibling) === null || _cell$parentElement3 === void 0 ? void 0 : _cell$parentElement3.querySelector("td:nth-child(".concat(colIndex, ") input"));
|
|
248
253
|
if (elm) {
|
|
249
254
|
elm.select();
|
|
250
255
|
}
|
|
@@ -253,7 +258,7 @@ function EditableTable(props, ref) {
|
|
|
253
258
|
if (editableCell.dataset.upDown === '0') {
|
|
254
259
|
break;
|
|
255
260
|
}
|
|
256
|
-
elm = (_cell$parentElement4 = cell.parentElement) === null || _cell$parentElement4 === void 0
|
|
261
|
+
elm = (_cell$parentElement4 = cell.parentElement) === null || _cell$parentElement4 === void 0 || (_cell$parentElement4 = _cell$parentElement4.previousElementSibling) === null || _cell$parentElement4 === void 0 ? void 0 : _cell$parentElement4.querySelector("td:nth-child(".concat(colIndex, ") input"));
|
|
257
262
|
if (elm) {
|
|
258
263
|
elm.select();
|
|
259
264
|
}
|
|
@@ -273,12 +278,12 @@ function EditableTable(props, ref) {
|
|
|
273
278
|
}, []);
|
|
274
279
|
return /*#__PURE__*/React.createElement(Context.Provider, {
|
|
275
280
|
value: store
|
|
276
|
-
}, /*#__PURE__*/React.createElement(MemoTable,
|
|
281
|
+
}, /*#__PURE__*/React.createElement(MemoTable, _extends({
|
|
277
282
|
rowHeight: editable ? 47 : 37,
|
|
278
283
|
columns: cols,
|
|
279
284
|
dataSource: rows,
|
|
280
285
|
rowKey: "key"
|
|
281
|
-
}, restProps
|
|
286
|
+
}, restProps, {
|
|
282
287
|
ref: tableRef
|
|
283
288
|
})));
|
|
284
289
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Key, ReactElement } from 'react';
|
|
2
|
-
import type { BaseTableProps, ColumnType } from '../
|
|
2
|
+
import type { BaseTableProps, ColumnType } from '../base-table/typings';
|
|
3
3
|
import type { RuleItem } from 'async-validator/dist-types/interface';
|
|
4
4
|
|
|
5
5
|
type RowType = {
|
|
@@ -29,7 +29,7 @@ export type EditableTableRule<T> = Pick<
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export type EditableTableRef = {
|
|
32
|
-
validate()
|
|
32
|
+
validate: () => Promise<any>;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
export interface EditableTableColumnType<T>
|