@teamix/pro 1.5.0 → 1.6.0-beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (551) hide show
  1. package/README.md +1 -1
  2. package/dist/pro.css +1 -1
  3. package/dist/pro.js +39986 -40902
  4. package/dist/pro.min.css +1 -1
  5. package/dist/pro.min.js +1 -1
  6. package/dist/pro.min.js.LICENSE.txt +2 -6
  7. package/es/actions/base.js +8 -21
  8. package/es/actions/dialog-component.js +3 -13
  9. package/es/actions/dialog-form.js +41 -79
  10. package/es/actions/dialog-info.js +1 -5
  11. package/es/actions/dialog.js +57 -96
  12. package/es/actions/index.js +94 -161
  13. package/es/actions/link.js +3 -6
  14. package/es/actions/request.js +12 -28
  15. package/es/actions/utils.js +1 -9
  16. package/es/card/card-container.js +11 -9
  17. package/es/card/divider.js +2 -9
  18. package/es/card/index.js +69 -97
  19. package/es/card/selectable.js +6 -17
  20. package/es/card/tab.js +3 -14
  21. package/es/card/utils.js +0 -2
  22. package/es/form/Components/Editable/index.js +17 -56
  23. package/es/form/Components/FormGroup/index.js +11 -25
  24. package/es/form/Components/LightFilter/index.js +22 -33
  25. package/es/form/Components/ProField/index.js +4 -18
  26. package/es/form/Components/ProField/mapDateFormat.js +2 -28
  27. package/es/form/Components/Text/index.js +4 -15
  28. package/es/form/Filter/AdvancedFilter.js +16 -29
  29. package/es/form/Filter/Layout.js +11 -24
  30. package/es/form/Filter/LightFilter.js +17 -24
  31. package/es/form/Filter/SimpleFilter.js +12 -23
  32. package/es/form/Filter/index.js +113 -161
  33. package/es/form/Filter/index2.js +22 -34
  34. package/es/form/Filter/useBindUrl.js +18 -43
  35. package/es/form/Filter/useSpecialProps.js +8 -12
  36. package/es/form/ProForm/addCascadeEffect.js +10 -32
  37. package/es/form/ProForm/customComponent.js +0 -5
  38. package/es/form/ProForm/index.js +26 -34
  39. package/es/form/ProForm/useAutoLayout.js +21 -38
  40. package/es/form/ProForm/useAutoSubmit.js +3 -9
  41. package/es/form/ProForm/useFieldRequest.js +0 -5
  42. package/es/form/ProForm/useFormDisplayValues.js +12 -27
  43. package/es/form/ProForm/useInitialRequest.js +0 -5
  44. package/es/form/SchemaForm/adapterComponent.js +1 -3
  45. package/es/form/SchemaForm/adapterDecorator.js +1 -8
  46. package/es/form/SchemaForm/adapterType.js +1 -2
  47. package/es/form/SchemaForm/index.js +82 -105
  48. package/es/form/SchemaForm/initializeArrayCards.js +0 -6
  49. package/es/form/SchemaForm/initializeArrayCollapse.js +0 -6
  50. package/es/form/SchemaForm/initializeArrayItems.js +2 -9
  51. package/es/form/SchemaForm/initializeArrayTable.js +21 -34
  52. package/es/form/SchemaForm/initializeDataSource.js +2 -6
  53. package/es/form/SchemaForm/initializeFormButton.js +14 -29
  54. package/es/form/SchemaForm/initializeFormCollapse.js +8 -18
  55. package/es/form/SchemaForm/initializeFormGroup.js +10 -20
  56. package/es/form/SchemaForm/initializeFormStep.js +11 -23
  57. package/es/form/SchemaForm/initializeFormTab.js +10 -20
  58. package/es/form/SchemaForm/initializeReactions.js +9 -32
  59. package/es/form/SchemaForm/initializeRequest.js +2 -16
  60. package/es/form/SchemaForm/initializeRules.js +4 -22
  61. package/es/form/SchemaForm/initializeSelectTable.js +8 -33
  62. package/es/form/SchemaForm/reactions.js +19 -29
  63. package/es/form/index.js +4 -9
  64. package/es/form/utils.js +15 -48
  65. package/es/form/warning.js +3 -6
  66. package/es/index-without-icon.js +4 -3
  67. package/es/index.js +8 -8
  68. package/es/info/components/InfoGroup/index.js +23 -36
  69. package/es/info/components/InfoValueItem/index.js +85 -126
  70. package/es/info/components/ProInfoItem/index.js +13 -20
  71. package/es/info/components/baseInfo/index.js +14 -23
  72. package/es/info/components/headerInfo/index.js +8 -20
  73. package/es/info/components/tableInfo/index.js +22 -50
  74. package/es/info/index.js +59 -82
  75. package/es/info/utils/index.js +3 -11
  76. package/es/layout/index.js +2 -0
  77. package/es/nocode/configurators/common.js +5 -6
  78. package/es/nocode/configurators/index.js +1 -3
  79. package/es/nocode/index.js +7 -5
  80. package/es/nocode/pages/editor.js +5 -9
  81. package/es/nocode/pages/index.js +6 -3
  82. package/es/nocode/pages/playground.js +21 -40
  83. package/es/nocode/pages/renderer.js +13 -48
  84. package/es/nocode/playground.js +12 -27
  85. package/es/page-header/index.js +54 -80
  86. package/es/sidebar/components/sidebar-container/index.js +46 -74
  87. package/es/sidebar/components/tree/index.js +92 -130
  88. package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +13 -29
  89. package/es/sidebar/components/tree-node/components/IconAction/index.js +12 -36
  90. package/es/sidebar/components/tree-node/components/IconSwitch/index.js +12 -24
  91. package/es/sidebar/components/tree-node/index.js +54 -83
  92. package/es/sidebar/index.js +73 -87
  93. package/es/sidebar/utils/action-ref.js +2 -7
  94. package/es/sidebar/utils/index.js +59 -108
  95. package/es/table/components/Filter/index.js +41 -72
  96. package/es/table/components/Layout/index.js +34 -49
  97. package/es/table/components/Pagination/index.js +35 -66
  98. package/es/table/components/QuickAction/index.js +6 -13
  99. package/es/table/components/ToolBar/DensityIcon.js +23 -31
  100. package/es/table/components/ToolBar/FilterColumnIcon.js +45 -91
  101. package/es/table/components/ToolBar/FullScreenIcon.js +2 -5
  102. package/es/table/components/ToolBar/Fullscreen.js +15 -25
  103. package/es/table/components/ToolBar/RefreshIcon.js +4 -5
  104. package/es/table/components/ToolBar/index.js +20 -40
  105. package/es/table/index.js +237 -354
  106. package/es/table/utils/columnRender.js +52 -87
  107. package/es/table/utils/genProColumnToColumn.js +3 -13
  108. package/es/table/utils/index.js +18 -45
  109. package/es/table/utils/pureColumnRender.js +26 -50
  110. package/es/table/utils/pureGenProColumnToColumn.js +2 -10
  111. package/es/table/utils/useTableSelection.js +6 -33
  112. package/es/templates/List/index.js +6 -15
  113. package/es/templates/index.js +2 -1
  114. package/es/timeline/ProTimeLineItem/index.js +30 -66
  115. package/es/timeline/index.js +11 -25
  116. package/es/utils/message.js +3 -10
  117. package/lib/actions/base.js +8 -24
  118. package/lib/actions/confirm.js +0 -5
  119. package/lib/actions/danger-confirm.js +0 -5
  120. package/lib/actions/danger-pop-confirm.js +0 -4
  121. package/lib/actions/dialog-component.js +3 -19
  122. package/lib/actions/dialog-form.js +41 -92
  123. package/lib/actions/dialog-info.js +1 -10
  124. package/lib/actions/dialog-table.js +0 -5
  125. package/lib/actions/dialog.js +56 -112
  126. package/lib/actions/drawer-form.js +0 -3
  127. package/lib/actions/drawer-info.js +0 -3
  128. package/lib/actions/drawer-table.js +0 -3
  129. package/lib/actions/drawer.js +0 -4
  130. package/lib/actions/error.js +0 -5
  131. package/lib/actions/index.js +93 -191
  132. package/lib/actions/link.js +3 -11
  133. package/lib/actions/notice.js +0 -5
  134. package/lib/actions/pop-confirm.js +0 -5
  135. package/lib/actions/request.js +10 -33
  136. package/lib/actions/utils.js +1 -9
  137. package/lib/card/card-container.js +6 -13
  138. package/lib/card/divider.js +2 -11
  139. package/lib/card/index.js +67 -123
  140. package/lib/card/selectable.js +6 -24
  141. package/lib/card/tab.js +3 -18
  142. package/lib/card/utils.js +0 -6
  143. package/lib/field/index.js +0 -6
  144. package/lib/form/Components/Editable/index.js +16 -66
  145. package/lib/form/Components/FormGroup/index.js +11 -31
  146. package/lib/form/Components/LightFilter/index.js +22 -45
  147. package/lib/form/Components/ProField/index.js +4 -25
  148. package/lib/form/Components/ProField/mapDateFormat.js +2 -32
  149. package/lib/form/Components/Text/index.js +4 -20
  150. package/lib/form/Filter/AdvancedFilter.js +16 -37
  151. package/lib/form/Filter/Layout.js +11 -33
  152. package/lib/form/Filter/LightFilter.js +17 -32
  153. package/lib/form/Filter/SimpleFilter.js +10 -29
  154. package/lib/form/Filter/index.js +112 -181
  155. package/lib/form/Filter/index2.js +22 -44
  156. package/lib/form/Filter/useBindUrl.js +18 -47
  157. package/lib/form/Filter/useSpecialProps.js +6 -13
  158. package/lib/form/ProForm/addCascadeEffect.js +10 -35
  159. package/lib/form/ProForm/customComponent.js +0 -8
  160. package/lib/form/ProForm/index.js +26 -57
  161. package/lib/form/ProForm/useAutoLayout.js +21 -41
  162. package/lib/form/ProForm/useAutoSubmit.js +3 -11
  163. package/lib/form/ProForm/useFieldRequest.js +0 -8
  164. package/lib/form/ProForm/useFormDisplayValues.js +12 -33
  165. package/lib/form/ProForm/useInitialRequest.js +0 -6
  166. package/lib/form/SchemaForm/adapterComponent.js +1 -6
  167. package/lib/form/SchemaForm/adapterDecorator.js +0 -12
  168. package/lib/form/SchemaForm/adapterType.js +1 -5
  169. package/lib/form/SchemaForm/index.js +82 -135
  170. package/lib/form/SchemaForm/initializeArrayCards.js +0 -7
  171. package/lib/form/SchemaForm/initializeArrayCollapse.js +0 -7
  172. package/lib/form/SchemaForm/initializeArrayItems.js +2 -10
  173. package/lib/form/SchemaForm/initializeArrayTable.js +21 -34
  174. package/lib/form/SchemaForm/initializeDataSource.js +2 -8
  175. package/lib/form/SchemaForm/initializeFormButton.js +14 -30
  176. package/lib/form/SchemaForm/initializeFormCollapse.js +8 -18
  177. package/lib/form/SchemaForm/initializeFormGroup.js +10 -20
  178. package/lib/form/SchemaForm/initializeFormStep.js +11 -23
  179. package/lib/form/SchemaForm/initializeFormTab.js +10 -20
  180. package/lib/form/SchemaForm/initializeReactions.js +9 -36
  181. package/lib/form/SchemaForm/initializeRequest.js +2 -18
  182. package/lib/form/SchemaForm/initializeRules.js +4 -24
  183. package/lib/form/SchemaForm/initializeSelectTable.js +7 -36
  184. package/lib/form/SchemaForm/reactions.js +17 -32
  185. package/lib/form/docs/ActionResponse.js +0 -5
  186. package/lib/form/index.js +0 -25
  187. package/lib/form/typing.js +1 -5
  188. package/lib/form/utils.js +14 -60
  189. package/lib/form/warning.js +3 -7
  190. package/lib/hooks/index.js +0 -5
  191. package/lib/index-without-icon.js +2 -36
  192. package/lib/index.js +1 -39
  193. package/lib/info/components/InfoGroup/index.js +23 -46
  194. package/lib/info/components/InfoValueItem/index.js +85 -141
  195. package/lib/info/components/ProInfoItem/index.js +14 -29
  196. package/lib/info/components/baseInfo/index.js +15 -36
  197. package/lib/info/components/headerInfo/index.js +8 -31
  198. package/lib/info/components/tableInfo/index.js +22 -62
  199. package/lib/info/index.js +59 -97
  200. package/lib/info/typing.js +1 -5
  201. package/lib/info/utils/index.js +3 -19
  202. package/lib/info/utils/utils.js +0 -1
  203. package/lib/nocode/configurators/PageHeader.js +0 -2
  204. package/lib/nocode/configurators/ProTable.js +0 -2
  205. package/lib/nocode/configurators/common.js +5 -10
  206. package/lib/nocode/configurators/index.js +1 -10
  207. package/lib/nocode/configurators/map.js +0 -5
  208. package/lib/nocode/index.js +0 -11
  209. package/lib/nocode/pages/editor.js +5 -19
  210. package/lib/nocode/pages/index.js +2 -9
  211. package/lib/nocode/pages/playground.js +21 -57
  212. package/lib/nocode/pages/renderer.js +13 -59
  213. package/lib/nocode/playground.js +12 -39
  214. package/lib/page-container/index.js +0 -6
  215. package/lib/page-header/index.js +53 -93
  216. package/lib/sidebar/components/sidebar-container/index.js +46 -86
  217. package/lib/sidebar/components/tree/index.js +92 -144
  218. package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +13 -37
  219. package/lib/sidebar/components/tree-node/components/IconAction/index.js +12 -47
  220. package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +12 -34
  221. package/lib/sidebar/components/tree-node/index.js +54 -99
  222. package/lib/sidebar/index.js +73 -103
  223. package/lib/sidebar/typing.js +1 -5
  224. package/lib/sidebar/utils/action-ref.js +2 -8
  225. package/lib/sidebar/utils/index.js +59 -116
  226. package/lib/skeleton/index.js +0 -6
  227. package/lib/table/components/EmptyContent/index.js +0 -6
  228. package/lib/table/components/Filter/index.js +41 -82
  229. package/lib/table/components/Layout/index.js +35 -63
  230. package/lib/table/components/Pagination/index.js +35 -76
  231. package/lib/table/components/QuickAction/index.js +6 -17
  232. package/lib/table/components/ToolBar/DensityIcon.js +23 -42
  233. package/lib/table/components/ToolBar/FilterColumnIcon.js +45 -103
  234. package/lib/table/components/ToolBar/FullScreenIcon.js +3 -12
  235. package/lib/table/components/ToolBar/Fullscreen.js +15 -32
  236. package/lib/table/components/ToolBar/RefreshIcon.js +5 -12
  237. package/lib/table/components/ToolBar/index.js +20 -56
  238. package/lib/table/index.js +238 -378
  239. package/lib/table/typing.js +1 -5
  240. package/lib/table/utils/columnRender.js +51 -100
  241. package/lib/table/utils/genProColumnToColumn.js +3 -18
  242. package/lib/table/utils/getTableProps.js +0 -2
  243. package/lib/table/utils/getTableSortIcons.js +0 -5
  244. package/lib/table/utils/index.js +16 -53
  245. package/lib/table/utils/pureColumnRender.js +26 -61
  246. package/lib/table/utils/pureGenProColumnToColumn.js +2 -11
  247. package/lib/table/utils/useTableSelection.js +6 -35
  248. package/lib/templates/Detail/index.js +0 -5
  249. package/lib/templates/Form/index.js +0 -5
  250. package/lib/templates/List/index.js +6 -25
  251. package/lib/templates/index.js +0 -6
  252. package/lib/timeline/ProTimeLineItem/index.js +30 -77
  253. package/lib/timeline/index.js +11 -36
  254. package/lib/timeline/typing.js +1 -5
  255. package/lib/utils/index.js +0 -6
  256. package/lib/utils/message.js +3 -15
  257. package/package.json +5 -6
  258. package/es/actions/base.d.ts +0 -24
  259. package/es/actions/confirm.d.ts +0 -7
  260. package/es/actions/danger-confirm.d.ts +0 -7
  261. package/es/actions/danger-pop-confirm.d.ts +0 -5
  262. package/es/actions/dialog-component.d.ts +0 -10
  263. package/es/actions/dialog-form.d.ts +0 -29
  264. package/es/actions/dialog-info.d.ts +0 -9
  265. package/es/actions/dialog-table.d.ts +0 -9
  266. package/es/actions/dialog.d.ts +0 -40
  267. package/es/actions/drawer-form.d.ts +0 -6
  268. package/es/actions/drawer-info.d.ts +0 -6
  269. package/es/actions/drawer-table.d.ts +0 -6
  270. package/es/actions/drawer.d.ts +0 -6
  271. package/es/actions/error.d.ts +0 -7
  272. package/es/actions/index.d.ts +0 -107
  273. package/es/actions/link.d.ts +0 -8
  274. package/es/actions/notice.d.ts +0 -7
  275. package/es/actions/pop-confirm.d.ts +0 -9
  276. package/es/actions/request.d.ts +0 -9
  277. package/es/actions/utils.d.ts +0 -1
  278. package/es/card/card-container.d.ts +0 -18
  279. package/es/card/divider.d.ts +0 -6
  280. package/es/card/index.d.ts +0 -109
  281. package/es/card/selectable.d.ts +0 -13
  282. package/es/card/tab.d.ts +0 -6
  283. package/es/card/utils.d.ts +0 -9
  284. package/es/field/index.d.ts +0 -3
  285. package/es/form/Components/Editable/index.d.ts +0 -20
  286. package/es/form/Components/FormGroup/index.d.ts +0 -13
  287. package/es/form/Components/LightFilter/componentMap.d.ts +0 -3
  288. package/es/form/Components/LightFilter/index.d.ts +0 -17
  289. package/es/form/Components/ProField/index.d.ts +0 -2
  290. package/es/form/Components/ProField/mapDateFormat.d.ts +0 -3
  291. package/es/form/Components/Text/index.d.ts +0 -7
  292. package/es/form/Filter/AdvancedFilter.d.ts +0 -7
  293. package/es/form/Filter/Layout.d.ts +0 -5
  294. package/es/form/Filter/LightFilter.d.ts +0 -7
  295. package/es/form/Filter/SimpleFilter.d.ts +0 -7
  296. package/es/form/Filter/index.d.ts +0 -9
  297. package/es/form/Filter/index2.d.ts +0 -13
  298. package/es/form/Filter/useBindUrl.d.ts +0 -2
  299. package/es/form/Filter/useSpecialProps.d.ts +0 -6
  300. package/es/form/ProForm/addCascadeEffect.d.ts +0 -2
  301. package/es/form/ProForm/customComponent.d.ts +0 -3
  302. package/es/form/ProForm/index.d.ts +0 -5
  303. package/es/form/ProForm/useAutoLayout.d.ts +0 -9
  304. package/es/form/ProForm/useAutoSubmit.d.ts +0 -6
  305. package/es/form/ProForm/useFieldRequest.d.ts +0 -5
  306. package/es/form/ProForm/useFormDisplayValues.d.ts +0 -4
  307. package/es/form/ProForm/useInitialRequest.d.ts +0 -6
  308. package/es/form/SchemaForm/adapterComponent.d.ts +0 -5
  309. package/es/form/SchemaForm/adapterDecorator.d.ts +0 -6
  310. package/es/form/SchemaForm/adapterType.d.ts +0 -5
  311. package/es/form/SchemaForm/index.d.ts +0 -4
  312. package/es/form/SchemaForm/initializeArrayCards.d.ts +0 -3
  313. package/es/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
  314. package/es/form/SchemaForm/initializeArrayItems.d.ts +0 -3
  315. package/es/form/SchemaForm/initializeArrayTable.d.ts +0 -3
  316. package/es/form/SchemaForm/initializeDataSource.d.ts +0 -15
  317. package/es/form/SchemaForm/initializeFormButton.d.ts +0 -3
  318. package/es/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
  319. package/es/form/SchemaForm/initializeFormGroup.d.ts +0 -3
  320. package/es/form/SchemaForm/initializeFormStep.d.ts +0 -5
  321. package/es/form/SchemaForm/initializeFormTab.d.ts +0 -3
  322. package/es/form/SchemaForm/initializeReactions.d.ts +0 -2
  323. package/es/form/SchemaForm/initializeRequest.d.ts +0 -11
  324. package/es/form/SchemaForm/initializeRules.d.ts +0 -11
  325. package/es/form/SchemaForm/initializeSelectTable.d.ts +0 -3
  326. package/es/form/SchemaForm/reactions.d.ts +0 -6
  327. package/es/form/docs/ActionResponse.d.ts +0 -7
  328. package/es/form/fieldTypeMap.d.ts +0 -7
  329. package/es/form/index.d.ts +0 -125
  330. package/es/form/locales/validate.d.ts +0 -159
  331. package/es/form/schemaNameMap.d.ts +0 -5
  332. package/es/form/typing.d.ts +0 -192
  333. package/es/form/utils.d.ts +0 -55
  334. package/es/form/warning.d.ts +0 -3
  335. package/es/hooks/index.d.ts +0 -2
  336. package/es/index-without-icon.d.ts +0 -32
  337. package/es/index.d.ts +0 -32
  338. package/es/info/components/InfoGroup/index.d.ts +0 -5
  339. package/es/info/components/InfoValueItem/index.d.ts +0 -5
  340. package/es/info/components/ProInfoItem/index.d.ts +0 -5
  341. package/es/info/components/baseInfo/index.d.ts +0 -8
  342. package/es/info/components/headerInfo/index.d.ts +0 -8
  343. package/es/info/components/tableInfo/index.d.ts +0 -7
  344. package/es/info/index.d.ts +0 -10
  345. package/es/info/typing.d.ts +0 -218
  346. package/es/info/utils/index.d.ts +0 -20
  347. package/es/info/utils/layout.d.ts +0 -2
  348. package/es/info/utils/utils.d.ts +0 -1
  349. package/es/layout/index.d.ts +0 -2
  350. package/es/nocode/configurators/Card.d.ts +0 -3
  351. package/es/nocode/configurators/PageHeader.d.ts +0 -3
  352. package/es/nocode/configurators/ProTable.d.ts +0 -3
  353. package/es/nocode/configurators/common.d.ts +0 -280
  354. package/es/nocode/configurators/index.d.ts +0 -15
  355. package/es/nocode/configurators/map.d.ts +0 -2
  356. package/es/nocode/index.d.ts +0 -8
  357. package/es/nocode/pages/editor.d.ts +0 -12
  358. package/es/nocode/pages/index.d.ts +0 -14
  359. package/es/nocode/pages/playground.d.ts +0 -11
  360. package/es/nocode/pages/renderer.d.ts +0 -10
  361. package/es/nocode/playground.d.ts +0 -14
  362. package/es/page-container/index.d.ts +0 -3
  363. package/es/page-header/index.d.ts +0 -74
  364. package/es/sidebar/components/sidebar-container/index.d.ts +0 -5
  365. package/es/sidebar/components/tree/index.d.ts +0 -6
  366. package/es/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
  367. package/es/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
  368. package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
  369. package/es/sidebar/components/tree-node/index.d.ts +0 -7
  370. package/es/sidebar/index.d.ts +0 -7
  371. package/es/sidebar/typing.d.ts +0 -141
  372. package/es/sidebar/utils/action-ref.d.ts +0 -3
  373. package/es/sidebar/utils/index.d.ts +0 -361
  374. package/es/skeleton/index.d.ts +0 -3
  375. package/es/table/components/EmptyContent/index.d.ts +0 -2
  376. package/es/table/components/Filter/index.d.ts +0 -9
  377. package/es/table/components/Layout/index.d.ts +0 -5
  378. package/es/table/components/Pagination/index.d.ts +0 -7
  379. package/es/table/components/QuickAction/index.d.ts +0 -10
  380. package/es/table/components/ToolBar/DensityIcon.d.ts +0 -4
  381. package/es/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
  382. package/es/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
  383. package/es/table/components/ToolBar/Fullscreen.d.ts +0 -10
  384. package/es/table/components/ToolBar/RefreshIcon.d.ts +0 -4
  385. package/es/table/components/ToolBar/index.d.ts +0 -5
  386. package/es/table/index.d.ts +0 -5
  387. package/es/table/typing.d.ts +0 -302
  388. package/es/table/utils/columnRender.d.ts +0 -13
  389. package/es/table/utils/genProColumnToColumn.d.ts +0 -13
  390. package/es/table/utils/getTableProps.d.ts +0 -2
  391. package/es/table/utils/getTableSortIcons.d.ts +0 -3
  392. package/es/table/utils/index.d.ts +0 -19
  393. package/es/table/utils/pureColumnRender.d.ts +0 -9
  394. package/es/table/utils/pureGenProColumnToColumn.d.ts +0 -7
  395. package/es/table/utils/useTableSelection.d.ts +0 -3
  396. package/es/templates/Detail/index.d.ts +0 -2
  397. package/es/templates/Form/index.d.ts +0 -2
  398. package/es/templates/List/index.d.ts +0 -9
  399. package/es/templates/index.d.ts +0 -3
  400. package/es/timeline/ProTimeLineItem/index.d.ts +0 -5
  401. package/es/timeline/index.d.ts +0 -10
  402. package/es/timeline/typing.d.ts +0 -106
  403. package/es/utils/index.d.ts +0 -3
  404. package/es/utils/message.d.ts +0 -3
  405. package/lib/actions/base.d.ts +0 -24
  406. package/lib/actions/confirm.d.ts +0 -7
  407. package/lib/actions/danger-confirm.d.ts +0 -7
  408. package/lib/actions/danger-pop-confirm.d.ts +0 -5
  409. package/lib/actions/dialog-component.d.ts +0 -10
  410. package/lib/actions/dialog-form.d.ts +0 -29
  411. package/lib/actions/dialog-info.d.ts +0 -9
  412. package/lib/actions/dialog-table.d.ts +0 -9
  413. package/lib/actions/dialog.d.ts +0 -40
  414. package/lib/actions/drawer-form.d.ts +0 -6
  415. package/lib/actions/drawer-info.d.ts +0 -6
  416. package/lib/actions/drawer-table.d.ts +0 -6
  417. package/lib/actions/drawer.d.ts +0 -6
  418. package/lib/actions/error.d.ts +0 -7
  419. package/lib/actions/index.d.ts +0 -107
  420. package/lib/actions/link.d.ts +0 -8
  421. package/lib/actions/notice.d.ts +0 -7
  422. package/lib/actions/pop-confirm.d.ts +0 -9
  423. package/lib/actions/request.d.ts +0 -9
  424. package/lib/actions/utils.d.ts +0 -1
  425. package/lib/card/card-container.d.ts +0 -18
  426. package/lib/card/divider.d.ts +0 -6
  427. package/lib/card/index.d.ts +0 -109
  428. package/lib/card/selectable.d.ts +0 -13
  429. package/lib/card/tab.d.ts +0 -6
  430. package/lib/card/utils.d.ts +0 -9
  431. package/lib/field/index.d.ts +0 -3
  432. package/lib/form/Components/Editable/index.d.ts +0 -20
  433. package/lib/form/Components/FormGroup/index.d.ts +0 -13
  434. package/lib/form/Components/LightFilter/componentMap.d.ts +0 -3
  435. package/lib/form/Components/LightFilter/index.d.ts +0 -17
  436. package/lib/form/Components/ProField/index.d.ts +0 -2
  437. package/lib/form/Components/ProField/mapDateFormat.d.ts +0 -3
  438. package/lib/form/Components/Text/index.d.ts +0 -7
  439. package/lib/form/Filter/AdvancedFilter.d.ts +0 -7
  440. package/lib/form/Filter/Layout.d.ts +0 -5
  441. package/lib/form/Filter/LightFilter.d.ts +0 -7
  442. package/lib/form/Filter/SimpleFilter.d.ts +0 -7
  443. package/lib/form/Filter/index.d.ts +0 -9
  444. package/lib/form/Filter/index2.d.ts +0 -13
  445. package/lib/form/Filter/useBindUrl.d.ts +0 -2
  446. package/lib/form/Filter/useSpecialProps.d.ts +0 -6
  447. package/lib/form/ProForm/addCascadeEffect.d.ts +0 -2
  448. package/lib/form/ProForm/customComponent.d.ts +0 -3
  449. package/lib/form/ProForm/index.d.ts +0 -5
  450. package/lib/form/ProForm/useAutoLayout.d.ts +0 -9
  451. package/lib/form/ProForm/useAutoSubmit.d.ts +0 -6
  452. package/lib/form/ProForm/useFieldRequest.d.ts +0 -5
  453. package/lib/form/ProForm/useFormDisplayValues.d.ts +0 -4
  454. package/lib/form/ProForm/useInitialRequest.d.ts +0 -6
  455. package/lib/form/SchemaForm/adapterComponent.d.ts +0 -5
  456. package/lib/form/SchemaForm/adapterDecorator.d.ts +0 -6
  457. package/lib/form/SchemaForm/adapterType.d.ts +0 -5
  458. package/lib/form/SchemaForm/index.d.ts +0 -4
  459. package/lib/form/SchemaForm/initializeArrayCards.d.ts +0 -3
  460. package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +0 -3
  461. package/lib/form/SchemaForm/initializeArrayItems.d.ts +0 -3
  462. package/lib/form/SchemaForm/initializeArrayTable.d.ts +0 -3
  463. package/lib/form/SchemaForm/initializeDataSource.d.ts +0 -15
  464. package/lib/form/SchemaForm/initializeFormButton.d.ts +0 -3
  465. package/lib/form/SchemaForm/initializeFormCollapse.d.ts +0 -3
  466. package/lib/form/SchemaForm/initializeFormGroup.d.ts +0 -3
  467. package/lib/form/SchemaForm/initializeFormStep.d.ts +0 -5
  468. package/lib/form/SchemaForm/initializeFormTab.d.ts +0 -3
  469. package/lib/form/SchemaForm/initializeReactions.d.ts +0 -2
  470. package/lib/form/SchemaForm/initializeRequest.d.ts +0 -11
  471. package/lib/form/SchemaForm/initializeRules.d.ts +0 -11
  472. package/lib/form/SchemaForm/initializeSelectTable.d.ts +0 -3
  473. package/lib/form/SchemaForm/reactions.d.ts +0 -6
  474. package/lib/form/docs/ActionResponse.d.ts +0 -7
  475. package/lib/form/fieldTypeMap.d.ts +0 -7
  476. package/lib/form/index.d.ts +0 -125
  477. package/lib/form/locales/validate.d.ts +0 -159
  478. package/lib/form/schemaNameMap.d.ts +0 -5
  479. package/lib/form/typing.d.ts +0 -192
  480. package/lib/form/utils.d.ts +0 -55
  481. package/lib/form/warning.d.ts +0 -3
  482. package/lib/hooks/index.d.ts +0 -2
  483. package/lib/index-without-icon.d.ts +0 -32
  484. package/lib/index.d.ts +0 -32
  485. package/lib/info/components/InfoGroup/index.d.ts +0 -5
  486. package/lib/info/components/InfoValueItem/index.d.ts +0 -5
  487. package/lib/info/components/ProInfoItem/index.d.ts +0 -5
  488. package/lib/info/components/baseInfo/index.d.ts +0 -8
  489. package/lib/info/components/headerInfo/index.d.ts +0 -8
  490. package/lib/info/components/tableInfo/index.d.ts +0 -7
  491. package/lib/info/index.d.ts +0 -10
  492. package/lib/info/typing.d.ts +0 -218
  493. package/lib/info/utils/index.d.ts +0 -20
  494. package/lib/info/utils/layout.d.ts +0 -2
  495. package/lib/info/utils/utils.d.ts +0 -1
  496. package/lib/layout/index.d.ts +0 -2
  497. package/lib/nocode/configurators/Card.d.ts +0 -3
  498. package/lib/nocode/configurators/PageHeader.d.ts +0 -3
  499. package/lib/nocode/configurators/ProTable.d.ts +0 -3
  500. package/lib/nocode/configurators/common.d.ts +0 -280
  501. package/lib/nocode/configurators/index.d.ts +0 -15
  502. package/lib/nocode/configurators/map.d.ts +0 -2
  503. package/lib/nocode/index.d.ts +0 -8
  504. package/lib/nocode/pages/editor.d.ts +0 -12
  505. package/lib/nocode/pages/index.d.ts +0 -14
  506. package/lib/nocode/pages/playground.d.ts +0 -11
  507. package/lib/nocode/pages/renderer.d.ts +0 -10
  508. package/lib/nocode/playground.d.ts +0 -14
  509. package/lib/page-container/index.d.ts +0 -3
  510. package/lib/page-header/index.d.ts +0 -74
  511. package/lib/sidebar/components/sidebar-container/index.d.ts +0 -5
  512. package/lib/sidebar/components/tree/index.d.ts +0 -6
  513. package/lib/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +0 -15
  514. package/lib/sidebar/components/tree-node/components/IconAction/index.d.ts +0 -12
  515. package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +0 -23
  516. package/lib/sidebar/components/tree-node/index.d.ts +0 -7
  517. package/lib/sidebar/index.d.ts +0 -7
  518. package/lib/sidebar/typing.d.ts +0 -141
  519. package/lib/sidebar/utils/action-ref.d.ts +0 -3
  520. package/lib/sidebar/utils/index.d.ts +0 -361
  521. package/lib/skeleton/index.d.ts +0 -3
  522. package/lib/table/components/EmptyContent/index.d.ts +0 -2
  523. package/lib/table/components/Filter/index.d.ts +0 -9
  524. package/lib/table/components/Layout/index.d.ts +0 -5
  525. package/lib/table/components/Pagination/index.d.ts +0 -7
  526. package/lib/table/components/QuickAction/index.d.ts +0 -10
  527. package/lib/table/components/ToolBar/DensityIcon.d.ts +0 -4
  528. package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +0 -4
  529. package/lib/table/components/ToolBar/FullScreenIcon.d.ts +0 -4
  530. package/lib/table/components/ToolBar/Fullscreen.d.ts +0 -10
  531. package/lib/table/components/ToolBar/RefreshIcon.d.ts +0 -4
  532. package/lib/table/components/ToolBar/index.d.ts +0 -5
  533. package/lib/table/index.d.ts +0 -5
  534. package/lib/table/typing.d.ts +0 -302
  535. package/lib/table/utils/columnRender.d.ts +0 -13
  536. package/lib/table/utils/genProColumnToColumn.d.ts +0 -13
  537. package/lib/table/utils/getTableProps.d.ts +0 -2
  538. package/lib/table/utils/getTableSortIcons.d.ts +0 -3
  539. package/lib/table/utils/index.d.ts +0 -19
  540. package/lib/table/utils/pureColumnRender.d.ts +0 -9
  541. package/lib/table/utils/pureGenProColumnToColumn.d.ts +0 -7
  542. package/lib/table/utils/useTableSelection.d.ts +0 -3
  543. package/lib/templates/Detail/index.d.ts +0 -2
  544. package/lib/templates/Form/index.d.ts +0 -2
  545. package/lib/templates/List/index.d.ts +0 -9
  546. package/lib/templates/index.d.ts +0 -3
  547. package/lib/timeline/ProTimeLineItem/index.d.ts +0 -5
  548. package/lib/timeline/index.d.ts +0 -10
  549. package/lib/timeline/typing.d.ts +0 -106
  550. package/lib/utils/index.d.ts +0 -3
  551. package/lib/utils/message.d.ts +0 -3
