@teamix/pro 1.4.25-bugfix.2 → 1.4.25-bugfix.3

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 (356) hide show
  1. package/dist/pro.css +1 -1
  2. package/dist/pro.js +64943 -84006
  3. package/dist/pro.min.css +1 -1
  4. package/dist/pro.min.js +1 -1
  5. package/dist/pro.min.js.LICENSE.txt +6 -13
  6. package/es/actions/base.js +21 -8
  7. package/es/actions/dialog-component.js +9 -2
  8. package/es/actions/dialog-form.js +75 -37
  9. package/es/actions/dialog-info.js +5 -1
  10. package/es/actions/dialog.js +95 -57
  11. package/es/actions/index.d.ts +0 -7
  12. package/es/actions/index.js +153 -93
  13. package/es/actions/index.scss +1 -6
  14. package/es/actions/link.js +5 -3
  15. package/es/actions/request.js +27 -12
  16. package/es/actions/utils.js +9 -1
  17. package/es/card/card-container.js +5 -0
  18. package/es/card/divider.js +5 -0
  19. package/es/card/index.js +100 -61
  20. package/es/card/index.scss +0 -15
  21. package/es/card/selectable.js +13 -4
  22. package/es/card/tab.js +10 -1
  23. package/es/card/utils.js +2 -0
  24. package/es/form/Components/Editable/index.js +55 -16
  25. package/es/form/Components/FormGroup/index.d.ts +0 -1
  26. package/es/form/Components/FormGroup/index.js +22 -7
  27. package/es/form/Components/LightFilter/index.js +35 -15
  28. package/es/form/Components/ProField/index.js +14 -2
  29. package/es/form/Components/ProField/mapDateFormat.js +28 -2
  30. package/es/form/Components/Text/index.d.ts +0 -1
  31. package/es/form/Components/Text/index.js +11 -2
  32. package/es/form/Filter/AdvancedFilter.js +26 -11
  33. package/es/form/Filter/Layout.js +24 -11
  34. package/es/form/Filter/LightFilter.js +24 -13
  35. package/es/form/Filter/SimpleFilter.js +21 -7
  36. package/es/form/Filter/index.js +171 -117
  37. package/es/form/Filter/index2.js +28 -11
  38. package/es/form/Filter/layout.scss +1 -1
  39. package/es/form/Filter/useBindUrl.js +46 -18
  40. package/es/form/Filter/useSpecialProps.js +13 -8
  41. package/es/form/ProForm/customComponent.js +5 -0
  42. package/es/form/ProForm/index.js +38 -30
  43. package/es/form/ProForm/useAutoLayout.js +42 -21
  44. package/es/form/ProForm/useAutoSubmit.js +8 -3
  45. package/es/form/ProForm/useFieldRequest.js +5 -0
  46. package/es/form/ProForm/useFormDisplayValues.js +28 -12
  47. package/es/form/ProForm/useInitialRequest.js +5 -0
  48. package/es/form/SchemaForm/adapterComponent.js +3 -0
  49. package/es/form/SchemaForm/adapterDecorator.d.ts +1 -1
  50. package/es/form/SchemaForm/adapterDecorator.js +8 -0
  51. package/es/form/SchemaForm/adapterType.js +2 -0
  52. package/es/form/SchemaForm/index.js +114 -78
  53. package/es/form/SchemaForm/initializeArrayCards.js +6 -0
  54. package/es/form/SchemaForm/initializeArrayCollapse.js +6 -0
  55. package/es/form/SchemaForm/initializeArrayItems.js +9 -2
  56. package/es/form/SchemaForm/initializeArrayTable.js +34 -21
  57. package/es/form/SchemaForm/initializeDataSource.js +6 -2
  58. package/es/form/SchemaForm/initializeFormButton.js +31 -14
  59. package/es/form/SchemaForm/initializeFormCollapse.js +18 -8
  60. package/es/form/SchemaForm/initializeFormGroup.js +20 -10
  61. package/es/form/SchemaForm/initializeFormStep.js +23 -11
  62. package/es/form/SchemaForm/initializeFormTab.js +20 -10
  63. package/es/form/SchemaForm/initializeReactions.js +33 -9
  64. package/es/form/SchemaForm/initializeRequest.js +16 -2
  65. package/es/form/SchemaForm/initializeRules.js +22 -4
  66. package/es/form/SchemaForm/initializeSelectTable.js +33 -7
  67. package/es/form/SchemaForm/reactions.js +34 -19
  68. package/es/form/docs/ActionResponse.d.ts +0 -1
  69. package/es/form/index.d.ts +9 -9
  70. package/es/form/index.js +9 -0
  71. package/es/form/typing.d.ts +4 -26
  72. package/es/form/utils.d.ts +1 -1
  73. package/es/form/utils.js +49 -4
  74. package/es/form/warning.js +7 -2
  75. package/es/global.scss +1 -3
  76. package/es/index-without-icon.js +3 -4
  77. package/es/index.d.ts +1 -1
  78. package/es/index.js +8 -18
  79. package/es/info/components/InfoGroup/index.js +32 -21
  80. package/es/info/components/InfoValueItem/index.js +119 -66
  81. package/es/info/components/ProInfoItem/index.js +21 -13
  82. package/es/info/components/baseInfo/index.js +27 -17
  83. package/es/info/components/headerInfo/index.js +20 -8
  84. package/es/info/components/tableInfo/index.js +50 -20
  85. package/es/info/index.js +86 -61
  86. package/es/info/typing.d.ts +0 -2
  87. package/es/info/utils/index.js +11 -0
  88. package/es/nocode/configurators/ProTable.js +22 -1
  89. package/es/nocode/configurators/common.js +6 -5
  90. package/es/nocode/configurators/index.js +3 -2
  91. package/es/nocode/index.js +6 -6
  92. package/es/nocode/pages/editor.js +9 -5
  93. package/es/nocode/pages/index.js +30 -5
  94. package/es/nocode/pages/playground.js +35 -18
  95. package/es/nocode/pages/renderer.js +42 -9
  96. package/es/nocode/playground.js +23 -10
  97. package/es/page-header/index.d.ts +2 -2
  98. package/es/page-header/index.js +76 -40
  99. package/es/page-header/index.scss +1 -2
  100. package/es/sidebar/components/sidebar-container/index.js +69 -54
  101. package/es/sidebar/components/sidebar-container/index.scss +14 -21
  102. package/es/sidebar/components/tree/index.js +138 -100
  103. package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +26 -11
  104. package/es/sidebar/components/tree-node/components/IconAction/index.js +35 -9
  105. package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +2 -2
  106. package/es/sidebar/components/tree-node/components/IconSwitch/index.js +25 -12
  107. package/es/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
  108. package/es/sidebar/components/tree-node/index.js +84 -42
  109. package/es/sidebar/components/tree-node/index.scss +0 -6
  110. package/es/sidebar/index.d.ts +0 -2
  111. package/es/sidebar/index.js +95 -72
  112. package/es/sidebar/typing.d.ts +0 -4
  113. package/es/sidebar/utils/action-ref.js +7 -2
  114. package/es/sidebar/utils/index.d.ts +2 -5
  115. package/es/sidebar/utils/index.js +98 -41
  116. package/es/table/components/Filter/index.d.ts +3 -6
  117. package/es/table/components/Filter/index.js +128 -115
  118. package/es/table/components/Layout/index.js +47 -32
  119. package/es/table/components/Layout/index.scss +1 -2
  120. package/es/table/components/Pagination/index.js +58 -25
  121. package/es/table/components/QuickAction/index.d.ts +0 -1
  122. package/es/table/components/QuickAction/index.js +11 -3
  123. package/es/table/components/ToolBar/DensityIcon.js +31 -19
  124. package/es/table/components/ToolBar/FilterColumnIcon.js +125 -87
  125. package/es/table/components/ToolBar/FullScreenIcon.js +62 -7
  126. package/es/table/components/ToolBar/Fullscreen.js +28 -25
  127. package/es/table/components/ToolBar/RefreshIcon.js +27 -162
  128. package/es/table/components/ToolBar/index.d.ts +1 -1
  129. package/es/table/components/ToolBar/index.js +38 -130
  130. package/es/table/components/ToolBar/index.scss +3 -49
  131. package/es/table/index.js +423 -455
  132. package/es/table/index.scss +0 -8
  133. package/es/table/typing.d.ts +6 -125
  134. package/es/table/utils/columnRender.d.ts +3 -3
  135. package/es/table/utils/columnRender.js +79 -39
  136. package/es/table/utils/genProColumnToColumn.d.ts +2 -2
  137. package/es/table/utils/genProColumnToColumn.js +16 -13
  138. package/es/table/utils/index.js +47 -14
  139. package/es/table/utils/pureColumnRender.js +53 -21
  140. package/es/table/utils/pureGenProColumnToColumn.d.ts +1 -1
  141. package/es/table/utils/pureGenProColumnToColumn.js +10 -2
  142. package/es/table/utils/useTableSelection.js +33 -6
  143. package/es/templates/List/index.js +9 -2
  144. package/es/timeline/ProTimeLineItem/index.js +65 -25
  145. package/es/timeline/index.js +22 -8
  146. package/es/timeline/typing.d.ts +0 -1
  147. package/es/utils/message.d.ts +2 -2
  148. package/es/utils/message.js +5 -0
  149. package/lib/actions/base.js +24 -8
  150. package/lib/actions/confirm.js +5 -0
  151. package/lib/actions/danger-confirm.js +5 -0
  152. package/lib/actions/danger-pop-confirm.js +4 -0
  153. package/lib/actions/dialog-component.js +15 -2
  154. package/lib/actions/dialog-form.js +89 -36
  155. package/lib/actions/dialog-info.js +10 -1
  156. package/lib/actions/dialog-table.js +5 -0
  157. package/lib/actions/dialog.js +112 -55
  158. package/lib/actions/drawer-form.js +3 -0
  159. package/lib/actions/drawer-info.js +3 -0
  160. package/lib/actions/drawer-table.js +3 -0
  161. package/lib/actions/drawer.js +4 -0
  162. package/lib/actions/error.js +5 -0
  163. package/lib/actions/index.d.ts +0 -7
  164. package/lib/actions/index.js +184 -115
  165. package/lib/actions/index.scss +1 -6
  166. package/lib/actions/link.js +10 -1
  167. package/lib/actions/notice.js +5 -0
  168. package/lib/actions/pop-confirm.js +5 -0
  169. package/lib/actions/request.js +32 -8
  170. package/lib/actions/utils.js +9 -1
  171. package/lib/card/card-container.js +9 -0
  172. package/lib/card/divider.js +7 -0
  173. package/lib/card/index.js +127 -61
  174. package/lib/card/index.scss +0 -15
  175. package/lib/card/selectable.js +20 -4
  176. package/lib/card/tab.js +14 -1
  177. package/lib/card/utils.js +6 -0
  178. package/lib/field/index.js +6 -0
  179. package/lib/form/Components/Editable/index.js +65 -15
  180. package/lib/form/Components/FormGroup/index.d.ts +0 -1
  181. package/lib/form/Components/FormGroup/index.js +28 -7
  182. package/lib/form/Components/LightFilter/index.js +47 -15
  183. package/lib/form/Components/ProField/index.js +21 -2
  184. package/lib/form/Components/ProField/mapDateFormat.js +32 -2
  185. package/lib/form/Components/Text/index.d.ts +0 -1
  186. package/lib/form/Components/Text/index.js +16 -2
  187. package/lib/form/Filter/AdvancedFilter.js +34 -11
  188. package/lib/form/Filter/Layout.js +33 -11
  189. package/lib/form/Filter/LightFilter.js +32 -13
  190. package/lib/form/Filter/SimpleFilter.js +27 -5
  191. package/lib/form/Filter/index.js +191 -116
  192. package/lib/form/Filter/index2.js +38 -11
  193. package/lib/form/Filter/layout.scss +1 -1
  194. package/lib/form/Filter/useBindUrl.js +50 -18
  195. package/lib/form/Filter/useSpecialProps.js +13 -6
  196. package/lib/form/ProForm/customComponent.js +8 -0
  197. package/lib/form/ProForm/index.js +60 -30
  198. package/lib/form/ProForm/useAutoLayout.js +45 -21
  199. package/lib/form/ProForm/useAutoSubmit.js +10 -1
  200. package/lib/form/ProForm/useFieldRequest.js +8 -0
  201. package/lib/form/ProForm/useFormDisplayValues.js +34 -12
  202. package/lib/form/ProForm/useInitialRequest.js +6 -0
  203. package/lib/form/SchemaForm/adapterComponent.js +6 -0
  204. package/lib/form/SchemaForm/adapterDecorator.d.ts +1 -1
  205. package/lib/form/SchemaForm/adapterDecorator.js +12 -0
  206. package/lib/form/SchemaForm/adapterType.js +5 -0
  207. package/lib/form/SchemaForm/index.js +144 -78
  208. package/lib/form/SchemaForm/initializeArrayCards.js +7 -0
  209. package/lib/form/SchemaForm/initializeArrayCollapse.js +7 -0
  210. package/lib/form/SchemaForm/initializeArrayItems.js +10 -2
  211. package/lib/form/SchemaForm/initializeArrayTable.js +34 -21
  212. package/lib/form/SchemaForm/initializeDataSource.js +8 -2
  213. package/lib/form/SchemaForm/initializeFormButton.js +32 -14
  214. package/lib/form/SchemaForm/initializeFormCollapse.js +18 -8
  215. package/lib/form/SchemaForm/initializeFormGroup.js +20 -10
  216. package/lib/form/SchemaForm/initializeFormStep.js +23 -11
  217. package/lib/form/SchemaForm/initializeFormTab.js +20 -10
  218. package/lib/form/SchemaForm/initializeReactions.js +37 -9
  219. package/lib/form/SchemaForm/initializeRequest.js +18 -2
  220. package/lib/form/SchemaForm/initializeRules.js +24 -4
  221. package/lib/form/SchemaForm/initializeSelectTable.js +36 -7
  222. package/lib/form/SchemaForm/reactions.js +37 -17
  223. package/lib/form/docs/ActionResponse.d.ts +0 -1
  224. package/lib/form/docs/ActionResponse.js +5 -0
  225. package/lib/form/index.d.ts +9 -9
  226. package/lib/form/index.js +25 -0
  227. package/lib/form/typing.d.ts +4 -26
  228. package/lib/form/utils.d.ts +1 -1
  229. package/lib/form/utils.js +61 -4
  230. package/lib/form/warning.js +8 -2
  231. package/lib/global.scss +1 -3
  232. package/lib/hooks/index.js +5 -0
  233. package/lib/index-without-icon.js +36 -2
  234. package/lib/index.d.ts +1 -1
  235. package/lib/index.js +40 -13
  236. package/lib/info/components/InfoGroup/index.js +42 -21
  237. package/lib/info/components/InfoValueItem/index.js +134 -66
  238. package/lib/info/components/ProInfoItem/index.js +29 -13
  239. package/lib/info/components/baseInfo/index.js +39 -17
  240. package/lib/info/components/headerInfo/index.js +31 -8
  241. package/lib/info/components/tableInfo/index.js +62 -20
  242. package/lib/info/index.js +101 -61
  243. package/lib/info/typing.d.ts +0 -2
  244. package/lib/info/utils/index.js +19 -0
  245. package/lib/info/utils/utils.js +1 -0
  246. package/lib/nocode/configurators/PageHeader.js +2 -0
  247. package/lib/nocode/configurators/ProTable.js +24 -1
  248. package/lib/nocode/configurators/common.js +10 -5
  249. package/lib/nocode/configurators/index.js +10 -2
  250. package/lib/nocode/configurators/map.js +5 -0
  251. package/lib/nocode/index.js +11 -0
  252. package/lib/nocode/pages/editor.js +19 -5
  253. package/lib/nocode/pages/index.js +35 -3
  254. package/lib/nocode/pages/playground.js +52 -18
  255. package/lib/nocode/pages/renderer.js +53 -9
  256. package/lib/nocode/playground.js +35 -10
  257. package/lib/page-container/index.js +6 -0
  258. package/lib/page-header/index.d.ts +2 -2
  259. package/lib/page-header/index.js +90 -39
  260. package/lib/page-header/index.scss +1 -2
  261. package/lib/sidebar/components/sidebar-container/index.js +81 -54
  262. package/lib/sidebar/components/sidebar-container/index.scss +14 -21
  263. package/lib/sidebar/components/tree/index.js +152 -100
  264. package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +34 -11
  265. package/lib/sidebar/components/tree-node/components/IconAction/index.js +46 -9
  266. package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +2 -2
  267. package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +35 -12
  268. package/lib/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
  269. package/lib/sidebar/components/tree-node/index.js +100 -42
  270. package/lib/sidebar/components/tree-node/index.scss +0 -6
  271. package/lib/sidebar/index.d.ts +0 -2
  272. package/lib/sidebar/index.js +111 -79
  273. package/lib/sidebar/typing.d.ts +0 -4
  274. package/lib/sidebar/utils/action-ref.js +8 -2
  275. package/lib/sidebar/utils/index.d.ts +2 -5
  276. package/lib/sidebar/utils/index.js +106 -41
  277. package/lib/skeleton/index.js +6 -0
  278. package/lib/table/components/EmptyContent/index.js +6 -0
  279. package/lib/table/components/Filter/index.d.ts +3 -6
  280. package/lib/table/components/Filter/index.js +137 -114
  281. package/lib/table/components/Layout/index.js +60 -32
  282. package/lib/table/components/Layout/index.scss +1 -2
  283. package/lib/table/components/Pagination/index.js +68 -25
  284. package/lib/table/components/QuickAction/index.d.ts +0 -1
  285. package/lib/table/components/QuickAction/index.js +15 -3
  286. package/lib/table/components/ToolBar/DensityIcon.js +42 -19
  287. package/lib/table/components/ToolBar/FilterColumnIcon.js +136 -86
  288. package/lib/table/components/ToolBar/FullScreenIcon.js +74 -10
  289. package/lib/table/components/ToolBar/Fullscreen.js +35 -25
  290. package/lib/table/components/ToolBar/RefreshIcon.js +36 -164
  291. package/lib/table/components/ToolBar/index.d.ts +1 -1
  292. package/lib/table/components/ToolBar/index.js +47 -133
  293. package/lib/table/components/ToolBar/index.scss +3 -49
  294. package/lib/table/index.js +445 -454
  295. package/lib/table/index.scss +0 -8
  296. package/lib/table/typing.d.ts +6 -125
  297. package/lib/table/utils/columnRender.d.ts +3 -3
  298. package/lib/table/utils/columnRender.js +92 -39
  299. package/lib/table/utils/genProColumnToColumn.d.ts +2 -2
  300. package/lib/table/utils/genProColumnToColumn.js +21 -13
  301. package/lib/table/utils/getTableProps.js +2 -0
  302. package/lib/table/utils/getTableSortIcons.js +5 -0
  303. package/lib/table/utils/index.js +55 -12
  304. package/lib/table/utils/pureColumnRender.js +64 -21
  305. package/lib/table/utils/pureGenProColumnToColumn.d.ts +1 -1
  306. package/lib/table/utils/pureGenProColumnToColumn.js +11 -2
  307. package/lib/table/utils/useTableSelection.js +35 -6
  308. package/lib/templates/Detail/index.js +5 -0
  309. package/lib/templates/Form/index.js +5 -0
  310. package/lib/templates/List/index.js +19 -2
  311. package/lib/templates/index.js +6 -0
  312. package/lib/timeline/ProTimeLineItem/index.js +76 -25
  313. package/lib/timeline/index.js +33 -8
  314. package/lib/timeline/typing.d.ts +0 -1
  315. package/lib/utils/index.js +6 -0
  316. package/lib/utils/message.d.ts +2 -2
  317. package/lib/utils/message.js +10 -0
  318. package/package.json +1 -1
  319. package/dist/pro.all.min.css +0 -1
  320. package/dist/pro.xconsole.min.css +0 -1
  321. package/es/actions/quick.d.ts +0 -2
  322. package/es/actions/quick.js +0 -26
  323. package/es/card/xconsole.scss +0 -3
  324. package/es/form/ProForm/addCascadeEffect.d.ts +0 -2
  325. package/es/form/ProForm/addCascadeEffect.js +0 -203
  326. package/es/next-xconsole.scss +0 -34
  327. package/es/page-header/xconsole.scss +0 -5
  328. package/es/table/components/CardView/index.d.ts +0 -5
  329. package/es/table/components/CardView/index.js +0 -392
  330. package/es/table/components/CardView/index.scss +0 -46
  331. package/es/table/components/LoadMore/index.d.ts +0 -20
  332. package/es/table/components/LoadMore/index.js +0 -88
  333. package/es/table/components/LoadMore/index.scss +0 -19
  334. package/es/table/components/ToolBar/CardSwitch.d.ts +0 -8
  335. package/es/table/components/ToolBar/CardSwitch.js +0 -52
  336. package/es/table/utils/util.d.ts +0 -5
  337. package/es/table/utils/util.js +0 -19
  338. package/es/xconsole.scss +0 -503
  339. package/lib/actions/quick.d.ts +0 -2
  340. package/lib/actions/quick.js +0 -33
  341. package/lib/card/xconsole.scss +0 -3
  342. package/lib/form/ProForm/addCascadeEffect.d.ts +0 -2
  343. package/lib/form/ProForm/addCascadeEffect.js +0 -210
  344. package/lib/next-xconsole.scss +0 -34
  345. package/lib/page-header/xconsole.scss +0 -5
  346. package/lib/table/components/CardView/index.d.ts +0 -5
  347. package/lib/table/components/CardView/index.js +0 -402
  348. package/lib/table/components/CardView/index.scss +0 -46
  349. package/lib/table/components/LoadMore/index.d.ts +0 -20
  350. package/lib/table/components/LoadMore/index.js +0 -99
  351. package/lib/table/components/LoadMore/index.scss +0 -19
  352. package/lib/table/components/ToolBar/CardSwitch.d.ts +0 -8
  353. package/lib/table/components/ToolBar/CardSwitch.js +0 -60
  354. package/lib/table/utils/util.d.ts +0 -5
  355. package/lib/table/utils/util.js +0 -25
  356. package/lib/xconsole.scss +0 -503
