@zat-design/sisyphus-react 3.13.19-beta.1 → 3.13.19-beta.11

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.
Files changed (422) hide show
  1. package/dist/index.esm.css +1 -6344
  2. package/dist/index.min.js +1 -0
  3. package/dist/less.esm.css +1 -5768
  4. package/dist/less.min.js +1 -0
  5. package/es/FormsProvider/index.js +9 -7
  6. package/es/ProAction/components/CheckModalContent/index.js +14 -14
  7. package/es/ProAction/index.js +46 -47
  8. package/es/ProConfigProvider/index.js +26 -20
  9. package/es/ProDownload/index.js +66 -73
  10. package/es/ProDownload/utils.js +26 -23
  11. package/es/ProDrawerForm/components/ProDrawer/index.js +43 -39
  12. package/es/ProDrawerForm/components/ProModal/index.js +25 -23
  13. package/es/ProDrawerForm/components/index.js +2 -2
  14. package/es/ProDrawerForm/index.js +19 -21
  15. package/es/ProDrawerForm/utils/index.js +1 -1
  16. package/es/ProEditLabel/components/RenderProForm.js +30 -26
  17. package/es/ProEditLabel/index.js +49 -36
  18. package/es/ProEditLabel/utils/index.js +4 -3
  19. package/es/ProEditTable/components/ActionButton/index.js +83 -76
  20. package/es/ProEditTable/components/RcTable/BaseTable.js +24 -24
  21. package/es/ProEditTable/components/RcTable/DraggableTable.js +34 -41
  22. package/es/ProEditTable/components/RcTable/VirtualTable.js +4 -3
  23. package/es/ProEditTable/components/RcTable/index.js +3 -3
  24. package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +61 -57
  25. package/es/ProEditTable/components/RenderField/index.js +151 -145
  26. package/es/ProEditTable/components/RenderToolbar/index.js +37 -42
  27. package/es/ProEditTable/components/Summary/index.js +22 -21
  28. package/es/ProEditTable/components/Validator/index.js +11 -10
  29. package/es/ProEditTable/components/index.js +5 -5
  30. package/es/ProEditTable/index.d.ts +1 -1
  31. package/es/ProEditTable/index.js +170 -173
  32. package/es/ProEditTable/utils/config.js +42 -46
  33. package/es/ProEditTable/utils/diffOriginal.js +34 -19
  34. package/es/ProEditTable/utils/getDefaultProps.js +12 -13
  35. package/es/ProEditTable/utils/index.js +102 -99
  36. package/es/ProEditTable/utils/tools.js +88 -91
  37. package/es/ProEditTable/utils/transform.js +7 -11
  38. package/es/ProEditTable/utils/useEditTableError.js +22 -13
  39. package/es/ProEnum/components/Group.js +23 -27
  40. package/es/ProEnum/components/Tag.js +14 -16
  41. package/es/ProEnum/hooks/useEnum.js +32 -14
  42. package/es/ProEnum/hooks/useEnumRequest.js +42 -42
  43. package/es/ProEnum/hooks/useFrequentEnumRequest.js +17 -19
  44. package/es/ProEnum/index.js +80 -89
  45. package/es/ProEnum/utils/eventCenter.js +23 -32
  46. package/es/ProEnum/utils/frequentEnum.js +16 -4
  47. package/es/ProEnum/utils/getEnumLabel.js +16 -21
  48. package/es/ProEnum/utils/index.js +12 -7
  49. package/es/ProForm/components/Container.js +8 -6
  50. package/es/ProForm/components/FormFooter/index.js +21 -19
  51. package/es/ProForm/components/base/Checkbox/index.js +16 -15
  52. package/es/ProForm/components/base/DatePicker/index.js +23 -20
  53. package/es/ProForm/components/base/Input/index.js +20 -18
  54. package/es/ProForm/components/base/InputNumber/index.js +57 -53
  55. package/es/ProForm/components/base/Radio/index.js +15 -15
  56. package/es/ProForm/components/base/RangePicker/index.js +24 -29
  57. package/es/ProForm/components/base/RangePicker/useDateRange.js +3 -3
  58. package/es/ProForm/components/base/Select/index.js +17 -15
  59. package/es/ProForm/components/base/Switch/index.js +16 -15
  60. package/es/ProForm/components/base/SwitchCheckbox/index.js +19 -18
  61. package/es/ProForm/components/base/TextArea/index.js +18 -17
  62. package/es/ProForm/components/base/TimePicker/index.js +10 -9
  63. package/es/ProForm/components/combination/Container/index.js +25 -23
  64. package/es/ProForm/components/combination/FormList/components/ActionButton.js +80 -92
  65. package/es/ProForm/components/combination/FormList/components/BlockFields.js +21 -19
  66. package/es/ProForm/components/combination/FormList/components/BlockTitle.js +7 -7
  67. package/es/ProForm/components/combination/FormList/components/Empty.js +21 -20
  68. package/es/ProForm/components/combination/FormList/components/LineFields.js +19 -18
  69. package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +45 -51
  70. package/es/ProForm/components/combination/FormList/index.js +43 -51
  71. package/es/ProForm/components/combination/FormList/utils.js +9 -9
  72. package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +8 -6
  73. package/es/ProForm/components/combination/Group/component/ComRender.js +33 -29
  74. package/es/ProForm/components/combination/Group/hooks/index.js +49 -47
  75. package/es/ProForm/components/combination/Group/index.js +38 -37
  76. package/es/ProForm/components/combination/Group/utils.js +56 -50
  77. package/es/ProForm/components/combination/ProCascader/index.js +81 -85
  78. package/es/ProForm/components/combination/ProCascader/utils/index.js +6 -6
  79. package/es/ProForm/components/combination/ProCombination/index.js +41 -37
  80. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +31 -25
  81. package/es/ProForm/components/combination/ProModalSelect/index.js +166 -173
  82. package/es/ProForm/components/combination/ProModalSelect/utils/index.js +1 -1
  83. package/es/ProForm/components/combination/ProNumberRange/index.js +46 -51
  84. package/es/ProForm/components/combination/ProRangeLimit/index.js +39 -39
  85. package/es/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +3 -3
  86. package/es/ProForm/components/combination/ProTimeLimit/index.js +43 -40
  87. package/es/ProForm/components/index.d.ts +1 -0
  88. package/es/ProForm/components/index.js +40 -35
  89. package/es/ProForm/components/old/EnumSelect/hooks/useRequestList.js +30 -28
  90. package/es/ProForm/components/old/EnumSelect/index.js +55 -62
  91. package/es/ProForm/components/old/InputRange/index.js +17 -16
  92. package/es/ProForm/components/old/InputWithSuffix/index.js +6 -5
  93. package/es/ProForm/components/old/ProAddress/index.js +53 -75
  94. package/es/ProForm/components/old/ProCertNo/index.js +17 -17
  95. package/es/ProForm/components/old/ProCertValidity/index.js +19 -21
  96. package/es/ProForm/components/old/ProRangeBox/index.js +25 -24
  97. package/es/ProForm/components/render/ChangedWrapper.js +34 -33
  98. package/es/ProForm/components/render/ConfirmWrapper.js +16 -18
  99. package/es/ProForm/components/render/Render.js +150 -135
  100. package/es/ProForm/components/render/RenderFields.js +65 -50
  101. package/es/ProForm/components/render/propsType.js +25 -0
  102. package/es/ProForm/index.js +83 -70
  103. package/es/ProForm/propsType.d.ts +1 -1
  104. package/es/ProForm/propsType.js +5 -1
  105. package/es/ProForm/utils/diffOriginal.js +30 -16
  106. package/es/ProForm/utils/getDefaultProps.js +10 -10
  107. package/es/ProForm/utils/index.js +105 -110
  108. package/es/ProForm/utils/processDependencies.js +15 -5
  109. package/es/ProForm/utils/rulesCreator.js +21 -22
  110. package/es/ProForm/utils/transformNames.js +7 -6
  111. package/es/ProForm/utils/transformValue.js +16 -13
  112. package/es/ProForm/utils/useDeepCompareMemo.js +6 -4
  113. package/es/ProForm/utils/useFieldProps.js +1 -3
  114. package/es/ProForm/utils/useForm.js +36 -34
  115. package/es/ProForm/utils/useRules.js +28 -31
  116. package/es/ProForm/utils/useShouldUpdate.js +83 -86
  117. package/es/ProForm/utils/useWatch.js +36 -14
  118. package/es/ProForm/utils/valueType.js +51 -52
  119. package/es/ProIcon/config/index.js +2 -0
  120. package/es/ProIcon/index.js +53 -49
  121. package/es/ProIcon/utils/index.js +8 -9
  122. package/es/ProLayout/components/Layout/Header/index.js +13 -11
  123. package/es/ProLayout/components/Layout/Icon/Icon.js +7 -7
  124. package/es/ProLayout/components/Layout/Icon/index.js +1 -1
  125. package/es/ProLayout/components/Layout/Menu/FoldMenu/index.js +42 -40
  126. package/es/ProLayout/components/Layout/Menu/OpenMenu/index.js +51 -52
  127. package/es/ProLayout/components/Layout/Menu/SideMenu/index.js +10 -9
  128. package/es/ProLayout/components/Layout/Menu/index.js +20 -18
  129. package/es/ProLayout/components/Layout/Notice/index.js +12 -11
  130. package/es/ProLayout/components/Layout/index.js +4 -4
  131. package/es/ProLayout/components/ProCollapse/index.js +35 -32
  132. package/es/ProLayout/components/ProFooter/index.js +13 -15
  133. package/es/ProLayout/components/ProHeader/components/Copy/index.js +9 -9
  134. package/es/ProLayout/components/ProHeader/components/ProBackBtn/index.js +8 -7
  135. package/es/ProLayout/components/ProHeader/components/index.js +2 -2
  136. package/es/ProLayout/components/ProHeader/index.js +129 -118
  137. package/es/ProLayout/components/ProHeader/utils/index.js +1 -1
  138. package/es/ProLayout/components/index.js +3 -3
  139. package/es/ProLayout/index.d.ts +1 -1
  140. package/es/ProLayout/index.js +28 -25
  141. package/es/ProLayout/utils/index.js +37 -35
  142. package/es/ProSelect/components/AdaptiveTooltip.js +10 -11
  143. package/es/ProSelect/index.js +87 -99
  144. package/es/ProSelect/utils/index.js +27 -33
  145. package/es/ProStep/components/Anchor/index.d.ts +1 -0
  146. package/es/ProStep/components/Anchor/index.js +26 -25
  147. package/es/ProStep/components/Item/index.d.ts +1 -0
  148. package/es/ProStep/components/Item/index.js +26 -22
  149. package/es/ProStep/components/Listener/index.js +11 -15
  150. package/es/ProStep/components/Step/index.js +24 -25
  151. package/es/ProStep/index.js +51 -53
  152. package/es/ProStep/utils/index.js +13 -12
  153. package/es/ProStepTab/index.js +59 -37
  154. package/es/ProTable/components/FormatColumn/index.js +106 -110
  155. package/es/ProTable/components/RcTable/components/BaseTable/index.js +7 -9
  156. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +36 -50
  157. package/es/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +24 -24
  158. package/es/ProTable/components/RcTable/components/DraggableTable/index.js +8 -10
  159. package/es/ProTable/components/RcTable/index.js +2 -2
  160. package/es/ProTable/components/RenderColumn/index.js +51 -51
  161. package/es/ProTable/components/RenderEmptyText/index.js +8 -7
  162. package/es/ProTable/components/RenderFooter/index.js +3 -3
  163. package/es/ProTable/components/RenderSummary/index.js +13 -13
  164. package/es/ProTable/components/RenderTableHeader/index.js +16 -14
  165. package/es/ProTable/components/RenderTabs/index.js +28 -33
  166. package/es/ProTable/components/TableResizable/index.js +17 -16
  167. package/es/ProTable/components/TooltipTitle/index.js +7 -6
  168. package/es/ProTable/components/index.js +11 -6
  169. package/es/ProTable/hooks/useAntdTable.js +106 -119
  170. package/es/ProTable/index.js +158 -176
  171. package/es/ProTable/utils/index.js +25 -21
  172. package/es/ProTabs/components/Card/index.js +15 -14
  173. package/es/ProTabs/components/index.js +1 -1
  174. package/es/ProTabs/index.js +24 -25
  175. package/es/ProThemeTools/component/ProTools/index.js +69 -68
  176. package/es/ProThemeTools/component/index.js +1 -1
  177. package/es/ProThemeTools/index.js +47 -33
  178. package/es/ProThemeTools/utils/index.js +20 -17
  179. package/es/ProTooltip/index.js +44 -46
  180. package/es/ProTree/components/AdaptiveTooltip.js +5 -7
  181. package/es/ProTree/components/CloseIcon.js +5 -5
  182. package/es/ProTree/components/List.js +22 -24
  183. package/es/ProTree/components/ProTree.js +84 -102
  184. package/es/ProTree/components/ProTreeSelect/index.js +128 -119
  185. package/es/ProTree/components/SearchTitle.js +10 -9
  186. package/es/ProTree/components/Tree.js +57 -58
  187. package/es/ProTree/components/index.js +4 -4
  188. package/es/ProTree/index.js +6 -6
  189. package/es/ProTree/utils.js +29 -22
  190. package/es/ProTreeModal/components/Cascader.js +31 -33
  191. package/es/ProTreeModal/components/CloseIcon.js +5 -5
  192. package/es/ProTreeModal/components/List.js +74 -93
  193. package/es/ProTreeModal/components/SearchTitle.js +5 -4
  194. package/es/ProTreeModal/components/SortableItem.js +14 -14
  195. package/es/ProTreeModal/components/Tree.js +49 -53
  196. package/es/ProTreeModal/components/Trigger.js +29 -28
  197. package/es/ProTreeModal/components/index.js +6 -6
  198. package/es/ProTreeModal/index.js +166 -206
  199. package/es/ProTreeModal/utils.js +37 -33
  200. package/es/ProUpload/components/ButtonRender.js +33 -36
  201. package/es/ProUpload/components/DragRender.js +54 -51
  202. package/es/ProUpload/components/DraggableUploadListItem.js +5 -4
  203. package/es/ProUpload/components/Example.js +13 -12
  204. package/es/ProUpload/components/FileItem.js +63 -58
  205. package/es/ProUpload/components/ImageRender.js +98 -100
  206. package/es/ProUpload/index.js +75 -82
  207. package/es/ProUpload/uitls.js +3 -3
  208. package/es/ProUtils/utils/index.js +10 -14
  209. package/es/ProViewer/index.js +29 -25
  210. package/es/ProViewer/propsType.js +0 -1
  211. package/es/ProWaterMark/index.js +5 -4
  212. package/es/index.d.ts +1 -1
  213. package/es/index.js +38 -29
  214. package/es/locale/index.js +7 -4
  215. package/es/old/ProCertValidity/index.js +19 -21
  216. package/es/old/ProEditableTable/index.js +156 -156
  217. package/es/old/ProEditableTable/utils.js +61 -63
  218. package/es/tokens.js +1 -0
  219. package/es/utils/index.js +12 -12
  220. package/lib/FormsProvider/index.js +11 -7
  221. package/lib/ProAction/components/CheckModalContent/index.js +11 -13
  222. package/lib/ProAction/index.js +40 -43
  223. package/lib/ProConfigProvider/index.js +24 -17
  224. package/lib/ProDownload/index.js +65 -71
  225. package/lib/ProDownload/utils.js +25 -22
  226. package/lib/ProDrawerForm/components/ProDrawer/index.js +39 -38
  227. package/lib/ProDrawerForm/components/ProModal/index.js +23 -22
  228. package/lib/ProDrawerForm/index.js +18 -18
  229. package/lib/ProDrawerForm/utils/index.js +3 -2
  230. package/lib/ProEditLabel/components/RenderProForm.js +26 -24
  231. package/lib/ProEditLabel/index.js +46 -35
  232. package/lib/ProEditLabel/utils/index.js +6 -5
  233. package/lib/ProEditTable/components/ActionButton/index.js +79 -74
  234. package/lib/ProEditTable/components/RcTable/BaseTable.js +21 -23
  235. package/lib/ProEditTable/components/RcTable/DraggableTable.js +32 -40
  236. package/lib/ProEditTable/components/RcTable/VirtualTable.js +3 -3
  237. package/lib/ProEditTable/components/RenderField/ListChangedWrapper.js +62 -59
  238. package/lib/ProEditTable/components/RenderField/index.js +137 -132
  239. package/lib/ProEditTable/components/RenderToolbar/index.js +34 -41
  240. package/lib/ProEditTable/components/Summary/index.js +20 -20
  241. package/lib/ProEditTable/components/Validator/index.js +10 -10
  242. package/lib/ProEditTable/index.d.ts +1 -1
  243. package/lib/ProEditTable/index.js +159 -164
  244. package/lib/ProEditTable/utils/config.js +40 -44
  245. package/lib/ProEditTable/utils/diffOriginal.js +36 -21
  246. package/lib/ProEditTable/utils/getDefaultProps.js +14 -15
  247. package/lib/ProEditTable/utils/index.js +97 -97
  248. package/lib/ProEditTable/utils/tools.js +96 -91
  249. package/lib/ProEditTable/utils/transform.js +7 -11
  250. package/lib/ProEditTable/utils/useEditTableError.js +22 -13
  251. package/lib/ProEnum/components/Group.js +23 -27
  252. package/lib/ProEnum/components/Tag.js +14 -16
  253. package/lib/ProEnum/hooks/useEnum.js +30 -12
  254. package/lib/ProEnum/hooks/useEnumRequest.js +39 -39
  255. package/lib/ProEnum/hooks/useFrequentEnumRequest.js +16 -18
  256. package/lib/ProEnum/index.js +68 -78
  257. package/lib/ProEnum/utils/eventCenter.js +23 -32
  258. package/lib/ProEnum/utils/frequentEnum.js +14 -3
  259. package/lib/ProEnum/utils/getEnumLabel.js +15 -21
  260. package/lib/ProEnum/utils/index.js +12 -7
  261. package/lib/ProForm/components/Container.js +7 -5
  262. package/lib/ProForm/components/FormFooter/index.js +19 -17
  263. package/lib/ProForm/components/base/Checkbox/index.js +14 -13
  264. package/lib/ProForm/components/base/DatePicker/index.js +20 -17
  265. package/lib/ProForm/components/base/Input/index.js +15 -15
  266. package/lib/ProForm/components/base/InputNumber/index.js +51 -48
  267. package/lib/ProForm/components/base/Radio/index.js +13 -13
  268. package/lib/ProForm/components/base/RangePicker/index.js +19 -22
  269. package/lib/ProForm/components/base/RangePicker/useDateRange.js +5 -4
  270. package/lib/ProForm/components/base/Select/index.js +14 -12
  271. package/lib/ProForm/components/base/Switch/index.js +11 -11
  272. package/lib/ProForm/components/base/SwitchCheckbox/index.js +16 -15
  273. package/lib/ProForm/components/base/TextArea/index.js +14 -13
  274. package/lib/ProForm/components/base/TimePicker/index.js +6 -5
  275. package/lib/ProForm/components/combination/Container/index.js +22 -21
  276. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +77 -89
  277. package/lib/ProForm/components/combination/FormList/components/BlockFields.js +17 -15
  278. package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +7 -7
  279. package/lib/ProForm/components/combination/FormList/components/Empty.js +17 -18
  280. package/lib/ProForm/components/combination/FormList/components/LineFields.js +14 -14
  281. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +43 -48
  282. package/lib/ProForm/components/combination/FormList/index.js +35 -43
  283. package/lib/ProForm/components/combination/FormList/utils.js +11 -10
  284. package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +7 -5
  285. package/lib/ProForm/components/combination/Group/component/ComRender.js +30 -28
  286. package/lib/ProForm/components/combination/Group/hooks/index.js +48 -45
  287. package/lib/ProForm/components/combination/Group/index.js +34 -35
  288. package/lib/ProForm/components/combination/Group/utils.js +62 -50
  289. package/lib/ProForm/components/combination/ProCascader/index.js +75 -80
  290. package/lib/ProForm/components/combination/ProCascader/utils/index.js +8 -7
  291. package/lib/ProForm/components/combination/ProCombination/index.js +35 -31
  292. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +30 -24
  293. package/lib/ProForm/components/combination/ProModalSelect/index.js +171 -180
  294. package/lib/ProForm/components/combination/ProModalSelect/utils/index.js +3 -2
  295. package/lib/ProForm/components/combination/ProNumberRange/index.js +42 -48
  296. package/lib/ProForm/components/combination/ProRangeLimit/index.js +35 -35
  297. package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +3 -3
  298. package/lib/ProForm/components/combination/ProTimeLimit/index.js +37 -34
  299. package/lib/ProForm/components/index.d.ts +1 -0
  300. package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +35 -33
  301. package/lib/ProForm/components/old/EnumSelect/index.js +50 -58
  302. package/lib/ProForm/components/old/InputRange/index.js +16 -16
  303. package/lib/ProForm/components/old/InputWithSuffix/index.js +4 -4
  304. package/lib/ProForm/components/old/ProAddress/index.js +53 -75
  305. package/lib/ProForm/components/old/ProCertNo/index.js +16 -17
  306. package/lib/ProForm/components/old/ProCertValidity/index.js +17 -18
  307. package/lib/ProForm/components/old/ProRangeBox/index.js +24 -24
  308. package/lib/ProForm/components/render/ChangedWrapper.js +35 -35
  309. package/lib/ProForm/components/render/ConfirmWrapper.js +14 -17
  310. package/lib/ProForm/components/render/Render.js +138 -125
  311. package/lib/ProForm/components/render/RenderFields.js +57 -43
  312. package/lib/ProForm/components/render/propsType.js +26 -1
  313. package/lib/ProForm/index.js +74 -61
  314. package/lib/ProForm/propsType.d.ts +1 -1
  315. package/lib/ProForm/propsType.js +5 -1
  316. package/lib/ProForm/utils/diffOriginal.js +30 -17
  317. package/lib/ProForm/utils/getDefaultProps.js +12 -12
  318. package/lib/ProForm/utils/index.js +127 -106
  319. package/lib/ProForm/utils/processDependencies.js +15 -6
  320. package/lib/ProForm/utils/rulesCreator.js +21 -21
  321. package/lib/ProForm/utils/transformNames.js +6 -6
  322. package/lib/ProForm/utils/transformValue.js +14 -11
  323. package/lib/ProForm/utils/useDeepCompareMemo.js +7 -6
  324. package/lib/ProForm/utils/useFieldProps.js +2 -3
  325. package/lib/ProForm/utils/useForm.js +33 -31
  326. package/lib/ProForm/utils/useRules.js +25 -28
  327. package/lib/ProForm/utils/useShouldUpdate.js +82 -85
  328. package/lib/ProForm/utils/useWatch.js +36 -14
  329. package/lib/ProForm/utils/valueType.js +52 -52
  330. package/lib/ProIcon/config/index.js +2 -0
  331. package/lib/ProIcon/index.js +47 -44
  332. package/lib/ProIcon/utils/index.js +10 -8
  333. package/lib/ProLayout/components/Layout/Header/index.js +10 -10
  334. package/lib/ProLayout/components/Layout/Icon/Icon.js +8 -7
  335. package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +37 -36
  336. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +49 -52
  337. package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +8 -8
  338. package/lib/ProLayout/components/Layout/Menu/index.js +17 -16
  339. package/lib/ProLayout/components/Layout/Notice/index.js +8 -8
  340. package/lib/ProLayout/components/ProCollapse/index.js +32 -30
  341. package/lib/ProLayout/components/ProFooter/index.js +14 -16
  342. package/lib/ProLayout/components/ProHeader/components/Copy/index.js +7 -7
  343. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +6 -7
  344. package/lib/ProLayout/components/ProHeader/index.js +131 -120
  345. package/lib/ProLayout/components/ProHeader/utils/index.js +3 -2
  346. package/lib/ProLayout/index.d.ts +1 -1
  347. package/lib/ProLayout/index.js +22 -21
  348. package/lib/ProLayout/utils/index.js +42 -33
  349. package/lib/ProSelect/components/AdaptiveTooltip.js +9 -11
  350. package/lib/ProSelect/index.js +82 -93
  351. package/lib/ProSelect/utils/index.js +29 -34
  352. package/lib/ProStep/components/Anchor/index.d.ts +1 -0
  353. package/lib/ProStep/components/Anchor/index.js +25 -24
  354. package/lib/ProStep/components/Item/index.d.ts +1 -0
  355. package/lib/ProStep/components/Item/index.js +24 -20
  356. package/lib/ProStep/components/Listener/index.js +9 -13
  357. package/lib/ProStep/components/Step/index.js +20 -21
  358. package/lib/ProStep/index.js +45 -49
  359. package/lib/ProStep/utils/index.js +16 -12
  360. package/lib/ProStepTab/index.js +60 -38
  361. package/lib/ProTable/components/FormatColumn/index.js +100 -104
  362. package/lib/ProTable/components/RcTable/components/BaseTable/index.js +5 -7
  363. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +34 -48
  364. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +25 -23
  365. package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +5 -7
  366. package/lib/ProTable/components/RenderColumn/index.js +46 -48
  367. package/lib/ProTable/components/RenderEmptyText/index.js +6 -6
  368. package/lib/ProTable/components/RenderFooter/index.js +3 -3
  369. package/lib/ProTable/components/RenderSummary/index.js +11 -12
  370. package/lib/ProTable/components/RenderTableHeader/index.js +14 -13
  371. package/lib/ProTable/components/RenderTabs/index.js +27 -32
  372. package/lib/ProTable/components/TableResizable/index.js +16 -15
  373. package/lib/ProTable/components/TooltipTitle/index.js +5 -5
  374. package/lib/ProTable/hooks/useAntdTable.js +103 -116
  375. package/lib/ProTable/index.js +149 -169
  376. package/lib/ProTable/utils/index.js +33 -22
  377. package/lib/ProTabs/components/Card/index.js +14 -14
  378. package/lib/ProTabs/index.js +24 -24
  379. package/lib/ProThemeTools/component/ProTools/index.js +66 -65
  380. package/lib/ProThemeTools/index.js +43 -29
  381. package/lib/ProThemeTools/utils/index.js +25 -18
  382. package/lib/ProTooltip/index.js +44 -46
  383. package/lib/ProTree/components/AdaptiveTooltip.js +5 -7
  384. package/lib/ProTree/components/CloseIcon.js +5 -5
  385. package/lib/ProTree/components/List.js +18 -22
  386. package/lib/ProTree/components/ProTree.js +77 -96
  387. package/lib/ProTree/components/ProTreeSelect/index.js +126 -116
  388. package/lib/ProTree/components/SearchTitle.js +8 -8
  389. package/lib/ProTree/components/Tree.js +53 -55
  390. package/lib/ProTree/index.js +4 -4
  391. package/lib/ProTree/utils.js +34 -25
  392. package/lib/ProTreeModal/components/Cascader.js +28 -32
  393. package/lib/ProTreeModal/components/CloseIcon.js +5 -5
  394. package/lib/ProTreeModal/components/List.js +69 -89
  395. package/lib/ProTreeModal/components/SearchTitle.js +4 -4
  396. package/lib/ProTreeModal/components/SortableItem.js +11 -12
  397. package/lib/ProTreeModal/components/Tree.js +44 -49
  398. package/lib/ProTreeModal/components/Trigger.js +26 -26
  399. package/lib/ProTreeModal/index.js +157 -199
  400. package/lib/ProTreeModal/utils.js +43 -35
  401. package/lib/ProUpload/components/ButtonRender.js +29 -33
  402. package/lib/ProUpload/components/DragRender.js +50 -48
  403. package/lib/ProUpload/components/DraggableUploadListItem.js +7 -5
  404. package/lib/ProUpload/components/Example.js +13 -11
  405. package/lib/ProUpload/components/FileItem.js +58 -50
  406. package/lib/ProUpload/components/ImageRender.js +89 -93
  407. package/lib/ProUpload/index.js +68 -76
  408. package/lib/ProUpload/uitls.js +5 -3
  409. package/lib/ProUtils/utils/index.js +10 -14
  410. package/lib/ProViewer/index.js +26 -24
  411. package/lib/ProViewer/propsType.js +1 -5
  412. package/lib/ProWaterMark/index.js +5 -4
  413. package/lib/index.d.ts +1 -1
  414. package/lib/locale/index.js +6 -2
  415. package/lib/old/ProCertValidity/index.js +17 -18
  416. package/lib/old/ProEditableTable/index.js +153 -156
  417. package/lib/old/ProEditableTable/utils.js +61 -62
  418. package/lib/tokens.js +1 -0
  419. package/lib/utils/index.js +16 -13
  420. package/package.json +8 -8
  421. package/dist/index.esm.js +0 -3
  422. package/dist/less.esm.js +0 -3
