@zat-design/sisyphus-react 4.0.0-beta.4 → 4.0.0-beta.6
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/dist/index.esm.css +1 -0
- package/dist/index.min.js +1 -0
- package/dist/less.esm.css +1 -0
- package/dist/less.min.js +1 -0
- package/es/FormsProvider/index.js +5 -5
- package/es/ProAction/components/CheckModalContent/index.js +5 -7
- package/es/ProAction/index.js +16 -16
- package/es/ProConfigProvider/index.js +31 -17
- package/es/ProDownload/index.js +13 -12
- package/es/ProDownload/utils.js +15 -15
- package/es/ProDrawerForm/components/ProDrawer/index.js +22 -19
- package/es/ProDrawerForm/components/ProModal/index.js +14 -9
- package/es/ProDrawerForm/index.js +6 -10
- package/es/ProDrawerForm/utils/index.js +1 -1
- package/es/ProEditLabel/components/RenderProForm.js +10 -9
- package/es/ProEditLabel/index.js +36 -24
- package/es/ProEditLabel/utils/index.js +4 -3
- package/es/ProEditTable/components/ActionButton/index.js +58 -56
- package/es/ProEditTable/components/RcTable/BaseTable.js +21 -20
- package/es/ProEditTable/components/RcTable/DraggableTable.js +27 -34
- package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +40 -46
- package/es/ProEditTable/components/RenderField/index.js +98 -121
- package/es/ProEditTable/components/RenderToolbar/index.js +27 -33
- package/es/ProEditTable/components/Summary/index.js +16 -14
- package/es/ProEditTable/components/Validator/index.js +9 -6
- package/es/ProEditTable/index.js +130 -147
- package/es/ProEditTable/utils/config.js +29 -36
- package/es/ProEditTable/utils/diffOriginal.js +13 -13
- package/es/ProEditTable/utils/getDefaultProps.js +6 -7
- package/es/ProEditTable/utils/index.js +52 -58
- package/es/ProEditTable/utils/tools.js +32 -41
- package/es/ProEditTable/utils/transform.js +7 -11
- package/es/ProEditTable/utils/useEditTableError.js +10 -12
- package/es/ProEnum/components/Group.js +18 -22
- package/es/ProEnum/components/Tag.js +10 -14
- package/es/ProEnum/hooks/useEnum.js +6 -10
- package/es/ProEnum/hooks/useEnumRequest.js +23 -25
- package/es/ProEnum/hooks/useFrequentEnumRequest.d.ts +14 -0
- package/es/ProEnum/hooks/useFrequentEnumRequest.js +76 -0
- package/es/ProEnum/index.js +50 -52
- package/es/ProEnum/propsType.d.ts +29 -0
- package/es/ProEnum/utils/eventCenter.js +20 -31
- package/es/ProEnum/utils/frequentEnum.d.ts +40 -0
- package/es/ProEnum/utils/frequentEnum.js +91 -0
- package/es/ProEnum/utils/getEnumLabel.js +8 -12
- package/es/ProEnum/utils/index.js +6 -6
- package/es/ProForm/components/Container.js +4 -3
- package/es/ProForm/components/FormFooter/index.js +16 -13
- package/es/ProForm/components/base/Checkbox/index.js +10 -11
- package/es/ProForm/components/base/DatePicker/index.js +8 -7
- package/es/ProForm/components/base/DatePicker/useDateLimit.js +2 -4
- package/es/ProForm/components/base/Input/index.js +24 -20
- package/es/ProForm/components/base/InputNumber/index.js +21 -18
- package/es/ProForm/components/base/Radio/index.js +11 -12
- package/es/ProForm/components/base/RangePicker/index.js +9 -12
- package/es/ProForm/components/base/RangePicker/useDateRange.js +3 -3
- package/es/ProForm/components/base/Select/index.js +9 -8
- package/es/ProForm/components/base/Switch/index.js +7 -6
- package/es/ProForm/components/base/SwitchCheckbox/index.js +7 -6
- package/es/ProForm/components/base/TextArea/index.js +9 -8
- package/es/ProForm/components/base/TimePicker/index.js +5 -4
- package/es/ProForm/components/combination/Container/index.js +12 -12
- package/es/ProForm/components/combination/FormList/components/ActionButton.js +60 -70
- package/es/ProForm/components/combination/FormList/components/BlockFields.js +11 -7
- package/es/ProForm/components/combination/FormList/components/BlockTitle.js +1 -1
- package/es/ProForm/components/combination/FormList/components/Empty.js +9 -10
- package/es/ProForm/components/combination/FormList/components/LineFields.js +10 -9
- package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +32 -36
- package/es/ProForm/components/combination/FormList/index.js +25 -33
- package/es/ProForm/components/combination/FormList/utils.js +5 -7
- package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +1 -1
- package/es/ProForm/components/combination/Group/component/ComRender.js +14 -14
- package/es/ProForm/components/combination/Group/hooks/index.d.ts +0 -1
- package/es/ProForm/components/combination/Group/hooks/index.js +30 -35
- package/es/ProForm/components/combination/Group/index.js +35 -29
- package/es/ProForm/components/combination/Group/propsType.d.ts +2 -0
- package/es/ProForm/components/combination/Group/style/index.less +7 -0
- package/es/ProForm/components/combination/Group/utils.d.ts +0 -1
- package/es/ProForm/components/combination/Group/utils.js +38 -39
- package/es/ProForm/components/combination/ProCascader/index.js +43 -52
- package/es/ProForm/components/combination/ProCascader/utils/index.js +3 -3
- package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +16 -16
- package/es/ProForm/components/combination/ProModalSelect/index.js +102 -108
- package/es/ProForm/components/combination/ProModalSelect/utils/index.js +1 -1
- package/es/ProForm/components/combination/ProNumberRange/index.js +73 -47
- package/es/ProForm/components/combination/ProNumberRange/propsType.d.ts +3 -2
- package/es/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
- package/es/ProForm/components/combination/ProRangeLimit/index.js +20 -18
- package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +3 -3
- package/es/ProForm/components/combination/ProTimeLimit/index.js +17 -15
- package/es/ProForm/components/render/ChangedWrapper.js +24 -26
- package/es/ProForm/components/render/ConfirmWrapper.js +10 -11
- package/es/ProForm/components/render/Render.js +107 -102
- package/es/ProForm/components/render/RenderFields.d.ts +0 -1
- package/es/ProForm/components/render/RenderFields.js +22 -24
- package/es/ProForm/index.js +44 -45
- package/es/ProForm/propsType.d.ts +1 -4
- package/es/ProForm/utils/diffOriginal.js +9 -9
- package/es/ProForm/utils/getDefaultProps.js +5 -5
- package/es/ProForm/utils/index.js +62 -90
- package/es/ProForm/utils/processDependencies.js +4 -5
- package/es/ProForm/utils/rulesCreator.js +12 -12
- package/es/ProForm/utils/transformNames.js +2 -2
- package/es/ProForm/utils/transformValue.js +6 -8
- package/es/ProForm/utils/useDeepCompareMemo.js +1 -1
- package/es/ProForm/utils/useFieldProps.js +1 -3
- package/es/ProForm/utils/useForm.js +19 -21
- package/es/ProForm/utils/useRules.js +17 -22
- package/es/ProForm/utils/useShouldUpdate.js +79 -83
- package/es/ProForm/utils/useWatch.js +12 -12
- package/es/ProForm/utils/valueType.js +46 -50
- package/es/ProIcon/index.js +30 -31
- package/es/ProIcon/utils/index.js +5 -5
- package/es/ProLayout/components/Layout/Header/index.js +1 -1
- package/es/ProLayout/components/Layout/Icon/Icon.js +4 -4
- package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +19 -22
- package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +23 -30
- package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +3 -3
- package/es/ProLayout/components/Layout/Menu/index.js +9 -9
- package/es/ProLayout/components/Layout/Notice/index.js +3 -3
- package/es/ProLayout/components/ProCollapse/index.js +23 -18
- package/es/ProLayout/components/ProFooter/index.js +13 -14
- package/es/ProLayout/components/ProHeader/components/Copy/index.js +6 -5
- package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +6 -5
- package/es/ProLayout/components/ProHeader/index.js +68 -59
- package/es/ProLayout/components/ProHeader/utils/index.js +1 -1
- package/es/ProLayout/index.js +33 -32
- package/es/ProLayout/utils/index.js +17 -18
- package/es/ProSelect/components/AdaptiveTooltip.js +8 -9
- package/es/ProSelect/index.js +57 -64
- package/es/ProSelect/utils/index.js +17 -28
- package/es/ProStep/components/Anchor/index.js +10 -9
- package/es/ProStep/components/Item/index.js +11 -11
- package/es/ProStep/components/Listener/index.js +6 -10
- package/es/ProStep/components/Step/index.js +9 -11
- package/es/ProStep/index.js +24 -30
- package/es/ProStep/utils/index.js +8 -8
- package/es/ProStepTab/index.js +27 -28
- package/es/ProTable/components/FormatColumn/index.js +54 -59
- package/es/ProTable/components/RcTable/components/BaseTable/index.js +6 -7
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +21 -37
- package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +16 -17
- package/es/ProTable/components/RcTable/components/DraggableTable/index.js +5 -6
- package/es/ProTable/components/RenderColumn/index.js +36 -35
- package/es/ProTable/components/RenderEmptyText/index.js +1 -1
- package/es/ProTable/components/RenderFooter/index.js +2 -2
- package/es/ProTable/components/RenderSummary/index.js +13 -12
- package/es/ProTable/components/RenderTableHeader/index.js +5 -4
- package/es/ProTable/components/RenderTabs/index.js +26 -29
- package/es/ProTable/components/TableResizable/index.js +8 -8
- package/es/ProTable/components/TooltipTitle/index.js +4 -3
- package/es/ProTable/hooks/useAntdTable.js +80 -95
- package/es/ProTable/index.js +110 -133
- package/es/ProTable/propsType.d.ts +9 -3
- package/es/ProTable/utils/index.js +13 -16
- package/es/ProTabs/components/Card/index.js +14 -8
- package/es/ProTabs/index.js +30 -20
- package/es/ProTabs/propType.d.ts +5 -0
- package/es/ProTabs/style/index.less +40 -3
- package/es/ProThemeTools/component/ProTools/index.js +46 -39
- package/es/ProThemeTools/context/ThemeContext.js +13 -13
- package/es/ProThemeTools/index.js +18 -19
- package/es/ProThemeTools/utils/index.js +14 -18
- package/es/ProTooltip/index.js +24 -27
- package/es/ProTree/components/AdaptiveTooltip.js +5 -6
- package/es/ProTree/components/List.js +10 -13
- package/es/ProTree/components/ProTree.js +47 -64
- package/es/ProTree/components/ProTreeSelect/index.js +77 -76
- package/es/ProTree/components/Tree.js +23 -22
- package/es/ProTree/index.js +1 -1
- package/es/ProTree/utils.js +14 -14
- package/es/ProTreeModal/components/Cascader.js +13 -16
- package/es/ProTreeModal/components/List.js +49 -70
- package/es/ProTreeModal/components/SortableItem.js +7 -8
- package/es/ProTreeModal/components/Tree.js +18 -23
- package/es/ProTreeModal/components/Trigger.js +15 -10
- package/es/ProTreeModal/index.js +98 -151
- package/es/ProTreeModal/utils.js +21 -21
- package/es/ProUpload/components/ButtonRender.js +11 -12
- package/es/ProUpload/components/DragRender.js +17 -20
- package/es/ProUpload/components/DraggableUploadListItem.js +2 -2
- package/es/ProUpload/components/Example.js +3 -3
- package/es/ProUpload/components/FileItem.js +30 -25
- package/es/ProUpload/components/ImageRender.js +29 -22
- package/es/ProUpload/index.js +55 -66
- package/es/ProUpload/uitls.js +2 -2
- package/es/ProUtils/utils/index.js +10 -14
- package/es/ProViewer/index.js +22 -19
- package/es/ProViewer/propsType.js +0 -3
- package/es/ProWaterMark/index.js +4 -3
- package/es/index.d.ts +1 -1
- package/es/locale/index.js +2 -2
- package/es/style/index.less +1 -1
- package/es/style/theme/base.less +1 -0
- package/es/utils/index.js +11 -13
- package/lib/FormsProvider/index.js +30 -50
- package/lib/ProAction/components/CheckModalContent/index.js +31 -27
- package/lib/ProAction/index.js +194 -151
- package/lib/ProAction/propsType.js +4 -16
- package/lib/ProConfigProvider/index.js +136 -136
- package/lib/ProDownload/index.js +192 -124
- package/lib/ProDownload/propsType.js +4 -16
- package/lib/ProDownload/utils.js +189 -143
- package/lib/ProDrawerForm/components/ProDrawer/index.js +243 -169
- package/lib/ProDrawerForm/components/ProModal/index.js +194 -134
- package/lib/ProDrawerForm/components/index.js +17 -39
- package/lib/ProDrawerForm/index.js +79 -88
- package/lib/ProDrawerForm/propsType.js +4 -16
- package/lib/ProDrawerForm/utils/index.js +13 -30
- package/lib/ProEditLabel/components/RenderProForm.js +58 -57
- package/lib/ProEditLabel/index.js +251 -178
- package/lib/ProEditLabel/propsType.js +4 -16
- package/lib/ProEditLabel/utils/index.js +11 -26
- package/lib/ProEditTable/components/ActionButton/index.js +144 -155
- package/lib/ProEditTable/components/RcTable/BaseTable.js +97 -96
- package/lib/ProEditTable/components/RcTable/DraggableTable.js +172 -151
- package/lib/ProEditTable/components/RcTable/index.js +17 -39
- package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +177 -176
- package/lib/ProEditTable/components/RenderField/index.js +628 -539
- package/lib/ProEditTable/components/RenderToolbar/index.js +119 -105
- package/lib/ProEditTable/components/Summary/index.js +70 -61
- package/lib/ProEditTable/components/Validator/index.js +30 -47
- package/lib/ProEditTable/components/index.js +38 -48
- package/lib/ProEditTable/index.js +379 -324
- package/lib/ProEditTable/propsType.js +4 -16
- package/lib/ProEditTable/utils/config.js +225 -170
- package/lib/ProEditTable/utils/diffOriginal.js +93 -80
- package/lib/ProEditTable/utils/getDefaultProps.js +26 -42
- package/lib/ProEditTable/utils/index.js +318 -244
- package/lib/ProEditTable/utils/tools.js +438 -243
- package/lib/ProEditTable/utils/transform.js +15 -28
- package/lib/ProEditTable/utils/useEditTableError.js +65 -54
- package/lib/ProEnum/components/Group.js +53 -81
- package/lib/ProEnum/components/Tag.js +37 -54
- package/lib/ProEnum/hooks/useEnum.js +72 -52
- package/lib/ProEnum/hooks/useEnumRequest.js +267 -194
- package/lib/ProEnum/hooks/useFrequentEnumRequest.d.ts +14 -0
- package/lib/ProEnum/hooks/useFrequentEnumRequest.js +83 -0
- package/lib/ProEnum/index.js +239 -234
- package/lib/ProEnum/propsType.d.ts +29 -0
- package/lib/ProEnum/propsType.js +4 -16
- package/lib/ProEnum/utils/eventCenter.js +15 -12
- package/lib/ProEnum/utils/frequentEnum.d.ts +40 -0
- package/lib/ProEnum/utils/frequentEnum.js +99 -0
- package/lib/ProEnum/utils/getEnumLabel.js +57 -65
- package/lib/ProEnum/utils/index.js +98 -68
- package/lib/ProForm/components/Container.js +35 -45
- package/lib/ProForm/components/FormFooter/index.js +67 -80
- package/lib/ProForm/components/FormFooter/propsType.js +4 -16
- package/lib/ProForm/components/base/Checkbox/index.js +67 -62
- package/lib/ProForm/components/base/DatePicker/index.js +63 -74
- package/lib/ProForm/components/base/DatePicker/useDateLimit.js +13 -29
- package/lib/ProForm/components/base/Input/index.js +65 -73
- package/lib/ProForm/components/base/Input/propsType.js +4 -16
- package/lib/ProForm/components/base/InputNumber/index.js +230 -176
- package/lib/ProForm/components/base/Radio/index.js +60 -69
- package/lib/ProForm/components/base/RangePicker/index.js +73 -88
- package/lib/ProForm/components/base/RangePicker/useDateRange.js +28 -45
- package/lib/ProForm/components/base/Select/index.js +63 -69
- package/lib/ProForm/components/base/Switch/index.js +43 -59
- package/lib/ProForm/components/base/SwitchCheckbox/index.js +63 -62
- package/lib/ProForm/components/base/TextArea/index.js +52 -65
- package/lib/ProForm/components/base/TimePicker/index.js +45 -59
- package/lib/ProForm/components/combination/Container/index.js +58 -72
- package/lib/ProForm/components/combination/Container/propsType.js +4 -16
- package/lib/ProForm/components/combination/FormList/components/ActionButton.js +240 -195
- package/lib/ProForm/components/combination/FormList/components/BlockFields.js +85 -107
- package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +25 -44
- package/lib/ProForm/components/combination/FormList/components/Empty.js +92 -55
- package/lib/ProForm/components/combination/FormList/components/LineFields.js +92 -117
- package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +133 -101
- package/lib/ProForm/components/combination/FormList/index.js +131 -164
- package/lib/ProForm/components/combination/FormList/propsType.js +4 -16
- package/lib/ProForm/components/combination/FormList/utils.js +32 -52
- package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +23 -38
- package/lib/ProForm/components/combination/Group/component/ComRender.js +78 -74
- package/lib/ProForm/components/combination/Group/hooks/index.d.ts +0 -1
- package/lib/ProForm/components/combination/Group/hooks/index.js +123 -123
- package/lib/ProForm/components/combination/Group/index.js +99 -104
- package/lib/ProForm/components/combination/Group/propsType.d.ts +2 -0
- package/lib/ProForm/components/combination/Group/propsType.js +4 -16
- package/lib/ProForm/components/combination/Group/style/index.less +7 -0
- package/lib/ProForm/components/combination/Group/utils.d.ts +0 -1
- package/lib/ProForm/components/combination/Group/utils.js +132 -104
- package/lib/ProForm/components/combination/ProCascader/index.js +271 -226
- package/lib/ProForm/components/combination/ProCascader/propsType.js +4 -16
- package/lib/ProForm/components/combination/ProCascader/utils/index.js +23 -33
- package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +113 -114
- package/lib/ProForm/components/combination/ProModalSelect/index.js +651 -472
- package/lib/ProForm/components/combination/ProModalSelect/propsType.js +4 -16
- package/lib/ProForm/components/combination/ProModalSelect/utils/index.js +21 -43
- package/lib/ProForm/components/combination/ProNumberRange/index.js +207 -160
- package/lib/ProForm/components/combination/ProNumberRange/propsType.d.ts +3 -2
- package/lib/ProForm/components/combination/ProNumberRange/propsType.js +4 -16
- package/lib/ProForm/components/combination/ProNumberRange/style/index.less +1 -1
- package/lib/ProForm/components/combination/ProRangeLimit/index.js +169 -139
- package/lib/ProForm/components/combination/ProRangeLimit/propsType.js +4 -16
- package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +28 -49
- package/lib/ProForm/components/combination/ProTimeLimit/index.js +150 -127
- package/lib/ProForm/components/index.js +192 -115
- package/lib/ProForm/components/render/ChangedWrapper.js +130 -141
- package/lib/ProForm/components/render/ConfirmWrapper.js +120 -78
- package/lib/ProForm/components/render/Render.js +445 -346
- package/lib/ProForm/components/render/RenderFields.d.ts +0 -1
- package/lib/ProForm/components/render/RenderFields.js +195 -181
- package/lib/ProForm/components/render/propsType.js +31 -17
- package/lib/ProForm/index.js +282 -235
- package/lib/ProForm/propsType.d.ts +1 -4
- package/lib/ProForm/propsType.js +9 -38
- package/lib/ProForm/utils/diffOriginal.js +88 -81
- package/lib/ProForm/utils/getDefaultProps.js +26 -42
- package/lib/ProForm/utils/index.js +330 -254
- package/lib/ProForm/utils/processDependencies.js +61 -44
- package/lib/ProForm/utils/rulesCreator.js +58 -81
- package/lib/ProForm/utils/transformNames.js +26 -37
- package/lib/ProForm/utils/transformValue.js +47 -47
- package/lib/ProForm/utils/useDeepCompareMemo.js +15 -34
- package/lib/ProForm/utils/useFieldProps.js +10 -42
- package/lib/ProForm/utils/useForm.js +226 -118
- package/lib/ProForm/utils/useRules.js +50 -60
- package/lib/ProForm/utils/useShouldUpdate.js +233 -126
- package/lib/ProForm/utils/useWatch.js +122 -93
- package/lib/ProForm/utils/valueType.js +222 -155
- package/lib/ProIcon/config/index.js +278 -365
- package/lib/ProIcon/index.js +217 -184
- package/lib/ProIcon/propsTypes.js +4 -16
- package/lib/ProIcon/symbolIcon.js +30 -23
- package/lib/ProIcon/utils/index.js +53 -60
- package/lib/ProLayout/components/Layout/Header/index.js +42 -59
- package/lib/ProLayout/components/Layout/Icon/Icon.js +31 -49
- package/lib/ProLayout/components/Layout/Icon/index.js +7 -34
- package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +170 -139
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +135 -117
- package/lib/ProLayout/components/Layout/Menu/OpenMenu/propsType.js +4 -16
- package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +44 -60
- package/lib/ProLayout/components/Layout/Menu/index.js +52 -71
- package/lib/ProLayout/components/Layout/Notice/index.js +31 -39
- package/lib/ProLayout/components/Layout/index.js +31 -45
- package/lib/ProLayout/components/ProCollapse/PropTypes.js +4 -16
- package/lib/ProLayout/components/ProCollapse/index.js +159 -148
- package/lib/ProLayout/components/ProFooter/PropTypes.js +4 -16
- package/lib/ProLayout/components/ProFooter/index.js +41 -56
- package/lib/ProLayout/components/ProHeader/PropTypes.js +4 -16
- package/lib/ProLayout/components/ProHeader/components/Copy/index.js +26 -53
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +27 -48
- package/lib/ProLayout/components/ProHeader/components/ProBackBtn/propsType.js +4 -16
- package/lib/ProLayout/components/ProHeader/components/index.js +17 -39
- package/lib/ProLayout/components/ProHeader/index.js +466 -268
- package/lib/ProLayout/components/ProHeader/utils/index.js +14 -31
- package/lib/ProLayout/components/index.js +24 -42
- package/lib/ProLayout/index.js +139 -130
- package/lib/ProLayout/propTypes.js +4 -16
- package/lib/ProLayout/utils/index.js +120 -86
- package/lib/ProSelect/components/AdaptiveTooltip.js +38 -45
- package/lib/ProSelect/index.js +240 -213
- package/lib/ProSelect/propsType.js +4 -16
- package/lib/ProSelect/utils/index.js +114 -93
- package/lib/ProStep/components/Anchor/index.js +102 -107
- package/lib/ProStep/components/Item/index.js +71 -75
- package/lib/ProStep/components/Listener/index.js +69 -62
- package/lib/ProStep/components/Step/index.js +65 -75
- package/lib/ProStep/index.js +227 -165
- package/lib/ProStep/propsType.js +4 -16
- package/lib/ProStep/utils/index.js +54 -57
- package/lib/ProStepTab/index.js +307 -166
- package/lib/ProStepTab/propsType.js +4 -16
- package/lib/ProTable/components/FormatColumn/index.js +472 -425
- package/lib/ProTable/components/RcTable/components/BaseTable/index.js +39 -53
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +183 -135
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +85 -104
- package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/propsType.js +4 -16
- package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +58 -80
- package/lib/ProTable/components/RcTable/index.js +17 -39
- package/lib/ProTable/components/RenderColumn/index.js +203 -194
- package/lib/ProTable/components/RenderEmptyText/index.js +25 -27
- package/lib/ProTable/components/RenderFooter/index.js +17 -33
- package/lib/ProTable/components/RenderSummary/index.js +57 -46
- package/lib/ProTable/components/RenderTableHeader/index.js +62 -68
- package/lib/ProTable/components/RenderTabs/index.js +67 -80
- package/lib/ProTable/components/TableResizable/index.js +87 -87
- package/lib/ProTable/components/TooltipTitle/index.js +27 -40
- package/lib/ProTable/components/index.js +45 -51
- package/lib/ProTable/hooks/useAntdTable.js +351 -304
- package/lib/ProTable/index.js +354 -333
- package/lib/ProTable/propsType.d.ts +9 -3
- package/lib/ProTable/propsType.js +4 -16
- package/lib/ProTable/utils/index.js +89 -78
- package/lib/ProTabs/components/Card/index.js +57 -30
- package/lib/ProTabs/components/index.js +10 -36
- package/lib/ProTabs/index.js +94 -89
- package/lib/ProTabs/propType.d.ts +5 -0
- package/lib/ProTabs/propType.js +4 -16
- package/lib/ProTabs/style/index.less +40 -3
- package/lib/ProThemeTools/component/ProTools/index.js +246 -198
- package/lib/ProThemeTools/component/index.js +10 -36
- package/lib/ProThemeTools/context/ThemeContext.js +99 -89
- package/lib/ProThemeTools/index.js +207 -172
- package/lib/ProThemeTools/propsType.js +4 -16
- package/lib/ProThemeTools/utils/index.js +84 -80
- package/lib/ProTooltip/index.js +217 -214
- package/lib/ProTooltip/propsType.js +4 -16
- package/lib/ProTree/components/AdaptiveTooltip.js +22 -33
- package/lib/ProTree/components/CloseIcon.js +31 -36
- package/lib/ProTree/components/List.js +69 -68
- package/lib/ProTree/components/ProTree.js +346 -258
- package/lib/ProTree/components/ProTreeSelect/index.js +460 -336
- package/lib/ProTree/components/ProTreeSelect/propsType.js +4 -16
- package/lib/ProTree/components/SearchTitle.js +50 -47
- package/lib/ProTree/components/Tree.js +300 -227
- package/lib/ProTree/components/index.js +31 -45
- package/lib/ProTree/index.js +22 -45
- package/lib/ProTree/propsType.js +4 -16
- package/lib/ProTree/utils.js +140 -79
- package/lib/ProTreeModal/components/Cascader.js +90 -97
- package/lib/ProTreeModal/components/CloseIcon.js +31 -36
- package/lib/ProTreeModal/components/List.js +246 -192
- package/lib/ProTreeModal/components/SearchTitle.js +22 -30
- package/lib/ProTreeModal/components/SortableItem.js +59 -60
- package/lib/ProTreeModal/components/Tree.js +171 -157
- package/lib/ProTreeModal/components/Trigger.js +131 -108
- package/lib/ProTreeModal/components/index.js +45 -51
- package/lib/ProTreeModal/index.js +523 -448
- package/lib/ProTreeModal/propsType.js +4 -16
- package/lib/ProTreeModal/utils.js +160 -99
- package/lib/ProUpload/components/ButtonRender.js +106 -85
- package/lib/ProUpload/components/DragRender.js +167 -117
- package/lib/ProUpload/components/DraggableUploadListItem.js +32 -48
- package/lib/ProUpload/components/Example.js +39 -55
- package/lib/ProUpload/components/FileItem.js +215 -113
- package/lib/ProUpload/components/ImageRender.js +250 -175
- package/lib/ProUpload/index.js +185 -181
- package/lib/ProUpload/propsType.js +4 -16
- package/lib/ProUpload/uitls.js +9 -31
- package/lib/ProUtils/utils/index.js +20 -36
- package/lib/ProViewer/index.js +210 -175
- package/lib/ProViewer/propsType.js +1 -17
- package/lib/ProWaterMark/index.js +20 -38
- package/lib/ProWaterMark/propsType.js +4 -16
- package/lib/index.d.ts +1 -1
- package/lib/index.js +272 -123
- package/lib/locale/en_US.js +127 -145
- package/lib/locale/index.js +40 -55
- package/lib/locale/zh_CN.js +128 -146
- package/lib/style/index.less +1 -1
- package/lib/style/theme/base.less +1 -0
- package/lib/tokens.js +87 -103
- package/lib/utils/index.js +66 -88
- package/package.json +11 -11
- package/dist/esm/index.d.ts +0 -5
- package/dist/esm/index.js +0 -5
- package/dist/esm/regExp/index.d.ts +0 -19
- package/dist/esm/regExp/index.js +0 -73
- package/dist/esm/tools/calc/index.d.ts +0 -4
- package/dist/esm/tools/calc/index.js +0 -67
- package/dist/esm/tools/dateUtils.d.ts +0 -7
- package/dist/esm/tools/dateUtils.js +0 -23
- package/dist/esm/tools/disableDate/index.d.ts +0 -9
- package/dist/esm/tools/disableDate/index.js +0 -43
- package/dist/esm/tools/disableTimeRange/index.d.ts +0 -9
- package/dist/esm/tools/disableTimeRange/index.js +0 -121
- package/dist/esm/tools/formatAmount/index.d.ts +0 -7
- package/dist/esm/tools/formatAmount/index.js +0 -14
- package/dist/esm/tools/formatPerMill/index.d.ts +0 -7
- package/dist/esm/tools/formatPerMill/index.js +0 -11
- package/dist/esm/tools/formatPercent/index.d.ts +0 -7
- package/dist/esm/tools/formatPercent/index.js +0 -11
- package/dist/esm/tools/getDataByIdCard/index.d.ts +0 -16
- package/dist/esm/tools/getDataByIdCard/index.js +0 -65
- package/dist/esm/tools/index.d.ts +0 -12
- package/dist/esm/tools/index.js +0 -14
- package/dist/esm/tools/sumAmount/index.d.ts +0 -16
- package/dist/esm/tools/sumAmount/index.js +0 -40
- package/dist/esm/tools/toChineseNum/index.d.ts +0 -7
- package/dist/esm/tools/toChineseNum/index.js +0 -103
- package/dist/esm/tools/toFixed/index.d.ts +0 -2
- package/dist/esm/tools/toFixed/index.js +0 -5
- package/dist/esm/tools/transformDataName/index.d.ts +0 -12
- package/dist/esm/tools/transformDataName/index.js +0 -37
- package/dist/esm/transforms/dateTransformer/index.d.ts +0 -24
- package/dist/esm/transforms/dateTransformer/index.js +0 -67
- package/dist/esm/transforms/index.d.ts +0 -6
- package/dist/esm/transforms/index.js +0 -6
- package/dist/esm/transforms/propTypes.d.ts +0 -7
- package/dist/esm/transforms/propTypes.js +0 -1
- package/dist/esm/transforms/transformDate/index.d.ts +0 -21
- package/dist/esm/transforms/transformDate/index.js +0 -141
- package/dist/esm/transforms/transformDatePicker/index.d.ts +0 -12
- package/dist/esm/transforms/transformDatePicker/index.js +0 -24
- package/dist/esm/transforms/transformRangePicker/index.d.ts +0 -29
- package/dist/esm/transforms/transformRangePicker/index.js +0 -61
- package/dist/esm/transforms/transformSwitch/index.d.ts +0 -13
- package/dist/esm/transforms/transformSwitch/index.js +0 -35
- package/dist/esm/transforms/utils.d.ts +0 -2
- package/dist/esm/transforms/utils.js +0 -8
- package/dist/esm/validate/index.d.ts +0 -107
- package/dist/esm/validate/index.js +0 -284
- package/tests/__mocks__/fileMock.js +0 -1
- package/tests/__mocks__/zatUtils.js +0 -27
- package/tests/setup.ts +0 -484
- package/tests/test-utils.tsx +0 -81
@@ -1,114 +1,138 @@
|
|
1
|
-
|
2
|
-
var __defProp = Object.defineProperty;
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
-
var __export = (target, all) => {
|
8
|
-
for (var name in all)
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
-
};
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
-
for (let key of __getOwnPropNames(from))
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
-
}
|
17
|
-
return to;
|
18
|
-
};
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
25
|
-
mod
|
26
|
-
));
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
1
|
+
"use strict";
|
28
2
|
|
29
|
-
|
30
|
-
var
|
31
|
-
|
32
|
-
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
33
7
|
});
|
34
|
-
|
35
|
-
var
|
36
|
-
var
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
8
|
+
exports.getSelectList = void 0;
|
9
|
+
var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
|
10
|
+
var _lodash = _interopRequireWildcard(require("lodash"));
|
11
|
+
/* eslint-disable no-restricted-syntax */
|
12
|
+
|
13
|
+
/**
|
14
|
+
* 查找选择器名称的值
|
15
|
+
* @param list 表单列表
|
16
|
+
* @param selectName 选择器名称
|
17
|
+
* @param value 选择器值
|
18
|
+
* @param dataSource 数据源
|
19
|
+
* @param labelInValue 是否为labelInValue模式
|
20
|
+
* @param fieldNames 字段名
|
21
|
+
* @param mode 模式
|
22
|
+
*/
|
23
|
+
var findSelectNameValues = _ref => {
|
24
|
+
var _ref$list = _ref.list,
|
25
|
+
list = _ref$list === void 0 ? [] : _ref$list,
|
26
|
+
selectName = _ref.selectName,
|
27
|
+
value = _ref.value,
|
28
|
+
dataSource = _ref.dataSource,
|
29
|
+
labelInValue = _ref.labelInValue,
|
30
|
+
fieldNames = _ref.fieldNames,
|
31
|
+
mode = _ref.mode;
|
32
|
+
var selectValues = [];
|
33
|
+
list.forEach(item => {
|
34
|
+
var result = item;
|
35
|
+
if (!item || !Object.keys(item).length || Object.keys(item).length === 1 && 'rowKey' in item) {
|
49
36
|
return false;
|
50
37
|
}
|
51
|
-
|
52
|
-
|
38
|
+
var _iterator = (0, _createForOfIteratorHelper2.default)(selectName),
|
39
|
+
_step;
|
40
|
+
try {
|
41
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
42
|
+
var key = _step.value;
|
43
|
+
result = result[key];
|
44
|
+
}
|
45
|
+
} catch (err) {
|
46
|
+
_iterator.e(err);
|
47
|
+
} finally {
|
48
|
+
_iterator.f();
|
53
49
|
}
|
54
|
-
if (mode ===
|
55
|
-
selectValues = [...selectValues, ...
|
50
|
+
if (mode === 'multiple') {
|
51
|
+
selectValues = [...selectValues, ...(result || [])];
|
56
52
|
} else {
|
57
|
-
selectValues.push(
|
53
|
+
selectValues.push(result);
|
58
54
|
}
|
59
55
|
});
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
if (mode ===
|
66
|
-
|
67
|
-
|
68
|
-
|
56
|
+
var diffList = _lodash.default.difference(selectValues, mode === 'multiple' ? value : [value]);
|
57
|
+
var result = dataSource.filter(item => !diffList.includes(labelInValue ? item : item[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value] || (item === null || item === void 0 ? void 0 : item.value)));
|
58
|
+
var isSingle = list === null || list === void 0 ? void 0 : list.find(item => item === null || item === void 0 ? void 0 : item._isEditing);
|
59
|
+
|
60
|
+
// 修复单行编辑模式下,选择器无法过滤的问题
|
61
|
+
if (mode === 'multiple' && isSingle) {
|
62
|
+
// 找到当前编辑行
|
63
|
+
var editingRow = list.find(item => item === null || item === void 0 ? void 0 : item._isEditing);
|
64
|
+
|
65
|
+
// 收集其他行的已选择值
|
66
|
+
var otherRowsValues = [];
|
67
|
+
list.forEach(item => {
|
69
68
|
if (item !== editingRow) {
|
70
|
-
|
71
|
-
|
72
|
-
|
69
|
+
// 排除当前编辑行
|
70
|
+
var _result = item;
|
71
|
+
var _iterator2 = (0, _createForOfIteratorHelper2.default)(selectName),
|
72
|
+
_step2;
|
73
|
+
try {
|
74
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
75
|
+
var key = _step2.value;
|
76
|
+
_result = _result[key];
|
77
|
+
}
|
78
|
+
} catch (err) {
|
79
|
+
_iterator2.e(err);
|
80
|
+
} finally {
|
81
|
+
_iterator2.f();
|
73
82
|
}
|
74
|
-
if (
|
75
|
-
otherRowsValues.push(...Array.isArray(
|
83
|
+
if (_result) {
|
84
|
+
otherRowsValues.push(...(Array.isArray(_result) ? _result : [_result]));
|
76
85
|
}
|
77
86
|
}
|
78
87
|
});
|
79
|
-
|
88
|
+
|
89
|
+
// 获取当前编辑行的已选择值
|
90
|
+
var currentRowValues = [];
|
80
91
|
if (editingRow) {
|
81
|
-
|
82
|
-
|
83
|
-
|
92
|
+
var _result2 = editingRow;
|
93
|
+
var _iterator3 = (0, _createForOfIteratorHelper2.default)(selectName),
|
94
|
+
_step3;
|
95
|
+
try {
|
96
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
97
|
+
var key = _step3.value;
|
98
|
+
_result2 = _result2[key];
|
99
|
+
}
|
100
|
+
} catch (err) {
|
101
|
+
_iterator3.e(err);
|
102
|
+
} finally {
|
103
|
+
_iterator3.f();
|
84
104
|
}
|
85
|
-
currentRowValues = Array.isArray(
|
105
|
+
currentRowValues = Array.isArray(_result2) ? _result2 : _result2 ? [_result2] : [];
|
86
106
|
}
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
);
|
107
|
+
|
108
|
+
// 从dataSource中过滤掉其他行的值,但保留当前行的值
|
109
|
+
var _diffList = _lodash.default.difference(otherRowsValues, currentRowValues);
|
110
|
+
return dataSource.filter(item => !_diffList.includes(labelInValue ? item : item[fieldNames === null || fieldNames === void 0 ? void 0 : fieldNames.value] || (item === null || item === void 0 ? void 0 : item.value)));
|
91
111
|
}
|
92
112
|
return result;
|
93
113
|
};
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
114
|
+
|
115
|
+
/**
|
116
|
+
* 返回当前组件可以显示的数据源
|
117
|
+
*/
|
118
|
+
var getSelectList = _ref2 => {
|
119
|
+
var otherProps = _ref2.otherProps,
|
120
|
+
value = _ref2.value,
|
121
|
+
dataSource = _ref2.dataSource,
|
122
|
+
labelInValue = _ref2.labelInValue,
|
123
|
+
fieldNames = _ref2.fieldNames,
|
124
|
+
mode = _ref2.mode;
|
102
125
|
if (!otherProps) {
|
103
126
|
return null;
|
104
127
|
}
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
);
|
110
|
-
|
111
|
-
|
128
|
+
var name = otherProps.name,
|
129
|
+
listName = otherProps.listName,
|
130
|
+
form = otherProps.form;
|
131
|
+
// 修复formlist无法过滤的问题
|
132
|
+
var _name = Array.isArray(name) && (0, _lodash.isNumber)(name[0]) ? listName : name;
|
133
|
+
var firstNumberIndex = listName.lastIndexOf(listName.findLast(item => typeof item === 'number'));
|
134
|
+
var fatherName = (_name || listName).slice(0, firstNumberIndex);
|
135
|
+
var selectName = (_name || listName).slice(firstNumberIndex + 1);
|
112
136
|
return findSelectNameValues({
|
113
137
|
list: form.getFieldValue(fatherName) || [],
|
114
138
|
selectName,
|
@@ -119,7 +143,4 @@ var getSelectList = ({
|
|
119
143
|
mode
|
120
144
|
});
|
121
145
|
};
|
122
|
-
|
123
|
-
0 && (module.exports = {
|
124
|
-
getSelectList
|
125
|
-
});
|
146
|
+
exports.getSelectList = getSelectList;
|
@@ -1,123 +1,118 @@
|
|
1
|
-
|
2
|
-
var __defProp = Object.defineProperty;
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
-
var __export = (target, all) => {
|
8
|
-
for (var name in all)
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
-
};
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
-
for (let key of __getOwnPropNames(from))
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
-
}
|
17
|
-
return to;
|
18
|
-
};
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
25
|
-
mod
|
26
|
-
));
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
1
|
+
"use strict";
|
28
2
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
MenuItem: () => MenuItem,
|
33
|
-
default: () => Anchor_default
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
5
|
+
value: true
|
34
6
|
});
|
35
|
-
|
36
|
-
|
37
|
-
var
|
38
|
-
var
|
39
|
-
var
|
40
|
-
|
7
|
+
exports.default = exports.MenuItem = void 0;
|
8
|
+
require("antd/es/badge/style");
|
9
|
+
var _badge = _interopRequireDefault(require("antd/es/badge"));
|
10
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
11
|
+
var _utils = require("../../utils");
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
13
|
+
var AnchorSvg = _ref => {
|
14
|
+
var color = _ref.color;
|
15
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", {
|
16
|
+
viewBox: "0 0 1097 1024",
|
17
|
+
width: "18",
|
18
|
+
height: "18",
|
19
|
+
style: {
|
20
|
+
fill: color
|
21
|
+
},
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
23
|
+
d: "M570.514286 0a512 512 0 1 1 0 1024A512 512 0 0 1 570.514286 0z m0 73.142857a438.857143 438.857143 0 1 0 0 877.714286A438.857143 438.857143 0 0 0 570.514286 73.142857z"
|
24
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
25
|
+
d: "M570.514286 512m-365.714286 0a365.714286 365.714286 0 1 0 731.428571 0 365.714286 365.714286 0 1 0-731.428571 0Z"
|
26
|
+
})]
|
27
|
+
});
|
41
28
|
};
|
42
29
|
var SuccessSvg = () => {
|
43
|
-
return
|
30
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
|
31
|
+
viewBox: "0 0 1408 1024",
|
32
|
+
width: "18",
|
33
|
+
height: "18",
|
34
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", {
|
35
|
+
d: "M496.64 906.24a113.92 113.92 0 0 0 161.28 0l691.2-691.2A113.92 113.92 0 1 0 1187.84 53.76L572.416 659.456 296.96 384a113.92 113.92 0 1 0-161.28 161.28l360.96 360.96z"
|
36
|
+
})
|
37
|
+
});
|
44
38
|
};
|
45
|
-
var MenuItem =
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
scrollToError = true
|
59
|
-
|
60
|
-
const renderMenuIcon = () => {
|
39
|
+
var MenuItem = props => {
|
40
|
+
var name = props.name,
|
41
|
+
code = props.code,
|
42
|
+
onOff = props.onOff,
|
43
|
+
isStart = props.isStart,
|
44
|
+
isEnd = props.isEnd,
|
45
|
+
isDisabled = props.isDisabled,
|
46
|
+
isCurrentStep = props.isCurrentStep,
|
47
|
+
isChecked = props.isChecked,
|
48
|
+
errorNum = props.errorNum,
|
49
|
+
currentNum = props.currentNum,
|
50
|
+
targetOffset = props.targetOffset,
|
51
|
+
_props$scrollToError = props.scrollToError,
|
52
|
+
scrollToError = _props$scrollToError === void 0 ? true : _props$scrollToError;
|
53
|
+
var renderMenuIcon = () => {
|
61
54
|
if (isCurrentStep) {
|
62
|
-
return
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
},
|
70
|
-
currentNum
|
71
|
-
);
|
55
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
56
|
+
className: (0, _classnames.default)('pro-step-dot-icon', {
|
57
|
+
errored: !!errorNum,
|
58
|
+
disabled: isDisabled
|
59
|
+
}),
|
60
|
+
children: currentNum
|
61
|
+
});
|
72
62
|
}
|
73
|
-
|
74
|
-
!!errorNum && (color =
|
75
|
-
isDisabled && (color =
|
63
|
+
var color;
|
64
|
+
!!errorNum && (color = '#ff5050');
|
65
|
+
isDisabled && (color = '#939599');
|
76
66
|
if (isStart) {
|
77
|
-
return
|
67
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AnchorSvg, {
|
68
|
+
color: color
|
69
|
+
});
|
78
70
|
}
|
79
71
|
if (isEnd) {
|
80
|
-
return
|
72
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AnchorSvg, {
|
73
|
+
color: isDisabled ? '#939599' : undefined
|
74
|
+
});
|
81
75
|
}
|
82
|
-
return
|
83
|
-
|
84
|
-
{
|
85
|
-
className: (0, import_classnames.default)("pro-step-dot", {
|
86
|
-
errored: !!errorNum,
|
87
|
-
disabled: isDisabled
|
88
|
-
})
|
89
|
-
}
|
90
|
-
);
|
91
|
-
};
|
92
|
-
return /* @__PURE__ */ React.createElement(
|
93
|
-
"div",
|
94
|
-
{
|
95
|
-
className: (0, import_classnames.default)("pro-step-com-menu-item", {
|
76
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
77
|
+
className: (0, _classnames.default)('pro-step-dot', {
|
96
78
|
errored: !!errorNum,
|
97
|
-
disabled: isDisabled
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
79
|
+
disabled: isDisabled
|
80
|
+
})
|
81
|
+
});
|
82
|
+
};
|
83
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
84
|
+
className: (0, _classnames.default)('pro-step-com-menu-item', {
|
85
|
+
errored: !!errorNum,
|
86
|
+
disabled: isDisabled,
|
87
|
+
current: isCurrentStep && onOff
|
88
|
+
}),
|
89
|
+
onClick: () => {
|
90
|
+
(0, _utils.handleScroll)(code, {
|
91
|
+
targetOffset,
|
92
|
+
scrollToError
|
93
|
+
});
|
106
94
|
},
|
107
|
-
|
108
|
-
"
|
109
|
-
{
|
110
|
-
className:
|
95
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
96
|
+
className: "pro-step-menu-item",
|
97
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
98
|
+
className: "pro-step-menu-icon",
|
99
|
+
children: renderMenuIcon()
|
100
|
+
}), onOff && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
101
|
+
className: (0, _classnames.default)('pro-step-menu-name', {
|
111
102
|
disabled: isDisabled
|
103
|
+
}),
|
104
|
+
children: name
|
105
|
+
})]
|
106
|
+
}), !isDisabled && onOff && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
107
|
+
className: "pro-step-checked-status",
|
108
|
+
children: [isChecked && /*#__PURE__*/(0, _jsxRuntime.jsx)(SuccessSvg, {}), errorNum > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
109
|
+
className: "pro-step-error-dot",
|
110
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_badge.default, {
|
111
|
+
count: errorNum
|
112
112
|
})
|
113
|
-
}
|
114
|
-
|
115
|
-
|
116
|
-
!isDisabled && onOff && /* @__PURE__ */ React.createElement("div", { className: "pro-step-checked-status" }, isChecked && /* @__PURE__ */ React.createElement(SuccessSvg, null), errorNum > 0 && /* @__PURE__ */ React.createElement("div", { className: "pro-step-error-dot" }, /* @__PURE__ */ React.createElement(import_antd.Badge, { count: errorNum })))
|
117
|
-
);
|
113
|
+
})]
|
114
|
+
})]
|
115
|
+
});
|
118
116
|
};
|
119
|
-
|
120
|
-
|
121
|
-
0 && (module.exports = {
|
122
|
-
MenuItem
|
123
|
-
});
|
117
|
+
exports.MenuItem = MenuItem;
|
118
|
+
var _default = exports.default = MenuItem;
|
@@ -1,102 +1,98 @@
|
|
1
|
-
|
2
|
-
var __defProp = Object.defineProperty;
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
-
var __export = (target, all) => {
|
8
|
-
for (var name in all)
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
-
};
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
-
for (let key of __getOwnPropNames(from))
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
-
}
|
17
|
-
return to;
|
18
|
-
};
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
25
|
-
mod
|
26
|
-
));
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
1
|
+
"use strict";
|
28
2
|
|
29
|
-
|
30
|
-
var
|
31
|
-
|
32
|
-
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
33
7
|
});
|
34
|
-
|
35
|
-
var
|
36
|
-
var
|
37
|
-
var
|
38
|
-
var
|
39
|
-
var
|
8
|
+
exports.default = void 0;
|
9
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
11
|
+
var _react = require("react");
|
12
|
+
var _reactLazyload = _interopRequireWildcard(require("react-lazyload"));
|
13
|
+
var _lodash = require("lodash");
|
14
|
+
var _index = require("../../index");
|
15
|
+
var _ProCollapse = _interopRequireDefault(require("../../../ProLayout/components/ProCollapse"));
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
17
|
+
var _excluded = ["id", "title", "collapse", "children", "lazyLoad", "order"];
|
18
|
+
// 默认的懒加载配置
|
40
19
|
var defaultLazyLoadConfig = {
|
41
20
|
height: 200,
|
42
21
|
// Default placeholder height
|
43
22
|
offset: 100,
|
44
23
|
// Start loading when the target is 100px from the viewport
|
45
|
-
once: true
|
46
|
-
// Load only once upon first entry into the viewport
|
24
|
+
once: true // Load only once upon first entry into the viewport
|
47
25
|
};
|
48
|
-
var ProStepItem =
|
49
|
-
id,
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
26
|
+
var ProStepItem = _ref => {
|
27
|
+
var id = _ref.id,
|
28
|
+
title = _ref.title,
|
29
|
+
_ref$collapse = _ref.collapse,
|
30
|
+
collapseItem = _ref$collapse === void 0 ? true : _ref$collapse,
|
31
|
+
children = _ref.children,
|
32
|
+
stepLazyLoad = _ref.lazyLoad,
|
33
|
+
_ref$order = _ref.order,
|
34
|
+
order = _ref$order === void 0 ? 0 : _ref$order,
|
35
|
+
restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
36
|
+
var _useStep = (0, _index.useStep)(),
|
37
|
+
register = _useStep.register,
|
38
|
+
collapse = _useStep.collapse,
|
39
|
+
globalLazyLoad = _useStep.lazyLoad;
|
40
|
+
var lazyLoad = stepLazyLoad !== null && stepLazyLoad !== void 0 ? stepLazyLoad : globalLazyLoad;
|
41
|
+
(0, _react.useEffect)(() => {
|
42
|
+
// Schedule registration to avoid re-render issues
|
43
|
+
var timeoutId = setTimeout(() => {
|
44
|
+
register === null || register === void 0 || register((0, _objectSpread2.default)({
|
62
45
|
id,
|
63
46
|
title,
|
64
47
|
order,
|
65
|
-
lazyLoad
|
66
|
-
|
67
|
-
});
|
48
|
+
lazyLoad
|
49
|
+
}, restProps));
|
68
50
|
}, 0);
|
69
51
|
return () => {
|
70
52
|
clearTimeout(timeoutId);
|
71
53
|
};
|
72
54
|
}, [id, title, order, lazyLoad, restProps, register]);
|
73
|
-
|
55
|
+
var renderChildren = () => {
|
74
56
|
if (lazyLoad) {
|
75
|
-
|
76
|
-
return
|
57
|
+
var lazyLoadProps = (0, _lodash.isBoolean)(lazyLoad) ? defaultLazyLoadConfig : lazyLoad;
|
58
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactLazyload.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, lazyLoadProps), {}, {
|
59
|
+
classNamePrefix: id,
|
60
|
+
children: children
|
61
|
+
}));
|
77
62
|
}
|
78
63
|
return children;
|
79
64
|
};
|
65
|
+
|
66
|
+
// If there's no `register` function or if collapsing is enabled, wrap in ProCollapse
|
80
67
|
if (!register || collapse && collapseItem && title) {
|
81
|
-
return
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
68
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
69
|
+
className: "pro-step-item",
|
70
|
+
id: id,
|
71
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProCollapse.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
72
|
+
title: title,
|
73
|
+
icon: true
|
74
|
+
}, restProps), {}, {
|
75
|
+
onChange: e => {
|
76
|
+
var _restProps$onChange;
|
89
77
|
if (lazyLoad) {
|
78
|
+
// 延时执行, 避免在折叠时, 懒加载的元素没有高度
|
90
79
|
setTimeout(() => {
|
91
|
-
(0,
|
80
|
+
(0, _reactLazyload.forceCheck)();
|
92
81
|
}, 100);
|
93
82
|
}
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
83
|
+
// 默认执行
|
84
|
+
restProps === null || restProps === void 0 || (_restProps$onChange = restProps.onChange) === null || _restProps$onChange === void 0 || _restProps$onChange.call(restProps, e);
|
85
|
+
},
|
86
|
+
children: renderChildren()
|
87
|
+
}))
|
88
|
+
});
|
99
89
|
}
|
100
|
-
|
90
|
+
|
91
|
+
// Otherwise, just render children
|
92
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
93
|
+
className: "pro-step-item",
|
94
|
+
id: id,
|
95
|
+
children: renderChildren()
|
96
|
+
});
|
101
97
|
};
|
102
|
-
var
|
98
|
+
var _default = exports.default = ProStepItem;
|