@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
@@ -5,24 +5,28 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  var _exportNames = {};
7
7
  exports.default = void 0;
8
- var _react = _interopRequireWildcard(require("react"));
9
8
  var _components = require("@alicloudfe/components");
10
- var _Pagination = _interopRequireDefault(require("./components/Pagination"));
11
- var _genProColumnToColumn = _interopRequireDefault(require("./utils/genProColumnToColumn"));
9
+ var _hooks = require("@teamix/hooks");
10
+ var _proField = require("@teamix/pro-field");
12
11
  var _utils = require("@teamix/utils");
12
+ var _classnames = _interopRequireDefault(require("classnames"));
13
+ var _lodash = _interopRequireDefault(require("lodash.debounce"));
14
+ var _react = _interopRequireWildcard(require("react"));
15
+ var _actions = require("../actions");
16
+ var _pageContainer = _interopRequireDefault(require("../page-container"));
13
17
  var _skeleton = require("../skeleton");
14
- require("./index.scss");
18
+ var _aspect = require("../utils/aspect");
19
+ var _CardView = _interopRequireDefault(require("./components/CardView"));
15
20
  var _Layout = _interopRequireDefault(require("./components/Layout"));
21
+ var _Pagination = _interopRequireDefault(require("./components/Pagination"));
22
+ var _Fullscreen = _interopRequireDefault(require("./components/ToolBar/Fullscreen"));
23
+ require("./index.scss");
16
24
  var _utils2 = require("./utils");
25
+ var _genProColumnToColumn = _interopRequireDefault(require("./utils/genProColumnToColumn"));
17
26
  var _getTableProps = _interopRequireDefault(require("./utils/getTableProps"));
18
27
  var _getTableSortIcons = _interopRequireDefault(require("./utils/getTableSortIcons"));
19
28
  var _useTableSelection = _interopRequireDefault(require("./utils/useTableSelection"));
20
- var _Fullscreen = _interopRequireDefault(require("./components/ToolBar/Fullscreen"));
21
- var _EmptyContent = _interopRequireDefault(require("./components/EmptyContent"));
22
- var _actions2 = require("../actions");
23
- var _classnames = _interopRequireDefault(require("classnames"));
24
- var _pageContainer = _interopRequireDefault(require("../page-container"));
25
- var _lodash = _interopRequireDefault(require("lodash.debounce"));
29
+ var _util = require("./utils/util");
26
30
  var _typing = require("./typing");
27
31
  Object.keys(_typing).forEach(function (key) {
28
32
  if (key === "default" || key === "__esModule") return;
@@ -35,19 +39,16 @@ Object.keys(_typing).forEach(function (key) {
35
39
  }
36
40
  });
37
41
  });
38
- 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"];
39
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
42
+ 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"],
43
+ _excluded2 = ["onChange"];
40
44
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
41
45
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
42
- 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); }
46
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
43
47
  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); }
44
48
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
45
49
  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."); }
46
50
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
47
51
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
48
- 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; }
49
- 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; }
50
- 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; }
51
52
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
52
53
  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."); }
53
54
  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); }
@@ -56,8 +57,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
56
57
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
57
58
  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; }
58
59
  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; }
60
+ 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; }
61
+ 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; }
62
+ 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; }
59
63
  var cls = (0, _utils.usePrefixCls)('teamix-pro-table');
60
-
61
64
  /**
62
65
  * 处理原生传入的 columns 以便于 选择列 方便处理
63
66
  * @param columns 原生传入的 columns
@@ -67,7 +70,7 @@ var processColumns = function processColumns(columns, initialColumns) {
67
70
  var _getGlobalConfig;
68
71
  var globalFilterColumns = (_getGlobalConfig = (0, _utils.getGlobalConfig)('ProTable')) === null || _getGlobalConfig === void 0 ? void 0 : _getGlobalConfig.filterColumns;
69
72
  var filterColumns = columns.filter(function (item) {
70
- return item.columnFilters !== false && (item === null || item === void 0 ? void 0 : item.hidden) !== true && (!globalFilterColumns || globalFilterColumns(item));
73
+ return item.columnFilters !== false && (item === null || item === void 0 ? void 0 : item.hidden) !== true && (!globalFilterColumns || globalFilterColumns(_objectSpread({}, item)));
71
74
  });
72
75
  // 处理只剩一列批量选择的情况下宽度错乱问题
73
76
  if (filterColumns === null || filterColumns === void 0 ? void 0 : filterColumns.length) {
@@ -92,7 +95,6 @@ var processColumns = function processColumns(columns, initialColumns) {
92
95
  }
93
96
  return filterColumns;
94
97
  };
95
-
96
98
  /** 默认请求翻页参数 */
97
99
  var globalPageKey = 'currentPage';
98
100
  var globalPageSizeKey = 'pageSize';
@@ -105,7 +107,7 @@ var globalFormatSort = function globalFormatSort(sort) {
105
107
  return {};
106
108
  };
