@zat-design/sisyphus-react 3.13.13-beta.6 → 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 +595 -341
- package/dist/less.esm.css +565 -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.d.ts +13 -0
- package/es/ProForm/components/combination/FormList/components/Empty.js +89 -0
- 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 +13 -5
- package/es/ProForm/components/combination/FormList/propsType.d.ts +1 -0
- package/es/ProForm/components/combination/FormList/style/index.less +61 -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 +27 -19
- 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 -18
- 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.d.ts +1 -0
- package/es/locale/en_US.js +4 -3
- package/es/locale/index.d.ts +2 -0
- package/es/locale/index.js +11 -2
- package/es/locale/zh_CN.d.ts +1 -0
- package/es/locale/zh_CN.js +4 -3
- 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.d.ts +13 -0
- package/lib/ProForm/components/combination/FormList/components/Empty.js +96 -0
- 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 +13 -5
- package/lib/ProForm/components/combination/FormList/propsType.d.ts +1 -0
- package/lib/ProForm/components/combination/FormList/style/index.less +61 -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 +27 -19
- 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 -21
- 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.d.ts +1 -0
- package/lib/locale/en_US.js +4 -3
- package/lib/locale/index.d.ts +2 -0
- package/lib/locale/index.js +12 -2
- package/lib/locale/zh_CN.d.ts +1 -0
- package/lib/locale/zh_CN.js +4 -3
- 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
@@ -1,4 +1,3 @@
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
2
1
|
import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
4
3
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
@@ -11,6 +10,8 @@ import _isObject from "lodash/isObject";
|
|
11
10
|
import _isString from "lodash/isString";
|
12
11
|
import _cloneDeepWith from "lodash/cloneDeepWith";
|
13
12
|
import _cloneDeep from "lodash/cloneDeep";
|
13
|
+
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 }; })(); }
|
14
|
+
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); }
|
14
15
|
/* eslint-disable no-await-in-loop */
|
15
16
|
/* eslint-disable no-restricted-syntax */
|
16
17
|
import React from 'react';
|
@@ -214,12 +215,12 @@ export var handleScrollToError = function handleScrollToError() {
|
|
214
215
|
var childOffsetTop = 0;
|
215
216
|
while (previousSibling) {
|
216
217
|
if (previousSibling.nodeType === 1) {
|
217
|
-
var _previousSibling, _previousSibling$clas, _previousSibling$clas2
|
218
|
+
var _previousSibling, _previousSibling$clas, _previousSibling$clas2;
|
218
219
|
var _ref4 = previousSibling.getBoundingClientRect() || {},
|
219
220
|
_ref4$width = _ref4.width,
|
220
221
|
width = _ref4$width === void 0 ? 0 : _ref4$width;
|
221
222
|
childOffsetLeft += width;
|
222
|
-
if ((_previousSibling = previousSibling) === null || _previousSibling === void 0 ? void 0 : (_previousSibling$clas = _previousSibling.classList) === null || _previousSibling$clas === void 0 ? void 0 : (_previousSibling$clas2 =
|
223
|
+
if ((_previousSibling = previousSibling) === null || _previousSibling === void 0 ? void 0 : (_previousSibling$clas = _previousSibling.classList) === null || _previousSibling$clas === void 0 ? void 0 : (_previousSibling$clas2 = _previousSibling$clas.contains) === null || _previousSibling$clas2 === void 0 ? void 0 : _previousSibling$clas2.call(_previousSibling$clas, 'ant-table-cell-fix-left')) {
|
223
224
|
childFixedLeft += width;
|
224
225
|
}
|
225
226
|
}
|
@@ -272,11 +273,11 @@ var _isNull = function isNull(value) {
|
|
272
273
|
return value === '' || value === undefined || value === null || Array.isArray(value) && value.length === 0;
|
273
274
|
};
|
274
275
|
var handleCheckCellValue = /*#__PURE__*/function () {
|
275
|
-
var _ref6 = _asyncToGenerator(/*#__PURE__*/
|
276
|
+
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(column, record) {
|
276
277
|
var _column$names, _column$names2, _rules2;
|
277
|
-
var value, _required, _rules, _labelRequired, res, _iterator, _step, rule;
|
278
|
-
return
|
279
|
-
while (1) switch (_context.
|
278
|
+
var value, _required, _rules, _labelRequired, res, _iterator, _step, rule, _t, _t2;
|
279
|
+
return _regenerator().w(function (_context) {
|
280
|
+
while (1) switch (_context.p = _context.n) {
|
280
281
|
case 0:
|
281
282
|
value = null;
|
282
283
|
if (column.name) {
|
@@ -300,81 +301,78 @@ var handleCheckCellValue = /*#__PURE__*/function () {
|
|
300
301
|
_labelRequired = column.labelRequired(value, record);
|
301
302
|
}
|
302
303
|
if (!(((_column$names2 = column.names) === null || _column$names2 === void 0 ? void 0 : _column$names2.length) && _labelRequired !== null && _labelRequired !== undefined && _isNull(value))) {
|
303
|
-
_context.
|
304
|
+
_context.n = 1;
|
304
305
|
break;
|
305
306
|
}
|
306
|
-
return _context.
|
307
|
-
case
|
307
|
+
return _context.a(2, false);
|
308
|
+
case 1:
|
308
309
|
if (!(_required && _isNull(value))) {
|
309
|
-
_context.
|
310
|
+
_context.n = 2;
|
310
311
|
break;
|
311
312
|
}
|
312
|
-
return _context.
|
313
|
-
case
|
313
|
+
return _context.a(2, false);
|
314
|
+
case 2:
|
314
315
|
if (!((_rules2 = _rules) === null || _rules2 === void 0 ? void 0 : _rules2.length)) {
|
315
|
-
_context.
|
316
|
+
_context.n = 15;
|
316
317
|
break;
|
317
318
|
}
|
318
319
|
res = true;
|
319
320
|
_iterator = _createForOfIteratorHelper(_rules);
|
320
|
-
_context.
|
321
|
+
_context.p = 3;
|
321
322
|
_iterator.s();
|
322
|
-
case
|
323
|
+
case 4:
|
323
324
|
if ((_step = _iterator.n()).done) {
|
324
|
-
_context.
|
325
|
+
_context.n = 11;
|
325
326
|
break;
|
326
327
|
}
|
327
328
|
rule = _step.value;
|
328
329
|
if (res) {
|
329
|
-
_context.
|
330
|
+
_context.n = 5;
|
330
331
|
break;
|
331
332
|
}
|
332
|
-
return _context.
|
333
|
-
case
|
333
|
+
return _context.a(3, 11);
|
334
|
+
case 5:
|
334
335
|
if (rule.required && _isNull(value)) {
|
335
336
|
res = false;
|
336
337
|
}
|
337
338
|
if (!_isFunction(rule.validator)) {
|
338
|
-
_context.
|
339
|
+
_context.n = 9;
|
339
340
|
break;
|
340
341
|
}
|
341
|
-
_context.
|
342
|
-
_context.
|
342
|
+
_context.p = 6;
|
343
|
+
_context.n = 7;
|
343
344
|
return rule.validator('', value);
|
344
|
-
case
|
345
|
-
_context.
|
345
|
+
case 7:
|
346
|
+
_context.n = 9;
|
346
347
|
break;
|
347
|
-
case
|
348
|
-
_context.
|
349
|
-
|
348
|
+
case 8:
|
349
|
+
_context.p = 8;
|
350
|
+
_t = _context.v;
|
350
351
|
res = false;
|
351
|
-
case
|
352
|
+
case 9:
|
352
353
|
if (rule.type && !validate[rule.type](value)) {
|
353
354
|
res = false;
|
354
355
|
}
|
355
|
-
case
|
356
|
-
_context.
|
356
|
+
case 10:
|
357
|
+
_context.n = 4;
|
357
358
|
break;
|
358
|
-
case
|
359
|
-
_context.
|
359
|
+
case 11:
|
360
|
+
_context.n = 13;
|
360
361
|
break;
|
361
|
-
case
|
362
|
-
_context.
|
363
|
-
|
364
|
-
_iterator.e(
|
365
|
-
case
|
366
|
-
_context.
|
362
|
+
case 12:
|
363
|
+
_context.p = 12;
|
364
|
+
_t2 = _context.v;
|
365
|
+
_iterator.e(_t2);
|
366
|
+
case 13:
|
367
|
+
_context.p = 13;
|
367
368
|
_iterator.f();
|
368
|
-
return _context.
|
369
|
-
case
|
370
|
-
return _context.
|
371
|
-
case
|
372
|
-
return _context.
|
373
|
-
case 45:
|
374
|
-
case "end":
|
375
|
-
return _context.stop();
|
369
|
+
return _context.f(13);
|
370
|
+
case 14:
|
371
|
+
return _context.a(2, res);
|
372
|
+
case 15:
|
373
|
+
return _context.a(2, true);
|
376
374
|
}
|
377
|
-
}, _callee, null, [[
|
375
|
+
}, _callee, null, [[6, 8], [3, 12, 13, 14]]);
|
378
376
|
}));
|
379
377
|
return function handleCheckCellValue(_x, _x2) {
|
380
378
|
return _ref6.apply(this, arguments);
|
@@ -384,14 +382,14 @@ var handleCheckCellValue = /*#__PURE__*/function () {
|
|
384
382
|
* 分页校验
|
385
383
|
*/
|
386
384
|
export var onPageCheck = /*#__PURE__*/function () {
|
387
|
-
var _ref8 = _asyncToGenerator(/*#__PURE__*/
|
388
|
-
var form, name, value, columns, setState, page, pagination, isView, disabled, pageNum, pageSize, pageArr, flag, errorNum, errorPageNum, _i, _pageArr, item, start, end, nextValues, _iterator2, _step2, record, _iterator3, _step3, column, result, nextState;
|
389
|
-
return
|
390
|
-
while (1) switch (_context2.
|
385
|
+
var _ref8 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(_ref7) {
|
386
|
+
var form, name, value, columns, setState, page, pagination, isView, disabled, pageNum, pageSize, pageArr, flag, errorNum, errorPageNum, _i, _pageArr, item, start, end, nextValues, _iterator2, _step2, record, _iterator3, _step3, column, result, nextState, _t3, _t4, _t5, _t6;
|
387
|
+
return _regenerator().w(function (_context2) {
|
388
|
+
while (1) switch (_context2.p = _context2.n) {
|
391
389
|
case 0:
|
392
390
|
form = _ref7.form, name = _ref7.name, value = _ref7.value, columns = _ref7.columns, setState = _ref7.setState, page = _ref7.page, pagination = _ref7.pagination, isView = _ref7.isView, disabled = _ref7.disabled;
|
393
391
|
if (!(pagination && !isView && !disabled)) {
|
394
|
-
_context2.
|
392
|
+
_context2.n = 24;
|
395
393
|
break;
|
396
394
|
}
|
397
395
|
pageNum = page.pageNum, pageSize = page.pageSize;
|
@@ -404,18 +402,18 @@ export var onPageCheck = /*#__PURE__*/function () {
|
|
404
402
|
errorNum = 0;
|
405
403
|
errorPageNum = 0;
|
406
404
|
_i = 0, _pageArr = pageArr;
|
407
|
-
case
|
405
|
+
case 1:
|
408
406
|
if (!(_i < _pageArr.length)) {
|
409
|
-
_context2.
|
407
|
+
_context2.n = 20;
|
410
408
|
break;
|
411
409
|
}
|
412
410
|
item = _pageArr[_i];
|
413
411
|
if (!flag) {
|
414
|
-
_context2.
|
412
|
+
_context2.n = 2;
|
415
413
|
break;
|
416
414
|
}
|
417
|
-
return _context2.
|
418
|
-
case
|
415
|
+
return _context2.a(3, 20);
|
416
|
+
case 2:
|
419
417
|
errorNum = 0;
|
420
418
|
// 实现思路:截取每一页数据,手动触发每一行数据的校验,通过column配置的rule规则,
|
421
419
|
// 依次校验每一页数据,有错误就跳出循环,跳转到错误页数,并展示错误单元格数量
|
@@ -423,77 +421,77 @@ export var onPageCheck = /*#__PURE__*/function () {
|
|
423
421
|
end = tools.calc(start, '+', pageSize);
|
424
422
|
nextValues = value === null || value === void 0 ? void 0 : value.slice(start, end);
|
425
423
|
_iterator2 = _createForOfIteratorHelper(nextValues);
|
426
|
-
_context2.
|
424
|
+
_context2.p = 3;
|
427
425
|
_iterator2.s();
|
428
|
-
case
|
426
|
+
case 4:
|
429
427
|
if ((_step2 = _iterator2.n()).done) {
|
430
|
-
_context2.
|
428
|
+
_context2.n = 15;
|
431
429
|
break;
|
432
430
|
}
|
433
431
|
record = _step2.value;
|
434
432
|
_iterator3 = _createForOfIteratorHelper(columns);
|
435
|
-
_context2.
|
433
|
+
_context2.p = 5;
|
436
434
|
_iterator3.s();
|
437
|
-
case
|
435
|
+
case 6:
|
438
436
|
if ((_step3 = _iterator3.n()).done) {
|
439
|
-
_context2.
|
437
|
+
_context2.n = 11;
|
440
438
|
break;
|
441
439
|
}
|
442
440
|
column = _step3.value;
|
443
|
-
_context2.
|
444
|
-
_context2.
|
441
|
+
_context2.p = 7;
|
442
|
+
_context2.n = 8;
|
445
443
|
return handleCheckCellValue(column, record);
|
446
|
-
case
|
447
|
-
result = _context2.
|
444
|
+
case 8:
|
445
|
+
result = _context2.v;
|
448
446
|
if (!result) {
|
449
447
|
errorNum += 1;
|
450
448
|
}
|
451
|
-
_context2.
|
449
|
+
_context2.n = 10;
|
452
450
|
break;
|
453
|
-
case
|
454
|
-
_context2.
|
455
|
-
|
451
|
+
case 9:
|
452
|
+
_context2.p = 9;
|
453
|
+
_t3 = _context2.v;
|
456
454
|
errorNum += 1;
|
457
|
-
case
|
458
|
-
_context2.
|
455
|
+
case 10:
|
456
|
+
_context2.n = 6;
|
459
457
|
break;
|
460
|
-
case
|
461
|
-
_context2.
|
458
|
+
case 11:
|
459
|
+
_context2.n = 13;
|
462
460
|
break;
|
463
|
-
case
|
464
|
-
_context2.
|
465
|
-
|
466
|
-
_iterator3.e(
|
467
|
-
case
|
468
|
-
_context2.
|
461
|
+
case 12:
|
462
|
+
_context2.p = 12;
|
463
|
+
_t4 = _context2.v;
|
464
|
+
_iterator3.e(_t4);
|
465
|
+
case 13:
|
466
|
+
_context2.p = 13;
|
469
467
|
_iterator3.f();
|
470
|
-
return _context2.
|
471
|
-
case
|
472
|
-
_context2.
|
468
|
+
return _context2.f(13);
|
469
|
+
case 14:
|
470
|
+
_context2.n = 4;
|
473
471
|
break;
|
474
|
-
case
|
475
|
-
_context2.
|
472
|
+
case 15:
|
473
|
+
_context2.n = 17;
|
476
474
|
break;
|
477
|
-
case
|
478
|
-
_context2.
|
479
|
-
|
480
|
-
_iterator2.e(
|
481
|
-
case
|
482
|
-
_context2.
|
475
|
+
case 16:
|
476
|
+
_context2.p = 16;
|
477
|
+
_t5 = _context2.v;
|
478
|
+
_iterator2.e(_t5);
|
479
|
+
case 17:
|
480
|
+
_context2.p = 17;
|
483
481
|
_iterator2.f();
|
484
|
-
return _context2.
|
485
|
-
case
|
482
|
+
return _context2.f(17);
|
483
|
+
case 18:
|
486
484
|
if (errorNum > 0) {
|
487
485
|
flag = true;
|
488
486
|
errorPageNum = item;
|
489
487
|
}
|
490
|
-
case
|
488
|
+
case 19:
|
491
489
|
_i++;
|
492
|
-
_context2.
|
490
|
+
_context2.n = 1;
|
493
491
|
break;
|
494
|
-
case
|
492
|
+
case 20:
|
495
493
|
if (!(flag && errorNum > 0)) {
|
496
|
-
_context2.
|
494
|
+
_context2.n = 24;
|
497
495
|
break;
|
498
496
|
}
|
499
497
|
nextState = {
|
@@ -506,23 +504,22 @@ export var onPageCheck = /*#__PURE__*/function () {
|
|
506
504
|
};
|
507
505
|
}
|
508
506
|
setState(nextState);
|
509
|
-
_context2.
|
510
|
-
_context2.
|
507
|
+
_context2.p = 21;
|
508
|
+
_context2.n = 22;
|
511
509
|
return form.validateFields([name], {
|
512
510
|
recursive: true
|
513
511
|
});
|
514
|
-
case
|
515
|
-
_context2.
|
512
|
+
case 22:
|
513
|
+
_context2.n = 24;
|
516
514
|
break;
|
517
|
-
case
|
518
|
-
_context2.
|
519
|
-
|
515
|
+
case 23:
|
516
|
+
_context2.p = 23;
|
517
|
+
_t6 = _context2.v;
|
520
518
|
handleScrollToError();
|
521
|
-
case
|
522
|
-
|
523
|
-
return _context2.stop();
|
519
|
+
case 24:
|
520
|
+
return _context2.a(2);
|
524
521
|
}
|
525
|
-
}, _callee2, null, [[
|
522
|
+
}, _callee2, null, [[21, 23], [7, 9], [5, 12, 13, 14], [3, 16, 17, 18]]);
|
526
523
|
}));
|
527
524
|
return function onPageCheck(_x3) {
|
528
525
|
return _ref8.apply(this, arguments);
|
@@ -10,8 +10,9 @@ var useEditTableError = function useEditTableError(_ref) {
|
|
10
10
|
errorLength = _useState2[0],
|
11
11
|
setErrorLength = _useState2[1];
|
12
12
|
useEffect(function () {
|
13
|
+
var _containerNode$childr3;
|
13
14
|
// 如果 isEnabled 为 false 或容器节点不存在,直接跳过监听
|
14
|
-
if (!isEnabled || !containerNode) {
|
15
|
+
if (!isEnabled || !containerNode || !(containerNode === null || containerNode === void 0 ? void 0 : containerNode.querySelector)) {
|
15
16
|
return; // 如果未启用监听或容器节点不存在,直接返回
|
16
17
|
}
|
17
18
|
// 防抖处理:将 setErrorLength 函数进行防抖
|
@@ -25,8 +26,9 @@ var useEditTableError = function useEditTableError(_ref) {
|
|
25
26
|
var target = mutation.target;
|
26
27
|
// 检查目标节点是否包含指定的类
|
27
28
|
if (target.classList.contains(className)) {
|
29
|
+
var _containerNode$childr;
|
28
30
|
// 查找所有包含 className 的节点
|
29
|
-
var errorNodes = containerNode.querySelectorAll(".".concat(className));
|
31
|
+
var errorNodes = containerNode === null || containerNode === void 0 ? void 0 : (_containerNode$childr = containerNode.children[0]) === null || _containerNode$childr === void 0 ? void 0 : _containerNode$childr.querySelectorAll(".".concat(className));
|
30
32
|
// 过滤这些节点,只保留那些类名完全为 `ant-form-item-explain-error` 的节点
|
31
33
|
var validErrorNodes = Array.from(errorNodes).filter(function (node) {
|
32
34
|
return node.classList.length === 1 && node.classList.contains('ant-form-item-explain-error');
|
@@ -46,8 +48,9 @@ var useEditTableError = function useEditTableError(_ref) {
|
|
46
48
|
// 检查删除的节点是否包含指定的类名
|
47
49
|
mutation.removedNodes.forEach(function (removedNode) {
|
48
50
|
if (removedNode instanceof HTMLElement && removedNode.classList.contains('ant-table-row')) {
|
51
|
+
var _containerNode$childr2;
|
49
52
|
// 更新错误数量
|
50
|
-
var _errorNodes = containerNode.querySelectorAll(".".concat(className));
|
53
|
+
var _errorNodes = containerNode === null || containerNode === void 0 ? void 0 : (_containerNode$childr2 = containerNode.children[0]) === null || _containerNode$childr2 === void 0 ? void 0 : _containerNode$childr2.querySelectorAll(".".concat(className));
|
51
54
|
if (errorLength === 0) {
|
52
55
|
debouncedSetErrorLength(0);
|
53
56
|
}
|
@@ -68,7 +71,12 @@ var useEditTableError = function useEditTableError(_ref) {
|
|
68
71
|
childList: true
|
69
72
|
};
|
70
73
|
// 启动 MutationObserver
|
71
|
-
|
74
|
+
var targetNode = containerNode === null || containerNode === void 0 ? void 0 : (_containerNode$childr3 = containerNode.children[0]) === null || _containerNode$childr3 === void 0 ? void 0 : _containerNode$childr3.querySelector('tbody');
|
75
|
+
if (targetNode instanceof HTMLElement) {
|
76
|
+
observer.observe(targetNode, config);
|
77
|
+
} else {
|
78
|
+
console.error('warning: tbody element not found or invalid');
|
79
|
+
}
|
72
80
|
// 清理 MutationObserver 和防抖定时器
|
73
81
|
return function () {
|
74
82
|
observer.disconnect();
|
@@ -1,15 +1,16 @@
|
|
1
|
-
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
2
1
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
3
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
4
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
5
4
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
6
5
|
var _ref;
|
6
|
+
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 }; })(); }
|
7
|
+
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); }
|
7
8
|
import { useEffect } from 'react';
|
8
9
|
import { useDeepCompareEffect, useRequest as useRequestFunc } from 'ahooks';
|
9
|
-
import { diffCode, getEnumData, setEnumData, cacheFieldNames } from '../utils';
|
10
|
+
import { diffCode, getEnumData, setEnumData, cacheFieldNames, baseCacheKey } from '../utils';
|
10
11
|
import locale from '../../locale';
|
11
12
|
import '../utils/eventCenter';
|
12
|
-
var baseEnumStorage = (_ref = window.localStorage.getItem(
|
13
|
+
var baseEnumStorage = (_ref = window.localStorage.getItem(baseCacheKey) && JSON.parse(window.localStorage.getItem(baseCacheKey))) !== null && _ref !== void 0 ? _ref : null;
|
13
14
|
var useEnumRequest = function useEnumRequest(props, dispatch) {
|
14
15
|
var _ref2 = props || {},
|
15
16
|
_ref2$main = _ref2.main,
|
@@ -25,7 +26,7 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
|
|
25
26
|
children: 'children'
|
26
27
|
} : _ref2$fieldNames,
|
27
28
|
_ref2$cacheKey = _ref2.cacheKey,
|
28
|
-
cacheKey = _ref2$cacheKey === void 0 ?
|
29
|
+
cacheKey = _ref2$cacheKey === void 0 ? baseCacheKey : _ref2$cacheKey,
|
29
30
|
_ref2$requestRefresh = _ref2.requestRefresh,
|
30
31
|
requestRefresh = _ref2$requestRefresh === void 0 ? false : _ref2$requestRefresh,
|
31
32
|
_ref2$storage = _ref2.storage,
|
@@ -52,40 +53,40 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
|
|
52
53
|
staleTime: 6e4 * 60
|
53
54
|
}, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options), {}, {
|
54
55
|
setCache: function () {
|
55
|
-
var _setCache = _asyncToGenerator(/*#__PURE__*/
|
56
|
+
var _setCache = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(res) {
|
56
57
|
var response, _locale$ProEnum2, _useRequest$options, ignoreCodes, cacheData;
|
57
|
-
return
|
58
|
-
while (1) switch (_context.
|
58
|
+
return _regenerator().w(function (_context) {
|
59
|
+
while (1) switch (_context.n) {
|
59
60
|
case 0:
|
60
61
|
response = res.data;
|
61
62
|
if (!(transformResponse && typeof transformResponse === 'function')) {
|
62
|
-
_context.
|
63
|
+
_context.n = 3;
|
63
64
|
break;
|
64
65
|
}
|
65
|
-
_context.
|
66
|
+
_context.n = 1;
|
66
67
|
return transformResponse(res.data);
|
67
|
-
case
|
68
|
-
response = _context.
|
68
|
+
case 1:
|
69
|
+
response = _context.v;
|
69
70
|
if (!(_typeof(response) !== 'object' || response == null)) {
|
70
|
-
_context.
|
71
|
+
_context.n = 2;
|
71
72
|
break;
|
72
73
|
}
|
73
74
|
throw new Error(locale === null || locale === void 0 ? void 0 : (_locale$ProEnum2 = locale.ProEnum) === null || _locale$ProEnum2 === void 0 ? void 0 : _locale$ProEnum2.errorMessage);
|
74
|
-
case
|
75
|
+
case 2:
|
75
76
|
res.data = response;
|
76
|
-
case
|
77
|
+
case 3:
|
77
78
|
if (!(_typeof(response) !== 'object' || response === null)) {
|
78
|
-
_context.
|
79
|
+
_context.n = 4;
|
79
80
|
break;
|
80
81
|
}
|
81
82
|
throw Error('response enum data must be object');
|
82
|
-
case
|
83
|
+
case 4:
|
83
84
|
if (!(Object.keys(response).length === 0)) {
|
84
|
-
_context.
|
85
|
+
_context.n = 5;
|
85
86
|
break;
|
86
87
|
}
|
87
88
|
throw Error('Please return valid enumeration data');
|
88
|
-
case
|
89
|
+
case 5:
|
89
90
|
// 只返回fieldNames对象的key
|
90
91
|
if (clear) {
|
91
92
|
// 忽略清洗的 codes
|
@@ -94,7 +95,7 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
|
|
94
95
|
if (!response[key] || !Array.isArray(response[key])) {
|
95
96
|
return;
|
96
97
|
}
|
97
|
-
var options = _toConsumableArray(response[key])
|
98
|
+
var options = _toConsumableArray(response[key]);
|
98
99
|
if (ignoreCodes.includes(key)) {
|
99
100
|
response[key] = options;
|
100
101
|
} else {
|
@@ -122,10 +123,7 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
|
|
122
123
|
logDebug(locale === null || locale === void 0 ? void 0 : (_locale$ProEnum3 = locale.ProEnum) === null || _locale$ProEnum3 === void 0 ? void 0 : _locale$ProEnum3.mainInitByRequest);
|
123
124
|
}, 10000);
|
124
125
|
}
|
125
|
-
return _context.
|
126
|
-
case 21:
|
127
|
-
case "end":
|
128
|
-
return _context.stop();
|
126
|
+
return _context.a(2, res);
|
129
127
|
}
|
130
128
|
}, _callee);
|
131
129
|
}));
|
@@ -162,20 +160,20 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
|
|
162
160
|
}
|
163
161
|
}));
|
164
162
|
var mergeData = /*#__PURE__*/function () {
|
165
|
-
var _ref3 = _asyncToGenerator(/*#__PURE__*/
|
163
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
|
166
164
|
var cacheData, _useRequest$options2, _useRequest$options3, enumData, cacheCodes, codes, ignoreCodes, diff, response, res, _locale$ProEnum6;
|
167
|
-
return
|
168
|
-
while (1) switch (_context2.
|
165
|
+
return _regenerator().w(function (_context2) {
|
166
|
+
while (1) switch (_context2.n) {
|
169
167
|
case 0:
|
170
168
|
cacheData = getEnumData(storage, cacheKey, baseEnumStorage) || {
|
171
169
|
data: {}
|
172
170
|
};
|
173
171
|
if (!(_typeof(cacheData) === 'object')) {
|
174
|
-
_context2.
|
172
|
+
_context2.n = 7;
|
175
173
|
break;
|
176
174
|
}
|
177
175
|
if (!(_typeof(cacheData.data) === 'object' && cacheData.data !== null)) {
|
178
|
-
_context2.
|
176
|
+
_context2.n = 7;
|
179
177
|
break;
|
180
178
|
}
|
181
179
|
enumData = cacheData.data;
|
@@ -184,38 +182,38 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
|
|
184
182
|
ignoreCodes = (useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options3 = useRequest.options) === null || _useRequest$options3 === void 0 ? void 0 : _useRequest$options3.ignoreCodes) || []; // 忽略清洗的 codes
|
185
183
|
diff = diffCode(cacheCodes, codes);
|
186
184
|
if (!diff) {
|
187
|
-
_context2.
|
185
|
+
_context2.n = 6;
|
188
186
|
break;
|
189
187
|
}
|
190
|
-
_context2.
|
188
|
+
_context2.n = 1;
|
191
189
|
return useRequest === null || useRequest === void 0 ? void 0 : useRequest.service();
|
192
|
-
case
|
193
|
-
res = _context2.
|
190
|
+
case 1:
|
191
|
+
res = _context2.v;
|
194
192
|
if (!(transformResponse && typeof transformResponse === 'function')) {
|
195
|
-
_context2.
|
193
|
+
_context2.n = 4;
|
196
194
|
break;
|
197
195
|
}
|
198
|
-
_context2.
|
196
|
+
_context2.n = 2;
|
199
197
|
return transformResponse(res);
|
200
|
-
case
|
201
|
-
response = _context2.
|
198
|
+
case 2:
|
199
|
+
response = _context2.v;
|
202
200
|
if (!(_typeof(response) !== 'object' || response == null)) {
|
203
|
-
_context2.
|
201
|
+
_context2.n = 3;
|
204
202
|
break;
|
205
203
|
}
|
206
204
|
throw new Error(locale === null || locale === void 0 ? void 0 : (_locale$ProEnum6 = locale.ProEnum) === null || _locale$ProEnum6 === void 0 ? void 0 : _locale$ProEnum6.errorMessage);
|
207
|
-
case
|
208
|
-
_context2.
|
205
|
+
case 3:
|
206
|
+
_context2.n = 5;
|
209
207
|
break;
|
210
|
-
case
|
208
|
+
case 4:
|
211
209
|
if (res.status === 200) {
|
212
210
|
response = res.data;
|
213
211
|
}
|
214
|
-
case
|
212
|
+
case 5:
|
215
213
|
// 只返回fieldNames对象的key
|
216
214
|
if (clear) {
|
217
215
|
Object.keys(response).forEach(function (key) {
|
218
|
-
var options = _toConsumableArray(response[key])
|
216
|
+
var options = _toConsumableArray(response[key]);
|
219
217
|
if (ignoreCodes.includes(key)) {
|
220
218
|
response[key] = options;
|
221
219
|
} else {
|
@@ -232,9 +230,9 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
|
|
232
230
|
type: 'setProEnumDic',
|
233
231
|
payload: _objectSpread(_objectSpread(_objectSpread({}, dics), dataSource), cacheData.data)
|
234
232
|
});
|
235
|
-
_context2.
|
233
|
+
_context2.n = 7;
|
236
234
|
break;
|
237
|
-
case
|
235
|
+
case 6:
|
238
236
|
if (dataSource && Object.keys(dataSource)) {
|
239
237
|
// 子系统也可能会有 dataSource
|
240
238
|
dispatch({
|
@@ -242,9 +240,8 @@ var useEnumRequest = function useEnumRequest(props, dispatch) {
|
|
242
240
|
payload: _objectSpread(_objectSpread({}, dics), dataSource)
|
243
241
|
});
|
244
242
|
}
|
245
|
-
case
|
246
|
-
|
247
|
-
return _context2.stop();
|
243
|
+
case 7:
|
244
|
+
return _context2.a(2);
|
248
245
|
}
|
249
246
|
}, _callee2);
|
250
247
|
}));
|