@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
@@ -1,3 +1,7 @@
1
+ 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; }
2
+
3
+ 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; }
4
+
1
5
  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; }
2
6
 
3
7
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -13,7 +17,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
13
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
18
 
15
19
  import { usePrefixCls } from '@teamix/utils';
16
- import React, { useEffect, useRef } from 'react';
20
+ import React, { useEffect, useMemo, useRef } from 'react';
17
21
  import { Button, Balloon } from '@alicloudfe/components';
18
22
  import TeamixIcon from '@teamix/icon';
19
23
  import FullScreenIcon from './FullScreenIcon';
@@ -23,12 +27,15 @@ import RefreshIcon from './RefreshIcon';
23
27
  import { useSize, useSafeState } from '@teamix/hooks';
24
28
  import debounce from 'lodash.debounce';
25
29
  import './index.scss';
30
+ import CardSwitch from './CardSwitch';
31
+ import cloneDeep from 'lodash.clonedeep';
26
32
  var cls = usePrefixCls('teamix-pro-table-toolbar');
27
33
  var presetToolBarMap = {
28
34
  refresh: RefreshIcon,
29
35
  density: DensityIcon,
30
36
  filtercolumn: FilterColumnIcon,
31
- fullscreen: FullScreenIcon
37
+ fullscreen: FullScreenIcon,
38
+ switchcard: CardSwitch
32
39
  };
33
40
  var presetToolBarName = ['refresh', 'density', 'filtercolumn', 'fullscreen'];
