@teamix/pro 1.5.1-aplha.0 → 1.5.1

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 (445) hide show
  1. package/dist/pro.css +1 -1
  2. package/dist/pro.js +65730 -78948
  3. package/dist/pro.min.css +1 -1
  4. package/dist/pro.min.js +1 -1
  5. package/es/actions/base.d.ts +24 -0
  6. package/es/actions/confirm.d.ts +7 -0
  7. package/es/actions/danger-confirm.d.ts +7 -0
  8. package/es/actions/danger-pop-confirm.d.ts +5 -0
  9. package/es/actions/dialog-component.d.ts +10 -0
  10. package/es/actions/dialog-component.js +7 -1
  11. package/es/actions/dialog-form.d.ts +29 -0
  12. package/es/actions/dialog-form.js +3 -5
  13. package/es/actions/dialog-info.d.ts +9 -0
  14. package/es/actions/dialog-table.d.ts +9 -0
  15. package/es/actions/dialog.d.ts +40 -0
  16. package/es/actions/dialog.js +1 -1
  17. package/es/actions/drawer-form.d.ts +6 -0
  18. package/es/actions/drawer-info.d.ts +6 -0
  19. package/es/actions/drawer-table.d.ts +6 -0
  20. package/es/actions/drawer.d.ts +6 -0
  21. package/es/actions/error.d.ts +7 -0
  22. package/es/actions/index.d.ts +111 -0
  23. package/es/actions/index.js +23 -32
  24. package/es/actions/index.scss +5 -0
  25. package/es/actions/link.d.ts +8 -0
  26. package/es/actions/notice.d.ts +7 -0
  27. package/es/actions/pop-confirm.d.ts +9 -0
  28. package/es/actions/request.d.ts +9 -0
  29. package/es/actions/request.js +2 -2
  30. package/es/actions/utils.d.ts +1 -0
  31. package/es/card/card-container.d.ts +18 -0
  32. package/es/card/card-container.js +9 -9
  33. package/es/card/divider.d.ts +6 -0
  34. package/es/card/divider.js +6 -2
  35. package/es/card/index.d.ts +109 -0
  36. package/es/card/index.js +8 -14
  37. package/es/card/index.scss +7 -0
  38. package/es/card/selectable.d.ts +13 -0
  39. package/es/card/selectable.js +6 -2
  40. package/es/card/tab.d.ts +6 -0
  41. package/es/card/tab.js +6 -2
  42. package/es/card/utils.d.ts +9 -0
  43. package/es/field/index.d.ts +3 -0
  44. package/es/form/Components/Editable/index.d.ts +20 -0
  45. package/es/form/Components/Editable/index.js +1 -1
  46. package/es/form/Components/FormGroup/index.d.ts +13 -0
  47. package/es/form/Components/FormGroup/index.js +3 -5
  48. package/es/form/Components/LightFilter/componentMap.d.ts +3 -0
  49. package/es/form/Components/LightFilter/index.d.ts +17 -0
  50. package/es/form/Components/LightFilter/index.js +2 -8
  51. package/es/form/Components/ProField/index.d.ts +2 -0
  52. package/es/form/Components/ProField/index.js +6 -2
  53. package/es/form/Components/ProField/mapDateFormat.d.ts +3 -0
  54. package/es/form/Components/Text/index.d.ts +7 -0
  55. package/es/form/Components/Text/index.js +6 -2
  56. package/es/form/Filter/AdvancedFilter.d.ts +7 -0
  57. package/es/form/Filter/AdvancedFilter.js +15 -18
  58. package/es/form/Filter/Layout.d.ts +5 -0
  59. package/es/form/Filter/LightFilter.d.ts +7 -0
  60. package/es/form/Filter/LightFilter.js +10 -13
  61. package/es/form/Filter/SimpleFilter.d.ts +7 -0
  62. package/es/form/Filter/SimpleFilter.js +6 -10
  63. package/es/form/Filter/index.d.ts +9 -0
  64. package/es/form/Filter/index.js +10 -7
  65. package/es/form/Filter/index2.d.ts +13 -0
  66. package/es/form/Filter/index2.js +17 -21
  67. package/es/form/Filter/useBindUrl.d.ts +2 -0
  68. package/es/form/Filter/useSpecialProps.d.ts +6 -0
  69. package/es/form/ProForm/addCascadeEffect.d.ts +2 -0
  70. package/es/form/ProForm/customComponent.d.ts +3 -0
  71. package/es/form/ProForm/index.d.ts +5 -0
  72. package/es/form/ProForm/index.js +2 -4
  73. package/es/form/ProForm/useAutoLayout.d.ts +9 -0
  74. package/es/form/ProForm/useAutoSubmit.d.ts +6 -0
  75. package/es/form/ProForm/useFieldRequest.d.ts +5 -0
  76. package/es/form/ProForm/useFormDisplayValues.d.ts +4 -0
  77. package/es/form/ProForm/useFormDisplayValues.js +1 -1
  78. package/es/form/ProForm/useInitialRequest.d.ts +6 -0
  79. package/es/form/SchemaForm/adapterComponent.d.ts +5 -0
  80. package/es/form/SchemaForm/adapterDecorator.d.ts +6 -0
  81. package/es/form/SchemaForm/adapterType.d.ts +5 -0
  82. package/es/form/SchemaForm/index.d.ts +4 -0
  83. package/es/form/SchemaForm/initializeArrayCards.d.ts +3 -0
  84. package/es/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
  85. package/es/form/SchemaForm/initializeArrayItems.d.ts +3 -0
  86. package/es/form/SchemaForm/initializeArrayTable.d.ts +3 -0
  87. package/es/form/SchemaForm/initializeDataSource.d.ts +15 -0
  88. package/es/form/SchemaForm/initializeFormButton.d.ts +3 -0
  89. package/es/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
  90. package/es/form/SchemaForm/initializeFormGroup.d.ts +3 -0
  91. package/es/form/SchemaForm/initializeFormStep.d.ts +5 -0
  92. package/es/form/SchemaForm/initializeFormTab.d.ts +3 -0
  93. package/es/form/SchemaForm/initializeReactions.d.ts +2 -0
  94. package/es/form/SchemaForm/initializeRequest.d.ts +11 -0
  95. package/es/form/SchemaForm/initializeRules.d.ts +11 -0
  96. package/es/form/SchemaForm/initializeSelectTable.d.ts +3 -0
  97. package/es/form/SchemaForm/reactions.d.ts +6 -0
  98. package/es/form/SchemaForm/reactions.js +1 -2
  99. package/es/form/docs/ActionResponse.d.ts +7 -0
  100. package/es/form/fieldTypeMap.d.ts +7 -0
  101. package/es/form/index.d.ts +125 -0
  102. package/es/form/locales/validate.d.ts +159 -0
  103. package/es/form/schemaNameMap.d.ts +5 -0
  104. package/es/form/typing.d.ts +192 -0
  105. package/es/form/utils.d.ts +55 -0
  106. package/es/form/utils.js +1 -8
  107. package/es/form/warning.d.ts +3 -0
  108. package/es/hooks/index.d.ts +2 -0
  109. package/es/index-without-icon.d.ts +32 -0
  110. package/es/index.d.ts +32 -0
  111. package/es/index.js +1 -1
  112. package/es/info/components/InfoGroup/index.d.ts +5 -0
  113. package/es/info/components/InfoGroup/index.js +6 -2
  114. package/es/info/components/InfoValueItem/index.d.ts +5 -0
  115. package/es/info/components/InfoValueItem/index.js +21 -23
  116. package/es/info/components/ProInfoItem/index.d.ts +5 -0
  117. package/es/info/components/baseInfo/index.d.ts +8 -0
  118. package/es/info/components/headerInfo/index.d.ts +8 -0
  119. package/es/info/components/tableInfo/index.d.ts +7 -0
  120. package/es/info/components/tableInfo/index.js +4 -5
  121. package/es/info/index.d.ts +10 -0
  122. package/es/info/index.js +5 -8
  123. package/es/info/typing.d.ts +218 -0
  124. package/es/info/utils/index.d.ts +20 -0
  125. package/es/info/utils/layout.d.ts +2 -0
  126. package/es/info/utils/utils.d.ts +1 -0
  127. package/es/layout/index.d.ts +2 -0
  128. package/es/nocode/configurators/Card.d.ts +3 -0
  129. package/es/nocode/configurators/PageHeader.d.ts +3 -0
  130. package/es/nocode/configurators/ProTable.d.ts +3 -0
  131. package/es/nocode/configurators/common.d.ts +280 -0
  132. package/es/nocode/configurators/index.d.ts +15 -0
  133. package/es/nocode/configurators/map.d.ts +2 -0
  134. package/es/nocode/index.d.ts +8 -0
  135. package/es/nocode/index.js +2 -2
  136. package/es/nocode/pages/editor.d.ts +12 -0
  137. package/es/nocode/pages/index.d.ts +14 -0
  138. package/es/nocode/pages/index.js +3 -4
  139. package/es/nocode/pages/playground.d.ts +11 -0
  140. package/es/nocode/pages/playground.js +7 -3
  141. package/es/nocode/pages/renderer.d.ts +10 -0
  142. package/es/nocode/pages/renderer.js +8 -4
  143. package/es/nocode/playground.d.ts +14 -0
  144. package/es/nocode/playground.js +6 -2
  145. package/es/page-container/index.d.ts +3 -0
  146. package/es/page-header/index.d.ts +74 -0
  147. package/es/page-header/index.js +7 -12
  148. package/es/sidebar/components/sidebar-container/index.d.ts +5 -0
  149. package/es/sidebar/components/sidebar-container/index.js +9 -5
  150. package/es/sidebar/components/tree/index.d.ts +6 -0
  151. package/es/sidebar/components/tree/index.js +6 -2
  152. package/es/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +15 -0
  153. package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +6 -2
  154. package/es/sidebar/components/tree-node/components/IconAction/index.d.ts +12 -0
  155. package/es/sidebar/components/tree-node/components/IconAction/index.js +2 -4
  156. package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +23 -0
  157. package/es/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
  158. package/es/sidebar/components/tree-node/index.d.ts +7 -0
  159. package/es/sidebar/components/tree-node/index.js +18 -21
  160. package/es/sidebar/index.d.ts +9 -0
  161. package/es/sidebar/index.js +8 -4
  162. package/es/sidebar/typing.d.ts +141 -0
  163. package/es/sidebar/utils/action-ref.d.ts +3 -0
  164. package/es/sidebar/utils/index.d.ts +361 -0
  165. package/es/sidebar/utils/index.js +11 -11
  166. package/es/skeleton/index.d.ts +3 -0
  167. package/es/table/components/CardView/index.d.ts +5 -0
  168. package/es/table/components/CardView/index.js +446 -0
  169. package/es/table/components/CardView/index.scss +46 -0
  170. package/es/table/components/EmptyContent/index.d.ts +2 -0
  171. package/es/table/components/Filter/index.d.ts +10 -0
  172. package/es/table/components/Filter/index.js +21 -14
  173. package/es/table/components/Layout/index.d.ts +5 -0
  174. package/es/table/components/Layout/index.js +8 -10
  175. package/es/table/components/LoadMore/index.d.ts +20 -0
  176. package/es/table/components/LoadMore/index.js +107 -0
  177. package/es/table/components/LoadMore/index.scss +19 -0
  178. package/es/table/components/Pagination/index.d.ts +7 -0
  179. package/es/table/components/Pagination/index.js +14 -10
  180. package/es/table/components/QuickAction/index.d.ts +11 -0
  181. package/es/table/components/QuickAction/index.js +2 -4
  182. package/es/table/components/ToolBar/CardSwitch.d.ts +8 -0
  183. package/es/table/components/ToolBar/CardSwitch.js +63 -0
  184. package/es/table/components/ToolBar/DensityIcon.d.ts +4 -0
  185. package/es/table/components/ToolBar/DensityIcon.js +3 -2
  186. package/es/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
  187. package/es/table/components/ToolBar/FilterColumnIcon.js +13 -2
  188. package/es/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
  189. package/es/table/components/ToolBar/Fullscreen.d.ts +10 -0
  190. package/es/table/components/ToolBar/Fullscreen.js +15 -2
  191. package/es/table/components/ToolBar/RefreshIcon.d.ts +4 -0
  192. package/es/table/components/ToolBar/RefreshIcon.js +1 -2
  193. package/es/table/components/ToolBar/index.d.ts +5 -0
  194. package/es/table/components/ToolBar/index.js +69 -34
  195. package/es/table/components/ToolBar/index.scss +10 -1
  196. package/es/table/index.d.ts +5 -0
  197. package/es/table/index.js +150 -59
  198. package/es/table/typing.d.ts +371 -0
  199. package/es/table/utils/columnRender.d.ts +13 -0
  200. package/es/table/utils/columnRender.js +28 -28
  201. package/es/table/utils/genProColumnToColumn.d.ts +13 -0
  202. package/es/table/utils/genProColumnToColumn.js +4 -2
  203. package/es/table/utils/getTableProps.d.ts +2 -0
  204. package/es/table/utils/getTableSortIcons.d.ts +3 -0
  205. package/es/table/utils/index.d.ts +19 -0
  206. package/es/table/utils/index.js +2 -2
  207. package/es/table/utils/pureColumnRender.d.ts +9 -0
  208. package/es/table/utils/pureColumnRender.js +2 -4
  209. package/es/table/utils/pureGenProColumnToColumn.d.ts +7 -0
  210. package/es/table/utils/pureGenProColumnToColumn.js +1 -1
  211. package/es/table/utils/useTableSelection.d.ts +3 -0
  212. package/es/templates/Detail/index.d.ts +2 -0
  213. package/es/templates/Form/index.d.ts +2 -0
  214. package/es/templates/List/index.d.ts +9 -0
  215. package/es/templates/List/index.js +8 -4
  216. package/es/templates/index.d.ts +3 -0
  217. package/es/templates/index.js +1 -2
  218. package/es/timeline/ProTimeLineItem/index.d.ts +5 -0
  219. package/es/timeline/ProTimeLineItem/index.js +6 -2
  220. package/es/timeline/index.d.ts +10 -0
  221. package/es/timeline/index.js +7 -3
  222. package/es/timeline/typing.d.ts +106 -0
  223. package/es/utils/index.d.ts +3 -0
  224. package/es/utils/message.d.ts +3 -0
  225. package/es/utils/message.js +7 -3
  226. package/lib/actions/base.d.ts +24 -0
  227. package/lib/actions/confirm.d.ts +7 -0
  228. package/lib/actions/danger-confirm.d.ts +7 -0
  229. package/lib/actions/danger-pop-confirm.d.ts +5 -0
  230. package/lib/actions/dialog-component.d.ts +10 -0
  231. package/lib/actions/dialog-component.js +7 -1
  232. package/lib/actions/dialog-form.d.ts +29 -0
  233. package/lib/actions/dialog-form.js +3 -5
  234. package/lib/actions/dialog-info.d.ts +9 -0
  235. package/lib/actions/dialog-table.d.ts +9 -0
  236. package/lib/actions/dialog.d.ts +40 -0
  237. package/lib/actions/dialog.js +1 -1
  238. package/lib/actions/drawer-form.d.ts +6 -0
  239. package/lib/actions/drawer-info.d.ts +6 -0
  240. package/lib/actions/drawer-table.d.ts +6 -0
  241. package/lib/actions/drawer.d.ts +6 -0
  242. package/lib/actions/error.d.ts +7 -0
  243. package/lib/actions/index.d.ts +111 -0
  244. package/lib/actions/index.js +23 -32
  245. package/lib/actions/index.scss +5 -0
  246. package/lib/actions/link.d.ts +8 -0
  247. package/lib/actions/notice.d.ts +7 -0
  248. package/lib/actions/pop-confirm.d.ts +9 -0
  249. package/lib/actions/request.d.ts +9 -0
  250. package/lib/actions/utils.d.ts +1 -0
  251. package/lib/card/card-container.d.ts +18 -0
  252. package/lib/card/card-container.js +7 -5
  253. package/lib/card/divider.d.ts +6 -0
  254. package/lib/card/divider.js +6 -2
  255. package/lib/card/index.d.ts +109 -0
  256. package/lib/card/index.js +7 -14
  257. package/lib/card/index.scss +7 -0
  258. package/lib/card/selectable.d.ts +13 -0
  259. package/lib/card/selectable.js +6 -2
  260. package/lib/card/tab.d.ts +6 -0
  261. package/lib/card/tab.js +6 -2
  262. package/lib/card/utils.d.ts +9 -0
  263. package/lib/field/index.d.ts +3 -0
  264. package/lib/form/Components/Editable/index.d.ts +20 -0
  265. package/lib/form/Components/Editable/index.js +1 -1
  266. package/lib/form/Components/FormGroup/index.d.ts +13 -0
  267. package/lib/form/Components/FormGroup/index.js +3 -5
  268. package/lib/form/Components/LightFilter/componentMap.d.ts +3 -0
  269. package/lib/form/Components/LightFilter/index.d.ts +17 -0
  270. package/lib/form/Components/LightFilter/index.js +2 -8
  271. package/lib/form/Components/ProField/index.d.ts +2 -0
  272. package/lib/form/Components/ProField/index.js +6 -2
  273. package/lib/form/Components/ProField/mapDateFormat.d.ts +3 -0
  274. package/lib/form/Components/Text/index.d.ts +7 -0
  275. package/lib/form/Components/Text/index.js +6 -2
  276. package/lib/form/Filter/AdvancedFilter.d.ts +7 -0
  277. package/lib/form/Filter/AdvancedFilter.js +14 -17
  278. package/lib/form/Filter/Layout.d.ts +5 -0
  279. package/lib/form/Filter/LightFilter.d.ts +7 -0
  280. package/lib/form/Filter/LightFilter.js +9 -12
  281. package/lib/form/Filter/SimpleFilter.d.ts +7 -0
  282. package/lib/form/Filter/SimpleFilter.js +5 -8
  283. package/lib/form/Filter/index.d.ts +9 -0
  284. package/lib/form/Filter/index.js +9 -6
  285. package/lib/form/Filter/index2.d.ts +13 -0
  286. package/lib/form/Filter/index2.js +17 -21
  287. package/lib/form/Filter/useBindUrl.d.ts +2 -0
  288. package/lib/form/Filter/useSpecialProps.d.ts +6 -0
  289. package/lib/form/ProForm/addCascadeEffect.d.ts +2 -0
  290. package/lib/form/ProForm/customComponent.d.ts +3 -0
  291. package/lib/form/ProForm/index.d.ts +5 -0
  292. package/lib/form/ProForm/index.js +2 -4
  293. package/lib/form/ProForm/useAutoLayout.d.ts +9 -0
  294. package/lib/form/ProForm/useAutoSubmit.d.ts +6 -0
  295. package/lib/form/ProForm/useFieldRequest.d.ts +5 -0
  296. package/lib/form/ProForm/useFormDisplayValues.d.ts +4 -0
  297. package/lib/form/ProForm/useInitialRequest.d.ts +6 -0
  298. package/lib/form/SchemaForm/adapterComponent.d.ts +5 -0
  299. package/lib/form/SchemaForm/adapterDecorator.d.ts +6 -0
  300. package/lib/form/SchemaForm/adapterType.d.ts +5 -0
  301. package/lib/form/SchemaForm/index.d.ts +4 -0
  302. package/lib/form/SchemaForm/initializeArrayCards.d.ts +3 -0
  303. package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
  304. package/lib/form/SchemaForm/initializeArrayItems.d.ts +3 -0
  305. package/lib/form/SchemaForm/initializeArrayTable.d.ts +3 -0
  306. package/lib/form/SchemaForm/initializeDataSource.d.ts +15 -0
  307. package/lib/form/SchemaForm/initializeFormButton.d.ts +3 -0
  308. package/lib/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
  309. package/lib/form/SchemaForm/initializeFormGroup.d.ts +3 -0
  310. package/lib/form/SchemaForm/initializeFormStep.d.ts +5 -0
  311. package/lib/form/SchemaForm/initializeFormTab.d.ts +3 -0
  312. package/lib/form/SchemaForm/initializeReactions.d.ts +2 -0
  313. package/lib/form/SchemaForm/initializeRequest.d.ts +11 -0
  314. package/lib/form/SchemaForm/initializeRules.d.ts +11 -0
  315. package/lib/form/SchemaForm/initializeSelectTable.d.ts +3 -0
  316. package/lib/form/SchemaForm/reactions.d.ts +6 -0
  317. package/lib/form/docs/ActionResponse.d.ts +7 -0
  318. package/lib/form/fieldTypeMap.d.ts +7 -0
  319. package/lib/form/index.d.ts +125 -0
  320. package/lib/form/locales/validate.d.ts +159 -0
  321. package/lib/form/schemaNameMap.d.ts +5 -0
  322. package/lib/form/typing.d.ts +192 -0
  323. package/lib/form/typing.js +5 -1
  324. package/lib/form/utils.d.ts +55 -0
  325. package/lib/form/utils.js +0 -7
  326. package/lib/form/warning.d.ts +3 -0
  327. package/lib/hooks/index.d.ts +2 -0
  328. package/lib/index-without-icon.d.ts +32 -0
  329. package/lib/index.d.ts +32 -0
  330. package/lib/index.js +1 -1
  331. package/lib/info/components/InfoGroup/index.d.ts +5 -0
  332. package/lib/info/components/InfoGroup/index.js +6 -2
  333. package/lib/info/components/InfoValueItem/index.d.ts +5 -0
  334. package/lib/info/components/InfoValueItem/index.js +21 -23
  335. package/lib/info/components/ProInfoItem/index.d.ts +5 -0
  336. package/lib/info/components/baseInfo/index.d.ts +8 -0
  337. package/lib/info/components/headerInfo/index.d.ts +8 -0
  338. package/lib/info/components/tableInfo/index.d.ts +7 -0
  339. package/lib/info/components/tableInfo/index.js +4 -5
  340. package/lib/info/index.d.ts +10 -0
  341. package/lib/info/index.js +5 -8
  342. package/lib/info/typing.d.ts +218 -0
  343. package/lib/info/typing.js +5 -1
  344. package/lib/info/utils/index.d.ts +20 -0
  345. package/lib/info/utils/layout.d.ts +2 -0
  346. package/lib/info/utils/utils.d.ts +1 -0
  347. package/lib/layout/index.d.ts +2 -0
  348. package/lib/nocode/configurators/Card.d.ts +3 -0
  349. package/lib/nocode/configurators/PageHeader.d.ts +3 -0
  350. package/lib/nocode/configurators/ProTable.d.ts +3 -0
  351. package/lib/nocode/configurators/common.d.ts +280 -0
  352. package/lib/nocode/configurators/index.d.ts +15 -0
  353. package/lib/nocode/configurators/map.d.ts +2 -0
  354. package/lib/nocode/index.d.ts +8 -0
  355. package/lib/nocode/pages/editor.d.ts +12 -0
  356. package/lib/nocode/pages/index.d.ts +14 -0
  357. package/lib/nocode/pages/index.js +2 -2
  358. package/lib/nocode/pages/playground.d.ts +11 -0
  359. package/lib/nocode/pages/playground.js +7 -3
  360. package/lib/nocode/pages/renderer.d.ts +10 -0
  361. package/lib/nocode/pages/renderer.js +8 -4
  362. package/lib/nocode/playground.d.ts +14 -0
  363. package/lib/nocode/playground.js +6 -2
  364. package/lib/page-container/index.d.ts +3 -0
  365. package/lib/page-header/index.d.ts +74 -0
  366. package/lib/page-header/index.js +6 -12
  367. package/lib/sidebar/components/sidebar-container/index.d.ts +5 -0
  368. package/lib/sidebar/components/sidebar-container/index.js +9 -5
  369. package/lib/sidebar/components/tree/index.d.ts +6 -0
  370. package/lib/sidebar/components/tree/index.js +6 -2
  371. package/lib/sidebar/components/tree-node/components/HoverTooltip/index.d.ts +15 -0
  372. package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +6 -2
  373. package/lib/sidebar/components/tree-node/components/IconAction/index.d.ts +12 -0
  374. package/lib/sidebar/components/tree-node/components/IconAction/index.js +2 -4
  375. package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +23 -0
  376. package/lib/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
  377. package/lib/sidebar/components/tree-node/index.d.ts +7 -0
  378. package/lib/sidebar/components/tree-node/index.js +18 -21
  379. package/lib/sidebar/index.d.ts +9 -0
  380. package/lib/sidebar/index.js +17 -4
  381. package/lib/sidebar/typing.d.ts +141 -0
  382. package/lib/sidebar/typing.js +5 -1
  383. package/lib/sidebar/utils/action-ref.d.ts +3 -0
  384. package/lib/sidebar/utils/index.d.ts +361 -0
  385. package/lib/sidebar/utils/index.js +11 -11
  386. package/lib/skeleton/index.d.ts +3 -0
  387. package/lib/table/components/CardView/index.d.ts +5 -0
  388. package/lib/table/components/CardView/index.js +468 -0
  389. package/lib/table/components/CardView/index.scss +46 -0
  390. package/lib/table/components/EmptyContent/index.d.ts +2 -0
  391. package/lib/table/components/Filter/index.d.ts +10 -0
  392. package/lib/table/components/Filter/index.js +21 -14
  393. package/lib/table/components/Layout/index.d.ts +5 -0
  394. package/lib/table/components/Layout/index.js +9 -11
  395. package/lib/table/components/LoadMore/index.d.ts +20 -0
  396. package/lib/table/components/LoadMore/index.js +128 -0
  397. package/lib/table/components/LoadMore/index.scss +19 -0
  398. package/lib/table/components/Pagination/index.d.ts +7 -0
  399. package/lib/table/components/Pagination/index.js +14 -10
  400. package/lib/table/components/QuickAction/index.d.ts +11 -0
  401. package/lib/table/components/QuickAction/index.js +2 -4
  402. package/lib/table/components/ToolBar/CardSwitch.d.ts +8 -0
  403. package/lib/table/components/ToolBar/CardSwitch.js +82 -0
  404. package/lib/table/components/ToolBar/DensityIcon.d.ts +4 -0
  405. package/lib/table/components/ToolBar/DensityIcon.js +3 -2
  406. package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
  407. package/lib/table/components/ToolBar/FilterColumnIcon.js +13 -2
  408. package/lib/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
  409. package/lib/table/components/ToolBar/Fullscreen.d.ts +10 -0
  410. package/lib/table/components/ToolBar/Fullscreen.js +15 -2
  411. package/lib/table/components/ToolBar/RefreshIcon.d.ts +4 -0
  412. package/lib/table/components/ToolBar/RefreshIcon.js +1 -2
  413. package/lib/table/components/ToolBar/index.d.ts +5 -0
  414. package/lib/table/components/ToolBar/index.js +70 -33
  415. package/lib/table/components/ToolBar/index.scss +10 -1
  416. package/lib/table/index.d.ts +5 -0
  417. package/lib/table/index.js +153 -60
  418. package/lib/table/typing.d.ts +371 -0
  419. package/lib/table/typing.js +5 -1
  420. package/lib/table/utils/columnRender.d.ts +13 -0
  421. package/lib/table/utils/columnRender.js +28 -28
  422. package/lib/table/utils/genProColumnToColumn.d.ts +13 -0
  423. package/lib/table/utils/genProColumnToColumn.js +3 -1
  424. package/lib/table/utils/getTableProps.d.ts +2 -0
  425. package/lib/table/utils/getTableSortIcons.d.ts +3 -0
  426. package/lib/table/utils/index.d.ts +19 -0
  427. package/lib/table/utils/pureColumnRender.d.ts +9 -0
  428. package/lib/table/utils/pureColumnRender.js +1 -3
  429. package/lib/table/utils/pureGenProColumnToColumn.d.ts +7 -0
  430. package/lib/table/utils/useTableSelection.d.ts +3 -0
  431. package/lib/templates/Detail/index.d.ts +2 -0
  432. package/lib/templates/Form/index.d.ts +2 -0
  433. package/lib/templates/List/index.d.ts +9 -0
  434. package/lib/templates/List/index.js +8 -4
  435. package/lib/templates/index.d.ts +3 -0
  436. package/lib/timeline/ProTimeLineItem/index.d.ts +5 -0
  437. package/lib/timeline/ProTimeLineItem/index.js +6 -2
  438. package/lib/timeline/index.d.ts +10 -0
  439. package/lib/timeline/index.js +7 -3
  440. package/lib/timeline/typing.d.ts +106 -0
  441. package/lib/timeline/typing.js +5 -1
  442. package/lib/utils/index.d.ts +3 -0
  443. package/lib/utils/message.d.ts +3 -0
  444. package/lib/utils/message.js +7 -3
  445. package/package.json +1 -1
