@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,11 +1,10 @@
|
|
|
1
|
-
import "antd/es/date-picker/style";
|
|
2
|
-
import _DatePicker from "antd/es/date-picker";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
3
|
var _excluded = ["className", "format"];
|
|
4
|
+
import { DatePicker as AntDatePicker } from 'antd';
|
|
6
5
|
import { isFunction, isString, isObject, omit } from 'lodash';
|
|
7
6
|
import classNames from 'classnames';
|
|
8
|
-
import
|
|
7
|
+
import dayjs from 'dayjs';
|
|
9
8
|
import React from 'react';
|
|
10
9
|
import { useProConfig } from "../../../../ProConfigProvider";
|
|
11
10
|
import ProForm from "../../../../ProForm";
|
|
@@ -34,11 +33,12 @@ var DatePicker = props => {
|
|
|
34
33
|
if (!value) {
|
|
35
34
|
viewChildren = null;
|
|
36
35
|
} else if (typeof format === 'string' && isObject(value)) {
|
|
37
|
-
|
|
36
|
+
var _format, _ref2;
|
|
37
|
+
viewChildren = ((_format = (_ref2 = value).format) === null || _format === void 0 ? void 0 : _format.call(_ref2, format)) || value;
|
|
38
38
|
} else if (isFunction(format)) {
|
|
39
39
|
viewChildren = format(value);
|
|
40
40
|
} else if (isString(value)) {
|
|
41
|
-
viewChildren =
|
|
41
|
+
viewChildren = dayjs(value).format(format);
|
|
42
42
|
}
|
|
43
43
|
return /*#__PURE__*/_jsx(Container, {
|
|
44
44
|
viewEmpty: viewEmpty,
|
|
@@ -60,9 +60,9 @@ var DatePicker = props => {
|
|
|
60
60
|
|
|
61
61
|
// 字符串时间格式兼容
|
|
62
62
|
if (isString(restProps.value)) {
|
|
63
|
-
restProps.value =
|
|
63
|
+
restProps.value = dayjs(restProps.value);
|
|
64
64
|
}
|
|
65
|
-
return /*#__PURE__*/_jsx(
|
|
65
|
+
return /*#__PURE__*/_jsx(AntDatePicker, _objectSpread(_objectSpread(_objectSpread({}, initialConfig), {}, {
|
|
66
66
|
format: nextFormat
|
|
67
67
|
}, omit(restProps, ['otherProps'])), {}, {
|
|
68
68
|
className: nextClassName
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
export var useDateLimit = () => {
|
|
4
|
+
var _useState = useState(),
|
|
5
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
6
|
+
dates = _useState2[0],
|
|
7
|
+
setDates = _useState2[1];
|
|
8
|
+
return {
|
|
9
|
+
onCalendarChange: val => setDates(val)
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import "antd/es/input/style";
|
|
3
|
-
import _Input from "antd/es/input";
|
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
3
|
var _excluded = ["label", "form", "placeholder", "fieldName", "otherProps", "desensitization"];
|
|
6
4
|
import React from 'react';
|
|
5
|
+
import { Input as AntInput } from 'antd';
|
|
7
6
|
import { isFunction, omit } from 'lodash';
|
|
8
7
|
import { useProConfig } from "../../../../ProConfigProvider";
|
|
9
8
|
import Container from "../../Container";
|
|
@@ -27,11 +26,15 @@ var Input = function Input(props) {
|
|
|
27
26
|
viewEmpty = _ref.viewEmpty;
|
|
28
27
|
var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
|
|
29
28
|
var initialConfig = useProConfig('Input');
|
|
29
|
+
if (typeof rest.value === 'number') {
|
|
30
|
+
var _rest$value, _rest$value$toString;
|
|
31
|
+
rest.value = rest === null || rest === void 0 || (_rest$value = rest.value) === null || _rest$value === void 0 || (_rest$value$toString = _rest$value.toString) === null || _rest$value$toString === void 0 ? void 0 : _rest$value$toString.call(_rest$value);
|
|
32
|
+
}
|
|
30
33
|
if (isView) {
|
|
31
34
|
if ((Array.isArray(desensitization) || isFunction(desensitization)) && props !== null && props !== void 0 && props.disabled) {
|
|
32
35
|
if (typeof rest.value === 'number') {
|
|
33
|
-
var _rest$
|
|
34
|
-
rest.value = rest === null || rest === void 0 || (_rest$
|
|
36
|
+
var _rest$value2, _rest$value2$toString;
|
|
37
|
+
rest.value = rest === null || rest === void 0 || (_rest$value2 = rest.value) === null || _rest$value2 === void 0 || (_rest$value2$toString = _rest$value2.toString) === null || _rest$value2$toString === void 0 ? void 0 : _rest$value2$toString.call(_rest$value2);
|
|
35
38
|
}
|
|
36
39
|
return /*#__PURE__*/_jsx(Container, {
|
|
37
40
|
viewEmpty: viewEmpty,
|
|
@@ -43,8 +46,7 @@ var Input = function Input(props) {
|
|
|
43
46
|
children: rest.value
|
|
44
47
|
});
|
|
45
48
|
}
|
|
46
|
-
var ComInput = /*#__PURE__*/_jsx(
|
|
47
|
-
allowClear: true,
|
|
49
|
+
var ComInput = /*#__PURE__*/_jsx(AntInput, _objectSpread(_objectSpread({
|
|
48
50
|
autoComplete: "off",
|
|
49
51
|
placeholder: placeholder || `${locale.ProForm.inputPlaceholder}`
|
|
50
52
|
}, omit(initialConfig, ['trim', 'upperCase'])), rest));
|
|
@@ -52,8 +54,8 @@ var Input = function Input(props) {
|
|
|
52
54
|
// 仅查看模式下进行数据脱敏
|
|
53
55
|
if ((Array.isArray(desensitization) || isFunction(desensitization)) && props !== null && props !== void 0 && props.disabled) {
|
|
54
56
|
if (typeof rest.value === 'number') {
|
|
55
|
-
var _rest$
|
|
56
|
-
rest.value = rest === null || rest === void 0 || (_rest$
|
|
57
|
+
var _rest$value3, _rest$value3$toString;
|
|
58
|
+
rest.value = rest === null || rest === void 0 || (_rest$value3 = rest.value) === null || _rest$value3 === void 0 || (_rest$value3$toString = _rest$value3.toString) === null || _rest$value3$toString === void 0 ? void 0 : _rest$value3$toString.call(_rest$value3);
|
|
57
59
|
}
|
|
58
60
|
return /*#__PURE__*/React.cloneElement(ComInput, _objectSpread(_objectSpread(_objectSpread({
|
|
59
61
|
allowClear: true,
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import "antd/es/input-number/style";
|
|
3
|
-
import _InputNumber from "antd/es/input-number";
|
|
4
|
-
import "antd/es/space/style";
|
|
5
|
-
import _Space from "antd/es/space";
|
|
6
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
7
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
8
4
|
var _excluded = ["placeholder", "className", "otherProps", "range", "min", "max", "onBlur", "onFocus"];
|
|
9
5
|
import React, { useMemo, useRef } from 'react';
|
|
6
|
+
import { InputNumber as AntInputNumber, Space } from 'antd';
|
|
10
7
|
import classNames from 'classnames';
|
|
11
8
|
import Big from 'big.js';
|
|
12
9
|
import { tools } from '@zat-design/utils';
|
|
@@ -231,7 +228,7 @@ var InputNumber = props => {
|
|
|
231
228
|
case 'thousandthCNY':
|
|
232
229
|
return /*#__PURE__*/_jsx(Container, {
|
|
233
230
|
viewEmpty: viewEmpty,
|
|
234
|
-
children: /*#__PURE__*/_jsxs(
|
|
231
|
+
children: /*#__PURE__*/_jsxs(Space, {
|
|
235
232
|
size: 4,
|
|
236
233
|
children: [_value || _value === 0 ? 'CNY' : '', tools.formatAmount(_value, precision)]
|
|
237
234
|
})
|
|
@@ -289,7 +286,7 @@ var InputNumber = props => {
|
|
|
289
286
|
activateRef.current = true;
|
|
290
287
|
onFocus === null || onFocus === void 0 || onFocus(e);
|
|
291
288
|
};
|
|
292
|
-
return /*#__PURE__*/_jsx(
|
|
289
|
+
return /*#__PURE__*/_jsx(AntInputNumber, _objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
293
290
|
autoComplete: "off",
|
|
294
291
|
placeholder: placeholder || `${locale.ProForm.inputPlaceholder}${label !== null && label !== void 0 ? label : ''}`,
|
|
295
292
|
className: _className
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import "antd/es/radio/style";
|
|
3
|
-
import _Radio from "antd/es/radio";
|
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
3
|
var _excluded = ["dataSource", "fieldNames", "onChange", "value", "otherProps"];
|
|
4
|
+
import { Radio as AntRadio } from 'antd';
|
|
6
5
|
import React from 'react';
|
|
7
6
|
import { useProConfig } from "../../../../ProConfigProvider";
|
|
8
7
|
import Container from "../../Container";
|
|
@@ -51,13 +50,13 @@ var Radio = props => {
|
|
|
51
50
|
};
|
|
52
51
|
}
|
|
53
52
|
}
|
|
54
|
-
return /*#__PURE__*/_jsx(
|
|
53
|
+
return /*#__PURE__*/_jsx(AntRadio.Group, _objectSpread(_objectSpread({}, rest), {}, {
|
|
55
54
|
value: value,
|
|
56
55
|
onChange: e => {
|
|
57
56
|
_onChange(e, e.target.value);
|
|
58
57
|
},
|
|
59
58
|
children: !!(dataSource !== null && dataSource !== void 0 && dataSource.length) && dataSource.map(radioItem => {
|
|
60
|
-
return /*#__PURE__*/_jsx(
|
|
59
|
+
return /*#__PURE__*/_jsx(AntRadio, {
|
|
61
60
|
value: radioItem[_fieldNames.value],
|
|
62
61
|
children: radioItem[_fieldNames.label]
|
|
63
62
|
}, radioItem[_fieldNames.value]);
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
import "antd/es/date-picker/style";
|
|
4
|
-
import _DatePicker from "antd/es/date-picker"; // @ts-check
|
|
5
3
|
var _excluded = ["format", "otherProps", "separator", "range"];
|
|
4
|
+
// @ts-check
|
|
5
|
+
import { DatePicker } from 'antd';
|
|
6
6
|
import { isFunction, isObject, isString, omit, uniq } from 'lodash';
|
|
7
|
-
import
|
|
7
|
+
import dayjs from 'dayjs';
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { useProConfig } from "../../../../ProConfigProvider";
|
|
10
10
|
import ProForm from "../../../../ProForm";
|
|
11
11
|
import Container from "../../Container";
|
|
12
12
|
import { useDateRange } from "./useDateRange";
|
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
var AntRangePicker =
|
|
14
|
+
var AntRangePicker = DatePicker.RangePicker;
|
|
15
15
|
var RangePicker = props => {
|
|
16
16
|
var _props$format = props.format,
|
|
17
17
|
format = _props$format === void 0 ? 'YYYY-MM-DD' : _props$format,
|
|
@@ -46,7 +46,7 @@ var RangePicker = props => {
|
|
|
46
46
|
|
|
47
47
|
// 字符串时间格式兼容
|
|
48
48
|
if (Array.isArray(_rest.value) && isString(_rest.value[0]) && isString(_rest.value[1])) {
|
|
49
|
-
_rest.value = [
|
|
49
|
+
_rest.value = [dayjs(_rest.value[0]), dayjs(_rest.value[1])];
|
|
50
50
|
}
|
|
51
51
|
var _viewFormat = Array.isArray(format) ? format[0] : format;
|
|
52
52
|
var tempFormat = Array.isArray(format) ? format : [format];
|
|
@@ -65,10 +65,11 @@ var RangePicker = props => {
|
|
|
65
65
|
viewChildren = null;
|
|
66
66
|
} else if (Array.isArray(format)) {
|
|
67
67
|
var formattedList = format.map((formatItem, index) => {
|
|
68
|
+
var _format2, _ref2;
|
|
68
69
|
if (isFunction(formatItem)) {
|
|
69
70
|
return formatItem(value[index]);
|
|
70
71
|
}
|
|
71
|
-
return value[index].format(formatItem);
|
|
72
|
+
return ((_format2 = (_ref2 = value[index]).format) === null || _format2 === void 0 ? void 0 : _format2.call(_ref2, formatItem)) || value[index];
|
|
72
73
|
});
|
|
73
74
|
viewChildren = formattedList.join(separator);
|
|
74
75
|
} else if (isFunction(format)) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Dayjs } from 'dayjs';
|
|
2
2
|
type unitOfTime = 'year' | 'years' | 'y' | 'month' | 'months' | 'M' | 'week' | 'weeks' | 'w' | 'day' | 'days' | 'd';
|
|
3
3
|
export interface Props {
|
|
4
|
-
value?: [
|
|
4
|
+
value?: [Dayjs?, Dayjs?];
|
|
5
5
|
range: [number, unitOfTime];
|
|
6
|
-
disabledDate?: (date:
|
|
6
|
+
disabledDate?: (date: Dayjs) => boolean;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* 支持传入时间范围作为起止期的间隔时间
|
|
10
10
|
*/
|
|
11
11
|
export declare const useDateRange: (props: Props) => {
|
|
12
|
-
onCalendarChange: (val?: [
|
|
13
|
-
disabledDate: (current:
|
|
12
|
+
onCalendarChange: (val?: [Dayjs?, Dayjs?]) => void;
|
|
13
|
+
disabledDate: (current: Dayjs) => boolean;
|
|
14
14
|
};
|
|
15
15
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import "antd/es/select/style";
|
|
3
|
-
import _Select from "antd/es/select";
|
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
3
|
var _excluded = ["dataSource", "fieldNames", "otherProps", "scrollFollowParent"];
|
|
4
|
+
import { Select as AntSelect } from 'antd';
|
|
6
5
|
import React from 'react';
|
|
7
6
|
import { isNumber } from 'lodash';
|
|
8
7
|
import Container from "../../Container";
|
|
@@ -51,7 +50,7 @@ var Select = props => {
|
|
|
51
50
|
children: value || isNumber(value) ? transToLabel([value]) : null
|
|
52
51
|
});
|
|
53
52
|
}
|
|
54
|
-
return /*#__PURE__*/_jsx(
|
|
53
|
+
return /*#__PURE__*/_jsx(AntSelect, _objectSpread(_objectSpread(_objectSpread({
|
|
55
54
|
placeholder: `${locale.ProForm.selectPlaceHolder}`,
|
|
56
55
|
allowClear: true,
|
|
57
56
|
getPopupContainer: trigger => {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import "antd/es/switch/style";
|
|
3
|
-
import _Switch from "antd/es/switch";
|
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
3
|
var _excluded = ["disabled", "otherProps"];
|
|
4
|
+
import { Switch as AntSwitch } from 'antd';
|
|
6
5
|
import React from 'react';
|
|
7
6
|
import { isNull, isUndefined } from 'lodash';
|
|
8
7
|
import { useProConfig } from "../../../../ProConfigProvider";
|
|
@@ -32,7 +31,7 @@ var Switch = props => {
|
|
|
32
31
|
children: res.checked === true ? `${locale.ProForm.switchText[0]}` : `${locale.ProForm.switchText[1]}`
|
|
33
32
|
});
|
|
34
33
|
}
|
|
35
|
-
return /*#__PURE__*/_jsx(
|
|
34
|
+
return /*#__PURE__*/_jsx(AntSwitch, _objectSpread(_objectSpread(_objectSpread({
|
|
36
35
|
disabled: disabled,
|
|
37
36
|
checkedChildren: `${locale.ProForm.switchText[0]}`,
|
|
38
37
|
unCheckedChildren: `${locale.ProForm.switchText[1]}`
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import "antd/es/checkbox/style";
|
|
3
|
-
import _Checkbox from "antd/es/checkbox";
|
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
3
|
var _excluded = ["onChange", "disabled", "value", "otherProps", "className"];
|
|
6
4
|
import * as React from 'react';
|
|
5
|
+
import { Checkbox } from 'antd';
|
|
7
6
|
import { isNull, isUndefined } from 'lodash';
|
|
8
7
|
import classnames from 'classnames';
|
|
9
8
|
import { useProConfig } from "../../../../ProConfigProvider";
|
|
@@ -55,7 +54,7 @@ var SwitchCheckbox = props => {
|
|
|
55
54
|
'pro-switch-checkbox': true,
|
|
56
55
|
className
|
|
57
56
|
});
|
|
58
|
-
return /*#__PURE__*/_jsx(
|
|
57
|
+
return /*#__PURE__*/_jsx(Checkbox, _objectSpread(_objectSpread(_objectSpread({
|
|
59
58
|
disabled: disabled,
|
|
60
59
|
onChange: changeVal,
|
|
61
60
|
className: classNames
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
import "antd/es/input/style";
|
|
4
|
-
import _Input from "antd/es/input";
|
|
5
3
|
var _excluded = ["placeholder", "otherProps", "className", "tooltip"];
|
|
4
|
+
import { Input } from 'antd';
|
|
6
5
|
import { omit } from 'lodash';
|
|
7
6
|
import React from 'react';
|
|
8
7
|
import classnames from 'classnames';
|
|
@@ -12,7 +11,7 @@ import ProForm from "../../../../ProForm";
|
|
|
12
11
|
import Container from "../../Container";
|
|
13
12
|
import "./index.less";
|
|
14
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
var TextArea =
|
|
14
|
+
var TextArea = Input.TextArea;
|
|
16
15
|
var TextAreaDef = props => {
|
|
17
16
|
var _props$style;
|
|
18
17
|
var placeholder = props.placeholder,
|
|
@@ -38,7 +37,7 @@ var TextAreaDef = props => {
|
|
|
38
37
|
var _className = classnames({
|
|
39
38
|
'pro-textarea': true,
|
|
40
39
|
'pro-textarea-view': isView,
|
|
41
|
-
[className]:
|
|
40
|
+
[className]: className
|
|
42
41
|
});
|
|
43
42
|
return /*#__PURE__*/_jsx(TextArea, _objectSpread(_objectSpread(_objectSpread({
|
|
44
43
|
showCount: true,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@root-entry-name: 'default';
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
1
|
|
|
4
2
|
div.pro-textarea-view {
|
|
5
3
|
.@{ant-prefix}-input-disabled {
|
|
@@ -13,7 +11,17 @@ div.pro-textarea-view {
|
|
|
13
11
|
|
|
14
12
|
// input-textarea级联选择
|
|
15
13
|
.pro-textarea {
|
|
14
|
+
position: relative;
|
|
16
15
|
.@{ant-prefix}-input {
|
|
17
16
|
resize: auto !important;
|
|
17
|
+
padding-bottom: 20px;
|
|
18
|
+
}
|
|
19
|
+
.@{ant-prefix}-input-suffix {
|
|
20
|
+
position: absolute;
|
|
21
|
+
right: 16px;
|
|
22
|
+
bottom: 22px;
|
|
23
|
+
// width: calc(100% - 18px);
|
|
24
|
+
text-align: right;
|
|
25
|
+
background: rgba(255, 255, 255, 0.6);
|
|
18
26
|
}
|
|
19
27
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { TimePickerProps } from 'antd
|
|
2
|
+
import type { TimePickerProps } from 'antd';
|
|
3
3
|
import type { ProFormOtherType } from '../../../propsType';
|
|
4
|
-
import './style/index.less';
|
|
5
4
|
export interface Props {
|
|
6
5
|
valueType?: string;
|
|
7
6
|
format?: string;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import "antd/es/time-picker/style";
|
|
3
|
-
import _TimePicker from "antd/es/time-picker";
|
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
3
|
var _excluded = ["format", "onChange", "value", "otherProps"];
|
|
6
4
|
import React from 'react';
|
|
7
|
-
import
|
|
5
|
+
import { DatePicker } from 'antd';
|
|
6
|
+
import dayjs from 'dayjs';
|
|
8
7
|
import { useProConfig } from "../../../../ProConfigProvider";
|
|
9
8
|
import Container from "../../Container";
|
|
10
9
|
import ProForm from "../../../../ProForm";
|
|
11
|
-
import "./style/index.less";
|
|
12
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
+
var AntTimePicker = DatePicker.TimePicker;
|
|
13
12
|
var TimePicker = props => {
|
|
14
13
|
var _props$format = props.format,
|
|
15
14
|
format = _props$format === void 0 ? 'HH:mm:ss' : _props$format,
|
|
@@ -26,7 +25,7 @@ var TimePicker = props => {
|
|
|
26
25
|
var initialConfig = useProConfig('AntTimePicker');
|
|
27
26
|
var handleChange = value => {
|
|
28
27
|
if (valueType === 'dateTime') {
|
|
29
|
-
onChange && onChange(value ?
|
|
28
|
+
onChange && onChange(value ? dayjs(value).format(format) : undefined);
|
|
30
29
|
}
|
|
31
30
|
};
|
|
32
31
|
if (isView) {
|
|
@@ -35,8 +34,8 @@ var TimePicker = props => {
|
|
|
35
34
|
children: value
|
|
36
35
|
});
|
|
37
36
|
}
|
|
38
|
-
return /*#__PURE__*/_jsx(
|
|
39
|
-
value: value ?
|
|
37
|
+
return /*#__PURE__*/_jsx(AntTimePicker, _objectSpread(_objectSpread(_objectSpread({
|
|
38
|
+
value: value ? dayjs(value, format) : undefined
|
|
40
39
|
}, initialConfig), rest), {}, {
|
|
41
40
|
format: format,
|
|
42
41
|
onChange: handleChange
|
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
import "antd/es/space/style";
|
|
2
|
-
import _Space from "antd/es/space";
|
|
3
|
-
import "antd/es/popconfirm/style";
|
|
4
|
-
import _Popconfirm from "antd/es/popconfirm";
|
|
5
|
-
import "antd/es/button/style";
|
|
6
|
-
import _Button from "antd/es/button";
|
|
7
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
8
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
9
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
10
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
11
5
|
var _excluded = ["label", "onClick", "onHandle", "type", "needConfirm", "confirmProps", "title"],
|
|
12
6
|
_excluded2 = ["onClick", "label"];
|
|
7
|
+
import { Button, Popconfirm, Space } from 'antd';
|
|
13
8
|
import { isFunction, omit } from 'lodash';
|
|
9
|
+
import classNames from 'classnames';
|
|
14
10
|
import React, { useMemo } from 'react';
|
|
15
11
|
import { CopyOutlined, PlusSquareOutlined, ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons';
|
|
16
12
|
import ProIcon from "../../../../../ProIcon";
|
|
@@ -190,7 +186,7 @@ var ActionButton = props => {
|
|
|
190
186
|
// 整体隐藏首尾 ActionButton
|
|
191
187
|
if (hideStartEndActionProps !== null && hideStartEndActionProps !== void 0 && hideStartEndActionProps[0] && index === 0) return null;
|
|
192
188
|
if (hideStartEndActionProps !== null && hideStartEndActionProps !== void 0 && hideStartEndActionProps[1] && index === fields.length - 1) return null;
|
|
193
|
-
return /*#__PURE__*/_jsx(
|
|
189
|
+
return /*#__PURE__*/_jsx(Space, {
|
|
194
190
|
align: "start",
|
|
195
191
|
className: "pro-form-list-action",
|
|
196
192
|
children: actionProps === null || actionProps === void 0 ? void 0 : actionProps.map(item => {
|
|
@@ -306,7 +302,7 @@ var ActionButton = props => {
|
|
|
306
302
|
return _ref7.apply(this, arguments);
|
|
307
303
|
};
|
|
308
304
|
}();
|
|
309
|
-
return _needConfirm ? /*#__PURE__*/_jsx(
|
|
305
|
+
return _needConfirm ? /*#__PURE__*/_jsx(Popconfirm, _objectSpread(_objectSpread({
|
|
310
306
|
title: title !== null && title !== void 0 ? title : `${locale.ProForm.formListConfirmMessage}`,
|
|
311
307
|
onCancel: e => e.stopPropagation(),
|
|
312
308
|
onConfirm: e => {
|
|
@@ -317,12 +313,18 @@ var ActionButton = props => {
|
|
|
317
313
|
}
|
|
318
314
|
}
|
|
319
315
|
}, _confirmProps), {}, {
|
|
320
|
-
children: /*#__PURE__*/_jsx(
|
|
316
|
+
children: /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread(_objectSpread({}, defaultRest), omit(rest, filterKeys)), {}, {
|
|
321
317
|
type: "text",
|
|
322
318
|
onClick: e => e.stopPropagation(),
|
|
323
319
|
children: label || defaultLabel
|
|
324
320
|
}))
|
|
325
|
-
}), `${item === null || item === void 0 ? void 0 : item.type}${index}`) : /*#__PURE__*/_jsx(
|
|
321
|
+
}), `${item === null || item === void 0 ? void 0 : item.type}${index}`) : /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread(_objectSpread({
|
|
322
|
+
className: classNames({
|
|
323
|
+
'pro-form-list-tool-btn': mode === 'line',
|
|
324
|
+
'pro-form-list-tool-btn-block': mode === 'block',
|
|
325
|
+
'pro-form-list-tool-btn-less': mode === 'less'
|
|
326
|
+
})
|
|
327
|
+
}, defaultRest), omit(rest, filterKeys)), {}, {
|
|
326
328
|
type: "text",
|
|
327
329
|
onClick: e => {
|
|
328
330
|
e.stopPropagation();
|
|
@@ -335,17 +337,17 @@ var ActionButton = props => {
|
|
|
335
337
|
children: label || defaultLabel
|
|
336
338
|
}), `${item === null || item === void 0 ? void 0 : item.type}${index}`);
|
|
337
339
|
}
|
|
338
|
-
return needConfirm ? /*#__PURE__*/_jsx(
|
|
340
|
+
return needConfirm ? /*#__PURE__*/_jsx(Popconfirm, _objectSpread(_objectSpread({
|
|
339
341
|
title: title !== null && title !== void 0 ? title : `${locale.ProForm.formListConfirmMessage}`,
|
|
340
342
|
onCancel: e => e.stopPropagation(),
|
|
341
343
|
onConfirm: () => customClick(_onClick, index)
|
|
342
344
|
}, _confirmProps), {}, {
|
|
343
|
-
children: /*#__PURE__*/_jsx(
|
|
345
|
+
children: /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, omit(rest, filterKeys)), {}, {
|
|
344
346
|
type: "text",
|
|
345
347
|
onClick: e => e.stopPropagation(),
|
|
346
348
|
children: label
|
|
347
349
|
}))
|
|
348
|
-
}), `${item === null || item === void 0 ? void 0 : item.type}${index}`) : /*#__PURE__*/_createElement(
|
|
350
|
+
}), `${item === null || item === void 0 ? void 0 : item.type}${index}`) : /*#__PURE__*/_createElement(Button, _objectSpread(_objectSpread({}, omit(rest, filterKeys)), {}, {
|
|
349
351
|
key: `${item === null || item === void 0 ? void 0 : item.type}${index}`,
|
|
350
352
|
type: "text",
|
|
351
353
|
onClick: e => {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import _Space from "antd/es/space";
|
|
3
|
-
import "antd/es/row/style";
|
|
4
|
-
import _Row from "antd/es/row";
|
|
1
|
+
import { Row, Space } from 'antd';
|
|
5
2
|
import React, { useMemo } from 'react';
|
|
6
3
|
import { isFunction } from 'lodash';
|
|
7
4
|
import classNames from 'classnames';
|
|
@@ -49,7 +46,7 @@ var BlockFields = props => {
|
|
|
49
46
|
|
|
50
47
|
// 左侧标题布局
|
|
51
48
|
if (titlePosition === 'left') {
|
|
52
|
-
return /*#__PURE__*/_jsx(
|
|
49
|
+
return /*#__PURE__*/_jsx(Space, {
|
|
53
50
|
direction: "vertical",
|
|
54
51
|
className: cls,
|
|
55
52
|
id: id,
|
|
@@ -82,7 +79,7 @@ var BlockFields = props => {
|
|
|
82
79
|
isView: isView,
|
|
83
80
|
hideStartEndActionProps: hideStartEndActionProps
|
|
84
81
|
}),
|
|
85
|
-
children: /*#__PURE__*/_jsx(
|
|
82
|
+
children: /*#__PURE__*/_jsx(Row, {
|
|
86
83
|
gutter: 24,
|
|
87
84
|
children: /*#__PURE__*/_jsx(MemoRenderFields, {
|
|
88
85
|
columns: columns,
|
|
@@ -100,7 +97,7 @@ var BlockFields = props => {
|
|
|
100
97
|
}
|
|
101
98
|
|
|
102
99
|
// 默认顶部标题布局
|
|
103
|
-
return /*#__PURE__*/_jsx(
|
|
100
|
+
return /*#__PURE__*/_jsx(Space, {
|
|
104
101
|
direction: "vertical",
|
|
105
102
|
className: cls,
|
|
106
103
|
id: id,
|
|
@@ -126,7 +123,7 @@ var BlockFields = props => {
|
|
|
126
123
|
isView: isView,
|
|
127
124
|
hideStartEndActionProps: hideStartEndActionProps
|
|
128
125
|
}),
|
|
129
|
-
children: /*#__PURE__*/_jsx(
|
|
126
|
+
children: /*#__PURE__*/_jsx(Row, {
|
|
130
127
|
gutter: 24,
|
|
131
128
|
children: /*#__PURE__*/_jsx(MemoRenderFields, {
|
|
132
129
|
columns: columns,
|
|
@@ -1,7 +1,6 @@
|
|
|
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";
|
|
3
|
+
import { Button } from 'antd';
|
|
5
4
|
import { isFunction } from 'lodash';
|
|
6
5
|
import EmptyImg from "../../../../../assets/empty.png";
|
|
7
6
|
import locale from "../../../../../locale";
|
|
@@ -83,7 +82,7 @@ var Empty = _ref => {
|
|
|
83
82
|
className: "pro-form-list-empty-content",
|
|
84
83
|
children: disabled || !show ? locale.ProForm.noData : /*#__PURE__*/_jsxs(_Fragment, {
|
|
85
84
|
children: [locale.ProForm.noData, !disabled && /*#__PURE__*/_jsxs(_Fragment, {
|
|
86
|
-
children: ["\uFF0C", /*#__PURE__*/_jsx(
|
|
85
|
+
children: ["\uFF0C", /*#__PURE__*/_jsx(Button, {
|
|
87
86
|
type: "link",
|
|
88
87
|
onClick: handleAddClick,
|
|
89
88
|
style: {
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "antd/es/row/style";
|
|
2
|
-
import _Row from "antd/es/row";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import { Row } from 'antd';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import classNames from 'classnames';
|
|
6
5
|
import { useSortable } from '@dnd-kit/sortable';
|
|
@@ -67,7 +66,7 @@ var LineFields = props => {
|
|
|
67
66
|
type: "drag",
|
|
68
67
|
buttonIcon: false
|
|
69
68
|
})
|
|
70
|
-
})), /*#__PURE__*/_jsx(
|
|
69
|
+
})), /*#__PURE__*/_jsx(Row, {
|
|
71
70
|
gutter: isLess ? 0 : 24,
|
|
72
71
|
children: /*#__PURE__*/_jsx(MemoRenderFields, {
|
|
73
72
|
columns: columns,
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import "antd/es/space/style";
|
|
2
|
-
import _Space from "antd/es/space";
|
|
3
|
-
import "antd/es/button/style";
|
|
4
|
-
import _Button from "antd/es/button";
|
|
5
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
2
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
7
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
8
4
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
9
|
-
/* eslint-disable react/no-array-index-key */
|
|
10
5
|
var _excluded = ["label", "onClick", "onHandle", "type"],
|
|
11
6
|
_excluded2 = ["onClick", "label"];
|
|
7
|
+
/* eslint-disable react/no-array-index-key */
|
|
8
|
+
import { Space, Button } from 'antd';
|
|
12
9
|
import { PlusOutlined } from '@ant-design/icons';
|
|
13
10
|
import { isFunction, omit } from 'lodash';
|
|
14
11
|
import React, { useMemo } from 'react';
|
|
@@ -132,7 +129,7 @@ var ToolbarButton = props => {
|
|
|
132
129
|
index: 0
|
|
133
130
|
});
|
|
134
131
|
};
|
|
135
|
-
return /*#__PURE__*/_jsx(
|
|
132
|
+
return /*#__PURE__*/_jsx(Space, {
|
|
136
133
|
align: "start",
|
|
137
134
|
className: "pro-form-list-toolbar",
|
|
138
135
|
children: toolbarProps === null || toolbarProps === void 0 ? void 0 : toolbarProps.map((item, index) => {
|
|
@@ -159,13 +156,13 @@ var ToolbarButton = props => {
|
|
|
159
156
|
if (max && max <= fields.length && type === 'add') {
|
|
160
157
|
return false;
|
|
161
158
|
}
|
|
162
|
-
return /*#__PURE__*/_jsx(
|
|
159
|
+
return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread(_objectSpread({}, actions[type]), omit(rest, filterKeys)), {}, {
|
|
163
160
|
type: "link",
|
|
164
161
|
onClick: () => handleClick(internalOnClick, _onClick, item),
|
|
165
162
|
children: label || defaultLabel
|
|
166
163
|
}), `${type}${index}`);
|
|
167
164
|
}
|
|
168
|
-
return /*#__PURE__*/_jsx(
|
|
165
|
+
return /*#__PURE__*/_jsx(Button, _objectSpread(_objectSpread({}, omit(rest, filterKeys)), {}, {
|
|
169
166
|
type: "link",
|
|
170
167
|
onClick: () => customClick(_onClick2, item),
|
|
171
168
|
children: label
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "antd/es/form/style";
|
|
2
|
-
import _Form from "antd/es/form";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import React, { forwardRef, useCallback, useImperativeHandle } from 'react';
|
|
3
|
+
import { Form } from 'antd';
|
|
5
4
|
import { DndContext } from '@dnd-kit/core';
|
|
6
5
|
import { get } from 'lodash';
|
|
7
6
|
import { SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
|
@@ -135,7 +134,7 @@ var FormList = (props, ref) => {
|
|
|
135
134
|
form: form,
|
|
136
135
|
namePath: _namePath,
|
|
137
136
|
emptyBtnText: emptyBtnText
|
|
138
|
-
}), /*#__PURE__*/_jsx(
|
|
137
|
+
}), /*#__PURE__*/_jsx(Form.ErrorList, {
|
|
139
138
|
errors: errors
|
|
140
139
|
}), toolbarProps !== false && _fields.length > 0 && /*#__PURE__*/_jsx(ToolbarButton, {
|
|
141
140
|
disabled: disabled,
|