package/es/table/index.js CHANGED
@@ -1,37 +1,21 @@
1
1
  var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "afterDataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestConfig", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "fixedTableBody", "isTree"];
2
-
2
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
4
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
6
-
7
5
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
8
-
9
6
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
10
-
11
7
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
-
13
8
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
14
-
15
9
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
16
-
17
10
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18
-
19
11
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
20
-
21
12
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
22
-
23
13
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
24
-
25
14
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
26
-
27
15
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
28
-
29
16
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
30
-
31
17
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
32
-
33
18
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
34
-
35
19
  import React, { useState, useEffect, useRef, useMemo } from 'react';
36
20
  import { Table, Checkbox } from '@alicloudfe/components';
37
21
  import Pagination from './components/Pagination';
@@ -52,231 +36,202 @@ import ProPageContainer from '../page-container';
52
36
  import debounce from 'lodash.debounce';
53
37
  export * from './typing';
54
38
  var cls = usePrefixCls('teamix-pro-table');
39
+
55
40
  /**
56
41
  * 处理原生传入的 columns 以便于 选择列 方便处理
57
42
  * @param columns 原生传入的 columns
58
43
  * @returns
59
44
  */
60
-
61
45
  var processColumns = function processColumns(columns, initialColumns) {
62
46
  var _getGlobalConfig;
63
-
64
47
  var globalFilterColumns = (_getGlobalConfig = getGlobalConfig('ProTable')) === null || _getGlobalConfig === void 0 ? void 0 : _getGlobalConfig.filterColumns;
65
48
  var filterColumns = columns.filter(function (item) {
66
49
  return item.columnFilters !== false && (item === null || item === void 0 ? void 0 : item.hidden) !== true && (!globalFilterColumns || globalFilterColumns(item));
67
- }); // 处理只剩一列批量选择的情况下宽度错乱问题
68
-
50
+ });
51
+ // 处理只剩一列批量选择的情况下宽度错乱问题
69
52
  if (filterColumns === null || filterColumns === void 0 ? void 0 : filterColumns.length) {
70
53
  var _initialColumns$;
71
-
72
54
  if ((filterColumns === null || filterColumns === void 0 ? void 0 : filterColumns.length) === 1) {
73
55
  var _filterColumns$, _filterColumns$2;
74
-
75
56
  if ((_filterColumns$ = filterColumns[0]) === null || _filterColumns$ === void 0 ? void 0 : _filterColumns$.width) {
76
57
  delete filterColumns[0].width;
77
58
  }
78
-
79
59
  if ((_filterColumns$2 = filterColumns[0]) === null || _filterColumns$2 === void 0 ? void 0 : _filterColumns$2.lock) {
80
60
  filterColumns[0].lock = false;
81
61
  }
82
62
  } else if (((_initialColumns$ = initialColumns[0]) === null || _initialColumns$ === void 0 ? void 0 : _initialColumns$.columnFilters) !== false) {
83
63
  var _initialColumns$2, _initialColumns$3;
84
-
85
64
  if ((_initialColumns$2 = initialColumns[0]) === null || _initialColumns$2 === void 0 ? void 0 : _initialColumns$2.width) {
86
65
  filterColumns[0].width = initialColumns[0].width;
87
66
  }
88
-
89
67
  if ((_initialColumns$3 = initialColumns[0]) === null || _initialColumns$3 === void 0 ? void 0 : _initialColumns$3.lock) {
90
68
  filterColumns[0].lock = initialColumns[0].lock;
91
69
  }
92
70
  }
93
71
  }