@@ -1,15 +1,13 @@
1
+ import "antd/es/space/style";
2
+ import _Space from "antd/es/space";
1
3
  import "antd/es/button/style";
2
4
  import _Button from "antd/es/button";
3
- import "antd/es/input/style";
4
- import _Input from "antd/es/input";
5
5
  import "antd/es/tooltip/style";
6
6
  import _Tooltip from "antd/es/tooltip";
7
+ import "antd/es/input/style";
8
+ import _Input from "antd/es/input";
7
9
  import "antd/es/spin/style";
8
10
  import _Spin from "antd/es/spin";
9
- import "antd/es/space/style";
10
- import _Space from "antd/es/space";
11
- import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
12
- import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
13
11
  import "antd/es/message/style";
14
12
  import _message from "antd/es/message";
15
13
  import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
@@ -19,29 +17,26 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
19
17
  import "antd/es/form/style";
20
18
  import _Form from "antd/es/form";
21
19
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
22
- import _isObject from "lodash/isObject";
23
- import _isFunction from "lodash/isFunction";
24
- import _isEqual from "lodash/isEqual";
25
- import _isBoolean from "lodash/isBoolean";
26
- import _isArray from "lodash/isArray";
27
- import _debounce from "lodash/debounce";
28
20
  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"],
29
21
  _excluded2 = ["onOk"],
