@teamix/pro 1.6.0-beta.4 → 1.6.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (613) hide show
  1. package/README.md +1 -1
  2. package/dist/pro.all.min.css +1 -0
  3. package/dist/pro.css +1 -1
  4. package/dist/pro.js +70007 -54355
  5. package/dist/pro.min.css +1 -1
  6. package/dist/pro.min.js +1 -1
  7. package/dist/pro.min.js.LICENSE.txt +9 -0
  8. package/dist/pro.xconsole.min.css +1 -0
  9. package/es/actions/base.d.ts +24 -0
  10. package/es/actions/base.js +1 -1
  11. package/es/actions/confirm.d.ts +7 -0
  12. package/es/actions/danger-confirm.d.ts +7 -0
  13. package/es/actions/danger-pop-confirm.d.ts +5 -0
  14. package/es/actions/dialog-component.d.ts +10 -0
  15. package/es/actions/dialog-component.js +4 -1
  16. package/es/actions/dialog-form.d.ts +29 -0
  17. package/es/actions/dialog-form.js +8 -8
  18. package/es/actions/dialog-info.d.ts +9 -0
  19. package/es/actions/dialog-table.d.ts +9 -0
  20. package/es/actions/dialog.d.ts +40 -0
  21. package/es/actions/dialog.js +8 -7
  22. package/es/actions/drawer-form.d.ts +6 -0
  23. package/es/actions/drawer-info.d.ts +6 -0
  24. package/es/actions/drawer-table.d.ts +6 -0
  25. package/es/actions/drawer.d.ts +6 -0
  26. package/es/actions/error.d.ts +7 -0
  27. package/es/actions/index.d.ts +114 -0
  28. package/es/actions/index.js +69 -60
  29. package/es/actions/index.scss +10 -1
  30. package/es/actions/link.d.ts +8 -0
  31. package/es/actions/link.js +4 -3
  32. package/es/actions/notice.d.ts +7 -0
  33. package/es/actions/pop-confirm.d.ts +9 -0
  34. package/es/actions/quick.d.ts +2 -0
  35. package/es/actions/quick.js +26 -0
  36. package/es/actions/request.d.ts +9 -0
  37. package/es/actions/request.js +4 -3
  38. package/es/actions/utils.d.ts +1 -0
  39. package/es/card/card-container.d.ts +18 -0
  40. package/es/card/card-container.js +5 -12
  41. package/es/card/divider.d.ts +6 -0
  42. package/es/card/divider.js +4 -2
  43. package/es/card/index.d.ts +109 -0
  44. package/es/card/index.js +11 -22
  45. package/es/card/index.scss +15 -0
  46. package/es/card/selectable.d.ts +13 -0
  47. package/es/card/selectable.js +4 -2
  48. package/es/card/tab.d.ts +6 -0
  49. package/es/card/tab.js +4 -2
  50. package/es/card/utils.d.ts +9 -0
  51. package/es/card/xconsole.scss +3 -0
  52. package/es/field/index.d.ts +3 -0
  53. package/es/form/Components/Editable/index.d.ts +20 -0
  54. package/es/form/Components/Editable/index.js +2 -2
  55. package/es/form/Components/FormGroup/index.d.ts +14 -0
  56. package/es/form/Components/FormGroup/index.js +3 -4
  57. package/es/form/Components/FormItem2/animation.scss +72 -0
  58. package/es/form/Components/FormItem2/grid.scss +173 -0
  59. package/es/form/Components/FormItem2/index.d.ts +41 -0
  60. package/es/form/Components/FormItem2/index.js +286 -0
  61. package/es/form/Components/FormItem2/main.scss +413 -0
  62. package/es/form/Components/FormItem2/scss/variable.scss +118 -0
  63. package/es/form/Components/FormItem2/style.d.ts +1 -0
  64. package/es/form/Components/FormItem2/style.js +1 -0
  65. package/es/form/Components/LightFilter/componentMap.d.ts +3 -0
  66. package/es/form/Components/LightFilter/index.d.ts +17 -0
  67. package/es/form/Components/LightFilter/index.js +2 -11
  68. package/es/form/Components/LightFilter/index.scss +4 -0
  69. package/es/form/Components/ProField/index.d.ts +2 -0
  70. package/es/form/Components/ProField/index.js +4 -2
  71. package/es/form/Components/ProField/mapDateFormat.d.ts +3 -0
  72. package/es/form/Components/Text/index.d.ts +8 -0
  73. package/es/form/Components/Text/index.js +4 -2
  74. package/es/form/Components/__builtins__/empty.d.ts +1 -0
  75. package/es/form/Components/__builtins__/empty.js +51 -0
  76. package/es/form/Components/__builtins__/hooks/index.d.ts +2 -0
  77. package/es/form/Components/__builtins__/hooks/index.js +2 -0
  78. package/es/form/Components/__builtins__/hooks/useClickAway.d.ts +5 -0
  79. package/es/form/Components/__builtins__/hooks/useClickAway.js +37 -0
  80. package/es/form/Components/__builtins__/hooks/usePrefixCls.d.ts +3 -0
  81. package/es/form/Components/__builtins__/hooks/usePrefixCls.js +8 -0
  82. package/es/form/Components/__builtins__/icons.d.ts +20 -0
  83. package/es/form/Components/__builtins__/icons.js +153 -0
  84. package/es/form/Components/__builtins__/index.d.ts +8 -0
  85. package/es/form/Components/__builtins__/index.js +8 -0
  86. package/es/form/Components/__builtins__/loading.d.ts +1 -0
  87. package/es/form/Components/__builtins__/loading.js +41 -0
  88. package/es/form/Components/__builtins__/mapSize.d.ts +1 -0
  89. package/es/form/Components/__builtins__/mapSize.js +13 -0
  90. package/es/form/Components/__builtins__/mapStatus.d.ts +2 -0
  91. package/es/form/Components/__builtins__/mapStatus.js +20 -0
  92. package/es/form/Components/__builtins__/moment.d.ts +2 -0
  93. package/es/form/Components/__builtins__/moment.js +47 -0
  94. package/es/form/Components/__builtins__/pickDataProps.d.ts +1 -0
  95. package/es/form/Components/__builtins__/pickDataProps.js +9 -0
  96. package/es/form/Components/form-layout/index.d.ts +74 -0
  97. package/es/form/Components/form-layout/index.js +71 -0
  98. package/es/form/Components/form-layout/main.scss +0 -0
  99. package/es/form/Components/form-layout/style.d.ts +1 -0
  100. package/es/form/Components/form-layout/style.js +3 -0
  101. package/es/form/Components/form-layout/useResponsiveFormLayout.d.ts +18 -0
  102. package/es/form/Components/form-layout/useResponsiveFormLayout.js +87 -0
  103. package/es/form/Filter/AdvancedFilter.d.ts +7 -0
  104. package/es/form/Filter/AdvancedFilter.js +16 -18
  105. package/es/form/Filter/Layout.d.ts +5 -0
  106. package/es/form/Filter/LightFilter.d.ts +7 -0
  107. package/es/form/Filter/LightFilter.js +9 -13
  108. package/es/form/Filter/SimpleFilter.d.ts +7 -0
  109. package/es/form/Filter/SimpleFilter.js +5 -8
  110. package/es/form/Filter/index.d.ts +9 -0
  111. package/es/form/Filter/index.js +19 -25
  112. package/es/form/Filter/index.scss +1 -0
  113. package/es/form/Filter/index2.d.ts +13 -0
  114. package/es/form/Filter/index2.js +20 -25
  115. package/es/form/Filter/index2.scss +1 -0
  116. package/es/form/Filter/useBindUrl.d.ts +2 -0
  117. package/es/form/Filter/useBindUrl.js +0 -3
  118. package/es/form/Filter/useSpecialProps.d.ts +6 -0
  119. package/es/form/Filter/useSpecialProps.js +0 -1
  120. package/es/form/ProForm/addCascadeEffect.d.ts +2 -0
  121. package/es/form/ProForm/customComponent.d.ts +3 -0
  122. package/es/form/ProForm/index.d.ts +5 -0
  123. package/es/form/ProForm/index.js +21 -17
  124. package/es/form/ProForm/useAutoLayout.d.ts +9 -0
  125. package/es/form/ProForm/useAutoLayout.js +0 -4
  126. package/es/form/ProForm/useAutoSubmit.d.ts +6 -0
  127. package/es/form/ProForm/useAutoSubmit.js +4 -3
  128. package/es/form/ProForm/useFieldRequest.d.ts +5 -0
  129. package/es/form/ProForm/useFormDisplayValues.d.ts +4 -0
  130. package/es/form/ProForm/useFormDisplayValues.js +0 -1
  131. package/es/form/ProForm/useInitialRequest.d.ts +6 -0
  132. package/es/form/SchemaForm/adapterComponent.d.ts +5 -0
  133. package/es/form/SchemaForm/adapterComponent.js +0 -1
  134. package/es/form/SchemaForm/adapterDecorator.d.ts +6 -0
  135. package/es/form/SchemaForm/adapterDecorator.js +0 -1
  136. package/es/form/SchemaForm/adapterType.d.ts +5 -0
  137. package/es/form/SchemaForm/adapterType.js +0 -1
  138. package/es/form/SchemaForm/index.d.ts +4 -0
  139. package/es/form/SchemaForm/index.js +0 -13
  140. package/es/form/SchemaForm/initializeArrayCards.d.ts +3 -0
  141. package/es/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
  142. package/es/form/SchemaForm/initializeArrayItems.d.ts +3 -0
  143. package/es/form/SchemaForm/initializeArrayTable.d.ts +3 -0
  144. package/es/form/SchemaForm/initializeDataSource.d.ts +15 -0
  145. package/es/form/SchemaForm/initializeDataSource.js +0 -7
  146. package/es/form/SchemaForm/initializeFormButton.d.ts +3 -0
  147. package/es/form/SchemaForm/initializeFormButton.js +0 -2
  148. package/es/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
  149. package/es/form/SchemaForm/initializeFormGroup.d.ts +3 -0
  150. package/es/form/SchemaForm/initializeFormStep.d.ts +5 -0
  151. package/es/form/SchemaForm/initializeFormTab.d.ts +3 -0
  152. package/es/form/SchemaForm/initializeReactions.d.ts +2 -0
  153. package/es/form/SchemaForm/initializeReactions.js +0 -1
  154. package/es/form/SchemaForm/initializeRequest.d.ts +11 -0
  155. package/es/form/SchemaForm/initializeRules.d.ts +11 -0
  156. package/es/form/SchemaForm/initializeSelectTable.d.ts +3 -0
  157. package/es/form/SchemaForm/initializeSelectTable.js +0 -1
  158. package/es/form/SchemaForm/reactions.d.ts +6 -0
  159. package/es/form/SchemaForm/reactions.js +0 -5
  160. package/es/form/docs/ActionResponse.d.ts +8 -0
  161. package/es/form/fieldTypeMap.d.ts +7 -0
  162. package/es/form/index.d.ts +125 -0
  163. package/es/form/index.js +0 -4
  164. package/es/form/locales/validate.d.ts +159 -0
  165. package/es/form/schemaNameMap.d.ts +5 -0
  166. package/es/form/typing.d.ts +194 -0
  167. package/es/form/utils/parseSchema.d.ts +3 -0
  168. package/es/form/utils/parseSchema.js +38 -0
  169. package/es/form/utils.d.ts +55 -0
  170. package/es/form/utils.js +0 -12
  171. package/es/form/warning.d.ts +3 -0
  172. package/es/form/warning.js +0 -2
  173. package/es/global.scss +3 -1
  174. package/es/hooks/index.d.ts +2 -0
  175. package/es/image/index.d.ts +22 -0
  176. package/es/image/index.js +73 -0
  177. package/es/image/index.scss +3 -0
  178. package/es/index-without-icon.d.ts +32 -0
  179. package/es/index.d.ts +34 -0
  180. package/es/index.js +14 -3
  181. package/es/info/components/InfoGroup/index.d.ts +5 -0
  182. package/es/info/components/InfoGroup/index.js +4 -2
  183. package/es/info/components/InfoValueItem/index.d.ts +5 -0
  184. package/es/info/components/InfoValueItem/index.js +20 -32
  185. package/es/info/components/ProInfoItem/index.d.ts +5 -0
  186. package/es/info/components/ProInfoItem/index.js +0 -1
  187. package/es/info/components/baseInfo/index.d.ts +8 -0
  188. package/es/info/components/baseInfo/index.js +4 -5
  189. package/es/info/components/headerInfo/index.d.ts +8 -0
  190. package/es/info/components/tableInfo/index.d.ts +7 -0
  191. package/es/info/components/tableInfo/index.js +4 -6
  192. package/es/info/index.d.ts +6 -0
  193. package/es/info/index.js +17 -21
  194. package/es/info/typing.d.ts +220 -0
  195. package/es/info/utils/index.d.ts +20 -0
  196. package/es/info/utils/index.js +0 -3
  197. package/es/info/utils/layout.d.ts +2 -0
  198. package/es/info/utils/utils.d.ts +1 -0
  199. package/es/layout/index.d.ts +2 -0
  200. package/es/layout/index.js +0 -2
  201. package/es/next-xconsole.scss +34 -0
  202. package/es/nocode/configurators/Card.d.ts +3 -0
  203. package/es/nocode/configurators/PageHeader.d.ts +3 -0
  204. package/es/nocode/configurators/ProTable.d.ts +3 -0
  205. package/es/nocode/configurators/ProTable.js +1 -22
  206. package/es/nocode/configurators/common.d.ts +280 -0
  207. package/es/nocode/configurators/index.d.ts +15 -0
  208. package/es/nocode/configurators/index.js +1 -0
  209. package/es/nocode/configurators/map.d.ts +2 -0
  210. package/es/nocode/index.d.ts +8 -0
  211. package/es/nocode/index.js +0 -2
  212. package/es/nocode/pages/editor.d.ts +12 -0
  213. package/es/nocode/pages/index.d.ts +14 -0
  214. package/es/nocode/pages/index.js +1 -29
  215. package/es/nocode/pages/playground.d.ts +11 -0
  216. package/es/nocode/pages/playground.js +5 -3
  217. package/es/nocode/pages/renderer.d.ts +10 -0
  218. package/es/nocode/pages/renderer.js +6 -4
  219. package/es/nocode/playground.d.ts +14 -0
  220. package/es/nocode/playground.js +4 -2
  221. package/es/page-container/index.d.ts +3 -0
  222. package/es/page-header/index.d.ts +74 -0
  223. package/es/page-header/index.js +13 -23
  224. package/es/page-header/index.scss +2 -1
  225. package/es/page-header/xconsole.scss +5 -0
  226. package/es/sidebar/components/sidebar-container/index.d.ts +5 -0
  227. package/es/sidebar/components/sidebar-container/index.js +7 -10
  228. package/es/sidebar/components/tree/index.d.ts +6 -0
  229. package/es/sidebar/components/tree/index.js +24 -28
  230. package/es/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +15 -0
  231. package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +4 -3
  232. package/es/sidebar/components/tree-node/components/IconAction/index.d.ts +12 -0
  233. package/es/sidebar/components/tree-node/components/IconAction/index.js +2 -4
  234. package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +23 -0
  235. package/es/sidebar/components/tree-node/components/IconSwitch/index.js +0 -1
  236. package/es/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
  237. package/es/sidebar/components/tree-node/index.d.ts +7 -0
  238. package/es/sidebar/components/tree-node/index.js +16 -29
  239. package/es/sidebar/index.d.ts +9 -0
  240. package/es/sidebar/index.js +13 -18
  241. package/es/sidebar/typing.d.ts +145 -0
  242. package/es/sidebar/utils/action-ref.d.ts +3 -0
  243. package/es/sidebar/utils/index.d.ts +364 -0
  244. package/es/sidebar/utils/index.js +18 -19
  245. package/es/skeleton/index.d.ts +3 -0
  246. package/es/table/components/CardView/index.d.ts +5 -0
  247. package/es/table/components/CardView/index.js +387 -0
  248. package/es/table/components/CardView/index.scss +46 -0
  249. package/es/table/components/EmptyContent/index.d.ts +2 -0
  250. package/es/table/components/Filter/index.d.ts +12 -0
  251. package/es/table/components/Filter/index.js +110 -79
  252. package/es/table/components/Layout/index.d.ts +5 -0
  253. package/es/table/components/Layout/index.js +16 -16
  254. package/es/table/components/Layout/index.scss +1 -0
  255. package/es/table/components/LoadMore/index.d.ts +20 -0
  256. package/es/table/components/LoadMore/index.js +88 -0
  257. package/es/table/components/LoadMore/index.scss +19 -0
  258. package/es/table/components/Pagination/index.d.ts +8 -0
  259. package/es/table/components/Pagination/index.js +48 -31
  260. package/es/table/components/QuickAction/index.d.ts +11 -0
  261. package/es/table/components/QuickAction/index.js +2 -3
  262. package/es/table/components/ToolBar/CardSwitch.d.ts +8 -0
  263. package/es/table/components/ToolBar/CardSwitch.js +52 -0
  264. package/es/table/components/ToolBar/DensityIcon.d.ts +4 -0
  265. package/es/table/components/ToolBar/DensityIcon.js +2 -7
  266. package/es/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
  267. package/es/table/components/ToolBar/FilterColumnIcon.js +41 -35
  268. package/es/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
  269. package/es/table/components/ToolBar/FullScreenIcon.js +0 -1
  270. package/es/table/components/ToolBar/Fullscreen.d.ts +10 -0
  271. package/es/table/components/ToolBar/Fullscreen.js +10 -3
  272. package/es/table/components/ToolBar/RefreshIcon.d.ts +4 -0
  273. package/es/table/components/ToolBar/RefreshIcon.js +162 -26
  274. package/es/table/components/ToolBar/index.d.ts +5 -0
  275. package/es/table/components/ToolBar/index.js +65 -33
  276. package/es/table/components/ToolBar/index.scss +27 -1
  277. package/es/table/index.d.ts +6 -0
  278. package/es/table/index.js +308 -137
  279. package/es/table/index.scss +8 -0
  280. package/es/table/typing.d.ts +426 -0
  281. package/es/table/utils/columnRender.d.ts +13 -0
  282. package/es/table/utils/columnRender.js +32 -37
  283. package/es/table/utils/genProColumnToColumn.d.ts +13 -0
  284. package/es/table/utils/genProColumnToColumn.js +10 -3
  285. package/es/table/utils/getTableProps.d.ts +2 -0
  286. package/es/table/utils/getTableSortIcons.d.ts +3 -0
  287. package/es/table/utils/index.d.ts +19 -0
  288. package/es/table/utils/index.js +0 -6
  289. package/es/table/utils/pureColumnRender.d.ts +9 -0
  290. package/es/table/utils/pureColumnRender.js +1 -9
  291. package/es/table/utils/pureGenProColumnToColumn.d.ts +7 -0
  292. package/es/table/utils/useTableSelection.d.ts +3 -0
  293. package/es/table/utils/util.d.ts +5 -0
  294. package/es/table/utils/util.js +19 -0
  295. package/es/templates/Detail/index.d.ts +2 -0
  296. package/es/templates/Form/index.d.ts +2 -0
  297. package/es/templates/List/index.d.ts +9 -0
  298. package/es/templates/List/index.js +6 -4
  299. package/es/templates/index.d.ts +3 -0
  300. package/es/templates/index.js +1 -2
  301. package/es/timeline/ProTimeLineItem/index.d.ts +5 -0
  302. package/es/timeline/ProTimeLineItem/index.js +5 -9
  303. package/es/timeline/index.d.ts +10 -0
  304. package/es/timeline/index.js +5 -5
  305. package/es/timeline/typing.d.ts +107 -0
  306. package/es/utils/aspect.d.ts +2 -0
  307. package/es/utils/aspect.js +60 -0
  308. package/es/utils/index.d.ts +3 -0
  309. package/es/utils/message.d.ts +3 -0
  310. package/es/utils/message.js +5 -3
  311. package/es/xconsole.scss +527 -0
  312. package/lib/actions/base.d.ts +24 -0
  313. package/lib/actions/base.js +1 -1
  314. package/lib/actions/confirm.d.ts +7 -0
  315. package/lib/actions/danger-confirm.d.ts +7 -0
  316. package/lib/actions/danger-pop-confirm.d.ts +5 -0
  317. package/lib/actions/dialog-component.d.ts +10 -0
  318. package/lib/actions/dialog-component.js +4 -1
  319. package/lib/actions/dialog-form.d.ts +29 -0
  320. package/lib/actions/dialog-form.js +7 -9
  321. package/lib/actions/dialog-info.d.ts +9 -0
  322. package/lib/actions/dialog-table.d.ts +9 -0
  323. package/lib/actions/dialog.d.ts +40 -0
  324. package/lib/actions/dialog.js +7 -8
  325. package/lib/actions/drawer-form.d.ts +6 -0
  326. package/lib/actions/drawer-info.d.ts +6 -0
  327. package/lib/actions/drawer-table.d.ts +6 -0
  328. package/lib/actions/drawer.d.ts +6 -0
  329. package/lib/actions/error.d.ts +7 -0
  330. package/lib/actions/index.d.ts +114 -0
  331. package/lib/actions/index.js +89 -58
  332. package/lib/actions/index.scss +10 -1
  333. package/lib/actions/link.d.ts +8 -0
  334. package/lib/actions/link.js +2 -3
  335. package/lib/actions/notice.d.ts +7 -0
  336. package/lib/actions/pop-confirm.d.ts +9 -0
  337. package/lib/actions/quick.d.ts +2 -0
  338. package/lib/actions/quick.js +33 -0
  339. package/lib/actions/request.d.ts +9 -0
  340. package/lib/actions/request.js +2 -3
  341. package/lib/actions/utils.d.ts +1 -0
  342. package/lib/card/card-container.d.ts +18 -0
  343. package/lib/card/card-container.js +4 -6
  344. package/lib/card/divider.d.ts +6 -0
  345. package/lib/card/divider.js +4 -2
  346. package/lib/card/index.d.ts +109 -0
  347. package/lib/card/index.js +10 -20
  348. package/lib/card/index.scss +15 -0
  349. package/lib/card/selectable.d.ts +13 -0
  350. package/lib/card/selectable.js +4 -2
  351. package/lib/card/tab.d.ts +6 -0
  352. package/lib/card/tab.js +4 -2
  353. package/lib/card/utils.d.ts +9 -0
  354. package/lib/card/xconsole.scss +3 -0
  355. package/lib/field/index.d.ts +3 -0
  356. package/lib/form/Components/Editable/index.d.ts +20 -0
  357. package/lib/form/Components/Editable/index.js +2 -2
  358. package/lib/form/Components/FormGroup/index.d.ts +14 -0
  359. package/lib/form/Components/FormGroup/index.js +3 -4
  360. package/lib/form/Components/FormItem2/animation.scss +72 -0
  361. package/lib/form/Components/FormItem2/grid.scss +173 -0
  362. package/lib/form/Components/FormItem2/index.d.ts +41 -0
  363. package/lib/form/Components/FormItem2/index.js +299 -0
  364. package/lib/form/Components/FormItem2/main.scss +413 -0
  365. package/lib/form/Components/FormItem2/scss/variable.scss +118 -0
  366. package/lib/form/Components/FormItem2/style.d.ts +1 -0
  367. package/lib/form/Components/FormItem2/style.js +3 -0
  368. package/lib/form/Components/LightFilter/componentMap.d.ts +3 -0
  369. package/lib/form/Components/LightFilter/index.d.ts +17 -0
  370. package/lib/form/Components/LightFilter/index.js +2 -11
  371. package/lib/form/Components/LightFilter/index.scss +4 -0
  372. package/lib/form/Components/ProField/index.d.ts +2 -0
  373. package/lib/form/Components/ProField/index.js +4 -2
  374. package/lib/form/Components/ProField/mapDateFormat.d.ts +3 -0
  375. package/lib/form/Components/Text/index.d.ts +8 -0
  376. package/lib/form/Components/Text/index.js +4 -2
  377. package/lib/form/Components/__builtins__/empty.d.ts +1 -0
  378. package/lib/form/Components/__builtins__/empty.js +59 -0
  379. package/lib/form/Components/__builtins__/hooks/index.d.ts +2 -0
  380. package/lib/form/Components/__builtins__/hooks/index.js +27 -0
  381. package/lib/form/Components/__builtins__/hooks/useClickAway.d.ts +5 -0
  382. package/lib/form/Components/__builtins__/hooks/useClickAway.js +44 -0
  383. package/lib/form/Components/__builtins__/hooks/usePrefixCls.d.ts +3 -0
  384. package/lib/form/Components/__builtins__/hooks/usePrefixCls.js +15 -0
  385. package/lib/form/Components/__builtins__/icons.d.ts +20 -0
  386. package/lib/form/Components/__builtins__/icons.js +174 -0
  387. package/lib/form/Components/__builtins__/index.d.ts +8 -0
  388. package/lib/form/Components/__builtins__/index.js +93 -0
  389. package/lib/form/Components/__builtins__/loading.d.ts +1 -0
  390. package/lib/form/Components/__builtins__/loading.js +48 -0
  391. package/lib/form/Components/__builtins__/mapSize.d.ts +1 -0
  392. package/lib/form/Components/__builtins__/mapSize.js +20 -0
  393. package/lib/form/Components/__builtins__/mapStatus.d.ts +2 -0
  394. package/lib/form/Components/__builtins__/mapStatus.js +27 -0
  395. package/lib/form/Components/__builtins__/moment.d.ts +2 -0
  396. package/lib/form/Components/__builtins__/moment.js +56 -0
  397. package/lib/form/Components/__builtins__/pickDataProps.d.ts +1 -0
  398. package/lib/form/Components/__builtins__/pickDataProps.js +16 -0
  399. package/lib/form/Components/form-layout/index.d.ts +74 -0
  400. package/lib/form/Components/form-layout/index.js +88 -0
  401. package/lib/form/Components/form-layout/main.scss +0 -0
  402. package/lib/form/Components/form-layout/style.d.ts +1 -0
  403. package/lib/form/Components/form-layout/style.js +3 -0
  404. package/lib/form/Components/form-layout/useResponsiveFormLayout.d.ts +18 -0
  405. package/lib/form/Components/form-layout/useResponsiveFormLayout.js +94 -0
  406. package/lib/form/Filter/AdvancedFilter.d.ts +7 -0
  407. package/lib/form/Filter/AdvancedFilter.js +16 -18
  408. package/lib/form/Filter/Layout.d.ts +5 -0
  409. package/lib/form/Filter/LightFilter.d.ts +7 -0
  410. package/lib/form/Filter/LightFilter.js +9 -13
  411. package/lib/form/Filter/SimpleFilter.d.ts +7 -0
  412. package/lib/form/Filter/SimpleFilter.js +5 -8
  413. package/lib/form/Filter/index.d.ts +9 -0
  414. package/lib/form/Filter/index.js +19 -25
  415. package/lib/form/Filter/index.scss +1 -0
  416. package/lib/form/Filter/index2.d.ts +13 -0
  417. package/lib/form/Filter/index2.js +20 -25
  418. package/lib/form/Filter/index2.scss +1 -0
  419. package/lib/form/Filter/useBindUrl.d.ts +2 -0
  420. package/lib/form/Filter/useBindUrl.js +0 -3
  421. package/lib/form/Filter/useSpecialProps.d.ts +6 -0
  422. package/lib/form/ProForm/addCascadeEffect.d.ts +2 -0
  423. package/lib/form/ProForm/customComponent.d.ts +3 -0
  424. package/lib/form/ProForm/index.d.ts +5 -0
  425. package/lib/form/ProForm/index.js +20 -16
  426. package/lib/form/ProForm/useAutoLayout.d.ts +9 -0
  427. package/lib/form/ProForm/useAutoLayout.js +0 -4
  428. package/lib/form/ProForm/useAutoSubmit.d.ts +6 -0
  429. package/lib/form/ProForm/useAutoSubmit.js +2 -3
  430. package/lib/form/ProForm/useFieldRequest.d.ts +5 -0
  431. package/lib/form/ProForm/useFormDisplayValues.d.ts +4 -0
  432. package/lib/form/ProForm/useFormDisplayValues.js +0 -1
  433. package/lib/form/ProForm/useInitialRequest.d.ts +6 -0
  434. package/lib/form/SchemaForm/adapterComponent.d.ts +5 -0
  435. package/lib/form/SchemaForm/adapterComponent.js +0 -1
  436. package/lib/form/SchemaForm/adapterDecorator.d.ts +6 -0
  437. package/lib/form/SchemaForm/adapterType.d.ts +5 -0
  438. package/lib/form/SchemaForm/adapterType.js +0 -1
  439. package/lib/form/SchemaForm/index.d.ts +4 -0
  440. package/lib/form/SchemaForm/index.js +0 -13
  441. package/lib/form/SchemaForm/initializeArrayCards.d.ts +3 -0
  442. package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
  443. package/lib/form/SchemaForm/initializeArrayItems.d.ts +3 -0
  444. package/lib/form/SchemaForm/initializeArrayTable.d.ts +3 -0
  445. package/lib/form/SchemaForm/initializeDataSource.d.ts +15 -0
  446. package/lib/form/SchemaForm/initializeDataSource.js +2 -9
  447. package/lib/form/SchemaForm/initializeFormButton.d.ts +3 -0
  448. package/lib/form/SchemaForm/initializeFormButton.js +0 -2
  449. package/lib/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
  450. package/lib/form/SchemaForm/initializeFormGroup.d.ts +3 -0
  451. package/lib/form/SchemaForm/initializeFormStep.d.ts +5 -0
  452. package/lib/form/SchemaForm/initializeFormTab.d.ts +3 -0
  453. package/lib/form/SchemaForm/initializeReactions.d.ts +2 -0
  454. package/lib/form/SchemaForm/initializeReactions.js +0 -1
  455. package/lib/form/SchemaForm/initializeRequest.d.ts +11 -0
  456. package/lib/form/SchemaForm/initializeRules.d.ts +11 -0
  457. package/lib/form/SchemaForm/initializeSelectTable.d.ts +3 -0
  458. package/lib/form/SchemaForm/reactions.d.ts +6 -0
  459. package/lib/form/SchemaForm/reactions.js +0 -5
  460. package/lib/form/docs/ActionResponse.d.ts +8 -0
  461. package/lib/form/fieldTypeMap.d.ts +7 -0
  462. package/lib/form/index.d.ts +125 -0
  463. package/lib/form/locales/validate.d.ts +159 -0
  464. package/lib/form/schemaNameMap.d.ts +5 -0
  465. package/lib/form/typing.d.ts +194 -0
  466. package/lib/form/typing.js +5 -1
  467. package/lib/form/utils/parseSchema.d.ts +3 -0
  468. package/lib/form/utils/parseSchema.js +45 -0
  469. package/lib/form/utils.d.ts +55 -0
  470. package/lib/form/utils.js +0 -11
  471. package/lib/form/warning.d.ts +3 -0
  472. package/lib/form/warning.js +0 -2
  473. package/lib/global.scss +3 -1
  474. package/lib/hooks/index.d.ts +2 -0
  475. package/lib/image/index.d.ts +22 -0
  476. package/lib/image/index.js +83 -0
  477. package/lib/image/index.scss +3 -0
  478. package/lib/index-without-icon.d.ts +32 -0
  479. package/lib/index.d.ts +34 -0
  480. package/lib/index.js +31 -2
  481. package/lib/info/components/InfoGroup/index.d.ts +5 -0
  482. package/lib/info/components/InfoGroup/index.js +4 -2
  483. package/lib/info/components/InfoValueItem/index.d.ts +5 -0
  484. package/lib/info/components/InfoValueItem/index.js +20 -32
  485. package/lib/info/components/ProInfoItem/index.d.ts +5 -0
  486. package/lib/info/components/ProInfoItem/index.js +0 -1
  487. package/lib/info/components/baseInfo/index.d.ts +8 -0
  488. package/lib/info/components/baseInfo/index.js +4 -5
  489. package/lib/info/components/headerInfo/index.d.ts +8 -0
  490. package/lib/info/components/tableInfo/index.d.ts +7 -0
  491. package/lib/info/components/tableInfo/index.js +4 -6
  492. package/lib/info/index.d.ts +6 -0
  493. package/lib/info/index.js +16 -20
  494. package/lib/info/typing.d.ts +220 -0
  495. package/lib/info/typing.js +5 -1
  496. package/lib/info/utils/index.d.ts +20 -0
  497. package/lib/info/utils/index.js +0 -3
  498. package/lib/info/utils/layout.d.ts +2 -0
  499. package/lib/info/utils/utils.d.ts +1 -0
  500. package/lib/layout/index.d.ts +2 -0
  501. package/lib/next-xconsole.scss +34 -0
  502. package/lib/nocode/configurators/Card.d.ts +3 -0
  503. package/lib/nocode/configurators/PageHeader.d.ts +3 -0
  504. package/lib/nocode/configurators/ProTable.d.ts +3 -0
  505. package/lib/nocode/configurators/ProTable.js +1 -22
  506. package/lib/nocode/configurators/common.d.ts +280 -0
  507. package/lib/nocode/configurators/index.d.ts +15 -0
  508. package/lib/nocode/configurators/index.js +1 -0
  509. package/lib/nocode/configurators/map.d.ts +2 -0
  510. package/lib/nocode/index.d.ts +8 -0
  511. package/lib/nocode/pages/editor.d.ts +12 -0
  512. package/lib/nocode/pages/index.d.ts +14 -0
  513. package/lib/nocode/pages/index.js +2 -27
  514. package/lib/nocode/pages/playground.d.ts +11 -0
  515. package/lib/nocode/pages/playground.js +5 -3
  516. package/lib/nocode/pages/renderer.d.ts +10 -0
  517. package/lib/nocode/pages/renderer.js +6 -4
  518. package/lib/nocode/playground.d.ts +14 -0
  519. package/lib/nocode/playground.js +4 -2
  520. package/lib/page-container/index.d.ts +3 -0
  521. package/lib/page-header/index.d.ts +74 -0
  522. package/lib/page-header/index.js +11 -22
  523. package/lib/page-header/index.scss +2 -1
  524. package/lib/page-header/xconsole.scss +5 -0
  525. package/lib/sidebar/components/sidebar-container/index.d.ts +5 -0
  526. package/lib/sidebar/components/sidebar-container/index.js +7 -10
  527. package/lib/sidebar/components/tree/index.d.ts +6 -0
  528. package/lib/sidebar/components/tree/index.js +24 -28
  529. package/lib/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +15 -0
  530. package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +4 -3
  531. package/lib/sidebar/components/tree-node/components/IconAction/index.d.ts +12 -0
  532. package/lib/sidebar/components/tree-node/components/IconAction/index.js +2 -4
  533. package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +23 -0
  534. package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +0 -1
  535. package/lib/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
  536. package/lib/sidebar/components/tree-node/index.d.ts +7 -0
  537. package/lib/sidebar/components/tree-node/index.js +16 -29
  538. package/lib/sidebar/index.d.ts +9 -0
  539. package/lib/sidebar/index.js +20 -18
  540. package/lib/sidebar/typing.d.ts +145 -0
  541. package/lib/sidebar/typing.js +5 -1
  542. package/lib/sidebar/utils/action-ref.d.ts +3 -0
  543. package/lib/sidebar/utils/index.d.ts +364 -0
  544. package/lib/sidebar/utils/index.js +18 -19
  545. package/lib/skeleton/index.d.ts +3 -0
  546. package/lib/table/components/CardView/index.d.ts +5 -0
  547. package/lib/table/components/CardView/index.js +397 -0
  548. package/lib/table/components/CardView/index.scss +46 -0
  549. package/lib/table/components/EmptyContent/index.d.ts +2 -0
  550. package/lib/table/components/Filter/index.d.ts +12 -0
  551. package/lib/table/components/Filter/index.js +109 -78
  552. package/lib/table/components/Layout/index.d.ts +5 -0
  553. package/lib/table/components/Layout/index.js +17 -17
  554. package/lib/table/components/Layout/index.scss +1 -0
  555. package/lib/table/components/LoadMore/index.d.ts +20 -0
  556. package/lib/table/components/LoadMore/index.js +99 -0
  557. package/lib/table/components/LoadMore/index.scss +19 -0
  558. package/lib/table/components/Pagination/index.d.ts +8 -0
  559. package/lib/table/components/Pagination/index.js +47 -30
  560. package/lib/table/components/QuickAction/index.d.ts +11 -0
  561. package/lib/table/components/QuickAction/index.js +2 -3
  562. package/lib/table/components/ToolBar/CardSwitch.d.ts +8 -0
  563. package/lib/table/components/ToolBar/CardSwitch.js +60 -0
  564. package/lib/table/components/ToolBar/DensityIcon.d.ts +4 -0
  565. package/lib/table/components/ToolBar/DensityIcon.js +2 -7
  566. package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
  567. package/lib/table/components/ToolBar/FilterColumnIcon.js +40 -34
  568. package/lib/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
  569. package/lib/table/components/ToolBar/FullScreenIcon.js +0 -1
  570. package/lib/table/components/ToolBar/Fullscreen.d.ts +10 -0
  571. package/lib/table/components/ToolBar/Fullscreen.js +10 -3
  572. package/lib/table/components/ToolBar/RefreshIcon.d.ts +4 -0
  573. package/lib/table/components/ToolBar/RefreshIcon.js +164 -29
  574. package/lib/table/components/ToolBar/index.d.ts +5 -0
  575. package/lib/table/components/ToolBar/index.js +64 -32
  576. package/lib/table/components/ToolBar/index.scss +27 -1
  577. package/lib/table/index.d.ts +6 -0
  578. package/lib/table/index.js +307 -136
  579. package/lib/table/index.scss +8 -0
  580. package/lib/table/typing.d.ts +426 -0
  581. package/lib/table/typing.js +5 -1
  582. package/lib/table/utils/columnRender.d.ts +13 -0
  583. package/lib/table/utils/columnRender.js +32 -36
  584. package/lib/table/utils/genProColumnToColumn.d.ts +13 -0
  585. package/lib/table/utils/genProColumnToColumn.js +10 -3
  586. package/lib/table/utils/getTableProps.d.ts +2 -0
  587. package/lib/table/utils/getTableSortIcons.d.ts +3 -0
  588. package/lib/table/utils/index.d.ts +19 -0
  589. package/lib/table/utils/index.js +0 -6
  590. package/lib/table/utils/pureColumnRender.d.ts +9 -0
  591. package/lib/table/utils/pureColumnRender.js +1 -9
  592. package/lib/table/utils/pureGenProColumnToColumn.d.ts +7 -0
  593. package/lib/table/utils/useTableSelection.d.ts +3 -0
  594. package/lib/table/utils/util.d.ts +5 -0
  595. package/lib/table/utils/util.js +25 -0
  596. package/lib/templates/Detail/index.d.ts +2 -0
  597. package/lib/templates/Form/index.d.ts +2 -0
  598. package/lib/templates/List/index.d.ts +9 -0
  599. package/lib/templates/List/index.js +6 -4
  600. package/lib/templates/index.d.ts +3 -0
  601. package/lib/timeline/ProTimeLineItem/index.d.ts +5 -0
  602. package/lib/timeline/ProTimeLineItem/index.js +5 -9
  603. package/lib/timeline/index.d.ts +10 -0
  604. package/lib/timeline/index.js +5 -5
  605. package/lib/timeline/typing.d.ts +107 -0
  606. package/lib/timeline/typing.js +5 -1
  607. package/lib/utils/aspect.d.ts +2 -0
  608. package/lib/utils/aspect.js +67 -0
  609. package/lib/utils/index.d.ts +3 -0
  610. package/lib/utils/message.d.ts +3 -0
  611. package/lib/utils/message.js +5 -3
  612. package/lib/xconsole.scss +527 -0
  613. package/package.json +9 -8