107
109
  var ProTable = function ProTable(props) {
108
- var _rowSelection$selecte;
110
+ var _urlState$currentPage, _rowSelection$selecte;
109
111
  var header = props.header,
110
112
  className = props.className,
111
113
  tableClassName = props.tableClassName,
@@ -154,9 +156,8 @@ var ProTable = function ProTable(props) {
154
156
  _props$footerSuction = props.footerSuction,
155
157
  footerSuction = _props$footerSuction === void 0 ? false : _props$footerSuction,
156
158
  _props$autoRefresh = props.autoRefresh,
157
- autoRefresh = _props$autoRefresh === void 0 ? function () {
158
- return false;
159
- } : _props$autoRefresh,
159
+ autoRefresh = _props$autoRefresh === void 0 ? false : _props$autoRefresh,
160
+ autoRefreshProps = props.autoRefreshProps,
160
161
  customRequest = props.customRequest,
161
162
  _props$filterColumnTy = props.filterColumnType,
162
163
  filterColumnType = _props$filterColumnTy === void 0 ? 'auto' : _props$filterColumnTy,
@@ -170,15 +171,33 @@ var ProTable = function ProTable(props) {
170
171
  _props$fixedTableBody = props.fixedTableBody,
171
172
  fixedTableBody = _props$fixedTableBody === void 0 ? false : _props$fixedTableBody,
172
173
  isTree = props.isTree,
174
+ _props$toolBarAutoWid = props.toolBarAutoWidth,
175
+ toolBarAutoWidth = _props$toolBarAutoWid === void 0 ? true : _props$toolBarAutoWid,
176
+ dataTeamixSpm = props['data-teamix-spm'],
177
+ _props$switchCardView = props.switchCardView,
178
+ switchCardView = _props$switchCardView === void 0 ? false : _props$switchCardView,
179
+ cardViewProps = props.cardViewProps,
180
+ _props$defaultView = props.defaultView,
181
+ defaultView = _props$defaultView === void 0 ? 'table' : _props$defaultView,
182
+ emptyProps = props.emptyProps,
183
+ bindUrlProps = props.bindUrlProps,
184
+ bindUrl = props.bindUrl,
185
+ _props$autoRedirect = props.autoRedirect,
186
+ autoRedirect = _props$autoRedirect === void 0 ? true : _props$autoRedirect,
187
+ useMaxData = props.useMaxData,
173
188
  otherProps = _objectWithoutProperties(props, _excluded);
174
189
  var targetPageKey = pageKey || globalPageKey;
175
190
  var targetPageSizeKey = pageSizeKey || globalPageSizeKey;
176
191
  var targetFormatSort = formatSort || globalFormatSort;
177
- var _useState = (0, _react.useState)(1),
192
+ var _ref = bindUrl ? (0, _hooks.useUrlState)() : [],
193
+ _ref2 = _slicedToArray(_ref, 2),
194
+ urlState = _ref2[0],
195
+ setUrlState = _ref2[1];
196
+ var _useState = (0, _react.useState)((_urlState$currentPage = urlState === null || urlState === void 0 ? void 0 : urlState.currentPage) !== null && _urlState$currentPage !== void 0 ? _urlState$currentPage : 1),
178
197
  _useState2 = _slicedToArray(_useState, 2),
179
198
  currentPage = _useState2[0],
180
199
  setCurrentPage = _useState2[1];
181
- var _useState3 = (0, _react.useState)(props.pageSize || 10),
200
+ var _useState3 = (0, _react.useState)((urlState === null || urlState === void 0 ? void 0 : urlState.pageSize) || props.pageSize || 10),
182
201
  _useState4 = _slicedToArray(_useState3, 2),
183
202
  pageSize = _useState4[0],
184
203
  setPageSize = _useState4[1];
@@ -189,7 +208,7 @@ var ProTable = function ProTable(props) {
189
208
  var _useState7 = (0, _react.useState)(propsDataSource !== null && propsDataSource !== void 0 ? propsDataSource : []),
190
209
  _useState8 = _slicedToArray(_useState7, 2),
191
210
  data = _useState8[0],
192
- setData = _useState8[1];
211
+ _setData = _useState8[1];
193
212
  var _useState9 = (0, _react.useState)(props.sort || {}),
194
213
  _useState10 = _slicedToArray(_useState9, 2),
195
214
  sort = _useState10[0],
@@ -220,7 +239,24 @@ var ProTable = function ProTable(props) {
220
239
  _useState20 = _slicedToArray(_useState19, 2),
221
240
  showLoading = _useState20[0],
222
241
  setShowLoading = _useState20[1];
223
-
242
+ // 表格内部用作存储的 Ref,标识 Table 组件是否被第一次渲染。用作 useUrlState filter 第一次渲染时使用 state 数据请求
243
+ var dataRef = (0, _react.useRef)({
244
+ flag: true
245
+ });
246
+ (0, _react.useEffect)(function () {
247
+ if (bindUrl && (bindUrlProps === null || bindUrlProps === void 0 ? void 0 : bindUrlProps.pagination) !== false) {
248
+ if ((urlState === null || urlState === void 0 ? void 0 : urlState.currentPage) !== currentPage) {
249
+ setUrlState === null || setUrlState === void 0 ? void 0 : setUrlState({
250
+ currentPage: currentPage
251
+ });
252
+ }
253
+ if ((urlState === null || urlState === void 0 ? void 0 : urlState.pageSize) !== pageSize) {
254
+ setUrlState === null || setUrlState === void 0 ? void 0 : setUrlState({
255
+ pageSize: pageSize
256
+ });
257
+ }
258
+ }
259
+ }, [currentPage, pageSize, urlState]);
224
260
  // 存储能够被 on 监听到的 ProTable 状态
225
261
  // 因为只做存储用。不需要更新视图以及需要同步更改。所以不使用 setState 更新
226
262
  var _useState21 = (0, _react.useState)({
@@ -230,17 +266,22 @@ var ProTable = function ProTable(props) {
230
266
  }),
231
267
  _useState22 = _slicedToArray(_useState21, 1),
232
268
  actionRefState = _useState22[0];
233
-
234
269
  // 存储 on 监听事件
235
270
  var _useState23 = (0, _react.useState)({
236
271
  fullScreenState: {}
237
272
  }),
238
273
  _useState24 = _slicedToArray(_useState23, 1),
239
274
  actionRefCallback = _useState24[0];
240
-
241
275
  // 存储定时器 id
242
276
  var autoRefreshTimerRef = (0, _react.useRef)();
243
277
  var onResize = null;
278
+ // useEffect(() => {
279
+ // setShowSkeleton(propsShowSkeleton);
280
+ // }, [propsShowSkeleton]);
281
+ // useEffect(() => {
282
+ // console.log('传入的props变化', propsLoading);
283
+ // setShowLoading(propsLoading ?? false);
284
+ // }, [propsLoading]);
244
285
  (0, _react.useEffect)(function () {
245
286
  var _propsDataFilter$sche, _propsDataFilter$sche2;
246
287
  getHeaderHeight(fullscreenState);
@@ -267,7 +308,6 @@ var ProTable = function ProTable(props) {
267
308
  }
268
309
  }, 500);
269
310
  }
270
-
271
311
  // 如果不传 dataFilter,则在这里初始化请求
272
312
  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;
273
313
  if (requestWhenMount && !hasDataFilter) {
@@ -286,7 +326,6 @@ var ProTable = function ProTable(props) {
286
326
  actionRef.current = undefined;
287
327
  };
288
328
  }, []);
289
-
290
329
  // 获取header高度,用作全屏吸底吸底高度计算以及固定body高度计算(滚动条在底部)
291
330
  var getHeaderHeight = function getHeaderHeight(isFullscreen, offset) {
292
331
  var _tableDom$getElements, _tableDom$getElements2, _document$querySelect, _document$querySelect2, _document$querySelect3;
@@ -317,23 +356,22 @@ var ProTable = function ProTable(props) {
317
356
  // 16px 为 padding
318
357
  var pageHeaderHeight = ((_pageContainerDom$off = pageContainerDom === null || pageContainerDom === void 0 ? void 0 : pageContainerDom.offsetHeight) !== null && _pageContainerDom$off !== void 0 ? _pageContainerDom$off : 0) + 16;
319
358
  var teamixNavHeight = (_teamixNavDom$offsetH = teamixNavDom === null || teamixNavDom === void 0 ? void 0 : teamixNavDom.offsetHeight) !== null && _teamixNavDom$offsetH !== void 0 ? _teamixNavDom$offsetH : 0;
320
-
321
359
  // 1 为预留值,js无法取出精确高度,会被四舍五入
322
360
  var offsetHeaderHeight = headerHeight + tableHeaderHeight + pageHeaderHeight + teamixNavHeight + footerRowSelectionHeight + 16 + (offset !== null && offset !== void 0 ? offset : 0) + 1;
323
- if (tableBodyDom.clientHeight < tableBodyDom.scrollHeight) {
361
+ if (switchViewState === 'card') {
362
+ offsetHeaderHeight = offsetHeaderHeight - tableHeaderHeight - footerRowSelectionHeight;
363
+ }
364
+ if ((tableBodyDom === null || tableBodyDom === void 0 ? void 0 : tableBodyDom.clientHeight) < (tableBodyDom === null || tableBodyDom === void 0 ? void 0 : tableBodyDom.scrollHeight)) {
324
365
  setFooterSuctionState(true);
325
366
  } else {
326
367
  setFooterSuctionState(false);
327
368
  }
328
-
329
369
  // 如果有切换区tab,那么重新计算
330
370
  if (headerFixedTopSectionDom.clientHeight) {
331
371
  var _headerFixedTopSectio;
332
372
  var headerFixedTopSectionHeight = (_headerFixedTopSectio = headerFixedTopSectionDom.clientHeight) !== null && _headerFixedTopSectio !== void 0 ? _headerFixedTopSectio : 0;
333
-
334
373
  // const clientTableBodyHeight =
335
374
  // document.body.clientHeight - offsetHeaderHeight;
336
-
337
375
  setHeaderHeight(headerFixedTopSectionHeight + teamixNavHeight + footerRowSelectionHeight + tableHeaderHeight + 1);
338
376
  return;
339
377
  }
@@ -344,40 +382,44 @@ var ProTable = function ProTable(props) {
344
382
  }
345
383
  }, 50);
346
384
  };
347
-
348
385
  // header 区域高度。用作全屏计算吸顶吸底高度。默认不做计算
349
386
  var _useState25 = (0, _react.useState)(0),
350
387
  _useState26 = _slicedToArray(_useState25, 2),
351
388
  headerHeight = _useState26[0],
352
389
  setHeaderHeight = _useState26[1];
353
-
354
390
  // 全屏显示 className
355
391
  var _useState27 = (0, _react.useState)(false),
356
392
  _useState28 = _slicedToArray(_useState27, 2),
357
393
  fullscreenState = _useState28[0],
358
394
  setFullscreenState = _useState28[1];
395
+ // 切换视角
396
+ var _useState29 = (0, _react.useState)(defaultView !== null && defaultView !== void 0 ? defaultView : 'table'),
397
+ _useState30 = _slicedToArray(_useState29, 2),
398
+ switchViewState = _useState30[0],
399
+ setSwitchViewState = _useState30[1];
359
400
  // 切换全屏搜索开关
360
401
  var filterEnableRef = (0, _react.useRef)({
361
402
  fullscreen: false,
362
403
  normal: true
363
404
  });
364
-
405
+ // 全局状态 : 大数据截断
406
+ var globalUseMaxData = (0, _react.useMemo)(function () {
407
+ var _getGlobalConfig2;
408
+ return (_getGlobalConfig2 = (0, _utils.getGlobalConfig)('ProTable')) === null || _getGlobalConfig2 === void 0 ? void 0 : _getGlobalConfig2.useMaxData;
409
+ }, []);
365
410
  // 非全屏状态下的
366
411
  var normalDataFilterFormRef = (0, _react.useRef)();
367
412
  var fullscreenDataFilterFormRef = (0, _react.useRef)();
368
413
  var normalDataFilterForm = normalDataFilterFormRef.current;
369
414
  var fullscreenDataFilterForm = fullscreenDataFilterFormRef.current;
370
-
371
415
  // 传给 QueryFilter 的 formRef
372
416
  var dataFilterFormRef = !fullscreenState ? normalDataFilterFormRef : fullscreenDataFilterFormRef;
373
417
  // let dataFilterForm = dataFilterFormRef.current;
374
-
375
418
  // 整个内容区是否超过一屏。用于表格在非全屏模式下的吸底
376
- var _useState29 = (0, _react.useState)(false),
377
- _useState30 = _slicedToArray(_useState29, 2),
378
- footerSuctionState = _useState30[0],
379
- setFooterSuctionState = _useState30[1];
380
-
419
+ var _useState31 = (0, _react.useState)(false),
420
+ _useState32 = _slicedToArray(_useState31, 2),
421
+ footerSuctionState = _useState32[0],
422
+ setFooterSuctionState = _useState32[1];
381
423
  // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
382
424
  var getFooterSuctionState = function getFooterSuctionState() {
383
425
  if (!footerSuction) {
@@ -399,7 +441,6 @@ var ProTable = function ProTable(props) {
399
441
  }
400
442
  }
401
443
  };
402
-
403
444
  // rowSelection 相关
404
445
  var rowSelectionHook = (0, _useTableSelection.default)(_objectSpread(_objectSpread({}, propsRowSelection), {}, {
405
446
  // 当初始出现骨架屏的时候,不可选择
@@ -430,17 +471,15 @@ var ProTable = function ProTable(props) {
430
471
  (0, _react.useEffect)(function () {
431
472
  getRowSelection && getRowSelection(rowSelectionHook);
432
473
  }, [rowSelectionHook]);
433
-
434
474
  // 获取 table 左下角 checkbox 属性
435
475
  function getCheckAllProps() {
436
- var _ref = rowSelection,
437
- _ref$onChange = _ref.onChange,
438
- _onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
439
- _ref$onSelectAll = _ref.onSelectAll,
440
- onSelectAll = _ref$onSelectAll === void 0 ? function () {} : _ref$onSelectAll,
441
- _ref$selectedRowKeys = _ref.selectedRowKeys,
442
- selectedRowKeys = _ref$selectedRowKeys === void 0 ? [] : _ref$selectedRowKeys,
443
- getProps = _ref.getProps;
476
+ var _rowSelection$onChang = rowSelection.onChange,
477
+ _onChange = _rowSelection$onChang === void 0 ? function () {} : _rowSelection$onChang,
478
+ _rowSelection$onSelec = rowSelection.onSelectAll,
479
+ onSelectAll = _rowSelection$onSelec === void 0 ? function () {} : _rowSelection$onSelec,
480
+ _rowSelection$selecte2 = rowSelection.selectedRowKeys,
481
+ selectedRowKeys = _rowSelection$selecte2 === void 0 ? [] : _rowSelection$selecte2,
482
+ getProps = rowSelection.getProps;
444
483
  var dataSource = data;
445
484
  var allRowKeys = dataSource.filter(function (d, i) {
446
485
  var _getProps;
@@ -484,14 +523,12 @@ var ProTable = function ProTable(props) {
484
523
  setFilteredColumns(columns);
485
524
  (_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);
486
525
  }, [propsColumns]);
487
-
488
526
  // dataSource 受控
489
527
  (0, _react.useEffect)(function () {
490
528
  if (propsDataSource) {
491
- setData(propsDataSource);
529
+ _setData(propsDataSource);
492
530
  }
493
531
  }, [propsDataSource]);
494
-
495
532
  // 初始化 ActionRef。
496
533
  (0, _utils2.initActionRef)(actionRef, {
497
534
  getState: function getState() {
@@ -511,20 +548,19 @@ var ProTable = function ProTable(props) {
511
548
  actionRefCallback[state][name] = fun;
512
549
  },
513
550
  off: function off(name) {
514
- actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref2) {
515
- var _ref3 = _slicedToArray(_ref2, 2),
516
- k = _ref3[0],
517
- v = _ref3[1];
518
- var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref4) {
519
- var _ref5 = _slicedToArray(_ref4, 1),
520
- k = _ref5[0];
551
+ actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref3) {
552
+ var _ref4 = _slicedToArray(_ref3, 2),
553
+ k = _ref4[0],
554
+ v = _ref4[1];
555
+ var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref5) {
556
+ var _ref6 = _slicedToArray(_ref5, 1),
557
+ k = _ref6[0];
521
558
  return k !== name;
522
559
  }));
523
560
  return [k, filterV];
524
561
  }));
525
562
  }
526
563
  });
527
-
528
564
  // 绑定 Actions
529
565
  (0, _utils2.useActionType)(actionRef, {
530
566
  fullScreen: function fullScreen() {
@@ -551,7 +587,14 @@ var ProTable = function ProTable(props) {
551
587
  _setSize(mode);
552
588
  },
553
589
  refresh: function refresh(params) {
554
- return _request(params);
590
+ // card视角的刷新等于重新请求
591
+ if (switchViewState === 'card' && !propsDataSource) {
592
+ setCurrentPage(1);
593
+ _request(_objectSpread(_objectSpread({}, params), {}, _defineProperty({}, targetPageKey, 1)), undefined, undefined, true);
594
+ setShowSkeleton(true);
595
+ } else {
596
+ _request(params);
597
+ }
555
598
  },
556
599
  request: function request(params) {
557
600
  // 如果请求中还有翻页相关信息,需要自动设置到指定页
@@ -570,11 +613,20 @@ var ProTable = function ProTable(props) {
570
613
  (_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, {});
571
614
  (_dataFilterFormRef$cu = dataFilterFormRef.current) === null || _dataFilterFormRef$cu === void 0 ? void 0 : _dataFilterFormRef$cu.reset();
572
615
  setCurrentPage(1);
573
- _request(_defineProperty({}, targetPageKey, 1));
616
+ _request(_defineProperty({}, targetPageKey, 1), undefined, undefined, true);
574
617
  },
575
618
  resetPage: function resetPage() {
576
619
  setCurrentPage(1);
577
620
  },
621
+ nextPage: function nextPage() {
622
+ var _props$paginationProp, _props$paginationProp2;
623
+ var newCurrentPage = currentPage + 1;
624
+ setCurrentPage(newCurrentPage);
625
+ 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, {});
626
+ if (!propsDataSource) {
627
+ _request(_defineProperty({}, targetPageKey, newCurrentPage));
628
+ }
629
+ },
578
630
  rowSelection: rowSelection,
579
631
  clearRowSelection: function clearRowSelection() {
580
632
  rowSelectionHook.setSelectedRowKeys([]);
@@ -594,31 +646,94 @@ var ProTable = function ProTable(props) {
594
646
  normalDataFilterForm: normalDataFilterForm,
595
647
  fullscreenDataFilterForm: fullscreenDataFilterForm,
596
648
  filterEnableRef: filterEnableRef,
649
+ setData: function setData(data) {
650
+ _setData(data);
651
+ },
597
652
  resetTableMaxBodyHeight: function resetTableMaxBodyHeight(offset) {
598
653
  getHeaderHeight(fullscreenState, offset);
654
+ },
655
+ switchView: function switchView(view) {
656
+ setSwitchViewState(view);
657
+ if (!propsDataSource) {
658
+ setCurrentPage(1);
659
+ }
660
+ if (view === 'table') {
661
+ setPageSize(pageSize !== null && pageSize !== void 0 ? pageSize : 20);
662
+ if (!propsDataSource) {
663
+ var _request4;
664
+ setShowSkeleton(true);
665
+ _request((_request4 = {}, _defineProperty(_request4, targetPageSizeKey, pageSize !== null && pageSize !== void 0 ? pageSize : 20), _defineProperty(_request4, targetPageKey, 1), _request4));
666
+ }
667
+ }
668
+ if (view === 'card') {
669
+ var _cardViewProps$pageSi;
670
+ setPageSize((_cardViewProps$pageSi = cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.pageSize) !== null && _cardViewProps$pageSi !== void 0 ? _cardViewProps$pageSi : 12);
671
+ if (!propsDataSource) {
672
+ var _cardViewProps$pageSi2, _request5;
673
+ setShowSkeleton(true);
674
+ _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));
675
+ }
676
+ }
677
+ getHeaderHeight(fullscreenState);
678
+ },
679
+ setAutoRefreshTimers: function setAutoRefreshTimers(timers) {
680
+ clearTimeout(autoRefreshTimerRef.current);
681
+ autoRefreshTimerRef.current = null;
682
+ autoRefreshTimerRef.current = setTimeout(function () {
683
+ var _actionRef$current5, _actionRef$current5$r;
684
+ (_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);
685
+ }, timers);
686
+ (0, _utils2.emit)('PRO_TABLE_REFRESH_TIMER_FLAG', timers);
687
+ },
688
+ clearAutoRefreshTimers: function clearAutoRefreshTimers() {
689
+ clearTimeout(autoRefreshTimerRef.current);
690
+ autoRefreshTimerRef.current = null;
599
691
  }
600
692
  });
601
-
602
693
  // 将 Actions 绑定到传入的 propsActionRef 中
603
694
  if (propsActionRef) {
604
695
  propsActionRef.current = actionRef.current;
605
696
  }
606
697
  function onFormatResult(next) {
607
- var _next$data;
608
698
  props.onFormatResult && props.onFormatResult(next);
609
- var time = autoRefresh ? autoRefresh(next.data) : false;
699
+ // 如果开启了 autoRedirect 当当前页数不为1,并且data为空的时候,重定向到第一页
700
+ if (autoRedirect) {
701
+ var _next$data;
702
+ if (!(next === null || next === void 0 ? void 0 : (_next$data = next.data) === null || _next$data === void 0 ? void 0 : _next$data.length) && currentPage > 1) {
703
+ setCurrentPage(1);
704
+ setShowLoading(true);
705
+ setTimeout(function () {
706
+ _request(_defineProperty({}, targetPageKey, 1));
707
+ });
708
+ }
709
+ }
710
+ var time = 0;
711
+ if (autoRefresh) {
712
+ time = 60 * 1000;
713
+ }
714
+ if (autoRefresh && typeof autoRefresh !== 'boolean') {
715
+ time = autoRefresh ? autoRefresh(next.data) : 0;
716
+ }
610
717
  if (Number.isInteger(time) && time >= 1000) {
611
718
  autoRefreshTimerRef.current = setTimeout(function () {
612
719
  // 自动刷新不显示 loading
613
720
  _request({}, true);
614
721
  }, Number(time));
722
+ (0, _utils2.emit)('PRO_TABLE_REFRESH_TIMER_FLAG', Number(time));
615
723
  }
616
724
  // 设置 dataSource、total
617
- setData(next.data || []);
618
- setTotal(next.total || ((_next$data = next.data) === null || _next$data === void 0 ? void 0 : _next$data.length));
725
+ if (switchViewState === 'table' || currentPage === 1 || (cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.useTablePagination)) {
726
+ var _next$data2;
727
+ _setData(next.data || []);
728
+ setTotal(next.total || ((_next$data2 = next.data) === null || _next$data2 === void 0 ? void 0 : _next$data2.length));
729
+ }
730
+ if (switchViewState === 'card' && currentPage !== 1 && !(cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.useTablePagination)) {
731
+ var _next$data3;
732
+ _setData([].concat(_toConsumableArray(data), _toConsumableArray(next.data || [])));
733
+ setTotal(total + (next.total || ((_next$data3 = next.data) === null || _next$data3 === void 0 ? void 0 : _next$data3.length)));
734
+ }
619
735
  setShowSkeleton(false);
620
736
  }
621
-
622
737
  // 请求表格数据工具函数
623
738
  var getData = (0, _utils.useRequest)(function (params) {
624
739
  return _defineProperty({
@@ -644,6 +759,10 @@ var ProTable = function ProTable(props) {
644
759
  data: (0, _utils.getDeepValue)(formatResult.data, result) || [],
645
760
  total: isNaN(dataTotal) ? 0 : Number(dataTotal)
646
761
  };
762
+ } else if (typeof formatResult === 'string') {
763
+ nextData = (0, _utils.getTargetValue)(formatResult, {
764
+ res: result
765
+ });
647
766
  }
648
767
  }
649
768
  if (nextData instanceof Promise) {
@@ -679,10 +798,14 @@ var ProTable = function ProTable(props) {
679
798
  }
680
799
  }
681
800
  });
682
-
683
801
  // 请求函数
684
- function _request(params, noLoading, filterParams) {
685
- var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current5, _actionRef$current5$g, _objectSpread2;
802
+ function _request(params, noLoading, filterParams, isReset) {
803
+ var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current6, _actionRef$current6$g, _objectSpread3;
804
+ // 首次渲染表格,获取 urlState 上的 表头 filter 数据
805
+ if (bindUrl && (bindUrlProps === null || bindUrlProps === void 0 ? void 0 : bindUrlProps.headerFilters) !== false && dataRef.current.flag) {
806
+ (0, _util.getUrlStateFilter)(urlState !== null && urlState !== void 0 ? urlState : {}, actionRef);
807
+ dataRef.current.flag = false;
808
+ }
686
809
  // 如果没有传 url 且没有 customRequest,直接返回
687
810
  if (!url && !customRequest) {
688
811
  return;
@@ -695,10 +818,17 @@ var ProTable = function ProTable(props) {
695
818
  // 筛选区请求参数
696
819
  var dataFilterParams = filterParams !== null && filterParams !== void 0 ? filterParams : (_dataFilterFormRef$cu2 = dataFilterFormRef.current) === null || _dataFilterFormRef$cu2 === void 0 ? void 0 : _dataFilterFormRef$cu2.values;
697
820
  // 列过滤请求参数
698
- 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 : {};
699
-
821
+ 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 : {};
700
822
  // 格式化后的请求参数
701
- 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));
823
+ var requestData = {};
824
+ 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);
825
+ if (typeof formatParams === 'string') {
826
+ requestData = (0, _utils.getTargetValue)(formatParams, {
827
+ params: preParams
828
+ });
829
+ } else {
830
+ requestData = formatParams(preParams);
831
+ }
702
832
  if (requestData) {
703
833
  if (autoRefreshTimerRef.current) {
704
834
  clearTimeout(autoRefreshTimerRef.current);
@@ -720,19 +850,38 @@ var ProTable = function ProTable(props) {
720
850
  }
721
851
  // 如果使用自定义请求
722
852
  if (customRequest && typeof customRequest === 'function') {
723
- setCustomTableLoading(true);
853
+ if (isReset) {
854
+ setShowSkeleton(true);
855
+ } else {
856
+ setCustomTableLoading(true);
857
+ }
724
858
  customRequest(requestData).then(function (res) {
725
- var data = res.data,
726
- total = res.total,
859
+ var dataRes = res.data,
860
+ totalRes = res.total,
727
861
  success = res.success;
728
862
  if (success === true) {
863
+ // 如果开启了 autoRedirect 当当前页数不为1,并且data为空的时候,重定向到第一页
864
+ if (autoRedirect) {
865
+ if (!(dataRes === null || dataRes === void 0 ? void 0 : dataRes.length) && currentPage > 1) {
866
+ setCurrentPage(1);
867
+ setShowLoading(true);
868
+ setTimeout(function () {
869
+ _request(_defineProperty({}, targetPageKey, 1));
870
+ });
871
+ }
872
+ }
729
873
  // 设置 dataSource、total
730
- setData(data || []);
731
- setTotal(total || (data === null || data === void 0 ? void 0 : data.length));
874
+ if (switchViewState === 'table' || params[targetPageKey] === 1 || isReset || (cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.useTablePagination)) {
875
+ _setData(dataRes || []);
876
+ setTotal(totalRes || (dataRes === null || dataRes === void 0 ? void 0 : dataRes.length));
877
+ }
878
+ if (switchViewState === 'card' && params[targetPageKey] !== 1 && !isReset && !(cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.useTablePagination)) {
879
+ _setData([].concat(_toConsumableArray(data), _toConsumableArray(dataRes || [])));
880
+ setTotal(total + (totalRes || (dataRes === null || dataRes === void 0 ? void 0 : dataRes.length)));
881
+ }
732
882
  setShowSkeleton(false);
733
883
  setCustomTableLoading(false);
734
884
  }
735
-
736
885
  // 重新计算是否需要吸底
737
886
  if (footerSuction) {
738
887
  getFooterSuctionState();
@@ -740,15 +889,23 @@ var ProTable = function ProTable(props) {
740
889
  if (fixedTableBody) {
741
890
  getHeaderHeight(fullscreenState);
742
891
  }
743
-
744
892
  // customRequest 中支持 autoRefresh
745
- var time = autoRefresh ? autoRefresh(data) : false;
893
+ var time = 0;
894
+ if (autoRefresh) {
895
+ time = 60 * 1000;
896
+ }
897
+ if (autoRefresh && typeof autoRefresh !== 'boolean') {
898
+ time = autoRefresh ? autoRefresh(dataRes) : 0;
899
+ }
746
900
  if (Number.isInteger(time) && time >= 1000) {
747
901
  autoRefreshTimerRef.current = setTimeout(function () {
748
902
  // 自动刷新不显示 loading
749
- _request(requestData, true);
903
+ _request({}, true);
750
904
  }, Number(time));
905
+ (0, _utils2.emit)('PRO_TABLE_REFRESH_TIMER_FLAG', Number(time));
751
906
  }
907
+ }).finally(function () {
908
+ setCustomTableLoading(false);
752
909
  });
753
910
  } else {
754
911
  getData.run(requestData);
@@ -760,7 +917,6 @@ var ProTable = function ProTable(props) {
760
917
  setSort(nextSort);
761
918
  _request(targetFormatSort(nextSort));
762
919
  }
763
-
764
920
  // 处理 dataFilter 中的 onFilter、onReset
765
921
  var dataFilter = _objectSpread(_objectSpread({
766
922
  mode: 'inline',
@@ -774,7 +930,7 @@ var ProTable = function ProTable(props) {
774
930
  return true;
775
931
  } : undefined,
776
932
  onFilter: function onFilter(values) {
777
- var _actionRef$current6, _actionRef$current6$c;
933
+ var _actionRef$current7, _actionRef$current7$c;
778
934
  // 全屏状态,判断全屏表单onFilter是否禁用
779
935
  if (fullscreenState && !filterEnableRef.current.fullscreen) {
780
936
  filterEnableRef.current.fullscreen = true;
@@ -787,9 +943,8 @@ var ProTable = function ProTable(props) {
787
943
  }
788
944
  (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter(values));
789
945
  // 搜索变化时,暂时先清空选择
790
- (_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);
946
+ (_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);
791
947
  setCurrentPage(1);
792
- console.log('currentPageSize1', pageSize);
793
948
  _request(_defineProperty({}, targetPageKey, 1), false, values);
794
949
  },
795
950
  onReset: function onReset(values) {
@@ -797,7 +952,6 @@ var ProTable = function ProTable(props) {
797
952
  (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset());
798
953
  (_dataFilterFormRef$cu3 = dataFilterFormRef.current) === null || _dataFilterFormRef$cu3 === void 0 ? void 0 : _dataFilterFormRef$cu3.reset();
799
954
  setCurrentPage(1);
800
- console.log('currentPageSize2', pageSize);
801
955
  _request(_defineProperty({}, targetPageKey, 1), false, values);
802
956
  }
803
957
  });
@@ -811,10 +965,8 @@ var ProTable = function ProTable(props) {
811
965
  var renderTable = function renderTable(isFullScreen) {
812
966
  if (propsColumns) {
813
967
  return /*#__PURE__*/_react.default.createElement("div", {
814
- className: (0, _classnames.default)('teamix-pro-table-container', className, 'teamix-test-request'),
815
- "data-teamix-test-request": "url=".concat(url, "&formatResult=").concat(!!formatResult),
816
- "data-teamix-test-params": (0, _utils.getTestRequestParams)(propsParams),
817
- "data-teamix-test-data": (0, _utils.getTestRequestData)(propsColumns)
968
+ className: (0, _classnames.default)('teamix-pro-table-container', className),
969
+ "data-teamix-spm": dataTeamixSpm
818
970
  }, /*#__PURE__*/_react.default.createElement(_Layout.default, {
819
971
  header: header,
820
972
  mainAction: mainAction,
@@ -827,11 +979,19 @@ var ProTable = function ProTable(props) {
827
979
  dataFilterFormRef: isFullScreen ? fullscreenDataFilterFormRef : normalDataFilterFormRef,
828
980
  rowSelection: rowSelection,
829
981
  filterColumnType: filterColumnType,
830
- fullScreenState: isFullScreen
831
- }), /*#__PURE__*/_react.default.createElement(_components.Table.StickyLock, _extends({
982
+ fullScreenState: isFullScreen,
983
+ toolBarAutoWidth: toolBarAutoWidth,
984
+ dataTeamixSpm: dataTeamixSpm,
985
+ switchCardView: switchCardView,
986
+ defaultView: defaultView,
987
+ autoRefresh: autoRefresh,
988
+ autoRefreshProps: autoRefreshProps,
989
+ bindUrlProps: bindUrlProps,
990
+ bindUrl: bindUrl
991
+ }), switchViewState === 'table' && /*#__PURE__*/_react.default.createElement(_components.Table.StickyLock, _objectSpread({
832
992
  hasBorder: false,
833
993
  dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
834
- columns: (0, _genProColumnToColumn.default)(filteredColumns, showSkeleton, actionRef, context),
994
+ columns: (0, _genProColumnToColumn.default)(filteredColumns, showSkeleton, actionRef, context, dataTeamixSpm, bindUrl, bindUrlProps),
835
995
  loading: getTableLoading(),
836
996
  className: (0, _classnames.default)('teamix-pro-table', tableClassName, {
837
997
  'with-row-select': rowSelection,
@@ -843,22 +1003,33 @@ var ProTable = function ProTable(props) {
843
1003
  sort: sort,
844
1004
  primaryKey: primaryKey,
845
1005
  rowSelection: rowSelection,
846
- emptyContent: /*#__PURE__*/_react.default.createElement(_EmptyContent.default, null),
1006
+ emptyContent: /*#__PURE__*/_react.default.createElement(_proField.EmptyContent, _objectSpread({}, emptyProps)),
847
1007
  sortIcons: (0, _getTableSortIcons.default)(),
848
1008
  fixedHeader: fullscreenState || fixedTableBody,
849
1009
  maxBodyHeight: "calc(100vh - ".concat(headerHeight, "px)")
850
- // 过滤出可以传到 Table Props
851
- }, (0, _utils.pickProps)((0, _getTableProps.default)(), otherProps))));
1010
+ }, (0, _utils.pickProps)((0, _getTableProps.default)(), otherProps))), switchViewState === 'card' && /*#__PURE__*/_react.default.createElement(_CardView.default, {
1011
+ dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
1012
+ showSkeleton: showSkeleton,
1013
+ loading: getTableLoading(),
1014
+ originColumns: propsColumns,
1015
+ cardViewProps: cardViewProps,
1016
+ scrollHeight: fullscreenState || fixedTableBody ? "calc(100vh - ".concat(headerHeight, "px)") : undefined,
1017
+ actionRef: actionRef,
1018
+ context: context,
1019
+ columns: (0, _genProColumnToColumn.default)(filteredColumns, showSkeleton, actionRef, context),
1020
+ emptyProps: emptyProps,
1021
+ emptyContent: otherProps === null || otherProps === void 0 ? void 0 : otherProps.emptyContent
1022
+ }));
852
1023
  } else {
853
1024
  // 不传 columns 直接返回原始 Table
854
- return /*#__PURE__*/_react.default.createElement(_components.Table, _extends({
1025
+ return /*#__PURE__*/_react.default.createElement(_components.Table, _objectSpread({
855
1026
  className: cls()
856
1027
  }, (0, _utils.pickProps)((0, _getTableProps.default)(), otherProps)));
857
1028
  }
858
1029
  };
859
1030
  var renderFooterAction = function renderFooterAction() {
860
- var _actions;
861
- if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (_actions = footerAction.actions) === null || _actions === void 0 ? void 0 : _actions.length) >= 0) {
1031
+ var _footerAction$actions;
1032
+ 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) {
862
1033
  // 默认 context
863
1034
  var defaultContext = {
864
1035
  action: actionRef.current,
@@ -875,8 +1046,9 @@ var ProTable = function ProTable(props) {
875
1046
  });
876
1047
  return /*#__PURE__*/_react.default.createElement("div", {
877
1048
  className: cls('footer-action')
878
- }, /*#__PURE__*/_react.default.createElement(_actions2.ProActionGroup, _extends({}, targetFooterActions, {
879
- context: _objectSpread(_objectSpread({}, defaultContext), targetFooterActions === null || targetFooterActions === void 0 ? void 0 : targetFooterActions.context)
1049
+ }, /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup, _objectSpread(_objectSpread({}, targetFooterActions), {}, {
1050
+ context: _objectSpread(_objectSpread({}, defaultContext), targetFooterActions === null || targetFooterActions === void 0 ? void 0 : targetFooterActions.context),
1051
+ "data-teamix-spm": dataTeamixSpm ? "".concat(dataTeamixSpm, "-footerAction") : undefined
880
1052
  })));
881
1053
  } else return footerAction;
882
1054
  };
@@ -885,22 +1057,22 @@ var ProTable = function ProTable(props) {
885
1057
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
886
1058
  // 翻页默认清空选择
887
1059
  if (!reserveSelectedRecords) {
888
- var _actionRef$current7, _actionRef$current7$c;
889
- (_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);
1060
+ var _actionRef$current8, _actionRef$current8$c;
1061
+ (_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);
890
1062
  }
891
1063
  setCurrentPage(currentPage);
892
1064
  _request(_objectSpread(_defineProperty({}, targetPageKey, currentPage), params));
893
1065
  }
894
1066
  function onChangePaginationSize(currentPageSize) {
895
- var _request5;
1067
+ var _request10;
896
1068
  // 翻页默认清空选择
897
1069
  if (!reserveSelectedRecords) {
898
- var _actionRef$current8, _actionRef$current8$c;
899
- (_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);
1070
+ var _actionRef$current9, _actionRef$current9$c;
1071
+ (_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);
900
1072
  }
901
1073
  setPageSize(currentPageSize);
902
1074
  setCurrentPage(1);
903
- _request((_request5 = {}, _defineProperty(_request5, targetPageSizeKey, currentPageSize), _defineProperty(_request5, targetPageKey, 1), _request5));
1075
+ _request((_request10 = {}, _defineProperty(_request10, targetPageSizeKey, currentPageSize), _defineProperty(_request10, targetPageKey, 1), _request10));
904
1076
  }
905
1077
  function renderRowSelection() {
906
1078
  if (rowSelection) {
@@ -911,13 +1083,13 @@ var ProTable = function ProTable(props) {
911
1083
  } else {
912
1084
  return /*#__PURE__*/_react.default.createElement("div", {
913
1085
  className: cls('footer-left-wrapper')
914
- }, rowSelection.mode !== 'single' && /*#__PURE__*/_react.default.createElement(_components.Checkbox, _extends({
1086
+ }, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, rowSelection.mode !== 'single' && /*#__PURE__*/_react.default.createElement(_components.Checkbox, _objectSpread({
915
1087
  className: cls("footer-checkbox-".concat(size))
916
1088
  }, getCheckAllProps())), footerAction && renderFooterAction(), /*#__PURE__*/_react.default.createElement("span", {
917
1089
  className: cls('selected-msg')
918
1090
  }, (0, _utils.getMessage)('selected', {
919
1091
  count: selectedCount
920
- })));
1092
+ }))));
921
1093
  }
922
1094
  } else if (footerAction) {
923
1095
  if (showSkeleton) {
@@ -931,7 +1103,11 @@ var ProTable = function ProTable(props) {
931
1103
  }
932
1104
  }
933
1105
  }
934
- if (showPagination) {
1106
+ if (showPagination && switchViewState === 'table' || (cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.useTablePagination) && switchViewState === 'card') {
1107
+ var _props$paginationProp3;
1108
+ var _ref8 = (_props$paginationProp3 = props === null || props === void 0 ? void 0 : props.paginationProps) !== null && _props$paginationProp3 !== void 0 ? _props$paginationProp3 : {},
1109
+ onPaginationPropsChange = _ref8.onChange,
1110
+ othersPaginationProps = _objectWithoutProperties(_ref8, _excluded2);
935
1111
  return /*#__PURE__*/_react.default.createElement("div", {
936
1112
  className: cls('footer', {
937
1113
  'footer-has-rowSelection': rowSelection,
@@ -939,21 +1115,16 @@ var ProTable = function ProTable(props) {
939
1115
  })
940
1116
  }, renderRowSelection(), /*#__PURE__*/_react.default.createElement("div", {
941
1117
  className: cls('footer-right-wrapper')
942
- }, showSkeleton ? /*#__PURE__*/_react.default.createElement(_skeleton.ProSkeletonRaw.Footer.Pagination, null) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, data.length > 0 && /*#__PURE__*/_react.default.createElement(_Pagination.default, _extends({
1118
+ }, showSkeleton ? /*#__PURE__*/_react.default.createElement(_skeleton.ProSkeletonRaw.Footer.Pagination, null) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, data.length > 0 && /*#__PURE__*/_react.default.createElement(_Pagination.default, _objectSpread({
943
1119
  className: cls('pagination'),
944
- onChange: function onChange(number) {
945
- return onChangePagination(number);
1120
+ onChange: function onChange(number, e) {
1121
+ onChangePagination(number);
1122
+ onPaginationPropsChange === null || onPaginationPropsChange === void 0 ? void 0 : onPaginationPropsChange(number, e);
946
1123
  },
947
1124
  total: total,
948
- responsivePaginationType: responsivePaginationType
1125
+ responsivePaginationType: responsivePaginationType,
949
1126
  // shape="arrow-only"
950
1127
  // pageSizePosition="end"
951
- ,
952
- totalRender: function totalRender(total) {
953
- return (0, _utils.getMessage)('total', {
954
- total: new Intl.NumberFormat().format(total)
955
- });
956
- },
957
1128
  pageSize: pageSize,
958
1129
  current: currentPage,
959
1130
  pageSizeList: pageSizeList,
@@ -961,9 +1132,10 @@ var ProTable = function ProTable(props) {
961
1132
  type: total / pageSize <= 2 ? 'simple' : 'normal',
962
1133
  onPageSizeChange: function onPageSizeChange(number) {
963
1134
  return onChangePaginationSize(number);
964
- }
965
- }, props.paginationProps)))));
966
- } else if (!showPagination) {
1135
+ },
1136
+ useMaxData: globalUseMaxData !== null && globalUseMaxData !== void 0 ? globalUseMaxData : useMaxData
1137
+ }, othersPaginationProps)))));
1138
+ } else if (!showPagination && (footerAction || rowSelection || useRowSelection)) {
967
1139
  return /*#__PURE__*/_react.default.createElement("div", {
968
1140
  className: cls('footer', {
969
1141
  'footer-has-rowSelection': rowSelection
@@ -973,10 +1145,10 @@ var ProTable = function ProTable(props) {
973
1145
  }, showSkeleton ? /*#__PURE__*/_react.default.createElement(_skeleton.ProSkeletonRaw.Footer.Pagination, null) : footer));
974
1146
  }
975
1147
  };
976
-
977
1148
  // 判断是否需要吸底
978
1149
  var fixFooterState = (0, _react.useMemo)(function () {
979
1150
  if (fullscreenState) {
1151
+ // TODO XXX
980
1152
  return false;
981
1153
  }
982
1154
  if (fixedTableBody || footerSuction) {
@@ -993,13 +1165,12 @@ var ProTable = function ProTable(props) {
993
1165
  return /*#__PURE__*/_react.default.createElement("div", {
994
1166
  className: cls({
995
1167
  '': true,
996
- fullscreen: fullscreenState
1168
+ fullscreen: isFullScreen
997
1169
  // 'footer-suction': footerSuctionState && footerSuction,
998
1170
  }),
999
-
1000
1171
  ref: tableRef
1001
1172
  }, renderTable(isFullScreen), fixFooterState && /*#__PURE__*/_react.default.createElement(_pageContainer.default.FixedFooter, null, renderFooter()), !fixFooterState && renderFooter());
1002
1173
  });
1003
1174
  };
1004
- var _default = ProTable;
1175
+ var _default = (0, _aspect.ProComponentAspect)(ProTable, 'ProTable');
1005
1176
  exports.default = _default;