94
-
95
72
  return filterColumns;
96
73
  };
97
- /** 默认请求翻页参数 */
98
-
99
74
 
75
+ /** 默认请求翻页参数 */
100
76
  var globalPageKey = 'currentPage';
101
77
  var globalPageSizeKey = 'pageSize';
102
-
103
78
  var globalFormatSort = function globalFormatSort(sort) {
104
79
  if (Object.keys(sort).length > 0) {
105
80
  return {
106
81
  sort: sort
107
82
  };
108
83
  }
109
-
110
84
  return {};
111
85
  };
112
-
113
86
  var ProTable = function ProTable(props) {
114
87
  var _rowSelection$selecte;
115
-
116
88
  var header = props.header,
117
- className = props.className,
118
- tableClassName = props.tableClassName,
119
- mainAction = props.mainAction,
120
- extra = props.extra,
121
- propsDataFilter = props.dataFilter,
122
- afterDataFilter = props.afterDataFilter,
123
- toolBar = props.toolBar,
124
- propsColumns = props.columns,
125
- useRowSelection = props.useRowSelection,
126
- propsRowSelection = props.rowSelection,
127
- onChangeRowSelection = props.onChangeRowSelection,
128
- getRowSelection = props.getRowSelection,
129
- primaryKey = props.primaryKey,
130
- footerAction = props.footerAction,
131
- footer = props.footer,
132
- url = props.url,
133
- pageKey = props.pageKey,
134
- pageSizeKey = props.pageSizeKey,
135
- _props$method = props.method,
136
- method = _props$method === void 0 ? 'get' : _props$method,
137
- _props$params = props.params,
138
- propsParams = _props$params === void 0 ? {} : _props$params,
139
- formatSort = props.formatSort,
140
- _props$formatParams = props.formatParams,
141
- formatParams = _props$formatParams === void 0 ? function (params) {
142
- return params;
143
- } : _props$formatParams,
144
- formatResult = props.formatResult,
145
- requestConfig = props.requestConfig,
146
- _props$requestWhenMou = props.requestWhenMount,
147
- requestWhenMount = _props$requestWhenMou === void 0 ? true : _props$requestWhenMou,
148
- _props$showPagination = props.showPagination,
149
- showPagination = _props$showPagination === void 0 ? true : _props$showPagination,
150
- _props$pageSizeList = props.pageSizeList,
151
- pageSizeList = _props$pageSizeList === void 0 ? [5, 10, 20, 50, 100] : _props$pageSizeList,
152
- responsivePaginationType = props.responsivePaginationType,
153
- _props$showSkeleton = props.showSkeleton,
154
- propsShowSkeleton = _props$showSkeleton === void 0 ? true : _props$showSkeleton,
155
- _props$skeletonSize = props.skeletonSize,
156
- skeletonSize = _props$skeletonSize === void 0 ? 5 : _props$skeletonSize,
157
- propsActionRef = props.actionRef,
158
- propsDataSource = props.dataSource,
159
- _props$filterDebounce = props.filterDebounce,
160
- filterDebounce = _props$filterDebounce === void 0 ? 300 : _props$filterDebounce,
161
- _props$footerSuction = props.footerSuction,
162
- footerSuction = _props$footerSuction === void 0 ? false : _props$footerSuction,
163
- _props$autoRefresh = props.autoRefresh,
164
- autoRefresh = _props$autoRefresh === void 0 ? function () {
165
- return false;
166
- } : _props$autoRefresh,
167
- customRequest = props.customRequest,
168
- _props$filterColumnTy = props.filterColumnType,
169
- filterColumnType = _props$filterColumnTy === void 0 ? 'auto' : _props$filterColumnTy,
170
- defaultFilterParams = props.defaultFilterParams,
171
- _props$reserveSelecte = props.reserveSelectedRecords,
172
- reserveSelectedRecords = _props$reserveSelecte === void 0 ? false : _props$reserveSelecte,
173
- _props$size = props.size,
174
- propsSize = _props$size === void 0 ? 'medium' : _props$size,
175
- disableSelectAll = props.disableSelectAll,
176
- context = props.context,
177
- _props$fixedTableBody = props.fixedTableBody,
178
- fixedTableBody = _props$fixedTableBody === void 0 ? false : _props$fixedTableBody,
179
- isTree = props.isTree,
180
- otherProps = _objectWithoutProperties(props, _excluded);
181
-
89
+ className = props.className,
90
+ tableClassName = props.tableClassName,
91
+ mainAction = props.mainAction,
92
+ extra = props.extra,
93
+ propsDataFilter = props.dataFilter,
94
+ afterDataFilter = props.afterDataFilter,
95
+ toolBar = props.toolBar,
96
+ propsColumns = props.columns,
97
+ useRowSelection = props.useRowSelection,
98
+ propsRowSelection = props.rowSelection,
99
+ onChangeRowSelection = props.onChangeRowSelection,
100
+ getRowSelection = props.getRowSelection,
101
+ primaryKey = props.primaryKey,
102
+ footerAction = props.footerAction,
103
+ footer = props.footer,
104
+ url = props.url,
105
+ pageKey = props.pageKey,
106
+ pageSizeKey = props.pageSizeKey,
107
+ _props$method = props.method,
108
+ method = _props$method === void 0 ? 'get' : _props$method,
109
+ _props$params = props.params,
110
+ propsParams = _props$params === void 0 ? {} : _props$params,
111
+ formatSort = props.formatSort,
112
+ _props$formatParams = props.formatParams,
113
+ formatParams = _props$formatParams === void 0 ? function (params) {
114
+ return params;
115
+ } : _props$formatParams,
116
+ formatResult = props.formatResult,
117
+ requestConfig = props.requestConfig,
118
+ _props$requestWhenMou = props.requestWhenMount,
119
+ requestWhenMount = _props$requestWhenMou === void 0 ? true : _props$requestWhenMou,
120
+ _props$showPagination = props.showPagination,
121
+ showPagination = _props$showPagination === void 0 ? true : _props$showPagination,
122
+ _props$pageSizeList = props.pageSizeList,
123
+ pageSizeList = _props$pageSizeList === void 0 ? [5, 10, 20, 50, 100] : _props$pageSizeList,
124
+ responsivePaginationType = props.responsivePaginationType,
125
+ _props$showSkeleton = props.showSkeleton,
126
+ propsShowSkeleton = _props$showSkeleton === void 0 ? true : _props$showSkeleton,
127
+ _props$skeletonSize = props.skeletonSize,
128
+ skeletonSize = _props$skeletonSize === void 0 ? 5 : _props$skeletonSize,
129
+ propsActionRef = props.actionRef,
130
+ propsDataSource = props.dataSource,
131
+ _props$filterDebounce = props.filterDebounce,
132
+ filterDebounce = _props$filterDebounce === void 0 ? 300 : _props$filterDebounce,
133
+ _props$footerSuction = props.footerSuction,
134
+ footerSuction = _props$footerSuction === void 0 ? false : _props$footerSuction,
135
+ _props$autoRefresh = props.autoRefresh,
136
+ autoRefresh = _props$autoRefresh === void 0 ? function () {
137
+ return false;
138
+ } : _props$autoRefresh,
139
+ customRequest = props.customRequest,
140
+ _props$filterColumnTy = props.filterColumnType,
141
+ filterColumnType = _props$filterColumnTy === void 0 ? 'auto' : _props$filterColumnTy,
142
+ defaultFilterParams = props.defaultFilterParams,
143
+ _props$reserveSelecte = props.reserveSelectedRecords,
144
+ reserveSelectedRecords = _props$reserveSelecte === void 0 ? false : _props$reserveSelecte,
145
+ _props$size = props.size,
146
+ propsSize = _props$size === void 0 ? 'medium' : _props$size,
147
+ disableSelectAll = props.disableSelectAll,
148
+ context = props.context,
149
+ _props$fixedTableBody = props.fixedTableBody,
150
+ fixedTableBody = _props$fixedTableBody === void 0 ? false : _props$fixedTableBody,
151
+ isTree = props.isTree,
152
+ otherProps = _objectWithoutProperties(props, _excluded);
182
153
  var targetPageKey = pageKey || globalPageKey;
183
154
  var targetPageSizeKey = pageSizeKey || globalPageSizeKey;
184
155
  var targetFormatSort = formatSort || globalFormatSort;
185
-
186
156
  var _useState = useState(1),
187
- _useState2 = _slicedToArray(_useState, 2),
188
- currentPage = _useState2[0],
189
- setCurrentPage = _useState2[1];
190
-
157
+ _useState2 = _slicedToArray(_useState, 2),
158
+ currentPage = _useState2[0],
159
+ setCurrentPage = _useState2[1];
191
160
  var _useState3 = useState(props.pageSize || 10),
192
- _useState4 = _slicedToArray(_useState3, 2),
193
- pageSize = _useState4[0],
194
- setPageSize = _useState4[1];
195
-
161
+ _useState4 = _slicedToArray(_useState3, 2),
162
+ pageSize = _useState4[0],
163
+ setPageSize = _useState4[1];
196
164
  var _useState5 = useState(0),
197
- _useState6 = _slicedToArray(_useState5, 2),
198
- total = _useState6[0],
199
- setTotal = _useState6[1];
200
-
165
+ _useState6 = _slicedToArray(_useState5, 2),
166
+ total = _useState6[0],
167
+ setTotal = _useState6[1];
201
168
  var _useState7 = useState(propsDataSource !== null && propsDataSource !== void 0 ? propsDataSource : []),
202
- _useState8 = _slicedToArray(_useState7, 2),
203
- data = _useState8[0],
204
- setData = _useState8[1];
205
-
169
+ _useState8 = _slicedToArray(_useState7, 2),
170
+ data = _useState8[0],
171
+ setData = _useState8[1];
206
172
  var _useState9 = useState(props.sort || {}),
207
- _useState10 = _slicedToArray(_useState9, 2),
208
- sort = _useState10[0],
209
- setSort = _useState10[1];
210
-
173
+ _useState10 = _slicedToArray(_useState9, 2),
174
+ sort = _useState10[0],
175
+ setSort = _useState10[1];
211
176
  var _useState11 = useState(!propsDataSource && requestWhenMount && propsShowSkeleton),
212
- _useState12 = _slicedToArray(_useState11, 2),
213
- showSkeleton = _useState12[0],
214
- setShowSkeleton = _useState12[1]; // 首次加载,渲染骨架屏
215
-
216
-
177
+ _useState12 = _slicedToArray(_useState11, 2),
178
+ showSkeleton = _useState12[0],
179
+ setShowSkeleton = _useState12[1]; // 首次加载,渲染骨架屏
217
180
  var skeletonDataSource = new Array(skeletonSize).fill({});
218
- var requestDataKey = method.toLowerCase() === 'get' ? 'params' : 'data'; // 如果使用 customRequest 的话,内置 loading
219
-
181
+ var requestDataKey = method.toLowerCase() === 'get' ? 'params' : 'data';
182
+ // 如果使用 customRequest 的话,内置 loading
220
183
  var _useState13 = useState(requestWhenMount),
221
- _useState14 = _slicedToArray(_useState13, 2),
222
- customTableLoading = _useState14[0],
223
- setCustomTableLoading = _useState14[1];
224
-
184
+ _useState14 = _slicedToArray(_useState13, 2),
185
+ customTableLoading = _useState14[0],
186
+ setCustomTableLoading = _useState14[1];
225
187
  var tableRef = useRef(null);
226
- var actionRef = useRef(); // 传给 table 的过滤后的 columns
227
-
188
+ var actionRef = useRef();
189
+ // 传给 table 的过滤后的 columns
228
190
  var _useState15 = useState(processColumns(propsColumns !== null && propsColumns !== void 0 ? propsColumns : [], propsColumns)),
229
- _useState16 = _slicedToArray(_useState15, 2),
230
- filteredColumns = _useState16[0],
231
- setFilteredColumns = _useState16[1];
232
-
191
+ _useState16 = _slicedToArray(_useState15, 2),
192
+ filteredColumns = _useState16[0],
193
+ setFilteredColumns = _useState16[1];
233
194
  var _useState17 = useState(propsSize),
234
- _useState18 = _slicedToArray(_useState17, 2),
235
- size = _useState18[0],
236
- _setSize = _useState18[1];
237
-
195
+ _useState18 = _slicedToArray(_useState17, 2),
196
+ size = _useState18[0],
197
+ _setSize = _useState18[1];
238
198
  var _useState19 = useState(true),
239
- _useState20 = _slicedToArray(_useState19, 2),
240
- showLoading = _useState20[0],
241
- setShowLoading = _useState20[1]; // 存储能够被 on 监听到的 ProTable 状态
242
- // 因为只做存储用。不需要更新视图以及需要同步更改。所以不使用 setState 更新
243
-
199
+ _useState20 = _slicedToArray(_useState19, 2),
200
+ showLoading = _useState20[0],
201
+ setShowLoading = _useState20[1];
244
202
 
203
+ // 存储能够被 on 监听到的 ProTable 状态
204
+ // 因为只做存储用。不需要更新视图以及需要同步更改。所以不使用 setState 更新
245
205
  var _useState21 = useState({
246
- fullScreenState: false,
247
- filterRules: {},
248
- filterColumns: []
249
- }),
250
- _useState22 = _slicedToArray(_useState21, 1),
251
- actionRefState = _useState22[0]; // 存储 on 监听事件
252
-
253
-
206
+ fullScreenState: false,
207
+ filterRules: {},
208
+ filterColumns: []
209
+ }),
210
+ _useState22 = _slicedToArray(_useState21, 1),
211
+ actionRefState = _useState22[0];
212
+
213
+ // 存储 on 监听事件
254
214
  var _useState23 = useState({
255
- fullScreenState: {}
256
- }),
257
- _useState24 = _slicedToArray(_useState23, 1),
258
- actionRefCallback = _useState24[0]; // 存储定时器 id
259
-
215
+ fullScreenState: {}
216
+ }),
217
+ _useState24 = _slicedToArray(_useState23, 1),
218
+ actionRefCallback = _useState24[0];
260
219
 
