@zat-design/sisyphus-react 3.14.0-beta.2 → 4.0.0-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -207
- package/babel.config.js +2 -2
- package/dist/index.esm.css +1 -1
- package/dist/less.esm.css +1 -1
- package/es/FormsProvider/index.d.ts +4 -1
- package/es/ProAction/components/CheckModalContent/index.js +0 -9
- package/es/ProAction/index.js +3 -6
- package/es/ProAction/index.less +0 -2
- package/es/ProConfigProvider/index.d.ts +22 -5
- package/es/ProConfigProvider/index.js +58 -26
- package/es/ProDownload/index.js +2 -3
- package/es/ProDownload/style/index.less +0 -2
- package/es/ProDownload/utils.js +3 -4
- package/es/ProDrawerForm/components/ProDrawer/index.js +13 -17
- package/es/ProDrawerForm/components/ProModal/index.js +12 -20
- package/es/ProDrawerForm/index.d.ts +2 -1
- package/es/ProDrawerForm/index.js +35 -33
- package/es/ProDrawerForm/propsType.d.ts +7 -18
- package/es/ProDrawerForm/style/index.less +6 -14
- package/es/ProEditLabel/components/RenderProForm.js +2 -3
- package/es/ProEditLabel/index.js +10 -15
- package/es/ProEditLabel/propsType.d.ts +1 -6
- package/es/ProEditLabel/style/index.less +2 -3
- package/es/ProEditTable/components/ActionButton/index.js +5 -8
- package/es/ProEditTable/components/RcTable/BaseTable.js +70 -53
- package/es/ProEditTable/components/RcTable/DraggableTable.js +70 -49
- package/es/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/es/ProEditTable/components/RcTable/index.js +1 -3
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/es/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/es/ProEditTable/components/RenderField/index.js +401 -241
- package/es/ProEditTable/components/RenderToolbar/index.js +5 -5
- package/es/ProEditTable/components/Summary/index.js +5 -8
- package/es/ProEditTable/components/Validator/index.js +3 -6
- package/es/ProEditTable/index.js +99 -103
- package/es/ProEditTable/propsType.d.ts +7 -7
- package/es/ProEditTable/style/index.less +12 -12
- package/es/ProEditTable/utils/config.js +6 -7
- package/es/ProEditTable/utils/index.js +21 -17
- package/es/ProEditTable/utils/useEditTableError.js +12 -4
- package/es/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/es/ProEditTable/utils/useShouldUpdateForTable.js +132 -0
- package/es/ProEnum/hooks/useEnum.js +5 -0
- package/es/ProEnum/hooks/useEnumRequest.js +3 -3
- package/es/ProEnum/index.js +10 -17
- package/es/ProEnum/style/index.less +0 -2
- package/es/ProEnum/utils/index.d.ts +1 -0
- package/es/ProEnum/utils/index.js +3 -7
- package/es/ProForm/components/Container.d.ts +1 -0
- package/es/ProForm/components/Container.js +2 -3
- package/es/ProForm/components/FormFooter/index.js +18 -19
- package/es/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/es/ProForm/components/base/Checkbox/index.js +3 -4
- package/es/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/es/ProForm/components/base/DatePicker/index.js +7 -7
- package/es/ProForm/components/base/DatePicker/useDateLimit.d.ts +3 -0
- package/es/ProForm/components/base/DatePicker/useDateLimit.js +11 -0
- package/es/ProForm/components/base/Input/index.js +10 -8
- package/es/ProForm/components/base/InputNumber/index.js +3 -6
- package/es/ProForm/components/base/Radio/index.js +3 -4
- package/es/ProForm/components/base/RangePicker/index.js +7 -6
- package/es/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/es/ProForm/components/base/Select/index.js +2 -3
- package/es/ProForm/components/base/Switch/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/style/index.less +0 -2
- package/es/ProForm/components/base/TextArea/index.js +3 -4
- package/es/ProForm/components/base/TextArea/index.less +10 -2
- package/es/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/es/ProForm/components/base/TimePicker/index.js +6 -7
- package/es/ProForm/components/base/TimePicker/style/index.less +3 -3
- package/es/ProForm/components/combination/Container/style/index.less +0 -2
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +15 -13
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +5 -8
- package/es/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/es/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +5 -8
- package/es/ProForm/components/combination/FormList/index.js +2 -3
- package/es/ProForm/components/combination/FormList/style/index.less +36 -2
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/es/ProForm/components/combination/Group/component/ComRender.js +0 -1
- package/es/ProForm/components/combination/Group/index.js +3 -4
- package/es/ProForm/components/combination/Group/style/index.less +7 -87
- package/es/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/es/ProForm/components/combination/Group/utils.js +4 -5
- package/es/ProForm/components/combination/ProCascader/index.js +13 -15
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/style/index.less +0 -2
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +24 -39
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +11 -15
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/es/ProForm/components/combination/ProNumberRange/index.js +21 -21
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +3 -54
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/es/ProForm/components/combination/ProRangeLimit/index.js +42 -25
- package/es/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/es/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +64 -6
- package/es/ProForm/components/index.d.ts +2 -9
- package/es/ProForm/components/index.js +1 -11
- package/es/ProForm/components/render/ChangedWrapper.js +8 -9
- package/es/ProForm/components/render/ConfirmWrapper.js +7 -7
- package/es/ProForm/components/render/Render.js +29 -30
- package/es/ProForm/components/render/RenderFields.d.ts +1 -0
- package/es/ProForm/components/render/RenderFields.js +6 -3
- package/es/ProForm/components/render/propsType.d.ts +3 -6
- package/es/ProForm/index.d.ts +2 -2
- package/es/ProForm/index.js +14 -42
- package/es/ProForm/propsType.d.ts +3 -0
- package/es/ProForm/style/index.less +4 -16
- package/es/ProForm/utils/index.d.ts +15 -1
- package/es/ProForm/utils/index.js +66 -15
- package/es/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/es/ProForm/utils/useForm.js +27 -22
- package/es/ProForm/utils/useShouldUpdate.d.ts +1 -0
- package/es/ProForm/utils/useShouldUpdate.js +103 -17
- package/es/ProIcon/index.js +10 -13
- package/es/ProIcon/style/index.less +0 -2
- package/es/ProLayout/components/Layout/Header/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +40 -39
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +0 -3
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +7 -5
- package/es/ProLayout/components/Layout/Menu/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/style/index.less +0 -2
- package/es/ProLayout/components/Layout/Notice/style/index.less +0 -2
- package/es/ProLayout/components/ProCollapse/index.js +29 -44
- package/es/ProLayout/components/ProCollapse/style/index.less +5 -4
- package/es/ProLayout/components/ProFooter/index.js +2 -3
- package/es/ProLayout/components/ProFooter/style/index.less +0 -2
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +7 -9
- package/es/ProLayout/components/ProHeader/index.js +43 -45
- package/es/ProLayout/components/ProHeader/style/index.less +0 -2
- package/es/ProLayout/components/TabsManager/components/TabContextMenu.js +2 -3
- package/es/ProLayout/components/TabsManager/hooks/useTabsState.js +0 -2
- package/es/ProLayout/index.js +80 -41
- package/es/ProLayout/style/index.less +2 -3
- package/es/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/es/ProSelect/index.js +7 -15
- package/es/ProSelect/index.less +0 -2
- package/es/ProSelect/propsType.d.ts +1 -1
- package/es/ProStep/components/Anchor/index.js +2 -3
- package/es/ProStep/components/Item/index.js +1 -0
- package/es/ProStep/components/Step/index.js +1 -0
- package/es/ProStep/style/index.less +2 -4
- package/es/ProTable/components/FormatColumn/index.js +33 -31
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +17 -13
- package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.js +15 -18
- package/es/ProTable/components/RenderSummary/index.js +4 -5
- package/es/ProTable/components/RenderTableHeader/index.js +3 -4
- package/es/ProTable/components/RenderTabs/index.js +3 -6
- package/es/ProTable/components/TableResizable/index.js +2 -1
- package/es/ProTable/components/TooltipTitle/index.js +2 -3
- package/es/ProTable/hooks/useAntdTable.js +4 -7
- package/es/ProTable/index.d.ts +0 -7
- package/es/ProTable/index.js +11 -14
- package/es/ProTable/propsType.d.ts +2 -3
- package/es/ProTable/style/index.less +4 -6
- package/es/ProTabs/components/Card/index.js +5 -10
- package/es/ProTabs/index.js +2 -3
- package/es/ProTabs/style/index.less +0 -2
- package/es/ProThemeTools/component/ProTools/index.js +18 -22
- package/es/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/es/ProThemeTools/context/ThemeContext.js +136 -0
- package/es/ProThemeTools/index.d.ts +4 -8
- package/es/ProThemeTools/index.js +80 -49
- package/es/ProThemeTools/style/index.less +1 -3
- package/es/ProThemeTools/utils/index.d.ts +16 -6
- package/es/ProThemeTools/utils/index.js +30 -24
- package/es/ProTooltip/index.js +14 -9
- package/es/ProTooltip/style/index.less +0 -2
- package/es/ProTree/components/AdaptiveTooltip.js +2 -3
- package/es/ProTree/components/List.js +3 -4
- package/es/ProTree/components/ProTree.js +5 -12
- package/es/ProTree/components/ProTreeSelect/index.js +28 -26
- package/es/ProTree/components/ProTreeSelect/style/index.less +0 -2
- package/es/ProTree/components/Tree.js +6 -13
- package/es/ProTree/index.js +0 -7
- package/es/ProTree/propsType.d.ts +1 -1
- package/es/ProTree/style/index.less +8 -6
- package/es/ProTreeModal/components/Cascader.js +3 -4
- package/es/ProTreeModal/components/List.js +11 -17
- package/es/ProTreeModal/components/SortableItem.js +2 -3
- package/es/ProTreeModal/components/Tree.js +3 -4
- package/es/ProTreeModal/components/Trigger.js +6 -11
- package/es/ProTreeModal/index.d.ts +0 -1
- package/es/ProTreeModal/index.js +10 -20
- package/es/ProTreeModal/style/index.less +12 -3
- package/es/ProUpload/components/ButtonRender.js +4 -7
- package/es/ProUpload/components/DragRender.js +2 -3
- package/es/ProUpload/components/FileItem.d.ts +0 -1
- package/es/ProUpload/components/FileItem.js +15 -21
- package/es/ProUpload/components/ImageRender.js +8 -17
- package/es/ProUpload/index.js +3 -4
- package/es/ProUpload/style/index.less +171 -12
- package/es/ProViewer/index.js +28 -35
- package/es/ProViewer/propsType.js +3 -0
- package/es/ProViewer/style/index.less +0 -2
- package/es/ProWaterMark/index.js +2 -3
- package/es/ProWaterMark/propsType.d.ts +5 -24
- package/es/global.less +2 -1
- package/es/index.d.ts +3 -3
- package/es/index.js +5 -5
- package/es/locale/en_US.js +1 -1
- package/es/locale/index.d.ts +2 -0
- package/es/locale/index.js +13 -2
- package/es/locale/zh_CN.js +1 -1
- package/es/style/components.less +0 -3
- package/es/style/index.less +1 -1
- package/es/style/theme/antd.less +36 -48
- package/es/style/theme/base.less +90 -0
- package/es/style/theme/index.less +2 -89
- package/es/utils/index.d.ts +7 -0
- package/es/utils/index.js +37 -1
- package/lib/FormsProvider/index.d.ts +4 -1
- package/lib/ProAction/components/CheckModalContent/index.js +0 -9
- package/lib/ProAction/index.js +3 -6
- package/lib/ProAction/index.less +0 -2
- package/lib/ProConfigProvider/index.d.ts +22 -5
- package/lib/ProConfigProvider/index.js +58 -26
- package/lib/ProDownload/index.js +2 -3
- package/lib/ProDownload/style/index.less +0 -2
- package/lib/ProDownload/utils.js +3 -4
- package/lib/ProDrawerForm/components/ProDrawer/index.js +13 -17
- package/lib/ProDrawerForm/components/ProModal/index.js +12 -20
- package/lib/ProDrawerForm/index.d.ts +2 -1
- package/lib/ProDrawerForm/index.js +35 -33
- package/lib/ProDrawerForm/propsType.d.ts +7 -18
- package/lib/ProDrawerForm/style/index.less +6 -14
- package/lib/ProEditLabel/components/RenderProForm.js +2 -3
- package/lib/ProEditLabel/index.js +10 -15
- package/lib/ProEditLabel/propsType.d.ts +1 -6
- package/lib/ProEditLabel/style/index.less +2 -3
- package/lib/ProEditTable/components/ActionButton/index.js +5 -8
- package/lib/ProEditTable/components/RcTable/BaseTable.js +69 -52
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +69 -48
- package/lib/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/lib/ProEditTable/components/RcTable/index.js +1 -8
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/lib/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/lib/ProEditTable/components/RenderField/index.js +401 -241
- package/lib/ProEditTable/components/RenderToolbar/index.js +5 -5
- package/lib/ProEditTable/components/Summary/index.js +5 -9
- package/lib/ProEditTable/components/Validator/index.js +3 -7
- package/lib/ProEditTable/index.js +96 -100
- package/lib/ProEditTable/propsType.d.ts +7 -7
- package/lib/ProEditTable/style/index.less +12 -12
- package/lib/ProEditTable/utils/config.js +6 -7
- package/lib/ProEditTable/utils/index.js +20 -16
- package/lib/ProEditTable/utils/useEditTableError.js +12 -4
- package/lib/ProEditTable/utils/useShouldUpdateForTable.d.ts +15 -0
- package/lib/ProEditTable/utils/useShouldUpdateForTable.js +139 -0
- package/lib/ProEnum/hooks/useEnum.js +5 -0
- package/lib/ProEnum/hooks/useEnumRequest.js +2 -2
- package/lib/ProEnum/index.js +10 -17
- package/lib/ProEnum/style/index.less +0 -2
- package/lib/ProEnum/utils/index.d.ts +1 -0
- package/lib/ProEnum/utils/index.js +4 -7
- package/lib/ProForm/components/Container.d.ts +1 -0
- package/lib/ProForm/components/Container.js +2 -3
- package/lib/ProForm/components/FormFooter/index.js +18 -19
- package/lib/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/lib/ProForm/components/base/Checkbox/index.js +3 -4
- package/lib/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/lib/ProForm/components/base/DatePicker/index.js +7 -7
- package/lib/ProForm/components/base/DatePicker/useDateLimit.d.ts +3 -0
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +19 -0
- package/lib/ProForm/components/base/Input/index.js +10 -8
- package/lib/ProForm/components/base/InputNumber/index.js +3 -6
- package/lib/ProForm/components/base/Radio/index.js +3 -4
- package/lib/ProForm/components/base/RangePicker/index.js +6 -6
- package/lib/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/lib/ProForm/components/base/Select/index.js +2 -3
- package/lib/ProForm/components/base/Switch/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +0 -2
- package/lib/ProForm/components/base/TextArea/index.js +3 -4
- package/lib/ProForm/components/base/TextArea/index.less +10 -2
- package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/lib/ProForm/components/base/TimePicker/index.js +6 -7
- package/lib/ProForm/components/base/TimePicker/style/index.less +3 -3
- package/lib/ProForm/components/combination/Container/style/index.less +0 -2
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +15 -13
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +6 -9
- package/lib/ProForm/components/combination/FormList/components/Empty.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +4 -7
- package/lib/ProForm/components/combination/FormList/index.js +2 -3
- package/lib/ProForm/components/combination/FormList/style/index.less +36 -2
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/component/ComRender.js +0 -1
- package/lib/ProForm/components/combination/Group/index.js +3 -4
- package/lib/ProForm/components/combination/Group/style/index.less +7 -87
- package/lib/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/lib/ProForm/components/combination/Group/utils.js +4 -5
- package/lib/ProForm/components/combination/ProCascader/index.js +12 -14
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/style/index.less +0 -2
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +24 -39
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +11 -15
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/index.js +20 -20
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +3 -54
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +42 -25
- package/lib/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +64 -6
- package/lib/ProForm/components/index.d.ts +2 -9
- package/lib/ProForm/components/index.js +1 -63
- package/lib/ProForm/components/render/ChangedWrapper.js +8 -9
- package/lib/ProForm/components/render/ConfirmWrapper.js +7 -7
- package/lib/ProForm/components/render/Render.js +29 -30
- package/lib/ProForm/components/render/RenderFields.d.ts +1 -0
- package/lib/ProForm/components/render/RenderFields.js +6 -3
- package/lib/ProForm/components/render/propsType.d.ts +3 -6
- package/lib/ProForm/index.d.ts +2 -2
- package/lib/ProForm/index.js +13 -42
- package/lib/ProForm/propsType.d.ts +3 -0
- package/lib/ProForm/style/index.less +4 -16
- package/lib/ProForm/utils/index.d.ts +15 -1
- package/lib/ProForm/utils/index.js +69 -17
- package/lib/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/lib/ProForm/utils/useForm.js +26 -21
- package/lib/ProForm/utils/useShouldUpdate.d.ts +1 -0
- package/lib/ProForm/utils/useShouldUpdate.js +101 -15
- package/lib/ProIcon/index.js +10 -13
- package/lib/ProIcon/style/index.less +0 -2
- package/lib/ProLayout/components/Layout/Header/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +3 -6
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +40 -39
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +2 -3
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +0 -3
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +7 -5
- package/lib/ProLayout/components/Layout/Menu/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/style/index.less +0 -2
- package/lib/ProLayout/components/Layout/Notice/style/index.less +0 -2
- package/lib/ProLayout/components/ProCollapse/index.js +29 -44
- package/lib/ProLayout/components/ProCollapse/style/index.less +5 -4
- package/lib/ProLayout/components/ProFooter/index.js +2 -3
- package/lib/ProLayout/components/ProFooter/style/index.less +0 -2
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +7 -9
- package/lib/ProLayout/components/ProHeader/index.js +44 -47
- package/lib/ProLayout/components/ProHeader/style/index.less +0 -2
- package/lib/ProLayout/components/TabsManager/components/TabContextMenu.js +2 -3
- package/lib/ProLayout/components/TabsManager/hooks/useTabsState.js +0 -2
- package/lib/ProLayout/index.js +79 -40
- package/lib/ProLayout/style/index.less +2 -3
- package/lib/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/lib/ProSelect/index.js +7 -15
- package/lib/ProSelect/index.less +0 -2
- package/lib/ProSelect/propsType.d.ts +1 -1
- package/lib/ProStep/components/Anchor/index.js +2 -3
- package/lib/ProStep/components/Item/index.js +1 -1
- package/lib/ProStep/components/Step/index.js +1 -0
- package/lib/ProStep/style/index.less +2 -4
- package/lib/ProTable/components/FormatColumn/index.js +33 -31
- package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +16 -13
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.js +15 -18
- package/lib/ProTable/components/RenderSummary/index.js +4 -6
- package/lib/ProTable/components/RenderTableHeader/index.js +3 -5
- package/lib/ProTable/components/RenderTabs/index.js +3 -6
- package/lib/ProTable/components/TableResizable/index.js +2 -1
- package/lib/ProTable/components/TooltipTitle/index.js +2 -3
- package/lib/ProTable/hooks/useAntdTable.js +4 -7
- package/lib/ProTable/index.d.ts +0 -7
- package/lib/ProTable/index.js +10 -13
- package/lib/ProTable/propsType.d.ts +2 -3
- package/lib/ProTable/style/index.less +4 -6
- package/lib/ProTabs/components/Card/index.js +5 -11
- package/lib/ProTabs/index.js +2 -3
- package/lib/ProTabs/style/index.less +0 -2
- package/lib/ProThemeTools/component/ProTools/index.js +18 -22
- package/lib/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/lib/ProThemeTools/context/ThemeContext.js +145 -0
- package/lib/ProThemeTools/index.d.ts +4 -8
- package/lib/ProThemeTools/index.js +88 -48
- package/lib/ProThemeTools/style/index.less +1 -3
- package/lib/ProThemeTools/utils/index.d.ts +16 -6
- package/lib/ProThemeTools/utils/index.js +34 -27
- package/lib/ProTooltip/index.js +14 -9
- package/lib/ProTooltip/style/index.less +0 -2
- package/lib/ProTree/components/AdaptiveTooltip.js +2 -4
- package/lib/ProTree/components/List.js +3 -4
- package/lib/ProTree/components/ProTree.js +5 -12
- package/lib/ProTree/components/ProTreeSelect/index.js +28 -26
- package/lib/ProTree/components/ProTreeSelect/style/index.less +0 -2
- package/lib/ProTree/components/Tree.js +6 -13
- package/lib/ProTree/index.js +0 -8
- package/lib/ProTree/propsType.d.ts +1 -1
- package/lib/ProTree/style/index.less +8 -6
- package/lib/ProTreeModal/components/Cascader.js +3 -4
- package/lib/ProTreeModal/components/List.js +11 -17
- package/lib/ProTreeModal/components/SortableItem.js +2 -3
- package/lib/ProTreeModal/components/Tree.js +3 -4
- package/lib/ProTreeModal/components/Trigger.js +6 -11
- package/lib/ProTreeModal/index.d.ts +0 -1
- package/lib/ProTreeModal/index.js +10 -20
- package/lib/ProTreeModal/style/index.less +12 -3
- package/lib/ProUpload/components/ButtonRender.js +4 -7
- package/lib/ProUpload/components/DragRender.js +2 -3
- package/lib/ProUpload/components/FileItem.d.ts +0 -1
- package/lib/ProUpload/components/FileItem.js +15 -21
- package/lib/ProUpload/components/ImageRender.js +8 -17
- package/lib/ProUpload/index.js +3 -4
- package/lib/ProUpload/style/index.less +171 -12
- package/lib/ProViewer/index.js +30 -36
- package/lib/ProViewer/propsType.js +3 -1
- package/lib/ProViewer/style/index.less +0 -2
- package/lib/ProWaterMark/index.js +3 -4
- package/lib/ProWaterMark/propsType.d.ts +5 -24
- package/lib/global.less +2 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.js +34 -21
- package/lib/locale/en_US.js +1 -1
- package/lib/locale/index.d.ts +2 -0
- package/lib/locale/index.js +14 -3
- package/lib/locale/zh_CN.js +1 -1
- package/lib/style/components.less +0 -3
- package/lib/style/index.less +1 -1
- package/lib/style/theme/antd.less +36 -48
- package/lib/style/theme/base.less +90 -0
- package/lib/style/theme/index.less +2 -89
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +41 -2
- package/package.json +37 -25
- package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/es/ProEditTable/components/RcTable/VirtualTable.js +0 -9
- package/es/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/es/ProForm/components/combination/ProCombination/index.js +0 -208
- package/es/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/es/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -110
- package/es/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/es/ProForm/components/old/EnumSelect/index.js +0 -265
- package/es/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/es/ProForm/components/old/EnumSelect/interface.js +0 -1
- package/es/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/es/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/es/ProForm/components/old/InputRange/index.js +0 -101
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/es/ProForm/components/old/InputWithSuffix/index.js +0 -47
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/es/ProForm/components/old/ProAddress/index.js +0 -276
- package/es/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/es/ProForm/components/old/ProAddress/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/es/ProForm/components/old/ProCertNo/index.js +0 -66
- package/es/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/es/ProForm/components/old/ProCertNo/propsType.js +0 -1
- package/es/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/es/ProForm/components/old/ProCertValidity/index.js +0 -186
- package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/ProForm/components/old/ProCertValidity/propsType.js +0 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/es/ProForm/components/old/ProRangeBox/index.js +0 -98
- package/es/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/es/ProForm/components/old/ProRangeBox/propsType.js +0 -1
- package/es/ProUpload/style/fileItem.less +0 -159
- package/es/old/ProCertValidity/index.d.ts +0 -9
- package/es/old/ProCertValidity/index.js +0 -186
- package/es/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/old/ProCertValidity/propsType.js +0 -1
- package/es/old/ProEditableTable/index.d.ts +0 -4
- package/es/old/ProEditableTable/index.js +0 -594
- package/es/old/ProEditableTable/propsType.d.ts +0 -68
- package/es/old/ProEditableTable/propsType.js +0 -1
- package/es/old/ProEditableTable/style/index.less +0 -75
- package/es/old/ProEditableTable/utils.d.ts +0 -29
- package/es/old/ProEditableTable/utils.js +0 -321
- package/lib/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/lib/ProEditTable/components/RcTable/VirtualTable.js +0 -14
- package/lib/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/lib/ProForm/components/combination/ProCombination/index.js +0 -217
- package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/lib/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -117
- package/lib/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/lib/ProForm/components/old/EnumSelect/index.js +0 -271
- package/lib/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/lib/ProForm/components/old/EnumSelect/interface.js +0 -5
- package/lib/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/lib/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/lib/ProForm/components/old/InputRange/index.js +0 -108
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/lib/ProForm/components/old/InputWithSuffix/index.js +0 -53
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/lib/ProForm/components/old/ProAddress/index.js +0 -284
- package/lib/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/lib/ProForm/components/old/ProAddress/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/lib/ProForm/components/old/ProCertNo/index.js +0 -72
- package/lib/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/lib/ProForm/components/old/ProCertNo/propsType.js +0 -5
- package/lib/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/lib/ProForm/components/old/ProCertValidity/index.js +0 -192
- package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/ProForm/components/old/ProCertValidity/propsType.js +0 -5
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/lib/ProForm/components/old/ProRangeBox/index.js +0 -105
- package/lib/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/lib/ProForm/components/old/ProRangeBox/propsType.js +0 -5
- package/lib/ProUpload/style/fileItem.less +0 -159
- package/lib/old/ProCertValidity/index.d.ts +0 -9
- package/lib/old/ProCertValidity/index.js +0 -192
- package/lib/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/old/ProCertValidity/propsType.js +0 -5
- package/lib/old/ProEditableTable/index.d.ts +0 -4
- package/lib/old/ProEditableTable/index.js +0 -598
- package/lib/old/ProEditableTable/propsType.d.ts +0 -68
- package/lib/old/ProEditableTable/propsType.js +0 -5
- package/lib/old/ProEditableTable/style/index.less +0 -75
- package/lib/old/ProEditableTable/utils.d.ts +0 -29
- package/lib/old/ProEditableTable/utils.js +0 -329
- /package/es/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
- /package/lib/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import "antd/es/tree/style";
|
|
2
|
-
import _Tree from "antd/es/tree";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
4
|
var _excluded = ["checkedValues", "disabled", "treeData", "searchStr", "originalTreeData", "showCodeName", "checkStrictly", "flatTreeData", "mode", "fieldNames", "tags", "onCheck", "handleFilterClose", "optionRender"];
|
|
7
5
|
/* eslint-disable no-plusplus */
|
|
8
6
|
import React, { forwardRef, useEffect, useMemo, useState } from 'react';
|
|
7
|
+
import { Tree } from 'antd';
|
|
9
8
|
import ListComponent from "./List";
|
|
10
9
|
import SearchTitle from "./SearchTitle";
|
|
11
10
|
import CloseIcon from "./CloseIcon";
|
|
@@ -173,7 +172,7 @@ function List(props, ref) {
|
|
|
173
172
|
setAutoExpandParent(false);
|
|
174
173
|
};
|
|
175
174
|
if (mode === 'render') {
|
|
176
|
-
return /*#__PURE__*/_jsx(
|
|
175
|
+
return /*#__PURE__*/_jsx(Tree, {
|
|
177
176
|
disabled: disabled,
|
|
178
177
|
style: {
|
|
179
178
|
width: '100%'
|
|
@@ -200,7 +199,7 @@ function List(props, ref) {
|
|
|
200
199
|
showCodeName: showCodeName,
|
|
201
200
|
disabled: disabled,
|
|
202
201
|
ref: ref
|
|
203
|
-
}, restProps)) : /*#__PURE__*/_jsx(
|
|
202
|
+
}, restProps)) : /*#__PURE__*/_jsx(Tree, {
|
|
204
203
|
style: {
|
|
205
204
|
width: '100%'
|
|
206
205
|
},
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import "antd/es/input/style";
|
|
2
|
-
import _Input from "antd/es/input";
|
|
3
|
-
import "antd/es/space/style";
|
|
4
|
-
import _Space from "antd/es/space";
|
|
5
|
-
import "antd/es/select/style";
|
|
6
|
-
import _Select from "antd/es/select";
|
|
7
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
8
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
9
3
|
import { useEffect } from 'react';
|
|
10
4
|
import classNames from 'classnames';
|
|
5
|
+
import { Input, Select, Space } from 'antd';
|
|
11
6
|
import { CloseOutlined } from '@ant-design/icons';
|
|
12
7
|
import { ReactSVG } from 'react-svg';
|
|
13
8
|
import { useSetState } from 'ahooks';
|
|
@@ -97,10 +92,10 @@ function Trigger(props) {
|
|
|
97
92
|
};
|
|
98
93
|
var TriggerComponent = props => {
|
|
99
94
|
if (appoint) {
|
|
100
|
-
return /*#__PURE__*/_jsxs(
|
|
95
|
+
return /*#__PURE__*/_jsxs(Space.Compact, {
|
|
101
96
|
block: true,
|
|
102
97
|
style: _objectSpread({}, triggerStyle),
|
|
103
|
-
children: [/*#__PURE__*/_jsxs(
|
|
98
|
+
children: [/*#__PURE__*/_jsxs(Select, {
|
|
104
99
|
style: {
|
|
105
100
|
width: 'auto'
|
|
106
101
|
},
|
|
@@ -109,11 +104,11 @@ function Trigger(props) {
|
|
|
109
104
|
defaultValue: "appoint",
|
|
110
105
|
value: state.mode,
|
|
111
106
|
onChange: onAppointChange,
|
|
112
|
-
children: [/*#__PURE__*/_jsx(
|
|
107
|
+
children: [/*#__PURE__*/_jsx(Select.Option, {
|
|
113
108
|
value: "all",
|
|
114
109
|
disabled: allDisabled,
|
|
115
110
|
children: locale === null || locale === void 0 ? void 0 : locale.ProTreeModal.specifyMode[0]
|
|
116
|
-
}), /*#__PURE__*/_jsx(
|
|
111
|
+
}), /*#__PURE__*/_jsx(Select.Option, {
|
|
117
112
|
value: "appoint",
|
|
118
113
|
disabled: specifyDisabled,
|
|
119
114
|
children: locale === null || locale === void 0 ? void 0 : locale.ProTreeModal.specifyMode[1]
|
|
@@ -124,7 +119,7 @@ function Trigger(props) {
|
|
|
124
119
|
return props.children;
|
|
125
120
|
};
|
|
126
121
|
return /*#__PURE__*/_jsx(TriggerComponent, {
|
|
127
|
-
children: /*#__PURE__*/_jsx(
|
|
122
|
+
children: /*#__PURE__*/_jsx(Input, {
|
|
128
123
|
className: classNames(afterDisabled ? 'trigger-no-hover' : '', appoint ? 'pro-tree-modal-input-appoint' : ''),
|
|
129
124
|
onClick: handleClick,
|
|
130
125
|
value: checkedValues.length === 0 ? null : state.mode === 'all' ? formatMessage(locale === null || locale === void 0 ? void 0 : locale.ProTreeModal.checkAll1, {
|
package/es/ProTreeModal/index.js
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import "antd/es/button/style";
|
|
2
|
-
import _Button from "antd/es/button";
|
|
3
|
-
import "antd/es/input/style";
|
|
4
|
-
import _Input from "antd/es/input";
|
|
5
|
-
import "antd/es/checkbox/style";
|
|
6
|
-
import _Checkbox from "antd/es/checkbox";
|
|
7
|
-
import "antd/es/message/style";
|
|
8
|
-
import _message from "antd/es/message";
|
|
9
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
10
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
11
3
|
import React, { useEffect, useMemo, useRef } from 'react';
|
|
12
4
|
import { useDeepCompareEffect, useSetState, useRequest as useRequestFunc, useDebounceFn } from 'ahooks';
|
|
5
|
+
import { Button, Checkbox, Input, message } from 'antd';
|
|
13
6
|
import { cloneDeep, isFunction } from 'lodash';
|
|
14
7
|
import { ReactSVG } from 'react-svg';
|
|
15
8
|
import classNames from 'classnames';
|
|
@@ -19,7 +12,6 @@ import { getFlatTreeData, filterCheckedNodes, getChildrenKeys, findTreeNodeByKey
|
|
|
19
12
|
import { transformTreeToArray, treeNodeFind } from "../ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index";
|
|
20
13
|
import searchSVG from "../assets/input-search.svg";
|
|
21
14
|
import locale, { formatMessage } from "../locale";
|
|
22
|
-
import "./style/index.less";
|
|
23
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
17
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
@@ -31,7 +23,7 @@ var ProTreeModal = props => {
|
|
|
31
23
|
var _useProConfig = useProConfig('ProEnum'),
|
|
32
24
|
_useProConfig$dics = _useProConfig.dics,
|
|
33
25
|
dics = _useProConfig$dics === void 0 ? {} : _useProConfig$dics;
|
|
34
|
-
var listRef = useRef();
|
|
26
|
+
var listRef = useRef(null);
|
|
35
27
|
var open = props.open,
|
|
36
28
|
value = props.value,
|
|
37
29
|
onChange = props.onChange,
|
|
@@ -109,7 +101,7 @@ var ProTreeModal = props => {
|
|
|
109
101
|
responseData = transformResponse(res);
|
|
110
102
|
}
|
|
111
103
|
if (status !== 200) {
|
|
112
|
-
|
|
104
|
+
message.error(msg);
|
|
113
105
|
return;
|
|
114
106
|
}
|
|
115
107
|
setState({
|
|
@@ -253,7 +245,7 @@ var ProTreeModal = props => {
|
|
|
253
245
|
if (min) {
|
|
254
246
|
if (values.length < min) {
|
|
255
247
|
var _locale$ProTreeModal3;
|
|
256
|
-
|
|
248
|
+
message.error(formatMessage(locale === null || locale === void 0 || (_locale$ProTreeModal3 = locale.ProTreeModal) === null || _locale$ProTreeModal3 === void 0 ? void 0 : _locale$ProTreeModal3.selectMin, {
|
|
257
249
|
min
|
|
258
250
|
}));
|
|
259
251
|
return;
|
|
@@ -280,7 +272,6 @@ var ProTreeModal = props => {
|
|
|
280
272
|
var _state$flatTreeData$f;
|
|
281
273
|
// 处理 ProTable 场景下 disabled 的不需要被清理
|
|
282
274
|
var _checkedValues = span ? (_state$flatTreeData$f = state.flatTreeData.filter(item => item.disabled)) === null || _state$flatTreeData$f === void 0 ? void 0 : _state$flatTreeData$f.map(item => item[fieldNameValue]) : [];
|
|
283
|
-
onChange === null || onChange === void 0 || onChange([]);
|
|
284
275
|
setState({
|
|
285
276
|
checkedValues: _checkedValues,
|
|
286
277
|
beforeClearAllValues: state.checkedValues,
|
|
@@ -299,7 +290,6 @@ var ProTreeModal = props => {
|
|
|
299
290
|
checkedValues: state.beforeClearAllValues,
|
|
300
291
|
beforeClearAllValues: []
|
|
301
292
|
});
|
|
302
|
-
// onChange?.(state.beforeClearAllValues);
|
|
303
293
|
openChange === null || openChange === void 0 || openChange(false);
|
|
304
294
|
};
|
|
305
295
|
|
|
@@ -326,7 +316,7 @@ var ProTreeModal = props => {
|
|
|
326
316
|
}
|
|
327
317
|
if (max && checkedValues.length > max) {
|
|
328
318
|
var _locale$ProTreeModal4;
|
|
329
|
-
|
|
319
|
+
message.error(maxMessage ? transformMessage({
|
|
330
320
|
max
|
|
331
321
|
}, maxMessage) : formatMessage(locale === null || locale === void 0 || (_locale$ProTreeModal4 = locale.ProTreeModal) === null || _locale$ProTreeModal4 === void 0 ? void 0 : _locale$ProTreeModal4.selectMax, {
|
|
332
322
|
max
|
|
@@ -426,7 +416,7 @@ var ProTreeModal = props => {
|
|
|
426
416
|
}
|
|
427
417
|
if (max && checkedValues.length > max) {
|
|
428
418
|
var _locale$ProTreeModal5;
|
|
429
|
-
|
|
419
|
+
message.error(maxMessage ? transformMessage({
|
|
430
420
|
max
|
|
431
421
|
}, maxMessage) : formatMessage(locale === null || locale === void 0 || (_locale$ProTreeModal5 = locale.ProTreeModal) === null || _locale$ProTreeModal5 === void 0 ? void 0 : _locale$ProTreeModal5.selectMax, {
|
|
432
422
|
max
|
|
@@ -588,7 +578,7 @@ var ProTreeModal = props => {
|
|
|
588
578
|
}
|
|
589
579
|
if (max && checkedValues.length > max) {
|
|
590
580
|
var _locale$ProTreeModal6;
|
|
591
|
-
|
|
581
|
+
message.error(maxMessage ? transformMessage({
|
|
592
582
|
max
|
|
593
583
|
}, maxMessage) : formatMessage(locale === null || locale === void 0 || (_locale$ProTreeModal6 = locale.ProTreeModal) === null || _locale$ProTreeModal6 === void 0 ? void 0 : _locale$ProTreeModal6.selectMax, {
|
|
594
584
|
max
|
|
@@ -741,7 +731,7 @@ var ProTreeModal = props => {
|
|
|
741
731
|
title: title,
|
|
742
732
|
showType: "Modal",
|
|
743
733
|
className: "pro-tree-modal-container",
|
|
744
|
-
extraLeft: allValue !== undefined ? /*#__PURE__*/_jsx(
|
|
734
|
+
extraLeft: allValue !== undefined ? /*#__PURE__*/_jsx(Checkbox, {
|
|
745
735
|
checked: state.checkAll,
|
|
746
736
|
disabled: disabled,
|
|
747
737
|
onChange: handleAllCheck,
|
|
@@ -751,7 +741,7 @@ var ProTreeModal = props => {
|
|
|
751
741
|
className: "pro-tree-modal-content",
|
|
752
742
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
753
743
|
className: classNames('pro-tree-modal-box', modeType === CASCADER || modeType === LIST && span ? 'pro-tree-modal-cascader-box' : ''),
|
|
754
|
-
children: [/*#__PURE__*/_jsx(
|
|
744
|
+
children: [/*#__PURE__*/_jsx(Input, {
|
|
755
745
|
disabled: disabled,
|
|
756
746
|
allowClear: true,
|
|
757
747
|
value: state.searchStr,
|
|
@@ -772,7 +762,7 @@ var ProTreeModal = props => {
|
|
|
772
762
|
className: "pro-tree-modal-box-header",
|
|
773
763
|
children: [/*#__PURE__*/_jsxs("span", {
|
|
774
764
|
children: [locale === null || locale === void 0 || (_locale$ProTreeModal11 = locale.ProTreeModal) === null || _locale$ProTreeModal11 === void 0 ? void 0 : _locale$ProTreeModal11.check, " (", state.checkedValues.length, "/", max || state.flatTreeData.length, ")"]
|
|
775
|
-
}), /*#__PURE__*/_jsx(
|
|
765
|
+
}), /*#__PURE__*/_jsx(Button, {
|
|
776
766
|
disabled: disabled,
|
|
777
767
|
type: "link",
|
|
778
768
|
onClick: handleClearAll,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
@root-entry-name: 'default';
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
|
3
1
|
|
|
4
2
|
.pro-tree-modal-container .@{ant-prefix}-modal-content .@{ant-prefix}-modal-body {
|
|
5
|
-
max-height: 498px;
|
|
3
|
+
max-height: 498px !important;
|
|
6
4
|
}
|
|
7
5
|
|
|
8
6
|
.pro-tree-modal {
|
|
@@ -26,8 +24,16 @@
|
|
|
26
24
|
flex-direction: row;
|
|
27
25
|
height: 482px;
|
|
28
26
|
margin-bottom: calc(var(--zaui-space-size-md; 16px) * var(--zaui-size; 1));
|
|
27
|
+
.checked-container {
|
|
28
|
+
.@{ant-prefix}-btn {
|
|
29
|
+
&:active {
|
|
30
|
+
background: transparent;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
29
34
|
|
|
30
35
|
.@{ant-prefix}-tree-checkbox {
|
|
36
|
+
align-self: flex-start;
|
|
31
37
|
margin-top: 2px;
|
|
32
38
|
}
|
|
33
39
|
|
|
@@ -238,6 +244,9 @@
|
|
|
238
244
|
}
|
|
239
245
|
|
|
240
246
|
.pro-transfer-right {
|
|
247
|
+
.@{ant-prefix}-checkbox {
|
|
248
|
+
align-items: flex-start;
|
|
249
|
+
}
|
|
241
250
|
.checked-item {
|
|
242
251
|
margin: var(--zaui-space-size-sm, 8px) 0;
|
|
243
252
|
&.dragable {
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import "antd/es/upload/style";
|
|
2
|
-
import _Upload from "antd/es/upload";
|
|
3
|
-
import "antd/es/button/style";
|
|
4
|
-
import _Button from "antd/es/button";
|
|
5
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
6
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
7
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
|
+
import { Button, Upload } from 'antd';
|
|
8
5
|
import { DndContext } from '@dnd-kit/core';
|
|
9
6
|
import { SortableContext, rectSortingStrategy } from '@dnd-kit/sortable';
|
|
10
7
|
import { CloudUploadOutlined } from '@ant-design/icons';
|
|
@@ -83,10 +80,10 @@ var ButtonRender = props => {
|
|
|
83
80
|
children: /*#__PURE__*/_jsx(SortableContext, {
|
|
84
81
|
items: fileList.map(i => i.uid),
|
|
85
82
|
strategy: rectSortingStrategy,
|
|
86
|
-
children: /*#__PURE__*/_jsx(
|
|
83
|
+
children: /*#__PURE__*/_jsx(Upload, _objectSpread(_objectSpread({}, buttonUploadProps), {}, {
|
|
87
84
|
children: !isView && /*#__PURE__*/_jsxs("div", {
|
|
88
85
|
className: "pro-upload-button-inner",
|
|
89
|
-
children: [/*#__PURE__*/_jsxs(
|
|
86
|
+
children: [/*#__PURE__*/_jsxs(Button, _objectSpread(_objectSpread({}, buttonProps), {}, {
|
|
90
87
|
disabled: disabled || isView,
|
|
91
88
|
children: [/*#__PURE__*/_jsx(CloudUploadOutlined, {}), buttonText]
|
|
92
89
|
})), afterRender ? /*#__PURE__*/_jsx("div", {
|
|
@@ -99,7 +96,7 @@ var ButtonRender = props => {
|
|
|
99
96
|
})
|
|
100
97
|
}), extraTipText && /*#__PURE__*/_jsx("div", {
|
|
101
98
|
className: "upload-tip-txt",
|
|
102
|
-
children: extraTipText
|
|
99
|
+
children: typeof extraTipText === 'function' ? extraTipText() : extraTipText
|
|
103
100
|
})]
|
|
104
101
|
});
|
|
105
102
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import "antd/es/upload/style";
|
|
3
|
-
import _Upload from "antd/es/upload";
|
|
4
2
|
import { useRef } from 'react';
|
|
3
|
+
import { Upload } from 'antd';
|
|
5
4
|
import { DndContext } from '@dnd-kit/core';
|
|
6
5
|
import { SortableContext, rectSortingStrategy } from '@dnd-kit/sortable';
|
|
7
6
|
import { CloudUploadOutlined } from '@ant-design/icons';
|
|
@@ -10,7 +9,7 @@ import { DraggableUploadListItem } from "./DraggableUploadListItem";
|
|
|
10
9
|
import locale from "../../locale";
|
|
11
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
var Dragger =
|
|
12
|
+
var Dragger = Upload.Dragger;
|
|
14
13
|
var DragRender = props => {
|
|
15
14
|
var _locale$ProUpload3, _locale$ProUpload4, _locale$ProUpload5, _locale$ProUpload6;
|
|
16
15
|
var isView = props.isView,
|
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
import "antd/es/progress/style";
|
|
2
|
-
import _Progress from "antd/es/progress";
|
|
3
|
-
import "antd/es/popconfirm/style";
|
|
4
|
-
import _Popconfirm from "antd/es/popconfirm";
|
|
5
|
-
import "antd/es/button/style";
|
|
6
|
-
import _Button from "antd/es/button";
|
|
7
1
|
import React from 'react';
|
|
2
|
+
import { Progress, Button, Popconfirm } from 'antd';
|
|
8
3
|
import { ReactSVG } from 'react-svg';
|
|
9
4
|
import PDF from "../style/icon-PDF.png";
|
|
10
5
|
import TXT from "../style/icon-TXT.png";
|
|
@@ -14,7 +9,6 @@ import WORD from "../style/icon-word.png";
|
|
|
14
9
|
import lookSvg from "../../assets/look.svg";
|
|
15
10
|
import deleteSvg from "../../assets/delete.svg";
|
|
16
11
|
import downloadSvg from "../../assets/download.svg";
|
|
17
|
-
import "../style/fileItem.less";
|
|
18
12
|
|
|
19
13
|
/**
|
|
20
14
|
* @description: b 转成 Kb
|
|
@@ -45,7 +39,9 @@ export var getFileExt = fileName => {
|
|
|
45
39
|
export var getFileIcon = fileExt => {
|
|
46
40
|
if (['.PDF'].includes(fileExt.toLocaleUpperCase())) return PDF;
|
|
47
41
|
if (['.TXT', '.JSON'].includes(fileExt.toLocaleUpperCase())) return TXT;
|
|
48
|
-
if (['.PNG', '.JPG', '.JPEG', '.GIF', '.BMP', '.JPE'].includes(fileExt.toLocaleUpperCase()))
|
|
42
|
+
if (['.PNG', '.JPG', '.JPEG', '.GIF', '.BMP', '.JPE'].includes(fileExt.toLocaleUpperCase())) {
|
|
43
|
+
return PIC;
|
|
44
|
+
}
|
|
49
45
|
if (['.DOC', '.DOCX'].includes(fileExt.toLocaleUpperCase())) return WORD;
|
|
50
46
|
if (['.XLS', '.XLSX'].includes(fileExt.toLocaleUpperCase())) return EXCEL;
|
|
51
47
|
return TXT;
|
|
@@ -104,7 +100,7 @@ var FileItem = props => {
|
|
|
104
100
|
className: "file-actions-wrap",
|
|
105
101
|
children: /*#__PURE__*/_jsxs("div", {
|
|
106
102
|
className: "file-actions",
|
|
107
|
-
children: [_isShowDownloadIcon && /*#__PURE__*/_jsx(
|
|
103
|
+
children: [_isShowDownloadIcon && /*#__PURE__*/_jsx(Button, {
|
|
108
104
|
type: "link",
|
|
109
105
|
className: "file-action-item",
|
|
110
106
|
onClick: _onDownload,
|
|
@@ -113,7 +109,7 @@ var FileItem = props => {
|
|
|
113
109
|
wrapper: "span",
|
|
114
110
|
src: downloadSvg
|
|
115
111
|
})
|
|
116
|
-
}), _showPreViewIcon && /*#__PURE__*/_jsx(
|
|
112
|
+
}), _showPreViewIcon && /*#__PURE__*/_jsx(Button, {
|
|
117
113
|
type: "link",
|
|
118
114
|
className: "file-action-item",
|
|
119
115
|
onClick: _onPreview,
|
|
@@ -123,12 +119,12 @@ var FileItem = props => {
|
|
|
123
119
|
color: "#006aff",
|
|
124
120
|
src: lookSvg
|
|
125
121
|
})
|
|
126
|
-
}), _showRemoveIcon && !disabled && (isConfirmDelete ? /*#__PURE__*/_jsx(
|
|
122
|
+
}), _showRemoveIcon && !disabled && (isConfirmDelete ? /*#__PURE__*/_jsx(Popconfirm, {
|
|
127
123
|
title: "\u786E\u5B9A\u5220\u9664?",
|
|
128
124
|
onConfirm: _onRemove,
|
|
129
125
|
okText: "\u786E\u8BA4",
|
|
130
126
|
cancelText: "\u53D6\u6D88",
|
|
131
|
-
children: /*#__PURE__*/_jsx(
|
|
127
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
132
128
|
type: "link",
|
|
133
129
|
className: "file-action-item",
|
|
134
130
|
disabled: disabled,
|
|
@@ -138,7 +134,7 @@ var FileItem = props => {
|
|
|
138
134
|
src: deleteSvg
|
|
139
135
|
})
|
|
140
136
|
})
|
|
141
|
-
}) : /*#__PURE__*/_jsx(
|
|
137
|
+
}) : /*#__PURE__*/_jsx(Button, {
|
|
142
138
|
type: "link",
|
|
143
139
|
className: "file-action-item",
|
|
144
140
|
disabled: disabled,
|
|
@@ -153,10 +149,9 @@ var FileItem = props => {
|
|
|
153
149
|
})]
|
|
154
150
|
}), file.status === 'uploading' && /*#__PURE__*/_jsx("div", {
|
|
155
151
|
className: "file-progress",
|
|
156
|
-
children: /*#__PURE__*/_jsx(
|
|
152
|
+
children: /*#__PURE__*/_jsx(Progress, {
|
|
157
153
|
percent: Math.ceil(file.percent),
|
|
158
|
-
size:
|
|
159
|
-
strokeWidth: 2
|
|
154
|
+
size: 2
|
|
160
155
|
})
|
|
161
156
|
})]
|
|
162
157
|
});
|
|
@@ -201,7 +196,7 @@ var DragSingleFileItem = props => {
|
|
|
201
196
|
className: "file-actions-wrap",
|
|
202
197
|
children: /*#__PURE__*/_jsxs("div", {
|
|
203
198
|
className: "file-actions",
|
|
204
|
-
children: [_showPreViewIcon && /*#__PURE__*/_jsx(
|
|
199
|
+
children: [_showPreViewIcon && /*#__PURE__*/_jsx(Button, {
|
|
205
200
|
type: "link",
|
|
206
201
|
className: "file-action-item",
|
|
207
202
|
onClick: _onPreview,
|
|
@@ -210,7 +205,7 @@ var DragSingleFileItem = props => {
|
|
|
210
205
|
wrapper: "span",
|
|
211
206
|
src: lookSvg
|
|
212
207
|
})
|
|
213
|
-
}), _isShowDownloadIcon && /*#__PURE__*/_jsx(
|
|
208
|
+
}), _isShowDownloadIcon && /*#__PURE__*/_jsx(Button, {
|
|
214
209
|
type: "link",
|
|
215
210
|
className: "file-action-item",
|
|
216
211
|
onClick: _onDownload,
|
|
@@ -224,10 +219,9 @@ var DragSingleFileItem = props => {
|
|
|
224
219
|
})]
|
|
225
220
|
}), file.status === 'uploading' && /*#__PURE__*/_jsx("div", {
|
|
226
221
|
className: "file-progress",
|
|
227
|
-
children: /*#__PURE__*/_jsx(
|
|
222
|
+
children: /*#__PURE__*/_jsx(Progress, {
|
|
228
223
|
percent: Math.ceil(file.percent),
|
|
229
|
-
size:
|
|
230
|
-
strokeWidth: 2
|
|
224
|
+
size: 2
|
|
231
225
|
})
|
|
232
226
|
})]
|
|
233
227
|
});
|
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
import "antd/es/space/style";
|
|
2
|
-
import _Space from "antd/es/space";
|
|
3
|
-
import "antd/es/modal/style";
|
|
4
|
-
import _Modal from "antd/es/modal";
|
|
5
|
-
import "antd/es/upload/style";
|
|
6
|
-
import _Upload from "antd/es/upload";
|
|
7
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
8
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
9
|
-
import "antd/es/button/style";
|
|
10
|
-
import _Button from "antd/es/button";
|
|
11
|
-
import "antd/es/progress/style";
|
|
12
|
-
import _Progress from "antd/es/progress";
|
|
13
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
14
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
|
+
import { Button, Upload, Progress, Space, Modal } from 'antd';
|
|
15
6
|
import { useRef, useState } from 'react';
|
|
16
7
|
import { DndContext } from '@dnd-kit/core';
|
|
17
8
|
import { SortableContext, rectSortingStrategy } from '@dnd-kit/sortable';
|
|
@@ -117,7 +108,7 @@ var ImageRender = props => {
|
|
|
117
108
|
className: `file-item-image ${file.status === 'error' ? 'actions-wrap-error' : ''}`,
|
|
118
109
|
children: [file.status === 'uploading' && /*#__PURE__*/_jsx("div", {
|
|
119
110
|
className: "image-uploading",
|
|
120
|
-
children: /*#__PURE__*/_jsx(
|
|
111
|
+
children: /*#__PURE__*/_jsx(Progress, {
|
|
121
112
|
size: "small",
|
|
122
113
|
percent: Math.ceil(file.percent)
|
|
123
114
|
})
|
|
@@ -132,7 +123,7 @@ var ImageRender = props => {
|
|
|
132
123
|
className: "actions-wrap ",
|
|
133
124
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
134
125
|
className: "action-top",
|
|
135
|
-
children: [_showPreview && /*#__PURE__*/_jsx(
|
|
126
|
+
children: [_showPreview && /*#__PURE__*/_jsx(Button, {
|
|
136
127
|
type: "link",
|
|
137
128
|
className: "action-item",
|
|
138
129
|
onClick: () => {
|
|
@@ -144,7 +135,7 @@ var ImageRender = props => {
|
|
|
144
135
|
src: lookSvg
|
|
145
136
|
}),
|
|
146
137
|
children: locale === null || locale === void 0 || (_locale$ProUpload = locale.ProUpload) === null || _locale$ProUpload === void 0 ? void 0 : _locale$ProUpload.view
|
|
147
|
-
}), _isShowDownload && /*#__PURE__*/_jsx(
|
|
138
|
+
}), _isShowDownload && /*#__PURE__*/_jsx(Button, {
|
|
148
139
|
type: "link",
|
|
149
140
|
disabled: isView || disabled,
|
|
150
141
|
className: "action-item",
|
|
@@ -160,7 +151,7 @@ var ImageRender = props => {
|
|
|
160
151
|
})]
|
|
161
152
|
}), /*#__PURE__*/_jsx("div", {
|
|
162
153
|
className: "action-button",
|
|
163
|
-
children: /*#__PURE__*/_jsx(
|
|
154
|
+
children: /*#__PURE__*/_jsx(Button, {
|
|
164
155
|
type: "link",
|
|
165
156
|
disabled: isView || disabled,
|
|
166
157
|
className: "action-item",
|
|
@@ -214,7 +205,7 @@ var ImageRender = props => {
|
|
|
214
205
|
});
|
|
215
206
|
}
|
|
216
207
|
});
|
|
217
|
-
return /*#__PURE__*/_jsxs(
|
|
208
|
+
return /*#__PURE__*/_jsxs(Space, {
|
|
218
209
|
direction: "vertical",
|
|
219
210
|
size: 8,
|
|
220
211
|
className: "pro-upload-image",
|
|
@@ -226,7 +217,7 @@ var ImageRender = props => {
|
|
|
226
217
|
children: /*#__PURE__*/_jsx(SortableContext, {
|
|
227
218
|
items: fileList.map(i => i.uid),
|
|
228
219
|
strategy: rectSortingStrategy,
|
|
229
|
-
children: /*#__PURE__*/_jsx(
|
|
220
|
+
children: /*#__PURE__*/_jsx(Upload, _objectSpread(_objectSpread({}, imageUploadProps), {}, {
|
|
230
221
|
children: fileList.length < maxCount && !isView && (centerRender ? isFunction(centerRender) ? centerRender() : centerRender : /*#__PURE__*/_jsxs("div", {
|
|
231
222
|
className: `pro-upload-image-inner ${disabled ? 'pro-upload-image-disabled' : ''} `,
|
|
232
223
|
children: [/*#__PURE__*/_jsx(PlusOutlined, {}), /*#__PURE__*/_jsx("div", {
|
|
@@ -250,7 +241,7 @@ var ImageRender = props => {
|
|
|
250
241
|
}), /*#__PURE__*/_jsx("div", {
|
|
251
242
|
className: "pro-upload-image-footer",
|
|
252
243
|
children: footerRender()
|
|
253
|
-
}), /*#__PURE__*/_jsx(
|
|
244
|
+
}), /*#__PURE__*/_jsx(Modal, {
|
|
254
245
|
title: previewImg === null || previewImg === void 0 ? void 0 : previewImg.name,
|
|
255
246
|
width: "600",
|
|
256
247
|
style: {
|
package/es/ProUpload/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import "antd/es/message/style";
|
|
2
|
-
import _message from "antd/es/message";
|
|
3
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
6
4
|
var _excluded = ["value", "size", "action", "maxCount", "headerRender", "footerRender", "centerRender", "disabled", "uploadType", "buttonProps", "accept", "extraTipText", "beforeUpload", "onChange", "onDownload", "onPreview", "onRemove", "filterOriginFileObj", "method", "className", "dataParams", "name", "showExampleContent", "showUploadList", "otherProps", "transformResponse", "exampleTitle", "exampleContent", "exampleModalProps", "buttonText", "afterRender", "fieldNames", "isConfirmDelete", "customTextRender"];
|
|
7
5
|
import React, { useEffect, useState, useImperativeHandle } from 'react';
|
|
6
|
+
import { message } from 'antd';
|
|
8
7
|
import { isFunction, omit } from 'lodash';
|
|
9
8
|
import { PointerSensor, useSensor } from '@dnd-kit/core';
|
|
10
9
|
import { arrayMove } from '@dnd-kit/sortable';
|
|
@@ -173,12 +172,12 @@ var ProUpload = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
173
172
|
var handleBeforeUpload = (file, fileList) => {
|
|
174
173
|
if (!validateFileExt(extExt, file)) {
|
|
175
174
|
var _locale$ProUpload2;
|
|
176
|
-
|
|
175
|
+
message.error(`${locale === null || locale === void 0 || (_locale$ProUpload2 = locale.ProUpload) === null || _locale$ProUpload2 === void 0 ? void 0 : _locale$ProUpload2.errorInfoExt}【${extExt.join('、')}】`);
|
|
177
176
|
return false;
|
|
178
177
|
}
|
|
179
178
|
if (!validateSize(size, file)) {
|
|
180
179
|
var _locale$ProUpload3;
|
|
181
|
-
|
|
180
|
+
message.error(`${locale === null || locale === void 0 || (_locale$ProUpload3 = locale.ProUpload) === null || _locale$ProUpload3 === void 0 ? void 0 : _locale$ProUpload3.errorInfoSize}${size}M`);
|
|
182
181
|
return false;
|
|
183
182
|
}
|
|
184
183
|
if (beforeUpload) {
|