34
41
  var presetToolBar = [{
@@ -53,7 +60,10 @@ var ToolBar = function ToolBar(props) {
53
60
  var _toolBarRef$current, _toolBarRef$current$p, _toolBarRef$current$p2;
54
61
 
55
62
  var toolBar = props.toolBar,
56
- fullScreenState = props.fullScreenState;
63
+ fullScreenState = props.fullScreenState,
64
+ switchCardView = props.switchCardView,
65
+ _props$toolBarAutoWid = props.toolBarAutoWidth,
66
+ toolBarAutoWidth = _props$toolBarAutoWid === void 0 ? true : _props$toolBarAutoWid;
57
67
  var toolBarRef = useRef(null); // const toolBarSize = useSize(toolBarRef);
58
68
  // 用于获取内容宽度
59
69
 
@@ -73,44 +83,69 @@ var ToolBar = function ToolBar(props) {
73
83
 
74
84
 
75
85
  useEffect(debounce(function () {
76
- // console.log(
77
- // layoutInlineSize?.width,
78
- // leftWidth,
79
- // toolBarContentRef.current?.clientWidth,
80
- // );
81
- if ((layoutInlineSize === null || layoutInlineSize === void 0 ? void 0 : layoutInlineSize.width) && leftWidth && toolBarContentRef.current) {
86
+ if ((layoutInlineSize === null || layoutInlineSize === void 0 ? void 0 : layoutInlineSize.width) && leftWidth && toolBarContentRef.current && toolBarAutoWidth) {
82
87
  var _toolBarContentRef$cu;
83
88
 
84
- var width = layoutInlineSize.width; // console.log('layoutInlineSize-width', width);
89
+ var width = layoutInlineSize.width,
90
+ height = layoutInlineSize.height;
85
91
 
86
- if (width - leftWidth <= ((_toolBarContentRef$cu = toolBarContentRef.current) === null || _toolBarContentRef$cu === void 0 ? void 0 : _toolBarContentRef$cu.clientWidth) + 8) {
92
+ if (width - leftWidth <= ((_toolBarContentRef$cu = toolBarContentRef.current) === null || _toolBarContentRef$cu === void 0 ? void 0 : _toolBarContentRef$cu.clientWidth) + 8 || height > 40) {
87
93
  setFlat(false);
88
- } else {
94
+ } else if (height === 40) {
89
95
  setFlat(true);
90
96
  }
91
97
  }
92
- }, 300));
93
- var toolBarList = toolBar !== false ? presetToolBar : [];
98
+ }, 300)); // 初始态
99
+
100
+ useEffect(function () {
101
+ if (!((layoutInlineSize === null || layoutInlineSize === void 0 ? void 0 : layoutInlineSize.width) && leftWidth)) {
102
+ setFlat(true);
103
+ }
104
+ }, []);
105
+ var toolBarList = useMemo(function () {
106
+ var result = toolBar !== false ? cloneDeep(presetToolBar) : [];
107
+
108
+ if (switchCardView && !result.find(function (item) {
109
+ return item.name === 'switchCard';
110
+ })) {
111
+ result.push({
112
+ type: 'preset',
113
+ name: 'switchCard',
114
+ component: presetToolBarMap['switchcard']
115
+ });
116
+ }
117
+
118
+ if (Array.isArray(toolBar)) {
119
+ result = toolBar.map(function (item, index) {
120
+ if (typeof item === 'string' && presetToolBarName.includes(item.toLowerCase())) {
121
+ return {
122
+ type: 'preset',
123
+ name: item,
124
+ component: presetToolBarMap[item.toLowerCase()]
125
+ };
126
+ }
94
127
 
95
- if (Array.isArray(toolBar)) {
96
- toolBarList = toolBar.map(function (item, index) {
97
- if (typeof item === 'string' && presetToolBarName.includes(item.toLowerCase())) {
98
128
  return {
99
- type: 'preset',
100
- name: item,
101
- component: presetToolBarMap[item.toLowerCase()]
129
+ type: 'custom',
130
+ name: "custom".concat(index),
131
+ component: item
102
132
  };
103
- }
133
+ });
104
134
 
105
- return {
106
- type: 'custom',
107
- name: "custom".concat(index),
108
- component: item
109
- };
110
- });
111
- }
135
+ if (!toolBar.includes('switchCard') && switchCardView && !result.find(function (item) {
136
+ return item.name === 'switchCard';
137
+ })) {
138
+ result.push({
139
+ type: 'preset',
140
+ name: 'switchCard',
141
+ component: presetToolBarMap['switchcard']
142
+ });
143
+ }
144
+ }
112
145
 
113
- var renderFlatShape = function renderFlatShape() {
146
+ return result;
147
+ }, [toolBar]);
148
+ var renderFlatShape = useMemo(function () {
114
149
  return /*#__PURE__*/React.createElement("div", {
115
150
  className: cls('content')
116
151
  }, toolBarList.map(function (_ref) {
@@ -120,13 +155,13 @@ var ToolBar = function ToolBar(props) {
120
155
  return /*#__PURE__*/React.createElement("span", {
121
156
  className: cls('item', _defineProperty({}, name, true)),
122
157
  key: name
123
- }, type === 'preset' && /*#__PURE__*/React.createElement(Component, props), type === 'custom' && /*#__PURE__*/React.createElement("div", {
158
+ }, type === 'preset' && /*#__PURE__*/React.createElement(Component, _objectSpread({}, props)), type === 'custom' && /*#__PURE__*/React.createElement("div", {
124
159
  className: cls({
125
160
  custom: true
126
161
  })
127
162
  }, Component));
128
163
  }));
129
- };
164
+ }, [toolBarList]);
130
165
 
131
166
  var renderUnFlatShape = function renderUnFlatShape() {
132
167
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Balloon.Tooltip, {
@@ -141,7 +176,7 @@ var ToolBar = function ToolBar(props) {
141
176
  type: "more-line"
142
177
  })),
143
178
  align: "tr"
144
- }, renderFlatShape()));
179
+ }, renderFlatShape));
145
180
  };
146
181
 
147
182
  return /*#__PURE__*/React.createElement("div", {
@@ -149,10 +184,10 @@ var ToolBar = function ToolBar(props) {
149
184
  flat: flat
150
185
  }),
151
186
  ref: toolBarRef
152
- }, !flat && !fullScreenState ? renderUnFlatShape() : renderFlatShape(), /*#__PURE__*/React.createElement("div", {
187
+ }, !flat && !fullScreenState ? renderUnFlatShape() : renderFlatShape, /*#__PURE__*/React.createElement("div", {
153
188
  className: cls('shadow'),
154
189
  ref: toolBarContentRef
155
- }, renderFlatShape()));
190
+ }, renderFlatShape));
156
191
  };
157
192
 
158
193
  export default ToolBar;
@@ -1,7 +1,7 @@
1
1
  .teamix-pro-table-toolbar {
2
2
  width: 100%;
3
3
  text-align: right;
4
- margin-bottom: 8px;
4
+ // margin-bottom: 8px;
5
5
  &-flat {
6
6
  margin-left: 8px;
7
7
  }
@@ -149,3 +149,12 @@
149
149
  }
