@zat-design/sisyphus-react 4.0.0-beta.4 → 4.0.0-beta.5
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 +7 -7
- 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,215 +1,242 @@
|
|
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
|
-
|
36
|
-
var
|
37
|
-
|
38
|
-
var
|
39
|
-
|
40
|
-
var
|
41
|
-
|
42
|
-
var
|
43
|
-
|
44
|
-
var
|
45
|
-
|
46
|
-
var
|
47
|
-
var
|
8
|
+
exports.default = void 0;
|
9
|
+
require("antd/es/space/style");
|
10
|
+
var _space = _interopRequireDefault(require("antd/es/space"));
|
11
|
+
require("antd/es/button/style");
|
12
|
+
var _button = _interopRequireDefault(require("antd/es/button"));
|
13
|
+
require("antd/es/tooltip/style");
|
14
|
+
var _tooltip2 = _interopRequireDefault(require("antd/es/tooltip"));
|
15
|
+
require("antd/es/input/style");
|
16
|
+
var _input = _interopRequireDefault(require("antd/es/input"));
|
17
|
+
require("antd/es/spin/style");
|
18
|
+
var _spin = _interopRequireDefault(require("antd/es/spin"));
|
19
|
+
require("antd/es/message/style");
|
20
|
+
var _message2 = _interopRequireDefault(require("antd/es/message"));
|
21
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
22
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
23
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
24
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
25
|
+
require("antd/es/form/style");
|
26
|
+
var _form = _interopRequireDefault(require("antd/es/form"));
|
27
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
28
|
+
var _icons = require("@ant-design/icons");
|
29
|
+
var _ahooks = require("ahooks");
|
30
|
+
var _lodash = require("lodash");
|
31
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
32
|
+
var _reactSvg = require("react-svg");
|
33
|
+
var _react = _interopRequireWildcard(require("react"));
|
34
|
+
var _index = require("../../../../index");
|
35
|
+
var _Container = _interopRequireDefault(require("../../Container"));
|
36
|
+
var _view = _interopRequireDefault(require("../../../../assets/view.svg"));
|
37
|
+
var _useRequestList3 = _interopRequireDefault(require("./hooks/useRequestList"));
|
38
|
+
var _locale = _interopRequireDefault(require("../../../../locale"));
|
39
|
+
var _utils = require("./utils");
|
40
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
41
|
+
var _excluded = ["value", "onChange", "disabled", "labelInValue", "fieldNames", "readOnly", "mode", "addonAfter", "configOption", "title", "onFormat", "showCodeName", "optionRender", "customRender", "style", "className", "beforeOpen", "afterOpen", "isTooltip", "tooltip", "searchForm", "searchKey", "defaultOne", "otherProps"],
|
42
|
+
_excluded2 = ["onOk"],
|
43
|
+
_excluded3 = ["rowKey", "columns", "rowSelection"];
|
48
44
|
var ProModalSelect = (props, ref) => {
|
49
|
-
var
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
labelInValue = false,
|
55
|
-
fieldNames,
|
56
|
-
readOnly =
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
45
|
+
var _useRequest$options, _useRequest$options2, _useRequest$options3, _formColumns$;
|
46
|
+
var value = props.value,
|
47
|
+
onChange = props.onChange,
|
48
|
+
disabled = props.disabled,
|
49
|
+
_props$labelInValue = props.labelInValue,
|
50
|
+
labelInValue = _props$labelInValue === void 0 ? false : _props$labelInValue,
|
51
|
+
fieldNames = props.fieldNames,
|
52
|
+
_props$readOnly = props.readOnly,
|
53
|
+
readOnly = _props$readOnly === void 0 ? true : _props$readOnly,
|
54
|
+
_props$mode = props.mode,
|
55
|
+
mode = _props$mode === void 0 ? 'select' : _props$mode,
|
56
|
+
addonAfter = props.addonAfter,
|
57
|
+
configOption = props.configOption,
|
58
|
+
title = props.title,
|
59
|
+
onFormat = props.onFormat,
|
60
|
+
showCodeName = props.showCodeName,
|
61
|
+
optionRender = props.optionRender,
|
62
|
+
customRender = props.customRender,
|
63
|
+
style = props.style,
|
64
|
+
className = props.className,
|
65
|
+
beforeOpen = props.beforeOpen,
|
66
|
+
afterOpen = props.afterOpen,
|
67
|
+
isTooltip = props.isTooltip,
|
68
|
+
tooltip = props.tooltip,
|
69
|
+
searchForm = props.searchForm,
|
70
|
+
searchKey = props.searchKey,
|
71
|
+
defaultOne = props.defaultOne,
|
72
|
+
otherProps = props.otherProps,
|
73
|
+
restProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
74
|
+
var _tooltip = tooltip !== null && tooltip !== void 0 ? tooltip : isTooltip;
|
75
|
+
var nextMode = (0, _react.useMemo)(() => {
|
76
|
+
if ((0, _lodash.isBoolean)(readOnly) && readOnly === false) {
|
77
|
+
return 'input';
|
81
78
|
}
|
82
79
|
return mode;
|
83
80
|
}, [mode, readOnly]);
|
84
|
-
|
85
|
-
if (!configOption || Object.prototype.toString.call(configOption) !==
|
86
|
-
throw new Error(
|
81
|
+
var contentForm = _form.default.useFormInstance();
|
82
|
+
if (!configOption || Object.prototype.toString.call(configOption) !== '[object Object]') {
|
83
|
+
throw new Error('error: 请检查枚举选择弹框的配置项【configOption】');
|
87
84
|
}
|
88
|
-
|
89
|
-
type =
|
90
|
-
useRequest,
|
91
|
-
transformParams,
|
92
|
-
transformResponse,
|
93
|
-
formColumns,
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
85
|
+
var _configOption$type = configOption.type,
|
86
|
+
type = _configOption$type === void 0 ? 'radio' : _configOption$type,
|
87
|
+
useRequest = configOption.useRequest,
|
88
|
+
transformParams = configOption.transformParams,
|
89
|
+
transformResponse = configOption.transformResponse,
|
90
|
+
formColumns = configOption.formColumns,
|
91
|
+
_configOption$withPag = configOption.withPagination,
|
92
|
+
withPagination = _configOption$withPag === void 0 ? true : _configOption$withPag,
|
93
|
+
modalProps = configOption.modalProps,
|
94
|
+
tableProps = configOption.tableProps;
|
95
|
+
var _ref = modalProps || {},
|
96
|
+
onOk = _ref.onOk,
|
97
|
+
restModalProps = (0, _objectWithoutProperties2.default)(_ref, _excluded2);
|
98
|
+
var _ref2 = _index.ProForm.useFieldProps() || {},
|
99
|
+
isViewCon = _ref2.isView,
|
100
|
+
viewEmpty = _ref2.viewEmpty;
|
101
|
+
var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
|
102
|
+
|
103
|
+
// 是否多选
|
104
|
+
var isMultiple = type === 'checkbox';
|
105
|
+
|
106
|
+
// 生成一个唯一id,用于满足tooltip功能
|
107
|
+
var uuid = Math.random().toString(36).slice(-6);
|
108
|
+
|
109
|
+
// 全局配置fieldNames指定 value与label的key
|
110
|
+
var _ref3 = (0, _index.useProConfig)('ProModalSelect') || {},
|
111
|
+
_ref3$fieldNames = _ref3.fieldNames,
|
112
|
+
proModalSelectFieldNames = _ref3$fieldNames === void 0 ? {} : _ref3$fieldNames;
|
113
|
+
var labelKey = 'label';
|
114
|
+
var valueKey = 'value';
|
106
115
|
if (proModalSelectFieldNames && Object.keys(proModalSelectFieldNames).length) {
|
107
116
|
labelKey = proModalSelectFieldNames.label;
|
108
117
|
valueKey = proModalSelectFieldNames.value;
|
109
118
|
}
|
119
|
+
|
120
|
+
// 表单上配置的权重大于全局配置
|
110
121
|
if (fieldNames && Object.keys(fieldNames).length) {
|
111
122
|
labelKey = fieldNames.label;
|
112
123
|
valueKey = fieldNames.value;
|
113
124
|
}
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
125
|
+
var _ref4 = tableProps || {},
|
126
|
+
_ref4$rowKey = _ref4.rowKey,
|
127
|
+
rowKey = _ref4$rowKey === void 0 ? valueKey : _ref4$rowKey,
|
128
|
+
columns = _ref4.columns,
|
129
|
+
rowSelection = _ref4.rowSelection,
|
130
|
+
restTableProps = (0, _objectWithoutProperties2.default)(_ref4, _excluded3);
|
131
|
+
var preValue = (0, _react.useRef)(value);
|
132
|
+
// 表单项的ref
|
133
|
+
var fieldRef = (0, _react.useRef)(null);
|
134
|
+
var defaultParams = Array.isArray(useRequest === null || useRequest === void 0 || (_useRequest$options = useRequest.options) === null || _useRequest$options === void 0 ? void 0 : _useRequest$options.defaultParams) ? useRequest === null || useRequest === void 0 || (_useRequest$options2 = useRequest.options) === null || _useRequest$options2 === void 0 || (_useRequest$options2 = _useRequest$options2.defaultParams) === null || _useRequest$options2 === void 0 ? void 0 : _useRequest$options2[0] : (useRequest === null || useRequest === void 0 || (_useRequest$options3 = useRequest.options) === null || _useRequest$options3 === void 0 ? void 0 : _useRequest$options3.defaultParams) || {};
|
135
|
+
var defaultParamsRef = (0, _react.useRef)(defaultParams); // 缓存 defaultParams 的引用
|
136
|
+
|
137
|
+
var _useSetState = (0, _ahooks.useSetState)({
|
138
|
+
_value: value,
|
139
|
+
isInit: true,
|
140
|
+
onOff: false,
|
141
|
+
open: false,
|
142
|
+
options: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource) || [],
|
143
|
+
selectedRows: [],
|
144
|
+
selectedRowKeys: []
|
145
|
+
}),
|
146
|
+
_useSetState2 = (0, _slicedToArray2.default)(_useSetState, 2),
|
147
|
+
_useSetState2$ = _useSetState2[0],
|
148
|
+
_value = _useSetState2$._value,
|
149
|
+
isInit = _useSetState2$.isInit,
|
150
|
+
onOff = _useSetState2$.onOff,
|
151
|
+
open = _useSetState2$.open,
|
152
|
+
options = _useSetState2$.options,
|
153
|
+
_selectedRows = _useSetState2$.selectedRows,
|
154
|
+
_selectedRowKeys = _useSetState2$.selectedRowKeys,
|
155
|
+
setState = _useSetState2[1];
|
156
|
+
var _Form$useForm = _form.default.useForm(searchForm),
|
157
|
+
_Form$useForm2 = (0, _slicedToArray2.default)(_Form$useForm, 1),
|
158
|
+
form = _Form$useForm2[0];
|
159
|
+
var selectedRows = (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || _selectedRows;
|
160
|
+
var selectedRowKeys = (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || _selectedRowKeys;
|
161
|
+
var _useRequestList = (0, _useRequestList3.default)(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, {
|
145
162
|
withPagination,
|
146
163
|
transformParams,
|
147
164
|
transformResponse
|
148
|
-
},
|
149
|
-
{
|
150
|
-
...useRequest == null ? void 0 : useRequest.options,
|
165
|
+
}, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options), {}, {
|
151
166
|
manual: true,
|
152
167
|
onSuccess(res) {
|
153
|
-
var
|
154
|
-
|
168
|
+
var _res$data, _ref5;
|
169
|
+
var list = withPagination ? res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list : res === null || res === void 0 ? void 0 : res.data;
|
155
170
|
setState({
|
156
|
-
options: (transformResponse ? transformResponse(res
|
171
|
+
options: (_ref5 = transformResponse ? transformResponse(res === null || res === void 0 ? void 0 : res.data) : list) !== null && _ref5 !== void 0 ? _ref5 : []
|
157
172
|
});
|
158
173
|
}
|
159
|
-
}
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
if (typeof (useRequest
|
165
|
-
|
174
|
+
})),
|
175
|
+
run = _useRequestList.run,
|
176
|
+
selectLoading = _useRequestList.loading;
|
177
|
+
var initParams = (0, _react.useMemo)(() => {
|
178
|
+
var nextInitParams = useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams;
|
179
|
+
if (typeof (useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams) === 'function') {
|
180
|
+
var _contentForm$getField;
|
181
|
+
nextInitParams = useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams(value, contentForm === null || contentForm === void 0 || (_contentForm$getField = contentForm.getFieldsValue) === null || _contentForm$getField === void 0 ? void 0 : _contentForm$getField.call(contentForm));
|
166
182
|
}
|
167
183
|
return nextInitParams;
|
168
184
|
}, [value]);
|
169
|
-
|
170
|
-
useRequest == null ? void 0 : useRequest.service,
|
171
|
-
{
|
185
|
+
var _useRequestList2 = (0, _useRequestList3.default)(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, {
|
172
186
|
withPagination,
|
173
187
|
transformParams,
|
174
188
|
transformResponse
|
175
|
-
},
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
189
|
+
}, (0, _objectSpread2.default)({
|
190
|
+
ready: (initParams || defaultOne) && nextMode === 'input' || open
|
191
|
+
}, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options)),
|
192
|
+
data = _useRequestList2.data,
|
193
|
+
loading = _useRequestList2.loading,
|
194
|
+
pagination = _useRequestList2.pagination,
|
195
|
+
onSearch = _useRequestList2.onSearch,
|
196
|
+
onReset = _useRequestList2.onReset,
|
197
|
+
runAsync = _useRequestList2.runAsync,
|
198
|
+
mutate = _useRequestList2.mutate;
|
199
|
+
var defaultOptionRender = rowData => rowData === null || rowData === void 0 ? void 0 : rowData[labelKey];
|
200
|
+
var handleFormat = onFormat || defaultOptionRender;
|
183
201
|
if (showCodeName) {
|
184
|
-
handleFormat =
|
202
|
+
handleFormat = _ref6 => {
|
203
|
+
var value = _ref6.value,
|
204
|
+
label = _ref6.label;
|
205
|
+
return `${value}-${label}`;
|
206
|
+
};
|
185
207
|
}
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
208
|
+
|
209
|
+
/**
|
210
|
+
* 格式化数据方法,展示在输入框中
|
211
|
+
* @date 2023-02-16
|
212
|
+
* @param {any} data 当前选中的值 labelInValue模式下为选中行对象,单值模式为value值
|
213
|
+
* @returns {any}
|
214
|
+
*/
|
215
|
+
var formatValue = data => {
|
216
|
+
var _data$map;
|
217
|
+
if (typeof data === 'string' || typeof data === 'number') {
|
218
|
+
return data;
|
190
219
|
}
|
191
|
-
if ((0,
|
192
|
-
return handleFormat({
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
});
|
220
|
+
if ((0, _lodash.isObject)(data)) {
|
221
|
+
return handleFormat((0, _objectSpread2.default)((0, _objectSpread2.default)({}, data), {}, {
|
222
|
+
value: data[valueKey],
|
223
|
+
label: data[labelKey]
|
224
|
+
}));
|
197
225
|
}
|
198
|
-
return (0,
|
199
|
-
return handleFormat({
|
200
|
-
...item,
|
226
|
+
return (0, _lodash.isArray)(data) ? data === null || data === void 0 || (_data$map = data.map(item => {
|
227
|
+
return handleFormat((0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
201
228
|
value: item[valueKey],
|
202
229
|
label: item[labelKey]
|
203
|
-
});
|
204
|
-
}))
|
230
|
+
}));
|
231
|
+
})) === null || _data$map === void 0 ? void 0 : _data$map.join(',') : '';
|
205
232
|
};
|
206
|
-
|
207
|
-
var
|
208
|
-
let nextValue = labelInValue ? value : _value;
|
233
|
+
var viewText = (0, _react.useMemo)(() => {
|
234
|
+
var nextValue = labelInValue ? value : _value;
|
209
235
|
if (labelInValue) {
|
210
236
|
nextValue = value;
|
211
237
|
} else {
|
212
|
-
|
238
|
+
var _options$find;
|
239
|
+
var optionDTO = options === null || options === void 0 || (_options$find = options.find) === null || _options$find === void 0 ? void 0 : _options$find.call(options, item => item[valueKey] === value);
|
213
240
|
if (optionDTO) {
|
214
241
|
nextValue = optionDTO;
|
215
242
|
} else {
|
@@ -218,102 +245,199 @@ var ProModalSelect = (props, ref) => {
|
|
218
245
|
}
|
219
246
|
return formatValue(nextValue);
|
220
247
|
}, [value, _value, options]);
|
221
|
-
|
222
|
-
|
248
|
+
|
249
|
+
/**
|
250
|
+
* 获取表格的rowKey,支持函数、字符串
|
251
|
+
* @date 2023-02-16
|
252
|
+
* @param {any} record 表格行数据
|
253
|
+
* @returns {any}
|
254
|
+
*/
|
255
|
+
var getRowKey = record => {
|
256
|
+
if ((0, _lodash.isFunction)(rowKey)) {
|
223
257
|
return rowKey(record);
|
224
258
|
}
|
225
259
|
return record[rowKey];
|
226
260
|
};
|
227
|
-
|
261
|
+
|
262
|
+
/**
|
263
|
+
* 执行onChange暴露出来的第一个参数取数方法
|
264
|
+
* @date 2023-02-16
|
265
|
+
* @param {any} selectedRows 选中行数据
|
266
|
+
* @returns {any}
|
267
|
+
*/
|
268
|
+
var getNextValues = selectedRows => {
|
228
269
|
if (isMultiple) {
|
229
|
-
return
|
270
|
+
return selectedRows.map(item => item === null || item === void 0 ? void 0 : item[valueKey]);
|
230
271
|
}
|
231
|
-
return
|
272
|
+
return selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows[valueKey];
|
232
273
|
};
|
233
|
-
|
274
|
+
var handleChangeValue = e => {
|
234
275
|
onChange(e.target.value);
|
235
276
|
preValue.current = e.target.value;
|
236
|
-
if (nextMode ===
|
277
|
+
if (nextMode === 'input') {
|
237
278
|
setState({
|
238
279
|
_value: e.target.value
|
239
280
|
});
|
240
281
|
}
|
241
282
|
};
|
242
|
-
|
283
|
+
var handleSelectValue = (val, option) => {
|
243
284
|
onChange(val, option);
|
244
285
|
preValue.current = val;
|
245
286
|
};
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
287
|
+
var handleClick = /*#__PURE__*/function () {
|
288
|
+
var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
289
|
+
var _yield$beforeOpen, res;
|
290
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
291
|
+
while (1) switch (_context.prev = _context.next) {
|
292
|
+
case 0:
|
293
|
+
if (disabled) {
|
294
|
+
_context.next = 14;
|
295
|
+
break;
|
296
|
+
}
|
297
|
+
_context.next = 3;
|
298
|
+
return beforeOpen === null || beforeOpen === void 0 ? void 0 : beforeOpen();
|
299
|
+
case 3:
|
300
|
+
_context.t1 = _yield$beforeOpen = _context.sent;
|
301
|
+
_context.t0 = _context.t1 !== null;
|
302
|
+
if (!_context.t0) {
|
303
|
+
_context.next = 7;
|
304
|
+
break;
|
305
|
+
}
|
306
|
+
_context.t0 = _yield$beforeOpen !== void 0;
|
307
|
+
case 7:
|
308
|
+
if (!_context.t0) {
|
309
|
+
_context.next = 11;
|
310
|
+
break;
|
311
|
+
}
|
312
|
+
_context.t2 = _yield$beforeOpen;
|
313
|
+
_context.next = 12;
|
314
|
+
break;
|
315
|
+
case 11:
|
316
|
+
_context.t2 = true;
|
317
|
+
case 12:
|
318
|
+
res = _context.t2;
|
319
|
+
if (res) {
|
320
|
+
setState({
|
321
|
+
onOff: true
|
322
|
+
});
|
323
|
+
setTimeout(() => {
|
324
|
+
afterOpen === null || afterOpen === void 0 || afterOpen({
|
325
|
+
setInnerState: setState
|
326
|
+
});
|
327
|
+
}, 100);
|
328
|
+
}
|
329
|
+
case 14:
|
330
|
+
case "end":
|
331
|
+
return _context.stop();
|
332
|
+
}
|
333
|
+
}, _callee);
|
334
|
+
}));
|
335
|
+
return function handleClick() {
|
336
|
+
return _ref7.apply(this, arguments);
|
337
|
+
};
|
338
|
+
}();
|
339
|
+
var handleClose = () => {
|
340
|
+
var _useRequest$options4;
|
263
341
|
form.resetFields();
|
264
342
|
setState({
|
265
343
|
onOff: false,
|
266
344
|
open: false,
|
267
345
|
isInit: false
|
268
346
|
});
|
269
|
-
|
347
|
+
|
348
|
+
// 当设置manual为true时,清空当前弹框内已搜索出来的值
|
349
|
+
if (useRequest !== null && useRequest !== void 0 && (_useRequest$options4 = useRequest.options) !== null && _useRequest$options4 !== void 0 && _useRequest$options4.manual) {
|
270
350
|
mutate(() => []);
|
271
351
|
}
|
272
352
|
};
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
353
|
+
var handleFinish = /*#__PURE__*/function () {
|
354
|
+
var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2() {
|
355
|
+
var _nextSelectedRows, _nextSelectedRows2, nextSelectedRows, record, flag, res;
|
356
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
357
|
+
while (1) switch (_context2.prev = _context2.next) {
|
358
|
+
case 0:
|
359
|
+
_context2.prev = 0;
|
360
|
+
if (!(!(selectedRowKeys !== null && selectedRowKeys !== void 0 && selectedRowKeys.length) || !(selectedRows !== null && selectedRows !== void 0 && selectedRows.length))) {
|
361
|
+
_context2.next = 4;
|
362
|
+
break;
|
363
|
+
}
|
364
|
+
_message2.default.error(_locale.default.ProModalSelect.checkMsg);
|
365
|
+
return _context2.abrupt("return", false);
|
366
|
+
case 4:
|
367
|
+
nextSelectedRows = selectedRows;
|
368
|
+
if (!((_nextSelectedRows = nextSelectedRows) !== null && _nextSelectedRows !== void 0 && _nextSelectedRows[0])) {
|
369
|
+
nextSelectedRows = data.filter(item => selectedRowKeys.includes(item[valueKey]));
|
370
|
+
}
|
371
|
+
record = isMultiple ? nextSelectedRows : (_nextSelectedRows2 = nextSelectedRows) === null || _nextSelectedRows2 === void 0 ? void 0 : _nextSelectedRows2[0];
|
372
|
+
if (!isMultiple) {
|
373
|
+
// @ts-ignore
|
374
|
+
record.value = record[valueKey];
|
375
|
+
// @ts-ignore
|
376
|
+
record.label = record[labelKey];
|
377
|
+
}
|
378
|
+
flag = true;
|
379
|
+
if (!onOk) {
|
380
|
+
_context2.next = 14;
|
381
|
+
break;
|
382
|
+
}
|
383
|
+
_context2.next = 12;
|
384
|
+
return onOk(record);
|
385
|
+
case 12:
|
386
|
+
res = _context2.sent;
|
387
|
+
if (res !== null && res !== undefined) {
|
388
|
+
// @ts-ignore
|
389
|
+
flag = res;
|
390
|
+
}
|
391
|
+
case 14:
|
392
|
+
if (flag) {
|
393
|
+
onChange === null || onChange === void 0 || onChange(labelInValue ? record : getNextValues(record), record);
|
394
|
+
preValue.current = labelInValue ? record : getNextValues(record);
|
395
|
+
// 更新内部展示值
|
396
|
+
setState({
|
397
|
+
_value: record,
|
398
|
+
options: (0, _lodash.isArray)(record) ? record : [record]
|
399
|
+
});
|
400
|
+
handleClose();
|
401
|
+
}
|
402
|
+
return _context2.abrupt("return", flag);
|
403
|
+
case 18:
|
404
|
+
_context2.prev = 18;
|
405
|
+
_context2.t0 = _context2["catch"](0);
|
406
|
+
console.warn('error', _context2.t0);
|
407
|
+
case 21:
|
408
|
+
case "end":
|
409
|
+
return _context2.stop();
|
293
410
|
}
|
294
|
-
}
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
411
|
+
}, _callee2, null, [[0, 18]]);
|
412
|
+
}));
|
413
|
+
return function handleFinish() {
|
414
|
+
return _ref8.apply(this, arguments);
|
415
|
+
};
|
416
|
+
}();
|
417
|
+
var handleSearch = /*#__PURE__*/function () {
|
418
|
+
var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee3() {
|
419
|
+
var values;
|
420
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee3$(_context3) {
|
421
|
+
while (1) switch (_context3.prev = _context3.next) {
|
422
|
+
case 0:
|
423
|
+
_context3.next = 2;
|
424
|
+
return form.validateFields();
|
425
|
+
case 2:
|
426
|
+
values = _context3.sent;
|
427
|
+
onSearch((0, _objectSpread2.default)((0, _objectSpread2.default)({}, values), {}, {
|
428
|
+
d: Date.now()
|
429
|
+
}));
|
430
|
+
case 4:
|
431
|
+
case "end":
|
432
|
+
return _context3.stop();
|
433
|
+
}
|
434
|
+
}, _callee3);
|
435
|
+
}));
|
436
|
+
return function handleSearch() {
|
437
|
+
return _ref9.apply(this, arguments);
|
438
|
+
};
|
439
|
+
}();
|
440
|
+
var _rowSelection = (0, _objectSpread2.default)({
|
317
441
|
type,
|
318
442
|
onChange: (rowKeys, rows) => {
|
319
443
|
setState({
|
@@ -321,26 +445,26 @@ var ProModalSelect = (props, ref) => {
|
|
321
445
|
selectedRows: rows
|
322
446
|
});
|
323
447
|
},
|
324
|
-
getCheckboxProps:
|
325
|
-
disabled: record
|
448
|
+
getCheckboxProps: record => ({
|
449
|
+
disabled: record === null || record === void 0 ? void 0 : record.disabled
|
326
450
|
}),
|
327
451
|
selectedRowKeys,
|
328
|
-
selectedRows
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
452
|
+
selectedRows
|
453
|
+
}, rowSelection);
|
454
|
+
|
455
|
+
// 点击行进行勾选
|
456
|
+
var handleClickRow = record => {
|
457
|
+
var _rowSelection$getChec;
|
458
|
+
if (_rowSelection !== null && _rowSelection !== void 0 && (_rowSelection$getChec = _rowSelection.getCheckboxProps) !== null && _rowSelection$getChec !== void 0 && (_rowSelection$getChec = _rowSelection$getChec.call(_rowSelection, record)) !== null && _rowSelection$getChec !== void 0 && _rowSelection$getChec.disabled) {
|
334
459
|
return;
|
335
460
|
}
|
336
|
-
if (record
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
let tempSelectedRowKeys = [...selectedRowKeys];
|
461
|
+
if (record !== null && record !== void 0 && record.disabled) return;
|
462
|
+
var selectedValue = getRowKey(record);
|
463
|
+
var tempSelectedRows = [...selectedRows];
|
464
|
+
var tempSelectedRowKeys = [...selectedRowKeys];
|
341
465
|
if (isMultiple) {
|
342
|
-
|
343
|
-
|
466
|
+
var rowIndex = tempSelectedRows.findIndex(item => getRowKey(item) === selectedValue);
|
467
|
+
var rowKeyIndex = tempSelectedRowKeys.findIndex(item => item === selectedValue);
|
344
468
|
if (rowKeyIndex > -1) {
|
345
469
|
tempSelectedRows.splice(rowIndex, 1);
|
346
470
|
tempSelectedRowKeys.splice(rowKeyIndex, 1);
|
@@ -357,108 +481,144 @@ var ProModalSelect = (props, ref) => {
|
|
357
481
|
selectedRowKeys: tempSelectedRowKeys
|
358
482
|
});
|
359
483
|
};
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
484
|
+
|
485
|
+
// 初始化回显,当传入initParams时,前端用来回险
|
486
|
+
var getInitValues = /*#__PURE__*/function () {
|
487
|
+
var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee4() {
|
488
|
+
var _useRequest$options5, queryBean, page, params, res, _res$data2, _list, list, _data, nextSelectRowKeys;
|
489
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee4$(_context4) {
|
490
|
+
while (1) switch (_context4.prev = _context4.next) {
|
491
|
+
case 0:
|
492
|
+
if (!(initParams || defaultOne)) {
|
493
|
+
_context4.next = 9;
|
494
|
+
break;
|
495
|
+
}
|
496
|
+
queryBean = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, defaultParams), initParams || {});
|
497
|
+
page = (0, _objectSpread2.default)({
|
498
|
+
pageNum: 1,
|
499
|
+
pageSize: 10
|
500
|
+
}, useRequest === null || useRequest === void 0 || (_useRequest$options5 = useRequest.options) === null || _useRequest$options5 === void 0 ? void 0 : _useRequest$options5.page);
|
501
|
+
params = withPagination ? (0, _objectSpread2.default)((0, _objectSpread2.default)({}, page), {}, {
|
502
|
+
queryBean: queryBean !== null && queryBean !== void 0 ? queryBean : {}
|
503
|
+
}) : queryBean;
|
504
|
+
params = transformParams ? transformParams(params) : params;
|
505
|
+
_context4.next = 7;
|
506
|
+
return runAsync(params);
|
507
|
+
case 7:
|
508
|
+
res = _context4.sent;
|
509
|
+
if (res !== null && res !== void 0 && res.data) {
|
510
|
+
list = withPagination ? res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.list : res === null || res === void 0 ? void 0 : res.data;
|
511
|
+
if (transformResponse) {
|
512
|
+
list = transformResponse(res === null || res === void 0 ? void 0 : res.data);
|
513
|
+
}
|
514
|
+
_data = isMultiple ? list : (_list = list) === null || _list === void 0 ? void 0 : _list[0];
|
515
|
+
if (_data) {
|
516
|
+
nextSelectRowKeys = isMultiple ? value : [value];
|
517
|
+
if (labelInValue) {
|
518
|
+
onChange(_data);
|
519
|
+
preValue.current = _data;
|
520
|
+
}
|
521
|
+
// 更新内部展示值
|
522
|
+
setState({
|
523
|
+
_value: _data,
|
524
|
+
isInit: false,
|
525
|
+
selectedRows: list,
|
526
|
+
selectedRowKeys: nextSelectRowKeys
|
527
|
+
});
|
528
|
+
} else if (nextMode === 'input') {
|
529
|
+
// 当传入initParams且文本框非只读时,不调用接口获取初始化数据
|
530
|
+
setState({
|
531
|
+
_value: value,
|
532
|
+
isInit: false
|
533
|
+
});
|
534
|
+
}
|
535
|
+
}
|
536
|
+
case 9:
|
537
|
+
case "end":
|
538
|
+
return _context4.stop();
|
401
539
|
}
|
402
|
-
}
|
403
|
-
}
|
404
|
-
|
405
|
-
|
406
|
-
var _a2, _b2;
|
407
|
-
const queryBean = {
|
408
|
-
...defaultParams
|
540
|
+
}, _callee4);
|
541
|
+
}));
|
542
|
+
return function getInitValues() {
|
543
|
+
return _ref10.apply(this, arguments);
|
409
544
|
};
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
545
|
+
}();
|
546
|
+
|
547
|
+
// 初始化回显,当传入initParams时,前端用来回险
|
548
|
+
var getDefaultOneValues = /*#__PURE__*/function () {
|
549
|
+
var _ref11 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee5() {
|
550
|
+
var _useRequest$options6;
|
551
|
+
var queryBean, page, params, res, _res$data3, _list2, list, _data2, nextSelectRowKeys;
|
552
|
+
return (0, _regeneratorRuntime2.default)().wrap(function _callee5$(_context5) {
|
553
|
+
while (1) switch (_context5.prev = _context5.next) {
|
554
|
+
case 0:
|
555
|
+
queryBean = (0, _objectSpread2.default)({}, defaultParams);
|
556
|
+
page = (0, _objectSpread2.default)({
|
557
|
+
pageNum: 1,
|
558
|
+
pageSize: 10
|
559
|
+
}, useRequest === null || useRequest === void 0 || (_useRequest$options6 = useRequest.options) === null || _useRequest$options6 === void 0 ? void 0 : _useRequest$options6.page);
|
560
|
+
params = withPagination ? (0, _objectSpread2.default)((0, _objectSpread2.default)({}, page), {}, {
|
561
|
+
queryBean: queryBean !== null && queryBean !== void 0 ? queryBean : {}
|
562
|
+
}) : queryBean;
|
563
|
+
params = transformParams ? transformParams(params) : params;
|
564
|
+
_context5.next = 6;
|
565
|
+
return runAsync(params);
|
566
|
+
case 6:
|
567
|
+
res = _context5.sent;
|
568
|
+
if (res !== null && res !== void 0 && res.data) {
|
569
|
+
list = withPagination ? res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.list : res === null || res === void 0 ? void 0 : res.data;
|
570
|
+
if (transformResponse) {
|
571
|
+
list = transformResponse(res === null || res === void 0 ? void 0 : res.data);
|
572
|
+
}
|
573
|
+
_data2 = isMultiple ? list : (_list2 = list) === null || _list2 === void 0 ? void 0 : _list2[0];
|
574
|
+
nextSelectRowKeys = isMultiple ? value : [value];
|
575
|
+
if (labelInValue) {
|
576
|
+
onChange(_data2);
|
577
|
+
preValue.current = _data2;
|
578
|
+
} else {
|
579
|
+
onChange(isMultiple ? _data2.map(item => item[valueKey]) : _data2[valueKey]);
|
580
|
+
preValue.current = isMultiple ? _data2.map(item => item[valueKey]) : _data2[valueKey];
|
581
|
+
}
|
582
|
+
// 更新内部展示值
|
583
|
+
setState({
|
584
|
+
_value: _data2,
|
585
|
+
isInit: false,
|
586
|
+
selectedRows: list,
|
587
|
+
selectedRowKeys: nextSelectRowKeys
|
588
|
+
});
|
589
|
+
}
|
590
|
+
case 8:
|
591
|
+
case "end":
|
592
|
+
return _context5.stop();
|
593
|
+
}
|
594
|
+
}, _callee5);
|
595
|
+
}));
|
596
|
+
return function getDefaultOneValues() {
|
597
|
+
return _ref11.apply(this, arguments);
|
414
598
|
};
|
415
|
-
|
416
|
-
|
417
|
-
queryBean: queryBean ?? {}
|
418
|
-
} : queryBean;
|
419
|
-
params = transformParams ? transformParams(params) : params;
|
420
|
-
const res = await runAsync(params);
|
421
|
-
if (res == null ? void 0 : res.data) {
|
422
|
-
let list = withPagination ? (_b2 = res == null ? void 0 : res.data) == null ? void 0 : _b2.list : res == null ? void 0 : res.data;
|
423
|
-
if (transformResponse) {
|
424
|
-
list = transformResponse(res == null ? void 0 : res.data);
|
425
|
-
}
|
426
|
-
const data2 = isMultiple ? list : list == null ? void 0 : list[0];
|
427
|
-
const nextSelectRowKeys = isMultiple ? value : [value];
|
428
|
-
if (labelInValue) {
|
429
|
-
onChange(data2);
|
430
|
-
preValue.current = data2;
|
431
|
-
} else {
|
432
|
-
onChange(isMultiple ? data2.map((item) => item[valueKey]) : data2[valueKey]);
|
433
|
-
preValue.current = isMultiple ? data2.map((item) => item[valueKey]) : data2[valueKey];
|
434
|
-
}
|
435
|
-
setState({
|
436
|
-
_value: data2,
|
437
|
-
isInit: false,
|
438
|
-
selectedRows: list,
|
439
|
-
selectedRowKeys: nextSelectRowKeys
|
440
|
-
});
|
441
|
-
}
|
442
|
-
};
|
443
|
-
(0, import_react.useImperativeHandle)(ref, () => ({
|
599
|
+
}();
|
600
|
+
(0, _react.useImperativeHandle)(ref, () => ({
|
444
601
|
handleClick,
|
445
602
|
handleSearch
|
446
603
|
}));
|
447
|
-
(0,
|
604
|
+
(0, _ahooks.useMount)(() => {
|
448
605
|
if (!value) {
|
449
606
|
setState({
|
450
|
-
selectedRowKeys: (rowSelection
|
451
|
-
selectedRows: (rowSelection
|
452
|
-
_value:
|
607
|
+
selectedRowKeys: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || [],
|
608
|
+
selectedRows: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || [],
|
609
|
+
_value: undefined
|
453
610
|
});
|
454
|
-
} else if ((0,
|
611
|
+
} else if ((0, _lodash.isArray)(value)) {
|
455
612
|
setState({
|
456
|
-
selectedRowKeys: (rowSelection
|
457
|
-
selectedRows: (rowSelection
|
613
|
+
selectedRowKeys: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || value,
|
614
|
+
selectedRows: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || value,
|
458
615
|
_value: value
|
459
616
|
});
|
460
|
-
} else if ((0,
|
461
|
-
|
617
|
+
} else if ((0, _lodash.isObject)(value)) {
|
618
|
+
var initialValue = {
|
619
|
+
[valueKey]: value[valueKey],
|
620
|
+
[labelKey]: value[labelKey]
|
621
|
+
};
|
462
622
|
setState({
|
463
623
|
selectedRowKeys: [value],
|
464
624
|
selectedRows: [initialValue],
|
@@ -466,13 +626,13 @@ var ProModalSelect = (props, ref) => {
|
|
466
626
|
});
|
467
627
|
}
|
468
628
|
});
|
469
|
-
(0,
|
470
|
-
var _a2, _b2;
|
629
|
+
(0, _react.useEffect)(() => {
|
471
630
|
if (onOff && !open) {
|
472
|
-
|
631
|
+
var _useRequest$options7;
|
632
|
+
if ((useRequest === null || useRequest === void 0 || (_useRequest$options7 = useRequest.options) === null || _useRequest$options7 === void 0 ? void 0 : _useRequest$options7.manual) !== true) {
|
473
633
|
onReset();
|
474
634
|
}
|
475
|
-
|
635
|
+
var nextState = {
|
476
636
|
open: true
|
477
637
|
};
|
478
638
|
if (labelInValue) {
|
@@ -480,123 +640,115 @@ var ProModalSelect = (props, ref) => {
|
|
480
640
|
nextState.selectedRowKeys = [];
|
481
641
|
nextState.selectedRows = [];
|
482
642
|
}
|
483
|
-
if ((0,
|
643
|
+
if ((0, _lodash.isObject)(value)) {
|
484
644
|
nextState.selectedRowKeys = [getRowKey(value)];
|
485
645
|
nextState.selectedRows = [value];
|
486
646
|
}
|
487
|
-
if ((0,
|
488
|
-
nextState.selectedRowKeys = value.map(
|
647
|
+
if ((0, _lodash.isArray)(value)) {
|
648
|
+
nextState.selectedRowKeys = value.map(item => getRowKey(item));
|
489
649
|
nextState.selectedRows = value;
|
490
650
|
}
|
491
651
|
} else if (value) {
|
492
|
-
|
652
|
+
var _list$filter;
|
653
|
+
var nextSelectedRowKeys = isMultiple ? value : [value];
|
493
654
|
nextState.selectedRowKeys = nextSelectedRowKeys;
|
494
|
-
|
495
|
-
nextState.selectedRows =
|
655
|
+
var list = options !== null && options !== void 0 ? options : data;
|
656
|
+
nextState.selectedRows = list === null || list === void 0 || (_list$filter = list.filter) === null || _list$filter === void 0 ? void 0 : _list$filter.call(list, item => {
|
496
657
|
return nextSelectedRowKeys.includes(item[valueKey]);
|
497
658
|
});
|
498
659
|
}
|
499
660
|
setState(nextState);
|
500
661
|
}
|
501
662
|
}, [onOff, open, JSON.stringify(value)]);
|
502
|
-
(0,
|
503
|
-
(0,
|
663
|
+
(0, _react.useEffect)(() => {
|
664
|
+
(0, _utils.hideTooltipIfOpen)(fieldRef.current, open);
|
504
665
|
}, [open]);
|
505
|
-
(0,
|
506
|
-
if (value && !open && isInit && nextMode ===
|
666
|
+
(0, _react.useEffect)(() => {
|
667
|
+
if (value && !open && isInit && nextMode === 'input') {
|
507
668
|
getInitValues();
|
508
669
|
}
|
509
670
|
}, [JSON.stringify(value), open, isInit]);
|
510
|
-
(0,
|
511
|
-
|
512
|
-
|
671
|
+
(0, _ahooks.useDebounceEffect)(() => {
|
672
|
+
if (value && !open && nextMode === 'select' && (!(0, _lodash.isEqual)(value, preValue.current) || (options === null || options === void 0 ? void 0 : options.length) === 0)) {
|
673
|
+
var _options$some;
|
513
674
|
preValue.current = value;
|
514
|
-
|
515
|
-
|
675
|
+
var _data3 = labelInValue ? value[valueKey] : value;
|
676
|
+
var isHasValue = options === null || options === void 0 || (_options$some = options.some) === null || _options$some === void 0 ? void 0 : _options$some.call(options, item => item[valueKey] === _data3);
|
516
677
|
if (isHasValue) {
|
517
678
|
return;
|
518
679
|
}
|
519
680
|
if (useRequest) {
|
681
|
+
// 加定时器 修复依赖数据同步更新未取到问题
|
520
682
|
setTimeout(() => {
|
521
|
-
|
683
|
+
var params = withPagination ? {
|
522
684
|
pageNum: 1,
|
523
685
|
pageSize: 50,
|
524
|
-
queryBean: {
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
}
|
530
|
-
|
531
|
-
...initParams,
|
532
|
-
[searchKey ?? valueKey]: data2
|
533
|
-
};
|
534
|
-
const nextParams = transformParams ? transformParams(params) : params;
|
686
|
+
queryBean: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, defaultParams), initParams), {}, {
|
687
|
+
[searchKey !== null && searchKey !== void 0 ? searchKey : valueKey]: _data3
|
688
|
+
})
|
689
|
+
} : (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, defaultParams), initParams), {}, {
|
690
|
+
[searchKey !== null && searchKey !== void 0 ? searchKey : valueKey]: _data3
|
691
|
+
});
|
692
|
+
var nextParams = transformParams ? transformParams(params) : params;
|
535
693
|
run(nextParams);
|
536
694
|
}, 300);
|
537
695
|
}
|
538
696
|
}
|
539
|
-
}, [
|
540
|
-
|
541
|
-
open,
|
542
|
-
JSON.stringify(defaultParams),
|
543
|
-
JSON.stringify(initParams),
|
544
|
-
options == null ? void 0 : options.length
|
545
|
-
]);
|
546
|
-
const handleSelectFocus = () => {
|
697
|
+
}, [JSON.stringify(value), open, JSON.stringify(defaultParams), JSON.stringify(initParams), options === null || options === void 0 ? void 0 : options.length]);
|
698
|
+
var handleSelectFocus = () => {
|
547
699
|
if (useRequest) {
|
548
|
-
|
549
|
-
|
700
|
+
var queryBean = defaultParams || {};
|
701
|
+
var params = withPagination ? {
|
550
702
|
pageNum: 1,
|
551
703
|
pageSize: 50,
|
552
704
|
queryBean
|
553
705
|
} : queryBean;
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
706
|
+
var nextParams = transformParams ? transformParams(params) : params;
|
707
|
+
// 减少请求条件一致时,且请求过时,focus的重复请求
|
708
|
+
if (!(0, _lodash.isEqual)(queryBean, defaultParamsRef.current) || !(options !== null && options !== void 0 && options.length)) {
|
709
|
+
run(nextParams); // 触发 run 请求
|
710
|
+
defaultParamsRef.current = queryBean; // 更新缓存
|
558
711
|
}
|
559
712
|
setState({
|
560
713
|
isInit: false
|
561
714
|
});
|
562
715
|
}
|
563
716
|
};
|
564
|
-
|
717
|
+
var handleSelectSearch = (0, _lodash.debounce)(val => {
|
565
718
|
if (useRequest) {
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
const params = withPagination ? {
|
719
|
+
var queryBean = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, defaultParams), {}, {
|
720
|
+
[searchKey !== null && searchKey !== void 0 ? searchKey : labelKey]: val
|
721
|
+
});
|
722
|
+
var params = withPagination ? {
|
571
723
|
pageNum: 1,
|
572
724
|
pageSize: 50,
|
573
725
|
queryBean
|
574
726
|
} : queryBean;
|
575
|
-
|
727
|
+
var nextParams = transformParams ? transformParams(params) : params;
|
576
728
|
run(nextParams);
|
577
729
|
}
|
578
|
-
},
|
579
|
-
(0,
|
730
|
+
}, 1000);
|
731
|
+
(0, _ahooks.useDebounceEffect)(() => {
|
580
732
|
if (!value) {
|
581
733
|
if (defaultOne) {
|
582
734
|
getDefaultOneValues();
|
583
735
|
} else {
|
584
736
|
setState({
|
585
|
-
_value:
|
737
|
+
_value: undefined,
|
586
738
|
selectedRowKeys: [],
|
587
739
|
selectedRows: []
|
588
740
|
});
|
589
741
|
}
|
590
742
|
}
|
591
|
-
if (nextMode ===
|
592
|
-
if (labelInValue && _value && !(0,
|
743
|
+
if (nextMode === 'input') {
|
744
|
+
if (labelInValue && _value && !(0, _lodash.isEqual)(value, _value)) {
|
593
745
|
setState({
|
594
746
|
_value: value,
|
595
747
|
selectedRowKeys: [],
|
596
748
|
selectedRows: []
|
597
749
|
});
|
598
750
|
}
|
599
|
-
if (!labelInValue && !(0,
|
751
|
+
if (!labelInValue && !(0, _lodash.isEqual)(value, _value === null || _value === void 0 ? void 0 : _value[valueKey])) {
|
600
752
|
setState({
|
601
753
|
_value: value,
|
602
754
|
selectedRowKeys: [],
|
@@ -605,102 +757,129 @@ var ProModalSelect = (props, ref) => {
|
|
605
757
|
}
|
606
758
|
}
|
607
759
|
}, [value, _value]);
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
760
|
+
|
761
|
+
// 加个中间状态Input
|
762
|
+
var initRender = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_space.default.Compact, {
|
763
|
+
style: {
|
764
|
+
width: '100%'
|
765
|
+
},
|
766
|
+
block: true,
|
767
|
+
children: [nextMode === 'select' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ProSelect, (0, _objectSpread2.default)({
|
768
|
+
value: value,
|
612
769
|
onChange: handleSelectValue,
|
613
|
-
disabled,
|
614
|
-
fieldNames,
|
615
|
-
showCodeName,
|
616
|
-
labelInValue,
|
770
|
+
disabled: disabled,
|
771
|
+
fieldNames: fieldNames,
|
772
|
+
showCodeName: showCodeName,
|
773
|
+
labelInValue: labelInValue,
|
617
774
|
dataSource: options,
|
618
|
-
optionRender,
|
775
|
+
optionRender: optionRender,
|
619
776
|
scrollFollowParent: false,
|
620
|
-
mode: isMultiple ?
|
621
|
-
notFoundContent: selectLoading ?
|
777
|
+
mode: isMultiple ? 'multiple' : undefined,
|
778
|
+
notFoundContent: selectLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_spin.default, {
|
779
|
+
size: "small"
|
780
|
+
}) : null,
|
622
781
|
onFocus: handleSelectFocus,
|
623
782
|
onSearch: handleSelectSearch,
|
624
783
|
tooltip: _tooltip,
|
625
|
-
style: {
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
784
|
+
style: {
|
785
|
+
width: isView || disabled ? '100%' : 'calc(100% - 30px)'
|
786
|
+
}
|
787
|
+
}, restProps)) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip2.default, {
|
788
|
+
title: _tooltip ? viewText : null,
|
789
|
+
placement: "topLeft",
|
790
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_input.default, (0, _objectSpread2.default)({
|
791
|
+
value: viewText,
|
792
|
+
onChange: handleChangeValue,
|
793
|
+
disabled: disabled,
|
794
|
+
autoComplete: "off",
|
795
|
+
allowClear: true
|
796
|
+
}, restProps))
|
797
|
+
}), isView || disabled ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
|
798
|
+
onClick: handleClick,
|
799
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, {
|
800
|
+
className: "viewSvg",
|
801
|
+
src: _view.default
|
802
|
+
})
|
803
|
+
})]
|
804
|
+
});
|
805
|
+
if (customRender && /*#__PURE__*/_react.default.isValidElement(customRender)) {
|
806
|
+
initRender = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
807
|
+
className: "pro-modal-select-init",
|
808
|
+
onClick: handleClick,
|
809
|
+
children: customRender
|
810
|
+
});
|
641
811
|
}
|
642
|
-
(0,
|
812
|
+
(0, _ahooks.useDeepCompareEffect)(() => {
|
643
813
|
setState({
|
644
|
-
options: (tableProps
|
814
|
+
options: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource) || []
|
645
815
|
});
|
646
|
-
}, [tableProps
|
647
|
-
|
648
|
-
|
816
|
+
}, [tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource]);
|
817
|
+
|
818
|
+
// 当搜索条件只有一个时,且为输入框,默认设置suffix
|
819
|
+
if ((formColumns === null || formColumns === void 0 ? void 0 : formColumns.length) === 1 && (formColumns === null || formColumns === void 0 || (_formColumns$ = formColumns[0]) === null || _formColumns$ === void 0 ? void 0 : _formColumns$.type) === 'Input') {
|
820
|
+
var _formColumns$2, _formColumns$3;
|
821
|
+
if (!((_formColumns$2 = formColumns[0]) !== null && _formColumns$2 !== void 0 && _formColumns$2.fieldProps)) {
|
649
822
|
formColumns[0].fieldProps = {};
|
650
823
|
}
|
651
|
-
if (!(0,
|
652
|
-
formColumns[0].fieldProps.suffix =
|
824
|
+
if (!(0, _lodash.isFunction)(formColumns[0].fieldProps) && !(formColumns !== null && formColumns !== void 0 && (_formColumns$3 = formColumns[0]) !== null && _formColumns$3 !== void 0 && (_formColumns$3 = _formColumns$3.fieldProps) !== null && _formColumns$3 !== void 0 && _formColumns$3.suffix)) {
|
825
|
+
formColumns[0].fieldProps.suffix = /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.SearchOutlined, {
|
826
|
+
onClick: handleSearch
|
827
|
+
});
|
653
828
|
}
|
654
829
|
}
|
655
830
|
if (isView) {
|
656
831
|
if (!value) {
|
657
|
-
return
|
832
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
833
|
+
children: viewEmpty
|
834
|
+
});
|
658
835
|
}
|
659
|
-
return
|
836
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Container.default, {
|
837
|
+
viewEmpty: viewEmpty,
|
838
|
+
children: `${viewText}`
|
839
|
+
});
|
660
840
|
}
|
661
|
-
|
662
|
-
|
841
|
+
var _className = (0, _classnames.default)({
|
842
|
+
'pro-modal-select': true,
|
663
843
|
[props.className]: props.className,
|
664
|
-
|
844
|
+
'pro-modal-select-open': open
|
665
845
|
});
|
666
|
-
return
|
667
|
-
|
668
|
-
|
846
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
847
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
848
|
+
id: uuid,
|
849
|
+
className: _className,
|
850
|
+
style: style,
|
851
|
+
ref: fieldRef,
|
852
|
+
children: initRender
|
853
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_index.ProDrawerForm, (0, _objectSpread2.default)((0, _objectSpread2.default)({
|
669
854
|
mode: "Modal",
|
670
|
-
title,
|
671
|
-
onOk: handleFinish
|
855
|
+
title: title,
|
856
|
+
onOk: handleFinish
|
857
|
+
// @ts-ignore
|
858
|
+
,
|
672
859
|
onCancel: handleClose,
|
673
|
-
open
|
674
|
-
|
675
|
-
|
676
|
-
/* @__PURE__ */ import_react.default.createElement(
|
677
|
-
import__.ProForm,
|
678
|
-
{
|
860
|
+
open: open
|
861
|
+
}, restModalProps), {}, {
|
862
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ProForm, {
|
679
863
|
submitOnEnter: true,
|
680
|
-
form,
|
864
|
+
form: form,
|
681
865
|
columns: formColumns,
|
682
866
|
onFinish: handleSearch,
|
683
867
|
confirmLoading: loading,
|
684
|
-
footer: (formColumns
|
685
|
-
}
|
686
|
-
|
687
|
-
/* @__PURE__ */ import_react.default.createElement(
|
688
|
-
import__.ProTable,
|
689
|
-
{
|
690
|
-
onRow: (record) => {
|
868
|
+
footer: (formColumns === null || formColumns === void 0 ? void 0 : formColumns.length) > 1
|
869
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ProTable, (0, _objectSpread2.default)({
|
870
|
+
onRow: record => {
|
691
871
|
return {
|
692
872
|
onClick: () => handleClickRow(record)
|
693
873
|
};
|
694
874
|
},
|
695
|
-
rowKey,
|
696
|
-
loading,
|
875
|
+
rowKey: rowKey,
|
876
|
+
loading: loading,
|
697
877
|
rowSelection: _rowSelection,
|
698
|
-
columns,
|
878
|
+
columns: columns,
|
699
879
|
dataSource: data,
|
700
|
-
pagination: withPagination ? pagination : false
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
));
|
880
|
+
pagination: withPagination ? pagination : false
|
881
|
+
}, restTableProps))]
|
882
|
+
}))]
|
883
|
+
});
|
705
884
|
};
|
706
|
-
var
|
885
|
+
var _default = exports.default = /*#__PURE__*/(0, _react.forwardRef)(ProModalSelect);
|