@zat-design/sisyphus-react 3.13.13 → 4.0.0-beta.2
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/babel.config.js +34 -1
- package/dist/index.esm.css +557 -341
- package/dist/less.esm.css +527 -309
- package/es/FormsProvider/index.d.ts +4 -1
- package/es/ProAction/components/CheckModalContent/index.js +0 -8
- package/es/ProAction/index.js +45 -48
- package/es/ProAction/index.less +2 -2
- package/es/ProConfigProvider/index.d.ts +21 -4
- package/es/ProConfigProvider/index.js +51 -22
- package/es/ProDownload/index.js +62 -65
- package/es/ProDownload/style/index.less +2 -2
- package/es/ProDownload/utils.js +45 -51
- package/es/ProDrawerForm/components/ProDrawer/index.js +64 -69
- package/es/ProDrawerForm/components/ProModal/index.js +59 -67
- package/es/ProDrawerForm/index.d.ts +2 -1
- package/es/ProDrawerForm/index.js +4 -6
- package/es/ProDrawerForm/propsType.d.ts +7 -18
- package/es/ProDrawerForm/style/index.less +8 -14
- package/es/ProEditLabel/components/RenderProForm.js +2 -3
- package/es/ProEditLabel/index.js +40 -45
- package/es/ProEditLabel/propsType.d.ts +1 -6
- package/es/ProEditLabel/style/index.less +4 -3
- package/es/ProEditTable/components/ActionButton/index.js +5 -8
- package/es/ProEditTable/components/RcTable/BaseTable.js +73 -55
- package/es/ProEditTable/components/RcTable/DraggableTable.js +66 -47
- package/es/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/es/ProEditTable/components/RcTable/index.js +1 -3
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/es/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/es/ProEditTable/components/RenderField/index.js +377 -253
- package/es/ProEditTable/components/RenderToolbar/index.js +19 -19
- package/es/ProEditTable/components/Summary/index.js +5 -8
- package/es/ProEditTable/components/Validator/index.js +3 -6
- package/es/ProEditTable/index.js +128 -131
- package/es/ProEditTable/propsType.d.ts +1 -7
- package/es/ProEditTable/style/index.less +3 -7
- package/es/ProEditTable/utils/config.js +31 -35
- package/es/ProEditTable/utils/index.js +44 -41
- package/es/ProEditTable/utils/tools.js +107 -110
- package/es/ProEditTable/utils/useEditTableError.js +12 -4
- package/es/ProEnum/hooks/useEnumRequest.js +44 -47
- package/es/ProEnum/index.js +10 -17
- package/es/ProEnum/style/index.less +2 -2
- package/es/ProEnum/utils/index.d.ts +1 -0
- package/es/ProEnum/utils/index.js +2 -1
- package/es/ProForm/components/Container.d.ts +1 -0
- package/es/ProForm/components/Container.js +2 -3
- package/es/ProForm/components/FormFooter/index.js +13 -13
- package/es/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/es/ProForm/components/base/Checkbox/index.js +3 -4
- package/es/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/es/ProForm/components/base/DatePicker/index.js +7 -7
- package/es/ProForm/components/base/DatePicker/useDateLimit.d.ts +1 -7
- package/es/ProForm/components/base/DatePicker/useDateLimit.js +1 -3
- package/es/ProForm/components/base/Input/index.js +6 -13
- package/es/ProForm/components/base/InputNumber/index.js +3 -6
- package/es/ProForm/components/base/Radio/index.js +3 -4
- package/es/ProForm/components/base/RangePicker/index.js +6 -7
- package/es/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/es/ProForm/components/base/Select/index.js +2 -3
- package/es/ProForm/components/base/Switch/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/style/index.less +2 -2
- package/es/ProForm/components/base/TextArea/index.js +3 -4
- package/es/ProForm/components/base/TextArea/index.less +12 -2
- package/es/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/es/ProForm/components/base/TimePicker/index.js +6 -7
- package/es/ProForm/components/base/TimePicker/style/index.less +5 -3
- package/es/ProForm/components/combination/Container/style/index.less +2 -2
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +28 -26
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +3 -6
- package/es/ProForm/components/combination/FormList/components/Empty.js +18 -19
- package/es/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +17 -21
- package/es/ProForm/components/combination/FormList/index.js +2 -3
- package/es/ProForm/components/combination/FormList/style/index.less +38 -2
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/es/ProForm/components/combination/Group/index.d.ts +2 -8
- package/es/ProForm/components/combination/Group/index.js +12 -6
- package/es/ProForm/components/combination/Group/style/index.less +7 -87
- package/es/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/es/ProForm/components/combination/Group/utils.js +4 -5
- package/es/ProForm/components/combination/ProCascader/index.js +21 -20
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/style/index.less +2 -2
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +6 -8
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +97 -116
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +13 -14
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/es/ProForm/components/combination/ProNumberRange/index.js +17 -16
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +5 -52
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/es/ProForm/components/combination/ProRangeLimit/index.js +44 -28
- package/es/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/es/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +66 -6
- package/es/ProForm/components/index.d.ts +0 -8
- package/es/ProForm/components/index.js +1 -10
- package/es/ProForm/components/render/ChangedWrapper.js +8 -9
- package/es/ProForm/components/render/ConfirmWrapper.js +28 -29
- package/es/ProForm/components/render/Render.js +37 -40
- package/es/ProForm/components/render/propsType.d.ts +2 -6
- package/es/ProForm/index.js +9 -39
- package/es/ProForm/style/index.less +6 -16
- package/es/ProForm/utils/index.d.ts +15 -1
- package/es/ProForm/utils/index.js +63 -14
- package/es/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/es/ProForm/utils/useForm.js +84 -74
- package/es/ProForm/utils/useShouldUpdate.js +14 -14
- package/es/ProForm/utils/valueType.js +8 -8
- package/es/ProIcon/index.js +10 -13
- package/es/ProIcon/style/index.less +2 -2
- package/es/ProLayout/components/Layout/Header/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +11 -10
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +42 -39
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -4
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +12 -6
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +9 -5
- package/es/ProLayout/components/Layout/Menu/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/style/index.less +2 -2
- package/es/ProLayout/components/Layout/Notice/style/index.less +2 -2
- package/es/ProLayout/components/ProCollapse/index.js +20 -36
- package/es/ProLayout/components/ProCollapse/style/index.less +3 -3
- package/es/ProLayout/components/ProFooter/index.js +3 -4
- package/es/ProLayout/components/ProFooter/style/index.less +2 -2
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +9 -9
- package/es/ProLayout/components/ProHeader/index.js +43 -46
- package/es/ProLayout/components/ProHeader/style/index.less +2 -2
- package/es/ProLayout/index.js +7 -6
- package/es/ProLayout/style/index.less +4 -3
- package/es/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/es/ProSelect/index.js +7 -17
- package/es/ProSelect/index.less +2 -2
- package/es/ProSelect/propsType.d.ts +1 -1
- package/es/ProStep/components/Anchor/index.js +2 -3
- package/es/ProStep/components/Item/index.js +2 -1
- package/es/ProStep/components/Listener/index.js +12 -14
- package/es/ProStep/components/Step/index.js +1 -0
- package/es/ProStep/index.js +39 -47
- package/es/ProStep/style/index.less +4 -4
- package/es/ProStepTab/index.js +72 -83
- package/es/ProTable/components/FormatColumn/index.js +32 -31
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +39 -37
- package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.js +15 -18
- package/es/ProTable/components/RenderSummary/index.js +4 -5
- package/es/ProTable/components/RenderTableHeader/index.js +3 -4
- package/es/ProTable/components/RenderTabs/index.js +3 -6
- package/es/ProTable/components/TableResizable/index.js +2 -1
- package/es/ProTable/components/TooltipTitle/index.js +2 -3
- package/es/ProTable/hooks/useAntdTable.js +21 -26
- package/es/ProTable/index.js +15 -16
- package/es/ProTable/propsType.d.ts +1 -3
- package/es/ProTable/style/index.less +5 -5
- package/es/ProTabs/components/Card/index.js +5 -10
- package/es/ProTabs/index.js +2 -3
- package/es/ProTabs/style/index.less +2 -2
- package/es/ProThemeTools/component/ProTools/index.js +18 -22
- package/es/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/es/ProThemeTools/context/ThemeContext.js +120 -0
- package/es/ProThemeTools/index.d.ts +4 -1
- package/es/ProThemeTools/index.js +60 -37
- package/es/ProThemeTools/style/index.less +3 -3
- package/es/ProThemeTools/utils/index.d.ts +16 -6
- package/es/ProThemeTools/utils/index.js +28 -24
- package/es/ProTooltip/index.js +14 -9
- package/es/ProTooltip/style/index.less +2 -2
- package/es/ProTree/components/AdaptiveTooltip.js +2 -3
- package/es/ProTree/components/List.js +3 -4
- package/es/ProTree/components/ProTree.js +19 -26
- package/es/ProTree/components/ProTreeSelect/index.js +38 -37
- package/es/ProTree/components/ProTreeSelect/style/index.less +2 -2
- package/es/ProTree/components/Tree.js +18 -25
- package/es/ProTree/index.js +0 -7
- package/es/ProTree/propsType.d.ts +1 -1
- package/es/ProTree/style/index.less +10 -6
- package/es/ProTreeModal/components/Cascader.js +3 -4
- package/es/ProTreeModal/components/List.js +11 -17
- package/es/ProTreeModal/components/SortableItem.js +2 -3
- package/es/ProTreeModal/components/Tree.js +3 -4
- package/es/ProTreeModal/components/Trigger.js +6 -11
- package/es/ProTreeModal/index.d.ts +0 -1
- package/es/ProTreeModal/index.js +14 -24
- package/es/ProTreeModal/style/index.less +14 -3
- package/es/ProUpload/components/ButtonRender.js +17 -20
- package/es/ProUpload/components/DragRender.js +2 -3
- package/es/ProUpload/components/FileItem.d.ts +0 -1
- package/es/ProUpload/components/FileItem.js +15 -21
- package/es/ProUpload/components/ImageRender.js +34 -43
- package/es/ProUpload/index.js +3 -4
- package/es/ProUpload/style/index.less +173 -12
- package/es/ProViewer/index.js +38 -45
- package/es/ProViewer/style/index.less +2 -2
- package/es/ProWaterMark/index.js +2 -3
- package/es/ProWaterMark/propsType.d.ts +5 -24
- package/es/global.less +2 -1
- package/es/index.d.ts +4 -2
- package/es/index.js +2 -3
- package/es/locale/en_US.js +1 -1
- package/es/locale/index.d.ts +2 -0
- package/es/locale/index.js +11 -2
- package/es/locale/zh_CN.js +1 -1
- package/es/style/components.less +0 -3
- package/es/style/theme/antd.less +38 -48
- package/es/style/theme/base.less +89 -0
- package/es/style/theme/index.less +2 -89
- package/es/utils/index.d.ts +7 -0
- package/es/utils/index.js +23 -1
- package/lib/FormsProvider/index.d.ts +4 -1
- package/lib/ProAction/components/CheckModalContent/index.js +0 -9
- package/lib/ProAction/index.js +45 -48
- package/lib/ProAction/index.less +2 -2
- package/lib/ProConfigProvider/index.d.ts +21 -4
- package/lib/ProConfigProvider/index.js +60 -31
- package/lib/ProDownload/index.js +62 -65
- package/lib/ProDownload/style/index.less +2 -2
- package/lib/ProDownload/utils.js +45 -54
- package/lib/ProDrawerForm/components/ProDrawer/index.js +64 -69
- package/lib/ProDrawerForm/components/ProModal/index.js +59 -67
- package/lib/ProDrawerForm/index.d.ts +2 -1
- package/lib/ProDrawerForm/index.js +4 -6
- package/lib/ProDrawerForm/propsType.d.ts +7 -18
- package/lib/ProDrawerForm/style/index.less +8 -14
- package/lib/ProEditLabel/components/RenderProForm.js +2 -3
- package/lib/ProEditLabel/index.js +40 -45
- package/lib/ProEditLabel/propsType.d.ts +1 -6
- package/lib/ProEditLabel/style/index.less +4 -3
- package/lib/ProEditTable/components/ActionButton/index.js +5 -8
- package/lib/ProEditTable/components/RcTable/BaseTable.js +72 -54
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +65 -46
- package/lib/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/lib/ProEditTable/components/RcTable/index.js +1 -8
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/lib/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/lib/ProEditTable/components/RenderField/index.js +378 -254
- package/lib/ProEditTable/components/RenderToolbar/index.js +19 -19
- package/lib/ProEditTable/components/Summary/index.js +5 -8
- package/lib/ProEditTable/components/Validator/index.js +3 -7
- package/lib/ProEditTable/index.js +126 -129
- package/lib/ProEditTable/propsType.d.ts +1 -7
- package/lib/ProEditTable/style/index.less +3 -7
- package/lib/ProEditTable/utils/config.js +31 -35
- package/lib/ProEditTable/utils/index.js +44 -41
- package/lib/ProEditTable/utils/tools.js +107 -113
- package/lib/ProEditTable/utils/useEditTableError.js +12 -4
- package/lib/ProEnum/hooks/useEnumRequest.js +43 -46
- package/lib/ProEnum/index.js +10 -17
- package/lib/ProEnum/style/index.less +2 -2
- package/lib/ProEnum/utils/index.d.ts +1 -0
- package/lib/ProEnum/utils/index.js +3 -1
- package/lib/ProForm/components/Container.d.ts +1 -0
- package/lib/ProForm/components/Container.js +2 -3
- package/lib/ProForm/components/FormFooter/index.js +13 -13
- package/lib/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/lib/ProForm/components/base/Checkbox/index.js +3 -4
- package/lib/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/lib/ProForm/components/base/DatePicker/index.js +7 -7
- package/lib/ProForm/components/base/DatePicker/useDateLimit.d.ts +1 -7
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +1 -3
- package/lib/ProForm/components/base/Input/index.js +6 -13
- package/lib/ProForm/components/base/InputNumber/index.js +3 -6
- package/lib/ProForm/components/base/Radio/index.js +3 -4
- package/lib/ProForm/components/base/RangePicker/index.js +6 -6
- package/lib/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/lib/ProForm/components/base/Select/index.js +2 -3
- package/lib/ProForm/components/base/Switch/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +2 -2
- package/lib/ProForm/components/base/TextArea/index.js +3 -4
- package/lib/ProForm/components/base/TextArea/index.less +12 -2
- package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/lib/ProForm/components/base/TimePicker/index.js +6 -7
- package/lib/ProForm/components/base/TimePicker/style/index.less +5 -3
- package/lib/ProForm/components/combination/Container/style/index.less +2 -2
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +28 -26
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +3 -6
- package/lib/ProForm/components/combination/FormList/components/Empty.js +18 -19
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +17 -21
- package/lib/ProForm/components/combination/FormList/index.js +2 -3
- package/lib/ProForm/components/combination/FormList/style/index.less +38 -2
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/index.d.ts +2 -8
- package/lib/ProForm/components/combination/Group/index.js +13 -6
- package/lib/ProForm/components/combination/Group/style/index.less +7 -87
- package/lib/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/lib/ProForm/components/combination/Group/utils.js +4 -5
- package/lib/ProForm/components/combination/ProCascader/index.js +23 -22
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/style/index.less +2 -2
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +6 -8
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +97 -116
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +13 -14
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/index.js +17 -16
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +5 -52
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +44 -28
- package/lib/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +66 -6
- package/lib/ProForm/components/index.d.ts +0 -8
- package/lib/ProForm/components/index.js +1 -63
- package/lib/ProForm/components/render/ChangedWrapper.js +8 -9
- package/lib/ProForm/components/render/ConfirmWrapper.js +28 -29
- package/lib/ProForm/components/render/Render.js +37 -39
- package/lib/ProForm/components/render/propsType.d.ts +2 -6
- package/lib/ProForm/index.js +8 -38
- package/lib/ProForm/style/index.less +6 -16
- package/lib/ProForm/utils/index.d.ts +15 -1
- package/lib/ProForm/utils/index.js +65 -17
- package/lib/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/lib/ProForm/utils/useForm.js +83 -73
- package/lib/ProForm/utils/useShouldUpdate.js +14 -14
- package/lib/ProForm/utils/valueType.js +8 -8
- package/lib/ProIcon/index.js +10 -13
- package/lib/ProIcon/style/index.less +2 -2
- package/lib/ProLayout/components/Layout/Header/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +11 -10
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +42 -39
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -4
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +12 -6
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +9 -5
- package/lib/ProLayout/components/Layout/Menu/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/style/index.less +2 -2
- package/lib/ProLayout/components/Layout/Notice/style/index.less +2 -2
- package/lib/ProLayout/components/ProCollapse/index.js +20 -36
- package/lib/ProLayout/components/ProCollapse/style/index.less +3 -3
- package/lib/ProLayout/components/ProFooter/index.js +3 -4
- package/lib/ProLayout/components/ProFooter/style/index.less +2 -2
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +9 -9
- package/lib/ProLayout/components/ProHeader/index.js +43 -46
- package/lib/ProLayout/components/ProHeader/style/index.less +2 -2
- package/lib/ProLayout/index.js +7 -6
- package/lib/ProLayout/style/index.less +4 -3
- package/lib/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/lib/ProSelect/index.js +7 -17
- package/lib/ProSelect/index.less +2 -2
- package/lib/ProSelect/propsType.d.ts +1 -1
- package/lib/ProStep/components/Anchor/index.js +2 -3
- package/lib/ProStep/components/Item/index.js +2 -1
- package/lib/ProStep/components/Listener/index.js +12 -14
- package/lib/ProStep/components/Step/index.js +1 -0
- package/lib/ProStep/index.js +39 -47
- package/lib/ProStep/style/index.less +4 -4
- package/lib/ProStepTab/index.js +72 -83
- package/lib/ProTable/components/FormatColumn/index.js +32 -31
- package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +38 -36
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.js +15 -18
- package/lib/ProTable/components/RenderSummary/index.js +4 -5
- package/lib/ProTable/components/RenderTableHeader/index.js +3 -5
- package/lib/ProTable/components/RenderTabs/index.js +3 -6
- package/lib/ProTable/components/TableResizable/index.js +2 -1
- package/lib/ProTable/components/TooltipTitle/index.js +2 -3
- package/lib/ProTable/hooks/useAntdTable.js +21 -26
- package/lib/ProTable/index.js +15 -16
- package/lib/ProTable/propsType.d.ts +1 -3
- package/lib/ProTable/style/index.less +5 -5
- package/lib/ProTabs/components/Card/index.js +5 -11
- package/lib/ProTabs/index.js +2 -3
- package/lib/ProTabs/style/index.less +2 -2
- package/lib/ProThemeTools/component/ProTools/index.js +18 -22
- package/lib/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/lib/ProThemeTools/context/ThemeContext.js +126 -0
- package/lib/ProThemeTools/index.d.ts +4 -1
- package/lib/ProThemeTools/index.js +69 -35
- package/lib/ProThemeTools/style/index.less +3 -3
- package/lib/ProThemeTools/utils/index.d.ts +16 -6
- package/lib/ProThemeTools/utils/index.js +29 -25
- package/lib/ProTooltip/index.js +14 -9
- package/lib/ProTooltip/style/index.less +2 -2
- package/lib/ProTree/components/AdaptiveTooltip.js +2 -4
- package/lib/ProTree/components/List.js +3 -4
- package/lib/ProTree/components/ProTree.js +19 -26
- package/lib/ProTree/components/ProTreeSelect/index.js +38 -37
- package/lib/ProTree/components/ProTreeSelect/style/index.less +2 -2
- package/lib/ProTree/components/Tree.js +18 -25
- package/lib/ProTree/index.js +0 -8
- package/lib/ProTree/propsType.d.ts +1 -1
- package/lib/ProTree/style/index.less +10 -6
- package/lib/ProTreeModal/components/Cascader.js +3 -4
- package/lib/ProTreeModal/components/List.js +11 -17
- package/lib/ProTreeModal/components/SortableItem.js +2 -3
- package/lib/ProTreeModal/components/Tree.js +3 -4
- package/lib/ProTreeModal/components/Trigger.js +6 -11
- package/lib/ProTreeModal/index.d.ts +0 -1
- package/lib/ProTreeModal/index.js +14 -24
- package/lib/ProTreeModal/style/index.less +14 -3
- package/lib/ProUpload/components/ButtonRender.js +17 -20
- package/lib/ProUpload/components/DragRender.js +2 -3
- package/lib/ProUpload/components/FileItem.d.ts +0 -1
- package/lib/ProUpload/components/FileItem.js +15 -21
- package/lib/ProUpload/components/ImageRender.js +34 -43
- package/lib/ProUpload/index.js +3 -4
- package/lib/ProUpload/style/index.less +173 -12
- package/lib/ProViewer/index.js +39 -47
- package/lib/ProViewer/style/index.less +2 -2
- package/lib/ProWaterMark/index.js +3 -4
- package/lib/ProWaterMark/propsType.d.ts +5 -24
- package/lib/global.less +2 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.js +36 -16
- package/lib/locale/en_US.js +1 -1
- package/lib/locale/index.d.ts +2 -0
- package/lib/locale/index.js +12 -2
- package/lib/locale/zh_CN.js +1 -1
- package/lib/style/components.less +0 -3
- package/lib/style/theme/antd.less +38 -48
- package/lib/style/theme/base.less +89 -0
- package/lib/style/theme/index.less +2 -89
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +26 -2
- package/package.json +31 -18
- package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/es/ProEditTable/components/RcTable/VirtualTable.js +0 -8
- package/es/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/es/ProForm/components/combination/ProCombination/index.js +0 -204
- package/es/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/es/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -108
- package/es/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/es/ProForm/components/old/EnumSelect/index.js +0 -272
- package/es/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/es/ProForm/components/old/EnumSelect/interface.js +0 -1
- package/es/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/es/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/es/ProForm/components/old/InputRange/index.js +0 -100
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/es/ProForm/components/old/InputWithSuffix/index.js +0 -46
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/es/ProForm/components/old/ProAddress/index.js +0 -298
- package/es/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/es/ProForm/components/old/ProAddress/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/es/ProForm/components/old/ProCertNo/index.js +0 -66
- package/es/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/es/ProForm/components/old/ProCertNo/propsType.js +0 -1
- package/es/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/es/ProForm/components/old/ProCertValidity/index.js +0 -188
- package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/ProForm/components/old/ProCertValidity/propsType.js +0 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/es/ProForm/components/old/ProRangeBox/index.js +0 -97
- package/es/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/es/ProForm/components/old/ProRangeBox/propsType.js +0 -1
- package/es/ProForm/utils/_useChanged.d.ts +0 -8
- package/es/ProForm/utils/_useChanged.js +0 -25
- package/es/ProForm/utils/_useListChanged.d.ts +0 -16
- package/es/ProForm/utils/_useListChanged.js +0 -93
- package/es/ProUpload/style/fileItem.less +0 -159
- package/es/old/ProCertValidity/index.d.ts +0 -9
- package/es/old/ProCertValidity/index.js +0 -188
- package/es/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/old/ProCertValidity/propsType.js +0 -1
- package/es/old/ProEditableTable/index.d.ts +0 -4
- package/es/old/ProEditableTable/index.js +0 -594
- package/es/old/ProEditableTable/propsType.d.ts +0 -68
- package/es/old/ProEditableTable/propsType.js +0 -1
- package/es/old/ProEditableTable/style/index.less +0 -75
- package/es/old/ProEditableTable/utils.d.ts +0 -29
- package/es/old/ProEditableTable/utils.js +0 -323
- package/lib/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/lib/ProEditTable/components/RcTable/VirtualTable.js +0 -14
- package/lib/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/lib/ProForm/components/combination/ProCombination/index.js +0 -213
- package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/lib/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -115
- package/lib/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/lib/ProForm/components/old/EnumSelect/index.js +0 -279
- package/lib/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/lib/ProForm/components/old/EnumSelect/interface.js +0 -5
- package/lib/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/lib/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/lib/ProForm/components/old/InputRange/index.js +0 -108
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/lib/ProForm/components/old/InputWithSuffix/index.js +0 -53
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/lib/ProForm/components/old/ProAddress/index.js +0 -306
- package/lib/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/lib/ProForm/components/old/ProAddress/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/lib/ProForm/components/old/ProCertNo/index.js +0 -73
- package/lib/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/lib/ProForm/components/old/ProCertNo/propsType.js +0 -5
- package/lib/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/lib/ProForm/components/old/ProCertValidity/index.js +0 -193
- package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/ProForm/components/old/ProCertValidity/propsType.js +0 -5
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/lib/ProForm/components/old/ProRangeBox/index.js +0 -105
- package/lib/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/lib/ProForm/components/old/ProRangeBox/propsType.js +0 -5
- package/lib/ProForm/utils/_useChanged.d.ts +0 -8
- package/lib/ProForm/utils/_useChanged.js +0 -32
- package/lib/ProForm/utils/_useListChanged.d.ts +0 -16
- package/lib/ProForm/utils/_useListChanged.js +0 -100
- package/lib/ProUpload/style/fileItem.less +0 -159
- package/lib/old/ProCertValidity/index.d.ts +0 -9
- package/lib/old/ProCertValidity/index.js +0 -193
- package/lib/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/old/ProCertValidity/propsType.js +0 -5
- package/lib/old/ProEditableTable/index.d.ts +0 -4
- package/lib/old/ProEditableTable/index.js +0 -601
- package/lib/old/ProEditableTable/propsType.d.ts +0 -68
- package/lib/old/ProEditableTable/propsType.js +0 -5
- package/lib/old/ProEditableTable/style/index.less +0 -75
- package/lib/old/ProEditableTable/utils.d.ts +0 -29
- package/lib/old/ProEditableTable/utils.js +0 -330
- /package/es/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
- /package/lib/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
6
6
|
});
|
7
7
|
exports.default = void 0;
|
8
|
-
require("antd/es/space/style");
|
9
|
-
var _space = _interopRequireDefault(require("antd/es/space"));
|
10
|
-
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
11
8
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
12
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
13
10
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
14
11
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
15
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
16
13
|
var _react = _interopRequireDefault(require("react"));
|
14
|
+
var _antd = require("antd");
|
17
15
|
var _config = require("../../utils/config");
|
18
16
|
var _ActionButton = _interopRequireDefault(require("../ActionButton"));
|
19
17
|
var _tools = require("../../utils/tools");
|
20
18
|
var _excluded = ["type", "label", "show", "onHandle", "needConfirm", "onClick"];
|
19
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
20
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
|
21
21
|
// 渲染工具栏
|
22
22
|
var RenderToolbar = function RenderToolbar(config) {
|
23
23
|
var emptyBtnText = config.emptyBtnText,
|
@@ -80,22 +80,22 @@ var RenderToolbar = function RenderToolbar(config) {
|
|
80
80
|
toolbar.show = show !== null && show !== void 0 ? show : true;
|
81
81
|
toolbar.needConfirm = needConfirm !== null && needConfirm !== void 0 ? needConfirm : true;
|
82
82
|
toolbar.onEvent = /*#__PURE__*/function () {
|
83
|
-
var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(
|
84
|
-
var index, form, name, namePath, tableLength, selectedRows, onEvent, result;
|
85
|
-
return (
|
86
|
-
while (1) switch (_context.
|
83
|
+
var _ref2 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee(record, _ref) {
|
84
|
+
var index, form, name, namePath, tableLength, selectedRows, onEvent, result, actionHandler;
|
85
|
+
return _regenerator().w(function (_context) {
|
86
|
+
while (1) switch (_context.n) {
|
87
87
|
case 0:
|
88
88
|
index = _ref.index, form = _ref.form, name = _ref.name, namePath = _ref.namePath, tableLength = _ref.tableLength, selectedRows = _ref.selectedRows;
|
89
89
|
onEvent = onClick || onHandle;
|
90
90
|
if (onEvent) {
|
91
|
-
_context.
|
91
|
+
_context.n = 1;
|
92
92
|
break;
|
93
93
|
}
|
94
94
|
result = true;
|
95
|
-
_context.
|
95
|
+
_context.n = 3;
|
96
96
|
break;
|
97
|
-
case
|
98
|
-
_context.
|
97
|
+
case 1:
|
98
|
+
_context.n = 2;
|
99
99
|
return onEvent === null || onEvent === void 0 ? void 0 : onEvent(record, {
|
100
100
|
index: index,
|
101
101
|
form: form,
|
@@ -104,11 +104,12 @@ var RenderToolbar = function RenderToolbar(config) {
|
|
104
104
|
tableLength: tableLength,
|
105
105
|
selectedRows: selectedRows
|
106
106
|
});
|
107
|
-
case
|
108
|
-
result = _context.
|
109
|
-
case
|
107
|
+
case 2:
|
108
|
+
result = _context.v;
|
109
|
+
case 3:
|
110
110
|
if (result !== false && type !== 'custom') {
|
111
|
-
_config.actions[type]
|
111
|
+
actionHandler = _config.actions[type];
|
112
|
+
actionHandler((0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
|
112
113
|
index: index,
|
113
114
|
record: record,
|
114
115
|
name: name,
|
@@ -116,9 +117,8 @@ var RenderToolbar = function RenderToolbar(config) {
|
|
116
117
|
virtualName: virtualName
|
117
118
|
}));
|
118
119
|
}
|
119
|
-
case
|
120
|
-
|
121
|
-
return _context.stop();
|
120
|
+
case 4:
|
121
|
+
return _context.a(2);
|
122
122
|
}
|
123
123
|
}, _callee);
|
124
124
|
}));
|
@@ -141,7 +141,7 @@ var RenderToolbar = function RenderToolbar(config) {
|
|
141
141
|
}, "".concat(btnConfig === null || btnConfig === void 0 ? void 0 : btnConfig.label).concat(btnConfig === null || btnConfig === void 0 ? void 0 : btnConfig.type));
|
142
142
|
});
|
143
143
|
};
|
144
|
-
return (0, _jsxRuntime.jsx)(
|
144
|
+
return (0, _jsxRuntime.jsx)(_antd.Space, {
|
145
145
|
children: renderToolbarBtns()
|
146
146
|
});
|
147
147
|
};
|
@@ -5,12 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
6
6
|
});
|
7
7
|
exports.default = void 0;
|
8
|
-
require("antd/es/space/style");
|
9
|
-
var _space = _interopRequireDefault(require("antd/es/space"));
|
10
|
-
require("antd/es/table/style");
|
11
|
-
var _table = _interopRequireDefault(require("antd/es/table"));
|
12
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
13
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
10
|
+
var _antd = require("antd");
|
14
11
|
var _utils = require("@zat-design/utils");
|
15
12
|
var _utils2 = require("../../../ProUtils/utils");
|
16
13
|
var calc = _utils.tools.calc;
|
@@ -70,17 +67,17 @@ var Summary = function Summary(_ref3) {
|
|
70
67
|
if (!(data === null || data === void 0 ? void 0 : data.length)) {
|
71
68
|
return null;
|
72
69
|
}
|
73
|
-
return (0, _jsxRuntime.jsx)(
|
70
|
+
return (0, _jsxRuntime.jsx)(_antd.Table.Summary, {
|
74
71
|
fixed: fixed,
|
75
|
-
children: (0, _jsxRuntime.jsx)(
|
72
|
+
children: (0, _jsxRuntime.jsx)(_antd.Table.Summary.Row, {
|
76
73
|
children: nextColumns.map(function (item) {
|
77
74
|
var index = item.index,
|
78
75
|
colSpan = item.colSpan,
|
79
76
|
prefix = item.prefix;
|
80
|
-
return (0, _jsxRuntime.jsx)(
|
77
|
+
return (0, _jsxRuntime.jsx)(_antd.Table.Summary.Cell, {
|
81
78
|
index: index,
|
82
79
|
colSpan: colSpan,
|
83
|
-
children: (0, _jsxRuntime.jsxs)(
|
80
|
+
children: (0, _jsxRuntime.jsxs)(_antd.Space, {
|
84
81
|
children: [prefix, (0, _jsxRuntime.jsx)("span", {
|
85
82
|
children: renderCell(item)
|
86
83
|
})]
|
@@ -1,23 +1,19 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
5
4
|
value: true
|
6
5
|
});
|
7
6
|
exports.default = void 0;
|
8
|
-
require("antd/es/message/style");
|
9
|
-
var _message2 = _interopRequireDefault(require("antd/es/message"));
|
10
|
-
require("antd/es/form/style");
|
11
|
-
var _form = _interopRequireDefault(require("antd/es/form"));
|
12
7
|
var _jsxRuntime = require("react/jsx-runtime");
|
13
8
|
var _react = require("react");
|
9
|
+
var _antd = require("antd");
|
14
10
|
var Validator = function Validator(_ref) {
|
15
11
|
var name = _ref.name,
|
16
12
|
virtualKey = _ref.virtualKey,
|
17
13
|
editingKeys = _ref.editingKeys,
|
18
14
|
onlyOneLineMsg = _ref.onlyOneLineMsg;
|
19
15
|
return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
20
|
-
children: name && virtualKey ? (0, _jsxRuntime.jsx)(
|
16
|
+
children: name && virtualKey ? (0, _jsxRuntime.jsx)(_antd.Form.Item, {
|
21
17
|
noStyle: true,
|
22
18
|
validateFirst: true,
|
23
19
|
name: "".concat(name, "-").concat(virtualKey),
|
@@ -25,7 +21,7 @@ var Validator = function Validator(_ref) {
|
|
25
21
|
// 单行编辑下,校验当前数据是否已保存
|
26
22
|
validator: function validator() {
|
27
23
|
if (editingKeys === null || editingKeys === void 0 ? void 0 : editingKeys.length) {
|
28
|
-
|
24
|
+
_antd.message.warning(onlyOneLineMsg);
|
29
25
|
return Promise.reject();
|
30
26
|
}
|
31
27
|
return Promise.resolve();
|
@@ -6,26 +6,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
7
7
|
});
|
8
8
|
exports.default = void 0;
|
9
|
-
require("antd/es/affix/style");
|
10
|
-
var _affix = _interopRequireDefault(require("antd/es/affix"));
|
11
9
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
12
10
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
13
|
-
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
14
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
15
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
16
|
-
require("antd/es/config-provider/style");
|
17
|
-
var _configProvider = _interopRequireDefault(require("antd/es/config-provider"));
|
18
13
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
19
|
-
require("antd/es/form/style");
|
20
|
-
var _form = _interopRequireDefault(require("antd/es/form"));
|
21
14
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
22
15
|
var _set2 = _interopRequireDefault(require("lodash/set"));
|
16
|
+
var _isFunction2 = _interopRequireDefault(require("lodash/isFunction"));
|
23
17
|
var _isBoolean2 = _interopRequireDefault(require("lodash/isBoolean"));
|
24
18
|
var _isArray2 = _interopRequireDefault(require("lodash/isArray"));
|
25
19
|
var _get2 = _interopRequireDefault(require("lodash/get"));
|
26
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
27
21
|
var _react = _interopRequireWildcard(require("react"));
|
28
22
|
var _ahooks = require("ahooks");
|
23
|
+
var _antd = require("antd");
|
29
24
|
var _classnames = _interopRequireDefault(require("classnames"));
|
30
25
|
var _utils = require("./utils");
|
31
26
|
var _tools = require("./utils/tools");
|
@@ -34,31 +29,43 @@ var _ProForm = _interopRequireDefault(require("../ProForm"));
|
|
34
29
|
var _empty = _interopRequireDefault(require("../assets/empty.png"));
|
35
30
|
var _locale = _interopRequireWildcard(require("../locale"));
|
36
31
|
var _RcTable = require("./components/RcTable");
|
37
|
-
var _excluded = ["value", "onChange", "onDrag", "onDragEnd", "className", "columns", "
|
32
|
+
var _excluded = ["value", "onChange", "onDrag", "onDragEnd", "className", "columns", "mode", "stripe", "draggable", "disabled", "insertType", "emptyBtnText", "actionWidth", "actionProps", "toolbarProps", "toolbarSticky", "rowSelection", "onlyOneLineMsg", "deletePoConfirmMsg", "mulDeletePoConfirmMsg", "requiredAlign", "summary", "max", "headerRender", "pagination", "rowKey", "rowDisabled", "rowDraggable", "footerRender", "scroll", "actionDirection", "diffConfig"];
|
33
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
34
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
|
38
35
|
var ProEditTable = function ProEditTable(_ref, ref) {
|
39
36
|
var _resetProps$id, _resetProps$id$split, _themeConfig$data2, _resetProps$otherProp;
|
40
|
-
var value = _ref.value,
|
37
|
+
var _ref$value = _ref.value,
|
38
|
+
value = _ref$value === void 0 ? [] : _ref$value,
|
41
39
|
onChange = _ref.onChange,
|
42
40
|
onDrag = _ref.onDrag,
|
43
41
|
onDragEnd = _ref.onDragEnd,
|
44
42
|
className = _ref.className,
|
45
43
|
columns = _ref.columns,
|
46
|
-
|
47
|
-
mode = _ref
|
48
|
-
stripe = _ref.stripe,
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
44
|
+
_ref$mode = _ref.mode,
|
45
|
+
mode = _ref$mode === void 0 ? 'multiple' : _ref$mode,
|
46
|
+
_ref$stripe = _ref.stripe,
|
47
|
+
stripe = _ref$stripe === void 0 ? true : _ref$stripe,
|
48
|
+
_ref$draggable = _ref.draggable,
|
49
|
+
draggable = _ref$draggable === void 0 ? false : _ref$draggable,
|
50
|
+
_ref$disabled = _ref.disabled,
|
51
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
52
|
+
_ref$insertType = _ref.insertType,
|
53
|
+
insertType = _ref$insertType === void 0 ? 'after' : _ref$insertType,
|
54
|
+
_ref$emptyBtnText = _ref.emptyBtnText,
|
55
|
+
emptyBtnText = _ref$emptyBtnText === void 0 ? _locale.default.ProEditTable.clickAdd : _ref$emptyBtnText,
|
54
56
|
actionWidth = _ref.actionWidth,
|
55
|
-
actionProps = _ref.actionProps,
|
56
|
-
|
57
|
+
_ref$actionProps = _ref.actionProps,
|
58
|
+
actionProps = _ref$actionProps === void 0 ? [] : _ref$actionProps,
|
59
|
+
_ref$toolbarProps = _ref.toolbarProps,
|
60
|
+
toolbarProps = _ref$toolbarProps === void 0 ? [] : _ref$toolbarProps,
|
57
61
|
toolbarSticky = _ref.toolbarSticky,
|
58
62
|
rowSelection = _ref.rowSelection,
|
59
|
-
onlyOneLineMsg = _ref.onlyOneLineMsg,
|
60
|
-
|
61
|
-
|
63
|
+
_ref$onlyOneLineMsg = _ref.onlyOneLineMsg,
|
64
|
+
onlyOneLineMsg = _ref$onlyOneLineMsg === void 0 ? _locale.default.ProEditTable.onlyOneLineMsg : _ref$onlyOneLineMsg,
|
65
|
+
_ref$deletePoConfirmM = _ref.deletePoConfirmMsg,
|
66
|
+
deletePoConfirmMsg = _ref$deletePoConfirmM === void 0 ? _locale.default.ProEditTable.deletePoConfirmMsg : _ref$deletePoConfirmM,
|
67
|
+
_ref$mulDeletePoConfi = _ref.mulDeletePoConfirmMsg,
|
68
|
+
mulDeletePoConfirmMsg = _ref$mulDeletePoConfi === void 0 ? _locale.default.ProEditTable.mulDeletePoConfirmMsg : _ref$mulDeletePoConfi,
|
62
69
|
configRequiredAlign = _ref.requiredAlign,
|
63
70
|
summary = _ref.summary,
|
64
71
|
max = _ref.max,
|
@@ -69,11 +76,12 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
69
76
|
rowDraggable = _ref.rowDraggable,
|
70
77
|
footerRender = _ref.footerRender,
|
71
78
|
scroll = _ref.scroll,
|
72
|
-
actionDirection = _ref.actionDirection,
|
79
|
+
_ref$actionDirection = _ref.actionDirection,
|
80
|
+
actionDirection = _ref$actionDirection === void 0 ? 'horizontal' : _ref$actionDirection,
|
73
81
|
diffConfig = _ref.diffConfig,
|
74
82
|
resetProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
75
83
|
// 上下文form
|
76
|
-
var contentForm =
|
84
|
+
var contentForm = _antd.Form.useFormInstance();
|
77
85
|
var formFieldProps = _ProForm.default.useFieldProps() || {};
|
78
86
|
var affixRef = (0, _react.useRef)(null);
|
79
87
|
var form = contentForm || (formFieldProps === null || formFieldProps === void 0 ? void 0 : formFieldProps.form) || (resetProps === null || resetProps === void 0 ? void 0 : resetProps.form);
|
@@ -89,9 +97,9 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
89
97
|
disabled = (formFieldProps === null || formFieldProps === void 0 ? void 0 : formFieldProps.disabled) || disabled; // formFieldProps?.disabled可能是函数??
|
90
98
|
}
|
91
99
|
var tableRef = (0, _react.useRef)(null);
|
92
|
-
|
93
|
-
valueChangeRef.current = 0;
|
94
|
-
var _React$useContext = _react.default.useContext(
|
100
|
+
// const valueChangeRef = useRef<number>(0);
|
101
|
+
// valueChangeRef.current = 0;
|
102
|
+
var _React$useContext = _react.default.useContext(_antd.ConfigProvider.ConfigContext),
|
95
103
|
getPrefixCls = _React$useContext.getPrefixCls;
|
96
104
|
var prefixCls = getPrefixCls();
|
97
105
|
var _useLocalStorageState = (0, _ahooks.useLocalStorageState)('themeConfig'),
|
@@ -107,7 +115,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
107
115
|
editingKeys: [],
|
108
116
|
selectedRowKeys: [],
|
109
117
|
selectedRows: [],
|
110
|
-
virtualKey:
|
118
|
+
virtualKey: mode === 'single' ? (0, _tools.getRandom)() : '',
|
111
119
|
page: {
|
112
120
|
pageNum: 1,
|
113
121
|
pageSize: (pagination === null || pagination === void 0 ? void 0 : pagination.pageSize) || 10
|
@@ -131,14 +139,14 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
131
139
|
'pro-table-no-stripe': !stripe,
|
132
140
|
className: className
|
133
141
|
});
|
134
|
-
var getRowKey = function
|
142
|
+
var getRowKey = (0, _react.useCallback)(function (record) {
|
135
143
|
var key = record.rowKey || (0, _tools.getRandom)();
|
136
144
|
if (rowKey) {
|
137
145
|
var _ref3;
|
138
|
-
key = (_ref3 =
|
146
|
+
key = (_ref3 = (0, _isFunction2.default)(rowKey) ? rowKey(record) : record[rowKey]) !== null && _ref3 !== void 0 ? _ref3 : key;
|
139
147
|
}
|
140
148
|
return key;
|
141
|
-
};
|
149
|
+
}, [rowKey]);
|
142
150
|
var originalValues = (0, _react.useMemo)(function () {
|
143
151
|
var _originalArr$every, _originalArr$some;
|
144
152
|
var nextOriginalValues;
|
@@ -163,7 +171,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
163
171
|
}
|
164
172
|
return nextOriginalValues;
|
165
173
|
}, [resetProps === null || resetProps === void 0 ? void 0 : resetProps.originalValues]);
|
166
|
-
var getIsNew = function
|
174
|
+
var getIsNew = (0, _react.useCallback)(function (record) {
|
167
175
|
var _originalArr$find;
|
168
176
|
var originalArr = (0, _get2.default)(originalValues, name);
|
169
177
|
if (!(originalArr === null || originalArr === void 0 ? void 0 : originalArr.length)) {
|
@@ -172,20 +180,21 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
172
180
|
return !(originalArr === null || originalArr === void 0 ? void 0 : (_originalArr$find = originalArr.find) === null || _originalArr$find === void 0 ? void 0 : _originalArr$find.call(originalArr, function (item) {
|
173
181
|
return getRowKey(item) === getRowKey(record);
|
174
182
|
}));
|
175
|
-
};
|
183
|
+
}, [originalValues, name]);
|
176
184
|
// 分页变更
|
177
185
|
var handlePageChange = (0, _react.useCallback)(/*#__PURE__*/function () {
|
178
|
-
var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/(
|
179
|
-
|
180
|
-
|
186
|
+
var _ref4 = (0, _asyncToGenerator2.default)(/*#__PURE__*/_regenerator().m(function _callee(current, pageSize) {
|
187
|
+
var _t;
|
188
|
+
return _regenerator().w(function (_context) {
|
189
|
+
while (1) switch (_context.p = _context.n) {
|
181
190
|
case 0:
|
182
|
-
_context.
|
191
|
+
_context.p = 0;
|
183
192
|
if (!pagination) {
|
184
|
-
_context.
|
193
|
+
_context.n = 3;
|
185
194
|
break;
|
186
195
|
}
|
187
196
|
if (!(pageSize !== page.pageSize)) {
|
188
|
-
_context.
|
197
|
+
_context.n = 1;
|
189
198
|
break;
|
190
199
|
}
|
191
200
|
setState({
|
@@ -194,31 +203,30 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
194
203
|
pageSize: pageSize
|
195
204
|
}
|
196
205
|
});
|
197
|
-
return _context.
|
198
|
-
case
|
199
|
-
_context.
|
206
|
+
return _context.a(2);
|
207
|
+
case 1:
|
208
|
+
_context.n = 2;
|
200
209
|
return form.validateFields([name], {
|
201
210
|
recursive: true
|
202
211
|
});
|
203
|
-
case
|
212
|
+
case 2:
|
204
213
|
setState({
|
205
214
|
page: {
|
206
215
|
pageNum: current,
|
207
216
|
pageSize: pageSize !== null && pageSize !== void 0 ? pageSize : page.pageSize
|
208
217
|
}
|
209
218
|
});
|
210
|
-
case
|
211
|
-
_context.
|
219
|
+
case 3:
|
220
|
+
_context.n = 5;
|
212
221
|
break;
|
213
|
-
case
|
214
|
-
_context.
|
215
|
-
|
222
|
+
case 4:
|
223
|
+
_context.p = 4;
|
224
|
+
_t = _context.v;
|
216
225
|
(0, _tools.handleScrollToError)();
|
217
|
-
case
|
218
|
-
|
219
|
-
return _context.stop();
|
226
|
+
case 5:
|
227
|
+
return _context.a(2);
|
220
228
|
}
|
221
|
-
}, _callee, null, [[0,
|
229
|
+
}, _callee, null, [[0, 4]]);
|
222
230
|
}));
|
223
231
|
return function (_x, _x2) {
|
224
232
|
return _ref4.apply(this, arguments);
|
@@ -280,7 +288,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
280
288
|
var addBtnConfig = toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.find(function (item) {
|
281
289
|
return item.type === type;
|
282
290
|
});
|
283
|
-
if (
|
291
|
+
if ((0, _isFunction2.default)(addBtnConfig === null || addBtnConfig === void 0 ? void 0 : addBtnConfig.show)) {
|
284
292
|
var result = addBtnConfig.show();
|
285
293
|
addBtnConfig.show = result;
|
286
294
|
}
|
@@ -294,6 +302,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
294
302
|
var _rowSelection = (0, _objectSpread2.default)({
|
295
303
|
fixed: true,
|
296
304
|
selectedRowKeys: selectedRowKeys,
|
305
|
+
columnWidth: 48,
|
297
306
|
onChange: function onChange(selectedRowKeys, selectedRows) {
|
298
307
|
setState({
|
299
308
|
selectedRowKeys: selectedRowKeys,
|
@@ -312,27 +321,29 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
312
321
|
hideSelectAll: isHideCheckBox
|
313
322
|
}, rowSelection);
|
314
323
|
// 空列表状态
|
315
|
-
var
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
children:
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
324
|
+
var emptyDom = (0, _react.useMemo)(function () {
|
325
|
+
return function () {
|
326
|
+
var _toolbarProps$filter;
|
327
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
328
|
+
className: "com-empty",
|
329
|
+
children: [(0, _jsxRuntime.jsx)("img", {
|
330
|
+
className: "img",
|
331
|
+
src: _empty.default,
|
332
|
+
alt: "Empty"
|
333
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
334
|
+
className: "content",
|
335
|
+
children: disabled || isForbiddenBtn('add') ? _locale.default.ProEditTable.noData : (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
336
|
+
children: [_locale.default.ProEditTable.noData, "\uFF0C", (0, _jsxRuntime.jsx)(_components.RenderToolbar, (0, _objectSpread2.default)({}, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, config), {}, {
|
337
|
+
toolbarProps: toolbarProps === null || toolbarProps === void 0 ? void 0 : (_toolbarProps$filter = toolbarProps.filter) === null || _toolbarProps$filter === void 0 ? void 0 : _toolbarProps$filter.call(toolbarProps, function (item) {
|
338
|
+
return item.type === 'add' || (item === null || item === void 0 ? void 0 : item.persistence);
|
339
|
+
}),
|
340
|
+
dataSource: []
|
341
|
+
})))]
|
342
|
+
})
|
343
|
+
})]
|
344
|
+
});
|
345
|
+
};
|
346
|
+
}, [config, disabled, isForbiddenBtn, toolbarProps]);
|
336
347
|
/**
|
337
348
|
* 渲染表格选择器
|
338
349
|
* @returns rowSelection
|
@@ -349,23 +360,20 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
349
360
|
}
|
350
361
|
return null;
|
351
362
|
};
|
352
|
-
(0, _ahooks.useDeepCompareEffect)(function () {
|
353
|
-
valueChangeRef.current += 1;
|
354
|
-
// 在这里根据需要计算新的数组
|
355
|
-
}, [value, config.name]);
|
356
363
|
var _columns = (0, _react.useMemo)(function () {
|
357
364
|
return (0, _utils.transformColumns)(columns, config);
|
358
|
-
}, [
|
365
|
+
}, [disabled, forceUpdate, columns, page, actionProps, editingKeys, cellNamePath]);
|
359
366
|
var initDataSource = function initDataSource() {
|
360
367
|
var _value$every, _value$some;
|
368
|
+
// 检查每一项是否有 rowKey 或通过 rowKey 字段获取的 key
|
361
369
|
var isAllHasKey = value === null || value === void 0 ? void 0 : (_value$every = value.every) === null || _value$every === void 0 ? void 0 : _value$every.call(value, function (item) {
|
362
|
-
return item.rowKey;
|
370
|
+
return item.rowKey || typeof rowKey === 'string' && item[rowKey];
|
363
371
|
});
|
364
|
-
//
|
372
|
+
// 检查 rowKey 是否需要覆盖(即当前 rowKey 与 getRowKey 生成的不一致)
|
365
373
|
var isNeedCover = value === null || value === void 0 ? void 0 : (_value$some = value.some) === null || _value$some === void 0 ? void 0 : _value$some.call(value, function (item) {
|
366
|
-
return item.rowKey !== getRowKey(item);
|
374
|
+
return item.rowKey !== (getRowKey === null || getRowKey === void 0 ? void 0 : getRowKey(item));
|
367
375
|
});
|
368
|
-
// 初始化默认生成
|
376
|
+
// 初始化默认生成 rowKey
|
369
377
|
if ((value === null || value === void 0 ? void 0 : value.length) && (!isAllHasKey || isNeedCover)) {
|
370
378
|
var nextValues = value === null || value === void 0 ? void 0 : value.map(function (item) {
|
371
379
|
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
@@ -409,11 +417,11 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
409
417
|
rowSelection: renderRowSelection()
|
410
418
|
});
|
411
419
|
} : summary;
|
412
|
-
var TableComponent = draggable ? _RcTable.DraggableTable :
|
420
|
+
var TableComponent = draggable ? _RcTable.DraggableTable : _RcTable.BaseTable;
|
413
421
|
return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
414
|
-
children: [(0, _jsxRuntime.
|
415
|
-
renderEmpty: (value === null || value === void 0 ? void 0 : value.length) ? undefined :
|
416
|
-
children:
|
422
|
+
children: [(0, _jsxRuntime.jsx)(_antd.ConfigProvider, {
|
423
|
+
renderEmpty: (value === null || value === void 0 ? void 0 : value.length) ? undefined : emptyDom,
|
424
|
+
children: (0, _jsxRuntime.jsx)(TableComponent, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, resetProps), {}, {
|
417
425
|
draggableProps: {
|
418
426
|
onChange: onChange,
|
419
427
|
onDrag: onDrag,
|
@@ -421,6 +429,7 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
421
429
|
draggable: draggable
|
422
430
|
},
|
423
431
|
tableProps: {
|
432
|
+
rowKey: rowKey,
|
424
433
|
value: value,
|
425
434
|
headerRender: headerRender,
|
426
435
|
tableRef: tableRef,
|
@@ -441,36 +450,36 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
441
450
|
locale: _locale.default,
|
442
451
|
handlePageChange: handlePageChange
|
443
452
|
}
|
444
|
-
}))
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
children: (0, _jsxRuntime.jsx)(_components.RenderToolbar, (0, _objectSpread2.default)({}, config))
|
450
|
-
})
|
451
|
-
})) : (0, _jsxRuntime.jsx)("div", {
|
453
|
+
}))
|
454
|
+
}), !isView && (value === null || value === void 0 ? void 0 : value.length) ? toolbarSticky ? (0, _jsxRuntime.jsx)(_antd.Affix, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
455
|
+
ref: affixRef
|
456
|
+
}, _toolbarSticky), {}, {
|
457
|
+
children: (0, _jsxRuntime.jsx)("div", {
|
452
458
|
className: "pro-edit-table-toolbar".concat(pagination ? ' pro-edit-table-toolbar-fixed' : ''),
|
453
459
|
children: (0, _jsxRuntime.jsx)(_components.RenderToolbar, (0, _objectSpread2.default)({}, config))
|
454
|
-
})
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
460
|
+
})
|
461
|
+
})) : (0, _jsxRuntime.jsx)("div", {
|
462
|
+
className: "pro-edit-table-toolbar".concat(pagination ? ' pro-edit-table-toolbar-fixed' : ''),
|
463
|
+
children: (0, _jsxRuntime.jsx)(_components.RenderToolbar, (0, _objectSpread2.default)({}, config))
|
464
|
+
}) : null, footerRender ? (0, _jsxRuntime.jsx)("div", {
|
465
|
+
className: "pro-edit-table-footer",
|
466
|
+
children: footerRender
|
467
|
+
}) : null, pagination ? (0, _jsxRuntime.jsx)("div", {
|
468
|
+
id: "pro-edit-table-pagination-".concat(config.name.join('-')),
|
469
|
+
onClick: function onClick() {
|
470
|
+
(0, _tools.onPageCheck)({
|
471
|
+
form: form,
|
472
|
+
name: name,
|
473
|
+
value: value,
|
474
|
+
columns: columns,
|
475
|
+
page: page,
|
476
|
+
pagination: pagination,
|
477
|
+
isView: isView,
|
478
|
+
disabled: disabled,
|
479
|
+
setState: setState
|
480
|
+
});
|
481
|
+
}
|
482
|
+
}) : null, (0, _jsxRuntime.jsx)(_components.Validator, {
|
474
483
|
name: name,
|
475
484
|
virtualKey: virtualKey,
|
476
485
|
editingKeys: editingKeys,
|
@@ -479,22 +488,10 @@ var ProEditTable = function ProEditTable(_ref, ref) {
|
|
479
488
|
});
|
480
489
|
};
|
481
490
|
var ForwardProEditTable = /*#__PURE__*/(0, _react.forwardRef)(ProEditTable);
|
491
|
+
// 删除输入就卡顿,需要研究
|
482
492
|
ForwardProEditTable.defaultProps = {
|
483
|
-
type: 'multiple',
|
484
|
-
mode: 'multiple',
|
485
|
-
insertType: 'after',
|
486
|
-
actionDirection: 'horizontal',
|
487
|
-
value: [],
|
488
493
|
actionProps: [],
|
489
|
-
toolbarProps: []
|
490
|
-
disabled: false,
|
491
|
-
draggable: false,
|
492
|
-
virtual: false,
|
493
|
-
stripe: true,
|
494
|
-
emptyBtnText: _locale.default.ProEditTable.clickAdd,
|
495
|
-
onlyOneLineMsg: _locale.default.ProEditTable.onlyOneLineMsg,
|
496
|
-
deletePoConfirmMsg: _locale.default.ProEditTable.deletePoConfirmMsg,
|
497
|
-
mulDeletePoConfirmMsg: _locale.default.ProEditTable.mulDeletePoConfirmMsg
|
494
|
+
toolbarProps: []
|
498
495
|
};
|
499
496
|
// 导出组件
|
500
497
|
var _default = exports.default = ForwardProEditTable;
|
@@ -135,7 +135,7 @@ export type viewRenderFn<T = any> = (text?: any, record?: T, options?: OptionsPr
|
|
135
135
|
* @template Values 值类型
|
136
136
|
* @template T 记录类型
|
137
137
|
*/
|
138
|
-
export interface ProColumnsProps<Values = any, T = any> extends Omit<FormItemProps<Values>, 'rules' | 'required'>, ColumnType<Values> {
|
138
|
+
export interface ProColumnsProps<Values = any, T = any> extends Omit<FormItemProps<Values>, 'rules' | 'required' | 'tooltip'>, ColumnType<Values> {
|
139
139
|
/** 是否必填 */
|
140
140
|
required?: boolean | RequiredFn<T>;
|
141
141
|
/** 标签是否必填 */
|
@@ -259,12 +259,6 @@ export interface ProEditTableProps<T = any> extends Omit<TableProps<T>, 'onChang
|
|
259
259
|
* @default multiple
|
260
260
|
*/
|
261
261
|
mode?: ProEditTableMode;
|
262
|
-
/**
|
263
|
-
* 可编辑表格的类型,单行编辑或者多行编辑
|
264
|
-
* @deprecated 将于下个版本 4.0.0 被弃用
|
265
|
-
* @default multiple
|
266
|
-
*/
|
267
|
-
type?: ProEditTableMode;
|
268
262
|
/**
|
269
263
|
* 必填对齐方式, 默认右对齐
|
270
264
|
* @default right
|