@zat-design/sisyphus-react 3.13.13 → 4.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babel.config.js +34 -1
- package/dist/index.esm.css +557 -341
- package/dist/less.esm.css +527 -309
- package/es/FormsProvider/index.d.ts +4 -1
- package/es/ProAction/components/CheckModalContent/index.js +0 -8
- package/es/ProAction/index.js +45 -48
- package/es/ProAction/index.less +2 -2
- package/es/ProConfigProvider/index.d.ts +21 -4
- package/es/ProConfigProvider/index.js +51 -22
- package/es/ProDownload/index.js +62 -65
- package/es/ProDownload/style/index.less +2 -2
- package/es/ProDownload/utils.js +45 -51
- package/es/ProDrawerForm/components/ProDrawer/index.js +64 -69
- package/es/ProDrawerForm/components/ProModal/index.js +59 -67
- package/es/ProDrawerForm/index.d.ts +2 -1
- package/es/ProDrawerForm/index.js +4 -6
- package/es/ProDrawerForm/propsType.d.ts +7 -18
- package/es/ProDrawerForm/style/index.less +8 -14
- package/es/ProEditLabel/components/RenderProForm.js +2 -3
- package/es/ProEditLabel/index.js +40 -45
- package/es/ProEditLabel/propsType.d.ts +1 -6
- package/es/ProEditLabel/style/index.less +4 -3
- package/es/ProEditTable/components/ActionButton/index.js +5 -8
- package/es/ProEditTable/components/RcTable/BaseTable.js +73 -55
- package/es/ProEditTable/components/RcTable/DraggableTable.js +66 -47
- package/es/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/es/ProEditTable/components/RcTable/index.js +1 -3
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/es/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/es/ProEditTable/components/RenderField/index.js +377 -253
- package/es/ProEditTable/components/RenderToolbar/index.js +19 -19
- package/es/ProEditTable/components/Summary/index.js +5 -8
- package/es/ProEditTable/components/Validator/index.js +3 -6
- package/es/ProEditTable/index.js +128 -131
- package/es/ProEditTable/propsType.d.ts +1 -7
- package/es/ProEditTable/style/index.less +3 -7
- package/es/ProEditTable/utils/config.js +31 -35
- package/es/ProEditTable/utils/index.js +44 -41
- package/es/ProEditTable/utils/tools.js +107 -110
- package/es/ProEditTable/utils/useEditTableError.js +12 -4
- package/es/ProEnum/hooks/useEnumRequest.js +44 -47
- package/es/ProEnum/index.js +10 -17
- package/es/ProEnum/style/index.less +2 -2
- package/es/ProEnum/utils/index.d.ts +1 -0
- package/es/ProEnum/utils/index.js +2 -1
- package/es/ProForm/components/Container.d.ts +1 -0
- package/es/ProForm/components/Container.js +2 -3
- package/es/ProForm/components/FormFooter/index.js +13 -13
- package/es/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/es/ProForm/components/base/Checkbox/index.js +3 -4
- package/es/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/es/ProForm/components/base/DatePicker/index.js +7 -7
- package/es/ProForm/components/base/DatePicker/useDateLimit.d.ts +1 -7
- package/es/ProForm/components/base/DatePicker/useDateLimit.js +1 -3
- package/es/ProForm/components/base/Input/index.js +6 -13
- package/es/ProForm/components/base/InputNumber/index.js +3 -6
- package/es/ProForm/components/base/Radio/index.js +3 -4
- package/es/ProForm/components/base/RangePicker/index.js +6 -7
- package/es/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/es/ProForm/components/base/Select/index.js +2 -3
- package/es/ProForm/components/base/Switch/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/style/index.less +2 -2
- package/es/ProForm/components/base/TextArea/index.js +3 -4
- package/es/ProForm/components/base/TextArea/index.less +12 -2
- package/es/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/es/ProForm/components/base/TimePicker/index.js +6 -7
- package/es/ProForm/components/base/TimePicker/style/index.less +5 -3
- package/es/ProForm/components/combination/Container/style/index.less +2 -2
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +28 -26
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +3 -6
- package/es/ProForm/components/combination/FormList/components/Empty.js +18 -19
- package/es/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +17 -21
- package/es/ProForm/components/combination/FormList/index.js +2 -3
- package/es/ProForm/components/combination/FormList/style/index.less +38 -2
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/es/ProForm/components/combination/Group/index.d.ts +2 -8
- package/es/ProForm/components/combination/Group/index.js +12 -6
- package/es/ProForm/components/combination/Group/style/index.less +7 -87
- package/es/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/es/ProForm/components/combination/Group/utils.js +4 -5
- package/es/ProForm/components/combination/ProCascader/index.js +21 -20
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/style/index.less +2 -2
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +6 -8
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +97 -116
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +13 -14
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/es/ProForm/components/combination/ProNumberRange/index.js +17 -16
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +5 -52
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/es/ProForm/components/combination/ProRangeLimit/index.js +44 -28
- package/es/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/es/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +66 -6
- package/es/ProForm/components/index.d.ts +0 -8
- package/es/ProForm/components/index.js +1 -10
- package/es/ProForm/components/render/ChangedWrapper.js +8 -9
- package/es/ProForm/components/render/ConfirmWrapper.js +28 -29
- package/es/ProForm/components/render/Render.js +37 -40
- package/es/ProForm/components/render/propsType.d.ts +2 -6
- package/es/ProForm/index.js +9 -39
- package/es/ProForm/style/index.less +6 -16
- package/es/ProForm/utils/index.d.ts +15 -1
- package/es/ProForm/utils/index.js +63 -14
- package/es/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/es/ProForm/utils/useForm.js +84 -74
- package/es/ProForm/utils/useShouldUpdate.js +14 -14
- package/es/ProForm/utils/valueType.js +8 -8
- package/es/ProIcon/index.js +10 -13
- package/es/ProIcon/style/index.less +2 -2
- package/es/ProLayout/components/Layout/Header/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +11 -10
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +42 -39
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -4
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +12 -6
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +9 -5
- package/es/ProLayout/components/Layout/Menu/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/style/index.less +2 -2
- package/es/ProLayout/components/Layout/Notice/style/index.less +2 -2
- package/es/ProLayout/components/ProCollapse/index.js +20 -36
- package/es/ProLayout/components/ProCollapse/style/index.less +3 -3
- package/es/ProLayout/components/ProFooter/index.js +3 -4
- package/es/ProLayout/components/ProFooter/style/index.less +2 -2
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +9 -9
- package/es/ProLayout/components/ProHeader/index.js +43 -46
- package/es/ProLayout/components/ProHeader/style/index.less +2 -2
- package/es/ProLayout/index.js +7 -6
- package/es/ProLayout/style/index.less +4 -3
- package/es/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/es/ProSelect/index.js +7 -17
- package/es/ProSelect/index.less +2 -2
- package/es/ProSelect/propsType.d.ts +1 -1
- package/es/ProStep/components/Anchor/index.js +2 -3
- package/es/ProStep/components/Item/index.js +2 -1
- package/es/ProStep/components/Listener/index.js +12 -14
- package/es/ProStep/components/Step/index.js +1 -0
- package/es/ProStep/index.js +39 -47
- package/es/ProStep/style/index.less +4 -4
- package/es/ProStepTab/index.js +72 -83
- package/es/ProTable/components/FormatColumn/index.js +32 -31
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +39 -37
- package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.js +15 -18
- package/es/ProTable/components/RenderSummary/index.js +4 -5
- package/es/ProTable/components/RenderTableHeader/index.js +3 -4
- package/es/ProTable/components/RenderTabs/index.js +3 -6
- package/es/ProTable/components/TableResizable/index.js +2 -1
- package/es/ProTable/components/TooltipTitle/index.js +2 -3
- package/es/ProTable/hooks/useAntdTable.js +21 -26
- package/es/ProTable/index.js +15 -16
- package/es/ProTable/propsType.d.ts +1 -3
- package/es/ProTable/style/index.less +5 -5
- package/es/ProTabs/components/Card/index.js +5 -10
- package/es/ProTabs/index.js +2 -3
- package/es/ProTabs/style/index.less +2 -2
- package/es/ProThemeTools/component/ProTools/index.js +18 -22
- package/es/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/es/ProThemeTools/context/ThemeContext.js +120 -0
- package/es/ProThemeTools/index.d.ts +4 -1
- package/es/ProThemeTools/index.js +60 -37
- package/es/ProThemeTools/style/index.less +3 -3
- package/es/ProThemeTools/utils/index.d.ts +16 -6
- package/es/ProThemeTools/utils/index.js +28 -24
- package/es/ProTooltip/index.js +14 -9
- package/es/ProTooltip/style/index.less +2 -2
- package/es/ProTree/components/AdaptiveTooltip.js +2 -3
- package/es/ProTree/components/List.js +3 -4
- package/es/ProTree/components/ProTree.js +19 -26
- package/es/ProTree/components/ProTreeSelect/index.js +38 -37
- package/es/ProTree/components/ProTreeSelect/style/index.less +2 -2
- package/es/ProTree/components/Tree.js +18 -25
- package/es/ProTree/index.js +0 -7
- package/es/ProTree/propsType.d.ts +1 -1
- package/es/ProTree/style/index.less +10 -6
- package/es/ProTreeModal/components/Cascader.js +3 -4
- package/es/ProTreeModal/components/List.js +11 -17
- package/es/ProTreeModal/components/SortableItem.js +2 -3
- package/es/ProTreeModal/components/Tree.js +3 -4
- package/es/ProTreeModal/components/Trigger.js +6 -11
- package/es/ProTreeModal/index.d.ts +0 -1
- package/es/ProTreeModal/index.js +14 -24
- package/es/ProTreeModal/style/index.less +14 -3
- package/es/ProUpload/components/ButtonRender.js +17 -20
- package/es/ProUpload/components/DragRender.js +2 -3
- package/es/ProUpload/components/FileItem.d.ts +0 -1
- package/es/ProUpload/components/FileItem.js +15 -21
- package/es/ProUpload/components/ImageRender.js +34 -43
- package/es/ProUpload/index.js +3 -4
- package/es/ProUpload/style/index.less +173 -12
- package/es/ProViewer/index.js +38 -45
- package/es/ProViewer/style/index.less +2 -2
- package/es/ProWaterMark/index.js +2 -3
- package/es/ProWaterMark/propsType.d.ts +5 -24
- package/es/global.less +2 -1
- package/es/index.d.ts +4 -2
- package/es/index.js +2 -3
- package/es/locale/en_US.js +1 -1
- package/es/locale/index.d.ts +2 -0
- package/es/locale/index.js +11 -2
- package/es/locale/zh_CN.js +1 -1
- package/es/style/components.less +0 -3
- package/es/style/theme/antd.less +38 -48
- package/es/style/theme/base.less +89 -0
- package/es/style/theme/index.less +2 -89
- package/es/utils/index.d.ts +7 -0
- package/es/utils/index.js +23 -1
- package/lib/FormsProvider/index.d.ts +4 -1
- package/lib/ProAction/components/CheckModalContent/index.js +0 -9
- package/lib/ProAction/index.js +45 -48
- package/lib/ProAction/index.less +2 -2
- package/lib/ProConfigProvider/index.d.ts +21 -4
- package/lib/ProConfigProvider/index.js +60 -31
- package/lib/ProDownload/index.js +62 -65
- package/lib/ProDownload/style/index.less +2 -2
- package/lib/ProDownload/utils.js +45 -54
- package/lib/ProDrawerForm/components/ProDrawer/index.js +64 -69
- package/lib/ProDrawerForm/components/ProModal/index.js +59 -67
- package/lib/ProDrawerForm/index.d.ts +2 -1
- package/lib/ProDrawerForm/index.js +4 -6
- package/lib/ProDrawerForm/propsType.d.ts +7 -18
- package/lib/ProDrawerForm/style/index.less +8 -14
- package/lib/ProEditLabel/components/RenderProForm.js +2 -3
- package/lib/ProEditLabel/index.js +40 -45
- package/lib/ProEditLabel/propsType.d.ts +1 -6
- package/lib/ProEditLabel/style/index.less +4 -3
- package/lib/ProEditTable/components/ActionButton/index.js +5 -8
- package/lib/ProEditTable/components/RcTable/BaseTable.js +72 -54
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +65 -46
- package/lib/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/lib/ProEditTable/components/RcTable/index.js +1 -8
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/lib/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/lib/ProEditTable/components/RenderField/index.js +378 -254
- package/lib/ProEditTable/components/RenderToolbar/index.js +19 -19
- package/lib/ProEditTable/components/Summary/index.js +5 -8
- package/lib/ProEditTable/components/Validator/index.js +3 -7
- package/lib/ProEditTable/index.js +126 -129
- package/lib/ProEditTable/propsType.d.ts +1 -7
- package/lib/ProEditTable/style/index.less +3 -7
- package/lib/ProEditTable/utils/config.js +31 -35
- package/lib/ProEditTable/utils/index.js +44 -41
- package/lib/ProEditTable/utils/tools.js +107 -113
- package/lib/ProEditTable/utils/useEditTableError.js +12 -4
- package/lib/ProEnum/hooks/useEnumRequest.js +43 -46
- package/lib/ProEnum/index.js +10 -17
- package/lib/ProEnum/style/index.less +2 -2
- package/lib/ProEnum/utils/index.d.ts +1 -0
- package/lib/ProEnum/utils/index.js +3 -1
- package/lib/ProForm/components/Container.d.ts +1 -0
- package/lib/ProForm/components/Container.js +2 -3
- package/lib/ProForm/components/FormFooter/index.js +13 -13
- package/lib/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/lib/ProForm/components/base/Checkbox/index.js +3 -4
- package/lib/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/lib/ProForm/components/base/DatePicker/index.js +7 -7
- package/lib/ProForm/components/base/DatePicker/useDateLimit.d.ts +1 -7
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +1 -3
- package/lib/ProForm/components/base/Input/index.js +6 -13
- package/lib/ProForm/components/base/InputNumber/index.js +3 -6
- package/lib/ProForm/components/base/Radio/index.js +3 -4
- package/lib/ProForm/components/base/RangePicker/index.js +6 -6
- package/lib/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/lib/ProForm/components/base/Select/index.js +2 -3
- package/lib/ProForm/components/base/Switch/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +2 -2
- package/lib/ProForm/components/base/TextArea/index.js +3 -4
- package/lib/ProForm/components/base/TextArea/index.less +12 -2
- package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/lib/ProForm/components/base/TimePicker/index.js +6 -7
- package/lib/ProForm/components/base/TimePicker/style/index.less +5 -3
- package/lib/ProForm/components/combination/Container/style/index.less +2 -2
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +28 -26
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +3 -6
- package/lib/ProForm/components/combination/FormList/components/Empty.js +18 -19
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +17 -21
- package/lib/ProForm/components/combination/FormList/index.js +2 -3
- package/lib/ProForm/components/combination/FormList/style/index.less +38 -2
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/index.d.ts +2 -8
- package/lib/ProForm/components/combination/Group/index.js +13 -6
- package/lib/ProForm/components/combination/Group/style/index.less +7 -87
- package/lib/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/lib/ProForm/components/combination/Group/utils.js +4 -5
- package/lib/ProForm/components/combination/ProCascader/index.js +23 -22
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/style/index.less +2 -2
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +6 -8
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +97 -116
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +13 -14
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/index.js +17 -16
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +5 -52
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +44 -28
- package/lib/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +66 -6
- package/lib/ProForm/components/index.d.ts +0 -8
- package/lib/ProForm/components/index.js +1 -63
- package/lib/ProForm/components/render/ChangedWrapper.js +8 -9
- package/lib/ProForm/components/render/ConfirmWrapper.js +28 -29
- package/lib/ProForm/components/render/Render.js +37 -39
- package/lib/ProForm/components/render/propsType.d.ts +2 -6
- package/lib/ProForm/index.js +8 -38
- package/lib/ProForm/style/index.less +6 -16
- package/lib/ProForm/utils/index.d.ts +15 -1
- package/lib/ProForm/utils/index.js +65 -17
- package/lib/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/lib/ProForm/utils/useForm.js +83 -73
- package/lib/ProForm/utils/useShouldUpdate.js +14 -14
- package/lib/ProForm/utils/valueType.js +8 -8
- package/lib/ProIcon/index.js +10 -13
- package/lib/ProIcon/style/index.less +2 -2
- package/lib/ProLayout/components/Layout/Header/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +11 -10
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +42 -39
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -4
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +12 -6
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +9 -5
- package/lib/ProLayout/components/Layout/Menu/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/style/index.less +2 -2
- package/lib/ProLayout/components/Layout/Notice/style/index.less +2 -2
- package/lib/ProLayout/components/ProCollapse/index.js +20 -36
- package/lib/ProLayout/components/ProCollapse/style/index.less +3 -3
- package/lib/ProLayout/components/ProFooter/index.js +3 -4
- package/lib/ProLayout/components/ProFooter/style/index.less +2 -2
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +9 -9
- package/lib/ProLayout/components/ProHeader/index.js +43 -46
- package/lib/ProLayout/components/ProHeader/style/index.less +2 -2
- package/lib/ProLayout/index.js +7 -6
- package/lib/ProLayout/style/index.less +4 -3
- package/lib/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/lib/ProSelect/index.js +7 -17
- package/lib/ProSelect/index.less +2 -2
- package/lib/ProSelect/propsType.d.ts +1 -1
- package/lib/ProStep/components/Anchor/index.js +2 -3
- package/lib/ProStep/components/Item/index.js +2 -1
- package/lib/ProStep/components/Listener/index.js +12 -14
- package/lib/ProStep/components/Step/index.js +1 -0
- package/lib/ProStep/index.js +39 -47
- package/lib/ProStep/style/index.less +4 -4
- package/lib/ProStepTab/index.js +72 -83
- package/lib/ProTable/components/FormatColumn/index.js +32 -31
- package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +38 -36
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.js +15 -18
- package/lib/ProTable/components/RenderSummary/index.js +4 -5
- package/lib/ProTable/components/RenderTableHeader/index.js +3 -5
- package/lib/ProTable/components/RenderTabs/index.js +3 -6
- package/lib/ProTable/components/TableResizable/index.js +2 -1
- package/lib/ProTable/components/TooltipTitle/index.js +2 -3
- package/lib/ProTable/hooks/useAntdTable.js +21 -26
- package/lib/ProTable/index.js +15 -16
- package/lib/ProTable/propsType.d.ts +1 -3
- package/lib/ProTable/style/index.less +5 -5
- package/lib/ProTabs/components/Card/index.js +5 -11
- package/lib/ProTabs/index.js +2 -3
- package/lib/ProTabs/style/index.less +2 -2
- package/lib/ProThemeTools/component/ProTools/index.js +18 -22
- package/lib/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/lib/ProThemeTools/context/ThemeContext.js +126 -0
- package/lib/ProThemeTools/index.d.ts +4 -1
- package/lib/ProThemeTools/index.js +69 -35
- package/lib/ProThemeTools/style/index.less +3 -3
- package/lib/ProThemeTools/utils/index.d.ts +16 -6
- package/lib/ProThemeTools/utils/index.js +29 -25
- package/lib/ProTooltip/index.js +14 -9
- package/lib/ProTooltip/style/index.less +2 -2
- package/lib/ProTree/components/AdaptiveTooltip.js +2 -4
- package/lib/ProTree/components/List.js +3 -4
- package/lib/ProTree/components/ProTree.js +19 -26
- package/lib/ProTree/components/ProTreeSelect/index.js +38 -37
- package/lib/ProTree/components/ProTreeSelect/style/index.less +2 -2
- package/lib/ProTree/components/Tree.js +18 -25
- package/lib/ProTree/index.js +0 -8
- package/lib/ProTree/propsType.d.ts +1 -1
- package/lib/ProTree/style/index.less +10 -6
- package/lib/ProTreeModal/components/Cascader.js +3 -4
- package/lib/ProTreeModal/components/List.js +11 -17
- package/lib/ProTreeModal/components/SortableItem.js +2 -3
- package/lib/ProTreeModal/components/Tree.js +3 -4
- package/lib/ProTreeModal/components/Trigger.js +6 -11
- package/lib/ProTreeModal/index.d.ts +0 -1
- package/lib/ProTreeModal/index.js +14 -24
- package/lib/ProTreeModal/style/index.less +14 -3
- package/lib/ProUpload/components/ButtonRender.js +17 -20
- package/lib/ProUpload/components/DragRender.js +2 -3
- package/lib/ProUpload/components/FileItem.d.ts +0 -1
- package/lib/ProUpload/components/FileItem.js +15 -21
- package/lib/ProUpload/components/ImageRender.js +34 -43
- package/lib/ProUpload/index.js +3 -4
- package/lib/ProUpload/style/index.less +173 -12
- package/lib/ProViewer/index.js +39 -47
- package/lib/ProViewer/style/index.less +2 -2
- package/lib/ProWaterMark/index.js +3 -4
- package/lib/ProWaterMark/propsType.d.ts +5 -24
- package/lib/global.less +2 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.js +36 -16
- package/lib/locale/en_US.js +1 -1
- package/lib/locale/index.d.ts +2 -0
- package/lib/locale/index.js +12 -2
- package/lib/locale/zh_CN.js +1 -1
- package/lib/style/components.less +0 -3
- package/lib/style/theme/antd.less +38 -48
- package/lib/style/theme/base.less +89 -0
- package/lib/style/theme/index.less +2 -89
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +26 -2
- package/package.json +31 -18
- package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/es/ProEditTable/components/RcTable/VirtualTable.js +0 -8
- package/es/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/es/ProForm/components/combination/ProCombination/index.js +0 -204
- package/es/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/es/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -108
- package/es/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/es/ProForm/components/old/EnumSelect/index.js +0 -272
- package/es/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/es/ProForm/components/old/EnumSelect/interface.js +0 -1
- package/es/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/es/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/es/ProForm/components/old/InputRange/index.js +0 -100
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/es/ProForm/components/old/InputWithSuffix/index.js +0 -46
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/es/ProForm/components/old/ProAddress/index.js +0 -298
- package/es/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/es/ProForm/components/old/ProAddress/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/es/ProForm/components/old/ProCertNo/index.js +0 -66
- package/es/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/es/ProForm/components/old/ProCertNo/propsType.js +0 -1
- package/es/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/es/ProForm/components/old/ProCertValidity/index.js +0 -188
- package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/ProForm/components/old/ProCertValidity/propsType.js +0 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/es/ProForm/components/old/ProRangeBox/index.js +0 -97
- package/es/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/es/ProForm/components/old/ProRangeBox/propsType.js +0 -1
- package/es/ProForm/utils/_useChanged.d.ts +0 -8
- package/es/ProForm/utils/_useChanged.js +0 -25
- package/es/ProForm/utils/_useListChanged.d.ts +0 -16
- package/es/ProForm/utils/_useListChanged.js +0 -93
- package/es/ProUpload/style/fileItem.less +0 -159
- package/es/old/ProCertValidity/index.d.ts +0 -9
- package/es/old/ProCertValidity/index.js +0 -188
- package/es/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/old/ProCertValidity/propsType.js +0 -1
- package/es/old/ProEditableTable/index.d.ts +0 -4
- package/es/old/ProEditableTable/index.js +0 -594
- package/es/old/ProEditableTable/propsType.d.ts +0 -68
- package/es/old/ProEditableTable/propsType.js +0 -1
- package/es/old/ProEditableTable/style/index.less +0 -75
- package/es/old/ProEditableTable/utils.d.ts +0 -29
- package/es/old/ProEditableTable/utils.js +0 -323
- package/lib/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/lib/ProEditTable/components/RcTable/VirtualTable.js +0 -14
- package/lib/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/lib/ProForm/components/combination/ProCombination/index.js +0 -213
- package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/lib/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -115
- package/lib/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/lib/ProForm/components/old/EnumSelect/index.js +0 -279
- package/lib/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/lib/ProForm/components/old/EnumSelect/interface.js +0 -5
- package/lib/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/lib/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/lib/ProForm/components/old/InputRange/index.js +0 -108
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/lib/ProForm/components/old/InputWithSuffix/index.js +0 -53
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/lib/ProForm/components/old/ProAddress/index.js +0 -306
- package/lib/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/lib/ProForm/components/old/ProAddress/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/lib/ProForm/components/old/ProCertNo/index.js +0 -73
- package/lib/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/lib/ProForm/components/old/ProCertNo/propsType.js +0 -5
- package/lib/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/lib/ProForm/components/old/ProCertValidity/index.js +0 -193
- package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/ProForm/components/old/ProCertValidity/propsType.js +0 -5
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/lib/ProForm/components/old/ProRangeBox/index.js +0 -105
- package/lib/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/lib/ProForm/components/old/ProRangeBox/propsType.js +0 -5
- package/lib/ProForm/utils/_useChanged.d.ts +0 -8
- package/lib/ProForm/utils/_useChanged.js +0 -32
- package/lib/ProForm/utils/_useListChanged.d.ts +0 -16
- package/lib/ProForm/utils/_useListChanged.js +0 -100
- package/lib/ProUpload/style/fileItem.less +0 -159
- package/lib/old/ProCertValidity/index.d.ts +0 -9
- package/lib/old/ProCertValidity/index.js +0 -193
- package/lib/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/old/ProCertValidity/propsType.js +0 -5
- package/lib/old/ProEditableTable/index.d.ts +0 -4
- package/lib/old/ProEditableTable/index.js +0 -601
- package/lib/old/ProEditableTable/propsType.d.ts +0 -68
- package/lib/old/ProEditableTable/propsType.js +0 -5
- package/lib/old/ProEditableTable/style/index.less +0 -75
- package/lib/old/ProEditableTable/utils.d.ts +0 -29
- package/lib/old/ProEditableTable/utils.js +0 -330
- /package/es/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
- /package/lib/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
@@ -1,10 +1,11 @@
|
|
1
|
-
@root-entry-name: 'default';
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
1
|
+
/* @root-entry-name: 'default'; */
|
2
|
+
/* @import (reference) '~antd/es/style/themes/index.less'; */
|
3
3
|
|
4
4
|
.pro-number-range {
|
5
5
|
.range-split {
|
6
|
-
width: 32px
|
7
|
-
|
6
|
+
min-width: 32px;
|
7
|
+
max-width: 32px;
|
8
|
+
text-align: center;
|
8
9
|
|
9
10
|
pointer-events: none;
|
10
11
|
&.@{ant-prefix}-input[disabled] {
|
@@ -23,7 +24,6 @@
|
|
23
24
|
.range-split,
|
24
25
|
.range-addon-before,
|
25
26
|
.range-addon-after {
|
26
|
-
// color: @zaui-danger !important;
|
27
27
|
border-color: @zaui-danger;
|
28
28
|
}
|
29
29
|
}
|
@@ -32,56 +32,9 @@
|
|
32
32
|
margin-bottom: 0;
|
33
33
|
}
|
34
34
|
|
35
|
-
// .range-left,
|
36
|
-
// .range-right {
|
37
|
-
// text-align: center;
|
38
|
-
// }
|
39
|
-
|
40
|
-
// .range-left {
|
41
|
-
// .@{ant-prefix}-input-number {
|
42
|
-
// border-right: none;
|
43
|
-
// }
|
44
|
-
// }
|
45
|
-
|
46
|
-
// .range-right {
|
47
|
-
// .@{ant-prefix}-input-number {
|
48
|
-
// border-left: none;
|
49
|
-
// }
|
50
|
-
|
51
|
-
// .range-right {
|
52
|
-
// width: 100%;
|
53
|
-
// border-top-left-radius: 0;
|
54
|
-
// border-bottom-left-radius: 0;
|
55
|
-
// }
|
56
|
-
// }
|
57
|
-
|
58
35
|
.range-addon-before,
|
59
36
|
.range-addon-after {
|
60
37
|
color: var(--zaui-disabled-text);
|
61
38
|
pointer-events: none;
|
62
39
|
}
|
63
|
-
|
64
|
-
// &.@{ant-prefix}-input-group.@{ant-prefix}-input-group-compact > *:not(:last-child) {
|
65
|
-
// margin-right: 0;
|
66
|
-
// }
|
67
|
-
|
68
|
-
// > *:first-child {
|
69
|
-
// border-top-right-radius: 0 !important;
|
70
|
-
// border-bottom-right-radius: 0 !important;
|
71
|
-
|
72
|
-
// > .@{ant-prefix}-select-selector {
|
73
|
-
// border-top-right-radius: 0 !important;
|
74
|
-
// border-bottom-right-radius: 0 !important;
|
75
|
-
// }
|
76
|
-
// }
|
77
|
-
|
78
|
-
// > *:last-child {
|
79
|
-
// border-top-left-radius: 0 !important;
|
80
|
-
// border-bottom-left-radius: 0 !important;
|
81
|
-
|
82
|
-
// > .@{ant-prefix}-select-selector {
|
83
|
-
// border-top-left-radius: 0 !important;
|
84
|
-
// border-bottom-left-radius: 0 !important;
|
85
|
-
// }
|
86
|
-
// }
|
87
40
|
}
|
@@ -1,25 +1,4 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
3
|
-
|
4
|
-
export type Props = Omit<RangePickerProps, 'value' | 'onChange' | 'format' | 'separator' | 'mode'> & {
|
5
|
-
disabled?: boolean | [boolean, boolean];
|
6
|
-
foreverText?: string;
|
7
|
-
foreverDate?: string;
|
8
|
-
otherProps?: any;
|
9
|
-
onChange?: HandleChange;
|
10
|
-
value?: ValueStr;
|
11
|
-
format?: string;
|
12
|
-
separator?: any;
|
13
|
-
isView?: boolean;
|
14
|
-
showTime?: any;
|
15
|
-
valueType?: any;
|
16
|
-
/**
|
17
|
-
* 是否限制时间范围
|
18
|
-
*/
|
19
|
-
limit?: boolean;
|
20
|
-
};
|
21
|
-
type Value = [Moment?, Moment?, boolean?] | null;
|
22
|
-
type ValueStr = [string?, string?, string?] | null;
|
23
|
-
type HandleChange = (value: ValueStr | null, valueStr: Value | null) => void;
|
24
|
-
declare const ProRangeLimit: React.FC<Props>;
|
2
|
+
import type { ProRangeLimitType } from './propsType';
|
3
|
+
declare const ProRangeLimit: React.FC<ProRangeLimitType>;
|
25
4
|
export default ProRangeLimit;
|
@@ -1,12 +1,6 @@
|
|
1
|
-
import "antd/es/checkbox/style";
|
2
|
-
import _Checkbox from "antd/es/checkbox";
|
3
|
-
import "antd/es/input/style";
|
4
|
-
import _Input from "antd/es/input";
|
5
1
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
6
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
7
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
8
|
-
import "antd/es/date-picker/style";
|
9
|
-
import _DatePicker from "antd/es/date-picker";
|
10
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
11
5
|
import _isObject from "lodash/isObject";
|
12
6
|
import _uniq from "lodash/uniq";
|
@@ -15,13 +9,14 @@ import _omit from "lodash/omit";
|
|
15
9
|
var _excluded = ["disabled", "foreverText", "foreverDate", "format", "otherProps", "separator", "limit"];
|
16
10
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
17
11
|
import { useMemo, useState } from 'react';
|
12
|
+
import { DatePicker, Checkbox, Space } from 'antd';
|
18
13
|
import classNames from 'classnames';
|
19
|
-
import
|
14
|
+
import dayjs from 'dayjs';
|
20
15
|
import { useProConfig } from '../../../../ProConfigProvider';
|
21
16
|
import Container from '../../Container';
|
22
17
|
import locale from '../../../../locale';
|
23
18
|
import ProForm from '../../../../ProForm';
|
24
|
-
var defaultPickerValue = [
|
19
|
+
var defaultPickerValue = [dayjs(), dayjs()];
|
25
20
|
var useControlled = function useControlled(props) {
|
26
21
|
var _useState = useState(),
|
27
22
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -29,7 +24,7 @@ var useControlled = function useControlled(props) {
|
|
29
24
|
setValue = _useState2[1];
|
30
25
|
if ('value' in props) {
|
31
26
|
var _props$value, _props$value2;
|
32
|
-
var internalValue = [((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value[0]) &&
|
27
|
+
var internalValue = [((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value[0]) && dayjs(props.value[0], props.format), ((_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2[1]) && dayjs(props.value[1], props.format)];
|
33
28
|
var handleChange = function handleChange(value, other) {
|
34
29
|
if (!value) {
|
35
30
|
props === null || props === void 0 ? void 0 : props.onChange(value, other);
|
@@ -48,7 +43,7 @@ var useControlled = function useControlled(props) {
|
|
48
43
|
// @ts-ignore
|
49
44
|
return [value, setValue];
|
50
45
|
};
|
51
|
-
var RangePicker =
|
46
|
+
var RangePicker = DatePicker.RangePicker;
|
52
47
|
var ProRangeLimit = function ProRangeLimit(props) {
|
53
48
|
var disabled = props.disabled,
|
54
49
|
_props$foreverText = props.foreverText,
|
@@ -96,7 +91,6 @@ var ProRangeLimit = function ProRangeLimit(props) {
|
|
96
91
|
_rest.showTime = false;
|
97
92
|
}
|
98
93
|
}
|
99
|
-
var _viewFormat = Array.isArray(format) ? format[0] : format;
|
100
94
|
var tempFormat = Array.isArray(format) ? format : [format];
|
101
95
|
if (_isFunction(format)) {
|
102
96
|
tempFormat = [];
|
@@ -108,10 +102,31 @@ var ProRangeLimit = function ProRangeLimit(props) {
|
|
108
102
|
format: 'HH:mm:ss'
|
109
103
|
};
|
110
104
|
var _isForever = useMemo(function () {
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
105
|
+
var foreverDayjs = function () {
|
106
|
+
// 使用健壮的日期解析方式
|
107
|
+
var result = dayjs(_foreverDate);
|
108
|
+
if (!result.isValid()) {
|
109
|
+
result = dayjs(_foreverDate, format);
|
110
|
+
}
|
111
|
+
if (!result.isValid()) {
|
112
|
+
// 如果还是无效,使用默认的长期日期
|
113
|
+
result = dayjs('9999-01-01');
|
114
|
+
}
|
115
|
+
return result;
|
116
|
+
}();
|
117
|
+
return foreverDayjs.isSame(endDate);
|
118
|
+
}, [value, _foreverDate, format]);
|
119
|
+
var foreverDayjs = useMemo(function () {
|
120
|
+
// 使用健壮的日期解析方式
|
121
|
+
var foreverDayjs = dayjs(_foreverDate);
|
122
|
+
if (!foreverDayjs.isValid()) {
|
123
|
+
foreverDayjs = dayjs(_foreverDate, format);
|
124
|
+
}
|
125
|
+
if (!foreverDayjs.isValid()) {
|
126
|
+
// 如果还是无效,使用默认的长期日期
|
127
|
+
foreverDayjs = dayjs('9999-01-01');
|
128
|
+
}
|
129
|
+
return foreverDayjs;
|
115
130
|
}, [_foreverDate, format]);
|
116
131
|
if (isView) {
|
117
132
|
var _props$value3, _props$value4;
|
@@ -131,7 +146,7 @@ var ProRangeLimit = function ProRangeLimit(props) {
|
|
131
146
|
// 时间范围change
|
132
147
|
var handleRangeChange = function handleRangeChange(date, dateStr) {
|
133
148
|
if (!date) {
|
134
|
-
onChange(
|
149
|
+
onChange(null, null);
|
135
150
|
return;
|
136
151
|
}
|
137
152
|
var _ref4 = date || [],
|
@@ -146,20 +161,22 @@ var ProRangeLimit = function ProRangeLimit(props) {
|
|
146
161
|
};
|
147
162
|
// 长期选择框change
|
148
163
|
var handleForeverChange = function handleForeverChange(e) {
|
149
|
-
var foreverStr = e.target.checked ? 'Y' : 'N';
|
150
164
|
var _ref8 = value || [],
|
151
165
|
_ref9 = _slicedToArray(_ref8, 1),
|
152
166
|
start = _ref9[0];
|
153
|
-
var
|
154
|
-
|
155
|
-
end =
|
167
|
+
var _ref0 = value || [],
|
168
|
+
_ref1 = _slicedToArray(_ref0, 2),
|
169
|
+
end = _ref1[1];
|
156
170
|
if (e.target.checked) {
|
157
|
-
|
158
|
-
end
|
159
|
-
|
171
|
+
end = foreverDayjs;
|
172
|
+
// 确保 start 和 end 是有效的 dayjs 实例再调用 format
|
173
|
+
var startStr = start && dayjs.isDayjs(start) ? start.format(format) : undefined;
|
174
|
+
var endStr = end && dayjs.isDayjs(end) ? end.format(format) : undefined;
|
175
|
+
onChange([start, end], [startStr, endStr]);
|
160
176
|
} else {
|
161
|
-
//
|
162
|
-
|
177
|
+
// 不清除起期时间,只清除结束时间
|
178
|
+
var _startStr = start && dayjs.isDayjs(start) ? start.format(format) : undefined;
|
179
|
+
onChange([start, null], [_startStr, undefined]);
|
163
180
|
}
|
164
181
|
};
|
165
182
|
if (_rest.showTime === true) {
|
@@ -168,8 +185,7 @@ var ProRangeLimit = function ProRangeLimit(props) {
|
|
168
185
|
if (_isObject(_rest.showTime)) {
|
169
186
|
_rest.showTime = Object.assign(_defaultShowTime, _rest.showTime);
|
170
187
|
}
|
171
|
-
return _jsxs(
|
172
|
-
compact: true,
|
188
|
+
return _jsxs(Space.Compact, {
|
173
189
|
className: "pro-range-limit",
|
174
190
|
children: [_jsx(RangePicker, _objectSpread(_objectSpread(_objectSpread({
|
175
191
|
allowClear: true,
|
@@ -181,7 +197,7 @@ var ProRangeLimit = function ProRangeLimit(props) {
|
|
181
197
|
onChange: handleRangeChange
|
182
198
|
})), limit && _jsx("div", {
|
183
199
|
className: className,
|
184
|
-
children: _jsx(
|
200
|
+
children: _jsx(Checkbox, {
|
185
201
|
checked: _isForever,
|
186
202
|
disabled: _disabled === null || _disabled === void 0 ? void 0 : _disabled[1],
|
187
203
|
onChange: handleForeverChange,
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { RangePickerProps } from 'antd/es/date-picker';
|
2
|
+
import { Dayjs } from 'dayjs';
|
3
|
+
type Value = [Dayjs?, Dayjs?] | null;
|
4
|
+
type ValueStr = [string?, string?] | null;
|
5
|
+
type HandleChange = (valueStr: ValueStr | null, value: Value | null) => void;
|
6
|
+
export type ProRangeLimitType = Omit<RangePickerProps, 'value' | 'onChange' | 'format' | 'separator' | 'mode'> & {
|
7
|
+
disabled?: boolean | [boolean, boolean];
|
8
|
+
foreverText?: string;
|
9
|
+
foreverDate?: string;
|
10
|
+
otherProps?: any;
|
11
|
+
onChange?: HandleChange;
|
12
|
+
value?: ValueStr;
|
13
|
+
format?: string;
|
14
|
+
separator?: any;
|
15
|
+
isView?: boolean;
|
16
|
+
showTime?: any;
|
17
|
+
valueType?: any;
|
18
|
+
/**
|
19
|
+
* 是否限制时间范围
|
20
|
+
*/
|
21
|
+
limit?: boolean;
|
22
|
+
};
|
23
|
+
export {};
|
@@ -1,8 +1,9 @@
|
|
1
|
-
import
|
1
|
+
import dayjs from 'dayjs';
|
2
|
+
import type { Dayjs } from 'dayjs';
|
2
3
|
interface Props<T = any> {
|
3
4
|
value?: T;
|
4
5
|
onChange?: (value: T, ...rest: any[]) => void;
|
5
6
|
format?: string;
|
6
7
|
}
|
7
|
-
declare const useControlled: (props: Props) => [
|
8
|
+
declare const useControlled: (props: Props) => [dayjs.Dayjs, (value: Dayjs | undefined) => void];
|
8
9
|
export default useControlled;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
2
|
-
import
|
2
|
+
import dayjs from 'dayjs';
|
3
3
|
import { useState } from 'react';
|
4
4
|
var useControlled = function useControlled(props) {
|
5
5
|
var value = props.value,
|
@@ -18,7 +18,19 @@ var useControlled = function useControlled(props) {
|
|
18
18
|
onChange(_value, value);
|
19
19
|
};
|
20
20
|
if ('value' in props) {
|
21
|
-
|
21
|
+
var parsedValue = null;
|
22
|
+
if (value) {
|
23
|
+
parsedValue = dayjs(value, format);
|
24
|
+
if (!parsedValue.isValid()) {
|
25
|
+
parsedValue = dayjs(value);
|
26
|
+
}
|
27
|
+
if (!parsedValue.isValid()) {
|
28
|
+
parsedValue = null;
|
29
|
+
} else {
|
30
|
+
parsedValue = parsedValue.startOf('day');
|
31
|
+
}
|
32
|
+
}
|
33
|
+
return [parsedValue, handleChange];
|
22
34
|
}
|
23
35
|
return [valueState, handleChange];
|
24
36
|
};
|
@@ -1,20 +1,19 @@
|
|
1
1
|
import { DatePickerProps, TimePickerProps } from 'antd';
|
2
|
-
import {
|
3
|
-
import { Moment } from 'moment';
|
2
|
+
import type { Dayjs } from 'dayjs';
|
4
3
|
import React from 'react';
|
5
4
|
import type { ProFormOtherType } from '../../../propsType';
|
6
|
-
import {
|
5
|
+
import type { ProRangeLimitType } from '../ProRangeLimit/propsType';
|
7
6
|
import type { DistributiveOmit } from '../../../../ProForm/propsType';
|
8
7
|
export type DateType = DatePickerProps['value'];
|
9
8
|
export type ProTimeLimitType = DistributiveOmit<DatePickerProps, 'value' | 'onChange' | 'mode'> & {
|
10
9
|
value?: string;
|
11
|
-
onChange?: (value: ProTimeLimitType['value'] | null, valueData:
|
10
|
+
onChange?: (value: ProTimeLimitType['value'] | null, valueData: Dayjs) => void;
|
12
11
|
disabled?: boolean;
|
13
12
|
foreverDate?: string;
|
14
13
|
foreverText?: string;
|
15
14
|
viewEmpty?: React.ReactNode;
|
16
15
|
format?: string;
|
17
|
-
valueType?: '
|
16
|
+
valueType?: 'dayjs' | 'format' | 'ISO' | 'dateTime' | 'dateStartEndTime';
|
18
17
|
otherProps?: ProFormOtherType;
|
19
18
|
mode?: 'DatePicker';
|
20
19
|
isView?: boolean;
|
@@ -23,7 +22,7 @@ export type ProTimeLimitType = DistributiveOmit<DatePickerProps, 'value' | 'onCh
|
|
23
22
|
*/
|
24
23
|
limit?: boolean;
|
25
24
|
} & TimePickerProps & {
|
26
|
-
showTime?:
|
25
|
+
showTime?: DatePickerProps['showTime'];
|
27
26
|
showNow?: boolean;
|
28
27
|
};
|
29
28
|
export declare const ProTimeLimit: React.FC<ProTimeLimitType>;
|
@@ -1,9 +1,3 @@
|
|
1
|
-
import "antd/es/checkbox/style";
|
2
|
-
import _Checkbox from "antd/es/checkbox";
|
3
|
-
import "antd/es/date-picker/style";
|
4
|
-
import _DatePicker from "antd/es/date-picker";
|
5
|
-
import "antd/es/input/style";
|
6
|
-
import _Input from "antd/es/input";
|
7
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
8
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
9
3
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
@@ -15,8 +9,9 @@ import _omit from "lodash/omit";
|
|
15
9
|
var _excluded = ["format", "disabled", "foreverDate", "foreverText", "valueType", "otherProps", "limit"],
|
16
10
|
_excluded2 = ["mode"];
|
17
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
12
|
+
import { Checkbox, DatePicker, Space } from 'antd';
|
18
13
|
import classNames from 'classnames';
|
19
|
-
import
|
14
|
+
import dayjs from 'dayjs';
|
20
15
|
import { useMemo } from 'react';
|
21
16
|
import { useProConfig } from '../../../../ProConfigProvider';
|
22
17
|
import Container from '../../Container';
|
@@ -68,13 +63,21 @@ export var ProTimeLimit = function ProTimeLimit(props) {
|
|
68
63
|
format: 'HH:mm:ss'
|
69
64
|
};
|
70
65
|
var _useMemo = useMemo(function () {
|
71
|
-
|
72
|
-
var
|
73
|
-
|
66
|
+
// 使用健壮的日期解析方式
|
67
|
+
var foreverDayjs = dayjs(_foreverDate);
|
68
|
+
if (!foreverDayjs.isValid()) {
|
69
|
+
foreverDayjs = dayjs(_foreverDate, format);
|
70
|
+
}
|
71
|
+
if (!foreverDayjs.isValid()) {
|
72
|
+
// 如果还是无效,使用默认的长期日期
|
73
|
+
foreverDayjs = dayjs('9999-01-01');
|
74
|
+
}
|
75
|
+
var foreverString = foreverDayjs.format(format);
|
76
|
+
return [foreverString, foreverDayjs];
|
74
77
|
}, [format, _foreverDate]),
|
75
78
|
_useMemo2 = _slicedToArray(_useMemo, 2),
|
76
79
|
foreverString = _useMemo2[0],
|
77
|
-
|
80
|
+
foreverDayjs = _useMemo2[1];
|
78
81
|
// 管理value的受控状态
|
79
82
|
var _useControlled = useControlled(_objectSpread({
|
80
83
|
format: format
|
@@ -84,17 +87,18 @@ export var ProTimeLimit = function ProTimeLimit(props) {
|
|
84
87
|
onChange = _useControlled2[1];
|
85
88
|
var isForever = useMemo(function () {
|
86
89
|
if (_isObject(value)) {
|
87
|
-
return
|
90
|
+
return foreverDayjs.format(format) === value.format(format);
|
88
91
|
}
|
89
92
|
return false;
|
90
|
-
}, [
|
93
|
+
}, [foreverDayjs, value]);
|
91
94
|
var foreverChange = function foreverChange(e) {
|
92
95
|
var checkedForever = e.target.checked;
|
93
96
|
if (checkedForever) {
|
94
|
-
|
97
|
+
// 直接使用计算好的 foreverDayjs,避免重新解析
|
98
|
+
onChange(foreverDayjs);
|
95
99
|
} else {
|
96
100
|
// 防止长期选择后,时间面板还是9999-01-01
|
97
|
-
onChange(
|
101
|
+
onChange(dayjs());
|
98
102
|
setTimeout(function () {
|
99
103
|
onChange(null);
|
100
104
|
}, 0);
|
@@ -129,11 +133,10 @@ export var ProTimeLimit = function ProTimeLimit(props) {
|
|
129
133
|
'ant-input-disabled': disabled,
|
130
134
|
'forever-checkbox': true
|
131
135
|
});
|
132
|
-
return _jsxs(
|
133
|
-
compact: true,
|
136
|
+
return _jsxs(Space.Compact, {
|
134
137
|
className: "pro-time-limit",
|
135
|
-
children: [_jsx(
|
136
|
-
defaultPickerValue:
|
138
|
+
children: [_jsx(DatePicker, _objectSpread(_objectSpread(_objectSpread({
|
139
|
+
defaultPickerValue: dayjs(),
|
137
140
|
disabled: disabled || isForever
|
138
141
|
}, initialConfig), _omit(_rest, ['placeholder'])), {}, {
|
139
142
|
format: _format,
|
@@ -141,7 +144,7 @@ export var ProTimeLimit = function ProTimeLimit(props) {
|
|
141
144
|
onChange: onChange
|
142
145
|
})), limit && _jsx("div", {
|
143
146
|
className: className,
|
144
|
-
children: _jsx(
|
147
|
+
children: _jsx(Checkbox, {
|
145
148
|
checked: isForever,
|
146
149
|
disabled: disabled,
|
147
150
|
onChange: foreverChange,
|
@@ -1,5 +1,5 @@
|
|
1
|
-
@root-entry-name: 'default';
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
1
|
+
/* @root-entry-name: 'default'; */
|
2
|
+
/* @import (reference) '~antd/es/style/themes/index.less'; */
|
3
3
|
|
4
4
|
.@{ant-prefix}-form-item-has-error {
|
5
5
|
.@{ant-prefix}-picker-status-error
|
@@ -7,34 +7,94 @@
|
|
7
7
|
.@{ant-prefix}-input-borderless
|
8
8
|
).@{ant-prefix}-input {
|
9
9
|
// background: @zaui-base-bg;
|
10
|
-
border-color:
|
10
|
+
border-color: #ff4d4f;
|
11
11
|
}
|
12
12
|
.forever-checkbox:not(.@{ant-prefix}-input-disabled):not(
|
13
13
|
.@{ant-prefix}-input-borderless
|
14
14
|
).@{ant-prefix}-input:focus {
|
15
|
-
border-color: var(--ant-error-color-hover);
|
15
|
+
border-color: var(--ant-error-color-hover, #ff7875);
|
16
16
|
border-right-width: 1px;
|
17
17
|
outline: 0;
|
18
|
-
box-shadow: 0 0 0 2px var(--ant-error-color-outline);
|
18
|
+
box-shadow: 0 0 0 2px var(--ant-error-color-outline, rgba(255,77,79,0.2));
|
19
19
|
}
|
20
20
|
}
|
21
21
|
|
22
|
-
span.@{ant-prefix}-input-group-compact
|
22
|
+
span.@{ant-prefix}-input-group-compact,
|
23
|
+
.@{ant-prefix}-space-compact {
|
23
24
|
&.pro-time-limit,
|
24
25
|
&.pro-range-limit {
|
25
26
|
display: flex;
|
26
27
|
|
27
28
|
.@{ant-prefix}-picker {
|
28
29
|
flex: 1;
|
30
|
+
border-right: 0;
|
31
|
+
border-top-right-radius: 0 !important;
|
32
|
+
border-bottom-right-radius: 0 !important;
|
29
33
|
}
|
30
34
|
|
31
35
|
.@{ant-prefix}-picker-focused {
|
32
36
|
z-index: 1;
|
33
37
|
}
|
38
|
+
|
34
39
|
.forever-checkbox {
|
35
40
|
flex: 0;
|
36
41
|
min-width: unset;
|
37
42
|
white-space: nowrap;
|
43
|
+
border-left: 0;
|
44
|
+
border-top-left-radius: 0 !important;
|
45
|
+
border-bottom-left-radius: 0 !important;
|
46
|
+
|
47
|
+
&.@{ant-prefix}-input {
|
48
|
+
display: flex;
|
49
|
+
align-items: center;
|
50
|
+
min-height: 32px;
|
51
|
+
padding: 4px 11px;
|
52
|
+
background-color: #ffffff;
|
53
|
+
border: 1px solid #d9d9d9;
|
54
|
+
margin-left: 1px;
|
55
|
+
border-top-right-radius: 6px !important;
|
56
|
+
border-bottom-right-radius: 6px !important;
|
57
|
+
transition: all 0.2s;
|
58
|
+
|
59
|
+
&:hover {
|
60
|
+
border-color: #40a9ff;
|
61
|
+
}
|
62
|
+
|
63
|
+
&.@{ant-prefix}-input-disabled {
|
64
|
+
color: rgba(0, 0, 0, 0.25);
|
65
|
+
background-color: #f5f5f5;
|
66
|
+
border-color: #d9d9d9;
|
67
|
+
cursor: not-allowed;
|
68
|
+
}
|
69
|
+
|
70
|
+
.@{ant-prefix}-checkbox-wrapper {
|
71
|
+
display: flex;
|
72
|
+
align-items: center;
|
73
|
+
|
74
|
+
&.@{ant-prefix}-checkbox-wrapper-disabled {
|
75
|
+
color: rgba(0, 0, 0, 0.25);
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
// 确保焦点状态下的边框连接正确
|
82
|
+
.@{ant-prefix}-picker:focus {
|
83
|
+
z-index: 1;
|
84
|
+
border-right: 0;
|
85
|
+
}
|
86
|
+
|
87
|
+
.forever-checkbox.@{ant-prefix}-input:focus {
|
88
|
+
z-index: 1;
|
89
|
+
border-color: #40a9ff;
|
90
|
+
border-left: 0;
|
91
|
+
box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
|
92
|
+
}
|
93
|
+
|
94
|
+
// 当日期选择器聚焦时,复选框也要有相应的样式
|
95
|
+
.@{ant-prefix}-picker-focused + .forever-checkbox.@{ant-prefix}-input {
|
96
|
+
border-color: #40a9ff;
|
97
|
+
border-left: 0;
|
38
98
|
}
|
39
99
|
}
|
40
100
|
}
|
@@ -12,8 +12,6 @@ export { default as TimePicker } from './base/TimePicker';
|
|
12
12
|
export { default as FormList } from './combination/FormList';
|
13
13
|
export { default as ProEditTable } from '../../ProEditTable';
|
14
14
|
export { default as ProCascader } from './combination/ProCascader';
|
15
|
-
export { default as ProAddressBar } from './combination/ProCascader';
|
16
|
-
export { default as ProCombination } from './combination/ProCombination';
|
17
15
|
export { default as ProNumberRange } from './combination/ProNumberRange';
|
18
16
|
export { default as ProModalSelect } from './combination/ProModalSelect';
|
19
17
|
export { default as ProTimeLimit } from './combination/ProTimeLimit';
|
@@ -27,9 +25,3 @@ export { default as ProUpload } from '../../ProUpload';
|
|
27
25
|
export { default as ProTreeModal } from '../../ProTreeModal';
|
28
26
|
export { default as ProTree } from '../../ProTree';
|
29
27
|
export { default as FormFooter } from './FormFooter';
|
30
|
-
export { default as ProAddress, transferAddressInfoToRegion } from './old/ProAddress';
|
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';
|
@@ -14,8 +14,6 @@ export { default as FormList } from './combination/FormList';
|
|
14
14
|
export { default as ProEditTable } from '../../ProEditTable';
|
15
15
|
// combination 组合组件
|
16
16
|
export { default as ProCascader } from './combination/ProCascader';
|
17
|
-
export { default as ProAddressBar } from './combination/ProCascader';
|
18
|
-
export { default as ProCombination } from './combination/ProCombination';
|
19
17
|
export { default as ProNumberRange } from './combination/ProNumberRange';
|
20
18
|
export { default as ProModalSelect } from './combination/ProModalSelect';
|
21
19
|
export { default as ProTimeLimit } from './combination/ProTimeLimit';
|
@@ -29,11 +27,4 @@ export { default as ProUpload } from '../../ProUpload';
|
|
29
27
|
export { default as ProTreeModal } from '../../ProTreeModal';
|
30
28
|
export { default as ProTree } from '../../ProTree';
|
31
29
|
// footer组件
|
32
|
-
export { default as FormFooter } from './FormFooter';
|
33
|
-
// old 组件待移除
|
34
|
-
export { default as ProAddress, transferAddressInfoToRegion } from './old/ProAddress';
|
35
|
-
export { default as EnumSelect } from './old/EnumSelect';
|
36
|
-
export { default as InputRange } from './old/InputRange';
|
37
|
-
export { default as ProRangeBox } from './old/ProRangeBox';
|
38
|
-
export { default as ProCertValidity } from './old/ProCertValidity';
|
39
|
-
export { default as ProCertNo } from './old/ProCertNo';
|
30
|
+
export { default as FormFooter } from './FormFooter';
|
@@ -1,7 +1,3 @@
|
|
1
|
-
import "antd/es/space/style";
|
2
|
-
import _Space from "antd/es/space";
|
3
|
-
import "antd/es/tooltip/style";
|
4
|
-
import _Tooltip from "antd/es/tooltip";
|
5
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
6
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
7
3
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
@@ -9,6 +5,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
9
5
|
import _get from "lodash/get";
|
10
6
|
var _excluded = ["name", "names", "namesStr", "form", "onDiff", "children", "type", "diffConfig", "valuePropName", "normalize", "getValueProps", "viewRender"];
|
11
7
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
8
|
+
import { Space, Tooltip } from 'antd';
|
12
9
|
import classNames from 'classnames';
|
13
10
|
import React, { useMemo } from 'react';
|
14
11
|
import { diffOriginal } from '../../utils/diffOriginal';
|
@@ -105,22 +102,24 @@ var ChangedWrapper = function ChangedWrapper(props) {
|
|
105
102
|
var scrollFollowParentConfig = componentsWithFloatWindow.includes(type) ? {
|
106
103
|
scrollFollowParent: scrollFollowParent
|
107
104
|
} : {};
|
108
|
-
return _jsx(
|
105
|
+
return _jsx(Tooltip, {
|
109
106
|
open: open,
|
110
107
|
getPopupContainer: function getPopupContainer(trigger) {
|
111
108
|
return scrollFollowParent ? trigger.parentElement : document.body;
|
112
109
|
},
|
113
|
-
|
110
|
+
classNames: {
|
111
|
+
root: 'original-value-tooltip'
|
112
|
+
},
|
114
113
|
placement: "topLeft",
|
115
114
|
autoAdjustOverflow: false,
|
116
|
-
title: _jsxs(
|
115
|
+
title: _jsxs(Space, {
|
117
116
|
direction: "vertical",
|
118
117
|
className: "changed-tooltip",
|
119
|
-
children: [_jsxs(
|
118
|
+
children: [_jsxs(Space, {
|
120
119
|
align: "start",
|
121
120
|
className: "original-value-container",
|
122
121
|
children: ["\u521D\u59CB\u503C\uFF1A", tipContent]
|
123
|
-
}), _showEllipse && _jsxs(
|
122
|
+
}), _showEllipse && _jsxs(Space, {
|
124
123
|
className: "current-value-container",
|
125
124
|
children: ["\u5F53\u524D\u503C\uFF1A", /*#__PURE__*/React.isValidElement(children) ? /*#__PURE__*/React.cloneElement(children, _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, children.props), rest), scrollFollowParentConfig), {}, {
|
126
125
|
isView: true
|