30
22
  _excluded3 = ["rowKey", "columns", "rowSelection"];
31
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
32
23
  import { SearchOutlined } from '@ant-design/icons';
33
24
  import { useDebounceEffect, useDeepCompareEffect, useMount, useSetState } from 'ahooks';
25
+ import { debounce, isArray, isBoolean, isEqual, isFunction, isObject } from 'lodash';
34
26
  import classNames from 'classnames';
35
27
  import { ReactSVG } from 'react-svg';
36
28
  import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
37
- import { ProForm, ProDrawerForm, ProTable, useProConfig, ProSelect } from '../../../../index';
38
- import Container from '../../Container';
39
- import viewSvg from '../../../../assets/view.svg';
40
- import useRequestList from './hooks/useRequestList';
41
- import locale from '../../../../locale';
42
- import { hideTooltipIfOpen } from './utils';
43
- var ProModalSelect = function ProModalSelect(props, ref) {
44
- var _useRequest$options, _useRequest$options2, _useRequest$options2$, _useRequest$options3, _formColumns$;
29
+ import { ProForm, ProDrawerForm, ProTable, useProConfig, ProSelect } from "../../../../index";
30
+ import Container from "../../Container";
31
+ import viewSvg from "../../../../assets/view.svg";
32
+ import useRequestList from "./hooks/useRequestList";
33
+ import locale from "../../../../locale";
34
+ import { hideTooltipIfOpen } from "./utils";
35
+ import { jsx as _jsx } from "react/jsx-runtime";
36
+ import { jsxs as _jsxs } from "react/jsx-runtime";
37
+ import { Fragment as _Fragment } from "react/jsx-runtime";
38
+ var ProModalSelect = (props, ref) => {
39
+ var _useRequest$options, _useRequest$options2, _useRequest$options3, _formColumns$;
45
40
  var value = props.value,
46
41
  onChange = props.onChange,
47
42
  disabled = props.disabled,
@@ -71,8 +66,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
71
66
  otherProps = props.otherProps,
72
67
  restProps = _objectWithoutProperties(props, _excluded);
73
68
  var _tooltip = tooltip !== null && tooltip !== void 0 ? tooltip : isTooltip;
74
- var nextMode = useMemo(function () {
75
- if (_isBoolean(readOnly) && readOnly === false) {
69
+ var nextMode = useMemo(() => {
70
+ if (isBoolean(readOnly) && readOnly === false) {
76
71
  return 'input';
77
72
  }
78
73
  return mode;
@@ -98,10 +93,13 @@ var ProModalSelect = function ProModalSelect(props, ref) {
98
93
  isViewCon = _ref2.isView,
99
94
  viewEmpty = _ref2.viewEmpty;
100
95
  var isView = typeof props.isView === 'boolean' ? props.isView : isViewCon; // 组件可直接接收isView参数, 优先级高
96
+
101
97
  // 是否多选
102
98
  var isMultiple = type === 'checkbox';
99
+
103
100
  // 生成一个唯一id,用于满足tooltip功能
104
101
  var uuid = Math.random().toString(36).slice(-6);
102
+
105
103
  // 全局配置fieldNames指定 value与label的key
106
104
  var _ref3 = useProConfig('ProModalSelect') || {},
107
105
  _ref3$fieldNames = _ref3.fieldNames,
@@ -112,6 +110,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
112
110
  labelKey = proModalSelectFieldNames.label;
113
111
  valueKey = proModalSelectFieldNames.value;
114
112
  }
113
+
115
114
  // 表单上配置的权重大于全局配置
116
115
  if (fieldNames && Object.keys(fieldNames).length) {
117
116
  labelKey = fieldNames.label;
@@ -126,8 +125,9 @@ var ProModalSelect = function ProModalSelect(props, ref) {
126
125
  var preValue = useRef(value);
127
126
  // 表单项的ref
128
127
  var fieldRef = useRef(null);
129
- var defaultParams = Array.isArray(useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options = useRequest.options) === null || _useRequest$options === void 0 ? void 0 : _useRequest$options.defaultParams) ? useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options2 = useRequest.options) === null || _useRequest$options2 === void 0 ? void 0 : (_useRequest$options2$ = _useRequest$options2.defaultParams) === null || _useRequest$options2$ === void 0 ? void 0 : _useRequest$options2$[0] : (useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options3 = useRequest.options) === null || _useRequest$options3 === void 0 ? void 0 : _useRequest$options3.defaultParams) || {};
128
+ 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) || {};
130
129
  var defaultParamsRef = useRef(defaultParams); // 缓存 defaultParams 的引用
130
+
131
131
  var _useSetState = useSetState({
132
132
  _value: value,
133
133
  isInit: true,
@@ -155,14 +155,14 @@ var ProModalSelect = function ProModalSelect(props, ref) {
155
155
  var selectedRows = (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || _selectedRows;
156
156
  var selectedRowKeys = (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || _selectedRowKeys;
157
157
  var _useRequestList = useRequestList(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, {
158
- withPagination: withPagination,
159
- transformParams: transformParams,
160
- transformResponse: transformResponse
158
+ withPagination,
159
+ transformParams,
160
+ transformResponse
161
161
  }, _objectSpread(_objectSpread({}, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options), {}, {
162
162
  manual: true,
163
- onSuccess: function onSuccess(res) {
163
+ onSuccess(res) {
164
164
  var _res$data, _ref5;
165
- var list = withPagination ? res === null || res === void 0 ? 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;
165
+ 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;
166
166
  setState({
167
167
  options: (_ref5 = transformResponse ? transformResponse(res === null || res === void 0 ? void 0 : res.data) : list) !== null && _ref5 !== void 0 ? _ref5 : []
168
168
  });
@@ -170,18 +170,18 @@ var ProModalSelect = function ProModalSelect(props, ref) {
170
170
  })),
171
171
  run = _useRequestList.run,
172
172
  selectLoading = _useRequestList.loading;
173
- var initParams = useMemo(function () {
173
+ var initParams = useMemo(() => {
174
174
  var nextInitParams = useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams;
175
175
  if (typeof (useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams) === 'function') {
176
176
  var _contentForm$getField;
177
- nextInitParams = useRequest === null || useRequest === void 0 ? void 0 : useRequest.initParams(value, contentForm === null || contentForm === void 0 ? void 0 : (_contentForm$getField = contentForm.getFieldsValue) === null || _contentForm$getField === void 0 ? void 0 : _contentForm$getField.call(contentForm));
177
+ 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));
178
178
  }
179
179
  return nextInitParams;
180
180
  }, [value]);
181
181
  var _useRequestList2 = useRequestList(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, {
182
- withPagination: withPagination,
183
- transformParams: transformParams,
184
- transformResponse: transformResponse
182
+ withPagination,
183
+ transformParams,
184
+ transformResponse
185
185
  }, _objectSpread({
186
186
  ready: (initParams || defaultOne) && nextMode === 'input' || visible
187
187
  }, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options)),
@@ -192,50 +192,47 @@ var ProModalSelect = function ProModalSelect(props, ref) {
192
192
  onReset = _useRequestList2.onReset,
193
193
  runAsync = _useRequestList2.runAsync,
194
194
  mutate = _useRequestList2.mutate;
195
- var defaultOptionRender = function defaultOptionRender(rowData) {
196
- return rowData === null || rowData === void 0 ? void 0 : rowData[labelKey];
197
- };
195
+ var defaultOptionRender = rowData => rowData === null || rowData === void 0 ? void 0 : rowData[labelKey];
198
196
  var handleFormat = onFormat || defaultOptionRender;
199
197
  if (showCodeName) {
200
- handleFormat = function handleFormat(_ref6) {
198
+ handleFormat = _ref6 => {
201
199
  var value = _ref6.value,
202
200
  label = _ref6.label;
203
- return "".concat(value, "-").concat(label);
201
+ return `${value}-${label}`;
204
202
  };
205
203
  }
204
+
206
205
  /**
207
206
  * 格式化数据方法,展示在输入框中
208
207
  * @date 2023-02-16
209
208
  * @param {any} data 当前选中的值 labelInValue模式下为选中行对象,单值模式为value值
210
209
  * @returns {any}
211
210
  */
212
- var formatValue = function formatValue(data) {
211
+ var formatValue = data => {
213
212
  var _data$map;
214
213
  if (typeof data === 'string' || typeof data === 'number') {
215
214
  return data;
216
215
  }
217
- if (_isObject(data)) {
216
+ if (isObject(data)) {
218
217
  return handleFormat(_objectSpread(_objectSpread({}, data), {}, {
219
218
  value: data[valueKey],
220
219
  label: data[labelKey]
221
220
  }));
222
221
  }
223
- return _isArray(data) ? data === null || data === void 0 ? void 0 : (_data$map = data.map(function (item) {
222
+ return isArray(data) ? data === null || data === void 0 || (_data$map = data.map(item => {
224
223
  return handleFormat(_objectSpread(_objectSpread({}, item), {}, {
225
224
  value: item[valueKey],
226
225
  label: item[labelKey]
227
226
  }));
228
227
  })) === null || _data$map === void 0 ? void 0 : _data$map.join(',') : '';
229
228
  };
230
- var viewText = useMemo(function () {
229
+ var viewText = useMemo(() => {
231
230
  var nextValue = labelInValue ? value : _value;
232
231
  if (labelInValue) {
233
232
  nextValue = value;
234
233
  } else {
235
234
  var _options$find;
236
- var optionDTO = options === null || options === void 0 ? void 0 : (_options$find = options.find) === null || _options$find === void 0 ? void 0 : _options$find.call(options, function (item) {
237
- return item[valueKey] === value;
238
- });
235
+ 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);
239
236
  if (optionDTO) {
240
237
  nextValue = optionDTO;
241
238
  } else {
@@ -244,33 +241,33 @@ var ProModalSelect = function ProModalSelect(props, ref) {
244
241
  }
245
242
  return formatValue(nextValue);
246
243
  }, [value, _value, options]);
244
+
247
245
  /**
248
246
  * 获取表格的rowKey,支持函数、字符串
249
247
  * @date 2023-02-16
250
248
  * @param {any} record 表格行数据
251
249
  * @returns {any}
252
250
  */
253
- var getRowKey = function getRowKey(record) {
254
- if (_isFunction(rowKey)) {
251
+ var getRowKey = record => {
252
+ if (isFunction(rowKey)) {
255
253
  return rowKey(record);
256
254
  }
257
255
  return record[rowKey];
258
256
  };
257
+
259
258
  /**
260
259
  * 执行onChange暴露出来的第一个参数取数方法
261
260
  * @date 2023-02-16
262
261
  * @param {any} selectedRows 选中行数据
263
262
  * @returns {any}
264
263
  */
265
- var getNextValues = function getNextValues(selectedRows) {
264
+ var getNextValues = selectedRows => {
266
265
  if (isMultiple) {
267
- return selectedRows.map(function (item) {
268
- return item === null || item === void 0 ? void 0 : item[valueKey];
269
- });
266
+ return selectedRows.map(item => item === null || item === void 0 ? void 0 : item[valueKey]);
270
267
  }
271
268
  return selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows[valueKey];
272
269
  };
273
- var handleChangeValue = function handleChangeValue(e) {
270
+ var handleChangeValue = e => {
274
271
  onChange(e.target.value);
275
272
  preValue.current = e.target.value;
276
273
  if (nextMode === 'input') {
@@ -279,12 +276,12 @@ var ProModalSelect = function ProModalSelect(props, ref) {
279
276
  });
280
277
  }
281
278
  };
282
- var handleSelectValue = function handleSelectValue(val, option) {
279
+ var handleSelectValue = (val, option) => {
283
280
  onChange(val, option);
284
281
  preValue.current = val;
285
282
  };
286
283
  var handleClick = /*#__PURE__*/function () {
287
- var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
284
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
288
285
  var _yield$beforeOpen, res;
289
286
  return _regeneratorRuntime().wrap(function _callee$(_context) {
290
287
  while (1) switch (_context.prev = _context.next) {
@@ -319,8 +316,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
319
316
  setState({
320
317
  onOff: true
321
318
  });
322
- setTimeout(function () {
323
- afterOpen === null || afterOpen === void 0 ? void 0 : afterOpen({
319
+ setTimeout(() => {
320
+ afterOpen === null || afterOpen === void 0 || afterOpen({
324
321
  setInnerState: setState
325
322
  });
326
323
  }, 100);
@@ -335,7 +332,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
335
332
  return _ref7.apply(this, arguments);
336
333
  };
337
334
  }();
338
- var handleClose = function handleClose() {
335
+ var handleClose = () => {
339
336
  var _useRequest$options4;
340
337
  form.resetFields();
341
338
  setState({
@@ -343,21 +340,20 @@ var ProModalSelect = function ProModalSelect(props, ref) {
343
340
  visible: false,
344
341
  isInit: false
345
342
  });
343
+
346
344
  // 当设置manual为true时,清空当前弹框内已搜索出来的值
347
- if (useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options4 = useRequest.options) === null || _useRequest$options4 === void 0 ? void 0 : _useRequest$options4.manual) {
348
- mutate(function () {
349
- return [];
350
- });
345
+ if (useRequest !== null && useRequest !== void 0 && (_useRequest$options4 = useRequest.options) !== null && _useRequest$options4 !== void 0 && _useRequest$options4.manual) {
346
+ mutate(() => []);
351
347
  }
352
348
  };
353
349
  var handleFinish = /*#__PURE__*/function () {
354
- var _ref8 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
350
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
355
351
  var _nextSelectedRows, _nextSelectedRows2, nextSelectedRows, record, flag, res;
356
352
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
357
353
  while (1) switch (_context2.prev = _context2.next) {
358
354
  case 0:
359
355
  _context2.prev = 0;
360
- if (!(!(selectedRowKeys === null || selectedRowKeys === void 0 ? void 0 : selectedRowKeys.length) || !(selectedRows === null || selectedRows === void 0 ? void 0 : selectedRows.length))) {
356
+ if (!(!(selectedRowKeys !== null && selectedRowKeys !== void 0 && selectedRowKeys.length) || !(selectedRows !== null && selectedRows !== void 0 && selectedRows.length))) {
361
357
  _context2.next = 4;
362
358
  break;
363
359
  }
@@ -365,10 +361,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
365
361
  return _context2.abrupt("return", false);
366
362
  case 4:
367
363
  nextSelectedRows = selectedRows;
368
- if (!((_nextSelectedRows = nextSelectedRows) === null || _nextSelectedRows === void 0 ? void 0 : _nextSelectedRows[0])) {
369
- nextSelectedRows = data.filter(function (item) {
370
- return selectedRowKeys.includes(item[valueKey]);
371
- });
364
+ if (!((_nextSelectedRows = nextSelectedRows) !== null && _nextSelectedRows !== void 0 && _nextSelectedRows[0])) {
365
+ nextSelectedRows = data.filter(item => selectedRowKeys.includes(item[valueKey]));
372
366
  }
373
367
  record = isMultiple ? nextSelectedRows : (_nextSelectedRows2 = nextSelectedRows) === null || _nextSelectedRows2 === void 0 ? void 0 : _nextSelectedRows2[0];
374
368
  if (!isMultiple) {
@@ -392,12 +386,12 @@ var ProModalSelect = function ProModalSelect(props, ref) {
392
386
  }
393
387
  case 14:
394
388
  if (flag) {
395
- onChange === null || onChange === void 0 ? void 0 : onChange(labelInValue ? record : getNextValues(record), record);
389
+ onChange === null || onChange === void 0 || onChange(labelInValue ? record : getNextValues(record), record);
396
390
  preValue.current = labelInValue ? record : getNextValues(record);
397
391
  // 更新内部展示值
398
392
  setState({
399
393
  _value: record,
400
- options: _isArray(record) ? record : [record]
394
+ options: isArray(record) ? record : [record]
401
395
  });
402
396
  handleClose();
403
397
  }
@@ -417,7 +411,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
417
411
  };
418
412
  }();
419
413
  var handleSearch = /*#__PURE__*/function () {
420
- var _ref9 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
414
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
421
415
  var values;
422
416
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
423
417
  while (1) switch (_context3.prev = _context3.next) {
@@ -440,38 +434,33 @@ var ProModalSelect = function ProModalSelect(props, ref) {
440
434
  };
441
435
  }();
442
436
  var _rowSelection = _objectSpread({
443
- type: type,
444
- onChange: function onChange(rowKeys, rows) {
437
+ type,
438
+ onChange: (rowKeys, rows) => {
445
439
  setState({
446
440
  selectedRowKeys: rowKeys,
447
441
  selectedRows: rows
448
442
  });
449
443
  },
450
- getCheckboxProps: function getCheckboxProps(record) {
451
- return {
452
- disabled: record === null || record === void 0 ? void 0 : record.disabled
453
- };
454
- },
455
- selectedRowKeys: selectedRowKeys,
456
- selectedRows: selectedRows
444
+ getCheckboxProps: record => ({
445
+ disabled: record === null || record === void 0 ? void 0 : record.disabled
446
+ }),
447
+ selectedRowKeys,
448
+ selectedRows
457
449
  }, rowSelection);
450
+
458
451
  // 点击行进行勾选
459
- var handleClickRow = function handleClickRow(record) {
460
- var _rowSelection$getChec, _rowSelection$getChec2;
461
- if (_rowSelection === null || _rowSelection === void 0 ? void 0 : (_rowSelection$getChec = _rowSelection.getCheckboxProps) === null || _rowSelection$getChec === void 0 ? void 0 : (_rowSelection$getChec2 = _rowSelection$getChec.call(_rowSelection, record)) === null || _rowSelection$getChec2 === void 0 ? void 0 : _rowSelection$getChec2.disabled) {
452
+ var handleClickRow = record => {
453
+ var _rowSelection$getChec;
454
+ 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) {
462
455
  return;
463
456
  }
464
- if (record === null || record === void 0 ? void 0 : record.disabled) return;
457
+ if (record !== null && record !== void 0 && record.disabled) return;
465
458
  var selectedValue = getRowKey(record);
466
- var tempSelectedRows = _toConsumableArray(selectedRows);
467
- var tempSelectedRowKeys = _toConsumableArray(selectedRowKeys);
459
+ var tempSelectedRows = [...selectedRows];
460
+ var tempSelectedRowKeys = [...selectedRowKeys];
468
461
  if (isMultiple) {
469
- var rowIndex = tempSelectedRows.findIndex(function (item) {
470
- return getRowKey(item) === selectedValue;
471
- });
472
- var rowKeyIndex = tempSelectedRowKeys.findIndex(function (item) {
473
- return item === selectedValue;
474
- });
462
+ var rowIndex = tempSelectedRows.findIndex(item => getRowKey(item) === selectedValue);
463
+ var rowKeyIndex = tempSelectedRowKeys.findIndex(item => item === selectedValue);
475
464
  if (rowKeyIndex > -1) {
476
465
  tempSelectedRows.splice(rowIndex, 1);
477
466
  tempSelectedRowKeys.splice(rowKeyIndex, 1);
@@ -488,9 +477,10 @@ var ProModalSelect = function ProModalSelect(props, ref) {
488
477
  selectedRowKeys: tempSelectedRowKeys
489
478
  });
490
479
  };
480
+
491
481
  // 初始化回显,当传入initParams时,前端用来回险
492
482
  var getInitValues = /*#__PURE__*/function () {
493
- var _ref10 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
483
+ var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
494
484
  var _useRequest$options5, queryBean, page, params, res, _res$data2, _list, list, _data, nextSelectRowKeys;
495
485
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
496
486
  while (1) switch (_context4.prev = _context4.next) {
@@ -503,7 +493,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
503
493
  page = _objectSpread({
504
494
  pageNum: 1,
505
495
  pageSize: 10
506
- }, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options5 = useRequest.options) === null || _useRequest$options5 === void 0 ? void 0 : _useRequest$options5.page);
496
+ }, useRequest === null || useRequest === void 0 || (_useRequest$options5 = useRequest.options) === null || _useRequest$options5 === void 0 ? void 0 : _useRequest$options5.page);
507
497
  params = withPagination ? _objectSpread(_objectSpread({}, page), {}, {
508
498
  queryBean: queryBean !== null && queryBean !== void 0 ? queryBean : {}
509
499
  }) : queryBean;
@@ -512,8 +502,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
512
502
  return runAsync(params);
513
503
  case 7:
514
504
  res = _context4.sent;
515
- if (res === null || res === void 0 ? void 0 : res.data) {
516
- list = withPagination ? res === null || res === void 0 ? 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;
505
+ if (res !== null && res !== void 0 && res.data) {
506
+ 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;
517
507
  if (transformResponse) {
518
508
  list = transformResponse(res === null || res === void 0 ? void 0 : res.data);
519
509
  }
@@ -549,9 +539,10 @@ var ProModalSelect = function ProModalSelect(props, ref) {
549
539
  return _ref10.apply(this, arguments);
550
540
  };
551
541
  }();
542
+
552
543
  // 初始化回显,当传入initParams时,前端用来回险
553
544
  var getDefaultOneValues = /*#__PURE__*/function () {
554
- var _ref11 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
545
+ var _ref11 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
555
546
  var _useRequest$options6;
556
547
  var queryBean, page, params, res, _res$data3, _list2, list, _data2, nextSelectRowKeys;
557
548
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
@@ -561,7 +552,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
561
552
  page = _objectSpread({
562
553
  pageNum: 1,
563
554
  pageSize: 10
564
- }, useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options6 = useRequest.options) === null || _useRequest$options6 === void 0 ? void 0 : _useRequest$options6.page);
555
+ }, useRequest === null || useRequest === void 0 || (_useRequest$options6 = useRequest.options) === null || _useRequest$options6 === void 0 ? void 0 : _useRequest$options6.page);
565
556
  params = withPagination ? _objectSpread(_objectSpread({}, page), {}, {
566
557
  queryBean: queryBean !== null && queryBean !== void 0 ? queryBean : {}
567
558
  }) : queryBean;
@@ -570,8 +561,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
570
561
  return runAsync(params);
571
562
  case 6:
572
563
  res = _context5.sent;
573
- if (res === null || res === void 0 ? void 0 : res.data) {
574
- list = withPagination ? res === null || res === void 0 ? 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;
564
+ if (res !== null && res !== void 0 && res.data) {
565
+ 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;
575
566
  if (transformResponse) {
576
567
  list = transformResponse(res === null || res === void 0 ? void 0 : res.data);
577
568
  }
@@ -581,12 +572,8 @@ var ProModalSelect = function ProModalSelect(props, ref) {
581
572
  onChange(_data2);
582
573
  preValue.current = _data2;
583
574
  } else {
584
- onChange(isMultiple ? _data2.map(function (item) {
585
- return item[valueKey];
586
- }) : _data2[valueKey]);
587
- preValue.current = isMultiple ? _data2.map(function (item) {
588
- return item[valueKey];
589
- }) : _data2[valueKey];
575
+ onChange(isMultiple ? _data2.map(item => item[valueKey]) : _data2[valueKey]);
576
+ preValue.current = isMultiple ? _data2.map(item => item[valueKey]) : _data2[valueKey];
590
577
  }
591
578
  // 更新内部展示值
592
579
  setState({
@@ -606,27 +593,28 @@ var ProModalSelect = function ProModalSelect(props, ref) {
606
593
  return _ref11.apply(this, arguments);
607
594
  };
608
595
  }();
609
- useImperativeHandle(ref, function () {
610
- return {
611
- handleClick: handleClick,
612
- handleSearch: handleSearch
613
- };
614
- });
615
- useMount(function () {
596
+ useImperativeHandle(ref, () => ({
597
+ handleClick,
598
+ handleSearch
599
+ }));
600
+ useMount(() => {
616
601
  if (!value) {
617
602
  setState({
618
603
  selectedRowKeys: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || [],
619
604
  selectedRows: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || [],
620
605
  _value: undefined
621
606
  });
622
- } else if (_isArray(value)) {
607
+ } else if (isArray(value)) {
623
608
  setState({
624
609
  selectedRowKeys: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRowKeys) || value,
625
610
  selectedRows: (rowSelection === null || rowSelection === void 0 ? void 0 : rowSelection.selectedRows) || value,
626
611
  _value: value
627
612
  });
628
- } else if (_isObject(value)) {
629
- var initialValue = _defineProperty(_defineProperty({}, valueKey, value[valueKey]), labelKey, value[labelKey]);
613
+ } else if (isObject(value)) {
614
+ var initialValue = {
615
+ [valueKey]: value[valueKey],
616
+ [labelKey]: value[labelKey]
617
+ };
630
618
  setState({
631
619
  selectedRowKeys: [value],
632
620
  selectedRows: [initialValue],
@@ -634,10 +622,10 @@ var ProModalSelect = function ProModalSelect(props, ref) {
634
622
  });
635
623
  }
636
624
  });
637
- useEffect(function () {
625
+ useEffect(() => {
638
626
  if (onOff && !visible) {
639
627
  var _useRequest$options7;
640
- if ((useRequest === null || useRequest === void 0 ? void 0 : (_useRequest$options7 = useRequest.options) === null || _useRequest$options7 === void 0 ? void 0 : _useRequest$options7.manual) !== true) {
628
+ if ((useRequest === null || useRequest === void 0 || (_useRequest$options7 = useRequest.options) === null || _useRequest$options7 === void 0 ? void 0 : _useRequest$options7.manual) !== true) {
641
629
  onReset();
642
630
  }
643
631
  var nextState = {
@@ -648,14 +636,12 @@ var ProModalSelect = function ProModalSelect(props, ref) {
648
636
  nextState.selectedRowKeys = [];
649
637
  nextState.selectedRows = [];
650
638
  }
651
- if (_isObject(value)) {
639
+ if (isObject(value)) {
652
640
  nextState.selectedRowKeys = [getRowKey(value)];
653
641
  nextState.selectedRows = [value];
654
642
  }
655
- if (_isArray(value)) {
656
- nextState.selectedRowKeys = value.map(function (item) {
657
- return getRowKey(item);
658
- });
643
+ if (isArray(value)) {
644
+ nextState.selectedRowKeys = value.map(item => getRowKey(item));
659
645
  nextState.selectedRows = value;
660
646
  }
661
647
  } else if (value) {
@@ -663,57 +649,59 @@ var ProModalSelect = function ProModalSelect(props, ref) {
663
649
  var nextSelectedRowKeys = isMultiple ? value : [value];
664
650
  nextState.selectedRowKeys = nextSelectedRowKeys;
665
651
  var list = options !== null && options !== void 0 ? options : data;
666
- nextState.selectedRows = list === null || list === void 0 ? void 0 : (_list$filter = list.filter) === null || _list$filter === void 0 ? void 0 : _list$filter.call(list, function (item) {
652
+ nextState.selectedRows = list === null || list === void 0 || (_list$filter = list.filter) === null || _list$filter === void 0 ? void 0 : _list$filter.call(list, item => {
667
653
  return nextSelectedRowKeys.includes(item[valueKey]);
668
654
  });
669
655
  }
670
656
  setState(nextState);
671
657
  }
672
658
  }, [onOff, visible, JSON.stringify(value)]);
673
- useEffect(function () {
659
+ useEffect(() => {
674
660
  hideTooltipIfOpen(fieldRef.current, visible);
675
661
  }, [visible]);
676
- useEffect(function () {
662
+ useEffect(() => {
677
663
  if (value && !visible && isInit && nextMode === 'input') {
678
664
  getInitValues();
679
665
  }
680
666
  }, [JSON.stringify(value), visible, isInit]);
681
- useDebounceEffect(function () {
682
- if (value && !visible && nextMode === 'select' && (!_isEqual(value, preValue.current) || (options === null || options === void 0 ? void 0 : options.length) === 0)) {
667
+ useDebounceEffect(() => {
668
+ if (value && !visible && nextMode === 'select' && (!isEqual(value, preValue.current) || (options === null || options === void 0 ? void 0 : options.length) === 0)) {
683
669
  var _options$some;
684
670
  preValue.current = value;
685
671
  var _data3 = labelInValue ? value[valueKey] : value;
686
- var isHasValue = options === null || options === void 0 ? void 0 : (_options$some = options.some) === null || _options$some === void 0 ? void 0 : _options$some.call(options, function (item) {
687
- return item[valueKey] === _data3;
688
- });
672
+ 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);
689
673
  if (isHasValue) {
690
674
  return;
691
675
  }
692
676
  if (useRequest) {
693
677
  // 加定时器 修复依赖数据同步更新未取到问题
694
- setTimeout(function () {
678
+ setTimeout(() => {
695
679
  var params = withPagination ? {
696
680
  pageNum: 1,
697
681
  pageSize: 50,
698
- queryBean: _objectSpread(_objectSpread(_objectSpread({}, defaultParams), initParams), {}, _defineProperty({}, searchKey !== null && searchKey !== void 0 ? searchKey : valueKey, _data3))
699
- } : _objectSpread(_objectSpread(_objectSpread({}, defaultParams), initParams), {}, _defineProperty({}, searchKey !== null && searchKey !== void 0 ? searchKey : valueKey, _data3));
682
+ queryBean: _objectSpread(_objectSpread(_objectSpread({}, defaultParams), initParams), {}, {
683
+ [searchKey !== null && searchKey !== void 0 ? searchKey : valueKey]: _data3
684
+ })
685
+ } : _objectSpread(_objectSpread(_objectSpread({}, defaultParams), initParams), {}, {
686
+ [searchKey !== null && searchKey !== void 0 ? searchKey : valueKey]: _data3
687
+ });
700
688
  var nextParams = transformParams ? transformParams(params) : params;
701
689
  run(nextParams);
702
690
  }, 300);
703
691
  }
704
692
  }
705
693
  }, [JSON.stringify(value), visible, JSON.stringify(defaultParams), JSON.stringify(initParams), options === null || options === void 0 ? void 0 : options.length]);
706
- var handleSelectFocus = function handleSelectFocus() {
694
+ var handleSelectFocus = () => {
707
695
  if (useRequest) {
708
696
  var queryBean = defaultParams || {};
709
697
  var params = withPagination ? {
710
698
  pageNum: 1,
711
699
  pageSize: 50,
712
- queryBean: queryBean
700
+ queryBean
713
701
  } : queryBean;
714
702
  var nextParams = transformParams ? transformParams(params) : params;
715
703
  // 减少请求条件一致时,且请求过时,focus的重复请求
716
- if (!_isEqual(queryBean, defaultParamsRef.current) || !(options === null || options === void 0 ? void 0 : options.length)) {
704
+ if (!isEqual(queryBean, defaultParamsRef.current) || !(options !== null && options !== void 0 && options.length)) {
717
705
  run(nextParams); // 触发 run 请求
718
706
  defaultParamsRef.current = queryBean; // 更新缓存
719
707
  }
@@ -722,19 +710,21 @@ var ProModalSelect = function ProModalSelect(props, ref) {
722
710
  });
723
711
  }
724
712
  };
725
- var handleSelectSearch = _debounce(function (val) {
713
+ var handleSelectSearch = debounce(val => {
726
714
  if (useRequest) {
727
- var queryBean = _objectSpread(_objectSpread({}, defaultParams), {}, _defineProperty({}, searchKey !== null && searchKey !== void 0 ? searchKey : labelKey, val));
715
+ var queryBean = _objectSpread(_objectSpread({}, defaultParams), {}, {
716
+ [searchKey !== null && searchKey !== void 0 ? searchKey : labelKey]: val
717
+ });
728
718
  var params = withPagination ? {
729
719
  pageNum: 1,
730
720
  pageSize: 50,
731
- queryBean: queryBean
721
+ queryBean
732
722
  } : queryBean;
733
723
  var nextParams = transformParams ? transformParams(params) : params;
734
724
  run(nextParams);
735
725
  }
736
726
  }, 1000);
737
- useDebounceEffect(function () {
727
+ useDebounceEffect(() => {
738
728
  if (!value) {
739
729
  if (defaultOne) {
740
730
  getDefaultOneValues();
@@ -747,14 +737,14 @@ var ProModalSelect = function ProModalSelect(props, ref) {
747
737
  }
748
738
  }
749
739
  if (nextMode === 'input') {
750
- if (labelInValue && _value && !_isEqual(value, _value)) {
740
+ if (labelInValue && _value && !isEqual(value, _value)) {
751
741
  setState({
752
742
  _value: value,
753
743
  selectedRowKeys: [],
754
744
  selectedRows: []
755
745
  });
756
746
  }
757
- if (!labelInValue && !_isEqual(value, _value === null || _value === void 0 ? void 0 : _value[valueKey])) {
747
+ if (!labelInValue && !isEqual(value, _value === null || _value === void 0 ? void 0 : _value[valueKey])) {
758
748
  setState({
759
749
  _value: value,
760
750
  selectedRowKeys: [],
@@ -763,13 +753,14 @@ var ProModalSelect = function ProModalSelect(props, ref) {
763
753
  }
764
754
  }
765
755
  }, [value, _value]);
756
+
766
757
  // 加个中间状态Input
767
- var initRender = _jsxs(_Space.Compact, {
758
+ var initRender = /*#__PURE__*/_jsxs(_Space.Compact, {
768
759
  style: {
769
760
  width: '100%'
770
761
  },
771
762
  block: true,
772
- children: [nextMode === 'select' ? _jsx(ProSelect, _objectSpread({
763
+ children: [nextMode === 'select' ? /*#__PURE__*/_jsx(ProSelect, _objectSpread({
773
764
  value: value,
774
765
  onChange: handleSelectValue,
775
766
  disabled: disabled,
@@ -780,7 +771,7 @@ var ProModalSelect = function ProModalSelect(props, ref) {
780
771
  optionRender: optionRender,
781
772
  scrollFollowParent: false,
782
773
  mode: isMultiple ? 'multiple' : undefined,
783
- notFoundContent: selectLoading ? _jsx(_Spin, {
774
+ notFoundContent: selectLoading ? /*#__PURE__*/_jsx(_Spin, {
784
775
  size: "small"
785
776
  }) : null,
786
777
  onFocus: handleSelectFocus,
@@ -789,18 +780,18 @@ var ProModalSelect = function ProModalSelect(props, ref) {
789
780
  style: {
790
781
  width: isView || disabled ? '100%' : 'calc(100% - 30px)'
791
782
  }
792
- }, restProps)) : _jsx(_Tooltip, {
783
+ }, restProps)) : /*#__PURE__*/_jsx(_Tooltip, {
793
784
  title: _tooltip ? viewText : null,
794
785
  placement: "topLeft",
795
- children: _jsx(_Input, _objectSpread({
786
+ children: /*#__PURE__*/_jsx(_Input, _objectSpread({
796
787
  value: viewText,
797
788
  onChange: handleChangeValue,
798
789
  disabled: disabled,
799
790
  autoComplete: "off",
800
791
  allowClear: true
801
792
  }, restProps))
802
- }), isView || disabled ? null : _jsx(_Button, {
803
- icon: _jsx(ReactSVG, {
793
+ }), isView || disabled ? null : /*#__PURE__*/_jsx(_Button, {
794
+ icon: /*#__PURE__*/_jsx(ReactSVG, {
804
795
  className: "viewSvg",
805
796
  src: viewSvg,
806
797
  onClick: handleClick
@@ -808,71 +799,73 @@ var ProModalSelect = function ProModalSelect(props, ref) {
808
799
  })]
809
800
  });
810
801
  if (customRender && /*#__PURE__*/React.isValidElement(customRender)) {
811
- initRender = _jsx("div", {
802
+ initRender = /*#__PURE__*/_jsx("div", {
812
803
  className: "pro-modal-select-init",
813
804
  onClick: handleClick,
814
805
  children: customRender
815
806
  });
816
807
  }
817
- useDeepCompareEffect(function () {
808
+ useDeepCompareEffect(() => {
818
809
  setState({
819
810
  options: (tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource) || []
820
811
  });
821
812
  }, [tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource]);
813
+
822
814
  // 当搜索条件只有一个时,且为输入框,默认设置suffix
823
- if ((formColumns === null || formColumns === void 0 ? void 0 : formColumns.length) === 1 && (formColumns === null || formColumns === void 0 ? void 0 : (_formColumns$ = formColumns[0]) === null || _formColumns$ === void 0 ? void 0 : _formColumns$.type) === 'Input') {
824
- var _formColumns$2, _formColumns$3, _formColumns$3$fieldP;
825
- if (!((_formColumns$2 = formColumns[0]) === null || _formColumns$2 === void 0 ? void 0 : _formColumns$2.fieldProps)) {
815
+ 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') {
816
+ var _formColumns$2, _formColumns$3;
817
+ if (!((_formColumns$2 = formColumns[0]) !== null && _formColumns$2 !== void 0 && _formColumns$2.fieldProps)) {
826
818
  formColumns[0].fieldProps = {};
827
819
  }
828
- if (!_isFunction(formColumns[0].fieldProps) && !(formColumns === null || formColumns === void 0 ? void 0 : (_formColumns$3 = formColumns[0]) === null || _formColumns$3 === void 0 ? void 0 : (_formColumns$3$fieldP = _formColumns$3.fieldProps) === null || _formColumns$3$fieldP === void 0 ? void 0 : _formColumns$3$fieldP.suffix)) {
829
- formColumns[0].fieldProps.suffix = _jsx(SearchOutlined, {
820
+ if (!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)) {
821
+ formColumns[0].fieldProps.suffix = /*#__PURE__*/_jsx(SearchOutlined, {
830
822
  onClick: handleSearch
831
823
  });
832
824
  }
833
825
  }
834
826
  if (isView) {
835
827
  if (!value) {
836
- return _jsx(_Fragment, {
828
+ return /*#__PURE__*/_jsx(_Fragment, {
837
829
  children: viewEmpty
838
830
  });
839
831
  }
840
- return _jsx(Container, {
832
+ return /*#__PURE__*/_jsx(Container, {
841
833
  viewEmpty: viewEmpty,
842
- children: "".concat(viewText)
834
+ children: `${viewText}`
843
835
  });
844
836
  }
845
- var _className = classNames(_defineProperty(_defineProperty({
846
- 'pro-modal-select': true
847
- }, props.className, props.className), 'pro-modal-select-open', visible));
848
- return _jsxs(_Fragment, {
849
- children: [_jsx("div", {
837
+ var _className = classNames({
838
+ 'pro-modal-select': true,
839
+ [props.className]: props.className,
840
+ 'pro-modal-select-open': visible
841
+ });
842
+ return /*#__PURE__*/_jsxs(_Fragment, {
843
+ children: [/*#__PURE__*/_jsx("div", {
850
844
  id: uuid,
851
845
  className: _className,
852
846
  style: style,
853
847
  ref: fieldRef,
854
848
  children: initRender
855
- }), _jsxs(ProDrawerForm, _objectSpread(_objectSpread({
849
+ }), /*#__PURE__*/_jsxs(ProDrawerForm, _objectSpread(_objectSpread({
856
850
  mode: "Modal",
857
851
  title: title,
858
- onOk: handleFinish,
852
+ onOk: handleFinish
859
853
  // @ts-ignore
854
+ ,
860
855
  onCancel: handleClose,
861
856
  open: visible
862
857
  }, restModalProps), {}, {
863
- children: [_jsx(ProForm, {
858
+ children: [/*#__PURE__*/_jsx(ProForm, {
864
859
  submitOnEnter: true,
865
860
  form: form,
866
861
  columns: formColumns,
867
862
  onFinish: handleSearch,
868
863
  confirmLoading: loading,
869
864
  footer: (formColumns === null || formColumns === void 0 ? void 0 : formColumns.length) > 1
870
- }), _jsx(ProTable, _objectSpread({
871
- onRow: function onRow(record) {
865
+ }), /*#__PURE__*/_jsx(ProTable, _objectSpread({
866
+ onRow: record => {
872
867
  return {
873
- onClick: function onClick() {
874
- return handleClickRow(record);
875
- }
868
+ onClick: () => handleClickRow(record)
876
869
  };
877
870
  },
878
871
  rowKey: rowKey,