@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,5 +1,3 @@
|
|
|
1
|
-
@root-entry-name: 'default';
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
1
|
|
|
4
2
|
.pro-form-list-block-title {
|
|
5
3
|
height: 14px;
|
|
@@ -69,6 +67,42 @@
|
|
|
69
67
|
.@{ant-prefix}-btn-text:hover {
|
|
70
68
|
background: transparent;
|
|
71
69
|
}
|
|
70
|
+
.pro-form-list-tool-btn {
|
|
71
|
+
.@{ant-prefix}-btn-icon {
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.pro-form-list-tool-btn-less{
|
|
79
|
+
&:hover{
|
|
80
|
+
background: transparent !important;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.pro-form-list-empty {
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: column;
|
|
88
|
+
align-items: center;
|
|
89
|
+
justify-content: center;
|
|
90
|
+
|
|
91
|
+
.pro-form-list-empty-img {
|
|
92
|
+
width: 80px;
|
|
93
|
+
height: 80px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.pro-form-list-empty-content {
|
|
97
|
+
display: flex;
|
|
98
|
+
justify-content: center;
|
|
99
|
+
margin-top: var(--zaui-space-size-md, 16px);
|
|
100
|
+
color: @zaui-aide-text;
|
|
101
|
+
|
|
102
|
+
.@{ant-prefix}-btn-link {
|
|
103
|
+
padding: 0;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
72
106
|
}
|
|
73
107
|
|
|
74
108
|
.pro-form-list-empty {
|
|
@@ -24,7 +24,6 @@ var getComRender = (component, props, componentProps) => {
|
|
|
24
24
|
wrappers.forEach(item => {
|
|
25
25
|
if (item in props) {
|
|
26
26
|
var Wrapper = wrapperMap[item];
|
|
27
|
-
// console.log(props[item]);
|
|
28
27
|
renderComponent = /*#__PURE__*/_jsx(Wrapper, _objectSpread(_objectSpread({}, componentProps), {}, {
|
|
29
28
|
[item]: props[item],
|
|
30
29
|
children: renderComponent
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "antd/es/space/style";
|
|
2
|
-
import _Space from "antd/es/space";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import { Space } from 'antd';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import { isEmpty, omit } from 'lodash';
|
|
6
5
|
import classnames from 'classnames';
|
|
@@ -79,7 +78,7 @@ var Group = props => {
|
|
|
79
78
|
return /*#__PURE__*/_jsx("div", {
|
|
80
79
|
className: nextClassName,
|
|
81
80
|
id: id,
|
|
82
|
-
children: (space.compact || space !== null && space !== void 0 && space.separator) && !nextIsView ? /*#__PURE__*/_jsx(
|
|
81
|
+
children: (space.compact || space !== null && space !== void 0 && space.separator) && !nextIsView ? /*#__PURE__*/_jsx(Space.Compact, {
|
|
83
82
|
children: columns.map((column, index) => {
|
|
84
83
|
column.otherProps = otherProps;
|
|
85
84
|
// 自定义间隔移除对应参数
|
|
@@ -92,7 +91,7 @@ var Group = props => {
|
|
|
92
91
|
isView: nextIsView
|
|
93
92
|
}, column), column.name || index);
|
|
94
93
|
})
|
|
95
|
-
}) : /*#__PURE__*/_jsx(
|
|
94
|
+
}) : /*#__PURE__*/_jsx(Space, _objectSpread(_objectSpread({
|
|
96
95
|
align: "start"
|
|
97
96
|
}, omit(space, ['separator', 'compact'])), {}, {
|
|
98
97
|
split: nextIsView ? split : null,
|
|
@@ -1,26 +1,6 @@
|
|
|
1
|
-
@root-entry-name: 'default';
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
|
-
|
|
4
|
-
.border-radius(@start-end: 0, @end-end: 0, @start-start: 0, @end-start: 0) {
|
|
5
|
-
border-start-end-radius: @start-end;
|
|
6
|
-
border-end-end-radius: @end-end;
|
|
7
|
-
border-start-start-radius: @start-start;
|
|
8
|
-
border-end-start-radius: @end-start;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.start-radius() {
|
|
12
|
-
border-start-start-radius: 4px;
|
|
13
|
-
border-end-start-radius: 4px;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.end-radius() {
|
|
17
|
-
border-start-end-radius: 4px;
|
|
18
|
-
border-end-end-radius: 4px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
1
|
.pro-group {
|
|
22
|
-
width: unset !important;
|
|
23
2
|
display: flex;
|
|
3
|
+
width: unset !important;
|
|
24
4
|
&.pro-group-view {
|
|
25
5
|
.@{ant-prefix}-space {
|
|
26
6
|
.@{ant-prefix}-space-item {
|
|
@@ -29,7 +9,8 @@
|
|
|
29
9
|
}
|
|
30
10
|
}
|
|
31
11
|
|
|
32
|
-
&.pro-group-diy-width,
|
|
12
|
+
&.pro-group-diy-width,
|
|
13
|
+
&.pro-group-width-auto {
|
|
33
14
|
.@{ant-prefix}-space .@{ant-prefix}-space-item {
|
|
34
15
|
width: auto;
|
|
35
16
|
|
|
@@ -60,94 +41,33 @@
|
|
|
60
41
|
align-items: center;
|
|
61
42
|
width: 100%;
|
|
62
43
|
|
|
63
|
-
&>.@{ant-prefix}-input-number{
|
|
64
|
-
&:first-child{
|
|
65
|
-
border-end-end-radius: 0;
|
|
66
|
-
border-start-end-radius: 0;
|
|
67
|
-
}
|
|
68
|
-
&:last-child{
|
|
69
|
-
border-start-start-radius: 0;
|
|
70
|
-
border-end-start-radius: 0;
|
|
71
|
-
margin-left: -1px;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
44
|
.@{ant-prefix}-form-item {
|
|
76
45
|
margin-bottom: 0 !important;
|
|
77
46
|
}
|
|
78
47
|
|
|
79
48
|
.group-separator {
|
|
80
|
-
margin-inline-end: -2px;
|
|
81
|
-
margin-inline-start: -1px;
|
|
82
|
-
border-start-start-radius: 0;
|
|
83
|
-
border-end-start-radius: 0;
|
|
84
49
|
padding: 0 12px;
|
|
85
50
|
background-color: #fff;
|
|
86
51
|
cursor: default;
|
|
52
|
+
margin-inline-end: -2px;
|
|
53
|
+
margin-inline-start: -1px;
|
|
87
54
|
}
|
|
88
55
|
.pro-modal-select {
|
|
89
56
|
margin-left: -1px;
|
|
90
|
-
.@{ant-prefix}-input{
|
|
91
|
-
border-start-start-radius: 0;
|
|
92
|
-
border-end-start-radius: 0;
|
|
93
|
-
}
|
|
94
57
|
}
|
|
95
58
|
|
|
96
59
|
// 定制内敛合并样式
|
|
97
60
|
.@{ant-prefix}-input-affix-wrapper,
|
|
98
61
|
.@{ant-prefix}-select {
|
|
99
|
-
.border-radius(0, 0, 0, 0);
|
|
100
|
-
|
|
101
62
|
&:nth-child(n + 2) {
|
|
102
63
|
margin-inline-start: -1px;
|
|
103
64
|
}
|
|
104
|
-
|
|
105
|
-
&:first-child {
|
|
106
|
-
.start-radius();
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
&:last-child {
|
|
110
|
-
.end-radius();
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.pro-select {
|
|
115
|
-
.@{ant-prefix}-select .@{ant-prefix}-select-selector{
|
|
116
|
-
border-radius: 0 !important;
|
|
117
|
-
}
|
|
118
|
-
&:first-child .@{ant-prefix}-select .@{ant-prefix}-select-selector {
|
|
119
|
-
border-start-start-radius: 4px !important;
|
|
120
|
-
border-end-start-radius: 4px !important;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
&:last-child .@{ant-prefix}-select .@{ant-prefix}-select-selector {
|
|
124
|
-
border-start-end-radius: 4px !important;
|
|
125
|
-
border-end-end-radius: 4px!important;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.@{ant-prefix}-select {
|
|
130
|
-
.@{ant-prefix}-select-selector {
|
|
131
|
-
.border-radius(0, 0, 0, 0);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
&:first-child {
|
|
135
|
-
.@{ant-prefix}-select-selector {
|
|
136
|
-
.start-radius();
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
&:last-child {
|
|
141
|
-
.@{ant-prefix}-select-selector {
|
|
142
|
-
.end-radius();
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
65
|
}
|
|
146
66
|
|
|
147
67
|
// 报错样式定制
|
|
148
68
|
.@{ant-prefix}-input-affix-wrapper-status-error ~ .group-separator {
|
|
149
|
-
color:
|
|
150
|
-
border-color:
|
|
69
|
+
color: #ff4d4f;
|
|
70
|
+
border-color: #ff4d4f;
|
|
151
71
|
}
|
|
152
72
|
}
|
|
153
73
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import "antd/es/button/style";
|
|
2
|
-
import _Button from "antd/es/button";
|
|
3
1
|
/* eslint-disable no-lonely-if */
|
|
4
2
|
|
|
5
3
|
import { isFunction } from 'lodash';
|
|
6
4
|
import { validate } from '@zat-design/utils';
|
|
5
|
+
import { Button } from 'antd';
|
|
7
6
|
import valueTypeMap from "../../../utils/valueType";
|
|
8
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
8
|
/**
|
|
@@ -38,7 +37,7 @@ export var insertSeparator = (columns, space) => {
|
|
|
38
37
|
if (index === separatorIndex) {
|
|
39
38
|
result.push({
|
|
40
39
|
separator: true,
|
|
41
|
-
component: /*#__PURE__*/_jsx(
|
|
40
|
+
component: /*#__PURE__*/_jsx(Button, {
|
|
42
41
|
className: "group-separator",
|
|
43
42
|
children: space.separator
|
|
44
43
|
}),
|
|
@@ -53,7 +52,7 @@ export var insertSeparator = (columns, space) => {
|
|
|
53
52
|
if (index < array.length - 1) {
|
|
54
53
|
result.push({
|
|
55
54
|
separator: true,
|
|
56
|
-
component: /*#__PURE__*/_jsx(
|
|
55
|
+
component: /*#__PURE__*/_jsx(Button, {
|
|
57
56
|
className: "group-separator",
|
|
58
57
|
children: space.separator
|
|
59
58
|
}),
|
|
@@ -95,7 +94,7 @@ export var transformNamesString = arr => {
|
|
|
95
94
|
*/
|
|
96
95
|
export var isUpperCase = (type, upperCase) => {
|
|
97
96
|
var result = {};
|
|
98
|
-
if (['Input', 'TextArea'
|
|
97
|
+
if (['Input', 'TextArea'].includes(type) && upperCase) {
|
|
99
98
|
result.getValueFromEvent = event => {
|
|
100
99
|
var _event$target;
|
|
101
100
|
if (Array.isArray(event)) {
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import "antd/es/tooltip/style";
|
|
2
|
-
import _Tooltip from "antd/es/tooltip";
|
|
3
|
-
import "antd/es/cascader/style";
|
|
4
|
-
import _Cascader from "antd/es/cascader";
|
|
5
|
-
import "antd/es/message/style";
|
|
6
|
-
import _message from "antd/es/message";
|
|
7
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
8
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
9
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
10
|
-
import "antd/es/typography/style";
|
|
11
|
-
import _Typography from "antd/es/typography";
|
|
12
4
|
var _excluded = ["className", "hasDetail", "detailMaxLength", "fieldNames", "value", "disabled", "dataSource", "onChange", "useRequest", "transformResponse", "level", "isView", "enumCode", "code", "tooltip", "separator", "detailPlaceholder", "scrollFollowParent", "desensitization", "otherProps"];
|
|
13
5
|
import { useEffect, useState, memo, useMemo, useCallback } from 'react';
|
|
14
|
-
import {
|
|
6
|
+
import { Cascader, Tooltip, message } from 'antd';
|
|
7
|
+
import { omit, find as _find, isBoolean, isEqual } from 'lodash';
|
|
15
8
|
import { useRequest as useRequestFunc, useDeepCompareEffect } from 'ahooks';
|
|
16
9
|
import { transformDataName } from "./utils/index";
|
|
17
10
|
import { useProConfig } from "../../../../ProConfigProvider";
|
|
@@ -22,7 +15,6 @@ import ProForm from "../../..";
|
|
|
22
15
|
import Container from "../../Container";
|
|
23
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
|
-
var Text = _Typography.Text;
|
|
26
18
|
var defaultFieldNames = {
|
|
27
19
|
label: 'name',
|
|
28
20
|
value: 'code',
|
|
@@ -133,7 +125,7 @@ var ProCascader = props => {
|
|
|
133
125
|
msg = _ref4.message,
|
|
134
126
|
data = _ref4.data;
|
|
135
127
|
if (status !== 200) {
|
|
136
|
-
|
|
128
|
+
message.error(msg);
|
|
137
129
|
return;
|
|
138
130
|
}
|
|
139
131
|
var newData = data;
|
|
@@ -160,7 +152,7 @@ var ProCascader = props => {
|
|
|
160
152
|
msg = _ref5.message,
|
|
161
153
|
data = _ref5.data;
|
|
162
154
|
if (status !== 200) {
|
|
163
|
-
|
|
155
|
+
message.error(msg);
|
|
164
156
|
return;
|
|
165
157
|
}
|
|
166
158
|
return data;
|
|
@@ -316,7 +308,7 @@ var ProCascader = props => {
|
|
|
316
308
|
children: viewValue
|
|
317
309
|
}) : /*#__PURE__*/_jsxs("div", {
|
|
318
310
|
className: `pro-address ${className}`,
|
|
319
|
-
children: [/*#__PURE__*/_jsx(
|
|
311
|
+
children: [/*#__PURE__*/_jsx(Cascader, _objectSpread({
|
|
320
312
|
className: hasDetail ? '' : 'no-detail',
|
|
321
313
|
placeholder: locale === null || locale === void 0 || (_locale$ProAddressBar = locale.ProAddressBar) === null || _locale$ProAddressBar === void 0 ? void 0 : _locale$ProAddressBar.placeholder,
|
|
322
314
|
value: addressValue,
|
|
@@ -332,7 +324,7 @@ var ProCascader = props => {
|
|
|
332
324
|
getPopupContainer: trigger => {
|
|
333
325
|
return scrollFollowParent ? trigger.parentElement : document.body;
|
|
334
326
|
}
|
|
335
|
-
}, omit(restProps, ['otherProps', 'scrollFollowParent']))), hasDetail && (tooltip && lastDisabled[1] && detail ? /*#__PURE__*/_jsx(
|
|
327
|
+
}, omit(restProps, ['otherProps', 'scrollFollowParent']))), hasDetail && (tooltip && lastDisabled[1] && detail ? /*#__PURE__*/_jsx(Tooltip, {
|
|
336
328
|
title: detail,
|
|
337
329
|
children: /*#__PURE__*/_jsx("span", {
|
|
338
330
|
className: "pro-address-detail",
|
|
@@ -356,4 +348,10 @@ var ProCascader = props => {
|
|
|
356
348
|
}))]
|
|
357
349
|
});
|
|
358
350
|
};
|
|
359
|
-
export default /*#__PURE__*/memo(ProCascader)
|
|
351
|
+
export default /*#__PURE__*/memo(ProCascader, (prevProps, nextProps) => {
|
|
352
|
+
// 基本props比较, 只比较关键的
|
|
353
|
+
if (!isEqual(prevProps === null || prevProps === void 0 ? void 0 : prevProps.value, nextProps === null || nextProps === void 0 ? void 0 : nextProps.value) || (prevProps === null || prevProps === void 0 ? void 0 : prevProps.disabled) !== (nextProps === null || nextProps === void 0 ? void 0 : nextProps.disabled) || !isEqual(prevProps === null || prevProps === void 0 ? void 0 : prevProps.dataSource, nextProps === null || nextProps === void 0 ? void 0 : nextProps.dataSource)) {
|
|
354
|
+
return false;
|
|
355
|
+
}
|
|
356
|
+
return true;
|
|
357
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ProModalSelectType } from './propsType';
|
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<Omit<ProModalSelectType
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Omit<React.PropsWithChildren<ProModalSelectType>, "ref"> & React.RefAttributes<unknown>>;
|
|
4
4
|
export default _default;
|
|
@@ -1,27 +1,14 @@
|
|
|
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
|
-
import "antd/es/tooltip/style";
|
|
6
|
-
import _Tooltip from "antd/es/tooltip";
|
|
7
|
-
import "antd/es/input/style";
|
|
8
|
-
import _Input from "antd/es/input";
|
|
9
|
-
import "antd/es/spin/style";
|
|
10
|
-
import _Spin from "antd/es/spin";
|
|
11
|
-
import "antd/es/message/style";
|
|
12
|
-
import _message from "antd/es/message";
|
|
13
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
14
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
15
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
16
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
17
|
-
import "antd/es/form/style";
|
|
18
|
-
import _Form from "antd/es/form";
|
|
19
5
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
20
6
|
var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames", "readOnly", "mode", "addonAfter", "configOption", "title", "onFormat", "showCodeName", "optionRender", "customRender", "style", "className", "beforeOpen", "afterOpen", "isTooltip", "tooltip", "searchForm", "searchKey", "defaultOne", "otherProps"],
|
|
21
7
|
_excluded2 = ["onOk"],
|
|
22
8
|
_excluded3 = ["rowKey", "columns", "rowSelection"];
|
|
23
9
|
import { SearchOutlined } from '@ant-design/icons';
|
|
24
10
|
import { useDebounceEffect, useDeepCompareEffect, useMount, useSetState } from 'ahooks';
|
|
11
|
+
import { Form, message, Input, Tooltip, Space, Button, Spin } from 'antd';
|
|
25
12
|
import { debounce, isArray, isBoolean, isEqual, isFunction, isObject } from 'lodash';
|
|
26
13
|
import classNames from 'classnames';
|
|
27
14
|
import { ReactSVG } from 'react-svg';
|
|
@@ -72,7 +59,7 @@ var ProModalSelect = (props, ref) => {
|
|
|
72
59
|
}
|
|
73
60
|
return mode;
|
|
74
61
|
}, [mode, readOnly]);
|
|
75
|
-
var contentForm =
|
|
62
|
+
var contentForm = Form.useFormInstance();
|
|
76
63
|
if (!configOption || Object.prototype.toString.call(configOption) !== '[object Object]') {
|
|
77
64
|
throw new Error('error: 请检查枚举选择弹框的配置项【configOption】');
|
|
78
65
|
}
|
|
@@ -132,7 +119,6 @@ var ProModalSelect = (props, ref) => {
|
|
|
132
119
|
_value: value,
|
|
133
120
|
isInit: true,
|
|
134
121
|
onOff: false,
|
|
135
|
-
visible: false,
|
|
136
122
|
open: false,
|
|
137
123
|
options: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource) || [],
|
|
138
124
|
selectedRows: [],
|
|
@@ -143,13 +129,12 @@ var ProModalSelect = (props, ref) => {
|
|
|
143
129
|
_value = _useSetState2$._value,
|
|
144
130
|
isInit = _useSetState2$.isInit,
|
|
145
131
|
onOff = _useSetState2$.onOff,
|
|
146
|
-
visible = _useSetState2$.visible,
|
|
147
132
|
open = _useSetState2$.open,
|
|
148
133
|
options = _useSetState2$.options,
|
|
149
134
|
_selectedRows = _useSetState2$.selectedRows,
|
|
150
135
|
_selectedRowKeys = _useSetState2$.selectedRowKeys,
|
|
151
136
|
setState = _useSetState2[1];
|
|
152
|
-
var _Form$useForm =
|
|
137
|
+
var _Form$useForm = Form.useForm(searchForm),
|
|
153
138
|
_Form$useForm2 = _slicedToArray(_Form$useForm, 1),
|
|
154
139
|
form = _Form$useForm2[0];
|
|
155
140
|
var selectedRows = (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || _selectedRows;
|
|
@@ -183,7 +168,7 @@ var ProModalSelect = (props, ref) => {
|
|
|
183
168
|
transformParams,
|
|
184
169
|
transformResponse
|
|
185
170
|
}, _objectSpread({
|
|
186
|
-
ready: (initParams || defaultOne) && nextMode === 'input' ||
|
|
171
|
+
ready: (initParams || defaultOne) && nextMode === 'input' || open
|
|
187
172
|
}, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options)),
|
|
188
173
|
data = _useRequestList2.data,
|
|
189
174
|
loading = _useRequestList2.loading,
|
|
@@ -337,7 +322,7 @@ var ProModalSelect = (props, ref) => {
|
|
|
337
322
|
form.resetFields();
|
|
338
323
|
setState({
|
|
339
324
|
onOff: false,
|
|
340
|
-
|
|
325
|
+
open: false,
|
|
341
326
|
isInit: false
|
|
342
327
|
});
|
|
343
328
|
|
|
@@ -357,7 +342,7 @@ var ProModalSelect = (props, ref) => {
|
|
|
357
342
|
_context2.next = 4;
|
|
358
343
|
break;
|
|
359
344
|
}
|
|
360
|
-
|
|
345
|
+
message.error(locale.ProModalSelect.checkMsg);
|
|
361
346
|
return _context2.abrupt("return", false);
|
|
362
347
|
case 4:
|
|
363
348
|
nextSelectedRows = selectedRows;
|
|
@@ -623,13 +608,13 @@ var ProModalSelect = (props, ref) => {
|
|
|
623
608
|
}
|
|
624
609
|
});
|
|
625
610
|
useEffect(() => {
|
|
626
|
-
if (onOff && !
|
|
611
|
+
if (onOff && !open) {
|
|
627
612
|
var _useRequest$options7;
|
|
628
613
|
if ((useRequest === null || useRequest === void 0 || (_useRequest$options7 = useRequest.options) === null || _useRequest$options7 === void 0 ? void 0 : _useRequest$options7.manual) !== true) {
|
|
629
614
|
onReset();
|
|
630
615
|
}
|
|
631
616
|
var nextState = {
|
|
632
|
-
|
|
617
|
+
open: true
|
|
633
618
|
};
|
|
634
619
|
if (labelInValue) {
|
|
635
620
|
if (!value) {
|
|
@@ -655,17 +640,17 @@ var ProModalSelect = (props, ref) => {
|
|
|
655
640
|
}
|
|
656
641
|
setState(nextState);
|
|
657
642
|
}
|
|
658
|
-
}, [onOff,
|
|
643
|
+
}, [onOff, open, JSON.stringify(value)]);
|
|
659
644
|
useEffect(() => {
|
|
660
|
-
hideTooltipIfOpen(fieldRef.current,
|
|
661
|
-
}, [
|
|
645
|
+
hideTooltipIfOpen(fieldRef.current, open);
|
|
646
|
+
}, [open]);
|
|
662
647
|
useEffect(() => {
|
|
663
|
-
if (value && !
|
|
648
|
+
if (value && !open && isInit && nextMode === 'input') {
|
|
664
649
|
getInitValues();
|
|
665
650
|
}
|
|
666
|
-
}, [JSON.stringify(value),
|
|
651
|
+
}, [JSON.stringify(value), open, isInit]);
|
|
667
652
|
useDebounceEffect(() => {
|
|
668
|
-
if (value && !
|
|
653
|
+
if (value && !open && nextMode === 'select' && (!isEqual(value, preValue.current) || (options === null || options === void 0 ? void 0 : options.length) === 0)) {
|
|
669
654
|
var _options$some;
|
|
670
655
|
preValue.current = value;
|
|
671
656
|
var _data3 = labelInValue ? value[valueKey] : value;
|
|
@@ -690,7 +675,7 @@ var ProModalSelect = (props, ref) => {
|
|
|
690
675
|
}, 300);
|
|
691
676
|
}
|
|
692
677
|
}
|
|
693
|
-
}, [JSON.stringify(value),
|
|
678
|
+
}, [JSON.stringify(value), open, JSON.stringify(defaultParams), JSON.stringify(initParams), options === null || options === void 0 ? void 0 : options.length]);
|
|
694
679
|
var handleSelectFocus = () => {
|
|
695
680
|
if (useRequest) {
|
|
696
681
|
var queryBean = defaultParams || {};
|
|
@@ -755,7 +740,7 @@ var ProModalSelect = (props, ref) => {
|
|
|
755
740
|
}, [value, _value]);
|
|
756
741
|
|
|
757
742
|
// 加个中间状态Input
|
|
758
|
-
var initRender = /*#__PURE__*/_jsxs(
|
|
743
|
+
var initRender = /*#__PURE__*/_jsxs(Space.Compact, {
|
|
759
744
|
style: {
|
|
760
745
|
width: '100%'
|
|
761
746
|
},
|
|
@@ -771,7 +756,7 @@ var ProModalSelect = (props, ref) => {
|
|
|
771
756
|
optionRender: optionRender,
|
|
772
757
|
scrollFollowParent: false,
|
|
773
758
|
mode: isMultiple ? 'multiple' : undefined,
|
|
774
|
-
notFoundContent: selectLoading ? /*#__PURE__*/_jsx(
|
|
759
|
+
notFoundContent: selectLoading ? /*#__PURE__*/_jsx(Spin, {
|
|
775
760
|
size: "small"
|
|
776
761
|
}) : null,
|
|
777
762
|
onFocus: handleSelectFocus,
|
|
@@ -780,21 +765,21 @@ var ProModalSelect = (props, ref) => {
|
|
|
780
765
|
style: {
|
|
781
766
|
width: isView || disabled ? '100%' : 'calc(100% - 30px)'
|
|
782
767
|
}
|
|
783
|
-
}, restProps)) : /*#__PURE__*/_jsx(
|
|
768
|
+
}, restProps)) : /*#__PURE__*/_jsx(Tooltip, {
|
|
784
769
|
title: _tooltip ? viewText : null,
|
|
785
770
|
placement: "topLeft",
|
|
786
|
-
children: /*#__PURE__*/_jsx(
|
|
771
|
+
children: /*#__PURE__*/_jsx(Input, _objectSpread({
|
|
787
772
|
value: viewText,
|
|
788
773
|
onChange: handleChangeValue,
|
|
789
774
|
disabled: disabled,
|
|
790
775
|
autoComplete: "off",
|
|
791
776
|
allowClear: true
|
|
792
777
|
}, restProps))
|
|
793
|
-
}), isView || disabled ? null : /*#__PURE__*/_jsx(
|
|
778
|
+
}), isView || disabled ? null : /*#__PURE__*/_jsx(Button, {
|
|
779
|
+
onClick: handleClick,
|
|
794
780
|
icon: /*#__PURE__*/_jsx(ReactSVG, {
|
|
795
781
|
className: "viewSvg",
|
|
796
|
-
src: viewSvg
|
|
797
|
-
onClick: handleClick
|
|
782
|
+
src: viewSvg
|
|
798
783
|
})
|
|
799
784
|
})]
|
|
800
785
|
});
|
|
@@ -837,7 +822,7 @@ var ProModalSelect = (props, ref) => {
|
|
|
837
822
|
var _className = classNames({
|
|
838
823
|
'pro-modal-select': true,
|
|
839
824
|
[props.className]: props.className,
|
|
840
|
-
'pro-modal-select-open':
|
|
825
|
+
'pro-modal-select-open': open
|
|
841
826
|
});
|
|
842
827
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
843
828
|
children: [/*#__PURE__*/_jsx("div", {
|
|
@@ -853,7 +838,7 @@ var ProModalSelect = (props, ref) => {
|
|
|
853
838
|
// @ts-ignore
|
|
854
839
|
,
|
|
855
840
|
onCancel: handleClose,
|
|
856
|
-
open:
|
|
841
|
+
open: open
|
|
857
842
|
}, restModalProps), {}, {
|
|
858
843
|
children: [/*#__PURE__*/_jsx(ProForm, {
|
|
859
844
|
submitOnEnter: true,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@root-entry-name: 'default';
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
1
|
|
|
4
2
|
.pro-modal-select,
|
|
5
3
|
.pro-tree-modal {
|
|
@@ -59,9 +57,9 @@
|
|
|
59
57
|
border-bottom-right-radius: 0;
|
|
60
58
|
&.@{ant-prefix}-input-affix-wrapper-status-error{
|
|
61
59
|
& + .@{ant-prefix}-btn{
|
|
62
|
-
border: 1px solid
|
|
60
|
+
border: 1px solid #ff4d4f;
|
|
63
61
|
>.viewSvg{
|
|
64
|
-
color:
|
|
62
|
+
color: #ff4d4f;
|
|
65
63
|
}
|
|
66
64
|
}
|
|
67
65
|
}
|
|
@@ -81,7 +79,9 @@
|
|
|
81
79
|
.@{ant-prefix}-btn-compact-item.@{ant-prefix}-btn.@{ant-prefix}-btn-compact-last-item:not(.@{ant-prefix}-btn-compact-first-item):not(.@{ant-prefix}-btn-compact-item-rtl){
|
|
82
80
|
&:hover{
|
|
83
81
|
position: relative;
|
|
82
|
+
z-index: 1;
|
|
84
83
|
transition: none;
|
|
84
|
+
border-color: var(--ant-primary-color-hover, #1677ff) !important;
|
|
85
85
|
&::before{
|
|
86
86
|
opacity: 1;
|
|
87
87
|
}
|
|
@@ -93,17 +93,13 @@
|
|
|
93
93
|
left: -1px;
|
|
94
94
|
width: 1px;
|
|
95
95
|
height: calc(100% + 2px);
|
|
96
|
-
background:var(--ant-primary-color-hover);
|
|
96
|
+
background: var(--ant-primary-color-hover, #1677ff);
|
|
97
97
|
opacity: 0;
|
|
98
98
|
display: block;
|
|
99
|
+
z-index: 2;
|
|
99
100
|
}
|
|
100
101
|
}
|
|
101
102
|
|
|
102
|
-
.@{ant-prefix}-input-affix-wrapper-status-error{
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
|
|
107
103
|
.@{ant-prefix}-input-group-wrapper-status-error {
|
|
108
104
|
&:hover {
|
|
109
105
|
.@{ant-prefix}-input,
|
|
@@ -132,7 +128,7 @@
|
|
|
132
128
|
}
|
|
133
129
|
|
|
134
130
|
.viewSvg {
|
|
135
|
-
height:
|
|
131
|
+
height: 16px;
|
|
136
132
|
cursor: pointer;
|
|
137
133
|
fill: #c5c7cd;
|
|
138
134
|
}
|
|
@@ -140,11 +136,11 @@
|
|
|
140
136
|
.@{ant-prefix}-space-compact {
|
|
141
137
|
.@{ant-prefix}-select-compact-item-div:has(.@{ant-prefix}-select-status-error) {
|
|
142
138
|
& + .@{ant-prefix}-btn-compact-last-item {
|
|
143
|
-
border-top: 1px solid
|
|
144
|
-
border-right: 1px solid
|
|
145
|
-
border-bottom: 1px solid
|
|
139
|
+
border-top: 1px solid #ff4d4f;
|
|
140
|
+
border-right: 1px solid #ff4d4f;
|
|
141
|
+
border-bottom: 1px solid #ff4d4f;
|
|
146
142
|
>.viewSvg{
|
|
147
|
-
color:
|
|
143
|
+
color: #ff4d4f;
|
|
148
144
|
}
|
|
149
145
|
}
|
|
150
146
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { ProNumberRangeType } from './propsType';
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
3
|
+
declare const _default: import("react").MemoExoticComponent<(props: ProNumberRangeType) => any>;
|
|
4
|
+
export default _default;
|