150
150
  }
151
151
  }
152
+
153
+ // switch card
154
+ .teamix-pro-table-toolbar-switch-card {
155
+ margin-left: 8px;
156
+ label {
157
+ padding-left: 8px;
158
+ padding-right: 8px;
159
+ }
160
+ }
@@ -0,0 +1,5 @@
1
+ import { ProTableProps } from './typing';
2
+ import './index.scss';
3
+ export * from './typing';
4
+ declare const ProTable: (props: ProTableProps) => JSX.Element;
5
+ export default ProTable;
package/es/table/index.js CHANGED
@@ -1,6 +1,4 @@
1
- var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "afterDataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestConfig", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "fixedTableBody", "isTree", "data-teamix-spm"];
2
-
3
- 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); }
1
+ var _excluded = ["header", "className", "tableClassName", "mainAction", "extra", "dataFilter", "afterDataFilter", "toolBar", "columns", "useRowSelection", "rowSelection", "onChangeRowSelection", "getRowSelection", "primaryKey", "footerAction", "footer", "url", "pageKey", "pageSizeKey", "method", "params", "formatSort", "formatParams", "formatResult", "requestConfig", "requestWhenMount", "showPagination", "pageSizeList", "responsivePaginationType", "showSkeleton", "skeletonSize", "actionRef", "dataSource", "filterDebounce", "footerSuction", "autoRefresh", "customRequest", "filterColumnType", "defaultFilterParams", "reserveSelectedRecords", "size", "disableSelectAll", "context", "fixedTableBody", "isTree", "toolBarAutoWidth", "data-teamix-spm", "switchCardView", "cardViewProps", "defaultView"];
4
2
 
5
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
6
4
 
@@ -52,6 +50,8 @@ import { ProActionGroup } from '../actions';
52
50
  import classNames from 'classnames';
53
51
  import ProPageContainer from '../page-container';
54
52
  import debounce from 'lodash.debounce';
53
+ import CardView from './components/CardView';
54
+ import columns from '../../demos/table/columns';
55
55
  export * from './typing';
56
56
  var cls = usePrefixCls('teamix-pro-table');
