@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
@@ -0,0 +1,371 @@
1
+ /**
2
+ * ProTable 类型定义
3
+ */
4
+ import { ColumnProps, TableProps } from '@alicloudfe/components/types/table';
5
+ import { ProFieldType, ProFieldRenderProps, ProFieldDataSourceItem } from '../field';
6
+ import { QueryFilterProps, ProFormType } from '../form';
7
+ import { ProActionGroupProps, ProActionButtonProps } from '../actions';
8
+ import { PaginationProps } from '@alicloudfe/components/types/pagination';
9
+ import { HeaderProps as ProTableHeaderProps } from '../field';
10
+ import { Method, AxiosRequestConfig } from 'axios';
11
+ import React from 'react';
12
+ import { ProCardProps } from '../card';
13
+ declare type IFieldRenderProps = keyof ProFieldRenderProps;
14
+ /** 列record函数 */
15
+ declare type ProTableCellFunProp = (value: any, index: number, record: any, ...others: any) => any;
16
+ declare type ITableCellRender = {
17
+ [key in IFieldRenderProps]?: ProFieldRenderProps[key] | ProTableCellFunProp;
18
+ } | ((...other: any) => React.ReactNode);
19
+ declare type TDataService = {
20
+ /** 翻页器总数 */
21
+ total?: string | number;
22
+ /** 表格数据 */
23
+ data?: any;
24
+ };
25
+ export declare type responsivePaginationType = 'mini' | 'small' | 'simple' | 'normal';
26
+ export declare type ProTableColumnProps = {
27
+ /**
28
+ * 会在 title 之后展示一个 icon,hover 之后提示一些信息
29
+ */
30
+ tooltip?: string;
31
+ /**
32
+ * title 之后展示一个 icon 设置,可传 TeamixIcon 对应的 type,也可以是自定义 Icon
33
+ */
34
+ tooltipIcon?: React.ReactNode;
35
+ /** 对应 ProField 里面的 type */
36
+ valueType?: ProFieldType;
37
+ /** 是否隐藏表格列,列配置也不显示 */
38
+ hidden?: boolean;
39
+ /** 【列配置】是否默认隐藏表格列,但列配置显示 */
40
+ columnFilters?: boolean;
41
+ /** 【列配置】是否禁用隐藏列 */
42
+ columnFiltersDisabled?: boolean;
43
+ /** 渲染单元格内容字段 */
44
+ render?: ITableCellRender;
45
+ /** 枚举值 */
46
+ dataSource?: ProFieldDataSourceItem[] | ProTableCellFunProp;
47
+ /** 表头的过滤菜单项,当值为 true 时,自动使用 dataSource 生成 */
48
+ filters?: boolean | ProTableColumnsFilterItemProps[];
49
+ /** 表头的过滤菜单项过滤方式 single 单选 multiple 多选 */
50
+ filtersMode?: 'single' | 'multiple';
51
+ /** 表头的过滤菜单项在搜索之前的参数操作 */
52
+ beforeFilter?: (rules: string[]) => string;
53
+ /** 表头的过滤菜单宽度 */
54
+ filtersWidth?: string | number;
55
+ /** 操作组配置 */
56
+ actionSchema?: ProActionGroupProps;
57
+ /** 指定列对应的字段,支持`a.b`形式的快速取值 和 数组取值 */
58
+ dataIndex?: string | string[];
59
+ /** 指定 valueType 为日期时间格式时,可以格式化日期时间 */
60
+ format?: string;
61
+ /** ProField 其他配置项 */
62
+ props?: any;
63
+ } & Omit<ColumnProps, 'filters' | 'dataIndex' | 'filtersMode'>;
64
+ export declare type ProColumnProps = ProTableColumnProps;
65
+ export declare type ProTableProps = {
66
+ /** ProColums 定义,取代 Table 的 columns */
67
+ columns: ProTableColumnProps[];
68
+ /** 请求地址 */
69
+ url?: string;
70
+ /** 请求方法 */
71
+ method?: Method;
72
+ /** 请求参数 */
73
+ params?: {
74
+ [propName: string]: any;
75
+ };
76
+ /** sort 排序请求参数处理函数 */
77
+ formatSort?: (sort: object) => object;
78
+ /** 如需自定义调用参数格式,则可以设定此值在请求前对 params 进行自定义,如果返回false则可以阻止请求 */
79
+ formatParams?: (params: any) => typeof params;
80
+ /** 对返回值的 data,total 进行映射处理 */
81
+ formatResult?: TDataService | ((res: any) => TDataService);
82
+ /** 请求成功后经过 formatResult 转换后的回调 */
83
+ onFormatResult?: (data: any[]) => void;
84
+ /** 是否第一次加载时就发起请求 */
85
+ requestWhenMount?: boolean;
86
+ /** 内部请求每次成功后的回调 */
87
+ onSuccess?: (res: any) => void;
88
+ /** 内部请求失败时的回调 */
89
+ onError?: (error: Error) => void;
90
+ /** 自定义的请求配置 */
91
+ requestConfig?: AxiosRequestConfig;
92
+ /** 翻页页数的请求参数名 */
93
+ pageKey?: string;
94
+ /** 翻页器页数对应字段 */
95
+ pageSizeKey?: string;
96
+ /** 翻页器每页显示的条数 */
97
+ pageSize?: number;
98
+ /** 每页显示选择器可选值 */
99
+ pageSizeList?: PaginationProps['pageSizeList'];
100
+ /** 透传给翻页器的属性 */
101
+ paginationProps?: PaginationProps;
102
+ /** 是否显示翻页器 */
103
+ showPagination?: boolean;
104
+ /** 手动指定响应式翻页器的 type */
105
+ responsivePaginationType?: responsivePaginationType;
106
+ /** 是否使用内置的 rowSelection */
107
+ useRowSelection?: boolean;
108
+ /** 内置 rowSelection 变化时的回调 */
109
+ onChangeRowSelection?: (selectedRowKeys: string[]) => void;
110
+ /** 获取内置 rowSelection */
111
+ getRowSelection?: (rowSelection: innerRowSelectionType) => void;
112
+ /** 表格底部(左侧)配置 */
113
+ footerAction?: ProActionGroupProps | React.ReactNode;
114
+ /** 表格底部(右层)配置 */
115
+ footer?: React.ReactNode;
116
+ /**
117
+ * @deprecated 已废弃 建议用 dataFilter 中的 filterDebounce 代替
118
+ * 筛选区自动搜索的防抖时间(毫秒)
119
+ */
120
+ filterDebounce?: number;
121
+ /** ProTable action 的引用,便于手动触发一些方法 */
122
+ actionRef?: React.MutableRefObject<ProTableActionType | undefined>;
123
+ /** 是否首次加载渲染骨架屏 */
124
+ showSkeleton?: boolean;
125
+ /** 渲染骨架屏条数 */
126
+ skeletonSize?: number;
127
+ /** 表格主题 className */
128
+ tableClassName?: string;
129
+ /** 非全屏模式下是否吸底 默认状态下取用 ProPageContainer 作为参照物。如果传入了 Dom,则取用 Dom 作为参照物 */
130
+ footerSuction?: boolean | Element;
131
+ /** 当满足条件时开启自动刷新,返回值为自动刷新间隔时间,如果返回 0 或 false 则停止自动刷新,每次触发翻页、搜索都将重置时间 */
132
+ autoRefresh?: (dataSource: any[]) => number | boolean;
133
+ /** 自定义请求方法,必需返回 success,data 字段,如果需要手动分页 total 也是必需的 */
134
+ customRequest?: (params: any) => Promise<{
135
+ success: boolean;
136
+ data: any[];
137
+ total?: number;
138
+ }>;
139
+ /** 翻页时是否保留之前批量选择数据 */
140
+ reserveSelectedRecords?: boolean;
141
+ /** 默认漏斗过滤条件 */
142
+ defaultFilterParams?: {
143
+ [key: string]: any[] | any;
144
+ };
145
+ /** 禁用掉批量选择中的全选 */
146
+ disableSelectAll?: boolean;
147
+ /** 接收外部传来的 context,eg: dialog-table */
148
+ context?: any;
149
+ /** 是否固定表格主体(开启后横向滚动条会固定在底部) */
150
+ fixedTableBody?: boolean;
151
+ /** 用于埋点 */
152
+ 'data-teamix-spm'?: string;
153
+ /** 是否切换卡片视角 **/
154
+ switchCardView?: boolean;
155
+ /** 卡片视角配置 **/
156
+ cardViewProps?: ProTableCardProps;
157
+ /** 默认展示维度 **/
158
+ defaultView?: 'table' | 'card';
159
+ } & Omit<TableProps, 'columns'> & ProTableTopAreaProps;
160
+ export declare type rowSelectionType = {
161
+ getProps?: (record: any, index: number) => any;
162
+ onChange?: (selectedRowKeys: Array<any>, records: Array<any>) => void;
163
+ onSelect?: (selected: boolean, record: any, records: Array<any>) => void;
164
+ onSelectAll?: (selected: boolean, records: Array<any>) => void;
165
+ selectedRowKeys?: Array<any>;
166
+ selectedRecords?: any[];
167
+ mode?: 'single' | 'multiple';
168
+ titleProps?: () => any;
169
+ columnProps?: () => any;
170
+ titleAddons?: () => any;
171
+ };
172
+ export declare type innerRowSelectionType = {
173
+ rowSelection: rowSelectionType;
174
+ selectedRowKeys: string[];
175
+ setSelectedRowKeys: (selectedRowKeys: string[]) => void;
176
+ selectedRecords: any[];
177
+ setSelectedRecords: (selectedRecords: any[]) => void;
178
+ };
179
+ export declare type ProTableActionType = {
180
+ /** 全屏展示 */
181
+ fullScreen?: () => boolean;
182
+ /** 设置显示列 */
183
+ setColumn?: (newColumns: ProColumnProps[], update?: boolean) => void;
184
+ /** 表格尺寸 */
185
+ size?: 'small' | 'medium';
186
+ /** 设置表格大小 */
187
+ setSize?: (mode: 'small' | 'medium') => void;
188
+ /** 刷新表格 */
189
+ refresh?: (params?: any) => void;
190
+ /*** 表格内部请求方法 */
191
+ request?: (params?: any) => void;
192
+ /** 重置表格 */
193
+ reset?: () => void;
194
+ /** 表格选择相关属性 */
195
+ rowSelection?: innerRowSelectionType | rowSelectionType;
196
+ /** 清空表格选择 */
197
+ clearRowSelection?: () => void;
198
+ /** 过滤 DataSource */
199
+ filterDataSource?: (dataIndex: string) => void;
200
+ /** 翻页器当前信息 */
201
+ pageInfo?: {
202
+ /** 总数 */
203
+ total?: number;
204
+ /** 当前页 */
205
+ current?: number;
206
+ /** 每页数据量 */
207
+ pageSize?: number;
208
+ /** 翻页页数的请求参数名*/
209
+ targetPageKey?: string;
210
+ /** 翻页单页数量的请求参数名 */
211
+ targetPageSizeKey?: string;
212
+ };
213
+ /** 重置翻页器为1,不发送请求 */
214
+ resetPage?: () => void;
215
+ nextPage?: () => void;
216
+ /** 获取数据过滤区表单实例 */
217
+ dataFilterForm?: ProFormType;
218
+ /** 用于在 mount 的时候获取到表单 ref */
219
+ dataFilterFormRef?: React.MutableRefObject<ProFormType>;
220
+ normalDataFilterForm?: ProFormType;
221
+ fullscreenDataFilterForm?: ProFormType;
222
+ filterEnableRef?: any;
223
+ /** 表格当前的数据 */
224
+ data?: any[];
225
+ /** 切换视角 **/
226
+ switchView?: (view: 'card' | 'table') => void;
227
+ /** 设置数据源 **/
228
+ setData?: (data: any[]) => void;
229
+ setCardViewScrollPosition?: (scrollTop: number) => void;
230
+ } & ProTableActionTypeMutations;
231
+ /** action State 定义 */
232
+ export declare type ProTableActionTypeMutations = {
233
+ /** 获取state 状态 */
234
+ getState?: () => ProTableActionTypeState;
235
+ /** 设置state 状态 */
236
+ setState?: (key: string, value: any) => void;
237
+ /** 设置全屏状态 */
238
+ setFullScreenState?: (state: boolean) => void;
239
+ /** 绑定state监听事件 */
240
+ on?: (...args: any) => void;
241
+ /** 销毁监听事件 */
242
+ off?: (...args: any) => void;
243
+ /** 设置 列 过滤规则 */
244
+ setFilterRules?: (rules: ProTableColumnsFilterRulesItem) => void;
245
+ /** 获取 列 过滤规则 */
246
+ getFilterRules?: () => object;
247
+ /** 重新计算表格maxHeight高度 */
248
+ resetTableMaxBodyHeight?: (offset: number) => void;
249
+ /** 列筛选规则 */
250
+ filterColumns?: any[];
251
+ /** 获取所有 on 监听事件 */
252
+ getCallback?: () => any;
253
+ };
254
+ /** action Mutations 定义 */
255
+ export declare type ProTableActionTypeState = {
256
+ fullScreenState: boolean;
257
+ filterRules: ProTableColumnsFilterRulesItem;
258
+ filterColumns: ProTableColumnProps[];
259
+ [key: string]: any;
260
+ };
261
+ export declare type ProTableDataFilterProps = {
262
+ searchUndefined?: boolean;
263
+ /** 搜索时是否传入值为空字符串的参数,默认不传 */
264
+ searchEmptyString?: boolean;
265
+ /** 自定义内容 */
266
+ content?: React.ReactNode;
267
+ } & QueryFilterProps;
268
+ export declare type dataFilterProps = ProTableDataFilterProps;
269
+ export declare type ProTableTopAreaProps = {
270
+ /** 标题区 */
271
+ header?: ProTableHeaderProps;
272
+ /** 主操作区 */
273
+ mainAction?: ProActionGroupProps | React.ReactNode;
274
+ /** 工具栏区 */
275
+ toolBar?: boolean | ProTableToolBarItem[];
276
+ /** 是否开启工具栏自适应 */
277
+ toolBarAutoWidth?: boolean;
278
+ /** 快捷操作区 */
279
+ extra?: ProActionButtonProps | React.ReactNode | React.ReactNode[];
280
+ /** 数据过滤区 */
281
+ dataFilter?: ProTableDataFilterProps;
282
+ /** 数据过滤区下方自定义区域 */
283
+ afterDataFilter?: React.ReactNode;
284
+ /** 传给 QueryFilter 的 formRef */
285
+ dataFilterFormRef?: any;
286
+ /** 排序、筛选列展示状态 */
287
+ filterColumnType?: 'dialog' | 'dropdown' | 'auto';
288
+ };
289
+ /** 单个工具栏 */
290
+ export declare type ProTableToolBarItem = React.ReactNode | 'refresh' | 'density' | 'filterColumn' | 'fullscreen';
291
+ export declare type toolBarItem = ProTableToolBarItem;
292
+ export declare type ProTableLayoutProps = {
293
+ actionRef: React.MutableRefObject<ProTableActionType | undefined>;
294
+ columns?: ProTableColumnProps[];
295
+ rowSelection?: innerRowSelectionType | rowSelectionType;
296
+ fullScreenState?: boolean;
297
+ dataTeamixSpm?: string;
298
+ switchCardView?: boolean;
299
+ defaultView?: 'table' | 'card';
300
+ } & ProTableTopAreaProps;
301
+ /** columns 列过滤 */
302
+ export declare type ProTableColumnsFilterItemProps = {
303
+ /** 绑定值 */
304
+ value?: string | boolean | number;
305
+ /** 显示值 */
306
+ label?: React.ReactNode;
307
+ };
308
+ /** columns 列过滤规则 item (action ref state用) */
309
+ export declare type ProTableColumnsFilterRulesItem = {
310
+ [key: string]: {
311
+ /** 原始规则 */
312
+ rules: string[];
313
+ /** 处理过后的作为params的规则 */
314
+ params: string;
315
+ };
316
+ };
317
+ /** 非全屏模式下的吸底 useState类型定义 */
318
+ export declare type parentPositionProps = {
319
+ offsetLeft: number;
320
+ offsetRight: number;
321
+ };
322
+ /** card props **/
323
+ export declare type ProTableCardProps = {
324
+ /** 标题 dataIndex **/
325
+ title?: (ProTableColumnProps['dataIndex'] | ProTableColumnProps) | ((index: number, record: any) => ProTableColumnProps['dataIndex'] | ProTableColumnProps);
326
+ /** 副标题 dataIndex **/
327
+ subTitle?: (ProTableColumnProps['dataIndex'] | ProTableColumnProps) | ((index: number, record: any) => ProTableColumnProps['dataIndex'] | ProTableColumnProps);
328
+ /** 内容区域 dataIndex **/
329
+ content?: (ProTableColumnProps['dataIndex'] | ProTableColumnProps)[] | ((index: number, record: any) => (ProTableColumnProps['dataIndex'] | ProTableColumnProps)[]);
330
+ /** extra 区域 **/
331
+ extra?: (ProActionGroupProps | React.ReactNode | ProTableColumnProps['dataIndex'])[] | ((index: number, record: any) => (ProActionGroupProps | React.ReactNode | ProTableColumnProps['dataIndex'])[]);
332
+ /** 标签区域 **/
333
+ tags?: (ProTableColumnProps['dataIndex'] | ProTableColumnProps)[] | ((index: number, record: any) => (ProTableColumnProps['dataIndex'] | ProTableColumnProps)[]);
334
+ /** 分页器条数 **/
335
+ pageSize?: 12 | 24 | 48 | 96 | number;
336
+ /** 卡片区域滚动高度 **/
337
+ scrollHeight?: number | string;
338
+ /** 自动加载下一页 **/
339
+ autoLoadNextPage?: boolean;
340
+ /** 滚动容器 用于监听触底事件 **/
341
+ scrollDom?: HTMLElement;
342
+ /** 触底事件 **/
343
+ onScrollBottom?: () => void;
344
+ /** 卡片配置 **/
345
+ cardProps?: {
346
+ [key in keyof ProCardProps]?: ProCardProps[key] | ((index: number, record: any) => ProCardProps[key]);
347
+ };
348
+ };
349
+ /** card 视角 Props (内部组件) **/
350
+ export declare type ProTableCardViewProps = {
351
+ /** 卡片视角配置 **/
352
+ cardViewProps?: ProTableCardProps;
353
+ /** 数据源 **/
354
+ dataSource?: any[];
355
+ /** 原始 columns **/
356
+ originColumns?: any[];
357
+ /** 处理过后的 columns **/
358
+ columns?: any[];
359
+ /** 加载动画 **/
360
+ loading?: boolean;
361
+ /** 上下文 **/
362
+ context?: any;
363
+ actionRef?: React.MutableRefObject<ProTableActionType | undefined>;
364
+ /** 卡片区域滚动高度 **/
365
+ scrollHeight?: number | string;
366
+ /** 骨架屏状态 **/
367
+ showSkeleton?: boolean;
368
+ /** ProCard 卡片配置 **/
369
+ cardProps?: ProTableCardProps['cardProps'];
370
+ };
371
+ export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * 渲染列的逻辑函数
3
+ */
4
+ import React from 'react';
5
+ import { ProTableColumnProps, ProTableActionType } from '../typing';
6
+ /**
7
+ * 增加了 icon 的功能 render title
8
+ */
9
+ export declare const renderColumnsTitle: (item: ProTableColumnProps, actionRef: React.MutableRefObject<ProTableActionType | undefined>) => JSX.Element;
10
+ /**
11
+ * 负责单元格的具体渲染
12
+ */
13
+ export declare const renderCell: (value: any, item: ProTableColumnProps, index: number, record: any, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any, dataTeamixSpm?: string | undefined) => JSX.Element;
@@ -18,8 +18,6 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
18
18
 