package/es/table/index.js CHANGED
@@ -1,13 +1,10 @@
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
- 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); }
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", "autoRefreshProps", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "fixedTableBody", "isTree", "toolBarAutoWidth", "data-teamix-spm", "switchCardView", "cardViewProps", "defaultView", "emptyProps", "bindUrlProps", "bindUrl", "autoRedirect", "useMaxData"],
2
+ _excluded2 = ["onChange"];
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
4
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
5
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."); }
6
6
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
7
7
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
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; }
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; }
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; }
11
8
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
9
  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."); }
13
10
  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); }
@@ -16,27 +13,33 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
16
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
14
  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; }
18
15
  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; }
19
- import React, { useState, useEffect, useRef, useMemo } from 'react';
20
- import { Table, Checkbox } from '@alicloudfe/components';
21
- import Pagination from './components/Pagination';
22
- import genProColumnToColumn from './utils/genProColumnToColumn';
23
- import { getGlobalConfig, useRequest, request as utilResquest, getDeepValue, getMessage, pickProps, usePrefixCls, getTestRequestData, getTestRequestParams } from '@teamix/utils';
16
+ 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; }
17
+ 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; }
18
+ 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; }
19
+ import { Checkbox, Table } from '@alicloudfe/components';
20
+ import { useUrlState } from '@teamix/hooks';
21
+ import { EmptyContent } from '@teamix/pro-field';
22
+ import { getDeepValue, getGlobalConfig, getMessage, getTargetValue, pickProps, request as utilResquest, usePrefixCls, useRequest } from '@teamix/utils';
23
+ import classNames from 'classnames';
24
+ import debounce from 'lodash.debounce';
25
+ import React, { useEffect, useMemo, useRef, useState } from 'react';
26
+ import { ProActionGroup } from '../actions';
27
+ import ProPageContainer from '../page-container';
24
28
  import { ProSkeletonRaw as Skeleton } from '../skeleton';