220
+ // 存储定时器 id
261
221
  var autoRefreshTimerRef = useRef();
262
222
  var onResize = null;
263
223
  useEffect(function () {
264
224
  var _propsDataFilter$sche, _propsDataFilter$sche2;
265
-
266
225
  getHeaderHeight(fullscreenState);
267
226
  getFooterSuctionState();
268
-
269
227
  if (window.onresize) {
270
228
  onResize = window.onresize;
271
229
  window.onresize = debounce(function () {
272
230
  var _onResize;
273
-
274
231
  (_onResize = onResize) === null || _onResize === void 0 ? void 0 : _onResize();
275
-
276
232
  if (footerSuction) {
277
233
  getFooterSuctionState();
278
234
  }
279
-
280
235
  if (fixedTableBody) {
281
236
  getHeaderHeight(fullscreenState);
282
237
  }
@@ -286,44 +241,37 @@ var ProTable = function ProTable(props) {
286
241
  if (footerSuction) {
287
242
  getFooterSuctionState();
288
243
  }
289
-
290
244
  if (fixedTableBody) {
291
245
  getHeaderHeight(fullscreenState);
292
246
  }
293
247
  }, 500);
294
- } // 如果不传 dataFilter,则在这里初始化请求
295
-
248
+ }
296
249
 
250
+ // 如果不传 dataFilter,则在这里初始化请求
297
251
  var hasDataFilter = (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : (_propsDataFilter$sche = propsDataFilter.schema) === null || _propsDataFilter$sche === void 0 ? void 0 : _propsDataFilter$sche.length) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : (_propsDataFilter$sche2 = propsDataFilter.schema) === null || _propsDataFilter$sche2 === void 0 ? void 0 : _propsDataFilter$sche2.length) > 0;
298
-
299
252
  if (requestWhenMount && !hasDataFilter) {
300
253
  processDefaultFilter(propsColumns, actionRef, defaultFilterParams);
301
-
302
254
  _request();
303
255
  }
304
-
305
256
  return function () {
306
257
  if (onResize) {
307
258
  window.onresize = onResize;
308
259
  } else {
309
260
  window.onresize = null;
310
261
  }
311
-
312
262
  if (autoRefreshTimerRef.current) {
313
263
  clearTimeout(autoRefreshTimerRef.current);
314
264
  }
315
-
316
265
  actionRef.current = undefined;
317
266
  };
318
- }, []); // 获取header高度,用作全屏吸底吸底高度计算以及固定body高度计算(滚动条在底部)
267
+ }, []);
319
268
 