19
19
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
20
20
 
21
- 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); }
22
-
23
21
  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; }
24
22
 
25
23
  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; }
@@ -52,24 +50,22 @@ export var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
52
50
  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 : {};
53
51
 
54
52
  if (Object.keys(selectedItem).length > 0) {
55
- var _selectedItem;
53
+ var _selectedItem$dataInd;
56
54
 
57
- if ((_selectedItem = selectedItem[dataIndex]) === null || _selectedItem === void 0 ? void 0 : _selectedItem.params) {
58
- var _ref, _targetFilters$find;
55
+ if ((_selectedItem$dataInd = selectedItem[dataIndex]) === null || _selectedItem$dataInd === void 0 ? void 0 : _selectedItem$dataInd.params) {
56
+ var _targetFilters$find;
59
57
 
60
58
  // 找到对应的 label
61
- var targetFilters = (_ref = filters) !== null && _ref !== void 0 ? _ref : [];
59
+ var targetFilters = filters !== null && filters !== void 0 ? filters : [];
62
60
 
63
61
  if (filters === true) {
64
- var _ref2;
65
-
66
- targetFilters = (_ref2 = dataSource) !== null && _ref2 !== void 0 ? _ref2 : [];
62
+ targetFilters = dataSource !== null && dataSource !== void 0 ? dataSource : [];
67
63
  }
68
64
 
69
65
  var label = (_targetFilters$find = targetFilters.find(function (item) {
70
- var _selectedItem2;
66
+ var _selectedItem$dataInd2;
71
67
 
72
- return item.value === ((_selectedItem2 = selectedItem[dataIndex]) === null || _selectedItem2 === void 0 ? void 0 : _selectedItem2.params);
68
+ return item.value === ((_selectedItem$dataInd2 = selectedItem[dataIndex]) === null || _selectedItem$dataInd2 === void 0 ? void 0 : _selectedItem$dataInd2.params);
73
69
  })) === null || _targetFilters$find === void 0 ? void 0 : _targetFilters$find.label;
74
70
  var value = "".concat(item.title, " (").concat(label, ")");
75
71
  return /*#__PURE__*/React.createElement(ProField, {
@@ -113,7 +109,10 @@ export var renderColumnsTitle = function renderColumnsTitle(item, actionRef) {
113
109
  * 负责单元格的具体渲染
114
110
  */
115
111
 
116
- export var renderCell = function renderCell(value, item, index, record, actionRef, context) {
112
+ export var renderCell = function renderCell(value, item, index, record, actionRef,
113
+ /** 接收外部比如 dialog-table 传过来的 context,用于弹窗关闭等 */
114
+ context, // 用于埋点
115
+ dataTeamixSpm) {
117
116
  var _actionSchema$actions;
118
117
 
119
118
  var _item$valueType = item.valueType,
@@ -181,10 +180,11 @@ export var renderCell = function renderCell(value, item, index, record, actionRe
181
180
  action: actionRef.current
182
181
  }, context);
183
182
 
184
- return /*#__PURE__*/React.createElement(ProActionGroup, _extends({
183
+ return /*#__PURE__*/React.createElement(ProActionGroup, _objectSpread(_objectSpread({
185
184
  type: "text"
186
- }, actionSchema, {
187
- context: _objectSpread(_objectSpread({}, defaultContext), actionSchema.context)
185
+ }, actionSchema), {}, {
186
+ context: _objectSpread(_objectSpread({}, defaultContext), actionSchema.context),
187
+ "data-teamix-spm": dataTeamixSpm ? "".concat(dataTeamixSpm, "-columnAction") : undefined
188
188
  }));
189
189
  } // dataSource可传函数
190
190
 
@@ -197,10 +197,10 @@ export var renderCell = function renderCell(value, item, index, record, actionRe
197
197
  var _item$dataSource2;
198
198
 
199
199
  newDataSource = ((_item$dataSource2 = item.dataSource) !== null && _item$dataSource2 !== void 0 ? _item$dataSource2 : []).map(function (item) {
200
- return Object.fromEntries(Object.entries(item).map(function (_ref3) {
201
- var _ref4 = _slicedToArray(_ref3, 2),
202
- k = _ref4[0],
203
- v = _ref4[1];
200
+ return Object.fromEntries(Object.entries(item).map(function (_ref) {
201
+ var _ref2 = _slicedToArray(_ref, 2),
202
+ k = _ref2[0],
203
+ v = _ref2[1];
204
204
 
205
205
  return [k, getTargetValue(v, _objectSpread(_objectSpread({}, record), {}, {
206
206
  record: record,
@@ -212,7 +212,7 @@ export var renderCell = function renderCell(value, item, index, record, actionRe
212
212
  } // 渲染 ProField
213
213
 
214
214
 
215
- return /*#__PURE__*/React.createElement(ProField, _extends({
215
+ return /*#__PURE__*/React.createElement(ProField, _objectSpread({
216
216
  type: valueType || 'text',
217
217
  value: value,
218
218
  render: newRender,
@@ -236,10 +236,10 @@ var processRenderFunction = function processRenderFunction() {
236
236
  var record = arguments.length > 3 ? arguments[3] : undefined;
237
237
  // 当 ProField render 类型为 function 时。需要表格预先处理以塞入 record
238
238
  var external = ['linkOnClick', 'link', 'value', 'renderEdit', 'descriptionRenderEdit', 'editPopConfirmProps', 'descriptionEditPopConfirmProps', 'editOnClick', 'descriptionEditOnClick', 'extra', 'prefixExtra'];
239
- return Object.fromEntries(Object.entries(render).map(function (_ref5) {
240
- var _ref6 = _slicedToArray(_ref5, 2),
241
- k = _ref6[0],
242
- v = _ref6[1];
239
+ return Object.fromEntries(Object.entries(render).map(function (_ref3) {
240
+ var _ref4 = _slicedToArray(_ref3, 2),
241
+ k = _ref4[0],
242
+ v = _ref4[1];
243
243
 
244
244
  if (typeof v === 'function') {
245
245
  var _v;
@@ -275,10 +275,10 @@ var processBuriedPoint = function processBuriedPoint() {
275
275
  var index = arguments.length > 3 ? arguments[3] : undefined;
276
276
  return Object.fromEntries([// 默认 ellipsis、descriptionEllipsis 为 true
277
277
  // emptyText 默认为 '-'
278
- ['ellipsis', true], ['descriptionEllipsis', true], ['emptyText', '-']].concat(_toConsumableArray(Object.entries(render).map(function (_ref7) {
279
- var _ref8 = _slicedToArray(_ref7, 2),
280
- k = _ref8[0],
281
- v = _ref8[1];
278
+ ['ellipsis', true], ['descriptionEllipsis', true], ['emptyText', '-']].concat(_toConsumableArray(Object.entries(render).map(function (_ref5) {
279
+ var _ref6 = _slicedToArray(_ref5, 2),
280
+ k = _ref6[0],
281
+ v = _ref6[1];
282
282
 
283
283
  return [k, getTargetValue(v, _objectSpread(_objectSpread({}, record), {}, {
284
284
  record: record,
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { ProTableColumnProps, ProTableActionType } from '../typing';
3
+ import { ColumnProps } from '@alicloudfe/components/types/table';
4
+ declare type FixedColumnProps = ColumnProps & {
5
+ wordBreak?: string;
6
+ };
7
+ /**
8
+ * ProColumn => Column
9
+ */
10
+ export default function genProColumnToColumn(columns: ProTableColumnProps[],
11
+ /** 是否渲染骨架屏 */
12
+ showSkeleton: boolean, actionRef: React.MutableRefObject<ProTableActionType | undefined>, context?: any, dataTeamixSpm?: string): FixedColumnProps[];
13
+ export {};
@@ -14,14 +14,16 @@ import React from 'react';
14
14
  import { renderColumnsTitle, renderCell } from './columnRender';
15
15
  import { ProSkeletonRaw as Skeleton } from '../../skeleton';
16
16
  import { getLanguage } from '@teamix/utils';
17
-
18
17
  /**
19
18
  * ProColumn => Column
20
19
  */
20
+
21
21
  export default function genProColumnToColumn(columns,
22
22
  /** 是否渲染骨架屏 */
23
23
  showSkeleton, actionRef) {
24
24
  var context = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
25
+ var // 用于埋点
26
+ dataTeamixSpm = arguments.length > 4 ? arguments[4] : undefined;
25
27
  return columns.map(function (columnProps) {
26
28
  var filters = columnProps.filters,
27
29
  dataIndex = columnProps.dataIndex,
@@ -47,7 +49,7 @@ showSkeleton, actionRef) {
47
49
  dataIndex: dataIndex === null || dataIndex === void 0 ? void 0 : dataIndex.toString(),
48
50
  title: renderColumnsTitle(columnProps, actionRef),
49
51
  cell: function cell(value, index, record) {
50
- return renderCell(value, columnProps, index, record, actionRef, context);
52
+ return renderCell(value, columnProps, index, record, actionRef, context, dataTeamixSpm);
51
53
  }
52
54
  });
53
55
  });
@@ -0,0 +1,2 @@
1
+ declare const _default: () => string[];
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { TableProps } from '@alicloudfe/components/types/table';
2
+ declare const _default: () => TableProps['sortIcons'];
3
+ export default _default;
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { ProTableActionType } from '../typing';
3
+ import { ProTableProps, ProTableColumnProps } from '..';
4
+ export declare function actionRefUseStateOn(callback: any, state: string, ...args: any): void;
5
+ /** table 组件内监听 不对外暴露 */
6
+ export declare function on(fun: any, key: string): void;
7
+ /** table 组件内销毁监听 不对外暴露 */
8
+ export declare function off(key: string): void;
9
+ /** table 组件内触发事件 不对外暴露 */
10
+ export declare function emit(key: string, ...args: any): void;
11
+ export declare function initActionRef(ref: React.MutableRefObject<ProTableActionType | undefined>, action: ProTableActionType): void;
12
+ export declare function useActionType<T>(ref: React.MutableRefObject<ProTableActionType | undefined>, action: ProTableActionType): void;
13
+ export declare function cloneDeep<T>(obj: T): T;
14
+ /**
15
+ * 处理默认过滤参数
16
+ * @param columns
17
+ * @param ref
18
+ */
19
+ export declare function processDefaultFilter(columns: ProTableColumnProps[], ref: React.MutableRefObject<ProTableActionType | undefined>, defaultFilterParams: ProTableProps['defaultFilterParams']): void;
@@ -16,8 +16,8 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
16
16
 
17
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
18
 
19
- import cloneDeepLodash from 'lodash.clonedeep';
20
- // 所有 ProTable 组件公用一套组件内事件转发机制
19
+ import cloneDeepLodash from 'lodash.clonedeep'; // 所有 ProTable 组件公用一套组件内事件转发机制
20
+
21
21
  var tableCallback = {}; // 组件内对全局状态的更改
22
22
 
23
23
  var getMutations = function getMutations(actionRef) {
@@ -0,0 +1,9 @@
1
+ import { ProTableColumnProps } from '../typing';
2
+ /**
3
+ * 增加了 icon 的功能 render title
4
+ */
5
+ export declare const renderColumnsTitle: (item: ProTableColumnProps) => JSX.Element;
6
+ /**
7
+ * 负责单元格的具体渲染
8
+ */
9
+ export declare const renderCell: (value: any, item: ProTableColumnProps, index: number, record: any) => JSX.Element;
@@ -6,8 +6,6 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
6
6
 
7
7
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
8
8
 
9
- 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); }
10
-
11
9
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
10
 
13
11
  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."); }
@@ -32,10 +30,10 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
32
30
  import React from 'react';
33
31
  import { getTargetValue } from '@teamix/utils';
34
32
  import ProField, { LabelIconTip } from '../../field';
35
-
36
33
  /**
37
34
  * 增加了 icon 的功能 render title
38
35
  */
36
+
39
37
  export var renderColumnsTitle = function renderColumnsTitle(item) {
40
38
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelIconTip, {
41
39
  label: item.title,
@@ -126,7 +124,7 @@ export var renderCell = function renderCell(value, item, index, record) {
126
124
  } // 渲染 ProField
127
125
 
128
126
 
129
- return /*#__PURE__*/React.createElement(ProField, _extends({
127
+ return /*#__PURE__*/React.createElement(ProField, _objectSpread({
130
128
  type: valueType || 'text',
131
129
  value: value,
132
130
  render: newRender,
@@ -0,0 +1,7 @@
1
+ import { ProTableColumnProps } from '../typing';
2
+ import { ColumnProps } from '@alicloudfe/components/types/table';
3
+ /**
4
+ * ProColumn => Column,去掉操作列,过滤器相关逻辑
5
+ * 用于非 ProTable 比如 selectTable
6
+ */
7
+ export default function genProColumnToColumn(columns: ProTableColumnProps[]): ColumnProps[];
@@ -11,11 +11,11 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
11
11
  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; }
12
12
 
13
13
  import { renderColumnsTitle, renderCell } from './pureColumnRender';
14
-
15
14
  /**
16
15
  * ProColumn => Column,去掉操作列,过滤器相关逻辑
17
16
  * 用于非 ProTable 比如 selectTable
18
17
  */
18
+
19
19
  export default function genProColumnToColumn(columns) {
20
20
  return columns.map(function (columnProps) {
21
21
  var filters = columnProps.filters,
@@ -0,0 +1,3 @@
1
+ import { rowSelectionType, innerRowSelectionType } from '../typing';
2
+ declare function useTableSelection(config?: rowSelectionType, primaryKey?: string): innerRowSelectionType;
3
+ export default useTableSelection;
@@ -0,0 +1,2 @@
1
+ import './index.scss';
2
+ export declare const DetailPage: () => JSX.Element;