linkmore-design 1.1.32 → 1.1.34
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/CHANGELOG.md +1237 -0
- package/dist/Affix/demos/basic.d.ts +0 -1
- package/dist/Affix/index.d.ts +1 -1
- package/dist/Affix/utils.d.ts +1 -1
- package/dist/Alert/demos/basic.d.ts +0 -1
- package/dist/Alert/demos/visible.d.ts +0 -1
- package/dist/Approval/demos/basic.d.ts +0 -1
- package/dist/Approval/type.d.ts +1 -1
- package/dist/AutoComplete/index.d.ts +1 -1
- package/dist/Avatar/demos/basic.d.ts +0 -1
- package/dist/Badge/Ribbon.d.ts +1 -1
- package/dist/Badge/SingleNumber.d.ts +0 -1
- package/dist/Badge/demos/basic.d.ts +0 -1
- package/dist/Breadcrumb/demos/basic.d.ts +0 -1
- package/dist/Breadcrumb/demos/basic1.d.ts +0 -1
- package/dist/Button/demos/basic.d.ts +0 -1
- package/dist/Button/demos/disabled.d.ts +0 -1
- package/dist/Button/demos/ghost.d.ts +0 -1
- package/dist/Button/demos/icon.d.ts +0 -1
- package/dist/Button/demos/type.d.ts +0 -1
- package/dist/Calendar/demos/basic.d.ts +0 -1
- package/dist/Card/demos/basic.d.ts +0 -1
- package/dist/Carousel/demos/basic.d.ts +0 -1
- package/dist/Cascader/demos/basic.d.ts +0 -1
- package/dist/Cascader/demos/formItem.d.ts +0 -1
- package/dist/Col/demos/basic.d.ts +0 -1
- package/dist/Collapse/demos/basic.d.ts +0 -1
- package/dist/Comment/demos/basic.d.ts +0 -1
- package/dist/ConfigProvider/DisabledContext.d.ts +1 -1
- package/dist/ConfigProvider/SizeContext.d.ts +1 -1
- package/dist/ConfigProvider/context.d.ts +2 -2
- package/dist/ConfigProvider/defaultRenderEmpty.d.ts +1 -1
- package/dist/ConfigProvider/demos/componentSize.d.ts +0 -1
- package/dist/CustomTableOption/demos/basic.d.ts +0 -1
- package/dist/DatePicker/PickerButton.d.ts +0 -1
- package/dist/DatePicker/PickerTag.d.ts +0 -1
- package/dist/DatePicker/demos/basic.d.ts +0 -1
- package/dist/DatePicker/generatePicker/index.d.ts +13 -13
- package/dist/DatePicker/generatePicker/interface.d.ts +3 -3
- package/dist/DatePicker/index.d.ts +4 -4
- package/dist/Descriptions/demos/basic.d.ts +0 -1
- package/dist/Drawer/demos/basic.d.ts +0 -1
- package/dist/Drawer/demos/button.d.ts +0 -1
- package/dist/Drawer/demos/nested.d.ts +0 -1
- package/dist/Dropdown/demos/basic.d.ts +0 -1
- package/dist/Dropdown/demos/button.d.ts +0 -1
- package/dist/Dropdown/demos/icon.d.ts +0 -1
- package/dist/Dropdown/demos/local.d.ts +0 -1
- package/dist/Dropdown/demos/target.d.ts +0 -1
- package/dist/Empty/demos/basic.d.ts +0 -1
- package/dist/Empty/demos/custom.d.ts +0 -1
- package/dist/Empty/empty.d.ts +0 -1
- package/dist/Empty/simple.d.ts +0 -1
- package/dist/Form/Form.d.ts +2 -2
- package/dist/Form/FormItem/index.d.ts +6 -6
- package/dist/Form/FormItemLabel.d.ts +2 -2
- package/dist/Form/context.d.ts +2 -2
- package/dist/Form/demos/disabled.d.ts +0 -1
- package/dist/Form/demos/drawer1152-triple.d.ts +0 -1
- package/dist/Form/demos/drawer440-double.d.ts +0 -1
- package/dist/Form/demos/drawer440.d.ts +0 -1
- package/dist/Form/demos/drawer720-double.d.ts +0 -1
- package/dist/Form/demos/error-tip.d.ts +0 -1
- package/dist/Form/demos/formlist.d.ts +0 -1
- package/dist/Form/demos/horizontal.d.ts +0 -1
- package/dist/Form/demos/inline.d.ts +0 -1
- package/dist/Form/demos/modal416.d.ts +0 -1
- package/dist/Form/demos/modal552-double.d.ts +0 -1
- package/dist/Form/demos/responsive.d.ts +0 -1
- package/dist/Form/demos/ruleTime.d.ts +0 -1
- package/dist/Form/demos/vertical.d.ts +0 -1
- package/dist/Form/hooks/useFormItemStatus.d.ts +1 -1
- package/dist/Form/hooks/useFrameState.d.ts +1 -1
- package/dist/Form/index.d.ts +1 -1
- package/dist/Form/interface.d.ts +2 -2
- package/dist/FullScreen/demos/basic.d.ts +0 -1
- package/dist/FullScreen/demos/useInModal.d.ts +0 -1
- package/dist/Grid/col.d.ts +2 -2
- package/dist/Grid/demos/basic.d.ts +0 -1
- package/dist/Grid/row.d.ts +1 -1
- package/dist/IconFont/index.d.ts +0 -1
- package/dist/Image/demos/basic.d.ts +0 -1
- package/dist/ImageViewer/components/Arrows.d.ts +0 -1
- package/dist/ImageViewer/components/Carousel.d.ts +0 -1
- package/dist/ImageViewer/components/Operate.d.ts +0 -1
- package/dist/ImageViewer/components/Thumb.d.ts +0 -1
- package/dist/Input/demos/after.d.ts +0 -1
- package/dist/Input/demos/base.d.ts +0 -1
- package/dist/Input/demos/basic.d.ts +0 -1
- package/dist/Input/demos/color.d.ts +0 -1
- package/dist/Input/demos/combination.d.ts +0 -1
- package/dist/Input/demos/import.d.ts +0 -1
- package/dist/Input/demos/line.d.ts +0 -1
- package/dist/Input/demos/password.d.ts +0 -1
- package/dist/Input/demos/size.d.ts +0 -1
- package/dist/InputNumber/demos/basic.d.ts +0 -1
- package/dist/InputNumber/demos/format.d.ts +0 -1
- package/dist/InputNumber/demos/price.d.ts +0 -1
- package/dist/InputNumber/demos/status.d.ts +0 -1
- package/dist/InputNumber/demos/suffix.d.ts +0 -1
- package/dist/Layout/demos/basic.d.ts +0 -1
- package/dist/List/demos/basic.d.ts +0 -1
- package/dist/LmDrag/components/DndContainer.d.ts +0 -1
- package/dist/LmDrag/demos/basic.d.ts +0 -1
- package/dist/LmEditTable/DragHandle.d.ts +0 -1
- package/dist/LmEditTable/EditTable.d.ts +1 -1
- package/dist/LmEditTable/components/DraggableContainer.d.ts +3 -2
- package/dist/LmEditTable/components/bottomOpetateComponent.d.ts +0 -1
- package/dist/LmEditTable/components/customRenderEmpty.d.ts +0 -1
- package/dist/LmEditTable/components/index.d.ts +3 -2
- package/dist/LmEditTable/demos/basic.d.ts +0 -1
- package/dist/LmEditTable/demos/colsort.d.ts +0 -1
- package/dist/LmEditTable/demos/group.d.ts +0 -1
- package/dist/LmEditTable/demos/priceTable.d.ts +0 -1
- package/dist/LmEditTable/demos/sinleEdit.d.ts +0 -1
- package/dist/LmEditTable/demos/size.d.ts +0 -1
- package/dist/LmEditTable/rowSort/DndContainerRow.d.ts +3 -1
- package/dist/LmEditTable/sortableBox.d.ts +0 -1
- package/dist/LmEditTable/sortableBoxCol.d.ts +0 -1
- package/dist/LmEditTable/sortableItemCol.d.ts +0 -1
- package/dist/LmSelect/GhostSelect.d.ts +0 -1
- package/dist/LmSelect/demos/basic.d.ts +0 -1
- package/dist/LmSelect/demos/checkbox.d.ts +0 -1
- package/dist/LmSelect/demos/ghost.d.ts +0 -1
- package/dist/LmSelect/useCheckboxOptions.d.ts +0 -1
- package/dist/LmTable/components/DndContainer.d.ts +1 -1
- package/dist/LmTable/components/Item/components/Remove/index.d.ts +0 -1
- package/dist/LmTable/components/customRenderEmpty.d.ts +0 -1
- package/dist/LmTable/components/inputDataEdit.d.ts +0 -1
- package/dist/LmTable/components/tableChartsModal.d.ts +0 -1
- package/dist/LmUpload/UploadList/ItemPicture.d.ts +0 -1
- package/dist/LmUpload/UploadList/ItemPictureCard.d.ts +0 -1
- package/dist/LmUpload/UploadList/ItemText.d.ts +0 -1
- package/dist/LmUpload/demos/multiple.d.ts +2 -0
- package/dist/LmUpload/view/index.d.ts +0 -1
- package/dist/LmUpload/wrapper/Upload.d.ts +0 -1
- package/dist/Mentions/demos/basic.d.ts +0 -1
- package/dist/Menu/demos/basic.d.ts +0 -1
- package/dist/Modal/demos/basic.d.ts +0 -1
- package/dist/Modal/demos/info.d.ts +0 -1
- package/dist/Modal/demos/locale.d.ts +0 -1
- package/dist/PageHeader/demos/basic.d.ts +0 -1
- package/dist/Pagination/demos/basic.d.ts +0 -1
- package/dist/Popconfirm/demos/basic.d.ts +0 -1
- package/dist/Popover/demos/basic.d.ts +0 -1
- package/dist/Popover/demos/basic1.d.ts +0 -1
- package/dist/Progress/demos/basic.d.ts +0 -1
- package/dist/Progress/demos/circle.d.ts +0 -1
- package/dist/Progress/demos/dynamic.d.ts +0 -1
- package/dist/Progress/demos/small.d.ts +0 -1
- package/dist/QuickMenu/demos/basic.d.ts +0 -1
- package/dist/QuickMenu/demos/useInDraw.d.ts +0 -1
- package/dist/Rate/demos/basic.d.ts +0 -1
- package/dist/Result/demos/403.d.ts +0 -1
- package/dist/Result/demos/404.d.ts +0 -1
- package/dist/Result/demos/500.d.ts +0 -1
- package/dist/Result/demos/basic.d.ts +0 -1
- package/dist/Result/demos/customicon.d.ts +0 -1
- package/dist/Result/demos/error.d.ts +0 -1
- package/dist/Result/demos/info.d.ts +0 -1
- package/dist/Result/demos/success.d.ts +0 -1
- package/dist/Result/demos/warning.d.ts +0 -1
- package/dist/Result/index.d.ts +6 -6
- package/dist/Result/noFound.d.ts +0 -1
- package/dist/Result/serverError.d.ts +0 -1
- package/dist/Result/unauthorized.d.ts +0 -1
- package/dist/Row/demos/basic.d.ts +0 -1
- package/dist/Segmented/demos/basic.d.ts +0 -1
- package/dist/Select/demos/basic.d.ts +0 -1
- package/dist/Select/demos/bordered.d.ts +0 -1
- package/dist/Select/demos/formItem.d.ts +0 -1
- package/dist/Select/index.d.ts +1 -1
- package/dist/Skeleton/demos/basic.d.ts +0 -1
- package/dist/Slider/demos/basic.d.ts +0 -1
- package/dist/Space/demos/auto.d.ts +0 -1
- package/dist/Space/demos/basic.d.ts +0 -1
- package/dist/Space/demos/vertical.d.ts +0 -1
- package/dist/Spin/demos/basic.d.ts +0 -1
- package/dist/Spin/demos/size.d.ts +0 -1
- package/dist/Statistic/demos/basic.d.ts +0 -1
- package/dist/Steps/demos/basic.d.ts +0 -1
- package/dist/Switch/demos/basic.d.ts +0 -1
- package/dist/Switch/demos/table.d.ts +0 -1
- package/dist/Table/demos/basic.d.ts +0 -1
- package/dist/Tabs/demos/basic.d.ts +0 -1
- package/dist/Tabs/demos/nobroder.d.ts +0 -1
- package/dist/Tabs/index.d.ts +2 -2
- package/dist/Tag/demos/CheckableTag.d.ts +0 -1
- package/dist/Tag/demos/ExigencyTag.d.ts +0 -1
- package/dist/Tag/demos/add.d.ts +0 -1
- package/dist/Tag/demos/basic.d.ts +0 -1
- package/dist/Tag/demos/border.d.ts +0 -1
- package/dist/Tag/demos/colors.d.ts +0 -1
- package/dist/Timeline/demos/basic.d.ts +0 -1
- package/dist/Tooltip/demos/basic.d.ts +0 -1
- package/dist/Tooltip/index.d.ts +2 -2
- package/dist/Transfer/demos/basic.d.ts +0 -1
- package/dist/Tree/DirectoryTree.d.ts +2 -2
- package/dist/Tree/Tree.d.ts +4 -4
- package/dist/Tree/demos/basic.d.ts +0 -1
- package/dist/Tree/demos/controlled.d.ts +0 -1
- package/dist/Tree/demos/search.d.ts +0 -1
- package/dist/Tree/demos/sort.d.ts +0 -1
- package/dist/Tree/utils/dropIndicator.d.ts +0 -1
- package/dist/TreeSelect/demos/basic.d.ts +0 -1
- package/dist/TreeSelect/demos/formItem.d.ts +0 -1
- package/dist/TreeSelect/index.d.ts +1 -1
- package/dist/Typography/Base/index.d.ts +1 -1
- package/dist/Typography/Title.d.ts +1 -1
- package/dist/Typography/demos/basic.d.ts +0 -1
- package/dist/Typography/index.d.ts +1 -1
- package/dist/Upload/index.d.ts +3 -3
- package/dist/_util/colors.d.ts +2 -2
- package/dist/_util/domTarget.d.ts +3 -3
- package/dist/_util/getRenderPropValue.d.ts +1 -1
- package/dist/_util/motion.d.ts +1 -1
- package/dist/_util/reactNode.d.ts +2 -2
- package/dist/_util/responsiveObserve.d.ts +5 -5
- package/dist/_util/statusUtils.d.ts +1 -1
- package/dist/_util/type.d.ts +2 -2
- package/dist/_util/warning.d.ts +1 -1
- package/dist/hooks/useFullscreen/demos/basic.d.ts +0 -1
- package/dist/hooks/useFullscreen/demos/useInModal.d.ts +0 -1
- package/dist/hooks/useFullscreen/index.d.ts +3 -3
- package/dist/index.umd.css +1224 -283
- package/dist/index.umd.js +139919 -126709
- package/dist/index.umd.min.css +2 -2
- package/dist/index.umd.min.js +24 -20
- package/dist/locale-provider/LocaleReceiver.d.ts +1 -1
- package/dist/locale-provider/context.d.ts +1 -1
- package/dist/message/demos/basic.d.ts +0 -1
- package/dist/message/demos/other.d.ts +0 -1
- package/dist/message/index.d.ts +10 -10
- package/dist/notification/demos/basic.d.ts +0 -1
- package/dist/notification/demos/button.d.ts +0 -1
- package/dist/notification/demos/icon.d.ts +0 -1
- package/dist/notification/index.d.ts +2 -2
- package/es/Affix/index.d.ts +1 -1
- package/es/Affix/index.js +90 -37
- package/es/Affix/utils.d.ts +1 -1
- package/es/Affix/utils.js +13 -6
- package/es/Alert/ErrorBoundary.js +15 -5
- package/es/Alert/index.js +64 -42
- package/es/Approval/handle.js +27 -10
- package/es/Approval/index.js +120 -63
- package/es/Approval/type.d.ts +1 -1
- package/es/Approval/type.js +24 -0
- package/es/Approval/util.js +24 -4
- package/es/AutoComplete/index.d.ts +1 -1
- package/es/AutoComplete/index.js +20 -9
- package/es/Badge/Ribbon.d.ts +1 -1
- package/es/Badge/Ribbon.js +16 -9
- package/es/Badge/ScrollNumber.js +28 -17
- package/es/Badge/SingleNumber.d.ts +0 -1
- package/es/Badge/SingleNumber.js +38 -23
- package/es/Badge/index.js +68 -44
- package/es/Badge/utils.js +2 -2
- package/es/Box/body/Item.js +3 -1
- package/es/Box/body/OverflowList.js +2 -2
- package/es/Box/wrapper/BoxContainer.js +12 -8
- package/es/Box/wrapper/BoxRoot.js +7 -5
- package/es/Box/wrapper/reducer.js +4 -2
- package/es/Button/index.js +17 -10
- package/es/ButtonTags/ButtonTags.js +15 -6
- package/es/ButtonTags/index.js +3 -0
- package/es/CardTable/LmCardTable.js +28 -19
- package/es/CardTable/body/TableBody.js +26 -17
- package/es/CardTable/body/TableBodyCell.js +17 -9
- package/es/CardTable/body/TableBodyRow.js +19 -13
- package/es/CardTable/card/PictureTextColumn.js +28 -18
- package/es/CardTable/card/PictureTextRow.js +31 -18
- package/es/CardTable/card/PictureTextRowOperate.js +30 -17
- package/es/CardTable/context.js +5 -0
- package/es/CardTable/empty.js +6 -1
- package/es/CardTable/fns/index.js +36 -22
- package/es/CardTable/footer.js +15 -4
- package/es/CardTable/hooks/usePagination.js +50 -35
- package/es/CardTable/index.js +5 -0
- package/es/CardTable/pager/TablePagination.js +15 -8
- package/es/CardTable/pager/index.js +13 -6
- package/es/CardTable/table/Table.js +6 -2
- package/es/CardTable/table/TableContainer.js +23 -14
- package/es/CardTable/table/TableRoot.js +65 -45
- package/es/CardTable/table/TableWrapper.js +9 -2
- package/es/CardTable/toolbar/ToolBarBottom.js +8 -3
- package/es/CardTable/utils.js +9 -3
- package/es/Cascader/index.js +21 -11
- package/es/Checkbox/index.js +18 -7
- package/es/ConfigProvider/DisabledContext.d.ts +1 -1
- package/es/ConfigProvider/DisabledContext.js +1 -1
- package/es/ConfigProvider/SizeContext.d.ts +1 -1
- package/es/ConfigProvider/SizeContext.js +1 -1
- package/es/ConfigProvider/context.d.ts +2 -2
- package/es/ConfigProvider/context.js +10 -4
- package/es/ConfigProvider/cssVariables.js +25 -16
- package/es/ConfigProvider/defaultRenderEmpty.d.ts +1 -1
- package/es/ConfigProvider/defaultRenderEmpty.js +6 -0
- package/es/ConfigProvider/index.js +55 -30
- package/es/CropImg/body/Operate.js +19 -10
- package/es/CropImg/body/index.js +8 -6
- package/es/CropImg/fns/index.js +11 -10
- package/es/CropImg/utils.js +45 -27
- package/es/CropImg/wrapper/Container.js +20 -9
- package/es/CropImg/wrapper/Root.js +16 -13
- package/es/CropImg/wrapper/Wrapper.js +2 -0
- package/es/CropImg/wrapper/reducer.js +9 -5
- package/es/CustomTableOption/cardSort.js +49 -24
- package/es/CustomTableOption/columnsSort.js +63 -29
- package/es/CustomTableOption/filterSort.js +53 -28
- package/es/CustomTableOption/index.js +31 -18
- package/es/CustomerService/components/question.js +20 -3
- package/es/CustomerService/index.js +46 -18
- package/es/DatePicker/PickerButton.d.ts +0 -1
- package/es/DatePicker/PickerTag.d.ts +0 -1
- package/es/DatePicker/generatePicker/generateRangePicker.js +33 -23
- package/es/DatePicker/generatePicker/generateSinglePicker.js +37 -22
- package/es/DatePicker/generatePicker/index.d.ts +13 -13
- package/es/DatePicker/generatePicker/index.js +25 -12
- package/es/DatePicker/generatePicker/interface.d.ts +3 -3
- package/es/DatePicker/index.d.ts +4 -4
- package/es/DatePicker/util.js +17 -0
- package/es/Descriptions/Cell.js +17 -11
- package/es/Descriptions/Item.js +1 -0
- package/es/Descriptions/Row.js +31 -24
- package/es/Descriptions/index.js +46 -27
- package/es/Divider/index.js +21 -12
- package/es/Drawer/index.js +11 -4
- package/es/Dropdown/index.js +40 -19
- package/es/EditTable/EditTable.js +171 -75
- package/es/EditTable/index.js +3 -0
- package/es/Empty/empty.js +4 -1
- package/es/Empty/index.js +22 -10
- package/es/Empty/simple.js +4 -1
- package/es/EnlargeImg/index.js +43 -17
- package/es/Filter/Popover.js +65 -29
- package/es/Filter/baseFilter/Popover.js +70 -28
- package/es/Filter/baseFilter/ToggleFilter.js +25 -9
- package/es/Filter/baseFilter/index.js +28 -8
- package/es/Filter/complex/ComplexFilter.js +47 -16
- package/es/Filter/complex/ComplexItem.js +47 -24
- package/es/Filter/components/Checkbox.js +34 -14
- package/es/Filter/components/Date.js +30 -10
- package/es/Filter/components/Input.js +23 -7
- package/es/Filter/components/Select.js +33 -13
- package/es/Filter/components/Tree.js +24 -8
- package/es/Filter/components/header.js +17 -3
- package/es/Filter/components/index.js +6 -0
- package/es/Filter/context.js +4 -0
- package/es/Filter/edit/editFilter.js +78 -41
- package/es/Filter/index.js +43 -21
- package/es/Filter/popContext.js +4 -0
- package/es/Filter/remember.js +41 -18
- package/es/Form/ErrorList.js +22 -16
- package/es/Form/Form.d.ts +2 -2
- package/es/Form/Form.js +49 -27
- package/es/Form/FormItem/ItemHolder.js +42 -26
- package/es/Form/FormItem/index.d.ts +6 -6
- package/es/Form/FormItem/index.js +118 -70
- package/es/Form/FormItemInput.js +16 -14
- package/es/Form/FormItemLabel.d.ts +2 -2
- package/es/Form/FormItemLabel.js +43 -24
- package/es/Form/FormList.js +11 -3
- package/es/Form/FormWrapper.js +4 -0
- package/es/Form/WrapperItem.js +70 -34
- package/es/Form/container.js +25 -12
- package/es/Form/context.d.ts +2 -2
- package/es/Form/context.js +5 -2
- package/es/Form/hooks/useDebounce.js +4 -3
- package/es/Form/hooks/useForm.js +7 -2
- package/es/Form/hooks/useFormInstance.js +2 -1
- package/es/Form/hooks/useFormItemStatus.d.ts +1 -1
- package/es/Form/hooks/useFormItemStatus.js +4 -1
- package/es/Form/hooks/useFrameState.d.ts +1 -1
- package/es/Form/hooks/useFrameState.js +8 -3
- package/es/Form/hooks/useItemRef.js +6 -1
- package/es/Form/index.d.ts +1 -1
- package/es/Form/index.js +2 -0
- package/es/Form/interface.d.ts +2 -2
- package/es/Form/util.js +6 -2
- package/es/FullScreen/index.js +6 -3
- package/es/Grid/col.d.ts +2 -2
- package/es/Grid/col.js +41 -21
- package/es/Grid/hooks/useBreakpoint.js +3 -0
- package/es/Grid/index.js +3 -2
- package/es/Grid/row.d.ts +1 -1
- package/es/Grid/row.js +49 -31
- package/es/Icon/index.js +4 -0
- package/es/IconFont/font/iconfont.js +16 -10
- package/es/IconFont/index.js +4 -1
- package/es/IconSelect/index.js +29 -12
- package/es/ImageViewer/LmImageViewer.js +6 -0
- package/es/ImageViewer/components/Arrows.js +7 -1
- package/es/ImageViewer/components/Carousel.js +15 -13
- package/es/ImageViewer/components/Operate.js +4 -0
- package/es/ImageViewer/components/Thumb.js +10 -3
- package/es/ImageViewer/fns/index.js +26 -17
- package/es/ImageViewer/wrapeer/Container.js +5 -1
- package/es/ImageViewer/wrapeer/Root.js +19 -14
- package/es/ImageViewer/wrapeer/Wrapper.js +5 -1
- package/es/ImageViewer/wrapeer/reducer.js +13 -6
- package/es/Input/index.js +37 -30
- package/es/InputNumber/index.js +13 -9
- package/es/LeftTable/index.js +49 -25
- package/es/LmDrag/LmDrag.js +6 -0
- package/es/LmDrag/components/DndContainer.js +38 -22
- package/es/LmDrag/components/sortableBox.js +5 -4
- package/es/LmDrag/components/sortableItem.js +17 -13
- package/es/LmDrag/wrapper/Root.js +2 -0
- package/es/LmEditTable/DndContainer.js +33 -22
- package/es/LmEditTable/DragHandle.js +6 -4
- package/es/LmEditTable/EditTable.d.ts +1 -1
- package/es/LmEditTable/EditTable.js +367 -154
- package/es/LmEditTable/components/DraggableContainer.d.ts +3 -1
- package/es/LmEditTable/components/DraggableContainer.js +17 -7
- package/es/LmEditTable/components/QuickOpetate.js +12 -7
- package/es/LmEditTable/components/bottomOpetateComponent.js +6 -4
- package/es/LmEditTable/components/customRenderEmpty.js +4 -1
- package/es/LmEditTable/components/index.d.ts +3 -1
- package/es/LmEditTable/hooks/useForkRef.js +3 -0
- package/es/LmEditTable/rowSort/DndContainerRow.d.ts +3 -1
- package/es/LmEditTable/rowSort/DndContainerRow.js +77 -30
- package/es/LmEditTable/sortableBox.js +3 -1
- package/es/LmEditTable/sortableBoxCol.js +3 -1
- package/es/LmEditTable/sortableItem.js +19 -10
- package/es/LmEditTable/sortableItemCol.d.ts +0 -1
- package/es/LmEditTable/sortableItemCol.js +21 -16
- package/es/LmEditTable/util.js +46 -6
- package/es/LmEditTable/virtual/VirtualRow.js +46 -26
- package/es/LmEditTable/virtual/VirtualRow2.js +15 -7
- package/es/LmEditTable/virtual/VirtualTable.js +14 -10
- package/es/LmEditTable/virtual/VirtualWrapper.js +13 -6
- package/es/LmEditTable/virtual/context.js +15 -5
- package/es/LmFilter/Controls/CheckboxTags.js +12 -2
- package/es/LmFilter/Controls/index.js +24 -10
- package/es/LmFilter/LmFilter.js +14 -4
- package/es/LmFilter/baseFilter/fuzzySearch.js +18 -8
- package/es/LmFilter/baseFilter/index.js +7 -2
- package/es/LmFilter/clearFilter/index.js +9 -2
- package/es/LmFilter/complexFilter/drawer.js +76 -47
- package/es/LmFilter/complexFilter/index.js +14 -2
- package/es/LmFilter/complexFilter/valueDrawer.js +46 -14
- package/es/LmFilter/components/CascaderFilter.js +52 -27
- package/es/LmFilter/components/CheckboxFilter.js +52 -39
- package/es/LmFilter/components/CustomSelectFilter.js +38 -20
- package/es/LmFilter/components/DateFilter.js +39 -23
- package/es/LmFilter/components/DropdownFIlter.js +82 -49
- package/es/LmFilter/components/EmptyFilter.js +5 -0
- package/es/LmFilter/components/InputFilter.js +13 -5
- package/es/LmFilter/components/InputSearchClose.js +22 -10
- package/es/LmFilter/components/SelectFilter.js +37 -21
- package/es/LmFilter/components/index.js +34 -23
- package/es/LmFilter/customFilter/drawer.js +72 -37
- package/es/LmFilter/customFilter/index.js +24 -11
- package/es/LmFilter/customFilter/saveModal.js +36 -12
- package/es/LmFilter/customFilter/valueDrawer.js +45 -14
- package/es/LmFilter/filterFns/index.js +192 -131
- package/es/LmFilter/hooks/index.js +2 -0
- package/es/LmFilter/hooks/useDelayedFn.js +5 -2
- package/es/LmFilter/index.js +3 -0
- package/es/LmFilter/localization.js +1 -2
- package/es/LmFilter/utils.js +47 -21
- package/es/LmFilter/wrapper/Filter.js +13 -4
- package/es/LmFilter/wrapper/FilterContainer.js +5 -1
- package/es/LmFilter/wrapper/FilterRoot.js +62 -40
- package/es/LmFilter/wrapper/FilterWrapper.js +5 -1
- package/es/LmImgList/body/Banner.js +17 -13
- package/es/LmImgList/body/Thumb.js +9 -4
- package/es/LmImgList/fns/index.js +23 -15
- package/es/LmImgList/wrapper/Container.js +13 -9
- package/es/LmImgList/wrapper/Root.js +16 -13
- package/es/LmImgList/wrapper/reducer.js +11 -6
- package/es/LmSelect/GhostSelect.js +150 -99
- package/es/LmSelect/NormalSelect.js +30 -20
- package/es/LmSelect/index.js +7 -1
- package/es/LmSelect/useCheckboxOptions.js +27 -17
- package/es/LmSelect/utils.js +22 -20
- package/es/LmTable/Table.js +485 -284
- package/es/LmTable/VList.js +170 -109
- package/es/LmTable/autosize.js +43 -16
- package/es/LmTable/chartUtil.js +14 -4
- package/es/LmTable/common/index.js +7 -1
- package/es/LmTable/components/CalcExpression.js +30 -11
- package/es/LmTable/components/Container/Container.js +22 -18
- package/es/LmTable/components/DndContainer.d.ts +1 -1
- package/es/LmTable/components/DndContainer.js +211 -132
- package/es/LmTable/components/HeaderCol.js +22 -13
- package/es/LmTable/components/Item/Item.js +26 -22
- package/es/LmTable/components/Item/components/Action/Action.js +8 -4
- package/es/LmTable/components/Item/components/Remove/index.d.ts +0 -1
- package/es/LmTable/components/SortableBox.js +6 -1
- package/es/LmTable/components/customRenderEmpty.js +4 -1
- package/es/LmTable/components/inputDataEdit.js +8 -3
- package/es/LmTable/components/sheelTableCell.js +57 -32
- package/es/LmTable/components/tableChartsModal.js +30 -23
- package/es/LmTable/context.js +3 -0
- package/es/LmTable/detectElementResize.js +48 -15
- package/es/LmTable/expression.js +24 -4
- package/es/LmTable/hooks/useDndItems.js +65 -24
- package/es/LmTable/hooks/useGroupDataSource.js +6 -1
- package/es/LmTable/hooks/useResizeObserver.js +18 -13
- package/es/LmTable/hooks/useRowSelectControllableValue.js +20 -6
- package/es/LmTable/index.js +3 -0
- package/es/LmTable/multipleContainersKeyboardCoordinates.js +30 -5
- package/es/LmTable/resetConfig.js +8 -8
- package/es/LmTable/testDemos/group.js +21 -5
- package/es/LmTable/util.js +94 -27
- package/es/LmTable/virTual/VirtualRow.js +42 -25
- package/es/LmTable/virTual/VirtualTable.js +21 -12
- package/es/LmTable/virTual/VirtualWrapper.js +14 -7
- package/es/LmTable/virTual/context.js +15 -5
- package/es/LmUpload/LmUpload.js +18 -11
- package/es/LmUpload/UploadList/ItemPicture.js +9 -8
- package/es/LmUpload/UploadList/ItemPictureCard.js +38 -23
- package/es/LmUpload/UploadList/ItemText.js +7 -5
- package/es/LmUpload/UploadList/RenderItem.js +7 -1
- package/es/LmUpload/UploadList/index.js +19 -11
- package/es/LmUpload/body/Progress.js +2 -0
- package/es/LmUpload/body/UploadCore.js +18 -10
- package/es/LmUpload/body/UploadPicture.js +5 -4
- package/es/LmUpload/components/Crop.js +5 -3
- package/es/LmUpload/components/Preview.js +10 -7
- package/es/LmUpload/fns/index.js +142 -72
- package/es/LmUpload/utils.js +15 -12
- package/es/LmUpload/view/index.js +2 -0
- package/es/LmUpload/wrapper/Upload.js +2 -0
- package/es/LmUpload/wrapper/UploadContainer.js +5 -1
- package/es/LmUpload/wrapper/UploadRoot.js +18 -13
- package/es/LmUpload/wrapper/UploadWrapper.js +2 -0
- package/es/LmUpload/wrapper/reducer.js +11 -6
- package/es/LoadingPage/index.js +7 -1
- package/es/Locale/ku_IQ.js +2 -2
- package/es/Modal/index.js +25 -10
- package/es/PageHeader/index.js +44 -22
- package/es/Pagination/index.js +13 -4
- package/es/Popover/index.js +14 -5
- package/es/QuickMenu/index.js +45 -18
- package/es/Radio/index.js +24 -10
- package/es/Result/index.d.ts +6 -6
- package/es/Result/index.js +26 -16
- package/es/Result/noFound.js +2 -0
- package/es/Result/serverError.js +2 -0
- package/es/Result/unauthorized.js +2 -0
- package/es/Select/index.d.ts +1 -1
- package/es/Select/index.js +31 -20
- package/es/Switch/index.js +11 -4
- package/es/Tabs/TabPane.js +2 -0
- package/es/Tabs/hooks/useAnimateConfig.js +3 -0
- package/es/Tabs/hooks/useLegacyItems.js +12 -3
- package/es/Tabs/index.d.ts +2 -2
- package/es/Tabs/index.js +27 -15
- package/es/Tabs/index.old.js +11 -4
- package/es/Tag/index.js +13 -5
- package/es/Tooltip/index.d.ts +2 -2
- package/es/Tooltip/index.js +66 -34
- package/es/Tree/DirectoryTree.d.ts +2 -2
- package/es/Tree/DirectoryTree.js +61 -31
- package/es/Tree/Tree.d.ts +4 -4
- package/es/Tree/Tree.js +21 -14
- package/es/Tree/index.js +5 -1
- package/es/Tree/utils/dictUtil.js +21 -4
- package/es/Tree/utils/dropIndicator.d.ts +0 -1
- package/es/Tree/utils/dropIndicator.js +10 -5
- package/es/Tree/utils/iconUtil.js +13 -2
- package/es/TreeSelect/index.d.ts +1 -1
- package/es/TreeSelect/index.js +24 -15
- package/es/Typography/Base/Ellipsis.js +52 -25
- package/es/Typography/Base/EllipsisTooltip.js +8 -3
- package/es/Typography/Base/index.d.ts +1 -1
- package/es/Typography/Base/index.js +173 -104
- package/es/Typography/Editable.js +34 -21
- package/es/Typography/Link.js +11 -4
- package/es/Typography/Paragraph.js +2 -0
- package/es/Typography/Text.js +9 -1
- package/es/Typography/Title.d.ts +1 -1
- package/es/Typography/Title.js +10 -2
- package/es/Typography/Typography.js +23 -11
- package/es/Typography/hooks/useUpdatedEffect.js +1 -0
- package/es/Typography/index.d.ts +1 -1
- package/es/Upload/index.d.ts +3 -3
- package/es/Upload/index.js +6 -2
- package/es/UploadOss/index.js +4 -0
- package/es/UploadOss/uploadBtn.js +54 -32
- package/es/UploadOss/uploadImg.js +86 -58
- package/es/VirtualList/index.js +27 -18
- package/es/_util/colors.d.ts +2 -2
- package/es/_util/colors.js +2 -2
- package/es/_util/domTarget.d.ts +3 -3
- package/es/_util/domTarget.js +3 -0
- package/es/_util/getDataOrAriaProps.js +1 -0
- package/es/_util/getRenderPropValue.d.ts +1 -1
- package/es/_util/getRenderPropValue.js +3 -0
- package/es/_util/hooks/useFlexGapSupport.js +4 -3
- package/es/_util/hooks/useForceUpdate.js +5 -4
- package/es/_util/motion.d.ts +1 -1
- package/es/_util/motion.js +11 -2
- package/es/_util/placements.js +8 -7
- package/es/_util/reactNode.d.ts +2 -2
- package/es/_util/responsiveObserve.d.ts +5 -5
- package/es/_util/responsiveObserve.js +5 -0
- package/es/_util/statusUtils.d.ts +1 -1
- package/es/_util/statusUtils.js +1 -0
- package/es/_util/styleChecker.js +9 -6
- package/es/_util/throttleByAnimationFrame.js +6 -0
- package/es/_util/transButton.js +15 -3
- package/es/_util/type.d.ts +2 -2
- package/es/_util/type.js +2 -0
- package/es/_util/warning.d.ts +1 -1
- package/es/_util/warning.js +6 -4
- package/es/hooks/useEvent/index.js +7 -6
- package/es/hooks/useFullscreen/index.d.ts +3 -3
- package/es/hooks/useFullscreen/index.js +29 -7
- package/es/locale-provider/LocaleReceiver.d.ts +1 -1
- package/es/locale-provider/LocaleReceiver.js +12 -4
- package/es/locale-provider/context.d.ts +1 -1
- package/es/locale-provider/index.js +11 -2
- package/es/message/hooks/useMessage.js +17 -8
- package/es/message/index.d.ts +10 -10
- package/es/message/index.js +36 -8
- package/es/notification/hooks/useNotification.js +12 -8
- package/es/notification/index.d.ts +2 -2
- package/es/notification/index.js +67 -31
- package/es/services/newRequest.js +47 -18
- package/es/services/utils.js +15 -0
- package/lib/Affix/index.d.ts +1 -1
- package/lib/Affix/index.js +104 -37
- package/lib/Affix/utils.d.ts +1 -1
- package/lib/Affix/utils.js +22 -6
- package/lib/Alert/ErrorBoundary.js +21 -5
- package/lib/Alert/index.js +78 -42
- package/lib/Approval/handle.js +37 -10
- package/lib/Approval/index.js +131 -63
- package/lib/Approval/type.d.ts +1 -1
- package/lib/Approval/type.js +24 -0
- package/lib/Approval/util.js +30 -4
- package/lib/AutoComplete/index.d.ts +1 -1
- package/lib/AutoComplete/index.js +34 -10
- package/lib/Avatar/index.js +4 -0
- package/lib/Badge/Ribbon.d.ts +1 -1
- package/lib/Badge/Ribbon.js +23 -9
- package/lib/Badge/ScrollNumber.js +35 -17
- package/lib/Badge/SingleNumber.d.ts +0 -1
- package/lib/Badge/SingleNumber.js +43 -23
- package/lib/Badge/index.js +79 -44
- package/lib/Badge/utils.js +2 -0
- package/lib/Box/LmBox.js +5 -0
- package/lib/Box/body/Item.js +7 -1
- package/lib/Box/body/List.js +6 -0
- package/lib/Box/body/OverflowList.js +4 -0
- package/lib/Box/index.js +3 -0
- package/lib/Box/wrapper/BoxContainer.js +19 -8
- package/lib/Box/wrapper/BoxRoot.js +14 -5
- package/lib/Box/wrapper/BoxWrapper.js +5 -0
- package/lib/Box/wrapper/reducer.js +8 -2
- package/lib/Breadcrumb/index.js +4 -0
- package/lib/Button/index.js +25 -10
- package/lib/ButtonTags/ButtonTags.js +15 -6
- package/lib/ButtonTags/index.js +3 -0
- package/lib/Calendar/index.js +4 -0
- package/lib/Card/index.js +4 -0
- package/lib/CardTable/LmCardTable.js +28 -19
- package/lib/CardTable/body/TableBody.js +26 -17
- package/lib/CardTable/body/TableBodyCell.js +17 -9
- package/lib/CardTable/body/TableBodyRow.js +19 -13
- package/lib/CardTable/card/PictureTextColumn.js +28 -18
- package/lib/CardTable/card/PictureTextRow.js +31 -18
- package/lib/CardTable/card/PictureTextRowOperate.js +30 -17
- package/lib/CardTable/context.js +5 -0
- package/lib/CardTable/empty.js +6 -1
- package/lib/CardTable/fns/index.js +36 -22
- package/lib/CardTable/footer.js +15 -4
- package/lib/CardTable/hooks/usePagination.js +50 -35
- package/lib/CardTable/index.js +5 -0
- package/lib/CardTable/pager/TablePagination.js +15 -8
- package/lib/CardTable/pager/index.js +13 -6
- package/lib/CardTable/table/Table.js +6 -2
- package/lib/CardTable/table/TableContainer.js +23 -14
- package/lib/CardTable/table/TableRoot.js +65 -45
- package/lib/CardTable/table/TableWrapper.js +9 -2
- package/lib/CardTable/toolbar/ToolBarBottom.js +8 -3
- package/lib/CardTable/utils.js +9 -3
- package/lib/Carousel/index.js +4 -0
- package/lib/Cascader/index.js +30 -11
- package/lib/Checkbox/index.js +18 -7
- package/lib/Col/index.js +2 -0
- package/lib/Collapse/index.js +4 -0
- package/lib/Comment/index.js +4 -0
- package/lib/ConfigProvider/DisabledContext.d.ts +1 -1
- package/lib/ConfigProvider/DisabledContext.js +6 -1
- package/lib/ConfigProvider/SizeContext.d.ts +1 -1
- package/lib/ConfigProvider/SizeContext.js +6 -1
- package/lib/ConfigProvider/context.d.ts +2 -2
- package/lib/ConfigProvider/context.js +13 -4
- package/lib/ConfigProvider/cssVariables.js +34 -17
- package/lib/ConfigProvider/defaultRenderEmpty.d.ts +1 -1
- package/lib/ConfigProvider/defaultRenderEmpty.js +12 -0
- package/lib/ConfigProvider/index.js +75 -30
- package/lib/CropImg/LmCropImg.js +5 -0
- package/lib/CropImg/body/Operate.js +23 -10
- package/lib/CropImg/body/index.js +13 -6
- package/lib/CropImg/fns/index.js +12 -8
- package/lib/CropImg/index.js +3 -0
- package/lib/CropImg/utils.js +45 -27
- package/lib/CropImg/wrapper/Container.js +26 -7
- package/lib/CropImg/wrapper/Root.js +24 -13
- package/lib/CropImg/wrapper/Wrapper.js +6 -0
- package/lib/CropImg/wrapper/reducer.js +12 -5
- package/lib/CustomTableOption/cardSort.js +60 -24
- package/lib/CustomTableOption/columnsSort.js +77 -29
- package/lib/CustomTableOption/filterSort.js +65 -28
- package/lib/CustomTableOption/index.js +44 -18
- package/lib/CustomerService/components/question.js +20 -3
- package/lib/CustomerService/index.js +46 -18
- package/lib/DatePicker/PickerButton.d.ts +0 -1
- package/lib/DatePicker/PickerButton.js +4 -0
- package/lib/DatePicker/PickerTag.d.ts +0 -1
- package/lib/DatePicker/PickerTag.js +4 -0
- package/lib/DatePicker/generatePicker/generateRangePicker.js +52 -23
- package/lib/DatePicker/generatePicker/generateSinglePicker.js +56 -22
- package/lib/DatePicker/generatePicker/index.d.ts +13 -13
- package/lib/DatePicker/generatePicker/index.js +33 -12
- package/lib/DatePicker/generatePicker/interface.d.ts +3 -3
- package/lib/DatePicker/index.d.ts +4 -4
- package/lib/DatePicker/index.js +6 -0
- package/lib/DatePicker/util.js +20 -0
- package/lib/Descriptions/Cell.js +22 -11
- package/lib/Descriptions/Item.js +2 -0
- package/lib/Descriptions/Row.js +36 -24
- package/lib/Descriptions/index.js +61 -28
- package/lib/Divider/index.js +28 -12
- package/lib/Drawer/index.js +16 -4
- package/lib/Dropdown/index.js +48 -19
- package/lib/EditTable/EditTable.js +171 -75
- package/lib/EditTable/index.js +3 -0
- package/lib/Empty/empty.js +7 -1
- package/lib/Empty/index.js +33 -10
- package/lib/Empty/simple.js +7 -1
- package/lib/EnlargeImg/index.js +43 -17
- package/lib/Filter/Popover.js +65 -29
- package/lib/Filter/baseFilter/Popover.js +70 -28
- package/lib/Filter/baseFilter/ToggleFilter.js +25 -9
- package/lib/Filter/baseFilter/index.js +28 -8
- package/lib/Filter/complex/ComplexFilter.js +47 -16
- package/lib/Filter/complex/ComplexItem.js +47 -24
- package/lib/Filter/components/Checkbox.js +34 -14
- package/lib/Filter/components/Date.js +30 -10
- package/lib/Filter/components/Input.js +23 -7
- package/lib/Filter/components/Select.js +33 -13
- package/lib/Filter/components/Tree.js +24 -8
- package/lib/Filter/components/header.js +17 -3
- package/lib/Filter/components/index.js +6 -0
- package/lib/Filter/context.js +4 -0
- package/lib/Filter/edit/editFilter.js +78 -41
- package/lib/Filter/index.js +43 -21
- package/lib/Filter/popContext.js +4 -0
- package/lib/Filter/remember.js +41 -18
- package/lib/Form/ErrorList.js +34 -16
- package/lib/Form/Form.d.ts +2 -2
- package/lib/Form/Form.js +62 -27
- package/lib/Form/FormItem/ItemHolder.js +60 -26
- package/lib/Form/FormItem/index.d.ts +6 -6
- package/lib/Form/FormItem/index.js +138 -70
- package/lib/Form/FormItemInput.js +23 -14
- package/lib/Form/FormItemLabel.d.ts +2 -2
- package/lib/Form/FormItemLabel.js +55 -24
- package/lib/Form/FormList.js +18 -3
- package/lib/Form/FormWrapper.js +8 -0
- package/lib/Form/WrapperItem.js +79 -34
- package/lib/Form/container.js +32 -12
- package/lib/Form/context.d.ts +2 -2
- package/lib/Form/context.js +15 -2
- package/lib/Form/hooks/useDebounce.js +9 -3
- package/lib/Form/hooks/useForm.js +14 -2
- package/lib/Form/hooks/useFormInstance.js +5 -1
- package/lib/Form/hooks/useFormItemStatus.d.ts +1 -1
- package/lib/Form/hooks/useFormItemStatus.js +8 -1
- package/lib/Form/hooks/useFrameState.d.ts +1 -1
- package/lib/Form/hooks/useFrameState.js +16 -3
- package/lib/Form/hooks/useItemRef.js +13 -1
- package/lib/Form/index.d.ts +1 -1
- package/lib/Form/index.js +13 -0
- package/lib/Form/interface.d.ts +2 -2
- package/lib/Form/util.js +9 -2
- package/lib/FullScreen/index.js +10 -3
- package/lib/Grid/RowContext.js +2 -0
- package/lib/Grid/col.d.ts +2 -2
- package/lib/Grid/col.js +48 -21
- package/lib/Grid/hooks/useBreakpoint.js +8 -0
- package/lib/Grid/index.js +7 -0
- package/lib/Grid/row.d.ts +1 -1
- package/lib/Grid/row.js +62 -31
- package/lib/Icon/index.js +4 -0
- package/lib/IconFont/font/iconfont.js +16 -10
- package/lib/IconFont/index.js +11 -1
- package/lib/IconSelect/index.js +29 -12
- package/lib/Image/index.js +4 -0
- package/lib/ImageViewer/LmImageViewer.js +11 -0
- package/lib/ImageViewer/components/Arrows.js +10 -1
- package/lib/ImageViewer/components/Carousel.js +18 -13
- package/lib/ImageViewer/components/Operate.js +7 -0
- package/lib/ImageViewer/components/Thumb.js +15 -3
- package/lib/ImageViewer/fns/index.js +27 -17
- package/lib/ImageViewer/index.js +3 -0
- package/lib/ImageViewer/wrapeer/Container.js +12 -2
- package/lib/ImageViewer/wrapeer/Root.js +27 -15
- package/lib/ImageViewer/wrapeer/Wrapper.js +9 -2
- package/lib/ImageViewer/wrapeer/reducer.js +16 -6
- package/lib/Input/index.js +49 -30
- package/lib/InputNumber/index.js +23 -9
- package/lib/Layout/index.js +4 -0
- package/lib/LeftTable/index.js +49 -25
- package/lib/List/index.js +4 -0
- package/lib/LmDrag/LmDrag.js +11 -0
- package/lib/LmDrag/components/DndContainer.js +47 -22
- package/lib/LmDrag/components/sortableBox.js +9 -2
- package/lib/LmDrag/components/sortableItem.js +22 -13
- package/lib/LmDrag/index.js +3 -0
- package/lib/LmDrag/wrapper/Root.js +7 -0
- package/lib/LmEditTable/DndContainer.js +43 -22
- package/lib/LmEditTable/DragHandle.js +12 -4
- package/lib/LmEditTable/EditTable.d.ts +1 -1
- package/lib/LmEditTable/EditTable.js +394 -154
- package/lib/LmEditTable/components/DraggableContainer.d.ts +3 -1
- package/lib/LmEditTable/components/DraggableContainer.js +22 -7
- package/lib/LmEditTable/components/QuickOpetate.js +18 -7
- package/lib/LmEditTable/components/bottomOpetateComponent.js +9 -4
- package/lib/LmEditTable/components/customRenderEmpty.js +8 -1
- package/lib/LmEditTable/components/index.d.ts +3 -1
- package/lib/LmEditTable/components/index.js +6 -0
- package/lib/LmEditTable/hooks/useForkRef.js +4 -0
- package/lib/LmEditTable/index.js +3 -0
- package/lib/LmEditTable/rowSort/DndContainerRow.d.ts +3 -1
- package/lib/LmEditTable/rowSort/DndContainerRow.js +85 -29
- package/lib/LmEditTable/sortableBox.js +6 -1
- package/lib/LmEditTable/sortableBoxCol.js +6 -1
- package/lib/LmEditTable/sortableItem.js +25 -10
- package/lib/LmEditTable/sortableItemCol.d.ts +0 -1
- package/lib/LmEditTable/sortableItemCol.js +22 -11
- package/lib/LmEditTable/util.js +60 -6
- package/lib/LmEditTable/virtual/VirtualRow.js +53 -26
- package/lib/LmEditTable/virtual/VirtualRow2.js +22 -7
- package/lib/LmEditTable/virtual/VirtualTable.js +22 -10
- package/lib/LmEditTable/virtual/VirtualWrapper.js +18 -6
- package/lib/LmEditTable/virtual/context.js +15 -3
- package/lib/LmEditTable/virtual/index.js +4 -0
- package/lib/LmFilter/Controls/CheckboxTags.js +12 -2
- package/lib/LmFilter/Controls/index.js +24 -10
- package/lib/LmFilter/LmFilter.js +14 -4
- package/lib/LmFilter/baseFilter/fuzzySearch.js +18 -8
- package/lib/LmFilter/baseFilter/index.js +7 -2
- package/lib/LmFilter/clearFilter/index.js +9 -2
- package/lib/LmFilter/complexFilter/drawer.js +76 -47
- package/lib/LmFilter/complexFilter/index.js +14 -2
- package/lib/LmFilter/complexFilter/valueDrawer.js +46 -14
- package/lib/LmFilter/components/CascaderFilter.js +52 -27
- package/lib/LmFilter/components/CheckboxFilter.js +52 -39
- package/lib/LmFilter/components/CustomSelectFilter.js +38 -20
- package/lib/LmFilter/components/DateFilter.js +39 -23
- package/lib/LmFilter/components/DropdownFIlter.js +82 -49
- package/lib/LmFilter/components/EmptyFilter.js +5 -0
- package/lib/LmFilter/components/InputFilter.js +13 -5
- package/lib/LmFilter/components/InputSearchClose.js +22 -10
- package/lib/LmFilter/components/SelectFilter.js +37 -21
- package/lib/LmFilter/components/index.js +34 -23
- package/lib/LmFilter/customFilter/drawer.js +72 -37
- package/lib/LmFilter/customFilter/index.js +24 -11
- package/lib/LmFilter/customFilter/saveModal.js +36 -12
- package/lib/LmFilter/customFilter/valueDrawer.js +45 -14
- package/lib/LmFilter/filterFns/index.js +198 -129
- package/lib/LmFilter/hooks/index.js +2 -0
- package/lib/LmFilter/hooks/useDelayedFn.js +5 -2
- package/lib/LmFilter/index.js +3 -0
- package/lib/LmFilter/localization.js +1 -2
- package/lib/LmFilter/utils.js +47 -21
- package/lib/LmFilter/wrapper/Filter.js +13 -4
- package/lib/LmFilter/wrapper/FilterContainer.js +5 -1
- package/lib/LmFilter/wrapper/FilterRoot.js +62 -40
- package/lib/LmFilter/wrapper/FilterWrapper.js +5 -1
- package/lib/LmImgList/LmImgList.js +5 -0
- package/lib/LmImgList/body/Banner.js +22 -13
- package/lib/LmImgList/body/Thumb.js +16 -4
- package/lib/LmImgList/fns/index.js +24 -15
- package/lib/LmImgList/index.js +4 -0
- package/lib/LmImgList/wrapper/Container.js +21 -9
- package/lib/LmImgList/wrapper/Root.js +24 -13
- package/lib/LmImgList/wrapper/Wrapper.js +5 -0
- package/lib/LmImgList/wrapper/reducer.js +14 -6
- package/lib/LmSelect/GhostSelect.js +163 -99
- package/lib/LmSelect/NormalSelect.js +40 -20
- package/lib/LmSelect/index.js +14 -1
- package/lib/LmSelect/useCheckboxOptions.js +37 -17
- package/lib/LmSelect/utils.js +38 -18
- package/lib/LmTable/Table.js +485 -284
- package/lib/LmTable/VList.js +170 -109
- package/lib/LmTable/autosize.js +43 -16
- package/lib/LmTable/chartUtil.js +14 -4
- package/lib/LmTable/common/index.js +9 -1
- package/lib/LmTable/components/CalcExpression.js +37 -11
- package/lib/LmTable/components/Container/Container.js +26 -16
- package/lib/LmTable/components/Container/index.js +1 -0
- package/lib/LmTable/components/DndContainer.d.ts +1 -1
- package/lib/LmTable/components/DndContainer.js +223 -128
- package/lib/LmTable/components/HeaderCol.js +22 -13
- package/lib/LmTable/components/Item/Item.js +32 -20
- package/lib/LmTable/components/Item/components/Action/Action.js +14 -4
- package/lib/LmTable/components/Item/components/Action/index.js +1 -0
- package/lib/LmTable/components/Item/components/Handle/index.js +4 -0
- package/lib/LmTable/components/Item/components/Remove/index.d.ts +0 -1
- package/lib/LmTable/components/Item/components/Remove/index.js +4 -0
- package/lib/LmTable/components/Item/components/index.js +4 -0
- package/lib/LmTable/components/Item/index.js +2 -0
- package/lib/LmTable/components/SortableBox.js +6 -1
- package/lib/LmTable/components/customRenderEmpty.js +8 -1
- package/lib/LmTable/components/inputDataEdit.js +11 -3
- package/lib/LmTable/components/sheelTableCell.js +65 -32
- package/lib/LmTable/components/tableChartsModal.js +26 -12
- package/lib/LmTable/context.js +3 -0
- package/lib/LmTable/detectElementResize.js +48 -15
- package/lib/LmTable/expression.js +28 -4
- package/lib/LmTable/hooks/useDndItems.js +70 -24
- package/lib/LmTable/hooks/useGroupDataSource.js +6 -1
- package/lib/LmTable/hooks/useResizeObserver.js +23 -13
- package/lib/LmTable/hooks/useRowSelectControllableValue.js +20 -6
- package/lib/LmTable/index.js +3 -0
- package/lib/LmTable/multipleContainersKeyboardCoordinates.js +32 -5
- package/lib/LmTable/resetConfig.js +8 -8
- package/lib/LmTable/testDemos/group.js +21 -5
- package/lib/LmTable/util.js +94 -27
- package/lib/LmTable/virTual/VirtualRow.js +46 -25
- package/lib/LmTable/virTual/VirtualTable.js +30 -12
- package/lib/LmTable/virTual/VirtualWrapper.js +19 -7
- package/lib/LmTable/virTual/context.js +15 -3
- package/lib/LmTable/virTual/index.js +4 -0
- package/lib/LmUpload/LmUpload.js +26 -11
- package/lib/LmUpload/UploadList/ItemPicture.js +13 -6
- package/lib/LmUpload/UploadList/ItemPictureCard.js +44 -23
- package/lib/LmUpload/UploadList/ItemText.js +12 -5
- package/lib/LmUpload/UploadList/RenderItem.js +14 -1
- package/lib/LmUpload/UploadList/index.js +26 -11
- package/lib/LmUpload/body/Progress.js +5 -0
- package/lib/LmUpload/body/UploadCore.js +24 -8
- package/lib/LmUpload/body/UploadPicture.js +10 -2
- package/lib/LmUpload/components/Crop.js +9 -3
- package/lib/LmUpload/components/Preview.js +14 -7
- package/lib/LmUpload/fns/index.js +147 -71
- package/lib/LmUpload/index.js +3 -0
- package/lib/LmUpload/utils.js +24 -10
- package/lib/LmUpload/view/index.js +4 -0
- package/lib/LmUpload/wrapper/Upload.js +6 -1
- package/lib/LmUpload/wrapper/UploadContainer.js +11 -2
- package/lib/LmUpload/wrapper/UploadRoot.js +26 -14
- package/lib/LmUpload/wrapper/UploadWrapper.js +9 -1
- package/lib/LmUpload/wrapper/reducer.js +15 -6
- package/lib/LoadingPage/index.js +7 -1
- package/lib/Locale/ar_EG.js +6 -1
- package/lib/Locale/az_AZ.js +6 -1
- package/lib/Locale/bg_BG.js +6 -0
- package/lib/Locale/bn_BD.js +6 -1
- package/lib/Locale/by_BY.js +6 -1
- package/lib/Locale/ca_ES.js +6 -1
- package/lib/Locale/cs_CZ.js +6 -1
- package/lib/Locale/da_DK.js +6 -0
- package/lib/Locale/de_DE.js +6 -1
- package/lib/Locale/default.js +7 -1
- package/lib/Locale/el_GR.js +6 -0
- package/lib/Locale/en_GB.js +6 -1
- package/lib/Locale/en_US.js +3 -0
- package/lib/Locale/es_ES.js +6 -1
- package/lib/Locale/et_EE.js +6 -1
- package/lib/Locale/fa_IR.js +6 -1
- package/lib/Locale/fi_FI.js +6 -0
- package/lib/Locale/fr_BE.js +6 -0
- package/lib/Locale/fr_CA.js +6 -0
- package/lib/Locale/fr_FR.js +6 -1
- package/lib/Locale/ga_IE.js +6 -1
- package/lib/Locale/gl_ES.js +6 -1
- package/lib/Locale/he_IL.js +6 -1
- package/lib/Locale/hi_IN.js +6 -1
- package/lib/Locale/hr_HR.js +6 -1
- package/lib/Locale/hu_HU.js +6 -0
- package/lib/Locale/id_ID.js +6 -0
- package/lib/Locale/is_IS.js +6 -0
- package/lib/Locale/it_IT.js +6 -0
- package/lib/Locale/ja_JP.js +6 -1
- package/lib/Locale/ka_GE.js +6 -1
- package/lib/Locale/kk_KZ.js +6 -1
- package/lib/Locale/km_KH.js +6 -1
- package/lib/Locale/kmr_IQ.js +6 -0
- package/lib/Locale/kn_IN.js +6 -0
- package/lib/Locale/ko_KR.js +6 -1
- package/lib/Locale/ku_IQ.js +6 -0
- package/lib/Locale/lt_LT.js +6 -1
- package/lib/Locale/lv_LV.js +6 -0
- package/lib/Locale/mk_MK.js +6 -0
- package/lib/Locale/ml_IN.js +6 -1
- package/lib/Locale/mn_MN.js +6 -0
- package/lib/Locale/ms_MY.js +6 -0
- package/lib/Locale/nb_NO.js +6 -1
- package/lib/Locale/ne_NP.js +6 -0
- package/lib/Locale/nl_BE.js +6 -1
- package/lib/Locale/nl_NL.js +6 -1
- package/lib/Locale/pl_PL.js +6 -1
- package/lib/Locale/pt_BR.js +6 -1
- package/lib/Locale/pt_PT.js +6 -0
- package/lib/Locale/ro_RO.js +6 -1
- package/lib/Locale/ru_RU.js +6 -1
- package/lib/Locale/si_LK.js +6 -1
- package/lib/Locale/sk_SK.js +6 -1
- package/lib/Locale/sl_SI.js +6 -0
- package/lib/Locale/sr_RS.js +6 -1
- package/lib/Locale/sv_SE.js +6 -1
- package/lib/Locale/ta_IN.js +6 -0
- package/lib/Locale/th_TH.js +6 -1
- package/lib/Locale/tk_TK.js +6 -1
- package/lib/Locale/tr_TR.js +6 -1
- package/lib/Locale/uk_UA.js +6 -1
- package/lib/Locale/ur_PK.js +6 -1
- package/lib/Locale/vi_VN.js +6 -0
- package/lib/Locale/zh_CN.js +7 -1
- package/lib/Locale/zh_HK.js +6 -1
- package/lib/Locale/zh_TW.js +6 -1
- package/lib/Mentions/index.js +4 -0
- package/lib/Menu/index.js +4 -0
- package/lib/Modal/index.js +36 -10
- package/lib/Modal/locale.js +5 -0
- package/lib/PageHeader/index.js +60 -22
- package/lib/Pagination/index.js +20 -4
- package/lib/Popconfirm/index.js +4 -0
- package/lib/Popover/index.js +23 -5
- package/lib/Progress/index.js +4 -0
- package/lib/QuickMenu/index.js +54 -18
- package/lib/Radio/index.js +24 -10
- package/lib/Rate/index.js +4 -0
- package/lib/Result/index.d.ts +6 -6
- package/lib/Result/index.js +41 -16
- package/lib/Result/noFound.js +4 -0
- package/lib/Result/serverError.js +4 -0
- package/lib/Result/unauthorized.js +4 -0
- package/lib/Row/index.js +2 -0
- package/lib/Segmented/index.js +4 -0
- package/lib/Select/index.d.ts +1 -1
- package/lib/Select/index.js +41 -20
- package/lib/Skeleton/index.js +4 -0
- package/lib/Slider/index.js +4 -0
- package/lib/Space/index.js +4 -0
- package/lib/Spin/index.js +4 -0
- package/lib/Statistic/index.js +4 -0
- package/lib/Steps/index.js +4 -0
- package/lib/Switch/index.js +18 -4
- package/lib/Table/index.js +4 -0
- package/lib/Tabs/TabPane.js +3 -0
- package/lib/Tabs/hooks/useAnimateConfig.js +8 -0
- package/lib/Tabs/hooks/useLegacyItems.js +17 -3
- package/lib/Tabs/index.d.ts +2 -2
- package/lib/Tabs/index.js +43 -15
- package/lib/Tabs/index.old.js +17 -4
- package/lib/Tag/index.js +20 -5
- package/lib/TestTable/LmBox.js +3 -0
- package/lib/TestTable/index.js +3 -0
- package/lib/TimePicker/index.js +4 -0
- package/lib/Timeline/index.js +4 -0
- package/lib/Tooltip/index.d.ts +2 -2
- package/lib/Tooltip/index.js +80 -34
- package/lib/Transfer/index.js +4 -0
- package/lib/Tree/DirectoryTree.d.ts +2 -2
- package/lib/Tree/DirectoryTree.js +74 -29
- package/lib/Tree/Tree.d.ts +4 -4
- package/lib/Tree/Tree.js +35 -14
- package/lib/Tree/TreeIndex.js +3 -0
- package/lib/Tree/index.js +11 -1
- package/lib/Tree/utils/dictUtil.js +24 -4
- package/lib/Tree/utils/dropIndicator.d.ts +0 -1
- package/lib/Tree/utils/dropIndicator.js +15 -5
- package/lib/Tree/utils/iconUtil.js +25 -2
- package/lib/TreeSelect/index.d.ts +1 -1
- package/lib/TreeSelect/index.js +35 -15
- package/lib/Typography/Base/Ellipsis.js +58 -25
- package/lib/Typography/Base/EllipsisTooltip.js +12 -3
- package/lib/Typography/Base/index.d.ts +1 -1
- package/lib/Typography/Base/index.js +200 -104
- package/lib/Typography/Editable.js +45 -21
- package/lib/Typography/Link.js +17 -4
- package/lib/Typography/Paragraph.js +7 -0
- package/lib/Typography/Text.js +16 -1
- package/lib/Typography/Title.d.ts +1 -1
- package/lib/Typography/Title.js +18 -2
- package/lib/Typography/Typography.js +30 -11
- package/lib/Typography/hooks/useMergedConfig.js +5 -0
- package/lib/Typography/hooks/useUpdatedEffect.js +4 -0
- package/lib/Typography/index.d.ts +1 -1
- package/lib/Typography/index.js +9 -0
- package/lib/Upload/index.d.ts +3 -3
- package/lib/Upload/index.js +13 -2
- package/lib/UploadOss/index.js +4 -0
- package/lib/UploadOss/uploadBtn.js +54 -32
- package/lib/UploadOss/uploadImg.js +86 -58
- package/lib/VirtualList/index.js +27 -18
- package/lib/_util/colors.d.ts +2 -2
- package/lib/_util/colors.js +4 -2
- package/lib/_util/domTarget.d.ts +3 -3
- package/lib/_util/domTarget.js +6 -0
- package/lib/_util/getDataOrAriaProps.js +2 -0
- package/lib/_util/getRenderPropValue.d.ts +1 -1
- package/lib/_util/getRenderPropValue.js +5 -0
- package/lib/_util/hooks/useFlexGapSupport.js +11 -3
- package/lib/_util/hooks/useForceUpdate.js +10 -4
- package/lib/_util/motion.d.ts +1 -1
- package/lib/_util/motion.js +12 -0
- package/lib/_util/placements.js +12 -7
- package/lib/_util/reactNode.d.ts +2 -2
- package/lib/_util/reactNode.js +5 -0
- package/lib/_util/responsiveObserve.d.ts +5 -5
- package/lib/_util/responsiveObserve.js +8 -0
- package/lib/_util/statusUtils.d.ts +1 -1
- package/lib/_util/statusUtils.js +9 -0
- package/lib/_util/styleChecker.js +16 -6
- package/lib/_util/throttleByAnimationFrame.js +12 -0
- package/lib/_util/transButton.js +19 -3
- package/lib/_util/type.d.ts +2 -2
- package/lib/_util/type.js +6 -0
- package/lib/_util/warning.d.ts +1 -1
- package/lib/_util/warning.js +10 -4
- package/lib/hooks/index.js +3 -0
- package/lib/hooks/useEvent/index.js +7 -4
- package/lib/hooks/useFullscreen/index.d.ts +3 -3
- package/lib/hooks/useFullscreen/index.js +33 -7
- package/lib/index.js +89 -0
- package/lib/locale-provider/LocaleReceiver.d.ts +1 -1
- package/lib/locale-provider/LocaleReceiver.js +20 -4
- package/lib/locale-provider/ar_EG.js +3 -0
- package/lib/locale-provider/az_AZ.js +3 -0
- package/lib/locale-provider/bg_BG.js +3 -0
- package/lib/locale-provider/bn_BD.js +3 -0
- package/lib/locale-provider/by_BY.js +3 -0
- package/lib/locale-provider/ca_ES.js +3 -0
- package/lib/locale-provider/context.d.ts +1 -1
- package/lib/locale-provider/context.js +2 -0
- package/lib/locale-provider/cs_CZ.js +3 -0
- package/lib/locale-provider/da_DK.js +3 -0
- package/lib/locale-provider/de_DE.js +3 -0
- package/lib/locale-provider/default.js +3 -0
- package/lib/locale-provider/el_GR.js +3 -0
- package/lib/locale-provider/en_GB.js +3 -0
- package/lib/locale-provider/en_US.js +3 -0
- package/lib/locale-provider/es_ES.js +3 -0
- package/lib/locale-provider/et_EE.js +3 -0
- package/lib/locale-provider/fa_IR.js +3 -0
- package/lib/locale-provider/fi_FI.js +3 -0
- package/lib/locale-provider/fr_BE.js +3 -0
- package/lib/locale-provider/fr_CA.js +3 -0
- package/lib/locale-provider/fr_FR.js +3 -0
- package/lib/locale-provider/ga_IE.js +3 -0
- package/lib/locale-provider/gl_ES.js +3 -0
- package/lib/locale-provider/he_IL.js +3 -0
- package/lib/locale-provider/hi_IN.js +3 -0
- package/lib/locale-provider/hr_HR.js +3 -0
- package/lib/locale-provider/hu_HU.js +3 -0
- package/lib/locale-provider/hy_AM.js +3 -0
- package/lib/locale-provider/id_ID.js +3 -0
- package/lib/locale-provider/index.js +21 -2
- package/lib/locale-provider/is_IS.js +3 -0
- package/lib/locale-provider/it_IT.js +3 -0
- package/lib/locale-provider/ja_JP.js +3 -0
- package/lib/locale-provider/ka_GE.js +3 -0
- package/lib/locale-provider/kk_KZ.js +3 -0
- package/lib/locale-provider/km_KH.js +3 -0
- package/lib/locale-provider/kmr_IQ.js +3 -0
- package/lib/locale-provider/kn_IN.js +3 -0
- package/lib/locale-provider/ko_KR.js +3 -0
- package/lib/locale-provider/ku_IQ.js +3 -0
- package/lib/locale-provider/lt_LT.js +3 -0
- package/lib/locale-provider/lv_LV.js +3 -0
- package/lib/locale-provider/mk_MK.js +3 -0
- package/lib/locale-provider/ml_IN.js +3 -0
- package/lib/locale-provider/mn_MN.js +3 -0
- package/lib/locale-provider/ms_MY.js +3 -0
- package/lib/locale-provider/nb_NO.js +3 -0
- package/lib/locale-provider/ne_NP.js +3 -0
- package/lib/locale-provider/nl_BE.js +3 -0
- package/lib/locale-provider/nl_NL.js +3 -0
- package/lib/locale-provider/pl_PL.js +3 -0
- package/lib/locale-provider/pt_BR.js +3 -0
- package/lib/locale-provider/pt_PT.js +3 -0
- package/lib/locale-provider/ro_RO.js +3 -0
- package/lib/locale-provider/ru_RU.js +3 -0
- package/lib/locale-provider/si_LK.js +3 -0
- package/lib/locale-provider/sk_SK.js +3 -0
- package/lib/locale-provider/sl_SI.js +3 -0
- package/lib/locale-provider/sr_RS.js +3 -0
- package/lib/locale-provider/sv_SE.js +3 -0
- package/lib/locale-provider/ta_IN.js +3 -0
- package/lib/locale-provider/th_TH.js +3 -0
- package/lib/locale-provider/tk_TK.js +3 -0
- package/lib/locale-provider/tr_TR.js +3 -0
- package/lib/locale-provider/uk_UA.js +3 -0
- package/lib/locale-provider/ur_PK.js +3 -0
- package/lib/locale-provider/vi_VN.js +3 -0
- package/lib/locale-provider/zh_CN.js +3 -0
- package/lib/locale-provider/zh_HK.js +3 -0
- package/lib/locale-provider/zh_TW.js +3 -0
- package/lib/message/hooks/useMessage.js +27 -8
- package/lib/message/index.d.ts +10 -10
- package/lib/message/index.js +53 -8
- package/lib/notification/hooks/useNotification.js +19 -8
- package/lib/notification/index.d.ts +2 -2
- package/lib/notification/index.js +80 -31
- package/lib/services/newRequest.js +47 -18
- package/lib/services/utils.js +15 -0
- package/package.json +1 -1
|
@@ -2,12 +2,14 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
|
+
|
|
5
6
|
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
6
7
|
function adopt(value) {
|
|
7
8
|
return value instanceof P ? value : new P(function (resolve) {
|
|
8
9
|
resolve(value);
|
|
9
10
|
});
|
|
10
11
|
}
|
|
12
|
+
|
|
11
13
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
12
14
|
function fulfilled(value) {
|
|
13
15
|
try {
|
|
@@ -16,6 +18,7 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
|
|
|
16
18
|
reject(e);
|
|
17
19
|
}
|
|
18
20
|
}
|
|
21
|
+
|
|
19
22
|
function rejected(value) {
|
|
20
23
|
try {
|
|
21
24
|
step(generator["throw"](value));
|
|
@@ -23,22 +26,28 @@ var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, gene
|
|
|
23
26
|
reject(e);
|
|
24
27
|
}
|
|
25
28
|
}
|
|
29
|
+
|
|
26
30
|
function step(result) {
|
|
27
31
|
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
28
32
|
}
|
|
33
|
+
|
|
29
34
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
30
35
|
});
|
|
31
36
|
};
|
|
37
|
+
|
|
32
38
|
var __rest = this && this.__rest || function (s, e) {
|
|
33
39
|
var t = {};
|
|
40
|
+
|
|
34
41
|
for (var p in s) {
|
|
35
42
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
36
43
|
}
|
|
44
|
+
|
|
37
45
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
38
46
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
39
47
|
}
|
|
40
48
|
return t;
|
|
41
49
|
};
|
|
50
|
+
|
|
42
51
|
import moment from 'moment';
|
|
43
52
|
import { arrayMove } from '@dnd-kit/sortable';
|
|
44
53
|
import { Checkbox, IconFont, Input, InputNumber, Radio, Select, Table, Switch, DatePicker, Form } from 'linkmore-design';
|
|
@@ -58,17 +67,19 @@ import cls from 'classnames';
|
|
|
58
67
|
import ConfigProvider from '../ConfigProvider';
|
|
59
68
|
import { VirtualTable, VirtualWrapper, VirtualRow } from './virtual';
|
|
60
69
|
var UploadBtn = UploadOss.UploadBtn;
|
|
61
|
-
var EditableContext = /*#__PURE__*/React.createContext(null);
|
|
62
|
-
|
|
70
|
+
var EditableContext = /*#__PURE__*/React.createContext(null); // 表格行
|
|
71
|
+
|
|
63
72
|
var EditableRow = function EditableRow(_a) {
|
|
64
73
|
var index = _a.index,
|
|
65
|
-
|
|
66
|
-
|
|
74
|
+
virtual = _a.virtual,
|
|
75
|
+
props = __rest(_a, ["index", "virtual"]);
|
|
76
|
+
|
|
67
77
|
var _Form$useForm = Form.useForm(),
|
|
68
|
-
|
|
69
|
-
|
|
78
|
+
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
79
|
+
form = _Form$useForm2[0];
|
|
80
|
+
|
|
70
81
|
var dataKey = props.dataKey,
|
|
71
|
-
|
|
82
|
+
pushAllForm = props.pushAllForm;
|
|
72
83
|
pushAllForm === null || pushAllForm === void 0 ? void 0 : pushAllForm(form, dataKey, index);
|
|
73
84
|
return /*#__PURE__*/React.createElement(Form, {
|
|
74
85
|
form: form,
|
|
@@ -78,14 +89,17 @@ var EditableRow = function EditableRow(_a) {
|
|
|
78
89
|
value: form
|
|
79
90
|
}, virtual ? /*#__PURE__*/React.createElement(VirtualRow, Object.assign({}, props)) : /*#__PURE__*/React.createElement("tr", Object.assign({}, props))));
|
|
80
91
|
};
|
|
92
|
+
|
|
81
93
|
var EditableSortRow = function EditableSortRow(_a) {
|
|
82
94
|
var index = _a.index,
|
|
83
|
-
|
|
95
|
+
props = __rest(_a, ["index"]);
|
|
96
|
+
|
|
84
97
|
var _Form$useForm3 = Form.useForm(),
|
|
85
|
-
|
|
86
|
-
|
|
98
|
+
_Form$useForm4 = _slicedToArray(_Form$useForm3, 1),
|
|
99
|
+
form = _Form$useForm4[0];
|
|
100
|
+
|
|
87
101
|
var dataKey = props.dataKey,
|
|
88
|
-
|
|
102
|
+
pushAllForm = props.pushAllForm;
|
|
89
103
|
pushAllForm === null || pushAllForm === void 0 ? void 0 : pushAllForm(form, dataKey, index);
|
|
90
104
|
return /*#__PURE__*/React.createElement(Form, {
|
|
91
105
|
form: form,
|
|
@@ -95,13 +109,16 @@ var EditableSortRow = function EditableSortRow(_a) {
|
|
|
95
109
|
value: form
|
|
96
110
|
}, /*#__PURE__*/React.createElement(SortableItem, Object.assign({}, props))));
|
|
97
111
|
};
|
|
112
|
+
|
|
98
113
|
var UploadSingle = function UploadSingle(props) {
|
|
99
114
|
var value = props.value,
|
|
100
|
-
|
|
101
|
-
|
|
115
|
+
onChange = props.onChange,
|
|
116
|
+
editEnum = props.editEnum;
|
|
117
|
+
|
|
102
118
|
var handleDelete = function handleDelete() {
|
|
103
119
|
onChange === null || onChange === void 0 ? void 0 : onChange();
|
|
104
120
|
};
|
|
121
|
+
|
|
105
122
|
return /*#__PURE__*/React.createElement("div", {
|
|
106
123
|
className: "upload_single"
|
|
107
124
|
}, value ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(IconFont, {
|
|
@@ -126,36 +143,43 @@ var UploadSingle = function UploadSingle(props) {
|
|
|
126
143
|
onChange: onChange
|
|
127
144
|
})));
|
|
128
145
|
};
|
|
146
|
+
|
|
129
147
|
var InputRange = function InputRange(_a) {
|
|
130
148
|
var _a$value = _a.value,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
149
|
+
value = _a$value === void 0 ? ['', ''] : _a$value,
|
|
150
|
+
onChange = _a.onChange,
|
|
151
|
+
record = _a.record,
|
|
152
|
+
rowIndex = _a.rowIndex,
|
|
153
|
+
colIndex = _a.colIndex,
|
|
154
|
+
validator = _a.validator,
|
|
155
|
+
editEnum = __rest(_a, ["value", "onChange", "record", "rowIndex", "colIndex", "validator"]); // 输入值改变
|
|
156
|
+
|
|
157
|
+
|
|
139
158
|
var history = useRef([]);
|
|
159
|
+
|
|
140
160
|
var _useState = useState([]),
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
161
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
162
|
+
nValue = _useState2[0],
|
|
163
|
+
setValue = _useState2[1];
|
|
164
|
+
|
|
144
165
|
useEffect(function () {
|
|
145
166
|
setValue(value);
|
|
146
167
|
}, value);
|
|
168
|
+
|
|
147
169
|
var handleFocus = function handleFocus() {
|
|
148
170
|
history.current.push(nValue);
|
|
149
171
|
};
|
|
172
|
+
|
|
150
173
|
var handleInput = function handleInput(e, type) {
|
|
151
174
|
var v = type === 'prev' ? [e.target.value, nValue[1]] : [nValue[0], e.target.value];
|
|
152
175
|
setValue(v);
|
|
153
176
|
onChange(v);
|
|
154
177
|
history.current.push(v);
|
|
155
178
|
};
|
|
179
|
+
|
|
156
180
|
var handleBlur = function handleBlur(e, type) {
|
|
157
|
-
var isFun = isFunction(validator);
|
|
158
|
-
|
|
181
|
+
var isFun = isFunction(validator); // 验证历史记录
|
|
182
|
+
|
|
159
183
|
var traverse = function traverse(arr) {
|
|
160
184
|
if (!arr || !arr.length) {
|
|
161
185
|
if (type === 'prev') {
|
|
@@ -163,10 +187,13 @@ var InputRange = function InputRange(_a) {
|
|
|
163
187
|
} else if (type === 'next') {
|
|
164
188
|
setValue([nValue[0], '']);
|
|
165
189
|
}
|
|
190
|
+
|
|
166
191
|
history.current = [];
|
|
167
192
|
return;
|
|
168
193
|
}
|
|
194
|
+
|
|
169
195
|
var value = arr.pop();
|
|
196
|
+
|
|
170
197
|
if (isFun && validator(record, value, rowIndex, colIndex)) {
|
|
171
198
|
setValue(value);
|
|
172
199
|
history.current = [];
|
|
@@ -174,8 +201,10 @@ var InputRange = function InputRange(_a) {
|
|
|
174
201
|
traverse(arr);
|
|
175
202
|
}
|
|
176
203
|
};
|
|
204
|
+
|
|
177
205
|
traverse(history.current);
|
|
178
206
|
};
|
|
207
|
+
|
|
179
208
|
return /*#__PURE__*/React.createElement("div", {
|
|
180
209
|
className: "lm_editTable_wrapperRange"
|
|
181
210
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -211,59 +240,70 @@ var InputRange = function InputRange(_a) {
|
|
|
211
240
|
editEnum: 下拉框时的数据数组(非数组时是配置设置)
|
|
212
241
|
valueType: 编辑框配置(多选)
|
|
213
242
|
*/
|
|
243
|
+
|
|
244
|
+
|
|
214
245
|
var EditableCell = function EditableCell(props) {
|
|
215
246
|
var _props$record = props.record,
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
247
|
+
record = _props$record === void 0 ? {} : _props$record,
|
|
248
|
+
rowKey = props.rowKey,
|
|
249
|
+
isEdit = props.isEdit,
|
|
250
|
+
_props$col = props.col,
|
|
251
|
+
col = _props$col === void 0 ? {} : _props$col,
|
|
252
|
+
rowIndex = props.rowIndex,
|
|
253
|
+
colIndex = props.colIndex,
|
|
254
|
+
handleTableRowDelete = props.handleTableRowDelete,
|
|
255
|
+
handleTableRowAdd = props.handleTableRowAdd,
|
|
256
|
+
quickOpetateClearAll = props.quickOpetateClearAll,
|
|
257
|
+
getLength = props.getLength,
|
|
258
|
+
isHoverEdit = props.isHoverEdit,
|
|
259
|
+
editEnum = props.editEnum,
|
|
260
|
+
valueType = props.valueType,
|
|
261
|
+
children = props.children,
|
|
262
|
+
handleSave = props.handleSave,
|
|
263
|
+
handleAdd = props.handleAdd,
|
|
264
|
+
handleDelete = props.handleDelete,
|
|
265
|
+
handleCopy = props.handleCopy,
|
|
266
|
+
itemProps = props.itemProps,
|
|
267
|
+
initialiZindex = props.initialiZindex,
|
|
268
|
+
restProps = __rest(props, ["record", "rowKey", "isEdit", "col", "rowIndex", "colIndex", "handleTableRowDelete", "handleTableRowAdd", "quickOpetateClearAll", "getLength", "isHoverEdit", "editEnum", "valueType", "children", "handleSave", "handleAdd", "handleDelete", "handleCopy", "itemProps", "initialiZindex"]);
|
|
238
269
|
/** 去除移入移出功能,保留最纯粹的功能,优化性能 */
|
|
270
|
+
|
|
271
|
+
|
|
239
272
|
var onMouseEnter = restProps.onMouseEnter,
|
|
240
|
-
|
|
241
|
-
|
|
273
|
+
onMouseLeave = restProps.onMouseLeave,
|
|
274
|
+
clearProps = __rest(restProps, ["onMouseEnter", "onMouseLeave"]);
|
|
275
|
+
|
|
242
276
|
var _col$componentProps = col.componentProps,
|
|
243
|
-
|
|
244
|
-
|
|
277
|
+
componentProps = _col$componentProps === void 0 ? {} : _col$componentProps,
|
|
278
|
+
dataIndex = col.dataIndex;
|
|
245
279
|
/** 是否正在编辑中 */
|
|
280
|
+
|
|
246
281
|
var _useState3 = useState(false),
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
282
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
283
|
+
editing = _useState4[0],
|
|
284
|
+
setEditing = _useState4[1];
|
|
285
|
+
|
|
250
286
|
var inputRef = useRef(null);
|
|
251
287
|
var form = useContext(EditableContext);
|
|
288
|
+
|
|
252
289
|
var _useState5 = useState(false),
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
290
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
291
|
+
hoverStatus = _useState6[0],
|
|
292
|
+
setHoverStatus = _useState6[1];
|
|
293
|
+
|
|
256
294
|
useEffect(function () {
|
|
257
295
|
var _a;
|
|
296
|
+
|
|
258
297
|
if (editing) {
|
|
259
298
|
(_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
260
299
|
}
|
|
261
300
|
}, [editing]);
|
|
301
|
+
|
|
262
302
|
var toggleEdit = function toggleEdit() {
|
|
263
|
-
setEditing(!editing);
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
303
|
+
setEditing(!editing); // form.setFieldsValue({ [dataIndex]: record[dataIndex] });
|
|
304
|
+
}; // 校验保存
|
|
305
|
+
|
|
306
|
+
|
|
267
307
|
var save = function save(row) {
|
|
268
308
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
269
309
|
var values, resultComponentProps;
|
|
@@ -272,22 +312,29 @@ var EditableCell = function EditableCell(props) {
|
|
|
272
312
|
switch (_context.prev = _context.next) {
|
|
273
313
|
case 0:
|
|
274
314
|
_context.prev = 0;
|
|
315
|
+
|
|
275
316
|
if (!row) {
|
|
276
317
|
_context.next = 5;
|
|
277
318
|
break;
|
|
278
319
|
}
|
|
320
|
+
|
|
279
321
|
_context.t0 = omit(row, 'onChange');
|
|
280
322
|
_context.next = 8;
|
|
281
323
|
break;
|
|
324
|
+
|
|
282
325
|
case 5:
|
|
283
326
|
_context.next = 7;
|
|
284
327
|
return form.getFieldsValue();
|
|
328
|
+
|
|
285
329
|
case 7:
|
|
286
330
|
_context.t0 = _context.sent;
|
|
331
|
+
|
|
287
332
|
case 8:
|
|
288
333
|
values = _context.t0;
|
|
289
334
|
resultComponentProps = isFunction(componentProps) ? componentProps === null || componentProps === void 0 ? void 0 : componentProps(record, col) : componentProps; // console.time('testForEach');
|
|
335
|
+
|
|
290
336
|
/** 如果属于中有唯一性,并且当前的值与唯一值不一致,则改变其他的 */
|
|
337
|
+
|
|
291
338
|
if (resultComponentProps.isOnlyValue !== undefined && values[dataIndex] !== record[dataIndex] && ![undefined, null].includes(values[dataIndex])) {
|
|
292
339
|
handleSave(Object.assign(Object.assign(Object.assign({}, record), values), _defineProperty({}, rowKey, record === null || record === void 0 ? void 0 : record[rowKey])), {
|
|
293
340
|
only: {
|
|
@@ -297,19 +344,24 @@ var EditableCell = function EditableCell(props) {
|
|
|
297
344
|
});
|
|
298
345
|
} else {
|
|
299
346
|
handleSave(Object.assign(Object.assign(Object.assign({}, record), values), _defineProperty({}, rowKey, record === null || record === void 0 ? void 0 : record[rowKey])));
|
|
300
|
-
}
|
|
301
|
-
|
|
347
|
+
} // console.timeEnd('testForEach');
|
|
348
|
+
|
|
349
|
+
|
|
302
350
|
_context.next = 13;
|
|
303
351
|
return form.validateFields();
|
|
352
|
+
|
|
304
353
|
case 13:
|
|
305
354
|
if (col === null || col === void 0 ? void 0 : col.hoverEdit) {
|
|
306
355
|
toggleEdit();
|
|
307
356
|
}
|
|
357
|
+
|
|
308
358
|
_context.next = 18;
|
|
309
359
|
break;
|
|
360
|
+
|
|
310
361
|
case 16:
|
|
311
362
|
_context.prev = 16;
|
|
312
363
|
_context.t1 = _context["catch"](0);
|
|
364
|
+
|
|
313
365
|
case 18:
|
|
314
366
|
case "end":
|
|
315
367
|
return _context.stop();
|
|
@@ -317,26 +369,34 @@ var EditableCell = function EditableCell(props) {
|
|
|
317
369
|
}
|
|
318
370
|
}, _callee, null, [[0, 16]]);
|
|
319
371
|
}));
|
|
320
|
-
};
|
|
321
|
-
|
|
372
|
+
}; // 触发保存
|
|
373
|
+
|
|
374
|
+
|
|
322
375
|
var handleFormItemChange = function handleFormItemChange(e) {
|
|
323
376
|
save === null || save === void 0 ? void 0 : save();
|
|
324
377
|
};
|
|
325
378
|
/** 快捷刷子,把当前的所有列的值,刷成当前的选中的列 */
|
|
379
|
+
|
|
380
|
+
|
|
326
381
|
var copyKey = function copyKey(e, type) {
|
|
327
382
|
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
328
383
|
var dataIndex = col.dataIndex;
|
|
329
384
|
handleCopy === null || handleCopy === void 0 ? void 0 : handleCopy(dataIndex, record[dataIndex], type, props.rowIndex);
|
|
330
385
|
};
|
|
386
|
+
|
|
331
387
|
var Control = function Control(con) {
|
|
332
388
|
var _a;
|
|
389
|
+
|
|
333
390
|
var resultComponentProps = isFunction(componentProps) ? componentProps === null || componentProps === void 0 ? void 0 : componentProps(record, col) : componentProps;
|
|
391
|
+
|
|
334
392
|
if (isFunction(componentProps) && ((_a = col === null || col === void 0 ? void 0 : col.newOptions) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
335
393
|
resultComponentProps = Object.assign(Object.assign({}, resultComponentProps), {
|
|
336
394
|
options: col === null || col === void 0 ? void 0 : col.newOptions
|
|
337
395
|
});
|
|
338
396
|
}
|
|
397
|
+
|
|
339
398
|
var clearAttrComponentProps = omit(resultComponentProps, ['optionOnly', 'isOnlyValue', 'quickcopy']);
|
|
399
|
+
|
|
340
400
|
switch (con) {
|
|
341
401
|
case 'input':
|
|
342
402
|
return /*#__PURE__*/React.createElement(Input, Object.assign({
|
|
@@ -358,6 +418,7 @@ var EditableCell = function EditableCell(props) {
|
|
|
358
418
|
onChange: handleFormItemChange
|
|
359
419
|
})) : null
|
|
360
420
|
}));
|
|
421
|
+
|
|
361
422
|
case 'inputRange':
|
|
362
423
|
return /*#__PURE__*/React.createElement(InputRange, Object.assign({
|
|
363
424
|
onChange: handleFormItemChange
|
|
@@ -366,6 +427,7 @@ var EditableCell = function EditableCell(props) {
|
|
|
366
427
|
rowIndex: rowIndex,
|
|
367
428
|
colIndex: colIndex
|
|
368
429
|
}));
|
|
430
|
+
|
|
369
431
|
case 'number':
|
|
370
432
|
return /*#__PURE__*/React.createElement(InputNumber, Object.assign({
|
|
371
433
|
onPressEnter: handleFormItemChange,
|
|
@@ -376,11 +438,13 @@ var EditableCell = function EditableCell(props) {
|
|
|
376
438
|
placeholder: "\u8BF7\u8F93\u5165",
|
|
377
439
|
ref: inputRef
|
|
378
440
|
}, clearAttrComponentProps));
|
|
441
|
+
|
|
379
442
|
case 'date':
|
|
380
443
|
// @ts-ignore
|
|
381
444
|
return /*#__PURE__*/React.createElement(DatePicker, Object.assign({
|
|
382
445
|
onChange: handleFormItemChange
|
|
383
446
|
}, clearAttrComponentProps));
|
|
447
|
+
|
|
384
448
|
case 'select':
|
|
385
449
|
return /*#__PURE__*/React.createElement(Select, Object.assign({
|
|
386
450
|
showSearch: true,
|
|
@@ -389,12 +453,14 @@ var EditableCell = function EditableCell(props) {
|
|
|
389
453
|
ref: inputRef,
|
|
390
454
|
filterOption: function filterOption(input, option) {
|
|
391
455
|
var _a, _b;
|
|
456
|
+
|
|
392
457
|
return ((_b = (_a = option.children) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.indexOf(input.toLowerCase())) >= 0;
|
|
393
458
|
}
|
|
394
459
|
}, clearAttrComponentProps, {
|
|
395
460
|
// open={true}
|
|
396
461
|
onChange: handleFormItemChange
|
|
397
462
|
}));
|
|
463
|
+
|
|
398
464
|
case 'multiple':
|
|
399
465
|
return /*#__PURE__*/React.createElement(Select, Object.assign({
|
|
400
466
|
mode: "multiple",
|
|
@@ -404,37 +470,44 @@ var EditableCell = function EditableCell(props) {
|
|
|
404
470
|
ref: inputRef,
|
|
405
471
|
filterOption: function filterOption(input, option) {
|
|
406
472
|
var _a;
|
|
473
|
+
|
|
407
474
|
return ((_a = option.children) === null || _a === void 0 ? void 0 : _a.toLowerCase().indexOf(input.toLowerCase())) >= 0;
|
|
408
475
|
},
|
|
409
476
|
onChange: handleFormItemChange,
|
|
410
477
|
onDeselect: handleFormItemChange
|
|
411
478
|
}, clearAttrComponentProps));
|
|
479
|
+
|
|
412
480
|
case 'checkbox':
|
|
413
481
|
return /*#__PURE__*/React.createElement(Checkbox.Group, Object.assign({
|
|
414
482
|
onChange: handleFormItemChange,
|
|
415
483
|
ref: inputRef
|
|
416
484
|
}, clearAttrComponentProps));
|
|
485
|
+
|
|
417
486
|
case 'radio':
|
|
418
487
|
return /*#__PURE__*/React.createElement(Radio, Object.assign({
|
|
419
488
|
onChange: handleFormItemChange
|
|
420
489
|
}, clearAttrComponentProps));
|
|
490
|
+
|
|
421
491
|
case 'radioGroup':
|
|
422
492
|
return /*#__PURE__*/React.createElement(Radio.Group, Object.assign({
|
|
423
493
|
onChange: handleFormItemChange,
|
|
424
494
|
ref: inputRef
|
|
425
495
|
}, clearAttrComponentProps));
|
|
496
|
+
|
|
426
497
|
case 'switch':
|
|
427
498
|
return /*#__PURE__*/React.createElement(Switch, Object.assign({
|
|
428
499
|
size: "small"
|
|
429
500
|
}, clearAttrComponentProps, {
|
|
430
501
|
onChange: handleFormItemChange
|
|
431
502
|
}));
|
|
503
|
+
|
|
432
504
|
case 'upload':
|
|
433
505
|
return /*#__PURE__*/React.createElement(UploadSingle, {
|
|
434
506
|
editEnum: resultComponentProps,
|
|
435
507
|
ref: inputRef,
|
|
436
508
|
onChange: handleFormItemChange
|
|
437
509
|
});
|
|
510
|
+
|
|
438
511
|
case 'operate':
|
|
439
512
|
case 'lm_edit_opetate':
|
|
440
513
|
return /*#__PURE__*/React.createElement(QuickOpetate, Object.assign({
|
|
@@ -445,15 +518,17 @@ var EditableCell = function EditableCell(props) {
|
|
|
445
518
|
getLength: getLength,
|
|
446
519
|
quickOpetateClearAll: quickOpetateClearAll
|
|
447
520
|
}, resultComponentProps));
|
|
521
|
+
|
|
448
522
|
case 'render':
|
|
449
523
|
{
|
|
450
524
|
var _resultComponentProps = resultComponentProps,
|
|
451
|
-
|
|
525
|
+
render = _resultComponentProps.render;
|
|
452
526
|
var fromData = form.getFieldsValue();
|
|
453
527
|
return render === null || render === void 0 ? void 0 : render(Object.assign(Object.assign({}, !isObjEmpty(fromData) ? Object.assign(Object.assign({}, record), _defineProperty({}, dataIndex, fromData[dataIndex])) : record), {
|
|
454
528
|
onChange: save
|
|
455
529
|
}), rowIndex);
|
|
456
530
|
}
|
|
531
|
+
|
|
457
532
|
default:
|
|
458
533
|
return /*#__PURE__*/React.createElement(Input, Object.assign({
|
|
459
534
|
onPressEnter: handleFormItemChange,
|
|
@@ -462,15 +537,18 @@ var EditableCell = function EditableCell(props) {
|
|
|
462
537
|
}, resultComponentProps));
|
|
463
538
|
}
|
|
464
539
|
};
|
|
540
|
+
|
|
465
541
|
var getMemoChildNode = useMemo(function () {
|
|
466
542
|
var _a, _b;
|
|
543
|
+
|
|
467
544
|
var editable = col.editable,
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
545
|
+
dataIndex = col.dataIndex,
|
|
546
|
+
formProps = col.formProps,
|
|
547
|
+
componentProps = col.componentProps,
|
|
548
|
+
hoverEdit = col.hoverEdit;
|
|
472
549
|
var resultComponentProps = isFunction(componentProps) ? componentProps === null || componentProps === void 0 ? void 0 : componentProps(record, col) : componentProps;
|
|
473
550
|
var childNode = children;
|
|
551
|
+
|
|
474
552
|
if (hoverEdit && !editing) {
|
|
475
553
|
childNode = /*#__PURE__*/React.createElement("div", {
|
|
476
554
|
className: "editable-cell-value-wrap",
|
|
@@ -505,6 +583,7 @@ var EditableCell = function EditableCell(props) {
|
|
|
505
583
|
}, formProps, {
|
|
506
584
|
name: dataIndex
|
|
507
585
|
}), Control(editable));
|
|
586
|
+
|
|
508
587
|
if (editable === 'input' && ((resultComponentProps === null || resultComponentProps === void 0 ? void 0 : resultComponentProps.addonBefore) || (resultComponentProps === null || resultComponentProps === void 0 ? void 0 : resultComponentProps.addonAfter))) {
|
|
509
588
|
childNode = isExpandRow(childNode) ? /*#__PURE__*/React.createElement("div", {
|
|
510
589
|
style: {
|
|
@@ -535,29 +614,34 @@ var EditableCell = function EditableCell(props) {
|
|
|
535
614
|
return item.value === record[dataIndex];
|
|
536
615
|
})) === null || _b === void 0 ? void 0 : _b.label) || childNode;
|
|
537
616
|
}
|
|
617
|
+
|
|
538
618
|
return childNode;
|
|
539
|
-
}, [col, isEdit, editing, getLength, record]);
|
|
540
|
-
|
|
619
|
+
}, [col, isEdit, editing, getLength, record]); // 出现死循环找我
|
|
620
|
+
|
|
541
621
|
useEffect(function () {
|
|
542
622
|
var editable = col.editable,
|
|
543
|
-
|
|
623
|
+
dataIndex = col.dataIndex;
|
|
624
|
+
|
|
544
625
|
if (isEdit && editable) {
|
|
545
626
|
form.setFieldsValue(_defineProperty({}, dataIndex, editable === 'date' && record[dataIndex] ? moment(record[dataIndex]) : record[dataIndex]));
|
|
546
627
|
}
|
|
547
628
|
}, [record]);
|
|
629
|
+
|
|
548
630
|
var handleTdHover = function handleTdHover() {
|
|
549
631
|
setHoverStatus(true);
|
|
550
632
|
};
|
|
633
|
+
|
|
551
634
|
var handleTdMouseOut = function handleTdMouseOut() {
|
|
552
635
|
setHoverStatus(false);
|
|
553
636
|
};
|
|
637
|
+
|
|
554
638
|
return /*#__PURE__*/React.createElement("td", Object.assign({}, omit(clearProps, ['dataIndex']), {
|
|
555
639
|
className: cls(clearProps === null || clearProps === void 0 ? void 0 : clearProps.className, 'lm_custom_cell_td'),
|
|
556
640
|
onMouseEnter: componentProps.quickcopy ? handleTdHover : undefined,
|
|
557
641
|
onMouseLeave: componentProps.quickcopy ? handleTdMouseOut : undefined,
|
|
558
|
-
style: (col === null || col === void 0 ? void 0 : col.fixed) ? {
|
|
642
|
+
style: (col === null || col === void 0 ? void 0 : col.fixed) ? Object.assign(Object.assign({}, clearProps === null || clearProps === void 0 ? void 0 : clearProps.style), {
|
|
559
643
|
zIndex: (initialiZindex || 0) - (Number(col === null || col === void 0 ? void 0 : col.order) || 0)
|
|
560
|
-
} : Object.assign({}, clearProps === null || clearProps === void 0 ? void 0 : clearProps.style),
|
|
644
|
+
}) : Object.assign({}, clearProps === null || clearProps === void 0 ? void 0 : clearProps.style),
|
|
561
645
|
key: "r".concat(rowIndex, "_c").concat(colIndex)
|
|
562
646
|
}), hoverStatus && props.rowIndex > 0 && /*#__PURE__*/React.createElement("span", {
|
|
563
647
|
className: 'quick_copy_warp quick_copy_up',
|
|
@@ -576,91 +660,106 @@ var EditableCell = function EditableCell(props) {
|
|
|
576
660
|
})));
|
|
577
661
|
};
|
|
578
662
|
/** true 不刷新, false 刷新 */
|
|
663
|
+
|
|
664
|
+
|
|
579
665
|
var MemoEditableCell = /*#__PURE__*/memo(EditableCell, function (prev, next) {
|
|
580
666
|
var pickProps = ['record', 'colIndex'];
|
|
581
667
|
var p = pick(prev, pickProps);
|
|
582
668
|
var n = pick(next, pickProps);
|
|
669
|
+
|
|
583
670
|
if (next === null || next === void 0 ? void 0 : next.shouldUpdate) {
|
|
584
671
|
return false;
|
|
585
|
-
}
|
|
586
|
-
// console.log(!checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n), '22', prev.record, next.record)
|
|
672
|
+
} // console.log(!checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n), '22', prev.record, next.record)
|
|
587
673
|
// console.log('333', checkMemoShouldUploadSpecialFun(prev, next), isEqual(p, n))
|
|
674
|
+
|
|
588
675
|
/** TODO: 在record中带有children,子列表数据修改之后,会导致父级的record对比不一样 */
|
|
676
|
+
|
|
677
|
+
|
|
589
678
|
if (!checkMemoShouldUploadSpecialFun(prev, next)) {
|
|
590
679
|
return false;
|
|
591
680
|
}
|
|
681
|
+
|
|
592
682
|
return isEqual(p, n);
|
|
593
683
|
});
|
|
594
684
|
var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
595
685
|
var _a, _b;
|
|
686
|
+
|
|
596
687
|
var defaultData = props.value,
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
688
|
+
columns = props.columns,
|
|
689
|
+
isEdit = props.isEdit,
|
|
690
|
+
_props$isAdd = props.isAdd,
|
|
691
|
+
isAdd = _props$isAdd === void 0 ? false : _props$isAdd,
|
|
692
|
+
onChange = props.onChange,
|
|
693
|
+
_props$rowKey = props.rowKey,
|
|
694
|
+
_rowKey = _props$rowKey === void 0 ? '_ID' : _props$rowKey,
|
|
695
|
+
rowHoverEdit = props.rowHoverEdit,
|
|
696
|
+
_props$isUseForm = props.isUseForm,
|
|
697
|
+
isUseForm = _props$isUseForm === void 0 ? true : _props$isUseForm,
|
|
698
|
+
isHoverEdit = props.isHoverEdit,
|
|
699
|
+
useQuickOpetate = props.useQuickOpetate,
|
|
700
|
+
_props$quickOpetateCl = props.quickOpetateClearAll,
|
|
701
|
+
quickOpetateClearAll = _props$quickOpetateCl === void 0 ? true : _props$quickOpetateCl,
|
|
702
|
+
rowSelection = props.rowSelection,
|
|
703
|
+
rowDisabled = props.rowDisabled,
|
|
704
|
+
virtual = props.virtual,
|
|
705
|
+
sortOpen = props.sortOpen,
|
|
706
|
+
disabled = props.disabled,
|
|
707
|
+
colSortOpen = props.colSortOpen,
|
|
708
|
+
_props$indexCol = props.indexCol,
|
|
709
|
+
indexCol = _props$indexCol === void 0 ? false : _props$indexCol,
|
|
710
|
+
filterChange = props.filterChange,
|
|
711
|
+
_props$size = props.size,
|
|
712
|
+
size = _props$size === void 0 ? 'small' : _props$size,
|
|
713
|
+
recordCreatorProps = props.recordCreatorProps,
|
|
714
|
+
_props$shouldUpdate = props.shouldUpdate,
|
|
715
|
+
shouldUpdate = _props$shouldUpdate === void 0 ? false : _props$shouldUpdate,
|
|
716
|
+
_props$loading = props.loading,
|
|
717
|
+
loading = _props$loading === void 0 ? false : _props$loading,
|
|
718
|
+
_props$autoSizer = props.autoSizer,
|
|
719
|
+
autoSizer = _props$autoSizer === void 0 ? false : _props$autoSizer,
|
|
720
|
+
_props$initialiZindex = props.initialiZindex,
|
|
721
|
+
initialiZindex = _props$initialiZindex === void 0 ? 100 : _props$initialiZindex,
|
|
722
|
+
resetProps = __rest(props, ["value", "columns", "isEdit", "isAdd", "onChange", "rowKey", "rowHoverEdit", "isUseForm", "isHoverEdit", "useQuickOpetate", "quickOpetateClearAll", "rowSelection", "rowDisabled", "virtual", "sortOpen", "disabled", "colSortOpen", "indexCol", "filterChange", "size", "recordCreatorProps", "shouldUpdate", "loading", "autoSizer", "initialiZindex"]);
|
|
723
|
+
|
|
632
724
|
var _useControllableValue = useControllableValue({
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
725
|
+
value: checkRowKeyByDataSource(props.value, _rowKey),
|
|
726
|
+
onChange: props.onChange
|
|
727
|
+
}),
|
|
728
|
+
_useControllableValue2 = _slicedToArray(_useControllableValue, 2),
|
|
729
|
+
dataSource = _useControllableValue2[0],
|
|
730
|
+
setDataSource = _useControllableValue2[1];
|
|
731
|
+
|
|
639
732
|
var transformRowSelect = function transformRowSelect(selectedRowKeys, selectedRows, info) {
|
|
640
733
|
var _a;
|
|
734
|
+
|
|
641
735
|
return (_a = rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.onChange) === null || _a === void 0 ? void 0 : _a.call(rowSelection, selectedRowKeys, selectedRows, info);
|
|
642
736
|
};
|
|
737
|
+
|
|
643
738
|
var _useControllableValue3 = useControllableValue({
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
739
|
+
value: {
|
|
740
|
+
selectedRows: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || []
|
|
741
|
+
},
|
|
742
|
+
onChange: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.onChange) ? transformRowSelect : undefined
|
|
743
|
+
}),
|
|
744
|
+
_useControllableValue4 = _slicedToArray(_useControllableValue3, 2),
|
|
745
|
+
localRowSelectList = _useControllableValue4[0],
|
|
746
|
+
setLocalRowSelectList = _useControllableValue4[1];
|
|
747
|
+
|
|
652
748
|
var _useControllableValue5 = useControllableValue({
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
749
|
+
value: {
|
|
750
|
+
disabledRows: (rowDisabled === null || rowDisabled === void 0 ? void 0 : rowDisabled.disabledRows) || []
|
|
751
|
+
}
|
|
752
|
+
}),
|
|
753
|
+
_useControllableValue6 = _slicedToArray(_useControllableValue5, 1),
|
|
754
|
+
localDisabledRows = _useControllableValue6[0];
|
|
659
755
|
/** TODO: 当前展开的列 */
|
|
756
|
+
|
|
757
|
+
|
|
660
758
|
var _useState7 = useState([]),
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
759
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
760
|
+
expandedRowKeys = _useState8[0],
|
|
761
|
+
setExpandedRowKeys = _useState8[1];
|
|
762
|
+
|
|
664
763
|
var dataSourceRef = useRef(dataSource);
|
|
665
764
|
var deepDataSourceRef = useRef(deepDataSourcePreKeys(dataSource, _rowKey));
|
|
666
765
|
dataSourceRef.current = dataSource;
|
|
@@ -671,11 +770,14 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
671
770
|
var autoSizerRef = useRef(null);
|
|
672
771
|
var allFormListRef = useRef({});
|
|
673
772
|
var scrollToIndexRef = useRef(null);
|
|
773
|
+
|
|
674
774
|
var _Form$useForm5 = Form.useForm(),
|
|
675
|
-
|
|
676
|
-
|
|
775
|
+
_Form$useForm6 = _slicedToArray(_Form$useForm5, 1),
|
|
776
|
+
checkForm = _Form$useForm6[0];
|
|
777
|
+
|
|
677
778
|
var onColSortEnd = function onColSortEnd(active, over) {
|
|
678
779
|
var _a;
|
|
780
|
+
|
|
679
781
|
var oldIndex = columns.findIndex(function (item) {
|
|
680
782
|
return item.dataIndex === active;
|
|
681
783
|
});
|
|
@@ -687,8 +789,9 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
687
789
|
order: index
|
|
688
790
|
});
|
|
689
791
|
}));
|
|
690
|
-
};
|
|
691
|
-
|
|
792
|
+
}; // 删除
|
|
793
|
+
|
|
794
|
+
|
|
692
795
|
var handleDelete = function handleDelete(key) {
|
|
693
796
|
var nValue = dataSource.filter(function (item) {
|
|
694
797
|
return item[_rowKey] !== key;
|
|
@@ -696,15 +799,17 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
696
799
|
setDataSource(nValue);
|
|
697
800
|
};
|
|
698
801
|
/** 点击底部添加按钮添加 */
|
|
802
|
+
|
|
803
|
+
|
|
699
804
|
var handleAdd = debounce(function (row) {
|
|
700
805
|
var _a;
|
|
806
|
+
|
|
701
807
|
var addDataInfo = isFunction(recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.initData) ? (_a = recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.initData) === null || _a === void 0 ? void 0 : _a.call(recordCreatorProps) : recordCreatorProps === null || recordCreatorProps === void 0 ? void 0 : recordCreatorProps.initData;
|
|
702
808
|
var res = produce(dataSourceRef.current, function (draft) {
|
|
703
809
|
draft.push(Object.assign(_defineProperty({}, _rowKey, "".concat(Date.now())), addDataInfo || {}));
|
|
704
810
|
});
|
|
705
811
|
setDataSource(res);
|
|
706
|
-
}, 40);
|
|
707
|
-
// const reWriteOriginSource = (rowKey: string, rowValue, dataIndex: number, nextValue) => {
|
|
812
|
+
}, 40); // const reWriteOriginSource = (rowKey: string, rowValue, dataIndex: number, nextValue) => {
|
|
708
813
|
// setDataSource((prevDataSource) => {
|
|
709
814
|
// return prevDataSource?.map((item) => {
|
|
710
815
|
// if (get(item, rowKey) === rowValue) {
|
|
@@ -715,11 +820,15 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
715
820
|
// })
|
|
716
821
|
// }
|
|
717
822
|
// @ts-ignore
|
|
823
|
+
|
|
718
824
|
/** 删除当前行 */
|
|
825
|
+
|
|
719
826
|
var handleTableRowDelete = debounce(function (key) {
|
|
720
827
|
var _a, _b, _c;
|
|
828
|
+
|
|
721
829
|
var rkey = isObject(key) ? key[_rowKey] : key;
|
|
722
830
|
var preKeys = (_b = (_a = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current) === null || _a === void 0 ? void 0 : _a[rkey]) === null || _b === void 0 ? void 0 : _b.preKeys;
|
|
831
|
+
|
|
723
832
|
if (preKeys.length > 1) {
|
|
724
833
|
/** 说明删除的是children中的数据 */
|
|
725
834
|
var filter = function filter(data, key) {
|
|
@@ -730,6 +839,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
730
839
|
if (x.children) {
|
|
731
840
|
var c = filter(x.children, key);
|
|
732
841
|
x.children = c;
|
|
842
|
+
|
|
733
843
|
if (!c.length) {
|
|
734
844
|
delete x.children;
|
|
735
845
|
}
|
|
@@ -737,30 +847,37 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
737
847
|
});
|
|
738
848
|
return newData;
|
|
739
849
|
};
|
|
850
|
+
|
|
740
851
|
var res = filter(dataSourceRef.current, key);
|
|
741
852
|
setDataSource(res);
|
|
742
853
|
} else {
|
|
743
854
|
if (((_c = dataSourceRef.current) === null || _c === void 0 ? void 0 : _c.length) === 1 && !quickOpetateClearAll) {
|
|
744
855
|
return false;
|
|
745
856
|
}
|
|
857
|
+
|
|
746
858
|
var _res = produce(dataSourceRef.current, function (draft) {
|
|
747
859
|
var index = draft.findIndex(function (item) {
|
|
748
860
|
return key === item[_rowKey];
|
|
749
861
|
});
|
|
862
|
+
|
|
750
863
|
if (index !== -1) {
|
|
751
864
|
draft.splice(index, 1);
|
|
752
865
|
}
|
|
753
866
|
});
|
|
867
|
+
|
|
754
868
|
setDataSource(_res);
|
|
755
869
|
}
|
|
870
|
+
|
|
756
871
|
return null;
|
|
757
872
|
}, 40);
|
|
758
873
|
/** 替换当前行 */
|
|
874
|
+
|
|
759
875
|
var handleTableRowReplace = debounce(function (record, defaultRecord) {
|
|
760
876
|
var _a, _b;
|
|
877
|
+
|
|
761
878
|
var rkey = isObject(record) ? record[_rowKey] : record;
|
|
762
|
-
var preKeys = (_b = (_a = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current) === null || _a === void 0 ? void 0 : _a[rkey]) === null || _b === void 0 ? void 0 : _b.preKeys;
|
|
763
|
-
|
|
879
|
+
var preKeys = (_b = (_a = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current) === null || _a === void 0 ? void 0 : _a[rkey]) === null || _b === void 0 ? void 0 : _b.preKeys; // const res = cloneDeep(dataSourceRef.current)
|
|
880
|
+
|
|
764
881
|
var deep = function deep(children) {
|
|
765
882
|
return children.map(function (item) {
|
|
766
883
|
if (item[_rowKey] === rkey) {
|
|
@@ -775,26 +892,32 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
775
892
|
}
|
|
776
893
|
});
|
|
777
894
|
};
|
|
895
|
+
|
|
778
896
|
var res = deep(dataSourceRef.current);
|
|
779
897
|
setDataSource(res);
|
|
780
898
|
}, 20);
|
|
781
899
|
/** 快捷添加 */
|
|
900
|
+
|
|
782
901
|
var handleTableRowAdd = debounce(function (record, isAppendInChindren, defaultRecord) {
|
|
783
902
|
var _a, _b;
|
|
903
|
+
|
|
784
904
|
var rkey = isObject(record) ? record[_rowKey] : record;
|
|
785
905
|
var preKeys = (_b = (_a = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current) === null || _a === void 0 ? void 0 : _a[rkey]) === null || _b === void 0 ? void 0 : _b.preKeys;
|
|
786
906
|
var res = produce(dataSourceRef.current, function (draft) {
|
|
787
907
|
var _a, _b, _c, _d, _e;
|
|
908
|
+
|
|
788
909
|
if ((preKeys === null || preKeys === void 0 ? void 0 : preKeys.length) > 1) {
|
|
789
910
|
var deeps = function deeps(children) {
|
|
790
911
|
children === null || children === void 0 ? void 0 : children.forEach(function (item, index) {
|
|
791
912
|
var _a, _b;
|
|
913
|
+
|
|
792
914
|
if (preKeys === null || preKeys === void 0 ? void 0 : preKeys.includes(item[_rowKey])) {
|
|
793
915
|
if (item[_rowKey] === rkey) {
|
|
794
916
|
if (isAppendInChindren) {
|
|
795
917
|
if (item === null || item === void 0 ? void 0 : item.children) {
|
|
796
918
|
if (Array.isArray(defaultRecord)) {
|
|
797
919
|
var _a2;
|
|
920
|
+
|
|
798
921
|
(_a = item === null || item === void 0 ? void 0 : item.children) === null || _a === void 0 ? void 0 : (_a2 = _a).push.apply(_a2, _toConsumableArray(defaultRecord));
|
|
799
922
|
} else {
|
|
800
923
|
(_b = item === null || item === void 0 ? void 0 : item.children) === null || _b === void 0 ? void 0 : _b.push(defaultRecord || _defineProperty({}, _rowKey, "".concat(Date.now())));
|
|
@@ -806,6 +929,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
806
929
|
item.children = [defaultRecord || _defineProperty({}, _rowKey, "".concat(Date.now()))];
|
|
807
930
|
}
|
|
808
931
|
}
|
|
932
|
+
|
|
809
933
|
!expandedRowKeys.includes(item[_rowKey]) && setExpandedRowKeys([].concat(_toConsumableArray(expandedRowKeys), [item[_rowKey]]));
|
|
810
934
|
} else {
|
|
811
935
|
if (Array.isArray(defaultRecord)) {
|
|
@@ -820,16 +944,19 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
820
944
|
}
|
|
821
945
|
});
|
|
822
946
|
};
|
|
947
|
+
|
|
823
948
|
deeps(draft);
|
|
824
949
|
} else {
|
|
825
950
|
var index = draft.findIndex(function (item) {
|
|
826
951
|
return rkey === item[_rowKey];
|
|
827
952
|
});
|
|
953
|
+
|
|
828
954
|
if (index !== -1) {
|
|
829
955
|
if (isAppendInChindren) {
|
|
830
956
|
if ((_a = draft[index].children) === null || _a === void 0 ? void 0 : _a.length) {
|
|
831
957
|
if (Array.isArray(defaultRecord)) {
|
|
832
958
|
var _b2;
|
|
959
|
+
|
|
833
960
|
(_b = draft[index].children) === null || _b === void 0 ? void 0 : (_b2 = _b).push.apply(_b2, _toConsumableArray(defaultRecord));
|
|
834
961
|
} else {
|
|
835
962
|
(_c = draft[index].children) === null || _c === void 0 ? void 0 : _c.push(defaultRecord || _defineProperty({}, _rowKey, "".concat(Date.now())));
|
|
@@ -837,6 +964,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
837
964
|
} else {
|
|
838
965
|
draft[index].children = Array.isArray(defaultRecord) ? _toConsumableArray(defaultRecord) : [defaultRecord || _defineProperty({}, _rowKey, "".concat(Date.now()))];
|
|
839
966
|
}
|
|
967
|
+
|
|
840
968
|
!expandedRowKeys.includes((_d = draft[index]) === null || _d === void 0 ? void 0 : _d[_rowKey]) && setExpandedRowKeys([].concat(_toConsumableArray(expandedRowKeys), [(_e = draft[index]) === null || _e === void 0 ? void 0 : _e[_rowKey]]));
|
|
841
969
|
} else {
|
|
842
970
|
if (Array.isArray(defaultRecord)) {
|
|
@@ -850,19 +978,24 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
850
978
|
});
|
|
851
979
|
setDataSource(res);
|
|
852
980
|
}, 50);
|
|
981
|
+
|
|
853
982
|
var handleSave = function handleSave(row, options) {
|
|
854
983
|
var _a, _b;
|
|
984
|
+
|
|
855
985
|
var preKeys = (_b = (_a = deepDataSourceRef === null || deepDataSourceRef === void 0 ? void 0 : deepDataSourceRef.current) === null || _a === void 0 ? void 0 : _a[row[_rowKey]]) === null || _b === void 0 ? void 0 : _b.preKeys;
|
|
986
|
+
|
|
856
987
|
if (options === null || options === void 0 ? void 0 : options.only) {
|
|
857
988
|
var res = produce(dataSourceRef.current, function (draft) {
|
|
858
989
|
if (options === null || options === void 0 ? void 0 : options.only) {
|
|
859
990
|
var _ref7 = options === null || options === void 0 ? void 0 : options.only,
|
|
860
|
-
|
|
861
|
-
|
|
991
|
+
key = _ref7.key,
|
|
992
|
+
value = _ref7.value;
|
|
993
|
+
|
|
862
994
|
if ((preKeys === null || preKeys === void 0 ? void 0 : preKeys.length) > 1) {
|
|
863
995
|
var deeps = function deeps(children) {
|
|
864
996
|
children === null || children === void 0 ? void 0 : children.forEach(function (item) {
|
|
865
997
|
var _a;
|
|
998
|
+
|
|
866
999
|
if (preKeys.includes(item[_rowKey])) {
|
|
867
1000
|
if (item[_rowKey] === row[_rowKey]) {
|
|
868
1001
|
children === null || children === void 0 ? void 0 : children.forEach(function (c) {
|
|
@@ -877,6 +1010,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
877
1010
|
}
|
|
878
1011
|
});
|
|
879
1012
|
};
|
|
1013
|
+
|
|
880
1014
|
deeps(draft);
|
|
881
1015
|
} else {
|
|
882
1016
|
draft === null || draft === void 0 ? void 0 : draft.forEach(function (item, index) {
|
|
@@ -892,6 +1026,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
892
1026
|
var _deeps = function _deeps(children) {
|
|
893
1027
|
children === null || children === void 0 ? void 0 : children.forEach(function (item) {
|
|
894
1028
|
var _a;
|
|
1029
|
+
|
|
895
1030
|
if (preKeys.includes(item[_rowKey])) {
|
|
896
1031
|
if (item[_rowKey] === row[_rowKey]) {
|
|
897
1032
|
(_a = Object.keys(row)) === null || _a === void 0 ? void 0 : _a.forEach(function (v) {
|
|
@@ -903,11 +1038,13 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
903
1038
|
}
|
|
904
1039
|
});
|
|
905
1040
|
};
|
|
1041
|
+
|
|
906
1042
|
_deeps(draft);
|
|
907
1043
|
} else {
|
|
908
1044
|
var index = draft.findIndex(function (item) {
|
|
909
1045
|
return row[_rowKey] === item[_rowKey];
|
|
910
1046
|
});
|
|
1047
|
+
|
|
911
1048
|
if (index !== -1) {
|
|
912
1049
|
draft[index] = row;
|
|
913
1050
|
}
|
|
@@ -920,6 +1057,8 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
920
1057
|
}
|
|
921
1058
|
};
|
|
922
1059
|
/** 快捷刷子功能 */
|
|
1060
|
+
|
|
1061
|
+
|
|
923
1062
|
var handleCopy = function handleCopy(key, value, type, rowIndex) {
|
|
924
1063
|
var res = produce(dataSourceRef.current, function (draft) {
|
|
925
1064
|
draft === null || draft === void 0 ? void 0 : draft.forEach(function (item, index) {
|
|
@@ -931,28 +1070,36 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
931
1070
|
setDataSource(res);
|
|
932
1071
|
};
|
|
933
1072
|
/** 判断columne中有没有带optionOnly参数 */
|
|
1073
|
+
|
|
1074
|
+
|
|
934
1075
|
var hasDisableOptions = useMemo(function () {
|
|
935
1076
|
var hasOnlyOptionsDatas = columns.filter(function (item) {
|
|
936
1077
|
var _a;
|
|
1078
|
+
|
|
937
1079
|
var resultComponentProps = isFunction(item === null || item === void 0 ? void 0 : item.componentProps) ? (_a = item === null || item === void 0 ? void 0 : item.componentProps) === null || _a === void 0 ? void 0 : _a.call(item, {}, item) : item === null || item === void 0 ? void 0 : item.componentProps;
|
|
938
1080
|
return resultComponentProps === null || resultComponentProps === void 0 ? void 0 : resultComponentProps.optionOnly;
|
|
939
|
-
});
|
|
940
|
-
|
|
1081
|
+
}); // const hasOnlyOptionsDatas = columns.filter((item) => item?.componentProps?.optionOnly)
|
|
1082
|
+
|
|
941
1083
|
if (hasOnlyOptionsDatas.length) {
|
|
942
1084
|
return hasOnlyOptionsDatas === null || hasOnlyOptionsDatas === void 0 ? void 0 : hasOnlyOptionsDatas.map(function (item) {
|
|
943
1085
|
return item.dataIndex;
|
|
944
1086
|
});
|
|
945
1087
|
}
|
|
1088
|
+
|
|
946
1089
|
return false;
|
|
947
1090
|
}, [columns]);
|
|
948
1091
|
/** 动态获取disabled的props数据源 */
|
|
1092
|
+
|
|
949
1093
|
var DisableOptions = useMemo(function () {
|
|
950
1094
|
var newColumns = columns === null || columns === void 0 ? void 0 : columns.map(function (item) {
|
|
951
1095
|
var _a;
|
|
1096
|
+
|
|
952
1097
|
var resultComponentProps = isFunction(item.componentProps) ? (_a = item.componentProps) === null || _a === void 0 ? void 0 : _a.call(item, {}, item) : item.componentProps;
|
|
1098
|
+
|
|
953
1099
|
var _ref8 = resultComponentProps || {},
|
|
954
|
-
|
|
955
|
-
|
|
1100
|
+
optionOnly = _ref8.optionOnly,
|
|
1101
|
+
options = _ref8.options;
|
|
1102
|
+
|
|
956
1103
|
if (optionOnly && options) {
|
|
957
1104
|
var dataIndex = item.dataIndex;
|
|
958
1105
|
var dataIndexData = dataSource === null || dataSource === void 0 ? void 0 : dataSource.map(function (d) {
|
|
@@ -963,11 +1110,13 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
963
1110
|
disabled: !!dataIndexData.includes(o === null || o === void 0 ? void 0 : o.value)
|
|
964
1111
|
});
|
|
965
1112
|
});
|
|
1113
|
+
|
|
966
1114
|
if (isFunction(item.componentProps)) {
|
|
967
1115
|
return Object.assign(Object.assign({}, item), {
|
|
968
1116
|
newOptions: newOptions
|
|
969
1117
|
});
|
|
970
1118
|
}
|
|
1119
|
+
|
|
971
1120
|
return Object.assign(Object.assign({}, item), {
|
|
972
1121
|
componentProps: Object.assign(Object.assign({}, item.componentProps), {
|
|
973
1122
|
options: newOptions
|
|
@@ -983,6 +1132,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
983
1132
|
return hasDisableOptions ? [DisableOptions] : [];
|
|
984
1133
|
}, [hasDisableOptions, DisableOptions]);
|
|
985
1134
|
/** 组装之后的最终columns */
|
|
1135
|
+
|
|
986
1136
|
var resultColumns = useMemo(function () {
|
|
987
1137
|
var rColumns = hasDisableOptions ? DisableOptions : columns;
|
|
988
1138
|
var localColumns = [sortOpen ? {
|
|
@@ -1008,6 +1158,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1008
1158
|
order: -1,
|
|
1009
1159
|
render: function render(_, record, index) {
|
|
1010
1160
|
var _a, _b, _c;
|
|
1161
|
+
|
|
1011
1162
|
return ((_c = (_b = (_a = deepDataSourceRef.current) === null || _a === void 0 ? void 0 : _a[record[_rowKey]]) === null || _b === void 0 ? void 0 : _b['_deepIds']) === null || _c === void 0 ? void 0 : _c.join('-')) || "".concat(index + 1);
|
|
1012
1163
|
}
|
|
1013
1164
|
} : Object.assign(Object.assign({
|
|
@@ -1021,9 +1172,11 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1021
1172
|
}, indexCol || {}), {
|
|
1022
1173
|
render: function render(_, record, index) {
|
|
1023
1174
|
var _a, _b, _c, _d, _e, _f;
|
|
1175
|
+
|
|
1024
1176
|
if (isFunction(indexCol === null || indexCol === void 0 ? void 0 : indexCol.render)) {
|
|
1025
1177
|
return (_a = indexCol === null || indexCol === void 0 ? void 0 : indexCol.render) === null || _a === void 0 ? void 0 : _a.call(indexCol, record, (_c = (_b = deepDataSourceRef.current) === null || _b === void 0 ? void 0 : _b[record[_rowKey]]) === null || _c === void 0 ? void 0 : _c['_deepIds']);
|
|
1026
1178
|
}
|
|
1179
|
+
|
|
1027
1180
|
return ((_f = (_e = (_d = deepDataSourceRef.current) === null || _d === void 0 ? void 0 : _d[record[_rowKey]]) === null || _e === void 0 ? void 0 : _e['_deepIds']) === null || _f === void 0 ? void 0 : _f.join('-')) || "".concat(index + 1);
|
|
1028
1181
|
}
|
|
1029
1182
|
}) : null].concat(_toConsumableArray(rColumns), [useQuickOpetate ? {
|
|
@@ -1060,20 +1213,25 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1060
1213
|
});
|
|
1061
1214
|
localColumns = [].concat(leftColumns, mainColumns, rightColumns);
|
|
1062
1215
|
/** 为了支持colums中的分组之后,进行递归处理 */
|
|
1216
|
+
|
|
1063
1217
|
var mapColumns = function mapColumns(col, index) {
|
|
1064
1218
|
var _a, _b;
|
|
1219
|
+
|
|
1065
1220
|
if (!col.editable && !((_a = col.children) === null || _a === void 0 ? void 0 : _a.length) && (col === null || col === void 0 ? void 0 : col.dataIndex) === '_sort') {
|
|
1066
1221
|
var fn = col === null || col === void 0 ? void 0 : col.render;
|
|
1067
1222
|
return Object.assign(Object.assign({}, col), {
|
|
1068
1223
|
render: function render(text, record, i) {
|
|
1069
1224
|
var _a;
|
|
1225
|
+
|
|
1070
1226
|
return fn === null || fn === void 0 ? void 0 : fn((_a = dataSource[i]) === null || _a === void 0 ? void 0 : _a[col.dataIndex], dataSource[i], i);
|
|
1071
1227
|
}
|
|
1072
1228
|
});
|
|
1073
1229
|
}
|
|
1230
|
+
|
|
1074
1231
|
if (isEdit && (col === null || col === void 0 ? void 0 : col.render) && (col === null || col === void 0 ? void 0 : col.editable) === 'render') {
|
|
1075
1232
|
delete col.render;
|
|
1076
1233
|
}
|
|
1234
|
+
|
|
1077
1235
|
var newCol = Object.assign({
|
|
1078
1236
|
onCell: function onCell(record, rowIndex) {
|
|
1079
1237
|
return {
|
|
@@ -1102,18 +1260,23 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1102
1260
|
};
|
|
1103
1261
|
}
|
|
1104
1262
|
}, col);
|
|
1263
|
+
|
|
1105
1264
|
if (col === null || col === void 0 ? void 0 : col.children) {
|
|
1106
1265
|
newCol.children = (_b = col.children) === null || _b === void 0 ? void 0 : _b.map(mapColumns);
|
|
1107
1266
|
}
|
|
1267
|
+
|
|
1108
1268
|
return newCol;
|
|
1109
1269
|
};
|
|
1270
|
+
|
|
1110
1271
|
var res = localColumns === null || localColumns === void 0 ? void 0 : localColumns.map(function (col, index) {
|
|
1111
1272
|
return mapColumns(col, index);
|
|
1112
1273
|
});
|
|
1113
1274
|
return res;
|
|
1114
1275
|
}, [columns, isAdd, sortOpen, useQuickOpetate, dataSource, _toConsumableArray(memoOptions)]);
|
|
1276
|
+
|
|
1115
1277
|
var onSortEnd = function onSortEnd(active, over) {
|
|
1116
1278
|
var cloneArr = _toConsumableArray(dataSourceRef.current);
|
|
1279
|
+
|
|
1117
1280
|
var oldIndex = cloneArr.findIndex(function (v) {
|
|
1118
1281
|
return v[_rowKey] === active;
|
|
1119
1282
|
});
|
|
@@ -1122,14 +1285,19 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1122
1285
|
});
|
|
1123
1286
|
setDataSource(arrayMove(cloneArr, oldIndex, newIndex));
|
|
1124
1287
|
};
|
|
1288
|
+
|
|
1125
1289
|
var colDraggableContainer = useCallback(function (_a) {
|
|
1126
1290
|
var _b;
|
|
1291
|
+
|
|
1127
1292
|
var props = __rest(_a, []);
|
|
1293
|
+
|
|
1128
1294
|
return /*#__PURE__*/React.createElement("tr", null, (_b = React.Children) === null || _b === void 0 ? void 0 : _b.map(props.children, function (child) {
|
|
1129
1295
|
var _a, _b;
|
|
1296
|
+
|
|
1130
1297
|
if ((_b = (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.column) === null || _b === void 0 ? void 0 : _b.fixed) {
|
|
1131
1298
|
return child;
|
|
1132
1299
|
}
|
|
1300
|
+
|
|
1133
1301
|
return /*#__PURE__*/React.createElement(ColSortableItem, {
|
|
1134
1302
|
id: child.key
|
|
1135
1303
|
}, child);
|
|
@@ -1237,43 +1405,53 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1237
1405
|
_context4.next = 17;
|
|
1238
1406
|
break;
|
|
1239
1407
|
}
|
|
1408
|
+
|
|
1240
1409
|
fullNum = 0;
|
|
1241
1410
|
flag = true;
|
|
1242
1411
|
messageIndex = null;
|
|
1243
1412
|
errorRowKey = null;
|
|
1244
1413
|
errorInfo = null;
|
|
1414
|
+
|
|
1245
1415
|
deepValidator = function deepValidator(data, index) {
|
|
1246
1416
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
1247
1417
|
var _c, i;
|
|
1418
|
+
|
|
1248
1419
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1249
1420
|
while (1) {
|
|
1250
1421
|
switch (_context2.prev = _context2.next) {
|
|
1251
1422
|
case 0:
|
|
1252
1423
|
i = 0;
|
|
1424
|
+
|
|
1253
1425
|
case 1:
|
|
1254
1426
|
if (!(i < data.length)) {
|
|
1255
1427
|
_context2.next = 23;
|
|
1256
1428
|
break;
|
|
1257
1429
|
}
|
|
1430
|
+
|
|
1258
1431
|
if (!flag) {
|
|
1259
1432
|
_context2.next = 20;
|
|
1260
1433
|
break;
|
|
1261
1434
|
}
|
|
1435
|
+
|
|
1262
1436
|
_context2.prev = 3;
|
|
1263
1437
|
checkForm.resetFields();
|
|
1264
1438
|
checkForm.setFieldsValue(data[i]);
|
|
1265
1439
|
_context2.next = 8;
|
|
1266
1440
|
return checkForm.validateFields();
|
|
1441
|
+
|
|
1267
1442
|
case 8:
|
|
1268
1443
|
if (!data[i].children) {
|
|
1269
1444
|
_context2.next = 11;
|
|
1270
1445
|
break;
|
|
1271
1446
|
}
|
|
1447
|
+
|
|
1272
1448
|
_context2.next = 11;
|
|
1273
1449
|
return deepValidator(data[i].children, i);
|
|
1450
|
+
|
|
1274
1451
|
case 11:
|
|
1275
1452
|
_context2.next = 20;
|
|
1276
1453
|
break;
|
|
1454
|
+
|
|
1277
1455
|
case 13:
|
|
1278
1456
|
_context2.prev = 13;
|
|
1279
1457
|
_context2.t0 = _context2["catch"](3);
|
|
@@ -1285,10 +1463,12 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1285
1463
|
messageIndex = index === null ? i : index;
|
|
1286
1464
|
errorRowKey = (_c = data === null || data === void 0 ? void 0 : data[i]) === null || _c === void 0 ? void 0 : _c[_rowKey];
|
|
1287
1465
|
return _context2.abrupt("break", 23);
|
|
1466
|
+
|
|
1288
1467
|
case 20:
|
|
1289
1468
|
i++;
|
|
1290
1469
|
_context2.next = 1;
|
|
1291
1470
|
break;
|
|
1471
|
+
|
|
1292
1472
|
case 23:
|
|
1293
1473
|
case "end":
|
|
1294
1474
|
return _context2.stop();
|
|
@@ -1297,17 +1477,22 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1297
1477
|
}, _callee2, null, [[3, 13]]);
|
|
1298
1478
|
}));
|
|
1299
1479
|
};
|
|
1480
|
+
|
|
1300
1481
|
_context4.next = 9;
|
|
1301
1482
|
return deepValidator(dataSource, null);
|
|
1483
|
+
|
|
1302
1484
|
case 9:
|
|
1303
1485
|
if (!flag) {
|
|
1304
1486
|
_context4.next = 13;
|
|
1305
1487
|
break;
|
|
1306
1488
|
}
|
|
1489
|
+
|
|
1307
1490
|
return _context4.abrupt("return", Promise.resolve(dataSource));
|
|
1491
|
+
|
|
1308
1492
|
case 13:
|
|
1309
1493
|
setTimeout(function () {
|
|
1310
1494
|
var _a;
|
|
1495
|
+
|
|
1311
1496
|
if (messageIndex !== null) {
|
|
1312
1497
|
(_a = scrollToIndexRef.current) === null || _a === void 0 ? void 0 : _a.call(scrollToIndexRef, messageIndex, {
|
|
1313
1498
|
align: 'center'
|
|
@@ -1315,42 +1500,52 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1315
1500
|
time = setInterval(function () {
|
|
1316
1501
|
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
1317
1502
|
var _b, form;
|
|
1503
|
+
|
|
1318
1504
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
1319
1505
|
while (1) {
|
|
1320
1506
|
switch (_context3.prev = _context3.next) {
|
|
1321
1507
|
case 0:
|
|
1322
1508
|
fullNum++;
|
|
1509
|
+
|
|
1323
1510
|
if (!(fullNum > 5)) {
|
|
1324
1511
|
_context3.next = 5;
|
|
1325
1512
|
break;
|
|
1326
1513
|
}
|
|
1514
|
+
|
|
1327
1515
|
clearInterval(time);
|
|
1328
1516
|
_context3.next = 20;
|
|
1329
1517
|
break;
|
|
1518
|
+
|
|
1330
1519
|
case 5:
|
|
1331
1520
|
form = (_b = Object.values(allFormListRef.current || []).find(function (item) {
|
|
1332
1521
|
return item.key === errorRowKey;
|
|
1333
1522
|
})) === null || _b === void 0 ? void 0 : _b.form;
|
|
1523
|
+
|
|
1334
1524
|
if (!form) {
|
|
1335
1525
|
_context3.next = 20;
|
|
1336
1526
|
break;
|
|
1337
1527
|
}
|
|
1528
|
+
|
|
1338
1529
|
_context3.prev = 7;
|
|
1339
1530
|
_context3.next = 10;
|
|
1340
1531
|
return form.validateFields();
|
|
1532
|
+
|
|
1341
1533
|
case 10:
|
|
1342
1534
|
console.log('验证成功');
|
|
1343
1535
|
_context3.next = 17;
|
|
1344
1536
|
break;
|
|
1537
|
+
|
|
1345
1538
|
case 13:
|
|
1346
1539
|
_context3.prev = 13;
|
|
1347
1540
|
_context3.t0 = _context3["catch"](7);
|
|
1348
1541
|
console.log('验证失败', _context3.t0);
|
|
1349
1542
|
return _context3.abrupt("return", _context3.t0);
|
|
1543
|
+
|
|
1350
1544
|
case 17:
|
|
1351
1545
|
_context3.prev = 17;
|
|
1352
1546
|
clearInterval(time);
|
|
1353
1547
|
return _context3.finish(17);
|
|
1548
|
+
|
|
1354
1549
|
case 20:
|
|
1355
1550
|
case "end":
|
|
1356
1551
|
return _context3.stop();
|
|
@@ -1362,14 +1557,18 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1362
1557
|
}
|
|
1363
1558
|
}, 100);
|
|
1364
1559
|
return _context4.abrupt("return", Promise.reject(errorInfo));
|
|
1560
|
+
|
|
1365
1561
|
case 15:
|
|
1366
1562
|
_context4.next = 18;
|
|
1367
1563
|
break;
|
|
1564
|
+
|
|
1368
1565
|
case 17:
|
|
1369
1566
|
return _context4.abrupt("return", Promise.all(Object.values(allFormListRef.current || []).map(function (item) {
|
|
1370
1567
|
var _a;
|
|
1568
|
+
|
|
1371
1569
|
return (_a = item === null || item === void 0 ? void 0 : item.form) === null || _a === void 0 ? void 0 : _a.validateFields();
|
|
1372
1570
|
})));
|
|
1571
|
+
|
|
1373
1572
|
case 18:
|
|
1374
1573
|
case "end":
|
|
1375
1574
|
return _context4.stop();
|
|
@@ -1383,6 +1582,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1383
1582
|
var isShowAddAction = useMemo(function () {
|
|
1384
1583
|
return isEdit && isAdd || isHoverEdit && isAdd;
|
|
1385
1584
|
}, [isEdit, isAdd, isHoverEdit]);
|
|
1585
|
+
|
|
1386
1586
|
var pushAllForm = function pushAllForm(form, key, index) {
|
|
1387
1587
|
allFormListRef.current[key] = {
|
|
1388
1588
|
form: form,
|
|
@@ -1390,6 +1590,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1390
1590
|
index: index
|
|
1391
1591
|
};
|
|
1392
1592
|
};
|
|
1593
|
+
|
|
1393
1594
|
var config = useRef(Object.assign({
|
|
1394
1595
|
pagination: false,
|
|
1395
1596
|
tableLayout: 'fixed',
|
|
@@ -1416,7 +1617,8 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1416
1617
|
cell: props.shouldUpdate ? EditableCell : MemoEditableCell
|
|
1417
1618
|
}, sortOpen ? {
|
|
1418
1619
|
wrapper: function wrapper(wrapperProps) {
|
|
1419
|
-
var _a, _b, _c;
|
|
1620
|
+
var _a, _b, _c, _d, _e;
|
|
1621
|
+
|
|
1420
1622
|
return DraggableContainer(Object.assign(Object.assign({}, wrapperProps), {
|
|
1421
1623
|
virtual: virtual,
|
|
1422
1624
|
keys: (_a = dataSourceRef.current) === null || _a === void 0 ? void 0 : _a.map(function (item) {
|
|
@@ -1425,7 +1627,9 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1425
1627
|
options: dataSourceRef.current,
|
|
1426
1628
|
rowKey: _rowKey,
|
|
1427
1629
|
onSortEnd: onSortEnd,
|
|
1428
|
-
tableWidth: (_c = (_b = tableWarpRef === null || tableWarpRef === void 0 ? void 0 : tableWarpRef.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.width
|
|
1630
|
+
tableWidth: (_c = (_b = tableWarpRef === null || tableWarpRef === void 0 ? void 0 : tableWarpRef.current) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect()) === null || _c === void 0 ? void 0 : _c.width,
|
|
1631
|
+
tableHeight: (_e = (_d = tableWarpRef === null || tableWarpRef === void 0 ? void 0 : tableWarpRef.current) === null || _d === void 0 ? void 0 : _d.getBoundingClientRect()) === null || _e === void 0 ? void 0 : _e.height,
|
|
1632
|
+
columns: resultColumns
|
|
1429
1633
|
}));
|
|
1430
1634
|
}
|
|
1431
1635
|
} : virtual ? {
|
|
@@ -1437,6 +1641,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1437
1641
|
},
|
|
1438
1642
|
onRow: function onRow(record, index) {
|
|
1439
1643
|
var _a;
|
|
1644
|
+
|
|
1440
1645
|
return {
|
|
1441
1646
|
disabled: disabled || !!((_a = disabledDataSourceRowKeys.current) === null || _a === void 0 ? void 0 : _a.includes(record[_rowKey])),
|
|
1442
1647
|
dataKey: record[_rowKey],
|
|
@@ -1447,19 +1652,24 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1447
1652
|
}, resetProps));
|
|
1448
1653
|
useEffect(function () {
|
|
1449
1654
|
var _a;
|
|
1655
|
+
|
|
1450
1656
|
if (autoSizer) {
|
|
1451
1657
|
var tableClient = (_a = tableWarpRef === null || tableWarpRef === void 0 ? void 0 : tableWarpRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
1452
1658
|
var height = (tableClient === null || tableClient === void 0 ? void 0 : tableClient.height) || '100%';
|
|
1453
1659
|
var TailorHeight = size === 'middle' ? 48 : 40;
|
|
1660
|
+
|
|
1454
1661
|
if (isAdd) {
|
|
1455
1662
|
TailorHeight += 48;
|
|
1456
1663
|
}
|
|
1664
|
+
|
|
1457
1665
|
if (props.summary) {
|
|
1458
1666
|
TailorHeight += 48;
|
|
1459
1667
|
}
|
|
1668
|
+
|
|
1460
1669
|
if (props.pagination) {
|
|
1461
1670
|
TailorHeight += 48;
|
|
1462
1671
|
}
|
|
1672
|
+
|
|
1463
1673
|
autoSizerRef.current = {
|
|
1464
1674
|
width: tableClient === null || tableClient === void 0 ? void 0 : tableClient.width,
|
|
1465
1675
|
height: typeof height === 'string' ? "calc(".concat(height, " - ").concat(TailorHeight, "px)") : height - TailorHeight
|
|
@@ -1470,6 +1680,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1470
1680
|
var arr = [];
|
|
1471
1681
|
columns.forEach(function (item) {
|
|
1472
1682
|
var _a;
|
|
1683
|
+
|
|
1473
1684
|
if (item.children) {
|
|
1474
1685
|
(_a = item.children) === null || _a === void 0 ? void 0 : _a.forEach(function (c) {
|
|
1475
1686
|
arr.push( /*#__PURE__*/React.createElement(Form.Item, Object.assign({
|
|
@@ -1488,6 +1699,7 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1488
1699
|
});
|
|
1489
1700
|
return arr;
|
|
1490
1701
|
}, [columns]);
|
|
1702
|
+
|
|
1491
1703
|
if (colSortOpen) {
|
|
1492
1704
|
return /*#__PURE__*/React.createElement("div", {
|
|
1493
1705
|
className: "lm_editTable_warpper",
|
|
@@ -1550,8 +1762,9 @@ var EditTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1550
1762
|
form: checkForm,
|
|
1551
1763
|
component: false
|
|
1552
1764
|
}, checkFormItem)));
|
|
1553
|
-
}
|
|
1554
|
-
|
|
1765
|
+
} // @ts-ignore
|
|
1766
|
+
|
|
1767
|
+
|
|
1555
1768
|
return /*#__PURE__*/React.createElement("div", {
|
|
1556
1769
|
className: cls('lm_editTable_warpper', autoSizer && 'lm_editable_autosize'),
|
|
1557
1770
|
ref: tableWarpRef
|