@@ -89,14 +89,6 @@ $fullscreenPadding: 24px;
89
89
  color: var(--table-sort-color-current, #0064c8);
90
90
  }
91
91
  }
92
- .next-table-empty {
93
- padding: 0;
94
- }
95
- .next-table-wrap-empty {
96
- .next-table-body tr td{
97
- border-bottom: 0;
98
- }
99
- }
100
92
  }
101
93
 
102
94
  .teamix-pro-table-footer-suction {
@@ -2,14 +2,13 @@
2
2
  * ProTable 类型定义
3
3
  */
4
4
  import { ColumnProps, TableProps } from '@alicloudfe/components/types/table';
5
- import { ProFieldType, ProFieldRenderProps, ProFieldDataSourceItem, EmptyContentProps } from '../field';
5
+ import { ProFieldType, ProFieldRenderProps, ProFieldDataSourceItem } from '../field';
6
6
  import { QueryFilterProps, ProFormType } from '../form';
7
7
  import { ProActionGroupProps, ProActionButtonProps } from '../actions';
8
8
  import { PaginationProps } from '@alicloudfe/components/types/pagination';
9
9
  import { HeaderProps as ProTableHeaderProps } from '../field';
10
- import { Method, AxiosRequestConfig } from 'axios';
10
+ import { Method } from 'axios';
11
11
  import React from 'react';
12
- import { ProCardProps } from '../card';
13
12
  declare type IFieldRenderProps = keyof ProFieldRenderProps;
14
13
  /** 列record函数 */
15
14
  declare type ProTableCellFunProp = (value: any, index: number, record: any, ...others: any) => any;
@@ -58,11 +57,9 @@ export declare type ProTableColumnProps = {
58
57
  dataIndex?: string | string[];
59
58
  /** 指定 valueType 为日期时间格式时,可以格式化日期时间 */
60
59
  format?: string;
61
- /** 多级表头 **/
62
- children?: ProTableColumnProps[];
63
60
  /** ProField 其他配置项 */
64
61
  props?: any;
65
- } & Omit<ColumnProps, 'filters' | 'dataIndex' | 'filtersMode' | 'children'>;
62
+ } & Omit<ColumnProps, 'filters' | 'dataIndex' | 'filtersMode'>;
66
63
  export declare type ProColumnProps = ProTableColumnProps;