@@ -34,7 +34,7 @@ var _Fullscreen = _interopRequireDefault(require("./components/ToolBar/Fullscree
34
34
 
35
35
  var _EmptyContent = _interopRequireDefault(require("./components/EmptyContent"));
36
36
 
37
- var _actions2 = require("../actions");
37
+ var _actions = require("../actions");
38
38
 
39
39
  var _classnames = _interopRequireDefault(require("classnames"));
40
40
 
@@ -42,6 +42,10 @@ var _pageContainer = _interopRequireDefault(require("../page-container"));
42
42
 
43
43
  var _lodash = _interopRequireDefault(require("lodash.debounce"));
44
44
 
45
+ var _CardView = _interopRequireDefault(require("./components/CardView"));
46
+
47
+ var _columns = _interopRequireDefault(require("../../demos/table/columns"));
48
+
45
49
  var _typing = require("./typing");
46
50
 
47
51
  Object.keys(_typing).forEach(function (key) {
@@ -55,7 +59,7 @@ Object.keys(_typing).forEach(function (key) {
55
59
  }
56
60
  });
57
61
  });
58
- 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", "data-teamix-spm"];
62
+ 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", "toolBarAutoWidth", "data-teamix-spm", "switchCardView", "cardViewProps", "defaultView"];
59
63
 
60
64
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
61
65
 
@@ -63,8 +67,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
63
67
 
64
68
  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; }