269
+ // 获取header高度,用作全屏吸底吸底高度计算以及固定body高度计算(滚动条在底部)
320
270
  var getHeaderHeight = function getHeaderHeight(isFullscreen, offset) {
321
271
  var _tableDom$getElements, _tableDom$getElements2, _document$querySelect, _document$querySelect2, _document$querySelect3;
322
-
323
272
  if (!fixedTableBody) {
324
273
  return;
325
274
  }
326
-
327
275
  var tableDom = tableRef.current;
328
276
  var headerDom = tableDom === null || tableDom === void 0 ? void 0 : (_tableDom$getElements = tableDom.getElementsByClassName('teamix-pro-table-layout')) === null || _tableDom$getElements === void 0 ? void 0 : _tableDom$getElements[0];
329
277
  var basePrefix = usePrefixCls('', {
@@ -332,95 +280,92 @@ var ProTable = function ProTable(props) {
332
280
  var tableHeaderDom = tableDom === null || tableDom === void 0 ? void 0 : (_tableDom$getElements2 = tableDom.getElementsByClassName(basePrefix('table-header-inner'))) === null || _tableDom$getElements2 === void 0 ? void 0 : _tableDom$getElements2[0];
333
281
  var pageContainerDom = document.querySelector('.teamix-pro-page-container-header');
334
282
  var teamixNavDom = document.querySelector('.teamix-nav-console');
335
- var footerRowSelectionDom = document.querySelector('.teamix-pro-page-container-footer'); // 这边不能直接取 next-table-body
336
-
283
+ var footerRowSelectionDom = document.querySelector('.teamix-pro-page-container-footer');
284
+ // 这边不能直接取 next-table-body
337
285
  var tableBodyDom = (_document$querySelect = document.querySelector('.teamix-pro-table')) === null || _document$querySelect === void 0 ? void 0 : (_document$querySelect2 = _document$querySelect.getElementsByTagName('table')) === null || _document$querySelect2 === void 0 ? void 0 : (_document$querySelect3 = _document$querySelect2[1]) === null || _document$querySelect3 === void 0 ? void 0 : _document$querySelect3.parentNode;
338
286
  var headerFixedTopSectionDom = document.querySelector('.teamix-pro-page-container-fixed-top');
339
287
  setTimeout(function () {
340
288
  var _headerDom$offsetHeig, _tableHeaderDom$offse;
341
-
342
- var headerHeight = (_headerDom$offsetHeig = headerDom === null || headerDom === void 0 ? void 0 : headerDom.offsetHeight) !== null && _headerDom$offsetHeig !== void 0 ? _headerDom$offsetHeig : 0; // table表头默认一行。即42px
343
-
289
+ var headerHeight = (_headerDom$offsetHeig = headerDom === null || headerDom === void 0 ? void 0 : headerDom.offsetHeight) !== null && _headerDom$offsetHeig !== void 0 ? _headerDom$offsetHeig : 0;
290
+ // table表头默认一行。即42px
344
291
  var tableHeaderHeight = (_tableHeaderDom$offse = tableHeaderDom === null || tableHeaderDom === void 0 ? void 0 : tableHeaderDom.offsetHeight) !== null && _tableHeaderDom$offse !== void 0 ? _tableHeaderDom$offse : 42;
345
- var footerRowSelectionHeight = (footerRowSelectionDom === null || footerRowSelectionDom === void 0 ? void 0 : footerRowSelectionDom.offsetHeight) || 50; // 固定表格主体高度
346
-
292
+ var footerRowSelectionHeight = (footerRowSelectionDom === null || footerRowSelectionDom === void 0 ? void 0 : footerRowSelectionDom.offsetHeight) || 50;
293
+ // 固定表格主体高度
347
294
  if (fixedTableBody && !isFullscreen) {
348
295
  var _pageContainerDom$off, _teamixNavDom$offsetH;
349
-
350
296
  // 16px 为 padding
351
297
  var pageHeaderHeight = ((_pageContainerDom$off = pageContainerDom === null || pageContainerDom === void 0 ? void 0 : pageContainerDom.offsetHeight) !== null && _pageContainerDom$off !== void 0 ? _pageContainerDom$off : 0) + 16;
352
- var teamixNavHeight = (_teamixNavDom$offsetH = teamixNavDom === null || teamixNavDom === void 0 ? void 0 : teamixNavDom.offsetHeight) !== null && _teamixNavDom$offsetH !== void 0 ? _teamixNavDom$offsetH : 0; // 1 为预留值,js无法取出精确高度,会被四舍五入
298
+ var teamixNavHeight = (_teamixNavDom$offsetH = teamixNavDom === null || teamixNavDom === void 0 ? void 0 : teamixNavDom.offsetHeight) !== null && _teamixNavDom$offsetH !== void 0 ? _teamixNavDom$offsetH : 0;
353
299
 
300
+ // 1 为预留值,js无法取出精确高度,会被四舍五入
354
301
  var offsetHeaderHeight = headerHeight + tableHeaderHeight + pageHeaderHeight + teamixNavHeight + footerRowSelectionHeight + 16 + (offset !== null && offset !== void 0 ? offset : 0) + 1;
355
-
356
302
  if (tableBodyDom.clientHeight < tableBodyDom.scrollHeight) {
357
303
  setFooterSuctionState(true);
358
304
  } else {
359
305
  setFooterSuctionState(false);
360
- } // 如果有切换区tab,那么重新计算
361
-
306
+ }
362
307
 
308
+ // 如果有切换区tab,那么重新计算
363
309
  if (headerFixedTopSectionDom.clientHeight) {
364
310
  var _headerFixedTopSectio;
311
+ var headerFixedTopSectionHeight = (_headerFixedTopSectio = headerFixedTopSectionDom.clientHeight) !== null && _headerFixedTopSectio !== void 0 ? _headerFixedTopSectio : 0;
365
312
 
366
- var headerFixedTopSectionHeight = (_headerFixedTopSectio = headerFixedTopSectionDom.clientHeight) !== null && _headerFixedTopSectio !== void 0 ? _headerFixedTopSectio : 0; // const clientTableBodyHeight =
313
+ // const clientTableBodyHeight =
367
314
  // document.body.clientHeight - offsetHeaderHeight;
368
315
 
369
316
  setHeaderHeight(headerFixedTopSectionHeight + teamixNavHeight + footerRowSelectionHeight + tableHeaderHeight + 1);
370
317
  return;
371
318
  }
372
-
373
319
  setHeaderHeight(offsetHeaderHeight);
374
320
  } else {
375
321
  // 24px 为 padding
376
322
  setHeaderHeight(headerHeight + tableHeaderHeight + footerRowSelectionHeight + 24 + (offset !== null && offset !== void 0 ? offset : 0) + 1);
377
323
  }
378
324
  }, 50);
379
- }; // header 区域高度。用作全屏计算吸顶吸底高度。默认不做计算
380
-
325
+ };
381
326
 
327
+ // header 区域高度。用作全屏计算吸顶吸底高度。默认不做计算
382
328
  var _useState25 = useState(0),
383
- _useState26 = _slicedToArray(_useState25, 2),
384
- headerHeight = _useState26[0],
385
- setHeaderHeight = _useState26[1]; // 全屏显示 className
386
-
329
+ _useState26 = _slicedToArray(_useState25, 2),
330
+ headerHeight = _useState26[0],
331
+ setHeaderHeight = _useState26[1];
387
332
 
333
+ // 全屏显示 className
388
334
  var _useState27 = useState(false),
389
- _useState28 = _slicedToArray(_useState27, 2),
390
- fullscreenState = _useState28[0],
391
- setFullscreenState = _useState28[1]; // 切换全屏搜索开关
392
-
393
-
335
+ _useState28 = _slicedToArray(_useState27, 2),
336
+ fullscreenState = _useState28[0],
337
+ setFullscreenState = _useState28[1];
338
+ // 切换全屏搜索开关
394
339
  var filterEnableRef = useRef({
395
340
  fullscreen: false,
396
341
  normal: true
397
- }); // 非全屏状态下的
342
+ });
398
343
 