67
64
  export declare type ProTableProps = {
68
65
  /** ProColums 定义,取代 Table 的 columns */
@@ -78,9 +75,9 @@ export declare type ProTableProps = {
78
75
  /** sort 排序请求参数处理函数 */
79
76
  formatSort?: (sort: object) => object;
80
77
  /** 如需自定义调用参数格式,则可以设定此值在请求前对 params 进行自定义,如果返回false则可以阻止请求 */
81
- formatParams?: ((params: any) => typeof params) | string;
78
+ formatParams?: (params: any) => typeof params;
82
79
  /** 对返回值的 data,total 进行映射处理 */
83
- formatResult?: TDataService | ((res: any) => TDataService) | string;
80
+ formatResult?: TDataService | ((res: any) => TDataService);
84
81
  /** 请求成功后经过 formatResult 转换后的回调 */
85
82
  onFormatResult?: (data: any[]) => void;
86
83
  /** 是否第一次加载时就发起请求 */
@@ -89,8 +86,6 @@ export declare type ProTableProps = {
89
86
  onSuccess?: (res: any) => void;
90
87
  /** 内部请求失败时的回调 */
91
88
  onError?: (error: Error) => void;
92
- /** 自定义的请求配置 */
93
- requestConfig?: AxiosRequestConfig;
94
89
  /** 翻页页数的请求参数名 */
95
90
  pageKey?: string;
96
91
  /** 翻页器页数对应字段 */
@@ -131,15 +126,7 @@ export declare type ProTableProps = {
131
126
  /** 非全屏模式下是否吸底 默认状态下取用 ProPageContainer 作为参照物。如果传入了 Dom,则取用 Dom 作为参照物 */
132
127
  footerSuction?: boolean | Element;
133
128
  /** 当满足条件时开启自动刷新,返回值为自动刷新间隔时间,如果返回 0 或 false 则停止自动刷新,每次触发翻页、搜索都将重置时间 */
134
- autoRefresh?: ((dataSource: any[]) => number | boolean) | boolean;
135
- /** 自动刷新配置 */
136
- autoRefreshProps?: {
137
- /** 可选间隔列表 **/
138
- dataSource?: {
139
- label?: React.ReactNode;
140
- value?: number;
141
- }[];
142
- };
129
+ autoRefresh?: (dataSource: any[]) => number | boolean;
143
130
  /** 自定义请求方法,必需返回 success,data 字段,如果需要手动分页 total 也是必需的 */
144
131
  customRequest?: (params: any) => Promise<{
145
132
  success: boolean;
@@ -158,20 +145,6 @@ export declare type ProTableProps = {
158
145
  context?: any;
159
146
  /** 是否固定表格主体(开启后横向滚动条会固定在底部) */
160
147
  fixedTableBody?: boolean;
161
- /** 用于埋点 */
162
- 'data-teamix-spm'?: string;
163
- /** 是否切换卡片视角 **/
164
- switchCardView?: boolean;
165
- /** 卡片视角配置 **/
166
- cardViewProps?: ProTableCardProps;
167
- /** 默认展示维度 **/
168
- defaultView?: 'table' | 'card';
169
- /** 空状态配置 **/
170
- emptyProps?: EmptyContentProps;
171
- /** 是否绑定 url **/
172
- bindUrl?: boolean;
173
- /** 绑定 url 配置 **/
174
- bindUrlProps?: ProTableBindUrlProps;
175
148
  } & Omit<TableProps, 'columns'> & ProTableTopAreaProps;
176
149
  export declare type rowSelectionType = {
177
150
  getProps?: (record: any, index: number) => any;
@@ -228,7 +201,6 @@ export declare type ProTableActionType = {
228
201
  };
229
202
  /** 重置翻页器为1,不发送请求 */
230
203
  resetPage?: () => void;
231
- nextPage?: () => void;
232
204
  /** 获取数据过滤区表单实例 */
233
205
  dataFilterForm?: ProFormType;
234
206
  /** 用于在 mount 的时候获取到表单 ref */
@@ -238,15 +210,6 @@ export declare type ProTableActionType = {
238
210
  filterEnableRef?: any;
239
211
  /** 表格当前的数据 */
240
212
  data?: any[];
241
- /** 切换视角 **/
242
- switchView?: (view: 'card' | 'table') => void;
243
- /** 设置数据源 **/
244
- setData?: (data: any[]) => void;
245
- setCardViewScrollPosition?: (scrollTop: number) => void;
246
- /** 刷新定时器间隔时间 */
247
- setAutoRefreshTimers?: (timers: number) => void;
248
- /** 清除刷新定时器 */
249
- clearAutoRefreshTimers?: () => void;
250
213
  } & ProTableActionTypeMutations;
251
214
  /** action State 定义 */
252
215
  export declare type ProTableActionTypeMutations = {
@@ -293,8 +256,6 @@ export declare type ProTableTopAreaProps = {
293
256
  mainAction?: ProActionGroupProps | React.ReactNode;
294
257
  /** 工具栏区 */
295
258
  toolBar?: boolean | ProTableToolBarItem[];
296
- /** 是否开启工具栏自适应 */
297
- toolBarAutoWidth?: boolean;
298
259
  /** 快捷操作区 */
299
260
  extra?: ProActionButtonProps | React.ReactNode | React.ReactNode[];
300
261
  /** 数据过滤区 */
@@ -313,14 +274,6 @@ export declare type ProTableLayoutProps = {
313
274
  actionRef: React.MutableRefObject<ProTableActionType | undefined>;
314
275
  columns?: ProTableColumnProps[];
315
276
  rowSelection?: innerRowSelectionType | rowSelectionType;
316
- fullScreenState?: boolean;
317
- dataTeamixSpm?: string;
318
- switchCardView?: boolean;
319
- defaultView?: 'table' | 'card';
320
- autoRefresh?: ProTableProps['autoRefresh'];
321
- autoRefreshProps?: ProTableProps['autoRefreshProps'];
322
- bindUrl?: ProTableProps['bindUrl'];
323
- bindUrlProps?: ProTableProps['bindUrlProps'];
324
277
  } & ProTableTopAreaProps;
325
278
  /** columns 列过滤 */
326
279
  export declare type ProTableColumnsFilterItemProps = {
@@ -343,76 +296,4 @@ export declare type parentPositionProps = {
343
296
  offsetLeft: number;
344
297
  offsetRight: number;
345
298
  };
346
- /** card props **/
347
- export declare type ProTableCardProps = {
348
- /** 标题 dataIndex **/
349
- title?: (ProTableColumnProps['dataIndex'] | ProTableColumnProps) | ((index: number, record: any) => ProTableColumnProps['dataIndex'] | ProTableColumnProps);
350
- /** 副标题 dataIndex **/
351
- subTitle?: (ProTableColumnProps['dataIndex'] | ProTableColumnProps) | ((index: number, record: any) => ProTableColumnProps['dataIndex'] | ProTableColumnProps);
352
- /** 内容区域 dataIndex **/
353
- content?: (ProTableColumnProps['dataIndex'] | ProTableColumnProps)[] | ((index: number, record: any) => (ProTableColumnProps['dataIndex'] | ProTableColumnProps)[]);
354
- /** extra 区域 **/
355
- extra?: (ProActionGroupProps | React.ReactNode | ProTableColumnProps['dataIndex'])[] | ((index: number, record: any) => (ProActionGroupProps | React.ReactNode | ProTableColumnProps['dataIndex'])[]);
356
- /** 标签区域 **/
357
- tags?: (ProTableColumnProps['dataIndex'] | ProTableColumnProps)[] | ((index: number, record: any) => (ProTableColumnProps['dataIndex'] | ProTableColumnProps)[]);
358
- /** 分页器条数 **/
359
- pageSize?: 12 | 24 | 48 | 96 | number;
360
- /** 卡片区域滚动高度 **/
361
- scrollHeight?: number | string;
362
- /** 自动加载下一页 **/
363
- autoLoadNextPage?: boolean;
364
- /** 滚动容器 用于监听触底事件 **/
365
- scrollDom?: HTMLElement;
366
- /** 触底事件 **/
367
- onScrollBottom?: () => void;
368
- /** 使用表格分页 **/
369
- useTablePagination?: boolean;
370
- /** 使用响应式 **/
371
- cardResponsiveProps?: {
372
- xxs?: number;
373
- xs?: number;
374
- s?: number;
375
- m?: number;
376
- l?: number;
377
- xl?: number;
378
- };
379
- /** 卡片配置 **/
380
- cardProps?: {
381
- [key in keyof ProCardProps]?: ProCardProps[key] | ((index: number, record: any) => ProCardProps[key]);
382
- };
383
- /** 是否展示卡片骨架 **/
384
- showSkeleton?: boolean;
385
- };
386
- /** card 视角 Props (内部组件) **/
387
- export declare type ProTableCardViewProps = {
388
- /** 卡片视角配置 **/
389
- cardViewProps?: ProTableCardProps;
390
- /** 数据源 **/
391
- dataSource?: any[];
392
- /** 原始 columns **/
393
- originColumns?: any[];
394
- /** 处理过后的 columns **/
395
- columns?: any[];
396
- /** 加载动画 **/
397
- loading?: boolean;
398
- /** 上下文 **/
399
- context?: any;
400
- actionRef?: React.MutableRefObject<ProTableActionType | undefined>;
401
- /** 卡片区域滚动高度 **/
402
- scrollHeight?: number | string;
403
- /** 骨架屏状态 **/
404
- showSkeleton?: boolean;
405
- /** ProCard 卡片配置 **/
406
- cardProps?: ProTableCardProps['cardProps'];
407
- /** 表格分页器参数 **/
408
- tablePaginationProps?: PaginationProps;
409
- };
410
- export declare type ProTableBindUrlProps = {
411
- /** 翻页器区域 **/
412
- pagination?: boolean;
413
- /** 搜索区域 **/
414
- filters?: boolean;
415
- /** 表格标题过滤器区域 **/
416
- headerFilters?: boolean;
417
- };
418
299
  export {};
@@ -2,12 +2,12 @@
2
2
  * 渲染列的逻辑函数
3
3
  */
4
4
  import React from 'react';
5
- import { ProTableColumnProps, ProTableActionType, ProTableProps } from '../typing';
5
+ import { ProTableColumnProps, ProTableActionType } from '../typing';
6
6
  /**
7
7
  * 增加了 icon 的功能 render title
8
8
  */
9
- export declare const renderColumnsTitle: (item: ProTableColumnProps, actionRef: React.MutableRefObject<ProTableActionType | undefined>, bindUrl?: ProTableProps['bindUrl'], bindUrlProps?: ProTableProps['bindUrlProps']) => JSX.Element;
9
+ export declare const renderColumnsTitle: (item: ProTableColumnProps, actionRef: React.MutableRefObject<ProTableActionType | undefined>) => JSX.Element;
10
10
  /**
11
11
  * 负责单元格的具体渲染
12
12
  */
13
- export declare const renderCell: (value: any, item: ProTableColumnProps, index: number, record: any, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any, dataTeamixSpm?: string) => JSX.Element;
13
+ export declare const renderCell: (value: any, item: ProTableColumnProps, index: number, record: any, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any) => JSX.Element;
@@ -1,56 +1,86 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.renderColumnsTitle = exports.renderCell = void 0;
9
+
8
10
  var _react = _interopRequireDefault(require("react"));
11
+
9
12
  var _utils = require("@teamix/utils");
13
+
10
14
  var _actions = require("../../actions");
15
+
11
16
  var _field = _interopRequireWildcard(require("../../field"));
17
+
12
18
  var _Filter = _interopRequireDefault(require("../components/Filter"));
19
+
13
20
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
21
+
14
22
  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; }
23
+
15
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
25
+
16
26
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
27
+
17
28
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
29
+
18
30
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
31
+
19
32
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
33
+
20
34
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
35
+
21
36
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
37
+
22
38
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
39
+
23
40
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
41
+
24
42
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
43
+
25
44
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
45
+
26
46
  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; }
47
+
27
48
  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; }
49
+
28
50
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
51
+
29
52
  /**
30
53
  * 增加了 icon 的功能 render title
31
54
  */
32
- var renderColumnsTitle = function renderColumnsTitle(item, actionRef, bindUrl, bindUrlProps) {
55
+ var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
33
56
  var filterMode = item.filterMode,
34
- filters = item.filters,
35
- dataSource = item.dataSource,
36
- dataIndex = item.dataIndex,
37
- valueType = item.valueType;
38
- // 为列过滤添加状态标题
57
+ filters = item.filters,
58
+ dataSource = item.dataSource,
59
+ dataIndex = item.dataIndex,
60
+ valueType = item.valueType; // 为列过滤添加状态标题
61
+
39
62
  var getItemLabel = function getItemLabel() {
40
63
  if (filters && filterMode !== 'multiple') {
41
64
  var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2;
65
+
42
66
  var selectedItem = (_actionRef$current$ge = (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$ge2 = _actionRef$current.getState) === null || _actionRef$current$ge2 === void 0 ? void 0 : _actionRef$current$ge2.call(_actionRef$current).filterRules) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {};
67
+
43
68
  if (Object.keys(selectedItem).length > 0) {
44
69
  var _selectedItem$dataInd;
70
+
45
71
  if ((_selectedItem$dataInd = selectedItem[dataIndex]) === null || _selectedItem$dataInd === void 0 ? void 0 : _selectedItem$dataInd.params) {
46
72
  var _targetFilters$find;
73
+
47
74
  // 找到对应的 label
48
75
  var targetFilters = filters !== null && filters !== void 0 ? filters : [];
76
+
49
77
  if (filters === true) {
50
78
  targetFilters = dataSource !== null && dataSource !== void 0 ? dataSource : [];
51
79
  }
80
+
52
81
  var label = (_targetFilters$find = targetFilters.find(function (item) {
53
82
  var _selectedItem$dataInd2;
83
+
54
84
  return item.value === ((_selectedItem$dataInd2 = selectedItem[dataIndex]) === null || _selectedItem$dataInd2 === void 0 ? void 0 : _selectedItem$dataInd2.params);
55
85
  })) === null || _targetFilters$find === void 0 ? void 0 : _targetFilters$find.label;
56
86
  var value = "".concat(item.title, " (").concat(label, ")");
@@ -68,6 +98,7 @@ var renderColumnsTitle = function renderColumnsTitle(item, actionRef, bindUrl, b
68
98
  }
69
99
  }
70
100
  }
101
+
71
102
  return /*#__PURE__*/_react.default.createElement(_field.default, {
72
103
  style: {
73
104
  display: 'inline-flex'
@@ -80,37 +111,40 @@ var renderColumnsTitle = function renderColumnsTitle(item, actionRef, bindUrl, b
80
111
  }
81
112
  });
82
113
  };
114
+
83
115
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_field.LabelIconTip, {
84
116
  label: item.title,
85
117
  tooltip: item.tooltip,
86
118
  icon: item.tooltipIcon
87
119
  }), item.filters && /*#__PURE__*/_react.default.createElement(_Filter.default, {
88
120
  column: item,
89
- actionRef: actionRef,
90
- bindUrl: bindUrl,
91
- bindUrlProps: bindUrlProps
121
+ actionRef: actionRef
92
122
  }));
93
123
  };
94
124
  /**
95
125
  * 负责单元格的具体渲染
96
126
  */
127
+
128
+
97
129
  exports.renderColumnsTitle = renderColumnsTitle;
98
- var renderCell = function renderCell(value, item, index, record, actionRef, /** 接收外部比如 dialog-table 传过来的 context,用于弹窗关闭等 */
99
- context,
100
- // 用于埋点
101
- dataTeamixSpm) {
130
+
131
+ var renderCell = function renderCell(value, item, index, record, actionRef,
132
+ /** 接收外部比如 dialog-table 传过来的 context,用于弹窗关闭等 */
133
+ context) {
102
134
  var _actionSchema$actions;
135
+
103
136
  var _item$valueType = item.valueType,
104
- valueType = _item$valueType === void 0 ? 'text' : _item$valueType,
105
- render = item.render,
106
- actionSchema = item.actionSchema,
107
- dataIndex = item.dataIndex,
108
- format = item.format;
109
- // 如果没传 dataIndex,返回 null
137
+ valueType = _item$valueType === void 0 ? 'text' : _item$valueType,
138
+ render = item.render,
139
+ actionSchema = item.actionSchema,
140
+ dataIndex = item.dataIndex,
141
+ format = item.format; // 如果没传 dataIndex,返回 null
142
+
110
143
  if (!dataIndex) {
111
144
  value = null;
112
- }
113
- // 处理 dataIndex 为数组的情况
145
+ } // 处理 dataIndex 为数组的情况
146
+
147
+
114
148
  if (Array.isArray(dataIndex)) {
115
149
  value = dataIndex.map(function (item) {
116
150
  return (0, _utils.getTargetValue)("{{".concat(item, "}}"), _objectSpread(_objectSpread({}, record), {}, {
@@ -118,16 +152,18 @@ dataTeamixSpm) {
118
152
  }));
119
153
  });
120
154
  }
155
+
121
156
  var newRender = null;
122
157
  var newDataSource = null;
123
- var props = item.props;
124
- // 如果 render 直接传函数
158
+ var props = item.props; // 如果 render 直接传函数
159
+
125
160
  if (typeof render === 'function') {
126
161
  newRender = function newRender() {
127
162
  return render === null || render === void 0 ? void 0 : render(value, index, record);
128
163
  };
129
164
  } else {
130
165
  newRender = processBuriedPoint(processRenderFunction(render, value, index, record), record, value, index);
166
+
131
167
  if (valueType === 'selectGroup') {
132
168
  newRender = _objectSpread(_objectSpread({
133
169
  maxShowNumber: 'auto',
@@ -144,13 +180,15 @@ dataTeamixSpm) {
144
180
  }
145
181
  }, props);
146
182
  }
183
+
147
184
  if ((render === null || render === void 0 ? void 0 : render.type) === 'step') {
148
185
  newRender = _objectSpread(_objectSpread({}, newRender), {}, {
149
186
  ellipsis: false
150
187
  });
151
188
  }
152
- }
153
- // 渲染操作组
189
+ } // 渲染操作组
190
+
191
+
154
192
  if (actionSchema && ((_actionSchema$actions = actionSchema.actions) === null || _actionSchema$actions === void 0 ? void 0 : _actionSchema$actions.length)) {
155
193
  // 默认 context
156
194
  var defaultContext = _objectSpread({
@@ -159,24 +197,28 @@ dataTeamixSpm) {
159
197
  record: record,
160
198
  action: actionRef.current
161
199
  }, context);
200
+
162
201
  return /*#__PURE__*/_react.default.createElement(_actions.ProActionGroup, _objectSpread(_objectSpread({
163
202
  type: "text"
164
203
  }, actionSchema), {}, {
165
- context: _objectSpread(_objectSpread({}, defaultContext), actionSchema.context),
166
- "data-teamix-spm": dataTeamixSpm ? "".concat(dataTeamixSpm, "-columnAction") : undefined
204
+ context: _objectSpread(_objectSpread({}, defaultContext), actionSchema.context)
167
205
  }));
168
- }
169
- // dataSource可传函数
206
+ } // dataSource可传函数
207
+
208
+
170
209
  if (typeof item.dataSource === 'function') {
171
210
  var _item$dataSource;
211
+
172
212
  newDataSource = (_item$dataSource = item.dataSource) === null || _item$dataSource === void 0 ? void 0 : _item$dataSource.call(item, value, index, record);
173
213
  } else {
174
214
  var _item$dataSource2;
215
+
175
216
  newDataSource = ((_item$dataSource2 = item.dataSource) !== null && _item$dataSource2 !== void 0 ? _item$dataSource2 : []).map(function (item) {
176
217
  return Object.fromEntries(Object.entries(item).map(function (_ref) {
177
218
  var _ref2 = _slicedToArray(_ref, 2),
178
- k = _ref2[0],
179
- v = _ref2[1];
219
+ k = _ref2[0],
220
+ v = _ref2[1];
221
+
180
222
  return [k, (0, _utils.getTargetValue)(v, _objectSpread(_objectSpread({}, record), {}, {
181
223
  record: record,
182
224
  value: value,
@@ -184,8 +226,9 @@ dataTeamixSpm) {
184
226
  }))];
185
227
  }));
186
228
  });
187
- }
188
- // 渲染 ProField
229
+ } // 渲染 ProField
230
+
231
+
189
232
  return /*#__PURE__*/_react.default.createElement(_field.default, _objectSpread({
190
233
  type: valueType || 'text',
191
234
  value: value,
@@ -202,7 +245,10 @@ dataTeamixSpm) {
202
245
  * @param record table cell record
203
246
  * @returns
204
247
  */
248
+
249
+
205
250
  exports.renderCell = renderCell;
251
+
206
252
  var processRenderFunction = function processRenderFunction() {
207
253
  var render = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
208
254
  var value = arguments.length > 1 ? arguments[1] : undefined;
@@ -212,20 +258,25 @@ var processRenderFunction = function processRenderFunction() {
212
258
  var external = ['linkOnClick', 'link', 'value', 'renderEdit', 'descriptionRenderEdit', 'editPopConfirmProps', 'descriptionEditPopConfirmProps', 'editOnClick', 'descriptionEditOnClick', 'extra', 'prefixExtra'];
213
259
  return Object.fromEntries(Object.entries(render).map(function (_ref3) {
214
260
  var _ref4 = _slicedToArray(_ref3, 2),
215
- k = _ref4[0],
216
- v = _ref4[1];
261
+ k = _ref4[0],
262
+ v = _ref4[1];
263
+
217
264
  if (typeof v === 'function') {
218
265
  var _v;
266
+
219
267
  if (external.includes(k)) {
220
268
  return [k, function () {
221
269
  for (var _len = arguments.length, others = new Array(_len), _key = 0; _key < _len; _key++) {
222
270
  others[_key] = arguments[_key];
223
271
  }
272
+
224
273
  return v === null || v === void 0 ? void 0 : v.apply(void 0, [value, index, record].concat(others));
225
274
  }];
226
275
  }
276
+
227
277
  return [k, (_v = v === null || v === void 0 ? void 0 : v(value, index, record)) !== null && _v !== void 0 ? _v : ''];
228
278
  }
279
+
229
280
  return [k, v];
230
281
  }));
231
282
  };
@@ -235,18 +286,20 @@ var processRenderFunction = function processRenderFunction() {
235
286
  * @param record table cell record
236
287
  * @returns
237
288
  */
289
+
290
+
238
291
  var processBuriedPoint = function processBuriedPoint() {
239
292
  var render = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
240
293
  var record = arguments.length > 1 ? arguments[1] : undefined;
241
294
  var value = arguments.length > 2 ? arguments[2] : undefined;
242
295
  var index = arguments.length > 3 ? arguments[3] : undefined;
243
- return Object.fromEntries([
244
- // 默认 ellipsis、descriptionEllipsis 为 true
296
+ return Object.fromEntries([// 默认 ellipsis、descriptionEllipsis 为 true
245
297
  // emptyText 默认为 '-'
246
298
  ['ellipsis', true], ['descriptionEllipsis', true], ['emptyText', '-']].concat(_toConsumableArray(Object.entries(render).map(function (_ref5) {
247
299
  var _ref6 = _slicedToArray(_ref5, 2),
248
- k = _ref6[0],
249
- v = _ref6[1];
300
+ k = _ref6[0],
301
+ v = _ref6[1];
302
+
250
303
  return [k, (0, _utils.getTargetValue)(v, _objectSpread(_objectSpread({}, record), {}, {
251
304
  record: record,
252
305
  value: value,
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ProTableColumnProps, ProTableActionType, ProTableProps } from '../typing';
2
+ import { ProTableColumnProps, ProTableActionType } from '../typing';
3
3
  import { ColumnProps } from '@alicloudfe/components/types/table';
4
4
  declare type FixedColumnProps = ColumnProps & {
5
5
  wordBreak?: string;
@@ -9,5 +9,5 @@ declare type FixedColumnProps = ColumnProps & {
9
9
  */
10
10
  export default function genProColumnToColumn(columns: ProTableColumnProps[],
11
11
  /** 是否渲染骨架屏 */
12
- showSkeleton: boolean, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any, dataTeamixSpm?: string, bindUrl?: ProTableProps['bindUrl'], bindUrlProps?: ProTableProps['bindUrlProps']): FixedColumnProps[];
12
+ showSkeleton: boolean, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any): FixedColumnProps[];
13
13
  export {};
@@ -4,33 +4,41 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = genProColumnToColumn;
7
+
7
8
  var _react = _interopRequireDefault(require("react"));
9
+
8
10
  var _columnRender = require("./columnRender");
11
+
9
12
  var _skeleton = require("../../skeleton");
13
+
10
14
  var _utils = require("@teamix/utils");
11
- var _excluded = ["filters", "dataIndex", "children"];
15
+
16
+ var _excluded = ["filters", "dataIndex"];
17
+
12
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+
13
20
  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; }
21
+
14
22
  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; }
23
+
15
24
  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; }
25
+
16
26
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
27
+
17
28
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
29
+
18
30
  /**
19
31
  * ProColumn => Column
20
32
  */
21
- function genProColumnToColumn(columns, /** 是否渲染骨架屏 */
33
+ function genProColumnToColumn(columns,
34
+ /** 是否渲染骨架屏 */
22
35
  showSkeleton, actionRef) {
23
36
  var context = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
24
- var
25
- // 用于埋点
26
- dataTeamixSpm = arguments.length > 4 ? arguments[4] : undefined;
27
- var bindUrl = arguments.length > 5 ? arguments[5] : undefined;
28
- var bindUrlProps = arguments.length > 6 ? arguments[6] : undefined;
29
37
  return columns.map(function (columnProps) {
30
38
  var filters = columnProps.filters,
31
- dataIndex = columnProps.dataIndex,
32
- children = columnProps.children,
33
- others = _objectWithoutProperties(columnProps, _excluded);
39
+ dataIndex = columnProps.dataIndex,
40
+ others = _objectWithoutProperties(columnProps, _excluded);
41
+
34
42
  if (showSkeleton) {
35
43
  return _objectSpread(_objectSpread({}, others), {}, {
36
44
  filters: undefined,
@@ -42,16 +50,16 @@ showSkeleton, actionRef) {
42
50
  }
43
51
  });
44
52
  }
53
+
45
54
  return _objectSpread(_objectSpread({
46
55
  // 金钱样式默认右对齐
47
56
  align: columnProps.valueType === 'money' ? 'right' : 'left',
48
57
  wordBreak: (0, _utils.getLanguage)() === 'en-us' ? 'word' : 'all'
49
58
  }, others), {}, {
50
- children: children ? genProColumnToColumn(children, showSkeleton, actionRef, context) : undefined,
51
59
  dataIndex: dataIndex === null || dataIndex === void 0 ? void 0 : dataIndex.toString(),
52
- title: (0, _columnRender.renderColumnsTitle)(columnProps, actionRef, bindUrl, bindUrlProps),
60
+ title: (0, _columnRender.renderColumnsTitle)(columnProps, actionRef),
53
61
  cell: function cell(value, index, record) {
54
- return (0, _columnRender.renderCell)(value, columnProps, index, record, actionRef, context, dataTeamixSpm);
62
+ return (0, _columnRender.renderCell)(value, columnProps, index, record, actionRef, context);
55
63
  }
56
64
  });
57
65
  });
@@ -4,8 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
+
7
8
  // 返回 Table 属性列表
8
9
  var _default = function _default() {
9
10
  return ['stickyHeader', 'offsetTop', 'affixProps', 'components', 'useVirtual', 'rowHeight', 'maxBodyHeight', 'primaryKey', 'dataSource', 'onBodyScroll', 'openRowKeys', 'defaultOpenRowKeys', 'onRowOpen', 'indent', 'isTree', 'locale', 'expandedRowRender', 'rowExpandable', 'expandedRowIndent', 'hasExpandedRowCtrl', 'getExpandedColProps', 'onExpandedRowClick', 'rowSelection', 'entireDataSource', 'scrollToCol', 'scrollToRow', 'hasHeader', 'fixedHeader', 'prefix', 'defaultPropsConfig', 'errorBoundary', 'pure', 'warning', 'rtl', 'device', 'children', 'popupContainer', 'tableLayout', 'tableWidth', 'style', 'size', 'onRowClick', 'onRowMouseEnter', 'onRowMouseLeave', 'onSort', 'onFilter', 'onResizeChange', 'rowProps', 'cellProps', 'hasBorder', 'isZebra', 'loading', 'loadingComponent', 'filterParams', 'sort', 'sortIcons', 'columns', 'emptyContent', 'lockType', 'wrapperContent', 'refs', 'expandedIndexSimulate', 'crossline', 'lengths'];
10
11
  };
12
+
11
13
  exports.default = _default;