@zat-design/sisyphus-react 3.13.18 → 3.13.19-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (432) hide show
  1. package/es/FormsProvider/index.js +9 -7
  2. package/es/ProAction/components/CheckModalContent/index.js +14 -14
  3. package/es/ProAction/index.js +46 -47
  4. package/es/ProConfigProvider/index.js +32 -17
  5. package/es/ProDownload/index.js +66 -73
  6. package/es/ProDownload/utils.js +26 -23
  7. package/es/ProDrawerForm/components/ProDrawer/index.js +43 -39
  8. package/es/ProDrawerForm/components/ProModal/index.js +25 -23
  9. package/es/ProDrawerForm/components/index.js +2 -2
  10. package/es/ProDrawerForm/index.js +19 -21
  11. package/es/ProDrawerForm/utils/index.js +1 -1
  12. package/es/ProEditLabel/components/RenderProForm.js +30 -26
  13. package/es/ProEditLabel/index.js +49 -36
  14. package/es/ProEditLabel/utils/index.js +4 -3
  15. package/es/ProEditTable/components/ActionButton/index.js +83 -76
  16. package/es/ProEditTable/components/RcTable/BaseTable.js +24 -24
  17. package/es/ProEditTable/components/RcTable/DraggableTable.js +34 -41
  18. package/es/ProEditTable/components/RcTable/VirtualTable.js +4 -3
  19. package/es/ProEditTable/components/RcTable/index.js +3 -3
  20. package/es/ProEditTable/components/RenderField/ListChangedWrapper.js +61 -58
  21. package/es/ProEditTable/components/RenderField/index.js +151 -145
  22. package/es/ProEditTable/components/RenderToolbar/index.js +37 -42
  23. package/es/ProEditTable/components/Summary/index.js +22 -21
  24. package/es/ProEditTable/components/Validator/index.js +11 -10
  25. package/es/ProEditTable/components/index.js +5 -5
  26. package/es/ProEditTable/index.d.ts +1 -1
  27. package/es/ProEditTable/index.js +170 -173
  28. package/es/ProEditTable/utils/config.js +42 -46
  29. package/es/ProEditTable/utils/diffOriginal.js +34 -19
  30. package/es/ProEditTable/utils/getDefaultProps.js +12 -13
  31. package/es/ProEditTable/utils/index.js +102 -99
  32. package/es/ProEditTable/utils/tools.js +88 -91
  33. package/es/ProEditTable/utils/transform.js +7 -11
  34. package/es/ProEditTable/utils/useEditTableError.js +22 -13
  35. package/es/ProEnum/components/Group.js +23 -27
  36. package/es/ProEnum/components/Tag.js +14 -16
  37. package/es/ProEnum/hooks/useEnum.js +32 -14
  38. package/es/ProEnum/hooks/useEnumRequest.js +42 -42
  39. package/es/ProEnum/hooks/useFrequentEnumRequest.d.ts +14 -0
  40. package/es/ProEnum/hooks/useFrequentEnumRequest.js +76 -0
  41. package/es/ProEnum/index.js +97 -97
  42. package/es/ProEnum/propsType.d.ts +29 -0
  43. package/es/ProEnum/utils/eventCenter.js +23 -32
  44. package/es/ProEnum/utils/frequentEnum.d.ts +40 -0
  45. package/es/ProEnum/utils/frequentEnum.js +91 -0
  46. package/es/ProEnum/utils/getEnumLabel.js +16 -21
  47. package/es/ProEnum/utils/index.js +12 -7
  48. package/es/ProForm/components/Container.js +8 -6
  49. package/es/ProForm/components/FormFooter/index.js +21 -19
  50. package/es/ProForm/components/base/Checkbox/index.js +16 -15
  51. package/es/ProForm/components/base/DatePicker/index.js +23 -20
  52. package/es/ProForm/components/base/Input/index.js +20 -18
  53. package/es/ProForm/components/base/InputNumber/index.js +57 -53
  54. package/es/ProForm/components/base/Radio/index.js +15 -15
  55. package/es/ProForm/components/base/RangePicker/index.js +24 -29
  56. package/es/ProForm/components/base/RangePicker/useDateRange.js +3 -3
  57. package/es/ProForm/components/base/Select/index.js +17 -15
  58. package/es/ProForm/components/base/Switch/index.js +16 -15
  59. package/es/ProForm/components/base/SwitchCheckbox/index.js +19 -18
  60. package/es/ProForm/components/base/TextArea/index.js +18 -17
  61. package/es/ProForm/components/base/TimePicker/index.js +10 -9
  62. package/es/ProForm/components/combination/Container/index.js +25 -23
  63. package/es/ProForm/components/combination/FormList/components/ActionButton.js +80 -92
  64. package/es/ProForm/components/combination/FormList/components/BlockFields.js +21 -19
  65. package/es/ProForm/components/combination/FormList/components/BlockTitle.js +7 -7
  66. package/es/ProForm/components/combination/FormList/components/Empty.js +21 -20
  67. package/es/ProForm/components/combination/FormList/components/LineFields.js +19 -18
  68. package/es/ProForm/components/combination/FormList/components/ToolbarButton.js +45 -51
  69. package/es/ProForm/components/combination/FormList/index.js +43 -51
  70. package/es/ProForm/components/combination/FormList/utils.js +9 -9
  71. package/es/ProForm/components/combination/Group/component/AddonWrapper/index.js +8 -6
  72. package/es/ProForm/components/combination/Group/component/ComRender.js +33 -29
  73. package/es/ProForm/components/combination/Group/hooks/index.js +49 -47
  74. package/es/ProForm/components/combination/Group/index.js +38 -37
  75. package/es/ProForm/components/combination/Group/utils.js +56 -50
  76. package/es/ProForm/components/combination/ProCascader/index.js +81 -85
  77. package/es/ProForm/components/combination/ProCascader/utils/index.js +6 -6
  78. package/es/ProForm/components/combination/ProCombination/index.js +41 -37
  79. package/es/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +31 -25
  80. package/es/ProForm/components/combination/ProModalSelect/index.js +166 -173
  81. package/es/ProForm/components/combination/ProModalSelect/utils/index.js +1 -1
  82. package/es/ProForm/components/combination/ProNumberRange/index.js +46 -51
  83. package/es/ProForm/components/combination/ProNumberRange/style/index.less +5 -0
  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 -120
  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 +31 -15
  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 -60
  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.d.ts +14 -0
  256. package/lib/ProEnum/hooks/useFrequentEnumRequest.js +83 -0
  257. package/lib/ProEnum/index.js +85 -86
  258. package/lib/ProEnum/propsType.d.ts +29 -0
  259. package/lib/ProEnum/utils/eventCenter.js +23 -32
  260. package/lib/ProEnum/utils/frequentEnum.d.ts +40 -0
  261. package/lib/ProEnum/utils/frequentEnum.js +99 -0
  262. package/lib/ProEnum/utils/getEnumLabel.js +15 -21
  263. package/lib/ProEnum/utils/index.js +12 -7
  264. package/lib/ProForm/components/Container.js +7 -5
  265. package/lib/ProForm/components/FormFooter/index.js +19 -17
  266. package/lib/ProForm/components/base/Checkbox/index.js +14 -13
  267. package/lib/ProForm/components/base/DatePicker/index.js +20 -17
  268. package/lib/ProForm/components/base/Input/index.js +15 -15
  269. package/lib/ProForm/components/base/InputNumber/index.js +51 -48
  270. package/lib/ProForm/components/base/Radio/index.js +13 -13
  271. package/lib/ProForm/components/base/RangePicker/index.js +19 -22
  272. package/lib/ProForm/components/base/RangePicker/useDateRange.js +5 -4
  273. package/lib/ProForm/components/base/Select/index.js +14 -12
  274. package/lib/ProForm/components/base/Switch/index.js +11 -11
  275. package/lib/ProForm/components/base/SwitchCheckbox/index.js +16 -15
  276. package/lib/ProForm/components/base/TextArea/index.js +14 -13
  277. package/lib/ProForm/components/base/TimePicker/index.js +6 -5
  278. package/lib/ProForm/components/combination/Container/index.js +22 -21
  279. package/lib/ProForm/components/combination/FormList/components/ActionButton.js +77 -89
  280. package/lib/ProForm/components/combination/FormList/components/BlockFields.js +17 -15
  281. package/lib/ProForm/components/combination/FormList/components/BlockTitle.js +7 -7
  282. package/lib/ProForm/components/combination/FormList/components/Empty.js +17 -18
  283. package/lib/ProForm/components/combination/FormList/components/LineFields.js +14 -14
  284. package/lib/ProForm/components/combination/FormList/components/ToolbarButton.js +43 -48
  285. package/lib/ProForm/components/combination/FormList/index.js +35 -43
  286. package/lib/ProForm/components/combination/FormList/utils.js +11 -10
  287. package/lib/ProForm/components/combination/Group/component/AddonWrapper/index.js +7 -5
  288. package/lib/ProForm/components/combination/Group/component/ComRender.js +30 -28
  289. package/lib/ProForm/components/combination/Group/hooks/index.js +48 -45
  290. package/lib/ProForm/components/combination/Group/index.js +34 -35
  291. package/lib/ProForm/components/combination/Group/utils.js +62 -50
  292. package/lib/ProForm/components/combination/ProCascader/index.js +75 -80
  293. package/lib/ProForm/components/combination/ProCascader/utils/index.js +8 -7
  294. package/lib/ProForm/components/combination/ProCombination/index.js +35 -31
  295. package/lib/ProForm/components/combination/ProModalSelect/hooks/useRequestList.js +30 -24
  296. package/lib/ProForm/components/combination/ProModalSelect/index.js +171 -180
  297. package/lib/ProForm/components/combination/ProModalSelect/utils/index.js +3 -2
  298. package/lib/ProForm/components/combination/ProNumberRange/index.js +42 -48
  299. package/lib/ProForm/components/combination/ProNumberRange/style/index.less +5 -0
  300. package/lib/ProForm/components/combination/ProRangeLimit/index.js +35 -35
  301. package/lib/ProForm/components/combination/ProTimeLimit/hooks/useControlled.js +3 -3
  302. package/lib/ProForm/components/combination/ProTimeLimit/index.js +37 -34
  303. package/lib/ProForm/components/index.d.ts +1 -0
  304. package/lib/ProForm/components/old/EnumSelect/hooks/useRequestList.js +35 -33
  305. package/lib/ProForm/components/old/EnumSelect/index.js +50 -58
  306. package/lib/ProForm/components/old/InputRange/index.js +16 -16
  307. package/lib/ProForm/components/old/InputWithSuffix/index.js +4 -4
  308. package/lib/ProForm/components/old/ProAddress/index.js +53 -75
  309. package/lib/ProForm/components/old/ProCertNo/index.js +16 -17
  310. package/lib/ProForm/components/old/ProCertValidity/index.js +17 -18
  311. package/lib/ProForm/components/old/ProRangeBox/index.js +24 -24
  312. package/lib/ProForm/components/render/ChangedWrapper.js +35 -35
  313. package/lib/ProForm/components/render/ConfirmWrapper.js +14 -17
  314. package/lib/ProForm/components/render/Render.js +138 -125
  315. package/lib/ProForm/components/render/RenderFields.js +57 -43
  316. package/lib/ProForm/components/render/propsType.js +26 -1
  317. package/lib/ProForm/index.js +74 -61
  318. package/lib/ProForm/propsType.d.ts +1 -1
  319. package/lib/ProForm/propsType.js +5 -1
  320. package/lib/ProForm/utils/diffOriginal.js +30 -17
  321. package/lib/ProForm/utils/getDefaultProps.js +12 -12
  322. package/lib/ProForm/utils/index.js +127 -106
  323. package/lib/ProForm/utils/processDependencies.js +15 -6
  324. package/lib/ProForm/utils/rulesCreator.js +21 -21
  325. package/lib/ProForm/utils/transformNames.js +6 -6
  326. package/lib/ProForm/utils/transformValue.js +14 -11
  327. package/lib/ProForm/utils/useDeepCompareMemo.js +7 -6
  328. package/lib/ProForm/utils/useFieldProps.js +2 -3
  329. package/lib/ProForm/utils/useForm.js +33 -31
  330. package/lib/ProForm/utils/useRules.js +25 -28
  331. package/lib/ProForm/utils/useShouldUpdate.js +82 -85
  332. package/lib/ProForm/utils/useWatch.js +36 -14
  333. package/lib/ProForm/utils/valueType.js +52 -52
  334. package/lib/ProIcon/config/index.js +2 -0
  335. package/lib/ProIcon/index.js +47 -44
  336. package/lib/ProIcon/utils/index.js +10 -8
  337. package/lib/ProLayout/components/Layout/Header/index.js +10 -10
  338. package/lib/ProLayout/components/Layout/Icon/Icon.js +8 -7
  339. package/lib/ProLayout/components/Layout/Menu/FoldMenu/index.js +37 -36
  340. package/lib/ProLayout/components/Layout/Menu/OpenMenu/index.js +49 -52
  341. package/lib/ProLayout/components/Layout/Menu/SideMenu/index.js +8 -8
  342. package/lib/ProLayout/components/Layout/Menu/index.js +17 -16
  343. package/lib/ProLayout/components/Layout/Notice/index.js +8 -8
  344. package/lib/ProLayout/components/ProCollapse/index.js +32 -30
  345. package/lib/ProLayout/components/ProFooter/index.js +14 -16
  346. package/lib/ProLayout/components/ProHeader/components/Copy/index.js +7 -7
  347. package/lib/ProLayout/components/ProHeader/components/ProBackBtn/index.js +6 -7
  348. package/lib/ProLayout/components/ProHeader/index.js +131 -120
  349. package/lib/ProLayout/components/ProHeader/utils/index.js +3 -2
  350. package/lib/ProLayout/index.d.ts +1 -1
  351. package/lib/ProLayout/index.js +22 -21
  352. package/lib/ProLayout/utils/index.js +42 -33
  353. package/lib/ProSelect/components/AdaptiveTooltip.js +9 -11
  354. package/lib/ProSelect/index.js +82 -93
  355. package/lib/ProSelect/utils/index.js +29 -34
  356. package/lib/ProStep/components/Anchor/index.d.ts +1 -0
  357. package/lib/ProStep/components/Anchor/index.js +25 -24
  358. package/lib/ProStep/components/Item/index.d.ts +1 -0
  359. package/lib/ProStep/components/Item/index.js +24 -20
  360. package/lib/ProStep/components/Listener/index.js +9 -13
  361. package/lib/ProStep/components/Step/index.js +20 -21
  362. package/lib/ProStep/index.js +45 -49
  363. package/lib/ProStep/utils/index.js +16 -12
  364. package/lib/ProStepTab/index.js +60 -38
  365. package/lib/ProTable/components/FormatColumn/index.js +100 -104
  366. package/lib/ProTable/components/RcTable/components/BaseTable/index.js +5 -7
  367. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/index.js +34 -48
  368. package/lib/ProTable/components/RcTable/components/DraggableTable/components/DndWrapper/utils/index.js +25 -23
  369. package/lib/ProTable/components/RcTable/components/DraggableTable/index.js +5 -7
  370. package/lib/ProTable/components/RenderColumn/index.js +46 -48
  371. package/lib/ProTable/components/RenderEmptyText/index.js +6 -6
  372. package/lib/ProTable/components/RenderFooter/index.js +3 -3
  373. package/lib/ProTable/components/RenderSummary/index.js +11 -12
  374. package/lib/ProTable/components/RenderTableHeader/index.js +14 -13
  375. package/lib/ProTable/components/RenderTabs/index.js +27 -32
  376. package/lib/ProTable/components/TableResizable/index.js +16 -15
  377. package/lib/ProTable/components/TooltipTitle/index.js +5 -5
  378. package/lib/ProTable/hooks/useAntdTable.js +103 -116
  379. package/lib/ProTable/index.js +149 -169
  380. package/lib/ProTable/utils/index.js +33 -22
  381. package/lib/ProTabs/components/Card/index.js +14 -14
  382. package/lib/ProTabs/index.js +24 -24
  383. package/lib/ProThemeTools/component/ProTools/index.js +66 -65
  384. package/lib/ProThemeTools/index.js +43 -29
  385. package/lib/ProThemeTools/utils/index.js +25 -18
  386. package/lib/ProTooltip/index.js +44 -46
  387. package/lib/ProTree/components/AdaptiveTooltip.js +5 -7
  388. package/lib/ProTree/components/CloseIcon.js +5 -5
  389. package/lib/ProTree/components/List.js +18 -22
  390. package/lib/ProTree/components/ProTree.js +77 -96
  391. package/lib/ProTree/components/ProTreeSelect/index.js +126 -117
  392. package/lib/ProTree/components/SearchTitle.js +8 -8
  393. package/lib/ProTree/components/Tree.js +53 -55
  394. package/lib/ProTree/index.js +4 -4
  395. package/lib/ProTree/utils.js +34 -25
  396. package/lib/ProTreeModal/components/Cascader.js +28 -32
  397. package/lib/ProTreeModal/components/CloseIcon.js +5 -5
  398. package/lib/ProTreeModal/components/List.js +69 -89
  399. package/lib/ProTreeModal/components/SearchTitle.js +4 -4
  400. package/lib/ProTreeModal/components/SortableItem.js +11 -12
  401. package/lib/ProTreeModal/components/Tree.js +44 -49
  402. package/lib/ProTreeModal/components/Trigger.js +26 -26
  403. package/lib/ProTreeModal/index.js +157 -199
  404. package/lib/ProTreeModal/utils.js +43 -35
  405. package/lib/ProUpload/components/ButtonRender.js +29 -33
  406. package/lib/ProUpload/components/DragRender.js +50 -48
  407. package/lib/ProUpload/components/DraggableUploadListItem.js +7 -5
  408. package/lib/ProUpload/components/Example.js +13 -11
  409. package/lib/ProUpload/components/FileItem.js +58 -50
  410. package/lib/ProUpload/components/ImageRender.js +89 -93
  411. package/lib/ProUpload/index.js +68 -76
  412. package/lib/ProUpload/uitls.js +5 -3
  413. package/lib/ProUtils/utils/index.js +10 -14
  414. package/lib/ProViewer/index.js +26 -24
  415. package/lib/ProViewer/propsType.js +1 -5
  416. package/lib/ProWaterMark/index.js +5 -4
  417. package/lib/index.d.ts +1 -1
  418. package/lib/locale/index.js +6 -2
  419. package/lib/old/ProCertValidity/index.js +17 -18
  420. package/lib/old/ProEditableTable/index.js +153 -156
  421. package/lib/old/ProEditableTable/utils.js +61 -62
  422. package/lib/tokens.js +1 -0
  423. package/lib/utils/index.js +16 -13
  424. package/package.json +8 -8
  425. package/dist/index.esm.css +0 -6338
  426. package/dist/index.esm.js +0 -3
  427. package/dist/less.esm.css +0 -5762
  428. package/dist/less.esm.js +0 -3
  429. package/tests/__mocks__/fileMock.js +0 -1
  430. package/tests/__mocks__/zatUtils.js +0 -27
  431. package/tests/setup.ts +0 -477
  432. package/tests/test-utils.tsx +0 -81