344
+ // 非全屏状态下的
399
345
  var normalDataFilterFormRef = useRef();
400
346
  var fullscreenDataFilterFormRef = useRef();
401
347
  var normalDataFilterForm = normalDataFilterFormRef.current;
402
- var fullscreenDataFilterForm = fullscreenDataFilterFormRef.current; // 传给 QueryFilter 的 formRef
348
+ var fullscreenDataFilterForm = fullscreenDataFilterFormRef.current;
403
349
 
404
- var dataFilterFormRef = !fullscreenState ? normalDataFilterFormRef : fullscreenDataFilterFormRef; // let dataFilterForm = dataFilterFormRef.current;
405
- // 整个内容区是否超过一屏。用于表格在非全屏模式下的吸底
350
+ // 传给 QueryFilter formRef
351
+ var dataFilterFormRef = !fullscreenState ? normalDataFilterFormRef : fullscreenDataFilterFormRef;
352
+ // let dataFilterForm = dataFilterFormRef.current;
406
353
 
354
+ // 整个内容区是否超过一屏。用于表格在非全屏模式下的吸底
407
355
  var _useState29 = useState(false),
408
- _useState30 = _slicedToArray(_useState29, 2),
409
- footerSuctionState = _useState30[0],
410
- setFooterSuctionState = _useState30[1]; // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
411
-
356
+ _useState30 = _slicedToArray(_useState29, 2),
357
+ footerSuctionState = _useState30[0],
358
+ setFooterSuctionState = _useState30[1];
412
359
 
360
+ // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
413
361
  var getFooterSuctionState = function getFooterSuctionState() {
414
362
  if (!footerSuction) {
415
363
  return;
416
364
  }
417
-
418
365
  var containerDom = document.querySelector('.teamix-pro-page-container-scroll-container');
419
-
420
366
  if (containerDom) {
421
367
  var offsetHeight = containerDom.offsetHeight;
422
368
  var scrollHeight = containerDom.scrollHeight;
423
-
424
369
  if (offsetHeight < scrollHeight) {
425
370
  setFooterSuctionState(true);
426
371
  } else {
@@ -432,35 +377,29 @@ var ProTable = function ProTable(props) {
432
377
  setFooterSuctionState(true);
433
378
  }
434
379
  }
435
- }; // rowSelection 相关
436
-
380
+ };
437
381
 
382
+ // rowSelection 相关
438
383
  var rowSelectionHook = useTableSelection(_objectSpread(_objectSpread({}, propsRowSelection), {}, {
439
384
  // 当初始出现骨架屏的时候,不可选择
440
385
  getProps: function getProps(record, index) {
441
386
  var result = {};
442
-
443
387
  if (propsRowSelection === null || propsRowSelection === void 0 ? void 0 : propsRowSelection.getProps) {
444
388
  result = propsRowSelection.getProps(record, index);
445
389
  }
446
-
447
390
  if (showSkeleton && result) {
448
391
  result.disabled = true;
449
392
  }
450
-
451
393
  return result;
452
394
  },
453
395
  titleProps: function titleProps() {
454
396
  var result = {};
455
-
456
397
  if (propsRowSelection === null || propsRowSelection === void 0 ? void 0 : propsRowSelection.titleProps) {
457
398
  result = propsRowSelection.titleProps();
458
399
  }
459
-
460
400
  if (showSkeleton || disableSelectAll) {
461
401
  result.disabled = true;
462
402
  }
463
-
464
403
  return result;
465
404
  },
466
405
  onChange: onChangeRowSelection
@@ -469,21 +408,21 @@ var ProTable = function ProTable(props) {
469
408
  var selectedCount = (rowSelection === null || rowSelection === void 0 ? void 0 : (_rowSelection$selecte = rowSelection.selectedRowKeys) === null || _rowSelection$selecte === void 0 ? void 0 : _rowSelection$selecte.length) || 0;
470
409
  useEffect(function () {
471
410
  getRowSelection && getRowSelection(rowSelectionHook);
472
- }, [rowSelectionHook]); // 获取 table 左下角 checkbox 属性
411
+ }, [rowSelectionHook]);
473
412
 
413
+ // 获取 table 左下角 checkbox 属性
474
414
  function getCheckAllProps() {
475
- var _rowSelection$onChang = rowSelection.onChange,
476
- _onChange = _rowSelection$onChang === void 0 ? function () {} : _rowSelection$onChang,
477
- _rowSelection$onSelec = rowSelection.onSelectAll,
478
- onSelectAll = _rowSelection$onSelec === void 0 ? function () {} : _rowSelection$onSelec,
479
- _rowSelection$selecte2 = rowSelection.selectedRowKeys,
480
- selectedRowKeys = _rowSelection$selecte2 === void 0 ? [] : _rowSelection$selecte2,
481
- getProps = rowSelection.getProps;
482
-
415
+ var _ref = rowSelection,
416
+ _ref$onChange = _ref.onChange,
417
+ _onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
418
+ _ref$onSelectAll = _ref.onSelectAll,
419
+ onSelectAll = _ref$onSelectAll === void 0 ? function () {} : _ref$onSelectAll,
420
+ _ref$selectedRowKeys = _ref.selectedRowKeys,
421
+ selectedRowKeys = _ref$selectedRowKeys === void 0 ? [] : _ref$selectedRowKeys,
422
+ getProps = _ref.getProps;
483
423
  var dataSource = data;
484
424
  var allRowKeys = dataSource.filter(function (d, i) {
485
425
  var _getProps;
486
-
487
426
  return getProps ? !((_getProps = getProps(d, i)) === null || _getProps === void 0 ? void 0 : _getProps.disabled) : true;
488
427
  }).map(function (d) {
489
428
  return getDeepValue(primaryKey || 'id', d);
@@ -499,15 +438,12 @@ var ProTable = function ProTable(props) {
499
438
  result.push.apply(result, _toConsumableArray(allRowKeys.filter(function (k) {
500
439
  return !selectedRowKeys.includes(k);
501
440
  })));
502
-
503
441
  _onChange(result, dataSource);
504
-
505
442
  onSelectAll(check, dataSource);
506
443
  } else {
507
444
  _onChange(selectedRowKeys.filter(function (k) {
508
445
  return !allRowKeys.includes(k);
509
446
  }), []);
510
-
511
447
  onSelectAll(check, []);
512
448
  }
513
449
  },
@@ -515,7 +451,6 @@ var ProTable = function ProTable(props) {
515
451
  checked: nowCheckedKeys.length !== 0 && nowCheckedKeys.length === allRowKeys.length
516
452
  };
517
453
  }
518
-
519
454
  useEffect(function () {
520
455
  if (typeof propsActionRef === 'function' && actionRef.current) {
521
456
  // @ts-ignore
@@ -524,18 +459,19 @@ var ProTable = function ProTable(props) {
524
459
  }, [propsActionRef]);
525
460
  useEffect(function () {
526
461
  var _actionRef$current, _actionRef$current$se;
527
-
528
462
  var columns = processColumns(propsColumns !== null && propsColumns !== void 0 ? propsColumns : [], propsColumns);
529
463
  setFilteredColumns(columns);
530
464
  (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$se = _actionRef$current.setState) === null || _actionRef$current$se === void 0 ? void 0 : _actionRef$current$se.call(_actionRef$current, 'filterColumns', columns);
531
- }, [propsColumns]); // dataSource 受控
465
+ }, [propsColumns]);
532
466
 
467
+ // dataSource 受控
533
468
  useEffect(function () {
534
469
  if (propsDataSource) {
535
470
  setData(propsDataSource);
536
471
  }
537
- }, [propsDataSource]); // 初始化 ActionRef。
472
+ }, [propsDataSource]);
538
473
 
474
+ // 初始化 ActionRef。
539
475
  initActionRef(actionRef, {
540
476
  getState: function getState() {
541
477
  return actionRefState;
@@ -551,32 +487,29 @@ var ProTable = function ProTable(props) {
551
487
  if (!actionRefCallback[state]) {
552
488
  actionRefCallback[state] = {};
553
489
  }
554
-
555
490
  actionRefCallback[state][name] = fun;
556
491
  },
557
492
  off: function off(name) {
558
- actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref) {
559
- var _ref2 = _slicedToArray(_ref, 2),
560
- k = _ref2[0],
561
- v = _ref2[1];
562
-
563
- var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref3) {
564
- var _ref4 = _slicedToArray(_ref3, 1),
565
- k = _ref4[0];
566
-
493
+ actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref2) {
494
+ var _ref3 = _slicedToArray(_ref2, 2),
495
+ k = _ref3[0],
496
+ v = _ref3[1];
497
+ var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref4) {
498
+ var _ref5 = _slicedToArray(_ref4, 1),
499
+ k = _ref5[0];
567
500
  return k !== name;
568
501
  }));
569
502
  return [k, filterV];
570
503
  }));