25
- import './index.scss';
29
+ import { ProComponentAspect } from '../utils/aspect';
30
+ import CardView from './components/CardView';
26
31
  import Layout from './components/Layout';
32
+ import Pagination from './components/Pagination';
33
+ import FullScreen from './components/ToolBar/Fullscreen';
34
+ import './index.scss';
27
35
  import { actionRefUseStateOn, emit, initActionRef, processDefaultFilter, useActionType } from './utils';
36
+ import genProColumnToColumn from './utils/genProColumnToColumn';
28
37
  import getTableProps from './utils/getTableProps';
29
38
  import getTableSortIcons from './utils/getTableSortIcons';
30
39
  import useTableSelection from './utils/useTableSelection';
31
- import FullScreen from './components/ToolBar/Fullscreen';
32
- import EmptyContent from './components/EmptyContent';
33
- import { ProActionGroup } from '../actions';
34
- import classNames from 'classnames';
35
- import ProPageContainer from '../page-container';
36
- import debounce from 'lodash.debounce';
40
+ import { getUrlStateFilter } from './utils/util';
37
41
  export * from './typing';
38
42
  var cls = usePrefixCls('teamix-pro-table');
39
-
40
43
  /**
41
44
  * 处理原生传入的 columns 以便于 选择列 方便处理
42
45
  * @param columns 原生传入的 columns
@@ -46,7 +49,7 @@ var processColumns = function processColumns(columns, initialColumns) {
46
49
  var _getGlobalConfig;
47
50
  var globalFilterColumns = (_getGlobalConfig = getGlobalConfig('ProTable')) === null || _getGlobalConfig === void 0 ? void 0 : _getGlobalConfig.filterColumns;
48
51
  var filterColumns = columns.filter(function (item) {
49
- return item.columnFilters !== false && (item === null || item === void 0 ? void 0 : item.hidden) !== true && (!globalFilterColumns || globalFilterColumns(item));
52
+ return item.columnFilters !== false && (item === null || item === void 0 ? void 0 : item.hidden) !== true && (!globalFilterColumns || globalFilterColumns(_objectSpread({}, item)));
50
53
  });
51
54
  // 处理只剩一列批量选择的情况下宽度错乱问题
52
55
  if (filterColumns === null || filterColumns === void 0 ? void 0 : filterColumns.length) {
@@ -71,7 +74,6 @@ var processColumns = function processColumns(columns, initialColumns) {
71
74
  }
72
75
  return filterColumns;
73
76
  };
74
-
75
77
  /** 默认请求翻页参数 */