@@ -12,17 +12,13 @@ require("antd/es/input/style");
12
12
  var _input = _interopRequireDefault(require("antd/es/input"));
13
13
  require("antd/es/checkbox/style");
14
14
  var _checkbox = _interopRequireDefault(require("antd/es/checkbox"));
15
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
16
- var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
17
15
  require("antd/es/message/style");
18
16
  var _message2 = _interopRequireDefault(require("antd/es/message"));
19
17
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
20
18
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
21
- var _isFunction2 = _interopRequireDefault(require("lodash/isFunction"));
22
- var _cloneDeep2 = _interopRequireDefault(require("lodash/cloneDeep"));
23
- var _jsxRuntime = require("react/jsx-runtime");
24
19
  var _react = _interopRequireWildcard(require("react"));
25
20
  var _ahooks = require("ahooks");
21
+ var _lodash = require("lodash");
26
22
  var _reactSvg = require("react-svg");
27
23
  var _classnames = _interopRequireDefault(require("classnames"));
28
24
  var _index = require("../index");
@@ -32,10 +28,11 @@ var _index2 = require("../ProTable/components/RcTable/components/DraggableTable/
32
28
  var _inputSearch = _interopRequireDefault(require("../assets/input-search.svg"));
33
29
  var _locale = _interopRequireWildcard(require("../locale"));
34
30
  require("./style/index.less");
31
+ var _jsxRuntime = require("react/jsx-runtime");
35
32
  var LIST = 'LIST';
36
33
  var TREE = 'TREE';
37
34
  var CASCADER = exports.CASCADER = 'CASCADER';
38
- var ProTreeModal = function ProTreeModal(props) {
35
+ var ProTreeModal = props => {
39
36
  var _locale$ProTreeModal, _props$otherProps, _props$otherProps2, _locale$ProTreeModal9, _locale$ProTreeModal10, _locale$ProTreeModal11, _locale$ProTreeModal12;
40
37
  var _useProConfig = (0, _index.useProConfig)('ProEnum'),
41
38
  _useProConfig$dics = _useProConfig.dics,
@@ -50,7 +47,7 @@ var ProTreeModal = function ProTreeModal(props) {
50
47
  mode = _props$mode === void 0 ? 'tree' : _props$mode,
51
48
  enumCode = props.code,
52
49
  _props$title = props.title,
53
- title = _props$title === void 0 ? _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProTreeModal = _locale.default.ProTreeModal) === null || _locale$ProTreeModal === void 0 ? void 0 : _locale$ProTreeModal.select : _props$title,
50
+ title = _props$title === void 0 ? _locale.default === null || _locale.default === void 0 || (_locale$ProTreeModal = _locale.default.ProTreeModal) === null || _locale$ProTreeModal === void 0 ? void 0 : _locale$ProTreeModal.select : _props$title,
54
51
  useRequest = props.useRequest,
55
52
  _props$showCodeName = props.showCodeName,
56
53
  showCodeName = _props$showCodeName === void 0 ? false : _props$showCodeName,
@@ -75,9 +72,9 @@ var ProTreeModal = function ProTreeModal(props) {
75
72
  children: 'children'
76
73
  } : _props$fieldNames,
77
74
  _props$disabled = props.disabled,
78
- disabled = _props$disabled === void 0 ? props.disabled || props.isView || (props === null || props === void 0 ? void 0 : (_props$otherProps = props.otherProps) === null || _props$otherProps === void 0 ? void 0 : _props$otherProps.isView) || false : _props$disabled,
75
+ disabled = _props$disabled === void 0 ? props.disabled || props.isView || (props === null || props === void 0 || (_props$otherProps = props.otherProps) === null || _props$otherProps === void 0 ? void 0 : _props$otherProps.isView) || false : _props$disabled,
79
76
  _props$isView = props.isView,
80
- isView = _props$isView === void 0 ? props.isView || (props === null || props === void 0 ? void 0 : (_props$otherProps2 = props.otherProps) === null || _props$otherProps2 === void 0 ? void 0 : _props$otherProps2.isView) || false : _props$isView,
77
+ isView = _props$isView === void 0 ? props.isView || (props === null || props === void 0 || (_props$otherProps2 = props.otherProps) === null || _props$otherProps2 === void 0 ? void 0 : _props$otherProps2.isView) || false : _props$isView,
81
78
  transformResponse = props.transformResponse,
82
79
  optionRender = props.optionRender,
83
80
  openChange = props.openChange,
@@ -94,6 +91,7 @@ var ProTreeModal = function ProTreeModal(props) {
94
91
  open: false,
95
92
  checkedValues: [],
96
93
  beforeClearAllValues: [],
94
+ // 点击清空全部并点击关闭、此时数据回显示不正确
97
95
  treeData: [],
98
96
  treeViewData: [],
99
97
  originalTreeData: [],
@@ -108,7 +106,7 @@ var ProTreeModal = function ProTreeModal(props) {
108
106
  setState = _useSetState2[1];
109
107
  var fetchFunction = (0, _ahooks.useRequest)(useRequest === null || useRequest === void 0 ? void 0 : useRequest.service, (0, _objectSpread2.default)({
110
108
  manual: true,
111
- onSuccess: function onSuccess(res) {
109
+ onSuccess: res => {
112
110
  var _res$status = res.status,
113
111
  status = _res$status === void 0 ? 200 : _res$status,
114
112
  msg = res.message;
@@ -129,35 +127,35 @@ var ProTreeModal = function ProTreeModal(props) {
129
127
  },
130
128
  debounceWait: 300
131
129
  }, useRequest === null || useRequest === void 0 ? void 0 : useRequest.options));
132
- (0, _ahooks.useDeepCompareEffect)(function () {
130
+ (0, _ahooks.useDeepCompareEffect)(() => {
133
131
  if (dataSource && dataSource.length) {
134
132
  setState({
135
133
  treeData: dataSource,
136
- originalTreeData: (0, _cloneDeep2.default)(dataSource),
134
+ originalTreeData: (0, _lodash.cloneDeep)(dataSource),
137
135
  flatTreeData: (0, _utils.getFlatTreeData)(dataSource, fieldNames),
138
136
  allKeys: (0, _utils.getAllKeys)(dataSource, fieldNames)
139
137
  });
140
138
  } else if (enumCode) {
141
139
  var dictEnum = dics[enumCode] || [];
142
140
  // transform dictEnum
143
- if (transformResponse && (0, _isFunction2.default)(transformResponse)) {
141
+ if (transformResponse && (0, _lodash.isFunction)(transformResponse)) {
144
142
  dictEnum = transformResponse(dictEnum);
145
143
  }
146
144
  // check dictEnum isArray
147
145
  if (!dictEnum || !Array.isArray(dictEnum)) {
148
146
  var _locale$ProTreeModal2;
149
- console.error(_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProTreeModal2 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal2 === void 0 ? void 0 : _locale$ProTreeModal2.errorArrayMessage);
147
+ console.error(_locale.default === null || _locale.default === void 0 || (_locale$ProTreeModal2 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal2 === void 0 ? void 0 : _locale$ProTreeModal2.errorArrayMessage);
150
148
  dictEnum = [];
151
149
  }
152
150
  setState({
153
151
  treeData: dictEnum,
154
- originalTreeData: (0, _cloneDeep2.default)(dictEnum),
152
+ originalTreeData: (0, _lodash.cloneDeep)(dictEnum),
155
153
  flatTreeData: (0, _utils.getFlatTreeData)(dictEnum, fieldNames),
156
154
  allKeys: (0, _utils.getAllKeys)(dictEnum, fieldNames)
157
155
  });
158
156
  }
159
157
  }, [dataSource, enumCode]);
160
- (0, _ahooks.useDeepCompareEffect)(function () {
158
+ (0, _ahooks.useDeepCompareEffect)(() => {
161
159
  if (enumCode) {
162
160
  return undefined;
163
161
  }
@@ -174,12 +172,12 @@ var ProTreeModal = function ProTreeModal(props) {
174
172
  // 执行用户配置的枚举服务,拉取枚举数据进行更新
175
173
  fetchFunction.run(params);
176
174
  }, [useRequest === null || useRequest === void 0 ? void 0 : useRequest.options]);
177
- (0, _react.useEffect)(function () {
175
+ (0, _react.useEffect)(() => {
178
176
  setState({
179
- open: open
177
+ open
180
178
  });
181
179
  }, [open]);
182
- (0, _react.useEffect)(function () {
180
+ (0, _react.useEffect)(() => {
183
181
  if (value) {
184
182
  var checkedValues = [];
185
183
  var treeData = state.treeData,
@@ -188,9 +186,7 @@ var ProTreeModal = function ProTreeModal(props) {
188
186
  var treeViewData = [];
189
187
  if (allValue && typeof value === 'string' && allValue === value) {
190
188
  if (modeType === LIST) {
191
- checkedValues = treeData.map(function (item) {
192
- return item[fieldNameValue];
193
- }) || [];
189
+ checkedValues = treeData.map(item => item[fieldNameValue]) || [];
194
190
  } else if (modeType === TREE) {
195
191
  checkedValues = allKeys;
196
192
  }
@@ -201,54 +197,49 @@ var ProTreeModal = function ProTreeModal(props) {
201
197
  }
202
198
  // 开启 labelInValue [{ label:xx, value: ""}] 形式、需要取出来 value
203
199
  if (labelInValue) {
204
- var isObjectArray = value.every(function (element) {
205
- return (0, _typeof2.default)(element) === 'object' && element !== null;
206
- });
200
+ var isObjectArray = value.every(element => typeof element === 'object' && element !== null);
207
201
  if (!isObjectArray) {
208
202
  console.error('Please enter an array object');
209
203
  checkedValues = [];
210
204
  }
211
- checkedValues = value.map(function (item) {
212
- return item[fieldNameValue];
213
- });
205
+ checkedValues = value.map(item => item[fieldNameValue]);
214
206
  } else {
215
207
  checkedValues = value;
216
208
  }
217
209
  }
218
210
  treeViewData = (0, _utils.filterCheckedNodes)(originalTreeData, checkedValues, '', fieldNames);
219
211
  setState({
220
- checkedValues: checkedValues,
212
+ checkedValues,
221
213
  checkAll: checkedValues.length === allKeys.length,
222
- treeViewData: treeViewData,
214
+ treeViewData,
223
215
  beforeClearAllValues: checkedValues
224
216
  });
225
217
  }
226
218
  }, [value, state.allKeys, state.open]);
227
- (0, _ahooks.useDeepCompareEffect)(function () {
219
+ (0, _ahooks.useDeepCompareEffect)(() => {
228
220
  var transformedTree = (0, _utils.addLevelAndParentId)(state.treeData, fieldNames);
229
221
  setState({
230
- transformedTree: transformedTree
222
+ transformedTree
231
223
  });
232
224
  }, [state.treeData]);
233
- var handleClick = function handleClick() {
225
+ var handleClick = () => {
234
226
  setState({
235
227
  open: true
236
228
  });
237
- openChange === null || openChange === void 0 ? void 0 : openChange(true);
229
+ openChange === null || openChange === void 0 || openChange(true);
238
230
  };
231
+
239
232
  /**
240
233
  * close Drawer and onChange(values)
241
234
  */
242
- var handleFinish = function handleFinish() {
235
+ var handleFinish = () => {
243
236
  // 全选的时候返回 allValue 标记即可
244
237
  // 3.3.2 版本全选的时候返回所有值的合集 list
245
238
  if (allValue !== undefined && state.checkAll && !draggable) {
246
239
  if (labelInValue) {
247
- onChange === null || onChange === void 0 ? void 0 : onChange(state.flatTreeData);
240
+ onChange === null || onChange === void 0 || onChange(state.flatTreeData);
248
241
  } else {
249
- onChange === null || onChange === void 0 ? void 0 : onChange(state.flatTreeData.map(function (item) {
250
- return item[fieldNameValue];
251
- }));
242
+ onChange === null || onChange === void 0 || onChange(state.flatTreeData.map(item => item[fieldNameValue]));
252
243
  }
253
244
  } else if (draggable && span) {
254
245
  var _listRef$current;
@@ -258,10 +249,8 @@ var ProTreeModal = function ProTreeModal(props) {
258
249
  } else {
259
250
  var values = [];
260
251
  if (labelInValue) {
261
- state.checkedValues.forEach(function (val) {
262
- var option = state.flatTreeData.find(function (item) {
263
- return item[fieldNameValue] === val;
264
- });
252
+ state.checkedValues.forEach(val => {
253
+ var option = state.flatTreeData.find(item => item[fieldNameValue] === val);
265
254
  option && values.push(option);
266
255
  });
267
256
  } else {
@@ -270,75 +259,69 @@ var ProTreeModal = function ProTreeModal(props) {
270
259
  if (min) {
271
260
  if (values.length < min) {
272
261
  var _locale$ProTreeModal3;
273
- _message2.default.error((0, _locale.formatMessage)(_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProTreeModal3 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal3 === void 0 ? void 0 : _locale$ProTreeModal3.selectMin, {
274
- min: min
262
+ _message2.default.error((0, _locale.formatMessage)(_locale.default === null || _locale.default === void 0 || (_locale$ProTreeModal3 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal3 === void 0 ? void 0 : _locale$ProTreeModal3.selectMin, {
263
+ min
275
264
  }));
276
265
  return;
277
266
  }
278
267
  }
279
- onChange === null || onChange === void 0 ? void 0 : onChange(values);
268
+ onChange === null || onChange === void 0 || onChange(values);
280
269
  }
281
270
  // fix: 当有 openChange 时候、点击确定应该由关闭 openChange 控制
282
271
  if (!openChange || open === undefined) {
283
272
  setState({
284
273
  open: false
285
274
  });
286
- openChange === null || openChange === void 0 ? void 0 : openChange(false);
275
+ openChange === null || openChange === void 0 || openChange(false);
287
276
  }
288
277
  if (openChange && open !== undefined) {
289
- openChange === null || openChange === void 0 ? void 0 : openChange(true);
278
+ openChange === null || openChange === void 0 || openChange(true);
290
279
  }
291
280
  };
281
+
292
282
  /**
293
283
  * clear all checked
294
284
  */
295
- var handleClearAll = function handleClearAll() {
285
+ var handleClearAll = () => {
296
286
  var _state$flatTreeData$f;
297
287
  // 处理 ProTable 场景下 disabled 的不需要被清理
298
- var _checkedValues = span ? (_state$flatTreeData$f = state.flatTreeData.filter(function (item) {
299
- return item.disabled;
300
- })) === null || _state$flatTreeData$f === void 0 ? void 0 : _state$flatTreeData$f.map(function (item) {
301
- return item[fieldNameValue];
302
- }) : [];
303
- onChange === null || onChange === void 0 ? void 0 : onChange([]);
288
+ var _checkedValues = span ? (_state$flatTreeData$f = state.flatTreeData.filter(item => item.disabled)) === null || _state$flatTreeData$f === void 0 ? void 0 : _state$flatTreeData$f.map(item => item[fieldNameValue]) : [];
289
+ onChange === null || onChange === void 0 || onChange([]);
304
290
  setState({
305
291
  checkedValues: _checkedValues,
306
292
  beforeClearAllValues: state.checkedValues,
293
+ // 把清空全部之前的数据记录下
307
294
  treeViewData: [],
308
295
  checkAll: false
309
296
  });
310
297
  };
298
+
311
299
  /**
312
300
  * Drawer close
313
301
  */
314
- var handleClose = function handleClose() {
302
+ var handleClose = () => {
315
303
  setState({
316
304
  open: false,
317
305
  checkedValues: state.beforeClearAllValues,
318
306
  beforeClearAllValues: []
319
307
  });
320
308
  // onChange?.(state.beforeClearAllValues);
321
- openChange === null || openChange === void 0 ? void 0 : openChange(false);
309
+ openChange === null || openChange === void 0 || openChange(false);
322
310
  };
311
+
323
312
  /**
324
313
  * checkbox/list selected change values
325
314
  * @param values
326
315
  */
327
- var handleListCheckChange = function handleListCheckChange(e, code) {
328
- var checkedValues = (0, _toConsumableArray2.default)(state.checkedValues);
316
+ var handleListCheckChange = (e, code) => {
317
+ var checkedValues = [...state.checkedValues];
329
318
  var checked = e.target.checked;
330
319
  if (!checked) {
331
- checkedValues = checkedValues.filter(function (value) {
332
- return value !== code;
333
- });
320
+ checkedValues = checkedValues.filter(value => value !== code);
334
321
  } else if (draggable && span) {
335
322
  // 固定在右侧的情况
336
- var fixedOption = state.flatTreeData.find(function (item) {
337
- return item.fixed === 'right';
338
- }) || {};
339
- var fixedIdx = checkedValues.findIndex(function (value) {
340
- return value === fixedOption[fieldNameValue];
341
- });
323
+ var fixedOption = state.flatTreeData.find(item => item.fixed === 'right') || {};
324
+ var fixedIdx = checkedValues.findIndex(value => value === fixedOption[fieldNameValue]);
342
325
  if (fixedIdx >= 0) {
343
326
  checkedValues.splice(fixedIdx, 0, code);
344
327
  } else {
@@ -350,57 +333,50 @@ var ProTreeModal = function ProTreeModal(props) {
350
333
  if (max && checkedValues.length > max) {
351
334
  var _locale$ProTreeModal4;
352
335
  _message2.default.error(maxMessage ? (0, _utils.transformMessage)({
353
- max: max
354
- }, maxMessage) : (0, _locale.formatMessage)(_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProTreeModal4 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal4 === void 0 ? void 0 : _locale$ProTreeModal4.selectMax, {
355
- max: max
336
+ max
337
+ }, maxMessage) : (0, _locale.formatMessage)(_locale.default === null || _locale.default === void 0 || (_locale$ProTreeModal4 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal4 === void 0 ? void 0 : _locale$ProTreeModal4.selectMax, {
338
+ max
356
339
  }));
357
340
  return;
358
341
  }
359
342
  setState({
360
- checkedValues: checkedValues,
343
+ checkedValues,
361
344
  checkAll: checkedValues.length === state.flatTreeData.length
362
345
  });
363
346
  };
364
- var handleDragEndChange = function handleDragEndChange(checkedValues) {
347
+ var handleDragEndChange = checkedValues => {
365
348
  setState({
366
- checkedValues: checkedValues
349
+ checkedValues
367
350
  });
368
351
  };
369
- var onCheck = function onCheck(checkedKeys, info) {
370
- var checkedValues = (0, _toConsumableArray2.default)(state.checkedValues);
352
+ var onCheck = (checkedKeys, info) => {
353
+ var checkedValues = [...state.checkedValues];
371
354
  var originalTreeData = state.originalTreeData;
355
+
372
356
  // 如果有检索则自管理
373
357
  if (state.searchStr) {
374
358
  var _transformTreeToArray;
375
359
  var node = info.node;
376
360
  // 从完整树中找到当前节点
377
- var activeNode = (0, _index2.treeNodeFind)(state.transformedTree, function (t) {
378
- return t[fieldNameValue] === node[fieldNameValue];
379
- }, {
361
+ var activeNode = (0, _index2.treeNodeFind)(state.transformedTree, t => t[fieldNameValue] === node[fieldNameValue], {
380
362
  childrenKey: fieldNames.children
381
363
  });
382
364
  var allChildren = (_transformTreeToArray = (0, _index2.transformTreeToArray)([activeNode], {
383
365
  childrenKey: fieldNames.children
384
- })) === null || _transformTreeToArray === void 0 ? void 0 : _transformTreeToArray.map(function (item) {
385
- return item[fieldNameValue];
386
- });
366
+ })) === null || _transformTreeToArray === void 0 ? void 0 : _transformTreeToArray.map(item => item[fieldNameValue]);
387
367
  // 子项合并勾选
388
368
  checkedValues = checkedValues.concat(allChildren);
389
369
  // 从完整树中拿到父节点 只要存在父节点,那么就判断当前children是否全被勾选 若全被勾选就合并当前key到勾选队列
390
- var _recourse2 = function _recourse(findNode) {
370
+ var _recourse = findNode => {
391
371
  if (findNode.parentId) {
392
372
  var _transformTreeToArray2;
393
- var parentNode = (0, _index2.treeNodeFind)(state.transformedTree, function (t) {
394
- return t[fieldNameValue] === findNode.parentId;
395
- }, {
373
+ var parentNode = (0, _index2.treeNodeFind)(state.transformedTree, t => t[fieldNameValue] === findNode.parentId, {
396
374
  childrenKey: fieldNames.children
397
375
  });
398
376
  var parentChildrenKeys = (_transformTreeToArray2 = (0, _index2.transformTreeToArray)([parentNode], {
399
377
  childrenKey: fieldNames.children
400
- })) === null || _transformTreeToArray2 === void 0 ? void 0 : _transformTreeToArray2.map(function (item) {
401
- return item[fieldNameValue];
402
- });
403
- var parentChildrenAllChecked = parentChildrenKeys.every(function (key) {
378
+ })) === null || _transformTreeToArray2 === void 0 ? void 0 : _transformTreeToArray2.map(item => item[fieldNameValue]);
379
+ var parentChildrenAllChecked = parentChildrenKeys.every(key => {
404
380
  return checkedValues.includes(key);
405
381
  });
406
382
  if (parentChildrenAllChecked) {
@@ -408,133 +384,120 @@ var ProTreeModal = function ProTreeModal(props) {
408
384
  checkedValues = checkedValues.concat([parentNode[fieldNameValue]]);
409
385
  // 继续向上查找
410
386
  if (parentNode.parentId) {
411
- _recourse2(parentNode);
387
+ _recourse(parentNode);
412
388
  }
413
389
  }
414
390
  }
415
391
  };
416
- _recourse2(activeNode);
392
+ _recourse(activeNode);
417
393
  }
418
394
  var _checkStrictly = state.searchStr ? true : checkStrictly;
395
+
419
396
  // 此时应该取消掉自身并包含它所有的子集
420
397
  if (!info.checked && !_checkStrictly) {
421
398
  // 1. 取消自身
422
399
  // 2. 把所有的子节点也要取消
423
400
  var childrenkeys = [];
424
401
  (0, _utils.getChildrenKeys)(info.node, childrenkeys, fieldNames, 'treeCheck');
425
- checkedValues = checkedValues.filter(function (key) {
426
- return !childrenkeys.includes(key);
427
- });
402
+ checkedValues = checkedValues.filter(key => !childrenkeys.includes(key));
403
+
428
404
  // 3. 取消父节点
429
405
  var parentNodes = (0, _utils.findTreeNodeByKey)(originalTreeData, info.node.key, fieldNames);
430
- var parentKeys = parentNodes.reduce(function (prev, curr) {
431
- return prev.concat(curr[fieldNameValue]);
432
- }, []);
433
- checkedValues = checkedValues.filter(function (key) {
434
- return !parentKeys.includes(key);
435
- });
406
+ var parentKeys = parentNodes.reduce((prev, curr) => prev.concat(curr[fieldNameValue]), []);
407
+ checkedValues = checkedValues.filter(key => !parentKeys.includes(key));
436
408
  } else {
437
409
  // _checkStrictly 模式下取 checkedKeys.checked 或者自身的 key
438
410
  if (_checkStrictly) {
439
411
  if (!info.checked) {
440
- checkedValues = checkedValues.filter(function (key) {
441
- return key !== info.node.key;
442
- });
412
+ checkedValues = checkedValues.filter(key => key !== info.node.key);
443
413
  }
444
414
  checkedKeys = checkedKeys.checked || [];
445
415
  }
446
- checkedKeys.forEach(function (key) {
416
+ checkedKeys.forEach(key => {
447
417
  var exist = checkedValues.includes(key);
448
418
  if (info.checked && !exist) {
449
419
  checkedValues.push(key);
450
420
  }
451
421
  });
452
422
  }
423
+
453
424
  // 根据选中的筛选出 viewTreeData
454
425
  var treeViewData = [];
455
426
  if (!checkStrictly) {
456
427
  treeViewData = (0, _utils.filterCheckedNodes)(originalTreeData, checkedValues, '', fieldNames);
457
428
  } else {
458
- treeViewData = state.flatTreeData.filter(function (item) {
429
+ treeViewData = state.flatTreeData.filter(item => {
459
430
  return checkedValues.includes(item[fieldNameValue]);
460
431
  });
461
432
  }
462
433
  if (max && checkedValues.length > max) {
463
434
  var _locale$ProTreeModal5;
464
435
  _message2.default.error(maxMessage ? (0, _utils.transformMessage)({
465
- max: max
466
- }, maxMessage) : (0, _locale.formatMessage)(_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProTreeModal5 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal5 === void 0 ? void 0 : _locale$ProTreeModal5.selectMax, {
467
- max: max
436
+ max
437
+ }, maxMessage) : (0, _locale.formatMessage)(_locale.default === null || _locale.default === void 0 || (_locale$ProTreeModal5 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal5 === void 0 ? void 0 : _locale$ProTreeModal5.selectMax, {
438
+ max
468
439
  }));
469
440
  return;
470
441
  }
471
442
  setState({
472
- checkedValues: checkedValues,
473
- treeViewData: treeViewData,
443
+ checkedValues,
444
+ treeViewData,
474
445
  checkAll: state.allKeys.length === checkedValues.length
475
446
  });
476
447
  };
448
+
477
449
  /**
478
450
  * filter checkbox by fileNameValue
479
451
  * @param fileNameValue
480
452
  */
481
- var handleFilterClose = function handleFilterClose(fileNameValue) {
453
+ var handleFilterClose = fileNameValue => {
482
454
  setState({
483
- checkedValues: state.checkedValues.filter(function (value) {
484
- return value !== fileNameValue;
485
- }),
455
+ checkedValues: state.checkedValues.filter(value => value !== fileNameValue),
486
456
  checkAll: false
487
457
  });
488
458
  };
459
+
489
460
  /**
490
461
  * tree close
491
462
  * @param fileNamekey
492
463
  * @param node
493
464
  */
494
- var treeFilterClose = function treeFilterClose(fileNamekey, node) {
495
- var checkedValues = (0, _toConsumableArray2.default)(state.checkedValues);
465
+ var treeFilterClose = (fileNamekey, node) => {
466
+ var checkedValues = [...state.checkedValues];
496
467
  var treeViewData = [];
497
468
  var originalTreeData = state.originalTreeData;
498
469
  if (checkStrictly) {
499
- checkedValues = checkedValues.filter(function (key) {
500
- return key !== fileNamekey;
501
- });
470
+ checkedValues = checkedValues.filter(key => key !== fileNamekey);
502
471
  // handleFilterClose
503
- treeViewData = state.flatTreeData.filter(function (item) {
472
+ treeViewData = state.flatTreeData.filter(item => {
504
473
  return checkedValues.includes(item[fieldNameValue]);
505
474
  });
506
475
  } else {
507
476
  // 1. 取消自身
508
- checkedValues = checkedValues.filter(function (key) {
509
- return key !== fileNamekey;
510
- });
477
+ checkedValues = checkedValues.filter(key => key !== fileNamekey);
511
478
  // 2. 把所有的子节点也要取消
512
479
  var childrenkeys = [];
513
480
  (0, _utils.getChildrenKeys)(node, childrenkeys, fieldNames, 'treeClose');
514
- checkedValues = checkedValues.filter(function (key) {
515
- return !childrenkeys.includes(key);
516
- });
481
+ checkedValues = checkedValues.filter(key => !childrenkeys.includes(key));
482
+
517
483
  // 3. 取消父节点
518
484
  var parentNodes = (0, _utils.findTreeNodeByKey)(originalTreeData, fileNamekey, fieldNames);
519
- var parentKeys = parentNodes.reduce(function (prev, curr) {
520
- return prev.concat(curr[fieldNames.value]);
521
- }, []);
522
- checkedValues = checkedValues.filter(function (key) {
523
- return !parentKeys.includes(key);
524
- });
485
+ var parentKeys = parentNodes.reduce((prev, curr) => prev.concat(curr[fieldNames.value]), []);
486
+ checkedValues = checkedValues.filter(key => !parentKeys.includes(key));
487
+
525
488
  // 根据选中的筛选出 viewTreeData
526
489
  treeViewData = (0, _utils.filterCheckedNodes)(originalTreeData, checkedValues, '', fieldNames);
527
490
  }
528
491
  setState({
529
- checkedValues: checkedValues,
530
- treeViewData: treeViewData,
492
+ checkedValues,
493
+ treeViewData,
531
494
  checkAll: false
532
495
  });
533
496
  };
534
- var _useDebounceFn = (0, _ahooks.useDebounceFn)(function (str) {
497
+ var _useDebounceFn = (0, _ahooks.useDebounceFn)(str => {
535
498
  if (modeType === LIST || modeType === CASCADER) {
536
499
  var isCASCADER = modeType === CASCADER;
537
- var data = state.flatTreeData.filter(function (item) {
500
+ var data = state.flatTreeData.filter(item => {
538
501
  var title = isCASCADER ? item === null || item === void 0 ? void 0 : item.title : item[fieldNameLabel];
539
502
  return title.includes(str);
540
503
  });
@@ -546,47 +509,49 @@ var ProTreeModal = function ProTreeModal(props) {
546
509
  wait: 0
547
510
  }),
548
511
  onSearch = _useDebounceFn.run;
549
- var handleSetSearchStr = function handleSetSearchStr(str) {
512
+ var handleSetSearchStr = str => {
550
513
  setState({
551
514
  searchStr: str
552
515
  });
553
516
  onSearch(str);
554
517
  };
518
+
555
519
  /**
556
520
  * 指定模式下的操作
557
521
  * @param appoint
558
522
  */
559
- var appointChange = function appointChange(appoint) {
523
+ var appointChange = appoint => {
560
524
  if (appoint) {
561
- onChange === null || onChange === void 0 ? void 0 : onChange(allValue);
525
+ onChange === null || onChange === void 0 || onChange(allValue);
562
526
  setState({
563
527
  checkAll: true
564
528
  });
565
529
  } else {
566
- onChange === null || onChange === void 0 ? void 0 : onChange([]);
530
+ onChange === null || onChange === void 0 || onChange([]);
567
531
  setState({
568
532
  checkAll: false,
569
533
  open: true
570
534
  });
571
535
  if (appoint) {
572
- openChange === null || openChange === void 0 ? void 0 : openChange(true);
536
+ openChange === null || openChange === void 0 || openChange(true);
573
537
  }
574
538
  }
575
539
  };
540
+
576
541
  /**
577
542
  * Trigger the container opened by Drawer
578
543
  * default example and you can customize trigger={<Button>打开</Button>}
579
544
  * @returns
580
545
  */
581
- var TriggerComponent = (0, _react.useMemo)(function () {
546
+ var TriggerComponent = (0, _react.useMemo)(() => {
582
547
  var _props$otherProps3;
583
548
  if (trigger && /*#__PURE__*/_react.default.isValidElement(trigger)) {
584
- return (0, _jsxRuntime.jsx)("div", {
549
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
585
550
  onClick: handleClick,
586
551
  children: trigger
587
552
  });
588
553
  }
589
- return (0, _jsxRuntime.jsx)(_components.Trigger, {
554
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Trigger, {
590
555
  checkedValues: state.checkedValues,
591
556
  value: value,
592
557
  checkAll: state.checkAll,
@@ -595,39 +560,34 @@ var ProTreeModal = function ProTreeModal(props) {
595
560
  isView: isView,
596
561
  appoint: appoint,
597
562
  allValue: allValue,
598
- label: props === null || props === void 0 ? void 0 : (_props$otherProps3 = props.otherProps) === null || _props$otherProps3 === void 0 ? void 0 : _props$otherProps3.label,
563
+ label: props === null || props === void 0 || (_props$otherProps3 = props.otherProps) === null || _props$otherProps3 === void 0 ? void 0 : _props$otherProps3.label,
599
564
  handleClick: handleClick,
600
565
  handleClearAll: handleClearAll,
601
566
  appointChange: appointChange,
602
567
  appointProps: appointProps
603
568
  });
604
569
  }, [state.checkedValues, state.checkAll, style, disabled, isView, value]);
570
+
605
571
  /**
606
572
  * 全选操作
607
573
  */
608
- var handleAllCheck = function handleAllCheck(e) {
574
+ var handleAllCheck = e => {
609
575
  var checked = e.target.checked;
610
576
  var checkedValues = [];
611
577
  var treeViewData = [];
612
578
  if (modeType === LIST || modeType === CASCADER) {
613
579
  if (checked) {
614
- checkedValues = state.flatTreeData.map(function (item) {
615
- return item[fieldNameValue];
616
- });
580
+ checkedValues = state.flatTreeData.map(item => item[fieldNameValue]);
617
581
  } else if (!checked && span) {
618
582
  // ProTable 场景下 disabled 不取消掉
619
- checkedValues = state.flatTreeData.filter(function (item) {
620
- return item.disabled;
621
- }).map(function (item) {
622
- return item[fieldNameValue];
623
- });
583
+ checkedValues = state.flatTreeData.filter(item => item.disabled).map(item => item[fieldNameValue]);
624
584
  } else if (!checked) {
625
585
  checkedValues = [];
626
586
  }
627
587
  } else if (modeType === TREE) {
628
588
  checkedValues = checked ? state.allKeys : [];
629
589
  if (checkStrictly) {
630
- treeViewData = (0, _toConsumableArray2.default)(state.flatTreeData);
590
+ treeViewData = [...state.flatTreeData];
631
591
  } else {
632
592
  treeViewData = (0, _utils.filterCheckedNodes)(state.originalTreeData, checkedValues, '', fieldNames);
633
593
  }
@@ -635,33 +595,34 @@ var ProTreeModal = function ProTreeModal(props) {
635
595
  if (max && checkedValues.length > max) {
636
596
  var _locale$ProTreeModal6;
637
597
  _message2.default.error(maxMessage ? (0, _utils.transformMessage)({
638
- max: max
639
- }, maxMessage) : (0, _locale.formatMessage)(_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProTreeModal6 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal6 === void 0 ? void 0 : _locale$ProTreeModal6.selectMax, {
640
- max: max
598
+ max
599
+ }, maxMessage) : (0, _locale.formatMessage)(_locale.default === null || _locale.default === void 0 || (_locale$ProTreeModal6 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal6 === void 0 ? void 0 : _locale$ProTreeModal6.selectMax, {
600
+ max
641
601
  }));
642
602
  return;
643
603
  }
644
604
  setState({
645
- checkedValues: checkedValues,
605
+ checkedValues,
646
606
  checkAll: checked,
647
- treeViewData: treeViewData
607
+ treeViewData
648
608
  });
649
609
  };
610
+
650
611
  /**
651
612
  * 左侧容器、分为三种 list、tree、Cascader
652
613
  * @returns
653
614
  */
654
- var renderContainer = function renderContainer() {
615
+ var renderContainer = () => {
655
616
  if (state.treeData.length === 0 && state.searchStr) {
656
617
  var _locale$ProTreeModal7;
657
- return (0, _jsxRuntime.jsx)("div", {
618
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
658
619
  className: "pro-tree-modal-no-checks",
659
- children: _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProTreeModal7 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal7 === void 0 ? void 0 : _locale$ProTreeModal7.noFinal
620
+ children: _locale.default === null || _locale.default === void 0 || (_locale$ProTreeModal7 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal7 === void 0 ? void 0 : _locale$ProTreeModal7.noFinal
660
621
  });
661
622
  }
662
623
  switch (modeType) {
663
624
  case LIST:
664
- return (0, _jsxRuntime.jsx)(_components.ListView, {
625
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ListView, {
665
626
  treeData: state.treeData,
666
627
  optionRender: optionRender,
667
628
  checkedValues: state.checkedValues,
@@ -673,7 +634,7 @@ var ProTreeModal = function ProTreeModal(props) {
673
634
  span: span
674
635
  });
675
636
  case TREE:
676
- return (0, _jsxRuntime.jsx)(_components.TreeView, {
637
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TreeView, {
677
638
  treeData: state.transformedTree,
678
639
  originalTreeData: state.originalTreeData,
679
640
  flatTreeData: state.flatTreeData,
@@ -689,7 +650,7 @@ var ProTreeModal = function ProTreeModal(props) {
689
650
  });
690
651
  case CASCADER:
691
652
  if (state.searchStr && state.treeData.length) {
692
- return (0, _jsxRuntime.jsx)(_components.ListView, {
653
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ListView, {
693
654
  treeData: state.treeData,
694
655
  modeType: CASCADER,
695
656
  optionRender: optionRender,
@@ -701,7 +662,7 @@ var ProTreeModal = function ProTreeModal(props) {
701
662
  fieldNames: fieldNames
702
663
  });
703
664
  }
704
- return (0, _jsxRuntime.jsx)(_components.Cascader, {
665
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Cascader, {
705
666
  dataSource: state.treeData,
706
667
  fieldNames: fieldNames,
707
668
  checkedValues: state.checkedValues,
@@ -714,34 +675,33 @@ var ProTreeModal = function ProTreeModal(props) {
714
675
  break;
715
676
  }
716
677
  };
717
- var listTreeData = (0, _react.useMemo)(function () {
678
+ var listTreeData = (0, _react.useMemo)(() => {
718
679
  var checkListOptions = [];
719
- state.checkedValues.forEach(function (key) {
720
- var option = state.flatTreeData.find(function (item) {
721
- return item[fieldNameValue] === key;
722
- });
680
+ state.checkedValues.forEach(key => {
681
+ var option = state.flatTreeData.find(item => item[fieldNameValue] === key);
723
682
  if (option) {
724
683
  checkListOptions.push(option);
725
684
  }
726
685
  });
727
686
  return checkListOptions;
728
687
  }, [state.checkedValues, state.flatTreeData]);
688
+
729
689
  /**
730
690
  * 勾选后的右侧展示
731
691
  * @returns
732
692
  */
733
- var renderView = function renderView() {
693
+ var renderView = () => {
734
694
  if (state.checkedValues.length === 0) {
735
695
  var _locale$ProTreeModal8;
736
- return (0, _jsxRuntime.jsx)("div", {
696
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
737
697
  className: "pro-tree-modal-no-checks",
738
- children: _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProTreeModal8 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal8 === void 0 ? void 0 : _locale$ProTreeModal8.noCheck
698
+ children: _locale.default === null || _locale.default === void 0 || (_locale$ProTreeModal8 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal8 === void 0 ? void 0 : _locale$ProTreeModal8.noCheck
739
699
  });
740
700
  }
741
701
  switch (modeType) {
742
702
  case LIST:
743
703
  case CASCADER:
744
- return (0, _jsxRuntime.jsx)(_components.ListView, {
704
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ListView, {
745
705
  mode: "view",
746
706
  showCodeName: showCodeName,
747
707
  treeData: listTreeData,
@@ -756,7 +716,7 @@ var ProTreeModal = function ProTreeModal(props) {
756
716
  handleDragEndChange: handleDragEndChange
757
717
  });
758
718
  case TREE:
759
- return (0, _jsxRuntime.jsx)(_components.TreeView, {
719
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TreeView, {
760
720
  mode: "view",
761
721
  checkStrictly: checkStrictly,
762
722
  showCodeName: showCodeName,
@@ -776,10 +736,10 @@ var ProTreeModal = function ProTreeModal(props) {
776
736
  break;
777
737
  }
778
738
  };
779
- return (0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
780
- children: (0, _jsxRuntime.jsxs)("div", {
739
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
740
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
781
741
  className: "pro-tree-modal",
782
- children: [open === undefined && TriggerComponent, (0, _jsxRuntime.jsx)(_index.ProDrawerForm, {
742
+ children: [open === undefined && TriggerComponent, /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ProDrawerForm, {
783
743
  onOk: handleFinish,
784
744
  onCancel: handleClose,
785
745
  okDisabled: disabled,
@@ -787,46 +747,44 @@ var ProTreeModal = function ProTreeModal(props) {
787
747
  title: title,
788
748
  showType: "Modal",
789
749
  className: "pro-tree-modal-container",
790
- extraLeft: allValue !== undefined ? (0, _jsxRuntime.jsx)(_checkbox.default, {
750
+ extraLeft: allValue !== undefined ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_checkbox.default, {
791
751
  checked: state.checkAll,
792
752
  disabled: disabled,
793
753
  onChange: handleAllCheck,
794
- children: _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProTreeModal9 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal9 === void 0 ? void 0 : _locale$ProTreeModal9.checkAll
754
+ children: _locale.default === null || _locale.default === void 0 || (_locale$ProTreeModal9 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal9 === void 0 ? void 0 : _locale$ProTreeModal9.checkAll
795
755
  }) : null,
796
- children: (0, _jsxRuntime.jsxs)("div", {
756
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
797
757
  className: "pro-tree-modal-content",
798
- children: [(0, _jsxRuntime.jsxs)("div", {
758
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
799
759
  className: (0, _classnames.default)('pro-tree-modal-box', modeType === CASCADER || modeType === LIST && span ? 'pro-tree-modal-cascader-box' : ''),
800
- children: [(0, _jsxRuntime.jsx)(_input.default, {
760
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_input.default, {
801
761
  disabled: disabled,
802
762
  allowClear: true,
803
763
  value: state.searchStr,
804
- placeholder: placeholder || (_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProTreeModal10 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal10 === void 0 ? void 0 : _locale$ProTreeModal10.input),
764
+ placeholder: placeholder || (_locale.default === null || _locale.default === void 0 || (_locale$ProTreeModal10 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal10 === void 0 ? void 0 : _locale$ProTreeModal10.input),
805
765
  className: "pro-tree-modal-search",
806
- onChange: function onChange(e) {
807
- return handleSetSearchStr(e.target.value);
808
- },
809
- prefix: (0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, {
766
+ onChange: e => handleSetSearchStr(e.target.value),
767
+ prefix: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactSvg.ReactSVG, {
810
768
  className: "pro-tree-modal-search-svg",
811
769
  src: _inputSearch.default
812
770
  })
813
- }), (0, _jsxRuntime.jsx)("div", {
771
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
814
772
  className: "pro-tree-modal-tree-warp",
815
773
  children: renderContainer()
816
774
  })]
817
- }), (0, _jsxRuntime.jsxs)("div", {
775
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
818
776
  className: (0, _classnames.default)('pro-tree-modal-box', modeType === CASCADER || modeType === LIST && span ? 'pro-tree-modal-cascader-box-view' : ''),
819
- children: [(0, _jsxRuntime.jsxs)("div", {
777
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
820
778
  className: "pro-tree-modal-box-header",
821
- children: [(0, _jsxRuntime.jsxs)("span", {
822
- children: [_locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProTreeModal11 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal11 === void 0 ? void 0 : _locale$ProTreeModal11.check, " (", state.checkedValues.length, "/", max || state.flatTreeData.length, ")"]
823
- }), (0, _jsxRuntime.jsx)(_button.default, {
779
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
780
+ children: [_locale.default === null || _locale.default === void 0 || (_locale$ProTreeModal11 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal11 === void 0 ? void 0 : _locale$ProTreeModal11.check, " (", state.checkedValues.length, "/", max || state.flatTreeData.length, ")"]
781
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.default, {
824
782
  disabled: disabled,
825
783
  type: "link",
826
784
  onClick: handleClearAll,
827
- children: _locale.default === null || _locale.default === void 0 ? void 0 : (_locale$ProTreeModal12 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal12 === void 0 ? void 0 : _locale$ProTreeModal12.clearAll
785
+ children: _locale.default === null || _locale.default === void 0 || (_locale$ProTreeModal12 = _locale.default.ProTreeModal) === null || _locale$ProTreeModal12 === void 0 ? void 0 : _locale$ProTreeModal12.clearAll
828
786
  })]
829
- }), (0, _jsxRuntime.jsx)("div", {
787
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
830
788
  className: "pro-tree-modal-tree-warp pro-transfer-right",
831
789
  children: renderView()
832
790
  })]