57
57
  /**
@@ -179,7 +179,14 @@ var ProTable = function ProTable(props) {
179
179
  _props$fixedTableBody = props.fixedTableBody,
180
180
  fixedTableBody = _props$fixedTableBody === void 0 ? false : _props$fixedTableBody,
181
181
  isTree = props.isTree,
182
+ _props$toolBarAutoWid = props.toolBarAutoWidth,
183
+ toolBarAutoWidth = _props$toolBarAutoWid === void 0 ? true : _props$toolBarAutoWid,
182
184
  dataTeamixSpm = props['data-teamix-spm'],
185
+ _props$switchCardView = props.switchCardView,
186
+ switchCardView = _props$switchCardView === void 0 ? false : _props$switchCardView,
187
+ cardViewProps = props.cardViewProps,
188
+ _props$defaultView = props.defaultView,
189
+ defaultView = _props$defaultView === void 0 ? 'table' : _props$defaultView,
183
190
  otherProps = _objectWithoutProperties(props, _excluded);
184
191
 
185
192
  var targetPageKey = pageKey || globalPageKey;
@@ -204,7 +211,7 @@ var ProTable = function ProTable(props) {
204
211
  var _useState7 = useState(propsDataSource !== null && propsDataSource !== void 0 ? propsDataSource : []),
205
212
  _useState8 = _slicedToArray(_useState7, 2),
206
213
  data = _useState8[0],
207
- setData = _useState8[1];
214
+ _setData = _useState8[1];
208
215
 
209
216
  var _useState9 = useState(props.sort || {}),
210
217
  _useState10 = _slicedToArray(_useState9, 2),
@@ -356,7 +363,11 @@ var ProTable = function ProTable(props) {
356
363
 
357
364
  var offsetHeaderHeight = headerHeight + tableHeaderHeight + pageHeaderHeight + teamixNavHeight + footerRowSelectionHeight + 16 + (offset !== null && offset !== void 0 ? offset : 0) + 1;
358
365
 
359
- if (tableBodyDom.clientHeight < tableBodyDom.scrollHeight) {
366
+ if (switchViewState === 'card') {
367
+ offsetHeaderHeight = offsetHeaderHeight - tableHeaderHeight - footerRowSelectionHeight;
368
+ }
369
+
370
+ if ((tableBodyDom === null || tableBodyDom === void 0 ? void 0 : tableBodyDom.clientHeight) < (tableBodyDom === null || tableBodyDom === void 0 ? void 0 : tableBodyDom.scrollHeight)) {
360
371
  setFooterSuctionState(true);
361
372
  } else {
362
373
  setFooterSuctionState(false);
@@ -391,7 +402,13 @@ var ProTable = function ProTable(props) {
391
402
  var _useState27 = useState(false),
392
403
  _useState28 = _slicedToArray(_useState27, 2),
393
404
  fullscreenState = _useState28[0],
394
- setFullscreenState = _useState28[1]; // 切换全屏搜索开关
405
+ setFullscreenState = _useState28[1]; // 切换视角
406
+
407
+
408
+ var _useState29 = useState(defaultView !== null && defaultView !== void 0 ? defaultView : 'table'),
409
+ _useState30 = _slicedToArray(_useState29, 2),
410
+ switchViewState = _useState30[0],
411
+ setSwitchViewState = _useState30[1]; // 切换全屏搜索开关
395
412
 
396
413
 
397
414
  var filterEnableRef = useRef({
@@ -407,10 +424,10 @@ var ProTable = function ProTable(props) {
407
424
  var dataFilterFormRef = !fullscreenState ? normalDataFilterFormRef : fullscreenDataFilterFormRef; // let dataFilterForm = dataFilterFormRef.current;
408
425
  // 整个内容区是否超过一屏。用于表格在非全屏模式下的吸底
409
426
 
410
- var _useState29 = useState(false),
411
- _useState30 = _slicedToArray(_useState29, 2),
412
- footerSuctionState = _useState30[0],
413
- setFooterSuctionState = _useState30[1]; // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
427
+ var _useState31 = useState(false),
428
+ _useState32 = _slicedToArray(_useState31, 2),
429
+ footerSuctionState = _useState32[0],
430
+ setFooterSuctionState = _useState32[1]; // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
414
431
 
415
432
 
416
433
  var getFooterSuctionState = function getFooterSuctionState() {
@@ -475,14 +492,13 @@ var ProTable = function ProTable(props) {
475
492
  }, [rowSelectionHook]); // 获取 table 左下角 checkbox 属性
476
493
 
477
494
  function getCheckAllProps() {
478
- var _ref = rowSelection,
479
- _ref$onChange = _ref.onChange,
480
- _onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
481
- _ref$onSelectAll = _ref.onSelectAll,
482
- onSelectAll = _ref$onSelectAll === void 0 ? function () {} : _ref$onSelectAll,
483
- _ref$selectedRowKeys = _ref.selectedRowKeys,
484
- selectedRowKeys = _ref$selectedRowKeys === void 0 ? [] : _ref$selectedRowKeys,
485
- getProps = _ref.getProps;
495
+ var _rowSelection$onChang = rowSelection.onChange,
496
+ _onChange = _rowSelection$onChang === void 0 ? function () {} : _rowSelection$onChang,
497
+ _rowSelection$onSelec = rowSelection.onSelectAll,
498
+ onSelectAll = _rowSelection$onSelec === void 0 ? function () {} : _rowSelection$onSelec,
499
+ _rowSelection$selecte2 = rowSelection.selectedRowKeys,
500
+ selectedRowKeys = _rowSelection$selecte2 === void 0 ? [] : _rowSelection$selecte2,
501
+ getProps = rowSelection.getProps;
486
502
 
487
503
  var dataSource = data;
488
504
  var allRowKeys = dataSource.filter(function (d, i) {
@@ -536,7 +552,7 @@ var ProTable = function ProTable(props) {
536
552
 
537
553
  useEffect(function () {
538
554
  if (propsDataSource) {
539
- setData(propsDataSource);
555
+ _setData(propsDataSource);
540
556
  }
541
557
  }, [propsDataSource]); // 初始化 ActionRef。
542
558
 
@@ -559,14 +575,14 @@ var ProTable = function ProTable(props) {
559
575
  actionRefCallback[state][name] = fun;
560
576
  },
561
577
  off: function off(name) {
562
- actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref2) {
563
- var _ref3 = _slicedToArray(_ref2, 2),
564
- k = _ref3[0],
565
- v = _ref3[1];
578
+ actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref) {
579
+ var _ref2 = _slicedToArray(_ref, 2),
580
+ k = _ref2[0],
581
+ v = _ref2[1];
566
582
 
567
- var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref4) {
568
- var _ref5 = _slicedToArray(_ref4, 1),
569
- k = _ref5[0];
583
+ var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref3) {
584
+ var _ref4 = _slicedToArray(_ref3, 1),
585
+ k = _ref4[0];
570
586
 
571
587
  return k !== name;
572
588
  }));
@@ -603,7 +619,16 @@ var ProTable = function ProTable(props) {
603
619
  _setSize(mode);
604
620
  },
605
621
  refresh: function refresh(params) {
606
- return _request(params);
622
+ // card视角的刷新等于重新请求
623
+ if (switchViewState === 'card') {
624
+ setCurrentPage(1);
625
+
626
+ _request(_objectSpread(_objectSpread({}, params), {}, _defineProperty({}, targetPageKey, 1)));
627
+
628
+ setShowSkeleton(true);
629
+ } else {
630
+ _request(params);
631
+ }
607
632
  },
608
633
  request: function request(params) {
609
634
  // 如果请求中还有翻页相关信息,需要自动设置到指定页
@@ -631,6 +656,12 @@ var ProTable = function ProTable(props) {
631
656
  resetPage: function resetPage() {
632
657
  setCurrentPage(1);
633
658
  },
659
+ nextPage: function nextPage() {
660
+ var newCurrentPage = currentPage + 1;
661
+ setCurrentPage(newCurrentPage);
662
+
663
+ _request(_defineProperty({}, targetPageKey, newCurrentPage));
664
+ },
634
665
  rowSelection: rowSelection,
635
666
  clearRowSelection: function clearRowSelection() {
636
667
  rowSelectionHook.setSelectedRowKeys([]);
@@ -650,8 +681,34 @@ var ProTable = function ProTable(props) {
650
681
  normalDataFilterForm: normalDataFilterForm,
651
682
  fullscreenDataFilterForm: fullscreenDataFilterForm,
652
683
  filterEnableRef: filterEnableRef,
684
+ setData: function setData(data) {
685
+ _setData(data);
686
+ },
653
687
  resetTableMaxBodyHeight: function resetTableMaxBodyHeight(offset) {
654
688
  getHeaderHeight(fullscreenState, offset);
689
+ },
690
+ switchView: function switchView(view) {
691
+ setSwitchViewState(view);
692
+ setShowSkeleton(true);
693
+ setCurrentPage(1);
694
+
695
+ if (view === 'table') {
696
+ var _request4;
697
+
698
+ setPageSize(pageSize !== null && pageSize !== void 0 ? pageSize : 20);
699
+
700
+ _request((_request4 = {}, _defineProperty(_request4, targetPageSizeKey, pageSize !== null && pageSize !== void 0 ? pageSize : 20), _defineProperty(_request4, targetPageKey, 1), _request4));
701
+ }
702
+
703
+ if (view === 'card') {
704
+ var _cardViewProps$pageSi, _cardViewProps$pageSi2, _request5;
705
+
706
+ setPageSize((_cardViewProps$pageSi = cardViewProps === null || cardViewProps === void 0 ? void 0 : cardViewProps.pageSize) !== null && _cardViewProps$pageSi !== void 0 ? _cardViewProps$pageSi : 12);
707
+
708
+ _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));
709
+ }
710
+
711
+ getHeaderHeight(fullscreenState);
655
712
  }
656
713
  }); // 将 Actions 绑定到传入的 propsActionRef 中
657
714
 
@@ -660,8 +717,6 @@ var ProTable = function ProTable(props) {
660
717
  }
661
718
 
662
719
  function onFormatResult(next) {
663
- var _next$data;
664
-
665
720
  props.onFormatResult && props.onFormatResult(next);
666
721
  var time = autoRefresh ? autoRefresh(next.data) : false;
667
722
 
@@ -673,8 +728,22 @@ var ProTable = function ProTable(props) {
673
728
  } // 设置 dataSource、total
674
729
 
675
730
 
676
- setData(next.data || []);
677
- setTotal(next.total || ((_next$data = next.data) === null || _next$data === void 0 ? void 0 : _next$data.length));
731
+ if (switchViewState === 'table' || currentPage === 1) {
732
+ var _next$data;
733
+
734
+ _setData(next.data || []);
735
+
736
+ setTotal(next.total || ((_next$data = next.data) === null || _next$data === void 0 ? void 0 : _next$data.length));
737
+ }
738
+
739
+ if (switchViewState === 'card' && currentPage !== 1) {
740
+ var _next$data2;
741
+
742
+ _setData([].concat(_toConsumableArray(data), _toConsumableArray(next.data || [])));
743
+
744
+ setTotal(total + (next.total || ((_next$data2 = next.data) === null || _next$data2 === void 0 ? void 0 : _next$data2.length)));
745
+ }
746
+
678
747
  setShowSkeleton(false);
679
748
  } // 请求表格数据工具函数
680
749
 
@@ -746,7 +815,7 @@ var ProTable = function ProTable(props) {
746
815
  }); // 请求函数
747
816
 
748
817
  function _request(params, noLoading, filterParams) {
749
- var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current5, _actionRef$current5$g, _objectSpread2;
818
+ var _dataFilterFormRef$cu2, _actionRef$current$ge, _actionRef$current5, _actionRef$current5$g, _objectSpread3;
750
819
 
751
820
  // 如果没有传 url 且没有 customRequest,直接返回
752
821
  if (!url && !customRequest) {
@@ -763,7 +832,7 @@ var ProTable = function ProTable(props) {
763
832
 
764
833
  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 : {}; // 格式化后的请求参数
765
834
 
766
- 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));
835
+ 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));
767
836
 
768
837
  if (requestData) {
769
838
  if (autoRefreshTimerRef.current) {
@@ -791,14 +860,24 @@ var ProTable = function ProTable(props) {
791
860
  if (customRequest && typeof customRequest === 'function') {
792
861
  setCustomTableLoading(true);
793
862
  customRequest(requestData).then(function (res) {
794
- var data = res.data,
795
- total = res.total,
863
+ var dataRes = res.data,
864
+ totalRes = res.total,
796
865
  success = res.success;
797
866
 
798
867
  if (success === true) {
799
868
  // 设置 dataSource、total
800
- setData(data || []);
801
- setTotal(total || (data === null || data === void 0 ? void 0 : data.length));
869
+ if (switchViewState === 'table' || params['targetPageKey'] === 1) {
870
+ _setData(dataRes || []);
871
+
872
+ setTotal(totalRes || (dataRes === null || dataRes === void 0 ? void 0 : dataRes.length));
873
+ }
874
+
875
+ if (switchViewState === 'card' && params['targetPageKey'] !== 1) {
876
+ _setData([].concat(_toConsumableArray(data), _toConsumableArray(dataRes || [])));
877
+
878
+ setTotal(total + (totalRes || (dataRes === null || dataRes === void 0 ? void 0 : dataRes.length)));
879
+ }
880
+
802
881
  setShowSkeleton(false);
803
882
  setCustomTableLoading(false);
804
883
  } // 重新计算是否需要吸底
@@ -868,7 +947,6 @@ var ProTable = function ProTable(props) {
868
947
 
869
948
  (_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);
870
949
  setCurrentPage(1);
871
- console.log('currentPageSize1', pageSize);
872
950
 
873
951
  _request(_defineProperty({}, targetPageKey, 1), false, values);
874
952
  },
@@ -878,7 +956,6 @@ var ProTable = function ProTable(props) {
878
956
  (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset());
879
957
  (_dataFilterFormRef$cu3 = dataFilterFormRef.current) === null || _dataFilterFormRef$cu3 === void 0 ? void 0 : _dataFilterFormRef$cu3.reset();
880
958
  setCurrentPage(1);
881
- console.log('currentPageSize2', pageSize);
882
959
 
883
960
  _request(_defineProperty({}, targetPageKey, 1), false, values);
884
961
  }
@@ -913,11 +990,14 @@ var ProTable = function ProTable(props) {
913
990
  rowSelection: rowSelection,
914
991
  filterColumnType: filterColumnType,
915
992
  fullScreenState: isFullScreen,
916
- dataTeamixSpm: dataTeamixSpm
917
- }), /*#__PURE__*/React.createElement(Table.StickyLock, _extends({
993
+ toolBarAutoWidth: toolBarAutoWidth,
994
+ dataTeamixSpm: dataTeamixSpm,
995
+ switchCardView: switchCardView,
996
+ defaultView: defaultView
997
+ }), switchViewState === 'table' && /*#__PURE__*/React.createElement(Table.StickyLock, _objectSpread({
918
998
  hasBorder: false,
919
999
  dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
920
- columns: genProColumnToColumn(filteredColumns, showSkeleton, actionRef, context),
1000
+ columns: genProColumnToColumn(filteredColumns, showSkeleton, actionRef, context, dataTeamixSpm),
921
1001
  loading: getTableLoading(),
922
1002
  className: classNames('teamix-pro-table', tableClassName, {
923
1003
  'with-row-select': rowSelection,
@@ -932,21 +1012,30 @@ var ProTable = function ProTable(props) {
932
1012
  emptyContent: /*#__PURE__*/React.createElement(EmptyContent, null),
933
1013
  sortIcons: getTableSortIcons(),
934
1014
  fixedHeader: fullscreenState || fixedTableBody,
935
- maxBodyHeight: "calc(100vh - ".concat(headerHeight, "px)") // 过滤出可以传到 Table 的 Props
936
-
937
- }, pickProps(getTableProps(), otherProps))));
1015
+ maxBodyHeight: "calc(100vh - ".concat(headerHeight, "px)")
1016
+ }, pickProps(getTableProps(), otherProps))), switchViewState === 'card' && /*#__PURE__*/React.createElement(CardView, {
1017
+ dataSource: showSkeleton ? skeletonDataSource : data || props.dataSource,
1018
+ showSkeleton: showSkeleton,
1019
+ loading: getTableLoading(),
1020
+ originColumns: columns,
1021
+ cardViewProps: cardViewProps,
1022
+ scrollHeight: fullscreenState || fixedTableBody ? "calc(100vh - ".concat(headerHeight, "px)") : undefined,
1023
+ actionRef: actionRef,
1024
+ context: context,
1025
+ columns: genProColumnToColumn(filteredColumns, showSkeleton, actionRef, context)
1026
+ }));
938
1027
  } else {
939
1028
  // 不传 columns 直接返回原始 Table
940
- return /*#__PURE__*/React.createElement(Table, _extends({
1029
+ return /*#__PURE__*/React.createElement(Table, _objectSpread({
941
1030
  className: cls()
942
1031
  }, pickProps(getTableProps(), otherProps)));
943
1032
  }
944
1033
  };
945
1034
 
946
1035
  var renderFooterAction = function renderFooterAction() {
947
- var _actions;
1036
+ var _footerAction$actions;
948
1037
 
949
- if (_typeof(footerAction) === 'object' && (footerAction === null || footerAction === void 0 ? void 0 : (_actions = footerAction.actions) === null || _actions === void 0 ? void 0 : _actions.length) >= 0) {
1038
+ 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) {
950
1039
  // 默认 context
951
1040
  var defaultContext = {
952
1041
  action: actionRef.current,
@@ -965,8 +1054,9 @@ var ProTable = function ProTable(props) {
965
1054
 
966
1055
  return /*#__PURE__*/React.createElement("div", {
967
1056
  className: cls('footer-action')
968
- }, /*#__PURE__*/React.createElement(ProActionGroup, _extends({}, targetFooterActions, {
969
- context: _objectSpread(_objectSpread({}, defaultContext), targetFooterActions === null || targetFooterActions === void 0 ? void 0 : targetFooterActions.context)
1057
+ }, /*#__PURE__*/React.createElement(ProActionGroup, _objectSpread(_objectSpread({}, targetFooterActions), {}, {
1058
+ context: _objectSpread(_objectSpread({}, defaultContext), targetFooterActions === null || targetFooterActions === void 0 ? void 0 : targetFooterActions.context),
1059
+ "data-teamix-spm": dataTeamixSpm ? "".concat(dataTeamixSpm, "-footerAction") : undefined
970
1060
  })));
971
1061
  } else return footerAction;
972
1062
  };
@@ -988,7 +1078,7 @@ var ProTable = function ProTable(props) {
988
1078
  }
989
1079
 
990
1080
  function onChangePaginationSize(currentPageSize) {
991
- var _request5;
1081
+ var _request8;
992
1082
 
993
1083
  // 翻页默认清空选择
994
1084
  if (!reserveSelectedRecords) {
@@ -1000,7 +1090,7 @@ var ProTable = function ProTable(props) {
1000
1090
  setPageSize(currentPageSize);
1001
1091
  setCurrentPage(1);
1002
1092
 
1003
- _request((_request5 = {}, _defineProperty(_request5, targetPageSizeKey, currentPageSize), _defineProperty(_request5, targetPageKey, 1), _request5));
1093
+ _request((_request8 = {}, _defineProperty(_request8, targetPageSizeKey, currentPageSize), _defineProperty(_request8, targetPageKey, 1), _request8));
1004
1094
  }
1005
1095
 
1006
1096
  function renderRowSelection() {
@@ -1012,13 +1102,13 @@ var ProTable = function ProTable(props) {
1012
1102
  } else {
1013
1103
  return /*#__PURE__*/React.createElement("div", {
1014
1104
  className: cls('footer-left-wrapper')
1015
- }, rowSelection.mode !== 'single' && /*#__PURE__*/React.createElement(Checkbox, _extends({
1105
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, rowSelection.mode !== 'single' && /*#__PURE__*/React.createElement(Checkbox, _objectSpread({
1016
1106
  className: cls("footer-checkbox-".concat(size))
1017
1107
  }, getCheckAllProps())), footerAction && renderFooterAction(), /*#__PURE__*/React.createElement("span", {
1018
1108
  className: cls('selected-msg')
1019
1109
  }, getMessage('selected', {
1020
1110
  count: selectedCount
1021
- })));
1111
+ }))));
1022
1112
  }
1023
1113
  } else if (footerAction) {
1024
1114
  if (showSkeleton) {
@@ -1033,7 +1123,7 @@ var ProTable = function ProTable(props) {
1033
1123
  }
1034
1124
  }
1035
1125
 
1036
- if (showPagination) {
1126
+ if (showPagination && switchViewState === 'table') {
1037
1127
  return /*#__PURE__*/React.createElement("div", {
1038
1128
  className: cls('footer', {
1039
1129
  'footer-has-rowSelection': rowSelection,
@@ -1041,15 +1131,15 @@ var ProTable = function ProTable(props) {
1041
1131
  })
1042
1132
  }, renderRowSelection(), /*#__PURE__*/React.createElement("div", {
1043
1133
  className: cls('footer-right-wrapper')
1044
- }, showSkeleton ? /*#__PURE__*/React.createElement(Skeleton.Footer.Pagination, null) : /*#__PURE__*/React.createElement(React.Fragment, null, data.length > 0 && /*#__PURE__*/React.createElement(Pagination, _extends({
1134
+ }, showSkeleton ? /*#__PURE__*/React.createElement(Skeleton.Footer.Pagination, null) : /*#__PURE__*/React.createElement(React.Fragment, null, data.length > 0 && /*#__PURE__*/React.createElement(Pagination, _objectSpread({
1045
1135
  className: cls('pagination'),
1046
1136
  onChange: function onChange(number) {
1047
1137
  return onChangePagination(number);
1048
1138
  },
1049
1139
  total: total,
1050
- responsivePaginationType: responsivePaginationType // shape="arrow-only"
1140
+ responsivePaginationType: responsivePaginationType,
1141
+ // shape="arrow-only"
1051
1142
  // pageSizePosition="end"
1052
- ,
1053
1143
  totalRender: function totalRender(total) {
1054
1144
  return getMessage('total', {
1055
1145
  total: new Intl.NumberFormat().format(total)
@@ -1064,7 +1154,7 @@ var ProTable = function ProTable(props) {
1064
1154
  return onChangePaginationSize(number);
1065
1155
  }
1066
1156
  }, props.paginationProps)))));
1067
- } else if (!showPagination) {
1157
+ } else if (!showPagination && (footerAction || rowSelection || useRowSelection)) {
1068
1158
  return /*#__PURE__*/React.createElement("div", {
1069
1159
  className: cls('footer', {
1070
1160
  'footer-has-rowSelection': rowSelection
@@ -1078,6 +1168,7 @@ var ProTable = function ProTable(props) {
1078
1168
 
1079
1169
  var fixFooterState = useMemo(function () {
1080
1170
  if (fullscreenState) {
1171
+ // TODO XXX
1081
1172
  return false;
1082
1173
  }
1083
1174