76
78
  var globalPageKey = 'currentPage';
77
79
  var globalPageSizeKey = 'pageSize';
@@ -84,7 +86,7 @@ var globalFormatSort = function globalFormatSort(sort) {
84
86
  return {};
85
87
  };
86
88
  var ProTable = function ProTable(props) {
87
- var _rowSelection$selecte;
89
+ var _urlState$currentPage, _rowSelection$selecte;
88
90
  var header = props.header,
89
91
  className = props.className,
90
92
  tableClassName = props.tableClassName,
@@ -133,9 +135,8 @@ var ProTable = function ProTable(props) {
133
135
  _props$footerSuction = props.footerSuction,
134
136
  footerSuction = _props$footerSuction === void 0 ? false : _props$footerSuction,
135
137
  _props$autoRefresh = props.autoRefresh,
136
- autoRefresh = _props$autoRefresh === void 0 ? function () {
137
- return false;
138
- } : _props$autoRefresh,
138
+ autoRefresh = _props$autoRefresh === void 0 ? false : _props$autoRefresh,
139
+ autoRefreshProps = props.autoRefreshProps,
139
140
  customRequest = props.customRequest,
140
141
  _props$filterColumnTy = props.filterColumnType,
141
142
  filterColumnType = _props$filterColumnTy === void 0 ? 'auto' : _props$filterColumnTy,
@@ -149,15 +150,33 @@ var ProTable = function ProTable(props) {
149
150
  _props$fixedTableBody = props.fixedTableBody,
150
151
  fixedTableBody = _props$fixedTableBody === void 0 ? false : _props$fixedTableBody,
151
152
  isTree = props.isTree,
153
+ _props$toolBarAutoWid = props.toolBarAutoWidth,
154
+ toolBarAutoWidth = _props$toolBarAutoWid === void 0 ? true : _props$toolBarAutoWid,
155
+ dataTeamixSpm = props['data-teamix-spm'],
156
+ _props$switchCardView = props.switchCardView,
157
+ switchCardView = _props$switchCardView === void 0 ? false : _props$switchCardView,
158
+ cardViewProps = props.cardViewProps,
159
+ _props$defaultView = props.defaultView,
160
+ defaultView = _props$defaultView === void 0 ? 'table' : _props$defaultView,
161
+ emptyProps = props.emptyProps,
162
+ bindUrlProps = props.bindUrlProps,
163
+ bindUrl = props.bindUrl,
164
+ _props$autoRedirect = props.autoRedirect,
165
+ autoRedirect = _props$autoRedirect === void 0 ? true : _props$autoRedirect,
166
+ useMaxData = props.useMaxData,
152
167
  otherProps = _objectWithoutProperties(props, _excluded);
153
168
  var targetPageKey = pageKey || globalPageKey;
154
169
  var targetPageSizeKey = pageSizeKey || globalPageSizeKey;
155
170
  var targetFormatSort = formatSort || globalFormatSort;
156
- var _useState = useState(1),
171
+ var _ref = bindUrl ? useUrlState() : [],
172
+ _ref2 = _slicedToArray(_ref, 2),
173
+ urlState = _ref2[0],
174
+ setUrlState = _ref2[1];
175
+ var _useState = useState((_urlState$currentPage = urlState === null || urlState === void 0 ? void 0 : urlState.currentPage) !== null && _urlState$currentPage !== void 0 ? _urlState$currentPage : 1),
157
176
  _useState2 = _slicedToArray(_useState, 2),
158
177
  currentPage = _useState2[0],
159
178
  setCurrentPage = _useState2[1];
160
- var _useState3 = useState(props.pageSize || 10),
179
+ var _useState3 = useState((urlState === null || urlState === void 0 ? void 0 : urlState.pageSize) || props.pageSize || 10),
161
180
  _useState4 = _slicedToArray(_useState3, 2),
162
181
  pageSize = _useState4[0],
163
182
  setPageSize = _useState4[1];
@@ -168,7 +187,7 @@ var ProTable = function ProTable(props) {
168
187
  var _useState7 = useState(propsDataSource !== null && propsDataSource !== void 0 ? propsDataSource : []),
169
188
  _useState8 = _slicedToArray(_useState7, 2),
170
189
  data = _useState8[0],
171
- setData = _useState8[1];
190
+ _setData = _useState8[1];
172
191
  var _useState9 = useState(props.sort || {}),
173
192
  _useState10 = _slicedToArray(_useState9, 2),
174
193
  sort = _useState10[0],
@@ -199,7 +218,24 @@ var ProTable = function ProTable(props) {
199
218
  _useState20 = _slicedToArray(_useState19, 2),
200
219
  showLoading = _useState20[0],
201
220
  setShowLoading = _useState20[1];
202
-
221
+ // 表格内部用作存储的 Ref,标识 Table 组件是否被第一次渲染。用作 useUrlState filter 第一次渲染时使用 state 数据请求
222
+ var dataRef = useRef({
223
+ flag: true
224
+ });
225
+ useEffect(function () {
226
+ if (bindUrl && (bindUrlProps === null || bindUrlProps === void 0 ? void 0 : bindUrlProps.pagination) !== false) {
227
+ if ((urlState === null || urlState === void 0 ? void 0 : urlState.currentPage) !== currentPage) {
228
+ setUrlState === null || setUrlState === void 0 ? void 0 : setUrlState({
229
+ currentPage: currentPage
230
+ });
231
+ }
232
+ if ((urlState === null || urlState === void 0 ? void 0 : urlState.pageSize) !== pageSize) {
233
+ setUrlState === null || setUrlState === void 0 ? void 0 : setUrlState({
234
+ pageSize: pageSize
235
+ });
236
+ }
237
+ }
238
+ }, [currentPage, pageSize, urlState]);
203
239
  // 存储能够被 on 监听到的 ProTable 状态
204
240
  // 因为只做存储用。不需要更新视图以及需要同步更改。所以不使用 setState 更新
205
241
  var _useState21 = useState({
@@ -209,17 +245,22 @@ var ProTable = function ProTable(props) {
209
245
  }),
210
246
  _useState22 = _slicedToArray(_useState21, 1),
211
247
  actionRefState = _useState22[0];
212
-
213
248
  // 存储 on 监听事件
214
249
  var _useState23 = useState({
215
250
  fullScreenState: {}
216
251
  }),
217
252
  _useState24 = _slicedToArray(_useState23, 1),
218
253
  actionRefCallback = _useState24[0];
219
-
220
254
  // 存储定时器 id
221
255
  var autoRefreshTimerRef = useRef();
222
256
  var onResize = null;
257
+ // useEffect(() => {
258
+ // setShowSkeleton(propsShowSkeleton);
259
+ // }, [propsShowSkeleton]);
260
+ // useEffect(() => {
261
+ // console.log('传入的props变化', propsLoading);
262
+ // setShowLoading(propsLoading ?? false);
263
+ // }, [propsLoading]);
223
264
  useEffect(function () {
224
265
  var _propsDataFilter$sche, _propsDataFilter$sche2;
225
266
  getHeaderHeight(fullscreenState);
@@ -246,7 +287,6 @@ var ProTable = function ProTable(props) {
246
287
  }
247
288
  }, 500);
248
289
  }
249
-
250
290
  // 如果不传 dataFilter,则在这里初始化请求
251
291
  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;
252
292
  if (requestWhenMount && !hasDataFilter) {
@@ -265,7 +305,6 @@ var ProTable = function ProTable(props) {
265
305
  actionRef.current = undefined;
266
306
  };
267
307
  }, []);
268
-
269
308
  // 获取header高度,用作全屏吸底吸底高度计算以及固定body高度计算(滚动条在底部)
270
309
  var getHeaderHeight = function getHeaderHeight(isFullscreen, offset) {
271
310
  var _tableDom$getElements, _tableDom$getElements2, _document$querySelect, _document$querySelect2, _document$querySelect3;
@@ -296,23 +335,22 @@ var ProTable = function ProTable(props) {
296
335
  // 16px 为 padding
297
336
  var pageHeaderHeight = ((_pageContainerDom$off = pageContainerDom === null || pageContainerDom === void 0 ? void 0 : pageContainerDom.offsetHeight) !== null && _pageContainerDom$off !== void 0 ? _pageContainerDom$off : 0) + 16;
298
337
  var teamixNavHeight = (_teamixNavDom$offsetH = teamixNavDom === null || teamixNavDom === void 0 ? void 0 : teamixNavDom.offsetHeight) !== null && _teamixNavDom$offsetH !== void 0 ? _teamixNavDom$offsetH : 0;
299
-
300
338
  // 1 为预留值,js无法取出精确高度,会被四舍五入
301
339
  var offsetHeaderHeight = headerHeight + tableHeaderHeight + pageHeaderHeight + teamixNavHeight + footerRowSelectionHeight + 16 + (offset !== null && offset !== void 0 ? offset : 0) + 1;
302
- if (tableBodyDom.clientHeight < tableBodyDom.scrollHeight) {
340
+ if (switchViewState === 'card') {
341
+ offsetHeaderHeight = offsetHeaderHeight - tableHeaderHeight - footerRowSelectionHeight;
342
+ }
343
+ if ((tableBodyDom === null || tableBodyDom === void 0 ? void 0 : tableBodyDom.clientHeight) < (tableBodyDom === null || tableBodyDom === void 0 ? void 0 : tableBodyDom.scrollHeight)) {
303
344
  setFooterSuctionState(true);
304
345
  } else {
305
346
  setFooterSuctionState(false);
306
347
  }
307
-
308
348
  // 如果有切换区tab,那么重新计算
309
349
  if (headerFixedTopSectionDom.clientHeight) {
310
350
  var _headerFixedTopSectio;
311
351
  var headerFixedTopSectionHeight = (_headerFixedTopSectio = headerFixedTopSectionDom.clientHeight) !== null && _headerFixedTopSectio !== void 0 ? _headerFixedTopSectio : 0;
312
-
313
352
  // const clientTableBodyHeight =
314
353
  // document.body.clientHeight - offsetHeaderHeight;
315
-
316
354
  setHeaderHeight(headerFixedTopSectionHeight + teamixNavHeight + footerRowSelectionHeight + tableHeaderHeight + 1);
317
355
  return;
318
356
  }
@@ -323,40 +361,44 @@ var ProTable = function ProTable(props) {
323
361
  }
324
362
  }, 50);
325
363
  };
326
-
327
364
  // header 区域高度。用作全屏计算吸顶吸底高度。默认不做计算
328
365
  var _useState25 = useState(0),
329
366
  _useState26 = _slicedToArray(_useState25, 2),
330
367
  headerHeight = _useState26[0],
331
368
  setHeaderHeight = _useState26[1];
332
-
333
369
  // 全屏显示 className
334
370
  var _useState27 = useState(false),
335
371
  _useState28 = _slicedToArray(_useState27, 2),
336
372
  fullscreenState = _useState28[0],
337
373
  setFullscreenState = _useState28[1];
374
+ // 切换视角
375
+ var _useState29 = useState(defaultView !== null && defaultView !== void 0 ? defaultView : 'table'),
376
+ _useState30 = _slicedToArray(_useState29, 2),
377
+ switchViewState = _useState30[0],
378
+ setSwitchViewState = _useState30[1];
338
379
  // 切换全屏搜索开关
339
380
  var filterEnableRef = useRef({
340
381
  fullscreen: false,
341
382
  normal: true
342
383
  });
343
-
384
+ // 全局状态 : 大数据截断
385
+ var globalUseMaxData = useMemo(function () {
386
+ var _getGlobalConfig2;
387
+ return (_getGlobalConfig2 = getGlobalConfig('ProTable')) === null || _getGlobalConfig2 === void 0 ? void 0 : _getGlobalConfig2.useMaxData;
388
+ }, []);
344
389
  // 非全屏状态下的
345
390
  var normalDataFilterFormRef = useRef();
346
391
  var fullscreenDataFilterFormRef = useRef();
347
392
  var normalDataFilterForm = normalDataFilterFormRef.current;
348
393
  var fullscreenDataFilterForm = fullscreenDataFilterFormRef.current;
349
-
350
394
  // 传给 QueryFilter 的 formRef
351
395
  var dataFilterFormRef = !fullscreenState ? normalDataFilterFormRef : fullscreenDataFilterFormRef;
352
396
  // let dataFilterForm = dataFilterFormRef.current;
353
-
354
397
  // 整个内容区是否超过一屏。用于表格在非全屏模式下的吸底
355
- var _useState29 = useState(false),
356
- _useState30 = _slicedToArray(_useState29, 2),
357
- footerSuctionState = _useState30[0],
358
- setFooterSuctionState = _useState30[1];
359
-
398
+ var _useState31 = useState(false),
399
+ _useState32 = _slicedToArray(_useState31, 2),
400
+ footerSuctionState = _useState32[0],
401
+ setFooterSuctionState = _useState32[1];
360
402
  // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
361
403
  var getFooterSuctionState = function getFooterSuctionState() {
362
404
  if (!footerSuction) {
@@ -378,7 +420,6 @@ var ProTable = function ProTable(props) {
378
420
  }
379
421
  }
380
422
  };
381
-
382
423
  // rowSelection 相关
383
424
  var rowSelectionHook = useTableSelection(_objectSpread(_objectSpread({}, propsRowSelection), {}, {
384
425
  // 当初始出现骨架屏的时候,不可选择
@@ -409,17 +450,15 @@ var ProTable = function ProTable(props) {
409
450
  useEffect(function () {
410
451
  getRowSelection && getRowSelection(rowSelectionHook);
411
452
  }, [rowSelectionHook]);
412
-
413
453
  // 获取 table 左下角 checkbox 属性
414
454
  function getCheckAllProps() {
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;
455
+ var _rowSelection$onChang = rowSelection.onChange,
456
+ _onChange = _rowSelection$onChang === void 0 ? function () {} : _rowSelection$onChang,
457
+ _rowSelection$onSelec = rowSelection.onSelectAll,
458
+ onSelectAll = _rowSelection$onSelec === void 0 ? function () {} : _rowSelection$onSelec,
459
+ _rowSelection$selecte2 = rowSelection.selectedRowKeys,
460
+ selectedRowKeys = _rowSelection$selecte2 === void 0 ? [] : _rowSelection$selecte2,
461
+ getProps = rowSelection.getProps;
423
462
  var dataSource = data;
424
463
  var allRowKeys = dataSource.filter(function (d, i) {
425
464
  var _getProps;
@@ -463,14 +502,12 @@ var ProTable = function ProTable(props) {
463
502
  setFilteredColumns(columns);
464
503
  (_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);
465
504
  }, [propsColumns]);
466
-
467
505
  // dataSource 受控
468
506
  useEffect(function () {
469
507
  if (propsDataSource) {
470
- setData(propsDataSource);
508
+ _setData(propsDataSource);
471
509
  }
472
510
  }, [propsDataSource]);
473
-
474
511
  // 初始化 ActionRef。
475
512
  initActionRef(actionRef, {
476
513
  getState: function getState() {
@@ -490,20 +527,19 @@ var ProTable = function ProTable(props) {
490
527
  actionRefCallback[state][name] = fun;
491
528
  },
492
529
  off: function off(name) {
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];
530
+ actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref3) {
531
+ var _ref4 = _slicedToArray(_ref3, 2),
532
+ k = _ref4[0],
533
+ v = _ref4[1];
534
+ var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref5) {
535
+ var _ref6 = _slicedToArray(_ref5, 1),
536
+ k = _ref6[0];
500
537
  return k !== name;
501
538
  }));
502
539
  return [k, filterV];
503
540
  }));
504
541
  }
505
542
  });
506
-
507
543
  // 绑定 Actions
508
544
  useActionType(actionRef, {
509
545
  fullScreen: function fullScreen() {
@@ -530,7 +566,14 @@ var ProTable = function ProTable(props) {
530
566
  _setSize(mode);
531
567
  },
532
568
  refresh: function refresh(params) {
533
- return _request(params);
569
+ // card视角的刷新等于重新请求
570
+ if (switchViewState === 'card' && !propsDataSource) {
571
+ setCurrentPage(1);
572
+ _request(_objectSpread(_objectSpread({}, params), {}, _defineProperty({}, targetPageKey, 1)), undefined, undefined, true);
573
+ setShowSkeleton(true);
574
+ } else {
575
+ _request(params);
576
+ }
534
577
  },
535
578
  request: function request(params) {
536
579
  // 如果请求中还有翻页相关信息,需要自动设置到指定页
@@ -549,11 +592,20 @@ var ProTable = function ProTable(props) {
549
592
  (_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, {});
550
593
  (_dataFilterFormRef$cu = dataFilterFormRef.current) === null || _dataFilterFormRef$cu === void 0 ? void 0 : _dataFilterFormRef$cu.reset();
551
594
  setCurrentPage(1);
552
- _request(_defineProperty({}, targetPageKey, 1));
595
+ _request(_defineProperty({}, targetPageKey, 1), undefined, undefined, true);
553
596
  },
554
597
  resetPage: function resetPage() {
555
598
  setCurrentPage(1);
556
599
  },
600
+ nextPage: function nextPage() {
601
+ var _props$paginationProp, _props$paginationProp2;
602
+ var newCurrentPage = currentPage + 1;
603
+ setCurrentPage(newCurrentPage);
604
+ props === null || props === void 0 ? void 0 : (_props$paginationProp = props.paginationProps) === null || _props$paginationProp === void 0 ? void 0 : (_props$paginationProp2 = _props$paginationProp.onChange) === null || _props$paginationProp2 === void 0 ? void 0 : _props$paginationProp2.call(_props$paginationProp, newCurrentPage, {});
605
+ if (!propsDataSource) {
606
+ _request(_defineProperty({}, targetPageKey, newCurrentPage));
607
+ }
608
+ },
557
609
  rowSelection: rowSelection,
558
610
  clearRowSelection: function clearRowSelection() {
559
611
  rowSelectionHook.setSelectedRowKeys([]);
@@ -573,31 +625,94 @@ var ProTable = function ProTable(props) {
573
625
  normalDataFilterForm: normalDataFilterForm,
574
626
  fullscreenDataFilterForm: fullscreenDataFilterForm,
575
627
  filterEnableRef: filterEnableRef,
628
+ setData: function setData(data) {
629
+ _setData(data);
630
+ },
576
631
  resetTableMaxBodyHeight: function resetTableMaxBodyHeight(offset) {
577
632
  getHeaderHeight(fullscreenState, offset);
633
+ },
634
+ switchView: function switchView(view) {
635
+ setSwitchViewState(view);
636
+ if (!propsDataSource) {
637
+ setCurrentPage(1);
638
+ }
639
+ if (view === 'table') {
640
+ setPageSize(pageSize !== null && pageSize !== void 0 ? pageSize : 20);
641
+ if (!propsDataSource) {
642
+ var _request4;
643
+ setShowSkeleton(true);
644
+ _request((_request4 = {}, _defineProperty(_request4, targetPageSizeKey, pageSize !== null && pageSize !== void 0 ? pageSize : 20), _defineProperty(_request4, targetPageKey, 1), _request4));
645
+ }
646
+ }
647
+ if (view === 'card') {
648
+ var _cardViewProps$pageSi;
649
+ setPageSize((_cardViewProps$pageSi = cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.pageSize) !== null && _cardViewProps$pageSi !== void 0 ? _cardViewProps$pageSi : 12);
650
+ if (!propsDataSource) {
651
+ var _cardViewProps$pageSi2, _request5;
652
+ setShowSkeleton(true);
653
+ _request((_request5 = {}, _defineProperty(_request5, targetPageSizeKey, (_cardViewProps$pageSi2 = cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.pageSize) !== null && _cardViewProps$pageSi2 !== void 0 ? _cardViewProps$pageSi2 : 12), _defineProperty(_request5, targetPageKey, 1), _request5));
654
+ }
655
+ }
656
+ getHeaderHeight(fullscreenState);
657
+ },
658
+ setAutoRefreshTimers: function setAutoRefreshTimers(timers) {
659
+ clearTimeout(autoRefreshTimerRef.current);
660
+ autoRefreshTimerRef.current = null;
661
+ autoRefreshTimerRef.current = setTimeout(function () {
662
+ var _actionRef$current5, _actionRef$current5$r;
663
+ (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : (_actionRef$current5$r = _actionRef$current5.refresh) === null || _actionRef$current5$r === void 0 ? void 0 : _actionRef$current5$r.call(_actionRef$current5);
664
+ }, timers);
665
+ emit('PRO_TABLE_REFRESH_TIMER_FLAG', timers);
666
+ },
667
+ clearAutoRefreshTimers: function clearAutoRefreshTimers() {
668
+ clearTimeout(autoRefreshTimerRef.current);
669
+ autoRefreshTimerRef.current = null;
578
670
  }
579
671
  });
580
-
581
672
  // 将 Actions 绑定到传入的 propsActionRef 中
582
673
  if (propsActionRef) {
583
674
  propsActionRef.current = actionRef.current;
584
675
  }
585
676
  function onFormatResult(next) {
586
- var _next$data;
587
677
  props.onFormatResult && props.onFormatResult(next);
588
- var time = autoRefresh ? autoRefresh(next.data) : false;
678
+ // 如果开启了 autoRedirect 当当前页数不为1,并且data为空的时候,重定向到第一页
679
+ if (autoRedirect) {
680
+ var _next$data;
681
+ if (!(next === null || next === void 0 ? void 0 : (_next$data = next.data) === null || _next$data === void 0 ? void 0 : _next$data.length) && currentPage > 1) {
682
+ setCurrentPage(1);
683
+ setShowLoading(true);
684
+ setTimeout(function () {
685
+ _request(_defineProperty({}, targetPageKey, 1));
686
+ });
687
+ }
688
+ }
689
+ var time = 0;
690
+ if (autoRefresh) {
691
+ time = 60 * 1000;
692
+ }
693
+ if (autoRefresh && typeof autoRefresh !== 'boolean') {
694
+ time = autoRefresh ? autoRefresh(next.data) : 0;
695
+ }
589
696
  if (Number.isInteger(time) && time >= 1000) {
590
697
  autoRefreshTimerRef.current = setTimeout(function () {
591
698
  // 自动刷新不显示 loading
592
699
  _request({}, true);
593
700
  }, Number(time));
701
+ emit('PRO_TABLE_REFRESH_TIMER_FLAG', Number(time));
594
702
  }
595
703
  // 设置 dataSource、total
596
- setData(next.data || []);
597
- setTotal(next.total || ((_next$data = next.data) === null || _next$data === void 0 ? void 0 : _next$data.length));
704
+ if (switchViewState === 'table' || currentPage === 1 || (cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.useTablePagination)) {
705
+ var _next$data2;
706
+ _setData(next.data || []);
707
+ setTotal(next.total || ((_next$data2 = next.data) === null || _next$data2 === void 0 ? void 0 : _next$data2.length));
708
+ }
709
+ if (switchViewState === 'card' && currentPage !== 1 && !(cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.useTablePagination)) {
710
+ var _next$data3;
711
+ _setData([].concat(_toConsumableArray(data), _toConsumableArray(next.data || [])));
712
+ setTotal(total + (next.total || ((_next$data3 = next.data) === null || _next$data3 === void 0 ? void 0 : _next$data3.length)));
713
+ }
598
714
  setShowSkeleton(false);
599
715
  }
600
-
601
716
  // 请求表格数据工具函数
602
717
  var getData = useRequest(function (params) {
603
718
  return _defineProperty({
@@ -623,6 +738,10 @@ var ProTable = function ProTable(props) {
623
738
  data: getDeepValue(formatResult.data, result) || [],
624
739
  total: isNaN(dataTotal) ? 0 : Number(dataTotal)
625
740
  };
741
+ } else if (typeof formatResult === 'string') {
742
+ nextData = getTargetValue(formatResult, {
743
+ res: result
744
+ });
626
745
  }
627
746
  }
628
747
  if (nextData instanceof Promise) {
@@ -658,10 +777,14 @@ var ProTable = function ProTable(props) {
658
777
  }
659
778
  }
660
779
  });
661
-
662
780
  // 请求函数
663
- function _request(params, noLoading, filterParams) {
664
- var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current5, _actionRef$current5$g, _objectSpread2;
781
+ function _request(params, noLoading, filterParams, isReset) {
782
+ var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current6, _actionRef$current6$g, _objectSpread3;
783
+ // 首次渲染表格,获取 urlState 上的 表头 filter 数据
784
+ if (bindUrl && (bindUrlProps === null || bindUrlProps === void 0 ? void 0 : bindUrlProps.headerFilters) !== false && dataRef.current.flag) {
785
+ getUrlStateFilter(urlState !== null && urlState !== void 0 ? urlState : {}, actionRef);
786
+ dataRef.current.flag = false;
787
+ }
665
788
  // 如果没有传 url 且没有 customRequest,直接返回
666
789
  if (!url && !customRequest) {
667
790
  return;
@@ -674,10 +797,17 @@ var ProTable = function ProTable(props) {
674
797
  // 筛选区请求参数
675
798
  var dataFilterParams = filterParams !== null && filterParams !== void 0 ? filterParams : (_dataFilterFormRef$cu2 = dataFilterFormRef.current) === null || _dataFilterFormRef$cu2 === void 0 ? void 0 : _dataFilterFormRef$cu2.values;
676
799
  // 列过滤请求参数
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 : {};
678
-
800
+ var columnsFilterParams = (_actionRef$current$ge = (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$g = _actionRef$current6.getFilterRules) === null || _actionRef$current6$g === void 0 ? void 0 : _actionRef$current6$g.call(_actionRef$current6)) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {};
679
801
  // 格式化后的请求参数
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));
802
+ var requestData = {};
803
+ var preParams = _objectSpread(_objectSpread({}, !showPagination ? _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams) : _objectSpread(_objectSpread(_objectSpread(_objectSpread((_objectSpread3 = {}, _defineProperty(_objectSpread3, targetPageKey, currentPage), _defineProperty(_objectSpread3, targetPageSizeKey, pageSize), _objectSpread3), dataFilterParams), propsParams), sortParams), columnsFilterParams)), params);
804
+ if (typeof formatParams === 'string') {
805
+ requestData = getTargetValue(formatParams, {
806
+ params: preParams
807
+ });
808
+ } else {
809
+ requestData = formatParams(preParams);
810
+ }
681
811
  if (requestData) {
682
812
  if (autoRefreshTimerRef.current) {
683
813
  clearTimeout(autoRefreshTimerRef.current);
@@ -699,19 +829,38 @@ var ProTable = function ProTable(props) {
699
829
  }
700
830
  // 如果使用自定义请求
701
831
  if (customRequest && typeof customRequest === 'function') {
702
- setCustomTableLoading(true);
832
+ if (isReset) {
833
+ setShowSkeleton(true);
834
+ } else {
835
+ setCustomTableLoading(true);
836
+ }
703
837
  customRequest(requestData).then(function (res) {
704
- var data = res.data,
705
- total = res.total,
838
+ var dataRes = res.data,
839
+ totalRes = res.total,
706
840
  success = res.success;
707
841
  if (success === true) {
842
+ // 如果开启了 autoRedirect 当当前页数不为1,并且data为空的时候,重定向到第一页
843
+ if (autoRedirect) {
844
+ if (!(dataRes === null || dataRes === void 0 ? void 0 : dataRes.length) && currentPage > 1) {
845
+ setCurrentPage(1);
846
+ setShowLoading(true);
847
+ setTimeout(function () {
848
+ _request(_defineProperty({}, targetPageKey, 1));
849
+ });
850
+ }
851
+ }
708
852
  // 设置 dataSource、total
709
- setData(data || []);
710
- setTotal(total || (data === null || data === void 0 ? void 0 : data.length));
853
+ if (switchViewState === 'table' || params[targetPageKey] === 1 || isReset || (cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.useTablePagination)) {
854
+ _setData(dataRes || []);
855
+ setTotal(totalRes || (dataRes === null || dataRes === void 0 ? void 0 : dataRes.length));
856
+ }
857
+ if (switchViewState === 'card' && params[targetPageKey] !== 1 && !isReset && !(cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.useTablePagination)) {
858
+ _setData([].concat(_toConsumableArray(data), _toConsumableArray(dataRes || [])));
859
+ setTotal(total + (totalRes || (dataRes === null || dataRes === void 0 ? void 0 : dataRes.length)));
860
+ }
711
861
  setShowSkeleton(false);
712
862
  setCustomTableLoading(false);
713
863
  }
714
-
715
864
  // 重新计算是否需要吸底
716
865
  if (footerSuction) {
717
866
  getFooterSuctionState();
@@ -719,15 +868,23 @@ var ProTable = function ProTable(props) {
719
868
  if (fixedTableBody) {
720
869
  getHeaderHeight(fullscreenState);
721
870
  }
722
-
723
871
  // customRequest 中支持 autoRefresh
724
- var time = autoRefresh ? autoRefresh(data) : false;
872
+ var time = 0;
873
+ if (autoRefresh) {
874
+ time = 60 * 1000;
875
+ }
876
+ if (autoRefresh && typeof autoRefresh !== 'boolean') {
877
+ time = autoRefresh ? autoRefresh(dataRes) : 0;
878
+ }
725
879
  if (Number.isInteger(time) && time >= 1000) {
726
880
  autoRefreshTimerRef.current = setTimeout(function () {
727
881
  // 自动刷新不显示 loading
728
- _request(requestData, true);
882
+ _request({}, true);
729
883
  }, Number(time));
884
+ emit('PRO_TABLE_REFRESH_TIMER_FLAG', Number(time));
730
885
  }
886
+ }).finally(function () {
887
+ setCustomTableLoading(false);
731
888
  });
732
889
  } else {
733
890
  getData.run(requestData);
@@ -739,7 +896,6 @@ var ProTable = function ProTable(props) {
739
896
  setSort(nextSort);
740
897
  _request(targetFormatSort(nextSort));
741
898
  }
742
-
743
899
  // 处理 dataFilter 中的 onFilter、onReset
744
900
  var dataFilter = _objectSpread(_objectSpread({
745
901
  mode: 'inline',
@@ -753,7 +909,7 @@ var ProTable = function ProTable(props) {
753
909
  return true;
754
910
  } : undefined,
755
911
  onFilter: function onFilter(values) {
756
- var _actionRef$current6, _actionRef$current6$c;
912
+ var _actionRef$current7, _actionRef$current7$c;
757
913
  // 全屏状态,判断全屏表单onFilter是否禁用
758
914
  if (fullscreenState && !filterEnableRef.current.fullscreen) {
759
915
  filterEnableRef.current.fullscreen = true;
@@ -766,9 +922,8 @@ var ProTable = function ProTable(props) {
766
922
  }
767
923
  (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter(values));
768
924
  // 搜索变化时,暂时先清空选择
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);
925
+ (_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);
770
926
  setCurrentPage(1);
771
- console.log('currentPageSize1', pageSize);
772
927
  _request(_defineProperty({}, targetPageKey, 1), false, values);
773
928
  },
774
929
  onReset: function onReset(values) {
@@ -776,7 +931,6 @@ var ProTable = function ProTable(props) {
776
931
  (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset());
777
932
  (_dataFilterFormRef$cu3 = dataFilterFormRef.current) === null || _dataFilterFormRef$cu3 === void 0 ? void 0 : _dataFilterFormRef$cu3.reset();
778
933
  setCurrentPage(1);
779
- console.log('currentPageSize2', pageSize);
780
934
  _request(_defineProperty({}, targetPageKey, 1), false, values);
781
935
  }
782
936
  });
@@ -790,10 +944,8 @@ var ProTable = function ProTable(props) {
790
944
  var renderTable = function renderTable(isFullScreen) {
791
945
  if (propsColumns) {
792
946
  return /*#__PURE__*/React.createElement("div", {
793
- className: classNames('teamix-pro-table-container', className, 'teamix-test-request'),
794
- "data-teamix-test-request": "url=".concat(url, "&formatResult=").concat(!!formatResult),
795
- "data-teamix-test-params": getTestRequestParams(propsParams),
796
- "data-teamix-test-data": getTestRequestData(propsColumns)
947
+ className: classNames('teamix-pro-table-container', className),
948
+ "data-teamix-spm": dataTeamixSpm
797
949
  }, /*#__PURE__*/React.createElement(Layout, {
798
950
  header: header,
799
951
  mainAction: mainAction,
@@ -806,11 +958,19 @@ var ProTable = function ProTable(props) {
806
958
  dataFilterFormRef: isFullScreen ? fullscreenDataFilterFormRef : normalDataFilterFormRef,
807
959
  rowSelection: rowSelection,
808
960
  filterColumnType: filterColumnType,
809
- fullScreenState: isFullScreen
810
- }), /*#__PURE__*/React.createElement(Table.StickyLock, _extends({
961
+ fullScreenState: isFullScreen,
962
+ toolBarAutoWidth: toolBarAutoWidth,
963
+ dataTeamixSpm: dataTeamixSpm,
964
+ switchCardView: switchCardView,
965
+ defaultView: defaultView,
966
+ autoRefresh: autoRefresh,
967
+ autoRefreshProps: autoRefreshProps,
968
+ bindUrlProps: bindUrlProps,
969
+ bindUrl: bindUrl
970
+ }), switchViewState === 'table' && /*#__PURE__*/React.createElement(Table.StickyLock, _objectSpread({
811
971
  hasBorder: false,
812
972
  dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
813
- columns: genProColumnToColumn(filteredColumns, showSkeleton, actionRef, context),
973
+ columns: genProColumnToColumn(filteredColumns, showSkeleton, actionRef, context, dataTeamixSpm, bindUrl, bindUrlProps),
814
974
  loading: getTableLoading(),
815
975
  className: classNames('teamix-pro-table', tableClassName, {
816
976
  'with-row-select': rowSelection,
@@ -822,22 +982,33 @@ var ProTable = function ProTable(props) {
822
982
  sort: sort,
823
983
  primaryKey: primaryKey,
824
984
  rowSelection: rowSelection,
825
- emptyContent: /*#__PURE__*/React.createElement(EmptyContent, null),
985
+ emptyContent: /*#__PURE__*/React.createElement(EmptyContent, _objectSpread({}, emptyProps)),
826
986
  sortIcons: getTableSortIcons(),
827
987
  fixedHeader: fullscreenState || fixedTableBody,
828
988
  maxBodyHeight: "calc(100vh - ".concat(headerHeight, "px)")
829
- // 过滤出可以传到 Table Props
830
- }, pickProps(getTableProps(), otherProps))));
989
+ }, pickProps(getTableProps(), otherProps))), switchViewState === 'card' && /*#__PURE__*/React.createElement(CardView, {
990
+ dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
991
+ showSkeleton: showSkeleton,
992
+ loading: getTableLoading(),
993
+ originColumns: propsColumns,
994
+ cardViewProps: cardViewProps,
995
+ scrollHeight: fullscreenState || fixedTableBody ? "calc(100vh - ".concat(headerHeight, "px)") : undefined,
996
+ actionRef: actionRef,
997
+ context: context,
998
+ columns: genProColumnToColumn(filteredColumns, showSkeleton, actionRef, context),
999
+ emptyProps: emptyProps,
1000
+ emptyContent: otherProps === null || otherProps === void 0 ? void 0 : otherProps.emptyContent
1001
+ }));
831
1002
  } else {
832
1003
  // 不传 columns 直接返回原始 Table
833
- return /*#__PURE__*/React.createElement(Table, _extends({
1004
+ return /*#__PURE__*/React.createElement(Table, _objectSpread({
834
1005
  className: cls()
835
1006
  }, pickProps(getTableProps(), otherProps)));
836
1007
  }
837
1008
  };
838
1009
  var renderFooterAction = function renderFooterAction() {
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) {
1010
+ var _footerAction$actions;
1011
+ 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) {
841
1012
  // 默认 context
842
1013
  var defaultContext = {
843
1014
  action: actionRef.current,
@@ -854,8 +1025,9 @@ var ProTable = function ProTable(props) {
854
1025
  });
855
1026
  return /*#__PURE__*/React.createElement("div", {
856
1027
  className: cls('footer-action')
857
- }, /*#__PURE__*/React.createElement(ProActionGroup, _extends({}, targetFooterActions, {
858
- context: _objectSpread(_objectSpread({}, defaultContext), targetFooterActions === null || targetFooterActions === void 0 ? void 0 : targetFooterActions.context)
1028
+ }, /*#__PURE__*/React.createElement(ProActionGroup, _objectSpread(_objectSpread({}, targetFooterActions), {}, {
1029
+ context: _objectSpread(_objectSpread({}, defaultContext), targetFooterActions === null || targetFooterActions === void 0 ? void 0 : targetFooterActions.context),
1030
+ "data-teamix-spm": dataTeamixSpm ? "".concat(dataTeamixSpm, "-footerAction") : undefined
859
1031
  })));
860
1032
  } else return footerAction;
861
1033
  };
@@ -864,22 +1036,22 @@ var ProTable = function ProTable(props) {
864
1036
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
865
1037
  // 翻页默认清空选择
866
1038
  if (!reserveSelectedRecords) {
867
- var _actionRef$current7, _actionRef$current7$c;
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);
1039
+ var _actionRef$current8, _actionRef$current8$c;
1040
+ (_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);
869
1041
  }
870
1042
  setCurrentPage(currentPage);
871
1043
  _request(_objectSpread(_defineProperty({}, targetPageKey, currentPage), params));
872
1044
  }
873
1045
  function onChangePaginationSize(currentPageSize) {
874
- var _request5;
1046
+ var _request10;
875
1047
  // 翻页默认清空选择
876
1048
  if (!reserveSelectedRecords) {
877
- var _actionRef$current8, _actionRef$current8$c;
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);
1049
+ var _actionRef$current9, _actionRef$current9$c;
1050
+ (_actionRef$current9 = actionRef.current) === null || _actionRef$current9 === void 0 ? void 0 : (_actionRef$current9$c = _actionRef$current9.clearRowSelection) === null || _actionRef$current9$c === void 0 ? void 0 : _actionRef$current9$c.call(_actionRef$current9);
879
1051
  }
880
1052
  setPageSize(currentPageSize);
881
1053
  setCurrentPage(1);
882
- _request((_request5 = {}, _defineProperty(_request5, targetPageSizeKey, currentPageSize), _defineProperty(_request5, targetPageKey, 1), _request5));
1054
+ _request((_request10 = {}, _defineProperty(_request10, targetPageSizeKey, currentPageSize), _defineProperty(_request10, targetPageKey, 1), _request10));
883
1055
  }
884
1056
  function renderRowSelection() {
885
1057
  if (rowSelection) {
@@ -890,13 +1062,13 @@ var ProTable = function ProTable(props) {
890
1062
  } else {
891
1063
  return /*#__PURE__*/React.createElement("div", {
892
1064
  className: cls('footer-left-wrapper')
893
- }, rowSelection.mode !== 'single' && /*#__PURE__*/React.createElement(Checkbox, _extends({
1065
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, rowSelection.mode !== 'single' && /*#__PURE__*/React.createElement(Checkbox, _objectSpread({
894
1066
  className: cls("footer-checkbox-".concat(size))
895
1067
  }, getCheckAllProps())), footerAction && renderFooterAction(), /*#__PURE__*/React.createElement("span", {
896
1068
  className: cls('selected-msg')
897
1069
  }, getMessage('selected', {
898
1070
  count: selectedCount
899
- })));
1071
+ }))));
900
1072
  }
901
1073
  } else if (footerAction) {
902
1074
  if (showSkeleton) {
@@ -910,7 +1082,11 @@ var ProTable = function ProTable(props) {
910
1082
  }
911
1083
  }
912
1084
  }
913
- if (showPagination) {
1085
+ if (showPagination && switchViewState === 'table' || (cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.useTablePagination) && switchViewState === 'card') {
1086
+ var _props$paginationProp3;
1087
+ var _ref8 = (_props$paginationProp3 = props === null || props === void 0 ? void 0 : props.paginationProps) !== null && _props$paginationProp3 !== void 0 ? _props$paginationProp3 : {},
1088
+ onPaginationPropsChange = _ref8.onChange,
1089
+ othersPaginationProps = _objectWithoutProperties(_ref8, _excluded2);
914
1090
  return /*#__PURE__*/React.createElement("div", {
915
1091
  className: cls('footer', {
916
1092
  'footer-has-rowSelection': rowSelection,
@@ -918,21 +1094,16 @@ var ProTable = function ProTable(props) {
918
1094
  })
919
1095
  }, renderRowSelection(), /*#__PURE__*/React.createElement("div", {
920
1096
  className: cls('footer-right-wrapper')
921
- }, showSkeleton ? /*#__PURE__*/React.createElement(Skeleton.Footer.Pagination, null) : /*#__PURE__*/React.createElement(React.Fragment, null, data.length > 0 && /*#__PURE__*/React.createElement(Pagination, _extends({
1097
+ }, showSkeleton ? /*#__PURE__*/React.createElement(Skeleton.Footer.Pagination, null) : /*#__PURE__*/React.createElement(React.Fragment, null, data.length > 0 && /*#__PURE__*/React.createElement(Pagination, _objectSpread({
922
1098
  className: cls('pagination'),
923
- onChange: function onChange(number) {
924
- return onChangePagination(number);
1099
+ onChange: function onChange(number, e) {
1100
+ onChangePagination(number);
1101
+ onPaginationPropsChange === null || onPaginationPropsChange === void 0 ? void 0 : onPaginationPropsChange(number, e);
925
1102
  },
926
1103
  total: total,
927
- responsivePaginationType: responsivePaginationType
1104
+ responsivePaginationType: responsivePaginationType,
928
1105
  // shape="arrow-only"
929
1106
  // pageSizePosition="end"
930
- ,
931
- totalRender: function totalRender(total) {
932
- return getMessage('total', {
933
- total: new Intl.NumberFormat().format(total)
934
- });
935
- },
936
1107
  pageSize: pageSize,
937
1108
  current: currentPage,
938
1109
  pageSizeList: pageSizeList,
@@ -940,9 +1111,10 @@ var ProTable = function ProTable(props) {
940
1111
  type: total / pageSize <= 2 ? 'simple' : 'normal',
941
1112
  onPageSizeChange: function onPageSizeChange(number) {
942
1113
  return onChangePaginationSize(number);
943
- }
944
- }, props.paginationProps)))));
945
- } else if (!showPagination) {
1114
+ },
1115
+ useMaxData: globalUseMaxData !== null && globalUseMaxData !== void 0 ? globalUseMaxData : useMaxData
1116
+ }, othersPaginationProps)))));
1117
+ } else if (!showPagination && (footerAction || rowSelection || useRowSelection)) {
946
1118
  return /*#__PURE__*/React.createElement("div", {
947
1119
  className: cls('footer', {
948
1120
  'footer-has-rowSelection': rowSelection
@@ -952,10 +1124,10 @@ var ProTable = function ProTable(props) {
952
1124
  }, showSkeleton ? /*#__PURE__*/React.createElement(Skeleton.Footer.Pagination, null) : footer));
953
1125
  }
954
1126
  };
955
-
956
1127
  // 判断是否需要吸底
957
1128
  var fixFooterState = useMemo(function () {
958
1129
  if (fullscreenState) {
1130
+ // TODO XXX
959
1131
  return false;
960
1132
  }
961
1133
  if (fixedTableBody || footerSuction) {
@@ -972,12 +1144,11 @@ var ProTable = function ProTable(props) {
972
1144
  return /*#__PURE__*/React.createElement("div", {
973
1145
  className: cls({
974
1146
  '': true,
975
- fullscreen: fullscreenState
1147
+ fullscreen: isFullScreen
976
1148
  // 'footer-suction': footerSuctionState && footerSuction,
977
1149
  }),
978
-
979
1150
  ref: tableRef
980
1151
  }, renderTable(isFullScreen), fixFooterState && /*#__PURE__*/React.createElement(ProPageContainer.FixedFooter, null, renderFooter()), !fixFooterState && renderFooter());
981
1152
  });
982
1153
  };
983
- export default ProTable;
1154
+ export default ProComponentAspect(ProTable, 'ProTable');