@zat-design/sisyphus-react 3.13.13 → 4.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/babel.config.js +34 -1
- package/dist/index.esm.css +557 -341
- package/dist/less.esm.css +527 -309
- package/es/FormsProvider/index.d.ts +4 -1
- package/es/ProAction/components/CheckModalContent/index.js +0 -8
- package/es/ProAction/index.js +45 -48
- package/es/ProAction/index.less +2 -2
- package/es/ProConfigProvider/index.d.ts +21 -4
- package/es/ProConfigProvider/index.js +51 -22
- package/es/ProDownload/index.js +62 -65
- package/es/ProDownload/style/index.less +2 -2
- package/es/ProDownload/utils.js +45 -51
- package/es/ProDrawerForm/components/ProDrawer/index.js +64 -69
- package/es/ProDrawerForm/components/ProModal/index.js +59 -67
- package/es/ProDrawerForm/index.d.ts +2 -1
- package/es/ProDrawerForm/index.js +4 -6
- package/es/ProDrawerForm/propsType.d.ts +7 -18
- package/es/ProDrawerForm/style/index.less +8 -14
- package/es/ProEditLabel/components/RenderProForm.js +2 -3
- package/es/ProEditLabel/index.js +40 -45
- package/es/ProEditLabel/propsType.d.ts +1 -6
- package/es/ProEditLabel/style/index.less +4 -3
- package/es/ProEditTable/components/ActionButton/index.js +5 -8
- package/es/ProEditTable/components/RcTable/BaseTable.js +73 -55
- package/es/ProEditTable/components/RcTable/DraggableTable.js +66 -47
- package/es/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/es/ProEditTable/components/RcTable/index.js +1 -3
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/es/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/es/ProEditTable/components/RenderField/index.js +377 -253
- package/es/ProEditTable/components/RenderToolbar/index.js +19 -19
- package/es/ProEditTable/components/Summary/index.js +5 -8
- package/es/ProEditTable/components/Validator/index.js +3 -6
- package/es/ProEditTable/index.js +128 -131
- package/es/ProEditTable/propsType.d.ts +1 -7
- package/es/ProEditTable/style/index.less +3 -7
- package/es/ProEditTable/utils/config.js +31 -35
- package/es/ProEditTable/utils/index.js +44 -41
- package/es/ProEditTable/utils/tools.js +107 -110
- package/es/ProEditTable/utils/useEditTableError.js +12 -4
- package/es/ProEnum/hooks/useEnumRequest.js +44 -47
- package/es/ProEnum/index.js +10 -17
- package/es/ProEnum/style/index.less +2 -2
- package/es/ProEnum/utils/index.d.ts +1 -0
- package/es/ProEnum/utils/index.js +2 -1
- package/es/ProForm/components/Container.d.ts +1 -0
- package/es/ProForm/components/Container.js +2 -3
- package/es/ProForm/components/FormFooter/index.js +13 -13
- package/es/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/es/ProForm/components/base/Checkbox/index.js +3 -4
- package/es/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/es/ProForm/components/base/DatePicker/index.js +7 -7
- package/es/ProForm/components/base/DatePicker/useDateLimit.d.ts +1 -7
- package/es/ProForm/components/base/DatePicker/useDateLimit.js +1 -3
- package/es/ProForm/components/base/Input/index.js +6 -13
- package/es/ProForm/components/base/InputNumber/index.js +3 -6
- package/es/ProForm/components/base/Radio/index.js +3 -4
- package/es/ProForm/components/base/RangePicker/index.js +6 -7
- package/es/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/es/ProForm/components/base/Select/index.js +2 -3
- package/es/ProForm/components/base/Switch/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/es/ProForm/components/base/SwitchCheckbox/style/index.less +2 -2
- package/es/ProForm/components/base/TextArea/index.js +3 -4
- package/es/ProForm/components/base/TextArea/index.less +12 -2
- package/es/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/es/ProForm/components/base/TimePicker/index.js +6 -7
- package/es/ProForm/components/base/TimePicker/style/index.less +5 -3
- package/es/ProForm/components/combination/Container/style/index.less +2 -2
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +28 -26
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +3 -6
- package/es/ProForm/components/combination/FormList/components/Empty.js +18 -19
- package/es/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +17 -21
- package/es/ProForm/components/combination/FormList/index.js +2 -3
- package/es/ProForm/components/combination/FormList/style/index.less +38 -2
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/es/ProForm/components/combination/Group/index.d.ts +2 -8
- package/es/ProForm/components/combination/Group/index.js +12 -6
- package/es/ProForm/components/combination/Group/style/index.less +7 -87
- package/es/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/es/ProForm/components/combination/Group/utils.js +4 -5
- package/es/ProForm/components/combination/ProCascader/index.js +21 -20
- package/es/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/es/ProForm/components/combination/ProCascader/style/index.less +2 -2
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +6 -8
- package/es/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/es/ProForm/components/combination/ProModalSelect/index.js +97 -116
- package/es/ProForm/components/combination/ProModalSelect/style/index.less +13 -14
- package/es/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/es/ProForm/components/combination/ProNumberRange/index.js +17 -16
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +5 -52
- package/es/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/es/ProForm/components/combination/ProRangeLimit/index.js +44 -28
- package/es/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/es/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/es/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/es/ProForm/components/combination/ProTimeLimit/style/index.less +66 -6
- package/es/ProForm/components/index.d.ts +0 -8
- package/es/ProForm/components/index.js +1 -10
- package/es/ProForm/components/render/ChangedWrapper.js +8 -9
- package/es/ProForm/components/render/ConfirmWrapper.js +28 -29
- package/es/ProForm/components/render/Render.js +37 -40
- package/es/ProForm/components/render/propsType.d.ts +2 -6
- package/es/ProForm/index.js +9 -39
- package/es/ProForm/style/index.less +6 -16
- package/es/ProForm/utils/index.d.ts +15 -1
- package/es/ProForm/utils/index.js +63 -14
- package/es/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/es/ProForm/utils/useForm.js +84 -74
- package/es/ProForm/utils/useShouldUpdate.js +14 -14
- package/es/ProForm/utils/valueType.js +8 -8
- package/es/ProIcon/index.js +10 -13
- package/es/ProIcon/style/index.less +2 -2
- package/es/ProLayout/components/Layout/Header/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +11 -10
- package/es/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +42 -39
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -4
- package/es/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +12 -6
- package/es/ProLayout/components/Layout/Menu/SideMenu/style/index.less +9 -5
- package/es/ProLayout/components/Layout/Menu/index.js +1 -1
- package/es/ProLayout/components/Layout/Menu/style/index.less +2 -2
- package/es/ProLayout/components/Layout/Notice/style/index.less +2 -2
- package/es/ProLayout/components/ProCollapse/index.js +20 -36
- package/es/ProLayout/components/ProCollapse/style/index.less +3 -3
- package/es/ProLayout/components/ProFooter/index.js +3 -4
- package/es/ProLayout/components/ProFooter/style/index.less +2 -2
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +9 -9
- package/es/ProLayout/components/ProHeader/index.js +43 -46
- package/es/ProLayout/components/ProHeader/style/index.less +2 -2
- package/es/ProLayout/index.js +7 -6
- package/es/ProLayout/style/index.less +4 -3
- package/es/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/es/ProSelect/index.js +7 -17
- package/es/ProSelect/index.less +2 -2
- package/es/ProSelect/propsType.d.ts +1 -1
- package/es/ProStep/components/Anchor/index.js +2 -3
- package/es/ProStep/components/Item/index.js +2 -1
- package/es/ProStep/components/Listener/index.js +12 -14
- package/es/ProStep/components/Step/index.js +1 -0
- package/es/ProStep/index.js +39 -47
- package/es/ProStep/style/index.less +4 -4
- package/es/ProStepTab/index.js +72 -83
- package/es/ProTable/components/FormatColumn/index.js +32 -31
- package/es/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +39 -37
- package/es/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/es/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/es/ProTable/components/RenderColumn/index.js +15 -18
- package/es/ProTable/components/RenderSummary/index.js +4 -5
- package/es/ProTable/components/RenderTableHeader/index.js +3 -4
- package/es/ProTable/components/RenderTabs/index.js +3 -6
- package/es/ProTable/components/TableResizable/index.js +2 -1
- package/es/ProTable/components/TooltipTitle/index.js +2 -3
- package/es/ProTable/hooks/useAntdTable.js +21 -26
- package/es/ProTable/index.js +15 -16
- package/es/ProTable/propsType.d.ts +1 -3
- package/es/ProTable/style/index.less +5 -5
- package/es/ProTabs/components/Card/index.js +5 -10
- package/es/ProTabs/index.js +2 -3
- package/es/ProTabs/style/index.less +2 -2
- package/es/ProThemeTools/component/ProTools/index.js +18 -22
- package/es/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/es/ProThemeTools/context/ThemeContext.js +120 -0
- package/es/ProThemeTools/index.d.ts +4 -1
- package/es/ProThemeTools/index.js +60 -37
- package/es/ProThemeTools/style/index.less +3 -3
- package/es/ProThemeTools/utils/index.d.ts +16 -6
- package/es/ProThemeTools/utils/index.js +28 -24
- package/es/ProTooltip/index.js +14 -9
- package/es/ProTooltip/style/index.less +2 -2
- package/es/ProTree/components/AdaptiveTooltip.js +2 -3
- package/es/ProTree/components/List.js +3 -4
- package/es/ProTree/components/ProTree.js +19 -26
- package/es/ProTree/components/ProTreeSelect/index.js +38 -37
- package/es/ProTree/components/ProTreeSelect/style/index.less +2 -2
- package/es/ProTree/components/Tree.js +18 -25
- package/es/ProTree/index.js +0 -7
- package/es/ProTree/propsType.d.ts +1 -1
- package/es/ProTree/style/index.less +10 -6
- package/es/ProTreeModal/components/Cascader.js +3 -4
- package/es/ProTreeModal/components/List.js +11 -17
- package/es/ProTreeModal/components/SortableItem.js +2 -3
- package/es/ProTreeModal/components/Tree.js +3 -4
- package/es/ProTreeModal/components/Trigger.js +6 -11
- package/es/ProTreeModal/index.d.ts +0 -1
- package/es/ProTreeModal/index.js +14 -24
- package/es/ProTreeModal/style/index.less +14 -3
- package/es/ProUpload/components/ButtonRender.js +17 -20
- package/es/ProUpload/components/DragRender.js +2 -3
- package/es/ProUpload/components/FileItem.d.ts +0 -1
- package/es/ProUpload/components/FileItem.js +15 -21
- package/es/ProUpload/components/ImageRender.js +34 -43
- package/es/ProUpload/index.js +3 -4
- package/es/ProUpload/style/index.less +173 -12
- package/es/ProViewer/index.js +38 -45
- package/es/ProViewer/style/index.less +2 -2
- package/es/ProWaterMark/index.js +2 -3
- package/es/ProWaterMark/propsType.d.ts +5 -24
- package/es/global.less +2 -1
- package/es/index.d.ts +4 -2
- package/es/index.js +2 -3
- package/es/locale/en_US.js +1 -1
- package/es/locale/index.d.ts +2 -0
- package/es/locale/index.js +11 -2
- package/es/locale/zh_CN.js +1 -1
- package/es/style/components.less +0 -3
- package/es/style/theme/antd.less +38 -48
- package/es/style/theme/base.less +89 -0
- package/es/style/theme/index.less +2 -89
- package/es/utils/index.d.ts +7 -0
- package/es/utils/index.js +23 -1
- package/lib/FormsProvider/index.d.ts +4 -1
- package/lib/ProAction/components/CheckModalContent/index.js +0 -9
- package/lib/ProAction/index.js +45 -48
- package/lib/ProAction/index.less +2 -2
- package/lib/ProConfigProvider/index.d.ts +21 -4
- package/lib/ProConfigProvider/index.js +60 -31
- package/lib/ProDownload/index.js +62 -65
- package/lib/ProDownload/style/index.less +2 -2
- package/lib/ProDownload/utils.js +45 -54
- package/lib/ProDrawerForm/components/ProDrawer/index.js +64 -69
- package/lib/ProDrawerForm/components/ProModal/index.js +59 -67
- package/lib/ProDrawerForm/index.d.ts +2 -1
- package/lib/ProDrawerForm/index.js +4 -6
- package/lib/ProDrawerForm/propsType.d.ts +7 -18
- package/lib/ProDrawerForm/style/index.less +8 -14
- package/lib/ProEditLabel/components/RenderProForm.js +2 -3
- package/lib/ProEditLabel/index.js +40 -45
- package/lib/ProEditLabel/propsType.d.ts +1 -6
- package/lib/ProEditLabel/style/index.less +4 -3
- package/lib/ProEditTable/components/ActionButton/index.js +5 -8
- package/lib/ProEditTable/components/RcTable/BaseTable.js +72 -54
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +65 -46
- package/lib/ProEditTable/components/RcTable/index.d.ts +0 -2
- package/lib/ProEditTable/components/RcTable/index.js +1 -8
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +9 -12
- package/lib/ProEditTable/components/RenderField/index.d.ts +3 -2
- package/lib/ProEditTable/components/RenderField/index.js +378 -254
- package/lib/ProEditTable/components/RenderToolbar/index.js +19 -19
- package/lib/ProEditTable/components/Summary/index.js +5 -8
- package/lib/ProEditTable/components/Validator/index.js +3 -7
- package/lib/ProEditTable/index.js +126 -129
- package/lib/ProEditTable/propsType.d.ts +1 -7
- package/lib/ProEditTable/style/index.less +3 -7
- package/lib/ProEditTable/utils/config.js +31 -35
- package/lib/ProEditTable/utils/index.js +44 -41
- package/lib/ProEditTable/utils/tools.js +107 -113
- package/lib/ProEditTable/utils/useEditTableError.js +12 -4
- package/lib/ProEnum/hooks/useEnumRequest.js +43 -46
- package/lib/ProEnum/index.js +10 -17
- package/lib/ProEnum/style/index.less +2 -2
- package/lib/ProEnum/utils/index.d.ts +1 -0
- package/lib/ProEnum/utils/index.js +3 -1
- package/lib/ProForm/components/Container.d.ts +1 -0
- package/lib/ProForm/components/Container.js +2 -3
- package/lib/ProForm/components/FormFooter/index.js +13 -13
- package/lib/ProForm/components/FormFooter/propsType.d.ts +2 -0
- package/lib/ProForm/components/base/Checkbox/index.js +3 -4
- package/lib/ProForm/components/base/DatePicker/index.d.ts +1 -3
- package/lib/ProForm/components/base/DatePicker/index.js +7 -7
- package/lib/ProForm/components/base/DatePicker/useDateLimit.d.ts +1 -7
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +1 -3
- package/lib/ProForm/components/base/Input/index.js +6 -13
- package/lib/ProForm/components/base/InputNumber/index.js +3 -6
- package/lib/ProForm/components/base/Radio/index.js +3 -4
- package/lib/ProForm/components/base/RangePicker/index.js +6 -6
- package/lib/ProForm/components/base/RangePicker/useDateRange.d.ts +5 -5
- package/lib/ProForm/components/base/Select/index.js +2 -3
- package/lib/ProForm/components/base/Switch/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +2 -3
- package/lib/ProForm/components/base/SwitchCheckbox/style/index.less +2 -2
- package/lib/ProForm/components/base/TextArea/index.js +3 -4
- package/lib/ProForm/components/base/TextArea/index.less +12 -2
- package/lib/ProForm/components/base/TimePicker/index.d.ts +1 -2
- package/lib/ProForm/components/base/TimePicker/index.js +6 -7
- package/lib/ProForm/components/base/TimePicker/style/index.less +5 -3
- package/lib/ProForm/components/combination/Container/style/index.less +2 -2
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +28 -26
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +3 -6
- package/lib/ProForm/components/combination/FormList/components/Empty.js +18 -19
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +2 -3
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +17 -21
- package/lib/ProForm/components/combination/FormList/index.js +2 -3
- package/lib/ProForm/components/combination/FormList/style/index.less +38 -2
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.d.ts +1 -0
- package/lib/ProForm/components/combination/Group/index.d.ts +2 -8
- package/lib/ProForm/components/combination/Group/index.js +13 -6
- package/lib/ProForm/components/combination/Group/style/index.less +7 -87
- package/lib/ProForm/components/combination/Group/utils.d.ts +1 -1
- package/lib/ProForm/components/combination/Group/utils.js +4 -5
- package/lib/ProForm/components/combination/ProCascader/index.js +23 -22
- package/lib/ProForm/components/combination/ProCascader/propsType.d.ts +1 -1
- package/lib/ProForm/components/combination/ProCascader/style/index.less +2 -2
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +6 -8
- package/lib/ProForm/components/combination/ProModalSelect/index.d.ts +1 -1
- package/lib/ProForm/components/combination/ProModalSelect/index.js +97 -116
- package/lib/ProForm/components/combination/ProModalSelect/style/index.less +13 -14
- package/lib/ProForm/components/combination/ProNumberRange/index.d.ts +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/index.js +17 -16
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +5 -52
- package/lib/ProForm/components/combination/ProRangeLimit/index.d.ts +2 -23
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +44 -28
- package/lib/ProForm/components/combination/ProRangeLimit/propsType.d.ts +23 -0
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.d.ts +3 -2
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +14 -2
- package/lib/ProForm/components/combination/ProTimeLimit/index.d.ts +5 -6
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +23 -20
- package/lib/ProForm/components/combination/ProTimeLimit/style/index.less +66 -6
- package/lib/ProForm/components/index.d.ts +0 -8
- package/lib/ProForm/components/index.js +1 -63
- package/lib/ProForm/components/render/ChangedWrapper.js +8 -9
- package/lib/ProForm/components/render/ConfirmWrapper.js +28 -29
- package/lib/ProForm/components/render/Render.js +37 -39
- package/lib/ProForm/components/render/propsType.d.ts +2 -6
- package/lib/ProForm/index.js +8 -38
- package/lib/ProForm/style/index.less +6 -16
- package/lib/ProForm/utils/index.d.ts +15 -1
- package/lib/ProForm/utils/index.js +65 -17
- package/lib/ProForm/utils/useDeepCompareMemo.js +4 -4
- package/lib/ProForm/utils/useForm.js +83 -73
- package/lib/ProForm/utils/useShouldUpdate.js +14 -14
- package/lib/ProForm/utils/valueType.js +8 -8
- package/lib/ProIcon/index.js +10 -13
- package/lib/ProIcon/style/index.less +2 -2
- package/lib/ProLayout/components/Layout/Header/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +11 -10
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/style/index.less +42 -39
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +3 -4
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/style/index.less +12 -6
- package/lib/ProLayout/components/Layout/Menu/SideMenu/style/index.less +9 -5
- package/lib/ProLayout/components/Layout/Menu/index.js +1 -1
- package/lib/ProLayout/components/Layout/Menu/style/index.less +2 -2
- package/lib/ProLayout/components/Layout/Notice/style/index.less +2 -2
- package/lib/ProLayout/components/ProCollapse/index.js +20 -36
- package/lib/ProLayout/components/ProCollapse/style/index.less +3 -3
- package/lib/ProLayout/components/ProFooter/index.js +3 -4
- package/lib/ProLayout/components/ProFooter/style/index.less +2 -2
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +2 -3
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/style/index.less +9 -9
- package/lib/ProLayout/components/ProHeader/index.js +43 -46
- package/lib/ProLayout/components/ProHeader/style/index.less +2 -2
- package/lib/ProLayout/index.js +7 -6
- package/lib/ProLayout/style/index.less +4 -3
- package/lib/ProSelect/components/AdaptiveTooltip.js +2 -3
- package/lib/ProSelect/index.js +7 -17
- package/lib/ProSelect/index.less +2 -2
- package/lib/ProSelect/propsType.d.ts +1 -1
- package/lib/ProStep/components/Anchor/index.js +2 -3
- package/lib/ProStep/components/Item/index.js +2 -1
- package/lib/ProStep/components/Listener/index.js +12 -14
- package/lib/ProStep/components/Step/index.js +1 -0
- package/lib/ProStep/index.js +39 -47
- package/lib/ProStep/style/index.less +4 -4
- package/lib/ProStepTab/index.js +72 -83
- package/lib/ProTable/components/FormatColumn/index.js +32 -31
- package/lib/ProTable/components/RcTable/components/BaseTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +2 -4
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +38 -36
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.d.ts +0 -1
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +2 -4
- package/lib/ProTable/components/RenderColumn/index.d.ts +1 -1
- package/lib/ProTable/components/RenderColumn/index.js +15 -18
- package/lib/ProTable/components/RenderSummary/index.js +4 -5
- package/lib/ProTable/components/RenderTableHeader/index.js +3 -5
- package/lib/ProTable/components/RenderTabs/index.js +3 -6
- package/lib/ProTable/components/TableResizable/index.js +2 -1
- package/lib/ProTable/components/TooltipTitle/index.js +2 -3
- package/lib/ProTable/hooks/useAntdTable.js +21 -26
- package/lib/ProTable/index.js +15 -16
- package/lib/ProTable/propsType.d.ts +1 -3
- package/lib/ProTable/style/index.less +5 -5
- package/lib/ProTabs/components/Card/index.js +5 -11
- package/lib/ProTabs/index.js +2 -3
- package/lib/ProTabs/style/index.less +2 -2
- package/lib/ProThemeTools/component/ProTools/index.js +18 -22
- package/lib/ProThemeTools/context/ThemeContext.d.ts +31 -0
- package/lib/ProThemeTools/context/ThemeContext.js +126 -0
- package/lib/ProThemeTools/index.d.ts +4 -1
- package/lib/ProThemeTools/index.js +69 -35
- package/lib/ProThemeTools/style/index.less +3 -3
- package/lib/ProThemeTools/utils/index.d.ts +16 -6
- package/lib/ProThemeTools/utils/index.js +29 -25
- package/lib/ProTooltip/index.js +14 -9
- package/lib/ProTooltip/style/index.less +2 -2
- package/lib/ProTree/components/AdaptiveTooltip.js +2 -4
- package/lib/ProTree/components/List.js +3 -4
- package/lib/ProTree/components/ProTree.js +19 -26
- package/lib/ProTree/components/ProTreeSelect/index.js +38 -37
- package/lib/ProTree/components/ProTreeSelect/style/index.less +2 -2
- package/lib/ProTree/components/Tree.js +18 -25
- package/lib/ProTree/index.js +0 -8
- package/lib/ProTree/propsType.d.ts +1 -1
- package/lib/ProTree/style/index.less +10 -6
- package/lib/ProTreeModal/components/Cascader.js +3 -4
- package/lib/ProTreeModal/components/List.js +11 -17
- package/lib/ProTreeModal/components/SortableItem.js +2 -3
- package/lib/ProTreeModal/components/Tree.js +3 -4
- package/lib/ProTreeModal/components/Trigger.js +6 -11
- package/lib/ProTreeModal/index.d.ts +0 -1
- package/lib/ProTreeModal/index.js +14 -24
- package/lib/ProTreeModal/style/index.less +14 -3
- package/lib/ProUpload/components/ButtonRender.js +17 -20
- package/lib/ProUpload/components/DragRender.js +2 -3
- package/lib/ProUpload/components/FileItem.d.ts +0 -1
- package/lib/ProUpload/components/FileItem.js +15 -21
- package/lib/ProUpload/components/ImageRender.js +34 -43
- package/lib/ProUpload/index.js +3 -4
- package/lib/ProUpload/style/index.less +173 -12
- package/lib/ProViewer/index.js +39 -47
- package/lib/ProViewer/style/index.less +2 -2
- package/lib/ProWaterMark/index.js +3 -4
- package/lib/ProWaterMark/propsType.d.ts +5 -24
- package/lib/global.less +2 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.js +36 -16
- package/lib/locale/en_US.js +1 -1
- package/lib/locale/index.d.ts +2 -0
- package/lib/locale/index.js +12 -2
- package/lib/locale/zh_CN.js +1 -1
- package/lib/style/components.less +0 -3
- package/lib/style/theme/antd.less +38 -48
- package/lib/style/theme/base.less +89 -0
- package/lib/style/theme/index.less +2 -89
- package/lib/utils/index.d.ts +7 -0
- package/lib/utils/index.js +26 -2
- package/package.json +31 -18
- package/es/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/es/ProEditTable/components/RcTable/VirtualTable.js +0 -8
- package/es/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/es/ProForm/components/combination/ProCombination/index.js +0 -204
- package/es/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/es/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -108
- package/es/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/es/ProForm/components/old/EnumSelect/index.js +0 -272
- package/es/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/es/ProForm/components/old/EnumSelect/interface.js +0 -1
- package/es/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/es/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/es/ProForm/components/old/InputRange/index.js +0 -100
- package/es/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/es/ProForm/components/old/InputWithSuffix/index.js +0 -46
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/es/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/es/ProForm/components/old/ProAddress/index.js +0 -298
- package/es/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/es/ProForm/components/old/ProAddress/propsTypes.js +0 -1
- package/es/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/es/ProForm/components/old/ProCertNo/index.js +0 -66
- package/es/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/es/ProForm/components/old/ProCertNo/propsType.js +0 -1
- package/es/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/es/ProForm/components/old/ProCertValidity/index.js +0 -188
- package/es/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/ProForm/components/old/ProCertValidity/propsType.js +0 -1
- package/es/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/es/ProForm/components/old/ProRangeBox/index.js +0 -97
- package/es/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/es/ProForm/components/old/ProRangeBox/propsType.js +0 -1
- package/es/ProForm/utils/_useChanged.d.ts +0 -8
- package/es/ProForm/utils/_useChanged.js +0 -25
- package/es/ProForm/utils/_useListChanged.d.ts +0 -16
- package/es/ProForm/utils/_useListChanged.js +0 -93
- package/es/ProUpload/style/fileItem.less +0 -159
- package/es/old/ProCertValidity/index.d.ts +0 -9
- package/es/old/ProCertValidity/index.js +0 -188
- package/es/old/ProCertValidity/propsType.d.ts +0 -19
- package/es/old/ProCertValidity/propsType.js +0 -1
- package/es/old/ProEditableTable/index.d.ts +0 -4
- package/es/old/ProEditableTable/index.js +0 -594
- package/es/old/ProEditableTable/propsType.d.ts +0 -68
- package/es/old/ProEditableTable/propsType.js +0 -1
- package/es/old/ProEditableTable/style/index.less +0 -75
- package/es/old/ProEditableTable/utils.d.ts +0 -29
- package/es/old/ProEditableTable/utils.js +0 -323
- package/lib/ProEditTable/components/RcTable/VirtualTable.d.ts +0 -3
- package/lib/ProEditTable/components/RcTable/VirtualTable.js +0 -14
- package/lib/ProForm/components/combination/ProCombination/index.d.ts +0 -6
- package/lib/ProForm/components/combination/ProCombination/index.js +0 -213
- package/lib/ProForm/components/combination/ProCombination/propsType.d.ts +0 -68
- package/lib/ProForm/components/combination/ProCombination/style/index.less +0 -18
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.d.ts +0 -33
- package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +0 -115
- package/lib/ProForm/components/old/EnumSelect/index.d.ts +0 -4
- package/lib/ProForm/components/old/EnumSelect/index.js +0 -279
- package/lib/ProForm/components/old/EnumSelect/interface.d.ts +0 -29
- package/lib/ProForm/components/old/EnumSelect/interface.js +0 -5
- package/lib/ProForm/components/old/EnumSelect/style/index.less +0 -113
- package/lib/ProForm/components/old/InputRange/index.d.ts +0 -16
- package/lib/ProForm/components/old/InputRange/index.js +0 -108
- package/lib/ProForm/components/old/InputWithSuffix/index.d.ts +0 -3
- package/lib/ProForm/components/old/InputWithSuffix/index.js +0 -53
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.d.ts +0 -11
- package/lib/ProForm/components/old/InputWithSuffix/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProAddress/index.d.ts +0 -27
- package/lib/ProForm/components/old/ProAddress/index.js +0 -306
- package/lib/ProForm/components/old/ProAddress/propsTypes.d.ts +0 -16
- package/lib/ProForm/components/old/ProAddress/propsTypes.js +0 -5
- package/lib/ProForm/components/old/ProCertNo/index.d.ts +0 -14
- package/lib/ProForm/components/old/ProCertNo/index.js +0 -73
- package/lib/ProForm/components/old/ProCertNo/propsType.d.ts +0 -18
- package/lib/ProForm/components/old/ProCertNo/propsType.js +0 -5
- package/lib/ProForm/components/old/ProCertValidity/index.d.ts +0 -9
- package/lib/ProForm/components/old/ProCertValidity/index.js +0 -193
- package/lib/ProForm/components/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/ProForm/components/old/ProCertValidity/propsType.js +0 -5
- package/lib/ProForm/components/old/ProRangeBox/index.d.ts +0 -2
- package/lib/ProForm/components/old/ProRangeBox/index.js +0 -105
- package/lib/ProForm/components/old/ProRangeBox/propsType.d.ts +0 -3
- package/lib/ProForm/components/old/ProRangeBox/propsType.js +0 -5
- package/lib/ProForm/utils/_useChanged.d.ts +0 -8
- package/lib/ProForm/utils/_useChanged.js +0 -32
- package/lib/ProForm/utils/_useListChanged.d.ts +0 -16
- package/lib/ProForm/utils/_useListChanged.js +0 -100
- package/lib/ProUpload/style/fileItem.less +0 -159
- package/lib/old/ProCertValidity/index.d.ts +0 -9
- package/lib/old/ProCertValidity/index.js +0 -193
- package/lib/old/ProCertValidity/propsType.d.ts +0 -19
- package/lib/old/ProCertValidity/propsType.js +0 -5
- package/lib/old/ProEditableTable/index.d.ts +0 -4
- package/lib/old/ProEditableTable/index.js +0 -601
- package/lib/old/ProEditableTable/propsType.d.ts +0 -68
- package/lib/old/ProEditableTable/propsType.js +0 -5
- package/lib/old/ProEditableTable/style/index.less +0 -75
- package/lib/old/ProEditableTable/utils.d.ts +0 -29
- package/lib/old/ProEditableTable/utils.js +0 -330
- /package/es/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
- /package/lib/ProForm/components/combination/{ProCombination → ProRangeLimit}/propsType.js +0 -0
@@ -1,68 +0,0 @@
|
|
1
|
-
import { FieldNames } from 'rc-select/lib/Select';
|
2
|
-
import { FormInstance } from 'antd';
|
3
|
-
import React from 'react';
|
4
|
-
import * as componentMap from '../../index';
|
5
|
-
import type { ProFormOtherType } from '../../../propsType';
|
6
|
-
export interface ChildPropsItemType {
|
7
|
-
/**
|
8
|
-
* @description 要显示什么组件,支持Input/Select
|
9
|
-
* @default Input
|
10
|
-
*/
|
11
|
-
renderType?: keyof typeof componentMap;
|
12
|
-
/**
|
13
|
-
* @description 如果type为Select时,dataSource为下拉数据的数组
|
14
|
-
* @default []
|
15
|
-
*/
|
16
|
-
dataSource?: Array<object>;
|
17
|
-
/**
|
18
|
-
* @description 如果type为Select时,fieldNames可以设置对应dataSource下拉属性名
|
19
|
-
* @default {label:'label',value:'value'}
|
20
|
-
*/
|
21
|
-
fieldNames?: FieldNames;
|
22
|
-
onChange?: (value: any, option: any, form: FormInstance) => void;
|
23
|
-
[name: string]: any;
|
24
|
-
}
|
25
|
-
export interface ProCombinationType {
|
26
|
-
/**
|
27
|
-
* @description 组件的值,[第一个组件的值,第二个组件的值,]
|
28
|
-
* @default []
|
29
|
-
*/
|
30
|
-
value: Array<any>;
|
31
|
-
/**
|
32
|
-
* @description onChange
|
33
|
-
* @default ()=>{}
|
34
|
-
*/
|
35
|
-
onChange: (values: Array<string>) => void;
|
36
|
-
/**
|
37
|
-
* @description 禁用状态
|
38
|
-
* @default false
|
39
|
-
*/
|
40
|
-
disabled?: boolean;
|
41
|
-
/**
|
42
|
-
* @description 子组件内部组件可配置属性,按照数组顺序注入到内部组件中
|
43
|
-
* @default [{},{}]
|
44
|
-
*/
|
45
|
-
childProps?: Array<ChildPropsItemType>;
|
46
|
-
/**
|
47
|
-
* @description 是否视图模式
|
48
|
-
* @default false
|
49
|
-
*/
|
50
|
-
isView?: boolean;
|
51
|
-
/**
|
52
|
-
* @description 查看空值时默认展示
|
53
|
-
* @default '-'
|
54
|
-
*/
|
55
|
-
viewEmpty?: React.ReactNode;
|
56
|
-
/**
|
57
|
-
* @description 分隔符 不传则不显示分割组件
|
58
|
-
* @default '-'
|
59
|
-
*/
|
60
|
-
separator?: string;
|
61
|
-
otherProps?: ProFormOtherType;
|
62
|
-
id?: string;
|
63
|
-
}
|
64
|
-
/**
|
65
|
-
* 兼容旧命名导出
|
66
|
-
*/
|
67
|
-
export type ChildPropsItemProps = ChildPropsItemType;
|
68
|
-
export type ProCombinationProps = ProCombinationType;
|
@@ -1,18 +0,0 @@
|
|
1
|
-
@root-entry-name: 'default';
|
2
|
-
@import (reference) '~antd/es/style/themes/index.less';
|
3
|
-
|
4
|
-
.pro-combination.@{ant-prefix}-input-group.@{ant-prefix}-input-group-compact {
|
5
|
-
display: flex;
|
6
|
-
|
7
|
-
& > * {
|
8
|
-
max-width: 50%;
|
9
|
-
}
|
10
|
-
|
11
|
-
div.pro-form-view-container {
|
12
|
-
flex: none;
|
13
|
-
}
|
14
|
-
|
15
|
-
& > *:not(.@{ant-prefix}-btn) {
|
16
|
-
flex: 1;
|
17
|
-
}
|
18
|
-
}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import { useRequest } from 'ahooks';
|
2
|
-
declare interface PaginationProp {
|
3
|
-
pageNum: number;
|
4
|
-
pageSize: number;
|
5
|
-
}
|
6
|
-
declare interface IListReq<T = any> extends PaginationProp {
|
7
|
-
defaultParams?: T;
|
8
|
-
[key: string]: any;
|
9
|
-
}
|
10
|
-
declare interface IRes<T = any> {
|
11
|
-
data: T;
|
12
|
-
status: number;
|
13
|
-
message: string;
|
14
|
-
}
|
15
|
-
declare interface IListProp<T> {
|
16
|
-
pageNum: number;
|
17
|
-
pageSize: number;
|
18
|
-
total: number;
|
19
|
-
list: T[];
|
20
|
-
}
|
21
|
-
declare type IResList<T> = IRes<IListProp<T>>;
|
22
|
-
declare type IListService<Req, Res> = (params?: IListReq<Req>) => Promise<IResList<Res>>;
|
23
|
-
export interface RequestListOptions<T, R> {
|
24
|
-
defaultParams?: Partial<T>;
|
25
|
-
page?: PaginationProp;
|
26
|
-
customizePage?: PaginationProp;
|
27
|
-
withPagination?: boolean;
|
28
|
-
conditionKey: any;
|
29
|
-
onPageChange?: (page: PaginationProp) => any;
|
30
|
-
handleFormatDataSource?: (data: any) => R[];
|
31
|
-
}
|
32
|
-
export default function useRequestList<I, R extends Record<string, any>, S extends IListService<I, R>>(service: S, options?: RequestListOptions<I, R>, useRequestOptions?: Parameters<typeof useRequest>[1]): any;
|
33
|
-
export {};
|
@@ -1,115 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports.default = useRequestList;
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
|
-
var _objectSpread3 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
10
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
11
|
-
var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
|
12
|
-
var _ahooks = require("ahooks");
|
13
|
-
var _react = require("react");
|
14
|
-
var defaultTransform = function defaultTransform(data) {
|
15
|
-
return data === null || data === void 0 ? void 0 : data.list;
|
16
|
-
};
|
17
|
-
var defaultPage = {
|
18
|
-
pageNum: 1,
|
19
|
-
pageSize: 10
|
20
|
-
};
|
21
|
-
var useDefaultOptions = function useDefaultOptions(options) {
|
22
|
-
var _options$withPaginati, _options$handleFormat;
|
23
|
-
var customizePage = options === null || options === void 0 ? void 0 : options.customizePage;
|
24
|
-
var _useState = (0, _react.useState)(customizePage || defaultPage),
|
25
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
26
|
-
page = _useState2[0],
|
27
|
-
onPageChange = _useState2[1];
|
28
|
-
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, options), {}, {
|
29
|
-
withPagination: (_options$withPaginati = options === null || options === void 0 ? void 0 : options.withPagination) !== null && _options$withPaginati !== void 0 ? _options$withPaginati : true,
|
30
|
-
page: (options === null || options === void 0 ? void 0 : options.page) || page,
|
31
|
-
onPageChange: (options === null || options === void 0 ? void 0 : options.onPageChange) || onPageChange,
|
32
|
-
handleFormatDataSource: (_options$handleFormat = options === null || options === void 0 ? void 0 : options.handleFormatDataSource) !== null && _options$handleFormat !== void 0 ? _options$handleFormat : defaultTransform
|
33
|
-
});
|
34
|
-
};
|
35
|
-
function useRequestList(service, options, useRequestOptions) {
|
36
|
-
var _data$data;
|
37
|
-
var _useDefaultOptions = useDefaultOptions(options),
|
38
|
-
page = _useDefaultOptions.page,
|
39
|
-
withPagination = _useDefaultOptions.withPagination,
|
40
|
-
onPageChange = _useDefaultOptions.onPageChange,
|
41
|
-
defaultParams = _useDefaultOptions.defaultParams,
|
42
|
-
conditionKey = _useDefaultOptions.conditionKey,
|
43
|
-
handleFormatDataSource = _useDefaultOptions.handleFormatDataSource;
|
44
|
-
// 搜索表单里的值
|
45
|
-
var _useState3 = (0, _react.useState)(),
|
46
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
47
|
-
searchValues = _useState4[0],
|
48
|
-
setSearchValues = _useState4[1];
|
49
|
-
// 当次执行service的请求,包括page参数
|
50
|
-
var params = (0, _react.useMemo)(function () {
|
51
|
-
var _condition = (0, _objectSpread3.default)((0, _objectSpread3.default)({}, defaultParams), searchValues);
|
52
|
-
return withPagination ? (0, _objectSpread3.default)((0, _objectSpread3.default)({}, page), {}, (0, _defineProperty2.default)({}, conditionKey, _condition !== null && _condition !== void 0 ? _condition : {})) : _condition;
|
53
|
-
}, [defaultParams, page, searchValues]);
|
54
|
-
// 调接口
|
55
|
-
// @ts-ignore
|
56
|
-
var result = (0, _ahooks.useRequest)(service, (0, _objectSpread3.default)((0, _objectSpread3.default)({}, useRequestOptions), {}, {
|
57
|
-
// @ts-ignore
|
58
|
-
defaultParams: [params]
|
59
|
-
}));
|
60
|
-
var data = result.data,
|
61
|
-
run = result.run,
|
62
|
-
loading = result.loading;
|
63
|
-
// 搜索条件变化时触发
|
64
|
-
var prevParams = (0, _ahooks.usePrevious)(params);
|
65
|
-
var prevSearchValues = (0, _ahooks.usePrevious)(searchValues);
|
66
|
-
(0, _react.useEffect)(function () {
|
67
|
-
if (prevParams && !(0, _isEqual2.default)(prevParams, params)) {
|
68
|
-
// @ts-ignore
|
69
|
-
run(params);
|
70
|
-
}
|
71
|
-
}, [params]);
|
72
|
-
// 分页变更
|
73
|
-
var onChange = (0, _react.useCallback)(function (current, pageSize) {
|
74
|
-
onPageChange({
|
75
|
-
pageNum: current,
|
76
|
-
pageSize: pageSize
|
77
|
-
});
|
78
|
-
}, [onPageChange]);
|
79
|
-
var onSearch = (0, _react.useCallback)(function (values) {
|
80
|
-
if (!(0, _isEqual2.default)(prevSearchValues, values)) {
|
81
|
-
setSearchValues(function (p) {
|
82
|
-
return (0, _objectSpread3.default)((0, _objectSpread3.default)((0, _objectSpread3.default)({}, p), values), {}, {
|
83
|
-
timestamp: Date.now()
|
84
|
-
});
|
85
|
-
});
|
86
|
-
onChange(defaultPage.pageNum, defaultPage.pageSize);
|
87
|
-
}
|
88
|
-
}, [onChange, prevSearchValues]);
|
89
|
-
// 重置查询条件
|
90
|
-
var onReset = (0, _react.useCallback)(function () {
|
91
|
-
setSearchValues(undefined);
|
92
|
-
onChange(defaultPage.pageNum, defaultPage.pageSize);
|
93
|
-
}, [onChange]);
|
94
|
-
return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, result), {}, {
|
95
|
-
loading: loading,
|
96
|
-
data: handleFormatDataSource(data === null || data === void 0 ? void 0 : data.data),
|
97
|
-
onReset: onReset,
|
98
|
-
onSearch: onSearch,
|
99
|
-
params: params,
|
100
|
-
pagination: withPagination ? {
|
101
|
-
current: page.pageNum,
|
102
|
-
pageSize: page.pageSize,
|
103
|
-
onPaginationChange: true,
|
104
|
-
total: data === null || data === void 0 ? void 0 : (_data$data = data.data) === null || _data$data === void 0 ? void 0 : _data$data.total,
|
105
|
-
onChange: onChange,
|
106
|
-
pageSizeOptions: [10, 20, 50, 100],
|
107
|
-
showQuickJumper: true,
|
108
|
-
showSizeChanger: true,
|
109
|
-
onShowSizeChange: onChange,
|
110
|
-
showTotal: function showTotal(total) {
|
111
|
-
return "\u5171".concat(total, "\u6761");
|
112
|
-
}
|
113
|
-
} : false
|
114
|
-
});
|
115
|
-
}
|
@@ -1,279 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
5
|
-
value: true
|
6
|
-
});
|
7
|
-
exports.default = void 0;
|
8
|
-
require("antd/es/table/style");
|
9
|
-
var _table = _interopRequireDefault(require("antd/es/table"));
|
10
|
-
require("antd/es/modal/style");
|
11
|
-
var _modal = _interopRequireDefault(require("antd/es/modal"));
|
12
|
-
require("antd/es/message/style");
|
13
|
-
var _message2 = _interopRequireDefault(require("antd/es/message"));
|
14
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
15
|
-
require("antd/es/form/style");
|
16
|
-
var _form = _interopRequireDefault(require("antd/es/form"));
|
17
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
18
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
19
|
-
var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
|
20
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
21
|
-
var _icons = require("@ant-design/icons");
|
22
|
-
var _ahooks = require("ahooks");
|
23
|
-
var _react = require("react");
|
24
|
-
var _reactSvg = require("react-svg");
|
25
|
-
var _ProForm = _interopRequireDefault(require("../../../../ProForm"));
|
26
|
-
var _InputWithSuffix = _interopRequireDefault(require("../InputWithSuffix"));
|
27
|
-
var _useRequestList2 = _interopRequireDefault(require("./hooks/useRequestList"));
|
28
|
-
var _view = _interopRequireDefault(require("../../../../assets/view.svg"));
|
29
|
-
var _excluded = ["value", "onChange", "disabled", "readOnly", "suffix", "handleFormat", "configOption", "proformmode"],
|
30
|
-
_excluded2 = ["title", "onOk"],
|
31
|
-
_excluded3 = ["rowKey", "columns"];
|
32
|
-
var defaultFormat = function defaultFormat(rowData) {
|
33
|
-
return "".concat(rowData.code, "-").concat(rowData.name);
|
34
|
-
};
|
35
|
-
var EnumSelect = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
36
|
-
var value = props.value,
|
37
|
-
onChange = props.onChange,
|
38
|
-
disabled = props.disabled,
|
39
|
-
_props$readOnly = props.readOnly,
|
40
|
-
readOnly = _props$readOnly === void 0 ? true : _props$readOnly,
|
41
|
-
suffix = props.suffix,
|
42
|
-
_props$handleFormat = props.handleFormat,
|
43
|
-
handleFormat = _props$handleFormat === void 0 ? defaultFormat : _props$handleFormat,
|
44
|
-
configOption = props.configOption,
|
45
|
-
proformmode = props.proformmode,
|
46
|
-
restInputProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
47
|
-
if (!configOption || Object.prototype.toString.call(configOption) !== '[object Object]') {
|
48
|
-
throw new Error('error: 请检查枚举选择弹框的配置项【configOption】');
|
49
|
-
}
|
50
|
-
var _configOption$mode = configOption.mode,
|
51
|
-
mode = _configOption$mode === void 0 ? 'radio' : _configOption$mode,
|
52
|
-
fetchOptions = configOption.fetchOptions,
|
53
|
-
useRequestOptions = configOption.useRequestOptions,
|
54
|
-
_configOption$conditi = configOption.conditionKey,
|
55
|
-
conditionKey = _configOption$conditi === void 0 ? 'queryBean' : _configOption$conditi,
|
56
|
-
conditionColumns = configOption.conditionColumns,
|
57
|
-
defaultParams = configOption.defaultParams,
|
58
|
-
_configOption$withPag = configOption.withPagination,
|
59
|
-
withPagination = _configOption$withPag === void 0 ? true : _configOption$withPag,
|
60
|
-
_configOption$paginat = configOption.paginationPosition,
|
61
|
-
paginationPosition = _configOption$paginat === void 0 ? 'modalBottom' : _configOption$paginat,
|
62
|
-
handleFormatDataSource = configOption.handleFormatDataSource,
|
63
|
-
defaultSelectedRows = configOption.defaultSelectedRows,
|
64
|
-
modalProps = configOption.modalProps,
|
65
|
-
tableProps = configOption.tableProps;
|
66
|
-
var isView = proformmode === 'view';
|
67
|
-
var isModalBottom = paginationPosition === 'modalBottom';
|
68
|
-
var _ref = modalProps || {},
|
69
|
-
title = _ref.title,
|
70
|
-
onOk = _ref.onOk,
|
71
|
-
restModalProps = (0, _objectWithoutProperties2.default)(_ref, _excluded2);
|
72
|
-
var _ref2 = tableProps || {},
|
73
|
-
_ref2$rowKey = _ref2.rowKey,
|
74
|
-
rowKey = _ref2$rowKey === void 0 ? 'id' : _ref2$rowKey,
|
75
|
-
columns = _ref2.columns,
|
76
|
-
restTableProps = (0, _objectWithoutProperties2.default)(_ref2, _excluded3);
|
77
|
-
var _useSetState = (0, _ahooks.useSetState)({
|
78
|
-
onOff: false,
|
79
|
-
visible: false,
|
80
|
-
selectedRows: [],
|
81
|
-
selectedRowKeys: []
|
82
|
-
}),
|
83
|
-
_useSetState2 = (0, _slicedToArray2.default)(_useSetState, 2),
|
84
|
-
state = _useSetState2[0],
|
85
|
-
setState = _useSetState2[1];
|
86
|
-
var _Form$useForm = _form.default.useForm(),
|
87
|
-
_Form$useForm2 = (0, _slicedToArray2.default)(_Form$useForm, 1),
|
88
|
-
form = _Form$useForm2[0];
|
89
|
-
var _useRequestList = (0, _useRequestList2.default)(fetchOptions, {
|
90
|
-
conditionKey: conditionKey,
|
91
|
-
withPagination: withPagination,
|
92
|
-
handleFormatDataSource: handleFormatDataSource,
|
93
|
-
defaultParams: defaultParams
|
94
|
-
}, (0, _objectSpread2.default)({
|
95
|
-
ready: state.onOff
|
96
|
-
}, useRequestOptions)),
|
97
|
-
data = _useRequestList.data,
|
98
|
-
loading = _useRequestList.loading,
|
99
|
-
pagination = _useRequestList.pagination,
|
100
|
-
onSearch = _useRequestList.onSearch,
|
101
|
-
onReset = _useRequestList.onReset;
|
102
|
-
// 是否多选
|
103
|
-
var isMultiple = mode === 'checkbox';
|
104
|
-
var handleChangeValue = function handleChangeValue(e) {
|
105
|
-
onChange(e.target.value);
|
106
|
-
};
|
107
|
-
// 清空表单项
|
108
|
-
var handleClearValue = function handleClearValue() {
|
109
|
-
onChange('');
|
110
|
-
setState({
|
111
|
-
selectedRowKeys: [],
|
112
|
-
selectedRows: []
|
113
|
-
});
|
114
|
-
};
|
115
|
-
var handleClick = function handleClick() {
|
116
|
-
if (!disabled) {
|
117
|
-
setState({
|
118
|
-
onOff: true
|
119
|
-
});
|
120
|
-
}
|
121
|
-
};
|
122
|
-
var handleClose = function handleClose() {
|
123
|
-
setState({
|
124
|
-
onOff: false,
|
125
|
-
visible: false
|
126
|
-
});
|
127
|
-
form.resetFields();
|
128
|
-
};
|
129
|
-
var handleFinish = function handleFinish() {
|
130
|
-
if (!state.selectedRows.length) {
|
131
|
-
_message2.default.error('请先勾选');
|
132
|
-
return false;
|
133
|
-
}
|
134
|
-
var formatterValueArr = state.selectedRows.map(function (row) {
|
135
|
-
return handleFormat(row);
|
136
|
-
});
|
137
|
-
(formatterValueArr === null || formatterValueArr === void 0 ? void 0 : formatterValueArr.length) && onChange(formatterValueArr.join('、'));
|
138
|
-
onOk === null || onOk === void 0 ? void 0 : onOk(state.selectedRows);
|
139
|
-
handleClose();
|
140
|
-
};
|
141
|
-
var handleSearch = function handleSearch(values) {
|
142
|
-
onSearch(values);
|
143
|
-
};
|
144
|
-
// 点击行进行勾选
|
145
|
-
var handleClickRow = function handleClickRow(record) {
|
146
|
-
var selectedValue = record[rowKey];
|
147
|
-
var tempSelectedRows = (0, _cloneDeep2.default)(state.selectedRows);
|
148
|
-
var tempSelectedRowKeys = (0, _cloneDeep2.default)(state.selectedRowKeys);
|
149
|
-
if (isMultiple) {
|
150
|
-
var rowIndex = tempSelectedRows.findIndex(function (item) {
|
151
|
-
return item[rowKey] === selectedValue;
|
152
|
-
});
|
153
|
-
var rowKeyIndex = tempSelectedRowKeys.findIndex(function (item) {
|
154
|
-
return item === selectedValue;
|
155
|
-
});
|
156
|
-
if (rowKeyIndex > -1) {
|
157
|
-
tempSelectedRows.splice(rowIndex, 1);
|
158
|
-
tempSelectedRowKeys.splice(rowKeyIndex, 1);
|
159
|
-
} else {
|
160
|
-
tempSelectedRows.push(record);
|
161
|
-
tempSelectedRowKeys.push(selectedValue);
|
162
|
-
}
|
163
|
-
} else {
|
164
|
-
tempSelectedRows = [record];
|
165
|
-
tempSelectedRowKeys = [selectedValue];
|
166
|
-
}
|
167
|
-
setState({
|
168
|
-
selectedRows: tempSelectedRows,
|
169
|
-
selectedRowKeys: tempSelectedRowKeys
|
170
|
-
});
|
171
|
-
};
|
172
|
-
var rowSelection = {
|
173
|
-
type: mode,
|
174
|
-
selectedRowKeys: state.selectedRowKeys,
|
175
|
-
onChange: function onChange(rowKeys, rows) {
|
176
|
-
setState({
|
177
|
-
selectedRowKeys: rowKeys,
|
178
|
-
selectedRows: rows
|
179
|
-
});
|
180
|
-
},
|
181
|
-
getCheckboxProps: function getCheckboxProps() {
|
182
|
-
return {
|
183
|
-
disabled: false
|
184
|
-
};
|
185
|
-
}
|
186
|
-
};
|
187
|
-
(0, _react.useEffect)(function () {
|
188
|
-
if (defaultSelectedRows === null || defaultSelectedRows === void 0 ? void 0 : defaultSelectedRows.length) {
|
189
|
-
setState({
|
190
|
-
selectedRowKeys: defaultSelectedRows.map(function (item) {
|
191
|
-
return item[rowKey];
|
192
|
-
}),
|
193
|
-
selectedRows: defaultSelectedRows
|
194
|
-
});
|
195
|
-
}
|
196
|
-
}, [defaultSelectedRows]);
|
197
|
-
(0, _react.useEffect)(function () {
|
198
|
-
if (state.onOff) {
|
199
|
-
onReset();
|
200
|
-
var nextState = {
|
201
|
-
visible: true
|
202
|
-
};
|
203
|
-
if (!value) {
|
204
|
-
nextState.selectedRowKeys = [];
|
205
|
-
nextState.selectedRows = [];
|
206
|
-
}
|
207
|
-
setState(nextState);
|
208
|
-
}
|
209
|
-
}, [state.onOff]);
|
210
|
-
var defaultSuffix = (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
211
|
-
children: [value && !disabled && (0, _jsxRuntime.jsx)("span", {
|
212
|
-
className: "close-icon",
|
213
|
-
children: (0, _jsxRuntime.jsx)(_icons.CloseOutlined, {
|
214
|
-
onClick: handleClearValue
|
215
|
-
})
|
216
|
-
}), (0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, {
|
217
|
-
className: "search",
|
218
|
-
wrapper: "span",
|
219
|
-
src: _view.default,
|
220
|
-
onClick: handleClick
|
221
|
-
})]
|
222
|
-
});
|
223
|
-
var forceSuffixRender = function forceSuffixRender() {
|
224
|
-
if (isView) {
|
225
|
-
return;
|
226
|
-
}
|
227
|
-
if (suffix) {
|
228
|
-
return (0, _jsxRuntime.jsx)("div", {
|
229
|
-
onClick: handleClick,
|
230
|
-
children: suffix
|
231
|
-
});
|
232
|
-
}
|
233
|
-
return defaultSuffix;
|
234
|
-
};
|
235
|
-
return (0, _jsxRuntime.jsxs)("div", {
|
236
|
-
className: "pro-enum-select",
|
237
|
-
children: [(0, _jsxRuntime.jsx)(_InputWithSuffix.default, (0, _objectSpread2.default)({
|
238
|
-
value: value,
|
239
|
-
readOnly: readOnly,
|
240
|
-
onClick: readOnly ? handleClick : undefined,
|
241
|
-
onChange: handleChangeValue,
|
242
|
-
disabled: disabled,
|
243
|
-
suffix: forceSuffixRender()
|
244
|
-
}, restInputProps)), state.onOff && (0, _jsxRuntime.jsxs)(_modal.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
245
|
-
className: "pro-enum-select-modal",
|
246
|
-
title: title,
|
247
|
-
width: "50%",
|
248
|
-
onOk: handleFinish,
|
249
|
-
onCancel: handleClose,
|
250
|
-
visible: state.visible
|
251
|
-
}, restModalProps), {}, {
|
252
|
-
children: [(0, _jsxRuntime.jsx)(_ProForm.default, {
|
253
|
-
className: "pro-enum-select-Modal-form",
|
254
|
-
form: form,
|
255
|
-
columns: conditionColumns,
|
256
|
-
onFinish: handleSearch,
|
257
|
-
footer: (conditionColumns === null || conditionColumns === void 0 ? void 0 : conditionColumns.length) > 1
|
258
|
-
}), (0, _jsxRuntime.jsx)(_table.default, (0, _objectSpread2.default)({
|
259
|
-
onRow: function onRow(record) {
|
260
|
-
return {
|
261
|
-
onClick: function onClick() {
|
262
|
-
return handleClickRow(record);
|
263
|
-
}
|
264
|
-
};
|
265
|
-
},
|
266
|
-
rowKey: rowKey,
|
267
|
-
loading: loading,
|
268
|
-
scroll: {
|
269
|
-
y: '250px'
|
270
|
-
},
|
271
|
-
rowSelection: rowSelection,
|
272
|
-
columns: columns,
|
273
|
-
dataSource: data,
|
274
|
-
pagination: pagination
|
275
|
-
}, restTableProps))]
|
276
|
-
}))]
|
277
|
-
});
|
278
|
-
});
|
279
|
-
var _default = exports.default = EnumSelect;
|
@@ -1,29 +0,0 @@
|
|
1
|
-
import { InputProps, ModalProps } from 'antd';
|
2
|
-
import React from 'react';
|
3
|
-
import type { ProFormColumnType } from '../../render/propsType';
|
4
|
-
type RequestFunction<P = Record<string, any> | void, R = any> = (params: P, ...args: any[]) => Promise<R>;
|
5
|
-
type OnOkFunction = (list: Record<string, any>[]) => boolean;
|
6
|
-
interface IConfigOption {
|
7
|
-
mode: 'radio' | 'checkbox';
|
8
|
-
fetchOptions: RequestFunction;
|
9
|
-
useRequestOptions: object;
|
10
|
-
conditionKey: string;
|
11
|
-
conditionColumns: ProFormColumnType[];
|
12
|
-
defaultParams: Record<string, any>;
|
13
|
-
withPagination: boolean;
|
14
|
-
paginationPosition: 'tableBottom' | 'modalBottom';
|
15
|
-
handleFormatDataSource: (dataSource: Object[]) => Object[];
|
16
|
-
defaultSelectedRows: Object[];
|
17
|
-
modalProps: ModalProps & {
|
18
|
-
onOk: OnOkFunction;
|
19
|
-
};
|
20
|
-
tableProps: Record<string, any>;
|
21
|
-
}
|
22
|
-
interface IEnumSelect {
|
23
|
-
onChange: (event: string | React.ChangeEvent<HTMLInputElement>) => void;
|
24
|
-
handleFormat: (value: Object) => string;
|
25
|
-
proformmode: string;
|
26
|
-
configOption: IConfigOption;
|
27
|
-
}
|
28
|
-
export declare type IProps = InputProps & IEnumSelect;
|
29
|
-
export {};
|
@@ -1,113 +0,0 @@
|
|
1
|
-
.pro-enum-select {
|
2
|
-
.close-icon {
|
3
|
-
position : relative;
|
4
|
-
margin-left : calc(0px - @zaui-space-size-lg);
|
5
|
-
margin-right : var(--zaui-space-size-md, 14px);
|
6
|
-
color : #FFFFFF;
|
7
|
-
height: 12px;
|
8
|
-
width: 12px;
|
9
|
-
display: flex;
|
10
|
-
align-items: center;
|
11
|
-
justify-content: center;
|
12
|
-
background-color: rgba(0, 0, 0, 0.25);
|
13
|
-
border : none;
|
14
|
-
border-radius : 50%;
|
15
|
-
z-index : 3;
|
16
|
-
|
17
|
-
> span {
|
18
|
-
position : relative;
|
19
|
-
border : none;
|
20
|
-
border-radius : 50%;
|
21
|
-
|
22
|
-
}
|
23
|
-
&:hover {
|
24
|
-
background-color: rgba(0, 0, 0, 0.5);
|
25
|
-
}
|
26
|
-
}
|
27
|
-
|
28
|
-
.search {
|
29
|
-
span {
|
30
|
-
display : flex;
|
31
|
-
justify-content: center;
|
32
|
-
align-items : center;
|
33
|
-
cursor: pointer;
|
34
|
-
fill: #C5C7CD;
|
35
|
-
}
|
36
|
-
}
|
37
|
-
}
|
38
|
-
|
39
|
-
.pro-enum-select-modal {
|
40
|
-
.ant-table.ant-table-bordered>.ant-table-container {
|
41
|
-
border: 0;
|
42
|
-
}
|
43
|
-
|
44
|
-
.ant-table-thead>tr>th {
|
45
|
-
border : 0;
|
46
|
-
white-space : nowrap;
|
47
|
-
background-color: @zaui-table-header-bg;
|
48
|
-
}
|
49
|
-
|
50
|
-
.ant-table-thead>tr>th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan])::before {
|
51
|
-
height: 0;
|
52
|
-
}
|
53
|
-
|
54
|
-
.ant-table-tbody>tr:not(.ant-table-placeholder)>td {
|
55
|
-
border-bottom: 0;
|
56
|
-
border-right : 0;
|
57
|
-
border-top : 0;
|
58
|
-
}
|
59
|
-
|
60
|
-
.ant-table-tbody>tr:not(.ant-table-measure-row)>td {
|
61
|
-
border-bottom : 0;
|
62
|
-
vertical-align: top;
|
63
|
-
padding : var(--zaui-space-size-md);
|
64
|
-
}
|
65
|
-
|
66
|
-
.ant-table-tbody tr:nth-child(n)>td {
|
67
|
-
background-color: var(--zaui-base-bg);
|
68
|
-
}
|
69
|
-
|
70
|
-
.ant-table-tbody tr:nth-child(2n)>td {
|
71
|
-
background-color: @zaui-table-strip-bg;
|
72
|
-
}
|
73
|
-
|
74
|
-
.ant-table-tbody>.ant-table-placeholder>td {
|
75
|
-
background-color: var(--zaui-base-bg);
|
76
|
-
}
|
77
|
-
|
78
|
-
.ant-table-tbody {
|
79
|
-
|
80
|
-
>tr:hover:not(.ant-table-expanded-row, .ant-table-placeholder)>td,
|
81
|
-
.ant-table-row-hover,
|
82
|
-
.ant-table-row-hover>td {
|
83
|
-
background: @zaui-table-hover-bg;
|
84
|
-
}
|
85
|
-
}
|
86
|
-
|
87
|
-
.ant-table-fixed {
|
88
|
-
|
89
|
-
.ant-table-row-hover,
|
90
|
-
.ant-table-row-hover>td {
|
91
|
-
background: @zaui-table-hover-bg;
|
92
|
-
}
|
93
|
-
}
|
94
|
-
|
95
|
-
.ant-table-fixed-header {
|
96
|
-
.ant-table-tbody tr:nth-child(n)>td {
|
97
|
-
background-color: @zaui-table-strip-bg;
|
98
|
-
}
|
99
|
-
|
100
|
-
.ant-table-tbody tr:nth-child(2n)>td {
|
101
|
-
background-color: var(--zaui-base-bg);
|
102
|
-
}
|
103
|
-
}
|
104
|
-
|
105
|
-
.ant-modal-body {
|
106
|
-
padding-bottom: 0;
|
107
|
-
}
|
108
|
-
|
109
|
-
.ant-modal-footer {
|
110
|
-
padding: @zaui-space-size-md;
|
111
|
-
}
|
112
|
-
|
113
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
interface ValueProps {
|
2
|
-
min?: any;
|
3
|
-
max?: any;
|
4
|
-
}
|
5
|
-
export interface InputRangeProps {
|
6
|
-
value?: ValueProps;
|
7
|
-
onChange?: (value: ValueProps) => void;
|
8
|
-
min?: number;
|
9
|
-
max?: number;
|
10
|
-
group?: any[];
|
11
|
-
disabled?: boolean;
|
12
|
-
isPositiveInteger?: boolean;
|
13
|
-
precision?: number;
|
14
|
-
}
|
15
|
-
declare const InputRange: ({ value, onChange, min, max, group, disabled, precision, isPositiveInteger, }: InputRangeProps) => import("react/jsx-runtime").JSX.Element;
|
16
|
-
export default InputRange;
|