@zat-design/sisyphus-react 3.14.0-beta.2 → 4.0.0-beta.10
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/README.md +77 -207
- package/babel.config.js +2 -2
- package/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/FormsProvider/index.d.ts +4 -1
- package/es/ProAction/components/CheckModalContent/index.js +0 -9
- package/es/ProAction/index.js +3 -6
- package/es/ProAction/index.less +0 -2
- package/es/ProConfigProvider/index.d.ts +22 -5
- package/es/ProConfigProvider/index.js +58 -26
- package/es/ProDownload/index.js +2 -3
- package/es/ProDownload/style/index.less +0 -2
- package/es/ProDownload/utils.js +3 -4
- package/es/ProDrawerForm/components/ProDrawer/index.js +13 -17
- package/es/ProDrawerForm/components/ProModal/index.js +12 -20
- package/es/ProDrawerForm/index.d.ts +2 -1
- package/es/ProDrawerForm/index.js +35 -33
- package/es/ProDrawerForm/propsType.d.ts +7 -18
- package/es/ProDrawerForm/style/index.less +6 -14
- package/es/ProEditLabel/components/RenderProForm.js +2 -3
- package/es/ProEditLabel/index.js +10 -15
- package/es/ProEditLabel/propsType.d.ts +1 -6
- package/es/ProEditLabel/style/index.less +2 -3
- package/es/ProEditTable/components/ActionButton/index.js +5 -8
- package/es/ProEditTable/components/RcTable/BaseTable.js +70 -53
- package/es/ProEditTable/components/RcTable/DraggableTable.js +70 -49
- 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 +401 -241
- package/es/ProEditTable/components/RenderToolbar/index.js +5 -5
- package/es/ProEditTable/components/Summary/index.js +5 -8
- package/es/ProEditTable/components/Validator/index.js +3 -6
- package/es/ProEditTable/index.js +99 -103
- package/es/ProEditTable/propsType.d.ts +7 -7
- package/es/ProEditTable/style/index.less +12 -12
- package/es/ProEditTable/utils/config.js +6 -7
- package/es/ProEditTable/utils/index.js +21 -17
- package/es/ProEditTable/utils/useEditTableError.js +12 -4
- package/es/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/es/ProEditTable/utils/useShouldUpdateForTable.js +132 -0
- package/es/ProEnum/hooks/useEnum.js +5 -0
- package/es/ProEnum/hooks/useEnumRequest.js +3 -3
- package/es/ProEnum/index.js +10 -17
- package/es/ProEnum/style/index.less +0 -2
- package/es/ProEnum/utils/index.d.ts +1 -0
- package/es/ProEnum/utils/index.js +3 -7
- package/es/ProForm/components/Container.d.ts +1 -0
- package/es/ProForm/components/Container.js +2 -3
- package/es/ProForm/components/FormFooter/index.js +18 -19
- 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 +3 -0
- package/es/ProForm/components/base/DatePicker/useDateLimit.js +11 -0
- package/es/ProForm/components/base/Input/index.js +10 -8
- 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 +7 -6
- 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 +0 -2
- package/es/ProForm/components/base/TextArea/index.js +3 -4
- package/es/ProForm/components/base/TextArea/index.less +10 -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 +3 -3
- package/es/ProForm/components/combination/Container/style/index.less +0 -2
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +15 -13
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +5 -8
- package/es/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/es/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +5 -8
- package/es/ProForm/components/combination/FormList/index.js +2 -3
- package/es/ProForm/components/combination/FormList/style/index.less +36 -2
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/es/ProForm/components/combination/Group/component/ComRender.js +0 -1
- package/es/ProForm/components/combination/Group/index.js +3 -4
- 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 +13 -15
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/style/index.less +0 -2
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +24 -39
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +11 -15
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/es/ProForm/components/combination/ProNumberRange/index.js +21 -21
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +3 -54
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/es/ProForm/components/combination/ProRangeLimit/index.js +42 -25
- 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 +64 -6
- package/es/ProForm/components/index.d.ts +2 -9
- package/es/ProForm/components/index.js +1 -11
- package/es/ProForm/components/render/ChangedWrapper.js +8 -9
- package/es/ProForm/components/render/ConfirmWrapper.js +7 -7
- package/es/ProForm/components/render/Render.js +29 -30
- package/es/ProForm/components/render/RenderFields.d.ts +1 -0
- package/es/ProForm/components/render/RenderFields.js +6 -3
- package/es/ProForm/components/render/propsType.d.ts +3 -6
- package/es/ProForm/index.d.ts +2 -2
- package/es/ProForm/index.js +14 -42
- package/es/ProForm/propsType.d.ts +3 -0
- package/es/ProForm/style/index.less +4 -16
- package/es/ProForm/utils/index.d.ts +15 -1
- package/es/ProForm/utils/index.js +66 -15
- package/es/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/es/ProForm/utils/useForm.js +27 -22
- package/es/ProForm/utils/useShouldUpdate.d.ts +1 -0
- package/es/ProForm/utils/useShouldUpdate.js +103 -17
- package/es/ProIcon/index.js +10 -13
- package/es/ProIcon/style/index.less +0 -2
- package/es/ProLayout/components/Layout/Header/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +40 -39
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +0 -3
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +7 -5
- package/es/ProLayout/components/Layout/Menu/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/style/index.less +0 -2
- package/es/ProLayout/components/Layout/Notice/style/index.less +0 -2
- package/es/ProLayout/components/ProCollapse/index.js +29 -44
- package/es/ProLayout/components/ProCollapse/style/index.less +5 -4
- package/es/ProLayout/components/ProFooter/index.js +2 -3
- package/es/ProLayout/components/ProFooter/style/index.less +0 -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 +7 -9
- package/es/ProLayout/components/ProHeader/index.js +43 -45
- package/es/ProLayout/components/ProHeader/style/index.less +0 -2
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.js +2 -3
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.js +0 -2
- package/es/ProLayout/index.js +80 -41
- package/es/ProLayout/style/index.less +2 -3
- package/es/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/es/ProSelect/index.js +7 -15
- package/es/ProSelect/index.less +0 -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 +1 -0
- package/es/ProStep/components/Step/index.js +1 -0
- package/es/ProStep/style/index.less +2 -4
- package/es/ProTable/components/FormatColumn/index.js +33 -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 +17 -13
- 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 +4 -7
- package/es/ProTable/index.d.ts +0 -7
- package/es/ProTable/index.js +11 -14
- package/es/ProTable/propsType.d.ts +2 -3
- package/es/ProTable/style/index.less +4 -6
- package/es/ProTabs/components/Card/index.js +5 -10
- package/es/ProTabs/index.js +2 -3
- package/es/ProTabs/style/index.less +0 -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 +136 -0
- package/es/ProThemeTools/index.d.ts +4 -8
- package/es/ProThemeTools/index.js +80 -49
- package/es/ProThemeTools/style/index.less +1 -3
- package/es/ProThemeTools/utils/index.d.ts +16 -6
- package/es/ProThemeTools/utils/index.js +30 -24
- package/es/ProTooltip/index.js +14 -9
- package/es/ProTooltip/style/index.less +0 -2
- package/es/ProTree/components/AdaptiveTooltip.js +2 -3
- package/es/ProTree/components/List.js +3 -4
- package/es/ProTree/components/ProTree.js +5 -12
- package/es/ProTree/components/ProTreeSelect/index.js +28 -26
- package/es/ProTree/components/ProTreeSelect/style/index.less +0 -2
- package/es/ProTree/components/Tree.js +6 -13
- package/es/ProTree/index.js +0 -7
- package/es/ProTree/propsType.d.ts +1 -1
- package/es/ProTree/style/index.less +8 -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 +10 -20
- package/es/ProTreeModal/style/index.less +12 -3
- package/es/ProUpload/components/ButtonRender.js +4 -7
- 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 +8 -17
- package/es/ProUpload/index.js +3 -4
- package/es/ProUpload/style/index.less +171 -12
- package/es/ProViewer/index.js +28 -35
- package/es/ProViewer/propsType.js +3 -0
- package/es/ProViewer/style/index.less +0 -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 +3 -3
- package/es/index.js +5 -5
- package/es/locale/en_US.js +1 -1
- package/es/locale/index.d.ts +2 -0
- package/es/locale/index.js +13 -2
- package/es/locale/zh_CN.js +1 -1
- package/es/style/components.less +0 -3
- package/es/style/index.less +1 -1
- package/es/style/theme/antd.less +36 -48
- package/es/style/theme/base.less +90 -0
- package/es/style/theme/index.less +2 -89
- package/es/utils/index.d.ts +7 -0
- package/es/utils/index.js +37 -1
- package/lib/FormsProvider/index.d.ts +4 -1
- package/lib/ProAction/components/CheckModalContent/index.js +0 -9
- package/lib/ProAction/index.js +3 -6
- package/lib/ProAction/index.less +0 -2
- package/lib/ProConfigProvider/index.d.ts +22 -5
- package/lib/ProConfigProvider/index.js +58 -26
- package/lib/ProDownload/index.js +2 -3
- package/lib/ProDownload/style/index.less +0 -2
- package/lib/ProDownload/utils.js +3 -4
- package/lib/ProDrawerForm/components/ProDrawer/index.js +13 -17
- package/lib/ProDrawerForm/components/ProModal/index.js +12 -20
- package/lib/ProDrawerForm/index.d.ts +2 -1
- package/lib/ProDrawerForm/index.js +35 -33
- package/lib/ProDrawerForm/propsType.d.ts +7 -18
- package/lib/ProDrawerForm/style/index.less +6 -14
- package/lib/ProEditLabel/components/RenderProForm.js +2 -3
- package/lib/ProEditLabel/index.js +10 -15
- package/lib/ProEditLabel/propsType.d.ts +1 -6
- package/lib/ProEditLabel/style/index.less +2 -3
- package/lib/ProEditTable/components/ActionButton/index.js +5 -8
- package/lib/ProEditTable/components/RcTable/BaseTable.js +69 -52
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +69 -48
- 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 +401 -241
- package/lib/ProEditTable/components/RenderToolbar/index.js +5 -5
- package/lib/ProEditTable/components/Summary/index.js +5 -9
- package/lib/ProEditTable/components/Validator/index.js +3 -7
- package/lib/ProEditTable/index.js +96 -100
- package/lib/ProEditTable/propsType.d.ts +7 -7
- package/lib/ProEditTable/style/index.less +12 -12
- package/lib/ProEditTable/utils/config.js +6 -7
- package/lib/ProEditTable/utils/index.js +20 -16
- package/lib/ProEditTable/utils/useEditTableError.js +12 -4
- package/lib/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/lib/ProEditTable/utils/useShouldUpdateForTable.js +139 -0
- package/lib/ProEnum/hooks/useEnum.js +5 -0
- package/lib/ProEnum/hooks/useEnumRequest.js +2 -2
- package/lib/ProEnum/index.js +10 -17
- package/lib/ProEnum/style/index.less +0 -2
- package/lib/ProEnum/utils/index.d.ts +1 -0
- package/lib/ProEnum/utils/index.js +4 -7
- package/lib/ProForm/components/Container.d.ts +1 -0
- package/lib/ProForm/components/Container.js +2 -3
- package/lib/ProForm/components/FormFooter/index.js +18 -19
- 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 +3 -0
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +19 -0
- package/lib/ProForm/components/base/Input/index.js +10 -8
- 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 +0 -2
- package/lib/ProForm/components/base/TextArea/index.js +3 -4
- package/lib/ProForm/components/base/TextArea/index.less +10 -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 +3 -3
- package/lib/ProForm/components/combination/Container/style/index.less +0 -2
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +15 -13
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +6 -9
- package/lib/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +4 -7
- package/lib/ProForm/components/combination/FormList/index.js +2 -3
- package/lib/ProForm/components/combination/FormList/style/index.less +36 -2
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.js +0 -1
- package/lib/ProForm/components/combination/Group/index.js +3 -4
- 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 +12 -14
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/style/index.less +0 -2
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +24 -39
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +11 -15
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/index.js +20 -20
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +3 -54
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +42 -25
- 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 +64 -6
- package/lib/ProForm/components/index.d.ts +2 -9
- package/lib/ProForm/components/index.js +1 -63
- package/lib/ProForm/components/render/ChangedWrapper.js +8 -9
- package/lib/ProForm/components/render/ConfirmWrapper.js +7 -7
- package/lib/ProForm/components/render/Render.js +29 -30
- package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
- package/lib/ProForm/components/render/RenderFields.js +6 -3
- package/lib/ProForm/components/render/propsType.d.ts +3 -6
- package/lib/ProForm/index.d.ts +2 -2
- package/lib/ProForm/index.js +13 -42
- package/lib/ProForm/propsType.d.ts +3 -0
- package/lib/ProForm/style/index.less +4 -16
- package/lib/ProForm/utils/index.d.ts +15 -1
- package/lib/ProForm/utils/index.js +69 -17
- package/lib/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/lib/ProForm/utils/useForm.js +26 -21
- package/lib/ProForm/utils/useShouldUpdate.d.ts +1 -0
- package/lib/ProForm/utils/useShouldUpdate.js +101 -15
- package/lib/ProIcon/index.js +10 -13
- package/lib/ProIcon/style/index.less +0 -2
- package/lib/ProLayout/components/Layout/Header/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +40 -39
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +0 -3
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +7 -5
- package/lib/ProLayout/components/Layout/Menu/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/style/index.less +0 -2
- package/lib/ProLayout/components/Layout/Notice/style/index.less +0 -2
- package/lib/ProLayout/components/ProCollapse/index.js +29 -44
- package/lib/ProLayout/components/ProCollapse/style/index.less +5 -4
- package/lib/ProLayout/components/ProFooter/index.js +2 -3
- package/lib/ProLayout/components/ProFooter/style/index.less +0 -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 +7 -9
- package/lib/ProLayout/components/ProHeader/index.js +44 -47
- package/lib/ProLayout/components/ProHeader/style/index.less +0 -2
- package/lib/ProLayout/components/TabsManager/components/TabContextMenu.js +2 -3
- package/lib/ProLayout/components/TabsManager/hooks/useTabsState.js +0 -2
- package/lib/ProLayout/index.js +79 -40
- package/lib/ProLayout/style/index.less +2 -3
- package/lib/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/lib/ProSelect/index.js +7 -15
- package/lib/ProSelect/index.less +0 -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 +1 -1
- package/lib/ProStep/components/Step/index.js +1 -0
- package/lib/ProStep/style/index.less +2 -4
- package/lib/ProTable/components/FormatColumn/index.js +33 -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 +16 -13
- 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 -6
- 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 +4 -7
- package/lib/ProTable/index.d.ts +0 -7
- package/lib/ProTable/index.js +10 -13
- package/lib/ProTable/propsType.d.ts +2 -3
- package/lib/ProTable/style/index.less +4 -6
- package/lib/ProTabs/components/Card/index.js +5 -11
- package/lib/ProTabs/index.js +2 -3
- package/lib/ProTabs/style/index.less +0 -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 +145 -0
- package/lib/ProThemeTools/index.d.ts +4 -8
- package/lib/ProThemeTools/index.js +88 -48
- package/lib/ProThemeTools/style/index.less +1 -3
- package/lib/ProThemeTools/utils/index.d.ts +16 -6
- package/lib/ProThemeTools/utils/index.js +34 -27
- package/lib/ProTooltip/index.js +14 -9
- package/lib/ProTooltip/style/index.less +0 -2
- package/lib/ProTree/components/AdaptiveTooltip.js +2 -4
- package/lib/ProTree/components/List.js +3 -4
- package/lib/ProTree/components/ProTree.js +5 -12
- package/lib/ProTree/components/ProTreeSelect/index.js +28 -26
- package/lib/ProTree/components/ProTreeSelect/style/index.less +0 -2
- package/lib/ProTree/components/Tree.js +6 -13
- package/lib/ProTree/index.js +0 -8
- package/lib/ProTree/propsType.d.ts +1 -1
- package/lib/ProTree/style/index.less +8 -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 +10 -20
- package/lib/ProTreeModal/style/index.less +12 -3
- package/lib/ProUpload/components/ButtonRender.js +4 -7
- 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 +8 -17
- package/lib/ProUpload/index.js +3 -4
- package/lib/ProUpload/style/index.less +171 -12
- package/lib/ProViewer/index.js +30 -36
- package/lib/ProViewer/propsType.js +3 -1
- package/lib/ProViewer/style/index.less +0 -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 +3 -3
- package/lib/index.js +34 -21
- package/lib/locale/en_US.js +1 -1
- package/lib/locale/index.d.ts +2 -0
- package/lib/locale/index.js +14 -3
- package/lib/locale/zh_CN.js +1 -1
- package/lib/style/components.less +0 -3
- package/lib/style/index.less +1 -1
- package/lib/style/theme/antd.less +36 -48
- package/lib/style/theme/base.less +90 -0
- package/lib/style/theme/index.less +2 -89
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +41 -2
- package/package.json +37 -25
- package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/es/ProEditTable/components/RcTable/VirtualTable.js +0 -9
- package/es/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/es/ProForm/components/combination/ProCombination/index.js +0 -208
- 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 -110
- package/es/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/es/ProForm/components/old/EnumSelect/index.js +0 -265
- 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 -101
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/es/ProForm/components/old/InputWithSuffix/index.js +0 -47
- 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 -276
- 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 -186
- 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 -98
- package/es/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/es/ProForm/components/old/ProRangeBox/propsType.js +0 -1
- package/es/ProUpload/style/fileItem.less +0 -159
- package/es/old/ProCertValidity/index.d.ts +0 -9
- package/es/old/ProCertValidity/index.js +0 -186
- 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 -321
- 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 -217
- 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 -117
- package/lib/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/lib/ProForm/components/old/EnumSelect/index.js +0 -271
- 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 -284
- 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 -72
- 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 -192
- 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/ProUpload/style/fileItem.less +0 -159
- package/lib/old/ProCertValidity/index.d.ts +0 -9
- package/lib/old/ProCertValidity/index.js +0 -192
- 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 -598
- 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 -329
- /package/es/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
- /package/lib/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
|
@@ -11,5 +11,8 @@ export declare const FormsContext: React.Context<Forms>;
|
|
|
11
11
|
export declare const useForms: () => Forms;
|
|
12
12
|
/** 获取所有表单实例 */
|
|
13
13
|
export declare const useContextForms: () => Forms;
|
|
14
|
-
|
|
14
|
+
interface FormsProviderProps {
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
declare const FormsProvider: React.FC<FormsProviderProps>;
|
|
15
18
|
export default FormsProvider;
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: za-xuwenli xuwenli@zhongan.io
|
|
3
|
-
* @Date: 2025-02-17 11:49:02
|
|
4
|
-
* @LastEditors: za-xuwenli xuwenli@zhongan.io
|
|
5
|
-
* @LastEditTime: 2025-05-29 13:55:34
|
|
6
|
-
* @FilePath: /zat-wjs-pro-product-web/src/components/CheckModalContent/index.tsx
|
|
7
|
-
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
1
|
import "./index.less";
|
|
11
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
3
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
package/es/ProAction/index.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import "antd/es/popconfirm/style";
|
|
3
|
-
import _Popconfirm from "antd/es/popconfirm";
|
|
4
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
5
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
6
|
-
import "antd/es/form/style";
|
|
7
|
-
import _Form from "antd/es/form";
|
|
8
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
9
5
|
import React from 'react';
|
|
10
6
|
import { useSetState } from 'ahooks';
|
|
7
|
+
import { Form, Popconfirm } from 'antd';
|
|
11
8
|
import { isFunction } from 'lodash';
|
|
12
9
|
import CheckModalContent from "./components/CheckModalContent";
|
|
13
10
|
import { ProDrawerForm } from "../index";
|
|
@@ -20,7 +17,7 @@ var ProAction = props => {
|
|
|
20
17
|
var _config$, _config$2, _locale$ProAction2, _config$index;
|
|
21
18
|
var children = props.children,
|
|
22
19
|
config = props.config;
|
|
23
|
-
var _Form$useForm =
|
|
20
|
+
var _Form$useForm = Form.useForm(),
|
|
24
21
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
25
22
|
form = _Form$useForm2[0];
|
|
26
23
|
var _useSetState = useSetState({
|
|
@@ -191,7 +188,7 @@ var ProAction = props => {
|
|
|
191
188
|
return TargetComponent;
|
|
192
189
|
};
|
|
193
190
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
194
|
-
children: [((_config$ = config[0]) === null || _config$ === void 0 ? void 0 : _config$.mode) === 'confirm' ? /*#__PURE__*/_jsx(
|
|
191
|
+
children: [((_config$ = config[0]) === null || _config$ === void 0 ? void 0 : _config$.mode) === 'confirm' ? /*#__PURE__*/_jsx(Popconfirm, {
|
|
195
192
|
onConfirm: () => onActionRun(0, []),
|
|
196
193
|
title: ((_config$2 = config[0]) === null || _config$2 === void 0 ? void 0 : _config$2.title) || (locale === null || locale === void 0 || (_locale$ProAction2 = locale.ProAction) === null || _locale$ProAction2 === void 0 ? void 0 : _locale$ProAction2.defaultTitle),
|
|
197
194
|
children: children
|
package/es/ProAction/index.less
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { FormInstance } from 'antd';
|
|
3
|
-
import '
|
|
3
|
+
import 'dayjs/locale/zh-cn';
|
|
4
4
|
import type { PropSelectType } from '../ProSelect/propsType';
|
|
5
5
|
import type { ProModalSelectType } from '../ProForm/components/combination/ProModalSelect/propsType';
|
|
6
6
|
import type { ProCascaderType } from '../ProForm/components/combination/ProCascader/propsType';
|
|
@@ -21,14 +21,31 @@ interface ConfigContext {
|
|
|
21
21
|
export declare const ProConfigContext: React.Context<ConfigContext>;
|
|
22
22
|
export declare function useProConfig(): ConfigContext;
|
|
23
23
|
export declare function useProConfig(name: keyof ConfigContext['state']): ConfigContext['state'][keyof ConfigContext['state']];
|
|
24
|
-
type
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
type Actions = {
|
|
25
|
+
type: 'setFormRef';
|
|
26
|
+
name: string;
|
|
27
|
+
value: FormInstance;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'deleteFormRef';
|
|
30
|
+
name: string;
|
|
31
|
+
} | {
|
|
32
|
+
type: 'set';
|
|
33
|
+
payload: ProConfigState;
|
|
34
|
+
} | {
|
|
35
|
+
type: 'setProEnum';
|
|
36
|
+
payload: Record<string, any>;
|
|
37
|
+
} | {
|
|
38
|
+
type: 'setProEnumDic';
|
|
39
|
+
key: string;
|
|
27
40
|
payload: any;
|
|
28
|
-
}
|
|
41
|
+
} | {
|
|
42
|
+
type: 'setWithLocal';
|
|
43
|
+
payload: ProConfigState;
|
|
44
|
+
};
|
|
29
45
|
export declare const ProConfigProvider: FC<{
|
|
30
46
|
value?: ProConfigState;
|
|
31
47
|
locale?: string;
|
|
32
48
|
onSuccess?: (data: any, params: any) => void;
|
|
49
|
+
children?: React.ReactNode;
|
|
33
50
|
}>;
|
|
34
51
|
export default ProConfigProvider;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "antd/es/config-provider/style";
|
|
2
|
-
import _ConfigProvider from "antd/es/config-provider";
|
|
3
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
3
|
import React, { useContext, useEffect, useReducer } from 'react';
|
|
4
|
+
import { ConfigProvider } from 'antd';
|
|
6
5
|
import zhCN from 'antd/es/locale/zh_CN';
|
|
7
6
|
import enUS from 'antd/es/locale/en_US';
|
|
8
|
-
import '
|
|
7
|
+
import 'dayjs/locale/zh-cn';
|
|
9
8
|
import merge from 'lodash/merge';
|
|
10
9
|
import useEnumRequest from "../ProEnum/hooks/useEnumRequest";
|
|
11
10
|
import useFrequentEnumRequest from "../ProEnum/hooks/useFrequentEnumRequest";
|
|
12
11
|
import { setLanguage } from "../locale";
|
|
12
|
+
import { ThemeProvider, useTheme } from "../ProThemeTools/context/ThemeContext";
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
var initialState = {
|
|
15
15
|
ProEnum: {
|
|
@@ -37,25 +37,34 @@ export var ProConfigContext = /*#__PURE__*/React.createContext({
|
|
|
37
37
|
|
|
38
38
|
// eslint-disable-next-line no-redeclare
|
|
39
39
|
export function useProConfig(name) {
|
|
40
|
-
var
|
|
41
|
-
|
|
40
|
+
var _useContext = useContext(ProConfigContext),
|
|
41
|
+
state = _useContext.state,
|
|
42
|
+
dispatch = _useContext.dispatch;
|
|
43
|
+
if (name) {
|
|
44
|
+
return state[name];
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
state,
|
|
48
|
+
dispatch
|
|
49
|
+
};
|
|
42
50
|
}
|
|
43
|
-
var antdLangMap = {
|
|
44
|
-
'zh-CN': zhCN,
|
|
45
|
-
// zh-CN 中文
|
|
46
|
-
'en-US': enUS // en-US
|
|
47
|
-
};
|
|
48
51
|
var reducer = (state, action) => {
|
|
49
52
|
var _state$ProEnum;
|
|
50
53
|
switch (action.type) {
|
|
54
|
+
case 'setFormRef':
|
|
55
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
56
|
+
forms: _objectSpread(_objectSpread({}, state.forms), {}, {
|
|
57
|
+
[action.name]: action.value
|
|
58
|
+
})
|
|
59
|
+
});
|
|
60
|
+
case 'deleteFormRef':
|
|
61
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
62
|
+
forms: _objectSpread(_objectSpread({}, state.forms), {}, {
|
|
63
|
+
[action.name]: undefined
|
|
64
|
+
})
|
|
65
|
+
});
|
|
51
66
|
case 'set':
|
|
52
67
|
return _objectSpread(_objectSpread({}, state), action.payload);
|
|
53
|
-
// 设置的值会被存入localStorage
|
|
54
|
-
case 'setWithLocal':
|
|
55
|
-
{
|
|
56
|
-
var _state = merge({}, state, action.payload);
|
|
57
|
-
return _state;
|
|
58
|
-
}
|
|
59
68
|
case 'setProEnum':
|
|
60
69
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
61
70
|
ProEnum: _objectSpread(_objectSpread({}, state.ProEnum), action.payload)
|
|
@@ -66,10 +75,29 @@ var reducer = (state, action) => {
|
|
|
66
75
|
dics: _objectSpread(_objectSpread({}, ((_state$ProEnum = state.ProEnum) === null || _state$ProEnum === void 0 ? void 0 : _state$ProEnum.dataSource) || {}), action.payload)
|
|
67
76
|
})
|
|
68
77
|
});
|
|
78
|
+
case 'setWithLocal':
|
|
79
|
+
// 本地配置合并
|
|
80
|
+
localStorage.setItem('localConfig', JSON.stringify(action.payload));
|
|
81
|
+
return _objectSpread({}, state);
|
|
69
82
|
default:
|
|
70
83
|
return _objectSpread({}, state);
|
|
71
84
|
}
|
|
72
85
|
};
|
|
86
|
+
|
|
87
|
+
// 内部组件,用于监听主题变化并应用到 ConfigProvider
|
|
88
|
+
var ThemeAwareConfigProvider = _ref => {
|
|
89
|
+
var locale = _ref.locale,
|
|
90
|
+
children = _ref.children;
|
|
91
|
+
var _useTheme = useTheme(),
|
|
92
|
+
themeState = _useTheme.state;
|
|
93
|
+
return /*#__PURE__*/_jsx(ConfigProvider, {
|
|
94
|
+
locale: locale,
|
|
95
|
+
theme: themeState.antdConfig,
|
|
96
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
97
|
+
children: children
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
};
|
|
73
101
|
export var ProConfigProvider = props => {
|
|
74
102
|
var _props$value, _props$value2, _props$value3, _props$value4;
|
|
75
103
|
var _useReducer = useReducer(reducer, initialState),
|
|
@@ -93,28 +121,32 @@ export var ProConfigProvider = props => {
|
|
|
93
121
|
// 如果是用户切换了语言那么优先使用用户切换的,否则从缓存中取用户语言,在取默认值
|
|
94
122
|
var lang = (state === null || state === void 0 ? void 0 : state.locale) || cacheLang || (props === null || props === void 0 ? void 0 : props.locale);
|
|
95
123
|
useEffect(() => {
|
|
96
|
-
|
|
124
|
+
setLanguage(lang);
|
|
97
125
|
}, [lang]);
|
|
98
126
|
useEffect(() => {
|
|
99
127
|
if (enumRes !== null && enumRes !== void 0 && enumRes.data) {
|
|
100
128
|
(props === null || props === void 0 ? void 0 : props.onSuccess) && (props === null || props === void 0 ? void 0 : props.onSuccess(enumRes === null || enumRes === void 0 ? void 0 : enumRes.data, enumRes === null || enumRes === void 0 ? void 0 : enumRes.params));
|
|
101
129
|
}
|
|
102
130
|
}, [enumRes === null || enumRes === void 0 ? void 0 : enumRes.loading]);
|
|
103
|
-
|
|
131
|
+
var antdLangMap = {
|
|
132
|
+
'zh-CN': zhCN,
|
|
133
|
+
// zh-CN 中文
|
|
134
|
+
'en-US': enUS // en-US
|
|
135
|
+
};
|
|
104
136
|
// 处理频繁枚举的成功回调
|
|
105
137
|
useEffect(() => {
|
|
106
138
|
if (frequentEnumRes !== null && frequentEnumRes !== void 0 && frequentEnumRes.data) {
|
|
107
139
|
(props === null || props === void 0 ? void 0 : props.onSuccess) && (props === null || props === void 0 ? void 0 : props.onSuccess(frequentEnumRes === null || frequentEnumRes === void 0 ? void 0 : frequentEnumRes.data, frequentEnumRes === null || frequentEnumRes === void 0 ? void 0 : frequentEnumRes.params));
|
|
108
140
|
}
|
|
109
141
|
}, [frequentEnumRes === null || frequentEnumRes === void 0 ? void 0 : frequentEnumRes.loading]);
|
|
110
|
-
return /*#__PURE__*/_jsx(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
142
|
+
return /*#__PURE__*/_jsx(ThemeProvider, {
|
|
143
|
+
children: /*#__PURE__*/_jsx(ProConfigContext.Provider, {
|
|
144
|
+
value: {
|
|
145
|
+
state: merge(state, props.value),
|
|
146
|
+
dispatch
|
|
147
|
+
},
|
|
148
|
+
children: /*#__PURE__*/_jsx(ThemeAwareConfigProvider, {
|
|
149
|
+
locale: antdLangMap[lang],
|
|
118
150
|
children: props.children
|
|
119
151
|
})
|
|
120
152
|
})
|
package/es/ProDownload/index.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import "antd/es/button/style";
|
|
2
|
-
import _Button from "antd/es/button";
|
|
3
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
4
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
5
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
@@ -7,6 +5,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
7
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
8
6
|
var _excluded = ["source", "action", "url", "method", "params", "fileName", "children", "onFinish", "beforeDownload", "className", "transformResponse", "onError"];
|
|
9
7
|
import { useSetState } from 'ahooks';
|
|
8
|
+
import { Button } from 'antd';
|
|
10
9
|
import classNames from 'classnames';
|
|
11
10
|
import _, { isFunction } from 'lodash';
|
|
12
11
|
import { BlobMakeFile, DownloadRequest } from "./utils";
|
|
@@ -128,7 +127,7 @@ var ProDownload = props => {
|
|
|
128
127
|
var cls = classNames(className, {
|
|
129
128
|
'pro-download': true
|
|
130
129
|
});
|
|
131
|
-
return /*#__PURE__*/_jsx(
|
|
130
|
+
return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({
|
|
132
131
|
className: cls,
|
|
133
132
|
onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
|
|
134
133
|
var res;
|
package/es/ProDownload/utils.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
-
import "antd/es/message/style";
|
|
3
|
-
import _message from "antd/es/message";
|
|
4
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
5
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
6
4
|
/* eslint-disable no-empty */
|
|
7
5
|
/* eslint-disable prefer-promise-reject-errors */
|
|
6
|
+
import { message } from 'antd';
|
|
8
7
|
import { isFunction, get } from 'lodash';
|
|
9
8
|
import locale from "../locale";
|
|
10
9
|
var stringify = data => {
|
|
@@ -118,7 +117,7 @@ export var DownloadRequest = /*#__PURE__*/function () {
|
|
|
118
117
|
_context.next = 7;
|
|
119
118
|
break;
|
|
120
119
|
}
|
|
121
|
-
|
|
120
|
+
message.error(`${locale.ProDownload.errorMessage}`);
|
|
122
121
|
return _context.abrupt("return", Promise.reject(`${locale.ProDownload.errorMessage}`));
|
|
123
122
|
case 7:
|
|
124
123
|
if (!((_data === null || _data === void 0 ? void 0 : _data.status) > 200 || (_data === null || _data === void 0 ? void 0 : _data.code) === 401)) {
|
|
@@ -126,7 +125,7 @@ export var DownloadRequest = /*#__PURE__*/function () {
|
|
|
126
125
|
break;
|
|
127
126
|
}
|
|
128
127
|
errorMsg = (_data === null || _data === void 0 ? void 0 : _data.message) || (_data === null || _data === void 0 ? void 0 : _data.msg);
|
|
129
|
-
errorMsg &&
|
|
128
|
+
errorMsg && message.error(errorMsg);
|
|
130
129
|
onError && onError(_data);
|
|
131
130
|
return _context.abrupt("return", Promise.reject(errorMsg));
|
|
132
131
|
case 12:
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import "antd/es/drawer/style";
|
|
2
|
-
import _Drawer from "antd/es/drawer";
|
|
3
|
-
import "antd/es/button/style";
|
|
4
|
-
import _Button from "antd/es/button";
|
|
5
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
6
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
7
|
-
import "antd/es/modal/style";
|
|
8
|
-
import _Modal from "antd/es/modal";
|
|
9
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
10
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
|
+
import { Button, Drawer, Modal } from 'antd';
|
|
11
6
|
import React, { useCallback, useState, useRef, useEffect } from 'react';
|
|
12
7
|
import { useScroll } from 'ahooks';
|
|
8
|
+
import classNames from 'classnames';
|
|
13
9
|
import { isArray } from 'lodash';
|
|
14
10
|
import { ReactSVG } from 'react-svg';
|
|
15
11
|
import closeSvg from "../../../assets/close.svg";
|
|
@@ -25,7 +21,7 @@ var ProDrawer = _ref => {
|
|
|
25
21
|
title = _ref.title,
|
|
26
22
|
width = _ref.width,
|
|
27
23
|
footer = _ref.footer,
|
|
28
|
-
|
|
24
|
+
open = _ref.open,
|
|
29
25
|
isView = _ref.isView,
|
|
30
26
|
maskClosable = _ref.maskClosable,
|
|
31
27
|
isConfirmClose = _ref.isConfirmClose,
|
|
@@ -54,9 +50,9 @@ var ProDrawer = _ref => {
|
|
|
54
50
|
setInitialSnapshot = _useState4[1];
|
|
55
51
|
var noRenderFooter = isView || footer === false || footer === null;
|
|
56
52
|
|
|
57
|
-
// 使用 useEffect 在
|
|
53
|
+
// 使用 useEffect 在 open 变更时延迟捕获 初始DOM 快照
|
|
58
54
|
useEffect(() => {
|
|
59
|
-
if (
|
|
55
|
+
if (open) {
|
|
60
56
|
// 延迟到下一个事件循环,确保 Drawer 已经渲染
|
|
61
57
|
var timeoutId = setTimeout(() => {
|
|
62
58
|
if (ref.current) {
|
|
@@ -67,7 +63,7 @@ var ProDrawer = _ref => {
|
|
|
67
63
|
return () => clearTimeout(timeoutId); // 清理定时器
|
|
68
64
|
}
|
|
69
65
|
setInitialSnapshot('');
|
|
70
|
-
}, [
|
|
66
|
+
}, [open]); // 当 open 变化时执行
|
|
71
67
|
|
|
72
68
|
// 快照对比
|
|
73
69
|
var compareSnapshots = () => {
|
|
@@ -83,7 +79,7 @@ var ProDrawer = _ref => {
|
|
|
83
79
|
if (isView || !isConfirmClose || compareSnapshots()) {
|
|
84
80
|
onCancel && onCancel();
|
|
85
81
|
} else if (!modalRef.current) {
|
|
86
|
-
modalRef.current =
|
|
82
|
+
modalRef.current = Modal.confirm(_objectSpread({
|
|
87
83
|
className: 'width430',
|
|
88
84
|
title: locale === null || locale === void 0 || (_locale$ProDrawerForm = locale.ProDrawerForm) === null || _locale$ProDrawerForm === void 0 ? void 0 : _locale$ProDrawerForm.isSureClose,
|
|
89
85
|
okText: locale === null || locale === void 0 || (_locale$ProDrawerForm2 = locale.ProDrawerForm) === null || _locale$ProDrawerForm2 === void 0 ? void 0 : _locale$ProDrawerForm2.confirm,
|
|
@@ -109,7 +105,7 @@ var ProDrawer = _ref => {
|
|
|
109
105
|
while (1) switch (_context2.prev = _context2.next) {
|
|
110
106
|
case 0:
|
|
111
107
|
_context2.prev = 0;
|
|
112
|
-
if (!
|
|
108
|
+
if (!open) {
|
|
113
109
|
_context2.next = 24;
|
|
114
110
|
break;
|
|
115
111
|
}
|
|
@@ -191,13 +187,13 @@ var ProDrawer = _ref => {
|
|
|
191
187
|
*/
|
|
192
188
|
var defaultFooter = /*#__PURE__*/_jsxs("div", {
|
|
193
189
|
className: "pro-drawer-footer",
|
|
194
|
-
children: [/*#__PURE__*/_jsx(
|
|
190
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
195
191
|
type: "primary",
|
|
196
192
|
onClick: handleFinish,
|
|
197
193
|
loading: okLoading !== null && okLoading !== void 0 ? okLoading : loading,
|
|
198
194
|
disabled: okDisabled !== null && okDisabled !== void 0 ? okDisabled : loading,
|
|
199
195
|
children: okText
|
|
200
|
-
}), /*#__PURE__*/_jsx(
|
|
196
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
201
197
|
onClick: onCancel,
|
|
202
198
|
children: cancelText
|
|
203
199
|
})]
|
|
@@ -225,12 +221,12 @@ var ProDrawer = _ref => {
|
|
|
225
221
|
}
|
|
226
222
|
return defaultFooter;
|
|
227
223
|
};
|
|
228
|
-
return /*#__PURE__*/_jsxs(
|
|
224
|
+
return /*#__PURE__*/_jsxs(Drawer, _objectSpread(_objectSpread({
|
|
229
225
|
width: width,
|
|
230
|
-
open:
|
|
226
|
+
open: open,
|
|
231
227
|
maskClosable: maskClosable,
|
|
232
228
|
placement: "right",
|
|
233
|
-
|
|
229
|
+
rootClassName: classNames(className, 'pro-drawer'),
|
|
234
230
|
closable: false,
|
|
235
231
|
onClose: onCancel,
|
|
236
232
|
zIndex: zIndex
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import "antd/es/modal/style";
|
|
3
|
-
import _Modal from "antd/es/modal";
|
|
4
|
-
import "antd/es/space/style";
|
|
5
|
-
import _Space from "antd/es/space";
|
|
6
|
-
import "antd/es/button/style";
|
|
7
|
-
import _Button from "antd/es/button";
|
|
8
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
9
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
10
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
11
5
|
import React, { useCallback, useState, useRef } from 'react';
|
|
6
|
+
import { Space, Button, Modal } from 'antd';
|
|
12
7
|
import { useScroll, useSize } from 'ahooks';
|
|
13
8
|
import classnames from 'classnames';
|
|
14
9
|
import { isArray } from 'lodash';
|
|
15
|
-
import { ReactSVG } from 'react-svg';
|
|
16
|
-
import closeSvg from "../../../assets/close.svg";
|
|
17
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
12
|
/**
|
|
@@ -24,7 +17,7 @@ var ProModal = _ref => {
|
|
|
24
17
|
var form = _ref.form,
|
|
25
18
|
title = _ref.title,
|
|
26
19
|
width = _ref.width,
|
|
27
|
-
|
|
20
|
+
open = _ref.open,
|
|
28
21
|
footer = _ref.footer,
|
|
29
22
|
isView = _ref.isView,
|
|
30
23
|
maskClosable = _ref.maskClosable,
|
|
@@ -60,7 +53,7 @@ var ProModal = _ref => {
|
|
|
60
53
|
while (1) switch (_context.prev = _context.next) {
|
|
61
54
|
case 0:
|
|
62
55
|
_context.prev = 0;
|
|
63
|
-
if (!
|
|
56
|
+
if (!open) {
|
|
64
57
|
_context.next = 24;
|
|
65
58
|
break;
|
|
66
59
|
}
|
|
@@ -141,12 +134,15 @@ var ProModal = _ref => {
|
|
|
141
134
|
*
|
|
142
135
|
*/
|
|
143
136
|
var defaultFooter = /*#__PURE__*/_jsxs("div", {
|
|
144
|
-
className:
|
|
145
|
-
|
|
146
|
-
|
|
137
|
+
className: classnames({
|
|
138
|
+
'pro-modal-footer': extraLeft,
|
|
139
|
+
'pro-modal-footer-123': true
|
|
140
|
+
}),
|
|
141
|
+
children: [extraLeft, /*#__PURE__*/_jsxs(Space, {
|
|
142
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
147
143
|
onClick: onCancel,
|
|
148
144
|
children: cancelText
|
|
149
|
-
}), /*#__PURE__*/_jsx(
|
|
145
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
150
146
|
type: "primary",
|
|
151
147
|
onClick: handleFinish,
|
|
152
148
|
loading: okLoading !== null && okLoading !== void 0 ? okLoading : loading,
|
|
@@ -178,20 +174,16 @@ var ProModal = _ref => {
|
|
|
178
174
|
}
|
|
179
175
|
return defaultFooter;
|
|
180
176
|
};
|
|
181
|
-
return /*#__PURE__*/_jsx(
|
|
177
|
+
return /*#__PURE__*/_jsx(Modal, _objectSpread(_objectSpread({
|
|
182
178
|
className: _className,
|
|
183
179
|
title: title,
|
|
184
180
|
width: width,
|
|
185
|
-
open:
|
|
181
|
+
open: open,
|
|
186
182
|
maskClosable: maskClosable,
|
|
187
183
|
onCancel: onCancel,
|
|
188
184
|
footer: renderFooter(),
|
|
189
185
|
okText: okText,
|
|
190
186
|
cancelText: cancelText,
|
|
191
|
-
closeIcon: /*#__PURE__*/_jsx(ReactSVG, {
|
|
192
|
-
className: "close-icon",
|
|
193
|
-
src: closeSvg
|
|
194
|
-
}),
|
|
195
187
|
zIndex: zIndex
|
|
196
188
|
}, modalProps), {}, {
|
|
197
189
|
children: /*#__PURE__*/_jsx("div", {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { FormInstance } from 'antd/es/form/Form';
|
|
3
|
+
import { ProDrawerFormType } from './propsType';
|
|
3
4
|
export declare const useProDrawerFormContext: () => any;
|
|
4
|
-
declare const ProDrawerForm: React.ForwardRefExoticComponent<
|
|
5
|
+
declare const ProDrawerForm: React.ForwardRefExoticComponent<ProDrawerFormType & React.RefAttributes<FormInstance<any>>>;
|
|
5
6
|
export default ProDrawerForm;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
-
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["open", "mode", "size", "disabled", "isView", "form", "proFormProps", "onCancel", "onCloseClean", "children", "okText", "isConfirmClose", "maskClosable", "cancelText"];
|
|
4
5
|
import React, { createContext, forwardRef, useContext, useImperativeHandle, useMemo } from 'react';
|
|
5
6
|
import { ProDrawer, ProModal } from "./components";
|
|
6
7
|
import ProForm from "../ProForm";
|
|
@@ -10,25 +11,32 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
10
11
|
var ProDrawerFormContext = /*#__PURE__*/createContext(null);
|
|
11
12
|
export var useProDrawerFormContext = () => useContext(ProDrawerFormContext);
|
|
12
13
|
var ProDrawerForm = /*#__PURE__*/forwardRef((props, ref) => {
|
|
13
|
-
var
|
|
14
|
-
var visible = props.visible,
|
|
15
|
-
showType = props.showType,
|
|
16
|
-
okText = props.okText,
|
|
17
|
-
isView = props.isView;
|
|
14
|
+
var _locale$ProDrawerForm, _locale$ProDrawerForm2, _locale$ProDrawerForm3;
|
|
18
15
|
var open = props.open,
|
|
19
|
-
mode = props.mode,
|
|
20
|
-
|
|
16
|
+
_props$mode = props.mode,
|
|
17
|
+
mode = _props$mode === void 0 ? 'Drawer' : _props$mode,
|
|
18
|
+
_props$size = props.size,
|
|
19
|
+
size = _props$size === void 0 ? 'middle' : _props$size,
|
|
21
20
|
disabled = props.disabled,
|
|
21
|
+
isView = props.isView,
|
|
22
22
|
originalForm = props.form,
|
|
23
|
-
proFormProps = props.proFormProps,
|
|
23
|
+
_props$proFormProps = props.proFormProps,
|
|
24
|
+
proFormProps = _props$proFormProps === void 0 ? {} : _props$proFormProps,
|
|
24
25
|
onCancel = props.onCancel,
|
|
25
|
-
onCloseClean = props.onCloseClean,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
_props$onCloseClean = props.onCloseClean,
|
|
27
|
+
onCloseClean = _props$onCloseClean === void 0 ? true : _props$onCloseClean,
|
|
28
|
+
children = props.children,
|
|
29
|
+
okText = props.okText,
|
|
30
|
+
_props$isConfirmClose = props.isConfirmClose,
|
|
31
|
+
isConfirmClose = _props$isConfirmClose === void 0 ? true : _props$isConfirmClose,
|
|
32
|
+
_props$maskClosable = props.maskClosable,
|
|
33
|
+
maskClosable = _props$maskClosable === void 0 ? false : _props$maskClosable,
|
|
34
|
+
_props$cancelText = props.cancelText,
|
|
35
|
+
cancelText = _props$cancelText === void 0 ? locale === null || locale === void 0 || (_locale$ProDrawerForm = locale.ProDrawerForm) === null || _locale$ProDrawerForm === void 0 ? void 0 : _locale$ProDrawerForm.cancel : _props$cancelText,
|
|
36
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
37
|
+
var nextIsView = isView || disabled;
|
|
38
|
+
var nextOkText = okText !== null && okText !== void 0 ? okText : mode === 'Drawer' ? locale === null || locale === void 0 || (_locale$ProDrawerForm2 = locale.ProDrawerForm) === null || _locale$ProDrawerForm2 === void 0 ? void 0 : _locale$ProDrawerForm2.save : locale === null || locale === void 0 || (_locale$ProDrawerForm3 = locale.ProDrawerForm) === null || _locale$ProDrawerForm3 === void 0 ? void 0 : _locale$ProDrawerForm3.confirm;
|
|
39
|
+
var width = restProps.width;
|
|
32
40
|
if (!width && size) {
|
|
33
41
|
width = transformBySize(size);
|
|
34
42
|
}
|
|
@@ -47,38 +55,32 @@ var ProDrawerForm = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
47
55
|
|
|
48
56
|
// 暴露form实例给用户
|
|
49
57
|
useImperativeHandle(ref, () => form);
|
|
50
|
-
var
|
|
58
|
+
var DrawerModal = useMemo(() => {
|
|
51
59
|
return {
|
|
52
60
|
Drawer: ProDrawer,
|
|
53
61
|
Modal: ProModal
|
|
54
|
-
}[
|
|
55
|
-
}, [
|
|
62
|
+
}[mode];
|
|
63
|
+
}, [mode]);
|
|
56
64
|
return /*#__PURE__*/_jsx(ProDrawerFormContext.Provider, {
|
|
57
65
|
value: {
|
|
58
66
|
source: 'ProDrawerForm'
|
|
59
67
|
},
|
|
60
|
-
children:
|
|
61
|
-
isView:
|
|
62
|
-
|
|
68
|
+
children: open ? /*#__PURE__*/_jsx(DrawerModal, _objectSpread(_objectSpread({}, restProps), {}, {
|
|
69
|
+
isView: nextIsView,
|
|
70
|
+
open: open,
|
|
63
71
|
form: form,
|
|
64
72
|
width: width,
|
|
65
|
-
okText:
|
|
73
|
+
okText: nextOkText,
|
|
66
74
|
onCancel: handleCancel,
|
|
75
|
+
isConfirmClose: isConfirmClose,
|
|
76
|
+
maskClosable: maskClosable,
|
|
77
|
+
cancelText: cancelText,
|
|
67
78
|
children: children || /*#__PURE__*/_jsx(ProForm, _objectSpread({
|
|
68
79
|
form: form,
|
|
69
|
-
disabled:
|
|
80
|
+
disabled: nextIsView,
|
|
70
81
|
footer: false
|
|
71
82
|
}, proFormProps))
|
|
72
83
|
})) : null
|
|
73
84
|
});
|
|
74
85
|
});
|
|
75
|
-
ProDrawerForm.defaultProps = {
|
|
76
|
-
showType: 'Drawer',
|
|
77
|
-
size: 'middle',
|
|
78
|
-
isConfirmClose: true,
|
|
79
|
-
onCloseClean: true,
|
|
80
|
-
maskClosable: false,
|
|
81
|
-
cancelText: locale === null || locale === void 0 || (_locale$ProDrawerForm3 = locale.ProDrawerForm) === null || _locale$ProDrawerForm3 === void 0 ? void 0 : _locale$ProDrawerForm3.cancel,
|
|
82
|
-
proFormProps: {}
|
|
83
|
-
};
|
|
84
86
|
export default ProDrawerForm;
|