@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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as componentMap from './index';
|
|
1
2
|
export { default as Select } from './base/Select';
|
|
2
3
|
export { default as DatePicker } from './base/DatePicker';
|
|
3
4
|
export { default as RangePicker } from './base/RangePicker';
|
|
@@ -12,8 +13,6 @@ export { default as TimePicker } from './base/TimePicker';
|
|
|
12
13
|
export { default as FormList } from './combination/FormList';
|
|
13
14
|
export { default as ProEditTable } from '../../ProEditTable';
|
|
14
15
|
export { default as ProCascader } from './combination/ProCascader';
|
|
15
|
-
export { default as ProAddressBar } from './combination/ProCascader';
|
|
16
|
-
export { default as ProCombination } from './combination/ProCombination';
|
|
17
16
|
export { default as ProNumberRange } from './combination/ProNumberRange';
|
|
18
17
|
export { default as ProModalSelect } from './combination/ProModalSelect';
|
|
19
18
|
export { default as ProTimeLimit } from './combination/ProTimeLimit';
|
|
@@ -27,10 +26,4 @@ export { default as ProUpload } from '../../ProUpload';
|
|
|
27
26
|
export { default as ProTreeModal } from '../../ProTreeModal';
|
|
28
27
|
export { default as ProTree } from '../../ProTree';
|
|
29
28
|
export { default as FormFooter } from './FormFooter';
|
|
30
|
-
export
|
|
31
|
-
export { default as EnumSelect } from './old/EnumSelect';
|
|
32
|
-
export { default as InputRange } from './old/InputRange';
|
|
33
|
-
export { default as ProRangeBox } from './old/ProRangeBox';
|
|
34
|
-
export { default as ProCertValidity } from './old/ProCertValidity';
|
|
35
|
-
export { default as ProCertNo } from './old/ProCertNo';
|
|
36
|
-
export type ProFormComponentType = 'Select' | 'DatePicker' | 'RangePicker' | 'TextArea' | 'Switch' | 'Radio' | 'Checkbox' | 'Input' | 'InputNumber' | 'SwitchCheckbox' | 'TimePicker' | 'FormList' | 'ProEditTable' | 'ProCascader' | 'ProAddressBar' | 'ProCombination' | 'ProNumberRange' | 'ProModalSelect' | 'ProTimeLimit' | 'ProRangeLimit' | 'Group' | 'ProCollapse' | 'Container' | 'ProEnum' | 'ProSelect' | 'ProUpload' | 'ProTreeModal' | 'ProTree' | 'FormFooter' | 'ProAddress' | 'EnumSelect' | 'InputRange' | 'ProRangeBox' | 'ProCertValidity' | 'ProCertNo';
|
|
29
|
+
export type ProFormComponentType = keyof typeof componentMap;
|
|
@@ -15,8 +15,6 @@ export { default as ProEditTable } from "../../ProEditTable";
|
|
|
15
15
|
|
|
16
16
|
// combination 组合组件
|
|
17
17
|
export { default as ProCascader } from "./combination/ProCascader";
|
|
18
|
-
export { default as ProAddressBar } from "./combination/ProCascader";
|
|
19
|
-
export { default as ProCombination } from "./combination/ProCombination";
|
|
20
18
|
export { default as ProNumberRange } from "./combination/ProNumberRange";
|
|
21
19
|
export { default as ProModalSelect } from "./combination/ProModalSelect";
|
|
22
20
|
export { default as ProTimeLimit } from "./combination/ProTimeLimit";
|
|
@@ -33,12 +31,4 @@ export { default as ProTree } from "../../ProTree";
|
|
|
33
31
|
// footer组件
|
|
34
32
|
export { default as FormFooter } from "./FormFooter";
|
|
35
33
|
|
|
36
|
-
//
|
|
37
|
-
export { default as ProAddress, transferAddressInfoToRegion } from "./old/ProAddress";
|
|
38
|
-
export { default as EnumSelect } from "./old/EnumSelect";
|
|
39
|
-
export { default as InputRange } from "./old/InputRange";
|
|
40
|
-
export { default as ProRangeBox } from "./old/ProRangeBox";
|
|
41
|
-
export { default as ProCertValidity } from "./old/ProCertValidity";
|
|
42
|
-
export { default as ProCertNo } from "./old/ProCertNo";
|
|
43
|
-
|
|
44
|
-
// 类型导出 - 基于导出的组件名称定义
|
|
34
|
+
// 类型定义
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import "antd/es/tooltip/style";
|
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
|
3
|
-
import "antd/es/space/style";
|
|
4
|
-
import _Space from "antd/es/space";
|
|
5
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
7
3
|
var _excluded = ["name", "names", "namesStr", "form", "onDiff", "children", "type", "diffConfig", "valuePropName", "normalize", "getValueProps", "viewRender"];
|
|
4
|
+
import { Space, Tooltip } from 'antd';
|
|
8
5
|
import classNames from 'classnames';
|
|
9
6
|
import { get } from 'lodash';
|
|
10
7
|
import React, { useMemo } from 'react';
|
|
@@ -108,20 +105,22 @@ var ChangedWrapper = props => {
|
|
|
108
105
|
var scrollFollowParentConfig = componentsWithFloatWindow.includes(type) ? {
|
|
109
106
|
scrollFollowParent
|
|
110
107
|
} : {};
|
|
111
|
-
return /*#__PURE__*/_jsx(
|
|
108
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
|
112
109
|
open: open,
|
|
113
110
|
getPopupContainer: trigger => scrollFollowParent ? trigger.parentElement : document.body,
|
|
114
|
-
|
|
111
|
+
classNames: {
|
|
112
|
+
root: 'original-value-tooltip'
|
|
113
|
+
},
|
|
115
114
|
placement: "topLeft",
|
|
116
115
|
autoAdjustOverflow: false,
|
|
117
|
-
title: /*#__PURE__*/_jsxs(
|
|
116
|
+
title: /*#__PURE__*/_jsxs(Space, {
|
|
118
117
|
direction: "vertical",
|
|
119
118
|
className: "changed-tooltip",
|
|
120
|
-
children: [/*#__PURE__*/_jsxs(
|
|
119
|
+
children: [/*#__PURE__*/_jsxs(Space, {
|
|
121
120
|
align: "start",
|
|
122
121
|
className: "original-value-container",
|
|
123
122
|
children: ["\u521D\u59CB\u503C\uFF1A", tipContent]
|
|
124
|
-
}), _showEllipse && /*#__PURE__*/_jsxs(
|
|
123
|
+
}), _showEllipse && /*#__PURE__*/_jsxs(Space, {
|
|
125
124
|
className: "current-value-container",
|
|
126
125
|
children: ["\u5F53\u524D\u503C\uFF1A", /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, children.props), rest), scrollFollowParentConfig), {}, {
|
|
127
126
|
isView: true
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
-
import "antd/es/modal/style";
|
|
4
|
-
import _Modal from "antd/es/modal";
|
|
5
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
6
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
7
|
-
var _excluded = ["onChange", "children", "confirm"];
|
|
5
|
+
var _excluded = ["onChange", "children", "confirm", "otherProps"];
|
|
8
6
|
import { isFunction, isObject } from 'lodash';
|
|
9
7
|
import React from 'react';
|
|
8
|
+
import { Modal } from 'antd';
|
|
10
9
|
import ProForm from "../../index";
|
|
11
10
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
12
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -18,9 +17,10 @@ var ConfirmWrapper = props => {
|
|
|
18
17
|
var onChange = props.onChange,
|
|
19
18
|
children = props.children,
|
|
20
19
|
confirm = props.confirm,
|
|
20
|
+
otherProps = props.otherProps,
|
|
21
21
|
rest = _objectWithoutProperties(props, _excluded);
|
|
22
|
-
var
|
|
23
|
-
|
|
22
|
+
var _ProForm$useFieldProp = ProForm.useFieldProps(),
|
|
23
|
+
form = _ProForm$useFieldProp.form;
|
|
24
24
|
var handleChange = /*#__PURE__*/function () {
|
|
25
25
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(value) {
|
|
26
26
|
var _len,
|
|
@@ -62,12 +62,12 @@ var ConfirmWrapper = props => {
|
|
|
62
62
|
onChange === null || onChange === void 0 || onChange(_value, ...other);
|
|
63
63
|
}
|
|
64
64
|
if (confirmProps === true) {
|
|
65
|
-
|
|
65
|
+
Modal.confirm(_objectSpread(_objectSpread({}, defaultConfirmProps), {}, {
|
|
66
66
|
onOk: () => onChange === null || onChange === void 0 ? void 0 : onChange(_value, ...other)
|
|
67
67
|
}));
|
|
68
68
|
}
|
|
69
69
|
if (isObject(confirmProps)) {
|
|
70
|
-
|
|
70
|
+
Modal.confirm(_objectSpread(_objectSpread(_objectSpread({}, 'title' in confirmProps || 'content' in confirmProps ? {} : defaultConfirmProps), confirmProps), {}, {
|
|
71
71
|
onOk: function () {
|
|
72
72
|
var _onOk = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
73
73
|
var _confirmProps$onOk;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import "antd/es/col/style";
|
|
2
|
-
import _Col from "antd/es/col";
|
|
3
|
-
import "antd/es/space/style";
|
|
4
|
-
import _Space from "antd/es/space";
|
|
5
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
6
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
7
|
-
import "antd/es/form/style";
|
|
8
|
-
import _Form from "antd/es/form";
|
|
9
|
-
import "antd/es/input/style";
|
|
10
|
-
import _Input from "antd/es/input";
|
|
11
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
12
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
13
5
|
var _excluded = ["labelWidth", "hiddenNames", "trim", "upperCase", "className", "rules", "required", "labelRequired", "tooltip", "validateFirst"];
|
|
14
6
|
/* eslint-disable prefer-destructuring */
|
|
7
|
+
import { Col, Form, Input, Space } from 'antd';
|
|
15
8
|
import React, { useMemo } from 'react';
|
|
16
9
|
import classNames from 'classnames';
|
|
17
10
|
import { ReactSVG } from 'react-svg';
|
|
@@ -52,7 +45,8 @@ var Render = props => {
|
|
|
52
45
|
globalControl = props.globalControl,
|
|
53
46
|
diffConfig = props.diffConfig,
|
|
54
47
|
viewRender = props.viewRender,
|
|
55
|
-
desensitization = props.desensitization
|
|
48
|
+
desensitization = props.desensitization,
|
|
49
|
+
shouldUpdateDebounce = props.shouldUpdateDebounce;
|
|
56
50
|
var colProps = props.colProps;
|
|
57
51
|
|
|
58
52
|
// 剔除一些不是FormItem的属性, 防止控制台报warning
|
|
@@ -81,7 +75,8 @@ var Render = props => {
|
|
|
81
75
|
component,
|
|
82
76
|
originComponent,
|
|
83
77
|
type,
|
|
84
|
-
desensitization
|
|
78
|
+
desensitization,
|
|
79
|
+
shouldUpdateDebounce
|
|
85
80
|
}),
|
|
86
81
|
shouldUpdate = _useShouldUpdate.shouldUpdate,
|
|
87
82
|
_show = _useShouldUpdate.show,
|
|
@@ -192,7 +187,7 @@ var Render = props => {
|
|
|
192
187
|
});
|
|
193
188
|
if (formItemProps.hidden === true || _show === false) {
|
|
194
189
|
// 为了监听shouldUpdate 必须存在一个FormItem, 空Input解决 【[antd: Form.Item] `name` is only used for validate React element】
|
|
195
|
-
return /*#__PURE__*/_jsx(
|
|
190
|
+
return /*#__PURE__*/_jsx(Form.Item, {
|
|
196
191
|
name: _otherFormItemProps.name || 'proFormItemHidden',
|
|
197
192
|
shouldUpdate: _otherFormItemProps.shouldUpdate,
|
|
198
193
|
className: _className,
|
|
@@ -201,7 +196,7 @@ var Render = props => {
|
|
|
201
196
|
rules: [{
|
|
202
197
|
required: false
|
|
203
198
|
}],
|
|
204
|
-
children: /*#__PURE__*/_jsx(
|
|
199
|
+
children: /*#__PURE__*/_jsx(Input, {})
|
|
205
200
|
});
|
|
206
201
|
}
|
|
207
202
|
|
|
@@ -368,7 +363,7 @@ var Render = props => {
|
|
|
368
363
|
var internalItemRender = {
|
|
369
364
|
mark: 'pro_table_render',
|
|
370
365
|
render: (inputProps, doms) => /*#__PURE__*/_jsxs(_Fragment, {
|
|
371
|
-
children: [/*#__PURE__*/_jsx(
|
|
366
|
+
children: [/*#__PURE__*/_jsx(Space, {
|
|
372
367
|
size: 0,
|
|
373
368
|
style: {
|
|
374
369
|
marginTop: 8
|
|
@@ -390,13 +385,19 @@ var Render = props => {
|
|
|
390
385
|
},
|
|
391
386
|
children: formItemProps === null || formItemProps === void 0 ? void 0 : formItemProps.after
|
|
392
387
|
}) : null]
|
|
393
|
-
}), /*#__PURE__*/_jsx(
|
|
388
|
+
}), /*#__PURE__*/_jsx(Space, {
|
|
394
389
|
size: 0,
|
|
395
390
|
style: {
|
|
396
391
|
marginTop: 8
|
|
397
392
|
},
|
|
398
393
|
children: formItemProps.extra
|
|
399
|
-
}), doms.errorList
|
|
394
|
+
}), doms.errorList ? /*#__PURE__*/_jsx("div", {
|
|
395
|
+
className: "ant-form-item-additional",
|
|
396
|
+
style: {
|
|
397
|
+
minHeight: '16px'
|
|
398
|
+
},
|
|
399
|
+
children: doms.errorList
|
|
400
|
+
}) : null]
|
|
400
401
|
})
|
|
401
402
|
};
|
|
402
403
|
// 自定义组件移除otherProps参数
|
|
@@ -444,11 +445,11 @@ var Render = props => {
|
|
|
444
445
|
colProps = _objectSpread(_objectSpread({}, colProps), {}, {
|
|
445
446
|
span: lessMode ? colProps.span : 24 // 默认占一行
|
|
446
447
|
});
|
|
447
|
-
return /*#__PURE__*/_jsx(
|
|
448
|
+
return /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({}, omit(_otherFormItemProps, filterFormItemKey)), {}, {
|
|
448
449
|
// @ts-ignore
|
|
449
450
|
_internalItemRender: internalItemRender,
|
|
450
451
|
className: _className,
|
|
451
|
-
children: /*#__PURE__*/_jsx(
|
|
452
|
+
children: /*#__PURE__*/_jsx(Form.List, _objectSpread(_objectSpread({
|
|
452
453
|
name: _otherFormItemProps.name
|
|
453
454
|
}, omit(_otherFormItemProps, ['rules'])), {}, {
|
|
454
455
|
children: (fields, operation, meta) => {
|
|
@@ -471,16 +472,16 @@ var Render = props => {
|
|
|
471
472
|
}
|
|
472
473
|
if (diffConfig !== null && diffConfig !== void 0 && diffConfig.originalValues) {
|
|
473
474
|
var _otherProps$namePath, _otherProps$names2;
|
|
474
|
-
var
|
|
475
|
+
var nextNames = otherProps.names;
|
|
475
476
|
// FormList中的names字段需要去除前缀
|
|
476
477
|
if (otherProps !== null && otherProps !== void 0 && (_otherProps$namePath = otherProps.namePath) !== null && _otherProps$namePath !== void 0 && _otherProps$namePath.length && (_otherProps$names2 = otherProps.names) !== null && _otherProps$names2 !== void 0 && _otherProps$names2.length) {
|
|
477
478
|
var _otherProps$namePath2;
|
|
478
479
|
var prefixLength = (otherProps === null || otherProps === void 0 || (_otherProps$namePath2 = otherProps.namePath) === null || _otherProps$namePath2 === void 0 ? void 0 : _otherProps$namePath2.length) - 1;
|
|
479
|
-
|
|
480
|
+
nextNames = otherProps.names.map(name => name.slice(prefixLength));
|
|
480
481
|
}
|
|
481
482
|
child = /*#__PURE__*/_jsx(ChangedWrapper, {
|
|
482
483
|
name: formItemProps.name,
|
|
483
|
-
names:
|
|
484
|
+
names: nextNames,
|
|
484
485
|
namesStr: namesStr,
|
|
485
486
|
diffConfig: diffConfig,
|
|
486
487
|
form: form,
|
|
@@ -495,7 +496,7 @@ var Render = props => {
|
|
|
495
496
|
children: child
|
|
496
497
|
});
|
|
497
498
|
}
|
|
498
|
-
return /*#__PURE__*/_jsx(
|
|
499
|
+
return /*#__PURE__*/_jsx(Form.Item, _objectSpread(_objectSpread({}, omit(_otherFormItemProps, filterFormItemKey)), {}, {
|
|
499
500
|
// @ts-ignore
|
|
500
501
|
_internalItemRender: internalItemRender,
|
|
501
502
|
className: _className,
|
|
@@ -506,24 +507,22 @@ var Render = props => {
|
|
|
506
507
|
children: [_otherFormItemProps.shouldUpdate ?
|
|
507
508
|
/*#__PURE__*/
|
|
508
509
|
// 空标签防止气泡不显示
|
|
509
|
-
_jsx(
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
children: () => renderItem()
|
|
514
|
-
})
|
|
510
|
+
_jsx(Form.Item, {
|
|
511
|
+
shouldUpdate: _otherFormItemProps.shouldUpdate,
|
|
512
|
+
noStyle: true,
|
|
513
|
+
children: () => renderItem()
|
|
515
514
|
}) : renderItem(), otherProps !== null && otherProps !== void 0 && (_otherProps$names3 = otherProps.names) !== null && _otherProps$names3 !== void 0 && _otherProps$names3.length ? otherProps.names.map(name => {
|
|
516
|
-
return /*#__PURE__*/_jsx(
|
|
515
|
+
return /*#__PURE__*/_jsx(Form.Item, {
|
|
517
516
|
hidden: true,
|
|
518
517
|
name: name,
|
|
519
|
-
children: /*#__PURE__*/_jsx(
|
|
518
|
+
children: /*#__PURE__*/_jsx(Input, {})
|
|
520
519
|
}, name);
|
|
521
520
|
}) : null]
|
|
522
521
|
});
|
|
523
522
|
if (formItemProps !== null && formItemProps !== void 0 && formItemProps.parentNames) {
|
|
524
523
|
return FormItem;
|
|
525
524
|
}
|
|
526
|
-
return /*#__PURE__*/_jsx(
|
|
525
|
+
return /*#__PURE__*/_jsx(Col, _objectSpread(_objectSpread({}, colProps), {}, {
|
|
527
526
|
children: FormItem
|
|
528
527
|
}));
|
|
529
528
|
};
|
|
@@ -20,6 +20,7 @@ interface Props<T = any> {
|
|
|
20
20
|
requiredOnView?: boolean;
|
|
21
21
|
required?: boolean | boolean[] | (() => boolean | boolean[]);
|
|
22
22
|
globalControl?: boolean;
|
|
23
|
+
shouldUpdateDebounce?: number;
|
|
23
24
|
}
|
|
24
25
|
declare const RenderFields: React.FC<Props>;
|
|
25
26
|
export default RenderFields;
|
|
@@ -28,7 +28,8 @@ var RenderFields = props => {
|
|
|
28
28
|
requiredOnView = props.requiredOnView,
|
|
29
29
|
required = props.required,
|
|
30
30
|
diffConfig = props.diffConfig,
|
|
31
|
-
globalControl = props.globalControl
|
|
31
|
+
globalControl = props.globalControl,
|
|
32
|
+
shouldUpdateDebounce = props.shouldUpdateDebounce;
|
|
32
33
|
|
|
33
34
|
// 是否包含隐藏字段
|
|
34
35
|
var hiddenData = columns.filter(item => {
|
|
@@ -208,7 +209,8 @@ var RenderFields = props => {
|
|
|
208
209
|
listName: column.listName,
|
|
209
210
|
globalControl,
|
|
210
211
|
formDisabled,
|
|
211
|
-
diffConfig
|
|
212
|
+
diffConfig,
|
|
213
|
+
shouldUpdateDebounce
|
|
212
214
|
};
|
|
213
215
|
return /*#__PURE__*/_jsx(FieldProvider, {
|
|
214
216
|
value: otherProps,
|
|
@@ -238,7 +240,8 @@ var RenderFields = props => {
|
|
|
238
240
|
requiredOnView: requiredOnView,
|
|
239
241
|
globalControl: globalControl,
|
|
240
242
|
viewRender: viewRender,
|
|
241
|
-
desensitization: desensitization
|
|
243
|
+
desensitization: desensitization,
|
|
244
|
+
shouldUpdateDebounce: shouldUpdateDebounce
|
|
242
245
|
})
|
|
243
246
|
}, `${_formItemProps.name || _formItemProps.label}${index}`);
|
|
244
247
|
});
|
|
@@ -16,11 +16,10 @@ import type { Props as SwitchProps } from '../base/Switch';
|
|
|
16
16
|
import type { Props as SwitchCheckboxProps } from '../base/SwitchCheckbox';
|
|
17
17
|
import type { Props as TextAreaProps } from '../base/TextArea';
|
|
18
18
|
import type { ProCascaderType } from '../combination/ProCascader/propsType';
|
|
19
|
-
import type { ProCombinationType } from '../combination/ProCombination/propsType';
|
|
20
19
|
import type { ProModalSelectType } from '../combination/ProModalSelect/propsType';
|
|
21
20
|
import type { ProNumberRangeType } from '../combination/ProNumberRange/propsType';
|
|
22
21
|
import type { ProLimitProps } from '../combination/ProTimeLimit';
|
|
23
|
-
import type {
|
|
22
|
+
import type { ProRangeLimitType } from '../combination/ProRangeLimit/propsType';
|
|
24
23
|
import type { CheckboxPropsMap, ProEnum, PropProSelectsMap, PropRadioPropsMap } from '../../../ProEnum/propsType';
|
|
25
24
|
import type { PropSelectProps as ProSelectProps } from '../../../ProSelect/propsType';
|
|
26
25
|
import type { ProEditTableType } from '../../../ProEditTable/propsType';
|
|
@@ -123,9 +122,6 @@ export type ColumnTypeMap<Values = any, T = 'ProForm'> = {
|
|
|
123
122
|
} | {
|
|
124
123
|
type?: 'ProCascader';
|
|
125
124
|
fieldProps?: FieldType<ProCascaderType, Values, T>;
|
|
126
|
-
} | {
|
|
127
|
-
type?: 'ProCombination';
|
|
128
|
-
fieldProps?: FieldType<ProCombinationType, Values, T>;
|
|
129
125
|
} | {
|
|
130
126
|
type?: 'ProModalSelect';
|
|
131
127
|
fieldProps?: FieldType<ProModalSelectType, Values, T>;
|
|
@@ -134,7 +130,7 @@ export type ColumnTypeMap<Values = any, T = 'ProForm'> = {
|
|
|
134
130
|
fieldProps?: FieldType<ProNumberRangeType, Values, T>;
|
|
135
131
|
} | {
|
|
136
132
|
type?: 'ProRangeLimit';
|
|
137
|
-
fieldProps?: FieldType<
|
|
133
|
+
fieldProps?: FieldType<ProRangeLimitType, Values, T>;
|
|
138
134
|
} | {
|
|
139
135
|
type?: 'ProTimeLimit';
|
|
140
136
|
fieldProps?: FieldType<ProLimitProps, Values, T>;
|
|
@@ -284,6 +280,7 @@ export interface RenderType<Values = any> {
|
|
|
284
280
|
requiredOnView?: boolean;
|
|
285
281
|
confirm?: ProFormColumnType['confirm'];
|
|
286
282
|
globalControl?: boolean;
|
|
283
|
+
shouldUpdateDebounce?: number;
|
|
287
284
|
[name: string]: any;
|
|
288
285
|
}
|
|
289
286
|
/**
|
package/es/ProForm/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FormInstance } from 'antd';
|
|
2
|
-
import React
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { FormProviderProps } from 'antd/es/form/context';
|
|
4
4
|
import type { ProFormType } from './propsType';
|
|
5
5
|
import { useForm } from './utils/useForm';
|
|
6
6
|
import useWatch from './utils/useWatch';
|
|
7
7
|
import { useForms } from '../FormsProvider';
|
|
8
|
-
interface IProForm<T = any> extends
|
|
8
|
+
interface IProForm<T = any> extends React.ForwardRefExoticComponent<ProFormType<T> & React.RefAttributes<FormInstance<T>>> {
|
|
9
9
|
useForm: typeof useForm;
|
|
10
10
|
useWatch: typeof useWatch;
|
|
11
11
|
useFormInstances: typeof useForms;
|
package/es/ProForm/index.js
CHANGED
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
import "antd/es/form/style";
|
|
2
|
-
import _Form from "antd/es/form";
|
|
3
|
-
import "antd/es/row/style";
|
|
4
|
-
import _Row from "antd/es/row";
|
|
5
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
|
-
import "antd/es/col/style";
|
|
7
|
-
import _Col from "antd/es/col";
|
|
8
|
-
import "antd/es/space/style";
|
|
9
|
-
import _Space from "antd/es/space";
|
|
10
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
11
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
12
|
-
var _excluded = ["mode", "span", "disabled", "isView", "columns", "footer", "onOk", "okText", "onCancel", "confirmLoading", "cancelText", "form", "children", "rowProps", "className", "expand", "expandOpen", "expandOpenChange", "viewEmpty", "labelAlign", "labelWidth", "onValuesChange", "onFinish", "diffConfig", "submitOnEnter", "clearNotShow", "initialValues", "requiredOnView", "formId", "required", "formKey", "globalControl", "scrollToError", "optimize", "stopOnFirstError"];
|
|
4
|
+
var _excluded = ["mode", "span", "disabled", "isView", "columns", "footer", "onOk", "okText", "onCancel", "confirmLoading", "cancelText", "form", "children", "rowProps", "className", "expand", "expandOpen", "expandOpenChange", "viewEmpty", "labelAlign", "labelWidth", "onValuesChange", "onFinish", "diffConfig", "submitOnEnter", "clearNotShow", "initialValues", "requiredOnView", "formId", "required", "formKey", "globalControl", "scrollToError", "optimize", "stopOnFirstError", "shouldUpdateDebounce"];
|
|
13
5
|
import { DoubleLeftOutlined } from '@ant-design/icons';
|
|
6
|
+
import { Col, Form, Row, Space } from 'antd';
|
|
14
7
|
import classnames from 'classnames';
|
|
15
8
|
import React, { forwardRef, useImperativeHandle, useMemo, useEffect } from 'react';
|
|
16
9
|
import { isObject, merge, omit } from 'lodash';
|
|
17
|
-
import { FormFooter
|
|
10
|
+
import { FormFooter } from "./components";
|
|
18
11
|
import RenderFields from "./components/render/RenderFields";
|
|
19
12
|
import { useProConfig } from "../ProConfigProvider";
|
|
20
13
|
import { useProDrawerFormContext } from "../ProDrawerForm";
|
|
@@ -72,6 +65,8 @@ var ProForm = (props, ref) => {
|
|
|
72
65
|
optimize = _props$optimize === void 0 ? false : _props$optimize,
|
|
73
66
|
_props$stopOnFirstErr = props.stopOnFirstError,
|
|
74
67
|
stopOnFirstError = _props$stopOnFirstErr === void 0 ? false : _props$stopOnFirstErr,
|
|
68
|
+
_props$shouldUpdateDe = props.shouldUpdateDebounce,
|
|
69
|
+
shouldUpdateDebounce = _props$shouldUpdateDe === void 0 ? 200 : _props$shouldUpdateDe,
|
|
75
70
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
76
71
|
var config = useProConfig('ProForm');
|
|
77
72
|
// source: 用于区分是哪个组件调用,用于错误提示
|
|
@@ -131,12 +126,12 @@ var ProForm = (props, ref) => {
|
|
|
131
126
|
return !!expand && columns.length > Number(expand) && /*#__PURE__*/_jsx("div", {
|
|
132
127
|
className: "expand-button",
|
|
133
128
|
onClick: expandHandle,
|
|
134
|
-
children: !openState ? /*#__PURE__*/_jsxs(
|
|
129
|
+
children: !openState ? /*#__PURE__*/_jsxs(Space, {
|
|
135
130
|
align: "center",
|
|
136
131
|
children: [locale.ProForm.unfold, /*#__PURE__*/_jsx(DoubleLeftOutlined, {
|
|
137
132
|
className: "rotate-to-bottom"
|
|
138
133
|
})]
|
|
139
|
-
}) : /*#__PURE__*/_jsxs(
|
|
134
|
+
}) : /*#__PURE__*/_jsxs(Space, {
|
|
140
135
|
align: "center",
|
|
141
136
|
children: [locale.ProForm.packUp, /*#__PURE__*/_jsx(DoubleLeftOutlined, {
|
|
142
137
|
className: "rotate-to-top"
|
|
@@ -209,9 +204,9 @@ var ProForm = (props, ref) => {
|
|
|
209
204
|
// 展开折叠按钮
|
|
210
205
|
var expandEle = expandRender();
|
|
211
206
|
var hasElement = footerEle || expandEle;
|
|
212
|
-
return hasElement ? /*#__PURE__*/_jsx(
|
|
207
|
+
return hasElement ? /*#__PURE__*/_jsx(Col, _objectSpread(_objectSpread({}, colProps), {}, {
|
|
213
208
|
className: footerCls,
|
|
214
|
-
children: /*#__PURE__*/_jsxs(
|
|
209
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
215
210
|
align: "center",
|
|
216
211
|
children: [footerEle, expandEle]
|
|
217
212
|
})
|
|
@@ -228,7 +223,7 @@ var ProForm = (props, ref) => {
|
|
|
228
223
|
otherProps.layout = otherProps.layout || 'vertical';
|
|
229
224
|
}
|
|
230
225
|
}
|
|
231
|
-
return /*#__PURE__*/_jsxs(
|
|
226
|
+
return /*#__PURE__*/_jsxs(Form, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
232
227
|
onKeyPress: event => {
|
|
233
228
|
if (!submitOnEnter) return;
|
|
234
229
|
if (event.key === 'Enter') {
|
|
@@ -242,11 +237,7 @@ var ProForm = (props, ref) => {
|
|
|
242
237
|
onValuesChange: handleValuesChange,
|
|
243
238
|
onFinish: handleFinish,
|
|
244
239
|
initialValues: _initialValues,
|
|
245
|
-
|
|
246
|
-
block: 'center',
|
|
247
|
-
behavior: 'smooth'
|
|
248
|
-
},
|
|
249
|
-
children: [/*#__PURE__*/_jsxs(_Row, _objectSpread(_objectSpread({
|
|
240
|
+
children: [/*#__PURE__*/_jsxs(Row, _objectSpread(_objectSpread({
|
|
250
241
|
gutter: 24
|
|
251
242
|
}, rowProps), {}, {
|
|
252
243
|
children: [/*#__PURE__*/_jsx(RenderFields, {
|
|
@@ -265,7 +256,8 @@ var ProForm = (props, ref) => {
|
|
|
265
256
|
clearNotShow: clearNotShow,
|
|
266
257
|
requiredOnView: requiredOnView,
|
|
267
258
|
required: required,
|
|
268
|
-
globalControl: globalControl
|
|
259
|
+
globalControl: globalControl,
|
|
260
|
+
shouldUpdateDebounce: shouldUpdateDebounce
|
|
269
261
|
}), footerRender()]
|
|
270
262
|
})), children]
|
|
271
263
|
}));
|
|
@@ -307,7 +299,7 @@ export var ProFormProvider = props => {
|
|
|
307
299
|
// @ts-ignore
|
|
308
300
|
onFormChange(formName, info);
|
|
309
301
|
};
|
|
310
|
-
return /*#__PURE__*/_jsx(
|
|
302
|
+
return /*#__PURE__*/_jsx(Form.Provider, {
|
|
311
303
|
onFormChange: onFormChange ? handleFormChange : undefined,
|
|
312
304
|
onFormFinish: onFormFinish,
|
|
313
305
|
children: children
|
|
@@ -318,26 +310,6 @@ ProFormForward.useFieldProps = useFieldProps; // 获取每个字段的其他参
|
|
|
318
310
|
// 表单实例共享
|
|
319
311
|
ProFormForward.FormsProvider = FormsProvider; // 表单实例共享Provider
|
|
320
312
|
ProFormForward.useForms = useForms; // 获取上下文中的共享的表单实例map
|
|
321
|
-
ProFormForward.useFormInstances = useForms; // 获取上下文中的共享的表单实例map
|
|
322
313
|
ProFormForward.useContextForms = useContextForms; // 获取上下文中的共享的表单实例map
|
|
323
314
|
|
|
324
|
-
// 内置组合
|
|
325
|
-
ProFormForward.ProCascader = ProCascader;
|
|
326
|
-
ProFormForward.ProCombination = ProCombination;
|
|
327
|
-
ProFormForward.ProNumberRange = ProNumberRange;
|
|
328
|
-
ProFormForward.ProModalSelect = ProModalSelect;
|
|
329
|
-
ProFormForward.ProTimeLimit = ProTimeLimit;
|
|
330
|
-
ProFormForward.ProUpload = ProUpload;
|
|
331
|
-
// ProFormForward.ProTreeSelect = ProTreeSelect;
|
|
332
|
-
ProFormForward.ProTreeModal = ProTreeModal;
|
|
333
|
-
ProFormForward.ProTree = ProTree;
|
|
334
|
-
|
|
335
|
-
// 待废弃
|
|
336
|
-
ProFormForward.EnumSelect = EnumSelect;
|
|
337
|
-
ProFormForward.ProAddress = ProAddress;
|
|
338
|
-
ProFormForward.InputRange = InputRange;
|
|
339
|
-
ProFormForward.ProRangeBox = ProRangeBox;
|
|
340
|
-
ProFormForward.ProCertValidity = ProCertValidity;
|
|
341
|
-
ProFormForward.ProCertNo = ProCertNo;
|
|
342
|
-
ProFormForward.transferAddressInfoToRegion = transferAddressInfoToRegion;
|
|
343
315
|
export default ProFormForward;
|
|
@@ -46,6 +46,7 @@ export interface ProFormOtherType {
|
|
|
46
46
|
formDisabled?: boolean;
|
|
47
47
|
isDiffChange?: boolean;
|
|
48
48
|
diffConfig?: DiffConfigType;
|
|
49
|
+
shouldUpdateDebounce?: number;
|
|
49
50
|
}
|
|
50
51
|
export interface DiffConfigType<Values = any> {
|
|
51
52
|
/** 比对原始数据源 */
|
|
@@ -100,6 +101,8 @@ export interface ProFormType<Values = any> extends FormProps<Values> {
|
|
|
100
101
|
optimize?: boolean;
|
|
101
102
|
/** 是否在遇到第一个错误时停止验证 */
|
|
102
103
|
stopOnFirstError?: boolean;
|
|
104
|
+
/** shouldUpdate防抖延迟时间,默认500ms,设置为0则不防抖 */
|
|
105
|
+
shouldUpdateDebounce?: number;
|
|
103
106
|
}
|
|
104
107
|
export interface TransformType<T = any> {
|
|
105
108
|
normalize?: (value: StoreValue, prevValue: StoreValue, allValues: Store) => StoreValue;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
@root-entry-name: 'default';
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
1
|
@import '../components/base/SwitchCheckbox/style/index.less';
|
|
2
|
+
@import '../components/base/TimePicker/style/index.less';
|
|
4
3
|
@import '../components/base/TextArea/index.less';
|
|
5
4
|
@import '../components/combination/FormList/style/index.less';
|
|
6
5
|
@import '../components/combination/ProTimeLimit/style/index.less';
|
|
@@ -9,8 +8,6 @@
|
|
|
9
8
|
@import '../components/combination/ProModalSelect/style/index.less';
|
|
10
9
|
@import '../components/combination/Group/style/index.less';
|
|
11
10
|
@import '../components/combination/Container/style/index.less';
|
|
12
|
-
@import '../components/old/EnumSelect/style/index.less';
|
|
13
|
-
@import '../components/old/EnumSelect/style/index.less';
|
|
14
11
|
|
|
15
12
|
.pro-form {
|
|
16
13
|
&.@{ant-prefix}-form-vertical {
|
|
@@ -106,7 +103,6 @@
|
|
|
106
103
|
}
|
|
107
104
|
|
|
108
105
|
.@{ant-prefix}-form-item {
|
|
109
|
-
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1)) !important;
|
|
110
106
|
|
|
111
107
|
&.pro-form-item-width-auto {
|
|
112
108
|
.@{ant-prefix}-form-item-control-input {
|
|
@@ -137,13 +133,6 @@
|
|
|
137
133
|
display: none;
|
|
138
134
|
}
|
|
139
135
|
|
|
140
|
-
.@{ant-prefix}-form-item-explain {
|
|
141
|
-
height: auto;
|
|
142
|
-
|
|
143
|
-
.@{ant-prefix}-form-item-explain-error {
|
|
144
|
-
font-size: var(--zaui-font-size, 14px);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
136
|
|
|
148
137
|
.@{ant-prefix}-input-number {
|
|
149
138
|
width: 100%;
|
|
@@ -186,8 +175,8 @@
|
|
|
186
175
|
|
|
187
176
|
.@{ant-prefix}-form-item-has-error {
|
|
188
177
|
.group-separator {
|
|
189
|
-
color:
|
|
190
|
-
border-color:
|
|
178
|
+
color: #ff4d4f;
|
|
179
|
+
border-color: #ff4d4f;
|
|
191
180
|
}
|
|
192
181
|
|
|
193
182
|
.site-input-split {
|
|
@@ -318,8 +307,7 @@
|
|
|
318
307
|
width: 18px;
|
|
319
308
|
}
|
|
320
309
|
.pro-form-list-tool-btn {
|
|
321
|
-
|
|
322
|
-
padding: 0;
|
|
310
|
+
padding: 0 4px;
|
|
323
311
|
cursor: pointer;
|
|
324
312
|
.anticon {
|
|
325
313
|
color: var(--zaui-text-weak, #a0a0a0);
|
|
@@ -61,7 +61,6 @@ export declare function initialValuesToNames(values: AnyObject, columns: AnyObje
|
|
|
61
61
|
* @returns ['group-7x19no', 0, 'abc'] =>['group-7x19no', 0]
|
|
62
62
|
*/
|
|
63
63
|
export declare function getArrayBeforeNumber(arr: (string | number)[]): (string | number)[];
|
|
64
|
-
export declare const customEqualForFun: (value: any, other: any) => boolean;
|
|
65
64
|
/**
|
|
66
65
|
* 查询数据中是否包含rowKey
|
|
67
66
|
*/
|
|
@@ -102,4 +101,19 @@ export declare const parseNamePath: (input: string) => any;
|
|
|
102
101
|
*/
|
|
103
102
|
export declare const getFormFieldPaths: (form: FormInstance) => any[];
|
|
104
103
|
export declare function findNamesKeyInArray(arr: string[], key: string): string | null;
|
|
104
|
+
type DataItem = (string | number)[];
|
|
105
|
+
/**
|
|
106
|
+
* 根据特定规则合并两个数据源 (TypeScript 版本)
|
|
107
|
+
* @param data1 第一个数据源
|
|
108
|
+
* @param data2 第二个数据源
|
|
109
|
+
* @returns 合并后的结果数组
|
|
110
|
+
*/
|
|
111
|
+
export declare const mergeNames: (data1: DataItem[], data2: DataItem[]) => DataItem[];
|
|
112
|
+
/**
|
|
113
|
+
* 是否 formlist或者pro-edit-table 场景
|
|
114
|
+
* 使用正则表达式判断一个由逗号分隔的字符串中,是否包含一个纯数字的片段。
|
|
115
|
+
* @param {string} str - 输入的字符串。
|
|
116
|
+
* @returns {boolean} - 如果匹配成功,返回 true;否则返回 false。
|
|
117
|
+
*/
|
|
118
|
+
export declare const isListForm: (str: string) => boolean;
|
|
105
119
|
export {};
|