571
504
  }
572
- }); // 绑定 Actions
505
+ });
573
506
 
507
+ // 绑定 Actions
574
508
  useActionType(actionRef, {
575
509
  fullScreen: function fullScreen() {
576
510
  var _actionRef$current2, _actionRef$current2$s;
577
-
578
- var state = !fullscreenState; // 全屏时需要重新计算header高度
579
-
511
+ var state = !fullscreenState;
512
+ // 全屏时需要重新计算header高度
580
513
  setFullscreenState(state);
581
514
  getHeaderHeight(state);
582
515
  actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$s = _actionRef$current2.setState) === null || _actionRef$current2$s === void 0 ? void 0 : _actionRef$current2$s.call(_actionRef$current2, 'fullScreenState', state);
@@ -584,12 +517,10 @@ var ProTable = function ProTable(props) {
584
517
  },
585
518
  setColumn: function setColumn(newColumns) {
586
519
  var _actionRef$current3, _actionRef$current3$s;
587
-
588
520
  var update = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
589
521
  var columns = processColumns(newColumns, propsColumns);
590
522
  setFilteredColumns(columns);
591
523
  (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$s = _actionRef$current3.setState) === null || _actionRef$current3$s === void 0 ? void 0 : _actionRef$current3$s.call(_actionRef$current3, 'filterColumns', columns);
592
-
593
524
  if (update) {
594
525
  emit('refreshFilterState', newColumns);
595
526
  }
@@ -606,22 +537,18 @@ var ProTable = function ProTable(props) {
606
537
  if (params === null || params === void 0 ? void 0 : params[targetPageKey]) {
607
538
  setCurrentPage(params[targetPageKey]);
608
539
  }
609
-
610
540
  if (params === null || params === void 0 ? void 0 : params[targetPageSizeKey]) {
611
541
  setPageSize(params[targetPageSizeKey]);
612
542
  }
613
-
614
543
  _request(params);
615
544
  },
616
545
  reset: function reset() {
617
546
  var _actionRef$current4, _actionRef$current4$s, _dataFilterFormRef$cu;
618
-
619
- (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset()); // 清空列过滤参数
620
-
547
+ (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset());
548
+ // 清空列过滤参数
621
549
  (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$s = _actionRef$current4.setFilterRules) === null || _actionRef$current4$s === void 0 ? void 0 : _actionRef$current4$s.call(_actionRef$current4, {});
622
550
  (_dataFilterFormRef$cu = dataFilterFormRef.current) === null || _dataFilterFormRef$cu === void 0 ? void 0 : _dataFilterFormRef$cu.reset();
623
551
  setCurrentPage(1);
624
-
625
552
  _request(_defineProperty({}, targetPageKey, 1));
626
553
  },
627
554
  resetPage: function resetPage() {
@@ -649,32 +576,29 @@ var ProTable = function ProTable(props) {
649
576
  resetTableMaxBodyHeight: function resetTableMaxBodyHeight(offset) {
650
577
  getHeaderHeight(fullscreenState, offset);
651
578
  }
652
- }); // 将 Actions 绑定到传入的 propsActionRef 中
579
+ });
653
580
 
581
+ // 将 Actions 绑定到传入的 propsActionRef 中
654
582
  if (propsActionRef) {
655
583
  propsActionRef.current = actionRef.current;
656
584
  }
657
-
658
585
  function onFormatResult(next) {
659
586
  var _next$data;
660
-
661
587
  props.onFormatResult && props.onFormatResult(next);
662
588
  var time = autoRefresh ? autoRefresh(next.data) : false;
663
-
664
589
  if (Number.isInteger(time) && time >= 1000) {
665
590
  autoRefreshTimerRef.current = setTimeout(function () {
666
591
  // 自动刷新不显示 loading
667
592
  _request({}, true);
668
593
  }, Number(time));
669
- } // 设置 dataSource、total
670
-
671
-
594
+ }
595
+ // 设置 dataSource、total
672
596
  setData(next.data || []);
673
597
  setTotal(next.total || ((_next$data = next.data) === null || _next$data === void 0 ? void 0 : _next$data.length));
674
598
  setShowSkeleton(false);
675
- } // 请求表格数据工具函数
676
-
599
+ }
677
600
 
601
+ // 请求表格数据工具函数
678
602
  var getData = useRequest(function (params) {
679
603
  return _defineProperty({
680
604
  url: url,
@@ -690,7 +614,6 @@ var ProTable = function ProTable(props) {
690
614
  onSuccess: function onSuccess(result) {
691
615
  props.onSuccess && props.onSuccess(result);
692
616
  var nextData = result;
693
-
694
617
  if (formatResult) {
695
618
  if (typeof formatResult === 'function') {
696
619
  nextData = formatResult(result) || {};
@@ -702,7 +625,6 @@ var ProTable = function ProTable(props) {
702
625
  };
703
626
  }
704
627
  }
705
-
706
628
  if (nextData instanceof Promise) {
707
629
  nextData.then(function (res) {
708
630
  onFormatResult(res);
@@ -711,62 +633,56 @@ var ProTable = function ProTable(props) {
711
633
  });
712
634
  } else {
713
635
  onFormatResult(nextData);
714
- } // 重新计算是否需要吸底
715
-
716
-
636
+ }
637
+ // 重新计算是否需要吸底
717
638
  if (footerSuction) {
718
639
  getFooterSuctionState();
719
640
  }
720
-
721
641
  if (fixedTableBody) {
722
642
  getHeaderHeight(fullscreenState);
723
643
  }
724
644
  },
725
645
  onError: function onError(error) {
726
646
  setShowSkeleton(false);
727
-
728
647
  if (props.onError) {
729
648
  props.onError(error);
730
- } else {// Message.error(error.toString());
731
- } // 重新计算是否需要吸底
732
-
733
-
649
+ } else {
650
+ // Message.error(error.toString());
651
+ }
652
+ // 重新计算是否需要吸底
734
653
  if (footerSuction) {
735
654
  getFooterSuctionState();
736
655
  }
737
-
738
656
  if (fixedTableBody) {
739
657
  getHeaderHeight(fullscreenState);
740
658
  }
741
659
  }
742
- }); // 请求函数
660
+ });
743
661
 