65
69
 
66
- function _extends() { _extends = Object.assign || 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); }
67
-
68
70
  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); }
69
71
 
70
72
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
@@ -223,7 +225,14 @@ var ProTable = function ProTable(props) {
223
225
  _props$fixedTableBody = props.fixedTableBody,
224
226
  fixedTableBody = _props$fixedTableBody === void 0 ? false : _props$fixedTableBody,
225
227
  isTree = props.isTree,
228
+ _props$toolBarAutoWid = props.toolBarAutoWidth,
229
+ toolBarAutoWidth = _props$toolBarAutoWid === void 0 ? true : _props$toolBarAutoWid,
226
230
  dataTeamixSpm = props['data-teamix-spm'],
231
+ _props$switchCardView = props.switchCardView,
232
+ switchCardView = _props$switchCardView === void 0 ? false : _props$switchCardView,
233
+ cardViewProps = props.cardViewProps,
234
+ _props$defaultView = props.defaultView,
235
+ defaultView = _props$defaultView === void 0 ? 'table' : _props$defaultView,
227
236
  otherProps = _objectWithoutProperties(props, _excluded);
228
237
 
229
238
  var targetPageKey = pageKey || globalPageKey;
@@ -248,7 +257,7 @@ var ProTable = function ProTable(props) {
248
257
  var _useState7 = (0, _react.useState)(propsDataSource !== null && propsDataSource !== void 0 ? propsDataSource : []),
249
258
  _useState8 = _slicedToArray(_useState7, 2),
250
259
  data = _useState8[0],
251
- setData = _useState8[1];
260
+ _setData = _useState8[1];
252
261
 
253
262
  var _useState9 = (0, _react.useState)(props.sort || {}),
254
263
  _useState10 = _slicedToArray(_useState9, 2),
@@ -400,7 +409,11 @@ var ProTable = function ProTable(props) {
400
409
 
401
410
  var offsetHeaderHeight = headerHeight + tableHeaderHeight + pageHeaderHeight + teamixNavHeight + footerRowSelectionHeight + 16 + (offset !== null && offset !== void 0 ? offset : 0) + 1;
402
411
 
403
- if (tableBodyDom.clientHeight < tableBodyDom.scrollHeight) {
412
+ if (switchViewState === 'card') {
413
+ offsetHeaderHeight = offsetHeaderHeight - tableHeaderHeight - footerRowSelectionHeight;
414
+ }
415
+
416
+ if ((tableBodyDom === null || tableBodyDom === void 0 ? void 0 : tableBodyDom.clientHeight) < (tableBodyDom === null || tableBodyDom === void 0 ? void 0 : tableBodyDom.scrollHeight)) {
404
417
  setFooterSuctionState(true);
405
418
  } else {
406
419
  setFooterSuctionState(false);
@@ -435,7 +448,13 @@ var ProTable = function ProTable(props) {
435
448
  var _useState27 = (0, _react.useState)(false),
436
449
  _useState28 = _slicedToArray(_useState27, 2),
437
450
  fullscreenState = _useState28[0],
438
- setFullscreenState = _useState28[1]; // 切换全屏搜索开关
451
+ setFullscreenState = _useState28[1]; // 切换视角
452
+
453
+
454
+ var _useState29 = (0, _react.useState)(defaultView !== null && defaultView !== void 0 ? defaultView : 'table'),
455
+ _useState30 = _slicedToArray(_useState29, 2),
456
+ switchViewState = _useState30[0],
457
+ setSwitchViewState = _useState30[1]; // 切换全屏搜索开关
439
458
 
440
459
 
441
460
  var filterEnableRef = (0, _react.useRef)({
@@ -451,10 +470,10 @@ var ProTable = function ProTable(props) {
451
470
  var dataFilterFormRef = !fullscreenState ? normalDataFilterFormRef : fullscreenDataFilterFormRef; // let dataFilterForm = dataFilterFormRef.current;
452
471
  // 整个内容区是否超过一屏。用于表格在非全屏模式下的吸底
453
472
 
454
- var _useState29 = (0, _react.useState)(false),
455
- _useState30 = _slicedToArray(_useState29, 2),
456
- footerSuctionState = _useState30[0],
457
- setFooterSuctionState = _useState30[1]; // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
473
+ var _useState31 = (0, _react.useState)(false),
474
+ _useState32 = _slicedToArray(_useState31, 2),
475
+ footerSuctionState = _useState32[0],
476
+ setFooterSuctionState = _useState32[1]; // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
458
477
 
459
478
 
460
479
  var getFooterSuctionState = function getFooterSuctionState() {
@@ -519,14 +538,13 @@ var ProTable = function ProTable(props) {
519
538
  }, [rowSelectionHook]); // 获取 table 左下角 checkbox 属性
520
539
 
521
540
  function getCheckAllProps() {
522
- var _ref = rowSelection,
523
- _ref$onChange = _ref.onChange,
524
- _onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
525
- _ref$onSelectAll = _ref.onSelectAll,
526
- onSelectAll = _ref$onSelectAll === void 0 ? function () {} : _ref$onSelectAll,
527
- _ref$selectedRowKeys = _ref.selectedRowKeys,
528
- selectedRowKeys = _ref$selectedRowKeys === void 0 ? [] : _ref$selectedRowKeys,
529
- getProps = _ref.getProps;
541
+ var _rowSelection$onChang = rowSelection.onChange,
542
+ _onChange = _rowSelection$onChang === void 0 ? function () {} : _rowSelection$onChang,
543
+ _rowSelection$onSelec = rowSelection.onSelectAll,
544
+ onSelectAll = _rowSelection$onSelec === void 0 ? function () {} : _rowSelection$onSelec,
545
+ _rowSelection$selecte2 = rowSelection.selectedRowKeys,
546
+ selectedRowKeys = _rowSelection$selecte2 === void 0 ? [] : _rowSelection$selecte2,
547
+ getProps = rowSelection.getProps;
530
548
 
531
549
  var dataSource = data;
532
550
  var allRowKeys = dataSource.filter(function (d, i) {
@@ -580,7 +598,7 @@ var ProTable = function ProTable(props) {
580
598
 
581
599
  (0, _react.useEffect)(function () {
582
600
  if (propsDataSource) {
583
- setData(propsDataSource);
601
+ _setData(propsDataSource);
584
602
  }
585
603
  }, [propsDataSource]); // 初始化 ActionRef。
586
604
 
@@ -603,14 +621,14 @@ var ProTable = function ProTable(props) {
603
621
  actionRefCallback[state][name] = fun;
604
622
  },
605
623
  off: function off(name) {
606
- actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref2) {
607
- var _ref3 = _slicedToArray(_ref2, 2),
608
- k = _ref3[0],
609
- v = _ref3[1];
624
+ actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref) {
625
+ var _ref2 = _slicedToArray(_ref, 2),
626
+ k = _ref2[0],
627
+ v = _ref2[1];
610
628
 
611
- var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref4) {
612
- var _ref5 = _slicedToArray(_ref4, 1),
613
- k = _ref5[0];
629
+ var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref3) {
630
+ var _ref4 = _slicedToArray(_ref3, 1),
631
+ k = _ref4[0];
614
632
 
615
633
  return k !== name;
616
634
  }));
@@ -647,7 +665,16 @@ var ProTable = function ProTable(props) {
647
665
  _setSize(mode);
648
666
  },
649
667
  refresh: function refresh(params) {
650
- return _request(params);
668
+ // card视角的刷新等于重新请求
669
+ if (switchViewState === 'card') {
670
+ setCurrentPage(1);
671
+
672
+ _request(_objectSpread(_objectSpread({}, params), {}, _defineProperty({}, targetPageKey, 1)));
673
+
674
+ setShowSkeleton(true);
675
+ } else {
676
+ _request(params);
677
+ }
651
678
  },
652
679
  request: function request(params) {
653
680
  // 如果请求中还有翻页相关信息,需要自动设置到指定页
@@ -675,6 +702,12 @@ var ProTable = function ProTable(props) {
675
702
  resetPage: function resetPage() {
676
703
  setCurrentPage(1);
677
704
  },
705
+ nextPage: function nextPage() {
706
+ var newCurrentPage = currentPage + 1;
707
+ setCurrentPage(newCurrentPage);
708
+
709
+ _request(_defineProperty({}, targetPageKey, newCurrentPage));
710
+ },
678
711
  rowSelection: rowSelection,
679
712
  clearRowSelection: function clearRowSelection() {
680
713
  rowSelectionHook.setSelectedRowKeys([]);
@@ -694,8 +727,34 @@ var ProTable = function ProTable(props) {
694
727
  normalDataFilterForm: normalDataFilterForm,
695
728
  fullscreenDataFilterForm: fullscreenDataFilterForm,
696
729
  filterEnableRef: filterEnableRef,
730
+ setData: function setData(data) {
731
+ _setData(data);
732
+ },
697
733
  resetTableMaxBodyHeight: function resetTableMaxBodyHeight(offset) {
698
734
  getHeaderHeight(fullscreenState, offset);
735
+ },
736
+ switchView: function switchView(view) {
737
+ setSwitchViewState(view);
738
+ setShowSkeleton(true);
739
+ setCurrentPage(1);
740
+
741
+ if (view === 'table') {
742
+ var _request4;
743
+
744
+ setPageSize(pageSize !== null && pageSize !== void 0 ? pageSize : 20);
745
+
746
+ _request((_request4 = {}, _defineProperty(_request4, targetPageSizeKey, pageSize !== null && pageSize !== void 0 ? pageSize : 20), _defineProperty(_request4, targetPageKey, 1), _request4));
747
+ }
748
+
749
+ if (view === 'card') {
750
+ var _cardViewProps$pageSi, _cardViewProps$pageSi2, _request5;
751
+
752
+ setPageSize((_cardViewProps$pageSi = cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.pageSize) !== null && _cardViewProps$pageSi !== void 0 ? _cardViewProps$pageSi : 12);
753
+
754
+ _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));
755
+ }
756
+
757
+ getHeaderHeight(fullscreenState);
699
758
  }
700
759
  }); // 将 Actions 绑定到传入的 propsActionRef 中
701
760
 
@@ -704,8 +763,6 @@ var ProTable = function ProTable(props) {
704
763
  }
705
764
 
706
765
  function onFormatResult(next) {
707
- var _next$data;
708
-
709
766
  props.onFormatResult && props.onFormatResult(next);
710
767
  var time = autoRefresh ? autoRefresh(next.data) : false;
711
768
 
@@ -717,8 +774,22 @@ var ProTable = function ProTable(props) {
717
774
  } // 设置 dataSource、total
718
775
 
719
776
 
720
- setData(next.data || []);
721
- setTotal(next.total || ((_next$data = next.data) === null || _next$data === void 0 ? void 0 : _next$data.length));
777
+ if (switchViewState === 'table' || currentPage === 1) {
778
+ var _next$data;
779
+
780
+ _setData(next.data || []);
781
+
782
+ setTotal(next.total || ((_next$data = next.data) === null || _next$data === void 0 ? void 0 : _next$data.length));
783
+ }
784
+
785
+ if (switchViewState === 'card' && currentPage !== 1) {
786
+ var _next$data2;
787
+
788
+ _setData([].concat(_toConsumableArray(data), _toConsumableArray(next.data || [])));
789
+
790
+ setTotal(total + (next.total || ((_next$data2 = next.data) === null || _next$data2 === void 0 ? void 0 : _next$data2.length)));
791
+ }
792
+
722
793
  setShowSkeleton(false);
723
794
  } // 请求表格数据工具函数
724
795
 
@@ -790,7 +861,7 @@ var ProTable = function ProTable(props) {
790
861
  }); // 请求函数
791
862
 
792
863
  function _request(params, noLoading, filterParams) {
793
- var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current5, _actionRef$current5$g, _objectSpread2;
864
+ var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current5, _actionRef$current5$g, _objectSpread3;
794
865
 
795
866
  // 如果没有传 url 且没有 customRequest,直接返回
796
867
  if (!url && !customRequest) {
@@ -807,7 +878,7 @@ var ProTable = function ProTable(props) {
807
878
 
808
879
  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 : {}; // 格式化后的请求参数
809
880
 
810
- 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));
881
+ var requestData = formatParams(_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));
811
882
 
812
883
  if (requestData) {
813
884
  if (autoRefreshTimerRef.current) {
@@ -835,14 +906,24 @@ var ProTable = function ProTable(props) {
835
906
  if (customRequest && typeof customRequest === 'function') {
836
907
  setCustomTableLoading(true);
837
908
  customRequest(requestData).then(function (res) {
838
- var data = res.data,
839
- total = res.total,
909
+ var dataRes = res.data,
910
+ totalRes = res.total,
840
911
  success = res.success;
841
912
 
842
913
  if (success === true) {
843
914
  // 设置 dataSource、total
844
- setData(data || []);
845
- setTotal(total || (data === null || data === void 0 ? void 0 : data.length));
915
+ if (switchViewState === 'table' || params['targetPageKey'] === 1) {
916
+ _setData(dataRes || []);
917
+
918
+ setTotal(totalRes || (dataRes === null || dataRes === void 0 ? void 0 : dataRes.length));
919
+ }
920
+
921
+ if (switchViewState === 'card' && params['targetPageKey'] !== 1) {
922
+ _setData([].concat(_toConsumableArray(data), _toConsumableArray(dataRes || [])));
923
+
924
+ setTotal(total + (totalRes || (dataRes === null || dataRes === void 0 ? void 0 : dataRes.length)));
925
+ }
926
+
846
927
  setShowSkeleton(false);
847
928
  setCustomTableLoading(false);
848
929
  } // 重新计算是否需要吸底
@@ -912,7 +993,6 @@ var ProTable = function ProTable(props) {
912
993
 
913
994
  (_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);
914
995
  setCurrentPage(1);
915
- console.log('currentPageSize1', pageSize);
916
996
 
917
997
  _request(_defineProperty({}, targetPageKey, 1), false, values);
918
998
  },
@@ -922,7 +1002,6 @@ var ProTable = function ProTable(props) {
922
1002
  (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset());
923
1003
  (_dataFilterFormRef$cu3 = dataFilterFormRef.current) === null || _dataFilterFormRef$cu3 === void 0 ? void 0 : _dataFilterFormRef$cu3.reset();
924
1004
  setCurrentPage(1);
925
- console.log('currentPageSize2', pageSize);
926
1005
 
927
1006
  _request(_defineProperty({}, targetPageKey, 1), false, values);
928
1007
  }
@@ -957,11 +1036,14 @@ var ProTable = function ProTable(props) {
957
1036
  rowSelection: rowSelection,
958
1037
  filterColumnType: filterColumnType,
959
1038
  fullScreenState: isFullScreen,
960
- dataTeamixSpm: dataTeamixSpm
961
- }), /*#__PURE__*/_react.default.createElement(_components.Table.StickyLock, _extends({
1039
+ toolBarAutoWidth: toolBarAutoWidth,
1040
+ dataTeamixSpm: dataTeamixSpm,
1041
+ switchCardView: switchCardView,
1042
+ defaultView: defaultView
1043
+ }), switchViewState === 'table' && /*#__PURE__*/_react.default.createElement(_components.Table.StickyLock, _objectSpread({
962
1044
  hasBorder: false,
963
1045
  dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
964
- columns: (0, _genProColumnToColumn.default)(filteredColumns, showSkeleton, actionRef, context),
1046
+ columns: (0, _genProColumnToColumn.default)(filteredColumns, showSkeleton, actionRef, context, dataTeamixSpm),
965
1047
  loading: getTableLoading(),
966
1048
  className: (0, _classnames.default)('teamix-pro-table', tableClassName, {
967
1049
  'with-row-select': rowSelection,
@@ -976,21 +1058,30 @@ var ProTable = function ProTable(props) {
976
1058
  emptyContent: /*#__PURE__*/_react.default.createElement(_EmptyContent.default, null),
977
1059
  sortIcons: (0, _getTableSortIcons.default)(),
978
1060
  fixedHeader: fullscreenState || fixedTableBody,
979
- maxBodyHeight: "calc(100vh - ".concat(headerHeight, "px)") // 过滤出可以传到 Table 的 Props
980
-
981
- }, (0, _utils.pickProps)((0, _getTableProps.default)(), otherProps))));
1061
+ maxBodyHeight: "calc(100vh - ".concat(headerHeight, "px)")
1062
+ }, (0, _utils.pickProps)((0, _getTableProps.default)(), otherProps))), switchViewState === 'card' && /*#__PURE__*/_react.default.createElement(_CardView.default, {
1063
+ dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
1064
+ showSkeleton: showSkeleton,
1065
+ loading: getTableLoading(),
1066
+ originColumns: _columns.default,
1067
+ cardViewProps: cardViewProps,
1068
+ scrollHeight: fullscreenState || fixedTableBody ? "calc(100vh - ".concat(headerHeight, "px)") : undefined,
1069
+ actionRef: actionRef,
1070
+ context: context,
1071
+ columns: (0, _genProColumnToColumn.default)(filteredColumns, showSkeleton, actionRef, context)
1072
+ }));
982
1073
  } else {
983
1074
  // 不传 columns 直接返回原始 Table
984
- return /*#__PURE__*/_react.default.createElement(_components.Table, _extends({
1075
+ return /*#__PURE__*/_react.default.createElement(_components.Table, _objectSpread({
985
1076
  className: cls()
986
1077
  }, (0, _utils.pickProps)((0, _getTableProps.default)(), otherProps)));
987
1078
  }
988
1079
  };
989
1080
 
990
1081
  var renderFooterAction = function renderFooterAction() {
991
- var _actions;
1082
+ var _footerAction$actions;
992
1083
 
993
- if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (_actions = footerAction.actions) === null || _actions === void 0 ? void 0 : _actions.length) >= 0) {
1084
+ 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) {
994
1085
  // 默认 context
995
1086
  var defaultContext = {
996
1087
  action: actionRef.current,
@@ -1009,8 +1100,9 @@ var ProTable = function ProTable(props) {
1009
1100
 
1010
1101
  return /*#__PURE__*/_react.default.createElement("div", {
1011
1102
  className: cls('footer-action')
1012
- }, /*#__PURE__*/_react.default.createElement(_actions2.ProActionGroup, _extends({}, targetFooterActions, {
1013
- context: _objectSpread(_objectSpread({}, defaultContext), targetFooterActions === null || targetFooterActions === void 0 ? void 0 : targetFooterActions.context)
1103
+ }, /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup, _objectSpread(_objectSpread({}, targetFooterActions), {}, {
1104
+ context: _objectSpread(_objectSpread({}, defaultContext), targetFooterActions === null || targetFooterActions === void 0 ? void 0 : targetFooterActions.context),
1105
+ "data-teamix-spm": dataTeamixSpm ? "".concat(dataTeamixSpm, "-footerAction") : undefined
1014
1106
  })));
1015
1107
  } else return footerAction;
1016
1108
  };
@@ -1032,7 +1124,7 @@ var ProTable = function ProTable(props) {
1032
1124
  }
1033
1125
 
1034
1126
  function onChangePaginationSize(currentPageSize) {
1035
- var _request5;
1127
+ var _request8;
1036
1128
 
1037
1129
  // 翻页默认清空选择
1038
1130
  if (!reserveSelectedRecords) {
@@ -1044,7 +1136,7 @@ var ProTable = function ProTable(props) {
1044
1136
  setPageSize(currentPageSize);
1045
1137
  setCurrentPage(1);
1046
1138
 
1047
- _request((_request5 = {}, _defineProperty(_request5, targetPageSizeKey, currentPageSize), _defineProperty(_request5, targetPageKey, 1), _request5));
1139
+ _request((_request8 = {}, _defineProperty(_request8, targetPageSizeKey, currentPageSize), _defineProperty(_request8, targetPageKey, 1), _request8));
1048
1140
  }
1049
1141
 
1050
1142
  function renderRowSelection() {
@@ -1056,13 +1148,13 @@ var ProTable = function ProTable(props) {
1056
1148
  } else {
1057
1149
  return /*#__PURE__*/_react.default.createElement("div", {
1058
1150
  className: cls('footer-left-wrapper')
1059
- }, rowSelection.mode !== 'single' && /*#__PURE__*/_react.default.createElement(_components.Checkbox, _extends({
1151
+ }, /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, rowSelection.mode !== 'single' && /*#__PURE__*/_react.default.createElement(_components.Checkbox, _objectSpread({
1060
1152
  className: cls("footer-checkbox-".concat(size))
1061
1153
  }, getCheckAllProps())), footerAction && renderFooterAction(), /*#__PURE__*/_react.default.createElement("span", {
1062
1154
  className: cls('selected-msg')
1063
1155
  }, (0, _utils.getMessage)('selected', {
1064
1156
  count: selectedCount
1065
- })));
1157
+ }))));
1066
1158
  }
1067
1159
  } else if (footerAction) {
1068
1160
  if (showSkeleton) {
@@ -1077,7 +1169,7 @@ var ProTable = function ProTable(props) {
1077
1169
  }
1078
1170
  }
1079
1171
 
1080
- if (showPagination) {
1172
+ if (showPagination && switchViewState === 'table') {
1081
1173
  return /*#__PURE__*/_react.default.createElement("div", {
1082
1174
  className: cls('footer', {
1083
1175
  'footer-has-rowSelection': rowSelection,
@@ -1085,15 +1177,15 @@ var ProTable = function ProTable(props) {
1085
1177
  })
1086
1178
  }, renderRowSelection(), /*#__PURE__*/_react.default.createElement("div", {
1087
1179
  className: cls('footer-right-wrapper')
1088
- }, 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({
1180
+ }, 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({
1089
1181
  className: cls('pagination'),
1090
1182
  onChange: function onChange(number) {
1091
1183
  return onChangePagination(number);
1092
1184
  },
1093
1185
  total: total,
1094
- responsivePaginationType: responsivePaginationType // shape="arrow-only"
1186
+ responsivePaginationType: responsivePaginationType,
1187
+ // shape="arrow-only"
1095
1188
  // pageSizePosition="end"
1096
- ,
1097
1189
  totalRender: function totalRender(total) {
1098
1190
  return (0, _utils.getMessage)('total', {
1099
1191
  total: new Intl.NumberFormat().format(total)
@@ -1108,7 +1200,7 @@ var ProTable = function ProTable(props) {
1108
1200
  return onChangePaginationSize(number);
1109
1201
  }
1110
1202
  }, props.paginationProps)))));
1111
- } else if (!showPagination) {
1203
+ } else if (!showPagination && (footerAction || rowSelection || useRowSelection)) {
1112
1204
  return /*#__PURE__*/_react.default.createElement("div", {
1113
1205
  className: cls('footer', {
1114
1206
  'footer-has-rowSelection': rowSelection
@@ -1122,6 +1214,7 @@ var ProTable = function ProTable(props) {
1122
1214
 
1123
1215
  var fixFooterState = (0, _react.useMemo)(function () {
1124
1216
  if (fullscreenState) {
1217
+ // TODO XXX
1125
1218
  return false;
1126
1219
  }
1127
1220