662
+ // 请求函数
744
663
  function _request(params, noLoading, filterParams) {
745
664
  var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current5, _actionRef$current5$g, _objectSpread2;
746
-
747
665
  // 如果没有传 url 且没有 customRequest,直接返回
748
666
  if (!url && !customRequest) {
749
667
  return;
750
668
  }
751
-
752
669
  var nextShowLoading = !noLoading;
753
- nextShowLoading !== showLoading && setShowLoading(nextShowLoading); // 请求前需要优先清空列过滤条件
670
+ nextShowLoading !== showLoading && setShowLoading(nextShowLoading);
671
+ // 请求前需要优先清空列过滤条件
754
672
  // actionRef.current?.setFilterRules?.({});
673
+ var sortParams = targetFormatSort(sort);
674
+ // 筛选区请求参数
675
+ var dataFilterParams = filterParams !== null && filterParams !== void 0 ? filterParams : (_dataFilterFormRef$cu2 = dataFilterFormRef.current) === null || _dataFilterFormRef$cu2 === void 0 ? void 0 : _dataFilterFormRef$cu2.values;
676
+ // 列过滤请求参数
677
+ var columnsFilterParams = (_actionRef$current$ge = (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : (_actionRef$current5$g = _actionRef$current5.getFilterRules) === null || _actionRef$current5$g === void 0 ? void 0 : _actionRef$current5$g.call(_actionRef$current5)) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {};
755
678
 
756
- var sortParams = targetFormatSort(sort); // 筛选区请求参数
757
-
758
- var dataFilterParams = filterParams !== null && filterParams !== void 0 ? filterParams : (_dataFilterFormRef$cu2 = dataFilterFormRef.current) === null || _dataFilterFormRef$cu2 === void 0 ? void 0 : _dataFilterFormRef$cu2.values; // 列过滤请求参数
759
-
760
- var columnsFilterParams = (_actionRef$current$ge = (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : (_actionRef$current5$g = _actionRef$current5.getFilterRules) === null || _actionRef$current5$g === void 0 ? void 0 : _actionRef$current5$g.call(_actionRef$current5)) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {}; // 格式化后的请求参数
761
-
679
+ // 格式化后的请求参数
762
680
  var requestData = formatParams(_objectSpread(_objectSpread({}, !showPagination ? _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams) : _objectSpread(_objectSpread(_objectSpread(_objectSpread((_objectSpread2 = {}, _defineProperty(_objectSpread2, targetPageKey, currentPage), _defineProperty(_objectSpread2, targetPageSizeKey, pageSize), _objectSpread2), dataFilterParams), propsParams), sortParams), columnsFilterParams)), params));
763
-
764
681
  if (requestData) {
765
682
  if (autoRefreshTimerRef.current) {
766
683
  clearTimeout(autoRefreshTimerRef.current);
767
684
  autoRefreshTimerRef.current = null;
768
685
  }
769
-
770
686
  if (!(propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.searchUndefined)) {
771
687
  Object.keys(requestData).forEach(function (key) {
772
688
  if (requestData[key] === undefined) {
@@ -774,43 +690,38 @@ var ProTable = function ProTable(props) {
774
690
  }
775
691
  });
776
692
  }
777
-
778
693
  if (!(propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.searchEmptyString)) {
779
694
  Object.keys(requestData).forEach(function (key) {
780
695
  if (requestData[key] === '') {
781
696
  delete requestData[key];
782
697
  }
783
698
  });
784
- } // 如果使用自定义请求
785
-
786
-
699
+ }
700
+ // 如果使用自定义请求
787
701
  if (customRequest && typeof customRequest === 'function') {
788
702
  setCustomTableLoading(true);
789
703
  customRequest(requestData).then(function (res) {
790
704
  var data = res.data,
791
- total = res.total,
792
- success = res.success;
793
-
705
+ total = res.total,
706
+ success = res.success;
794
707
  if (success === true) {
795
708
  // 设置 dataSource、total
796
709
  setData(data || []);
797
710
  setTotal(total || (data === null || data === void 0 ? void 0 : data.length));
798
711
  setShowSkeleton(false);
799
712
  setCustomTableLoading(false);
800
- } // 重新计算是否需要吸底
801
-
713
+ }
802
714
 
715
+ // 重新计算是否需要吸底
803
716
  if (footerSuction) {
804
717
  getFooterSuctionState();
805
718
  }
806
-
807
719
  if (fixedTableBody) {
808
720
  getHeaderHeight(fullscreenState);
809
- } // customRequest 中支持 autoRefresh
810
-
721
+ }
811
722
 
723
+ // customRequest 中支持 autoRefresh
812
724
  var time = autoRefresh ? autoRefresh(data) : false;
813
-
814
725
  if (Number.isInteger(time) && time >= 1000) {
815
726
  autoRefreshTimerRef.current = setTimeout(function () {
816
727
  // 自动刷新不显示 loading
@@ -823,23 +734,19 @@ var ProTable = function ProTable(props) {
823
734
  }
824
735
  }
825
736
  }
826
-
827
737
  function onSort(dataIndex, order) {
828
738
  var nextSort = _defineProperty({}, dataIndex, order);
829
-
830
739
  setSort(nextSort);
831
-
832
740
  _request(targetFormatSort(nextSort));
833
- } // 处理 dataFilter 中的 onFilter、onReset
834
-
741
+ }
835
742
 
743
+ // 处理 dataFilter 中的 onFilter、onReset
836
744
  var dataFilter = _objectSpread(_objectSpread({
837
745
  mode: 'inline',
838
746
  forceClear: true
839
747
  }, propsDataFilter), {}, {
840
748
  onInit: (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onInit) || requestWhenMount ? function (values) {
841
749
  var _propsDataFilter$onIn;
842
-
843
750
  // 表单初始化请求处理
844
751
  propsDataFilter === null || propsDataFilter === void 0 ? void 0 : (_propsDataFilter$onIn = propsDataFilter.onInit) === null || _propsDataFilter$onIn === void 0 ? void 0 : _propsDataFilter$onIn.call(propsDataFilter, values);
845
752
  !fullscreenState && requestWhenMount && _request({}, false, values);
@@ -847,39 +754,32 @@ var ProTable = function ProTable(props) {
847
754
  } : undefined,
848
755
  onFilter: function onFilter(values) {
849
756
  var _actionRef$current6, _actionRef$current6$c;
850
-
851
757
  // 全屏状态,判断全屏表单onFilter是否禁用
852
758
  if (fullscreenState && !filterEnableRef.current.fullscreen) {
853
759
  filterEnableRef.current.fullscreen = true;
854
760
  return;
855
- } // 非全屏状态,判断普通表单onFiler是否禁用
856
-
857
-
761
+ }
762
+ // 非全屏状态,判断普通表单onFiler是否禁用
858
763
  if (!fullscreenState && !filterEnableRef.current.normal) {
859
764
  filterEnableRef.current.normal = true;
860
765
  return;
861
766
  }
862
-
863
- (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter(values)); // 搜索变化时,暂时先清空选择
864
-
767
+ (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter(values));
768
+ // 搜索变化时,暂时先清空选择
865
769
  (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$c = _actionRef$current6.clearRowSelection) === null || _actionRef$current6$c === void 0 ? void 0 : _actionRef$current6$c.call(_actionRef$current6);
866
770
  setCurrentPage(1);
867
771
  console.log('currentPageSize1', pageSize);
868
-
869
772
  _request(_defineProperty({}, targetPageKey, 1), false, values);
870
773
  },
871
774
  onReset: function onReset(values) {
872
775
  var _dataFilterFormRef$cu3;
873
-
874
776
  (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset());
875
777
  (_dataFilterFormRef$cu3 = dataFilterFormRef.current) === null || _dataFilterFormRef$cu3 === void 0 ? void 0 : _dataFilterFormRef$cu3.reset();
876
778
  setCurrentPage(1);
877
779
  console.log('currentPageSize2', pageSize);
878
-
879
780
  _request(_defineProperty({}, targetPageKey, 1), false, values);
880
781
  }
881
782
  });
882
-
883
783
  var getTableLoading = function getTableLoading() {
884
784
  if (!customRequest) {
885
785
  return showLoading && !showSkeleton && (getData.loading || props.loading);
@@ -887,7 +787,6 @@ var ProTable = function ProTable(props) {
887
787
  return showLoading && !showSkeleton && (customTableLoading || props.loading);
888
788
  }
889
789
  };
890
-
891
790
  var renderTable = function renderTable(isFullScreen) {
892
791
  if (propsColumns) {
893
792
  return /*#__PURE__*/React.createElement("div", {
@@ -908,7 +807,7 @@ var ProTable = function ProTable(props) {
908
807
  rowSelection: rowSelection,
909
808
  filterColumnType: filterColumnType,
910
809
  fullScreenState: isFullScreen
911
- }), /*#__PURE__*/React.createElement(Table.StickyLock, _objectSpread({
810
+ }), /*#__PURE__*/React.createElement(Table.StickyLock, _extends({
912
811
  hasBorder: false,
913
812
  dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
914
813
  columns: genProColumnToColumn(filteredColumns, showSkeleton, actionRef, context),
@@ -927,75 +826,61 @@ var ProTable = function ProTable(props) {
927
826
  sortIcons: getTableSortIcons(),
928
827
  fixedHeader: fullscreenState || fixedTableBody,
929
828
  maxBodyHeight: "calc(100vh - ".concat(headerHeight, "px)")
829
+ // 过滤出可以传到 Table 的 Props
930
830
  }, pickProps(getTableProps(), otherProps))));
931
831
  } else {
932
832
  // 不传 columns 直接返回原始 Table
933
- return /*#__PURE__*/React.createElement(Table, _objectSpread({
833
+ return /*#__PURE__*/React.createElement(Table, _extends({
934
834
  className: cls()
935
835
  }, pickProps(getTableProps(), otherProps)));
936
836
  }
937
837
  };
938
-
939
838
  var renderFooterAction = function renderFooterAction() {
940
- var _footerAction$actions;
941
-
942
- if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (_footerAction$actions = footerAction.actions) === null || _footerAction$actions === void 0 ? void 0 : _footerAction$actions.length) >= 0) {
839
+ var _actions;
840
+ if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (_actions = footerAction.actions) === null || _actions === void 0 ? void 0 : _actions.length) >= 0) {
943
841
  // 默认 context
944
842
  var defaultContext = {
945
843
  action: actionRef.current,
946
844
  rowSelection: rowSelection
947
- }; // 未选择的时候所有 button 默认 disabled
948
-
845
+ };
846
+ // 未选择的时候所有 button 默认 disabled
949
847
  var targetActions = footerAction.actions.map(function (action) {
950
848
  return _objectSpread(_objectSpread({}, action), {}, {
951
849
  disabled: (action === null || action === void 0 ? void 0 : action.disabled) || selectedCount === 0
952
850
  });
953
851
  });
954
-
955
852
  var targetFooterActions = _objectSpread(_objectSpread({}, footerAction), {}, {
956
853
  actions: targetActions
957
854
  });
958
-
959
855
  return /*#__PURE__*/React.createElement("div", {
960
856
  className: cls('footer-action')
961
- }, /*#__PURE__*/React.createElement(ProActionGroup, _objectSpread(_objectSpread({}, targetFooterActions), {}, {
857
+ }, /*#__PURE__*/React.createElement(ProActionGroup, _extends({}, targetFooterActions, {
962
858
  context: _objectSpread(_objectSpread({}, defaultContext), targetFooterActions === null || targetFooterActions === void 0 ? void 0 : targetFooterActions.context)
963
859
  })));
964
860
  } else return footerAction;
965
861
  };
966
-
967
862
  var renderFooter = function renderFooter() {
968
863
  function onChangePagination(currentPage) {
969
864
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
970
-
971
865
  // 翻页默认清空选择
972
866
  if (!reserveSelectedRecords) {
973
867
  var _actionRef$current7, _actionRef$current7$c;
974
-
975
868
  (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$c = _actionRef$current7.clearRowSelection) === null || _actionRef$current7$c === void 0 ? void 0 : _actionRef$current7$c.call(_actionRef$current7);
976
869
  }
977
-
978
870
  setCurrentPage(currentPage);
979
-
980
871
  _request(_objectSpread(_defineProperty({}, targetPageKey, currentPage), params));
981
872
  }
982
-
983
873
  function onChangePaginationSize(currentPageSize) {
984
874
  var _request5;
985
-
986
875
  // 翻页默认清空选择
987
876
  if (!reserveSelectedRecords) {
988
877
  var _actionRef$current8, _actionRef$current8$c;
989
-
990
878
  (_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : (_actionRef$current8$c = _actionRef$current8.clearRowSelection) === null || _actionRef$current8$c === void 0 ? void 0 : _actionRef$current8$c.call(_actionRef$current8);
991
879
  }
992
-
993
880
  setPageSize(currentPageSize);
994
881
  setCurrentPage(1);
995
-
996
882
  _request((_request5 = {}, _defineProperty(_request5, targetPageSizeKey, currentPageSize), _defineProperty(_request5, targetPageKey, 1), _request5));
997
883
  }
998
-
999
884
  function renderRowSelection() {
1000
885
  if (rowSelection) {
1001
886
  if (showSkeleton) {
@@ -1005,7 +890,7 @@ var ProTable = function ProTable(props) {
1005
890
  } else {
1006
891
  return /*#__PURE__*/React.createElement("div", {
1007
892
  className: cls('footer-left-wrapper')
1008
- }, rowSelection.mode !== 'single' && /*#__PURE__*/React.createElement(Checkbox, _objectSpread({
893
+ }, rowSelection.mode !== 'single' && /*#__PURE__*/React.createElement(Checkbox, _extends({
1009
894
  className: cls("footer-checkbox-".concat(size))
1010
895
  }, getCheckAllProps())), footerAction && renderFooterAction(), /*#__PURE__*/React.createElement("span", {
1011
896
  className: cls('selected-msg')
@@ -1025,7 +910,6 @@ var ProTable = function ProTable(props) {
1025
910
  }
1026
911
  }
1027
912
  }
1028
-
1029
913
  if (showPagination) {
1030
914
  return /*#__PURE__*/React.createElement("div", {
1031
915
  className: cls('footer', {
@@ -1034,15 +918,16 @@ var ProTable = function ProTable(props) {
1034
918
  })
1035
919
  }, renderRowSelection(), /*#__PURE__*/React.createElement("div", {
1036
920
  className: cls('footer-right-wrapper')
1037
- }, showSkeleton ? /*#__PURE__*/React.createElement(Skeleton.Footer.Pagination, null) : /*#__PURE__*/React.createElement(React.Fragment, null, data.length > 0 && /*#__PURE__*/React.createElement(Pagination, _objectSpread({
921
+ }, showSkeleton ? /*#__PURE__*/React.createElement(Skeleton.Footer.Pagination, null) : /*#__PURE__*/React.createElement(React.Fragment, null, data.length > 0 && /*#__PURE__*/React.createElement(Pagination, _extends({
1038
922
  className: cls('pagination'),
1039
923
  onChange: function onChange(number) {
1040
924
  return onChangePagination(number);
1041
925
  },
1042
926
  total: total,
1043
- responsivePaginationType: responsivePaginationType,
927
+ responsivePaginationType: responsivePaginationType
1044
928
  // shape="arrow-only"
1045
929
  // pageSizePosition="end"
930
+ ,
1046
931
  totalRender: function totalRender(total) {
1047
932
  return getMessage('total', {
1048
933
  total: new Intl.NumberFormat().format(total)
@@ -1066,20 +951,18 @@ var ProTable = function ProTable(props) {
1066
951
  className: cls('footer-right-wrapper')
1067
952
  }, showSkeleton ? /*#__PURE__*/React.createElement(Skeleton.Footer.Pagination, null) : footer));
1068
953
  }
1069
- }; // 判断是否需要吸底
1070
-
954
+ };
1071
955
 
956
+ // 判断是否需要吸底
1072
957
  var fixFooterState = useMemo(function () {
1073
958
  if (fullscreenState) {
1074
959
  return false;
1075
960
  }
1076
-
1077
961
  if (fixedTableBody || footerSuction) {
1078
962
  if (footerSuctionState) {
1079
963
  return true;
1080
964
  }
1081
965
  }
1082
-
1083
966
  return false;
1084
967
  }, [fullscreenState, fixedTableBody, footerSuction, footerSuctionState]);
1085
968
  return /*#__PURE__*/React.createElement(FullScreen, {
@@ -1089,12 +972,12 @@ var ProTable = function ProTable(props) {
1089
972
  return /*#__PURE__*/React.createElement("div", {
1090
973
  className: cls({
1091
974
  '': true,
1092
- fullscreen: fullscreenState // 'footer-suction': footerSuctionState && footerSuction,
1093
-
975
+ fullscreen: fullscreenState
976
+ // 'footer-suction': footerSuctionState && footerSuction,
1094
977
  }),
978
+
1095
979
  ref: tableRef
1096
980
  }, renderTable(isFullScreen), fixFooterState && /*#__PURE__*/React.createElement(ProPageContainer.FixedFooter, null, renderFooter()), !fixFooterState && renderFooter());
1097
981
  });
1098
982
  };
1099
-
1100
983
  export default ProTable;