@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
package/es/index.d.ts CHANGED
@@ -28,5 +28,5 @@ export * from './table';
28
28
  export * from './sidebar';
29
29
  export * from './utils';
30
30
  export * from './timeline';
31
- declare const version = "1.5.18";
31
+ declare const version = "1.4.25-bugfix.3";
32
32
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils, };
package/es/index.js CHANGED
@@ -1,11 +1,12 @@
1
1
  var _window;
2
+
2
3
  import ProAction from './actions';
3
4
  import ProCard from './card';
4
5
  import ProField from './field';
5
6
  import ProForm from './form';
6
7
  import hooks from './hooks';
7
- import ProInfo from './info';
8
- // import ProLayout from './layout';
8
+ import ProInfo from './info'; // import ProLayout from './layout';
9
+
9
10
  import ProPageContainer from './page-container';
10
11
  import ProPageHeader from './page-header';
11
12
  import ProTable from './table';
@@ -16,12 +17,12 @@ import { ProTimeline } from './timeline';
16
17
  import * as nocode from './nocode';
17
18
  import * as templates from './templates';
18
19
  import TeamixIcon from '@teamix/icon';
19
- import './global.scss';
20
- // 设置图标源
21
- // @ts-ignore
20
+ import './global.scss'; // 设置图标源
21
+
22
22
  if (!((_window = window) === null || _window === void 0 ? void 0 : _window.TEAMIXPRO_WITHOUT_ICON)) {
23
23
  TeamixIcon.setConfig(utils.getTeamixIconConfig());
24
24
  }
25
+
25
26
  export * from './actions';
26
27
  export * from './card';
27
28
  export * from './field';
@@ -35,17 +36,6 @@ export * from './table';
35
36
  export * from './sidebar';
36
37
  export * from './utils';
37
38
  export * from './timeline';
38
- var version = '1.5.18';
39
- // By TeamixTest
40
- window.postMessage({
41
- source: 'teamix-test-devtools',
42
- url: window.location.href,
43
- event: 'getModuleInfo',
44
- moduleName: '@teamix/pro',
45
- moduleVersion: version,
46
- moduleType: 'TeamixPro',
47
- componentName: 'TeamixPro'
48
- }, '*');
49
- export { version, ProAction, ProCard, ProField, ProForm, ProInfo,
50
- // ProLayout,
39
+ var version = '1.4.25-bugfix.3';
40
+ export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
51
41
  ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, TeamixIcon, hooks, nocode, templates, utils };
@@ -1,41 +1,50 @@
1
1
  var _excluded = ["children", "url", "method", "params", "formatResult", "onSuccess", "onError", "formatParams", "beforeRequest", "extendParams", "className", "compacted", "divider", "style", "backgroundColor", "context"];
2
+
2
3
  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; }
4
+
3
5
  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; }
6
+
4
7
  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; }
8
+
5
9
  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; }
10
+
6
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
+
7
13
  import React, { isValidElement, useRef } from 'react';
8
14
  import { ProInfoGroupContext } from '../../utils';
9
15
  import { useSize } from '@teamix/hooks';
10
16
  import './index.scss';
11
17
  import cls from 'classnames';
12
18
  import ProInfo from '../..';
19
+
13
20
  var ProInfoGroup = function ProInfoGroup(props) {
14
21
  var children = props.children,
15
- url = props.url,
16
- method = props.method,
17
- params = props.params,
18
- formatResult = props.formatResult,
19
- onSuccess = props.onSuccess,
20
- onError = props.onError,
21
- formatParams = props.formatParams,
22
- beforeRequest = props.beforeRequest,
23
- extendParams = props.extendParams,
24
- _props$className = props.className,
25
- className = _props$className === void 0 ? '' : _props$className,
26
- _props$compacted = props.compacted,
27
- compacted = _props$compacted === void 0 ? true : _props$compacted,
28
- _props$divider = props.divider,
29
- divider = _props$divider === void 0 ? true : _props$divider,
30
- style = props.style,
31
- _props$backgroundColo = props.backgroundColor,
32
- backgroundColor = _props$backgroundColo === void 0 ? '' : _props$backgroundColo,
33
- _props$context = props.context,
34
- context = _props$context === void 0 ? {} : _props$context,
35
- others = _objectWithoutProperties(props, _excluded);
22
+ url = props.url,
23
+ method = props.method,
24
+ params = props.params,
25
+ formatResult = props.formatResult,
26
+ onSuccess = props.onSuccess,
27
+ onError = props.onError,
28
+ formatParams = props.formatParams,
29
+ beforeRequest = props.beforeRequest,
30
+ extendParams = props.extendParams,
31
+ _props$className = props.className,
32
+ className = _props$className === void 0 ? '' : _props$className,
33
+ _props$compacted = props.compacted,
34
+ compacted = _props$compacted === void 0 ? true : _props$compacted,
35
+ _props$divider = props.divider,
36
+ divider = _props$divider === void 0 ? true : _props$divider,
37
+ style = props.style,
38
+ _props$backgroundColo = props.backgroundColor,
39
+ backgroundColor = _props$backgroundColo === void 0 ? '' : _props$backgroundColo,
40
+ _props$context = props.context,
41
+ context = _props$context === void 0 ? {} : _props$context,
42
+ others = _objectWithoutProperties(props, _excluded);
43
+
36
44
  var ref = useRef();
37
45
  var size = useSize(ref);
38
46
  var infoType = 'infoDom';
47
+
39
48
  if (Array.isArray(children)) {
40
49
  if ( /*#__PURE__*/isValidElement(children === null || children === void 0 ? void 0 : children[0])) {
41
50
  infoType = 'infoDomGroup';
@@ -43,6 +52,7 @@ var ProInfoGroup = function ProInfoGroup(props) {
43
52
  infoType = 'infoPropsGroup';
44
53
  }
45
54
  }
55
+
46
56
  var providerValue = {
47
57
  visible: true,
48
58
  size: size,
@@ -83,4 +93,5 @@ var ProInfoGroup = function ProInfoGroup(props) {
83
93
  className: proInfoClassName
84
94
  }, children)));
85
95
  };
96
+
86
97
  export default ProInfoGroup;
@@ -1,19 +1,35 @@
1
1
  var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef", "dataSource", "context", "props"];
2
+
2
3
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
+
3
5
  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."); }
6
+
4
7
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8
+
5
9
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
+
6
11
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
+
7
13
  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."); }
14
+
8
15
  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); }
16
+
9
17
  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; }
18
+
10
19
  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; }
20
+
11
21
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
22
+
12
23
  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
+
13
25
  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; }
26
+
14
27
  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; }
28
+
15
29
  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; }
30
+
16
31
  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; }
32
+
17
33
  import TeamixIcon from '@teamix/icon';
18
34
  import ProField from '../../../field';
19
35
  import { usePrefixCls, getTargetValue, request } from '@teamix/utils';
@@ -25,49 +41,56 @@ import { Message } from '@alicloudfe/components';
25
41
  import { ProActionGroup } from '../../../actions';
26
42
  var cls = usePrefixCls('teamix-pro-info');
27
43
  var toJS = formilyReactive.toJS;
44
+
28
45
  var InfoValueItem = function InfoValueItem(props) {
29
46
  var _props$type = props.type,
30
- type = _props$type === void 0 ? 'text' : _props$type,
31
- value = props.value,
32
- render = props.render,
33
- infoItem = props.infoItem,
34
- record = props.record,
35
- actionRef = props.actionRef,
36
- dataSource = props.dataSource,
37
- context = props.context,
38
- fieldProps = props.props,
39
- others = _objectWithoutProperties(props, _excluded);
47
+ type = _props$type === void 0 ? 'text' : _props$type,
48
+ value = props.value,
49
+ render = props.render,
50
+ infoItem = props.infoItem,
51
+ record = props.record,
52
+ actionRef = props.actionRef,
53
+ dataSource = props.dataSource,
54
+ context = props.context,
55
+ fieldProps = props.props,
56
+ others = _objectWithoutProperties(props, _excluded);
57
+
40
58
  var dataIndex = infoItem.dataIndex,
41
- isEdit = infoItem.isEdit,
42
- editOnCancel = infoItem.editOnCancel,
43
- editOnOk = infoItem.editOnOk,
44
- editUrl = infoItem.editUrl,
45
- editFormatParams = infoItem.editFormatParams,
46
- _infoItem$editMethod = infoItem.editMethod,
47
- editMethod = _infoItem$editMethod === void 0 ? 'post' : _infoItem$editMethod,
48
- _infoItem$successMess = infoItem.successMessage,
49
- successMessage = _infoItem$successMess === void 0 ? 'success' : _infoItem$successMess,
50
- actions = infoItem.actions,
51
- extra = infoItem.extra,
52
- valueType = infoItem.valueType,
53
- _infoItem$editProForm = infoItem.editProFormProps,
54
- editProFormProps = _infoItem$editProForm === void 0 ? {} : _infoItem$editProForm;
55
- // 获取配置
59
+ isEdit = infoItem.isEdit,
60
+ editOnCancel = infoItem.editOnCancel,
61
+ editOnOk = infoItem.editOnOk,
62
+ editUrl = infoItem.editUrl,
63
+ editFormatParams = infoItem.editFormatParams,
64
+ _infoItem$editMethod = infoItem.editMethod,
65
+ editMethod = _infoItem$editMethod === void 0 ? 'post' : _infoItem$editMethod,
66
+ _infoItem$successMess = infoItem.successMessage,
67
+ successMessage = _infoItem$successMess === void 0 ? 'success' : _infoItem$successMess,
68
+ actions = infoItem.actions,
69
+ extra = infoItem.extra,
70
+ valueType = infoItem.valueType,
71
+ _infoItem$editProForm = infoItem.editProFormProps,
72
+ editProFormProps = _infoItem$editProForm === void 0 ? {} : _infoItem$editProForm; // 获取配置
73
+
56
74
  var getInfoItemProps = function getInfoItemProps(prop) {
57
75
  if (typeof prop === 'function') {
58
76
  return prop === null || prop === void 0 ? void 0 : prop(value, record);
59
77
  }
78
+
60
79
  return prop;
61
- };
62
- // 获取处理过的 render
80
+ }; // 获取处理过的 render
81
+
82
+
63
83
  var getRender = function getRender() {
64
84
  var _processRenderFunctio;
85
+
65
86
  if (typeof render === 'function') {
66
87
  return function () {
67
88
  return render(value, record);
68
89
  };
69
90
  }
91
+
70
92
  var newRender = processBuriedPoint((_processRenderFunctio = processRenderFunction(render !== null && render !== void 0 ? render : {}, value, record)) !== null && _processRenderFunctio !== void 0 ? _processRenderFunctio : {}, value, record);
93
+
71
94
  if (valueType === 'selectGroup') {
72
95
  newRender = _objectSpread(_objectSpread({
73
96
  maxShowNumber: 'auto',
@@ -76,8 +99,10 @@ var InfoValueItem = function InfoValueItem(props) {
76
99
  ellipsis: false
77
100
  });
78
101
  }
102
+
79
103
  return newRender;
80
104
  };
105
+
81
106
  var getFieldProps = function getFieldProps() {
82
107
  if (valueType === 'selectGroup') {
83
108
  return _objectSpread({
@@ -88,46 +113,56 @@ var InfoValueItem = function InfoValueItem(props) {
88
113
  layout: 'compact'
89
114
  }, fieldProps);
90
115
  }
116
+
91
117
  return fieldProps;
92
- };
93
- // 获取处理过的 dataSource
118
+ }; // 获取处理过的 dataSource
119
+
120
+
94
121
  var getDataSource = function getDataSource() {
95
122
  var newDataSource = null;
123
+
96
124
  if (typeof dataSource === 'function') {
97
125
  newDataSource = dataSource === null || dataSource === void 0 ? void 0 : dataSource(value, record);
98
126
  } else {
99
127
  newDataSource = (dataSource !== null && dataSource !== void 0 ? dataSource : []).map(function (item) {
100
128
  return Object.fromEntries(Object.entries(item).map(function (_ref) {
101
129
  var _ref2 = _slicedToArray(_ref, 2),
102
- k = _ref2[0],
103
- v = _ref2[1];
130
+ k = _ref2[0],
131
+ v = _ref2[1];
132
+
104
133
  return [k, getTargetValue(v, _objectSpread(_objectSpread({}, record), {}, {
105
134
  value: value
106
135
  }, context))];
107
136
  }));
108
137
  });
109
138
  }
139
+
110
140
  return newDataSource;
111
- };
112
- // 浮层的显隐状态
141
+ }; // 浮层的显隐状态
142
+
143
+
113
144
  var _useState = useState(false),
114
- _useState2 = _slicedToArray(_useState, 2),
115
- popConfirmVisible = _useState2[0],
116
- setPopConfirmVisible = _useState2[1];
117
- // 确认按钮的loading状态
145
+ _useState2 = _slicedToArray(_useState, 2),
146
+ popConfirmVisible = _useState2[0],
147
+ setPopConfirmVisible = _useState2[1]; // 确认按钮的loading状态
148
+
149
+
118
150
  var _useState3 = useState(false),
119
- _useState4 = _slicedToArray(_useState3, 2),
120
- confirmLoading = _useState4[0],
121
- setConfirmLoading = _useState4[1];
122
- // edit 的显隐状态
151
+ _useState4 = _slicedToArray(_useState3, 2),
152
+ confirmLoading = _useState4[0],
153
+ setConfirmLoading = _useState4[1]; // edit 的显隐状态
154
+
155
+
123
156
  var _useState5 = useState(false),
124
- _useState6 = _slicedToArray(_useState5, 2),
125
- editVisible = _useState6[0],
126
- setEditVisible = _useState6[1];
157
+ _useState6 = _slicedToArray(_useState5, 2),
158
+ editVisible = _useState6[0],
159
+ setEditVisible = _useState6[1];
160
+
127
161
  var requestDataKey = editMethod.toLowerCase() === 'get' ? 'params' : 'data';
128
162
  var dataFilterForm = useMemo(function () {
129
163
  return createForm();
130
164
  }, []);
165
+
131
166
  var renderAction = function renderAction() {
132
167
  if (actions) {
133
168
  return /*#__PURE__*/React.createElement(ProActionGroup, {
@@ -139,6 +174,7 @@ var InfoValueItem = function InfoValueItem(props) {
139
174
  context: _objectSpread({}, context)
140
175
  });
141
176
  }
177
+
142
178
  return /*#__PURE__*/React.createElement(React.Fragment, null);
143
179
  };
144
180
  /**
@@ -148,24 +184,31 @@ var InfoValueItem = function InfoValueItem(props) {
148
184
  * @param record table cell record
149
185
  * @returns
150
186
  */
187
+
188
+
151
189
  var processRenderFunction = function processRenderFunction(render, value, record) {
152
190
  var external = ['linkOnClick', 'link', 'value'];
153
191
  return Object.fromEntries(Object.entries(render).map(function (_ref3) {
154
192
  var _ref4 = _slicedToArray(_ref3, 2),
155
- k = _ref4[0],
156
- v = _ref4[1];
193
+ k = _ref4[0],
194
+ v = _ref4[1];
195
+
157
196
  if (typeof v === 'function') {
158
197
  var _v;
198
+
159
199
  if (external.includes(k)) {
160
200
  return [k, function () {
161
201
  for (var _len = arguments.length, others = new Array(_len), _key = 0; _key < _len; _key++) {
162
202
  others[_key] = arguments[_key];
163
203
  }
204
+
164
205
  return v === null || v === void 0 ? void 0 : v.apply(void 0, [value, record].concat(others));
165
206
  }];
166
207
  }
208
+
167
209
  return [k, (_v = v === null || v === void 0 ? void 0 : v(value, record)) !== null && _v !== void 0 ? _v : ''];
168
210
  }
211
+
169
212
  return [k, v];
170
213
  }));
171
214
  };
@@ -175,21 +218,24 @@ var InfoValueItem = function InfoValueItem(props) {
175
218
  * @param record table cell record
176
219
  * @returns
177
220
  */
221
+
222
+
178
223
  var processBuriedPoint = function processBuriedPoint(render, value, record) {
179
- return Object.fromEntries([
180
- // 默认 ellipsis、descriptionEllipsis 为 true
224
+ return Object.fromEntries([// 默认 ellipsis、descriptionEllipsis 为 true
181
225
  // emptyText 默认为 '-'
182
226
  ['ellipsis', true], ['descriptionEllipsis', true], ['emptyText', '-']].concat(_toConsumableArray(Object.entries(render).map(function (_ref5) {
183
227
  var _ref6 = _slicedToArray(_ref5, 2),
184
- k = _ref6[0],
185
- v = _ref6[1];
228
+ k = _ref6[0],
229
+ v = _ref6[1];
230
+
186
231
  return [k, getTargetValue(v, _objectSpread(_objectSpread({}, record), {}, {
187
232
  record: record,
188
233
  value: value
189
234
  }))];
190
235
  }))));
191
- };
192
- // 重写编辑逻辑替代field原有逻辑
236
+ }; // 重写编辑逻辑替代field原有逻辑
237
+
238
+
193
239
  if (getInfoItemProps(isEdit)) {
194
240
  // 渲染表单
195
241
  var renderContent = function renderContent() {
@@ -202,33 +248,35 @@ var InfoValueItem = function InfoValueItem(props) {
202
248
  }],
203
249
  form: dataFilterForm
204
250
  }, getInfoItemProps(editProFormProps)));
205
- };
206
- // 表单提交
251
+ }; // 表单提交
252
+
253
+
207
254
  var onConfirm = function onConfirm(e) {
208
- var formData = toJS(dataFilterForm.values);
209
- // 如果传入了 editUrl 则内置请求
255
+ var formData = toJS(dataFilterForm.values); // 如果传入了 editUrl 则内置请求
256
+
210
257
  if (editUrl) {
211
258
  setConfirmLoading(true);
212
259
  var params = formData;
260
+
213
261
  if (editFormatParams) {
214
262
  params = editFormatParams === null || editFormatParams === void 0 ? void 0 : editFormatParams(formData, record);
215
263
  }
264
+
216
265
  request(_defineProperty({
217
266
  url: editUrl,
218
267
  method: editMethod
219
268
  }, requestDataKey, params)).then(function (resp) {
220
269
  var _actionRef$current, _actionRef$current$re;
270
+
221
271
  Message.success(successMessage);
222
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$re = _actionRef$current.refresh) === null || _actionRef$current$re === void 0 ? void 0 : _actionRef$current$re.call(_actionRef$current);
223
- // setEditVisible(!editVisible);
224
- }).catch(function (error) {
225
- // TODO 暂时不处理。是否需要开放函数?
226
- }).finally(function () {
227
- // setConfirmLoading(false);
272
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : (_actionRef$current$re = _actionRef$current.refresh) === null || _actionRef$current$re === void 0 ? void 0 : _actionRef$current$re.call(_actionRef$current); // setEditVisible(!editVisible);
273
+ }).catch(function (error) {// TODO 暂时不处理。是否需要开放函数?
274
+ }).finally(function () {// setConfirmLoading(false);
228
275
  });
229
276
  }
230
- var okResult = editOnOk === null || editOnOk === void 0 ? void 0 : editOnOk(formData, e);
231
- // 重写了 editOnOk
277
+
278
+ var okResult = editOnOk === null || editOnOk === void 0 ? void 0 : editOnOk(formData, e); // 重写了 editOnOk
279
+
232
280
  if (okResult instanceof Promise) {
233
281
  setConfirmLoading(true);
234
282
  okResult.then(function () {
@@ -240,10 +288,12 @@ var InfoValueItem = function InfoValueItem(props) {
240
288
  setPopConfirmVisible(!popConfirmVisible);
241
289
  setEditVisible(!editVisible);
242
290
  }
243
- };
244
- // 取消
291
+ }; // 取消
292
+
293
+
245
294
  var onCancel = function onCancel(e) {
246
295
  var formData = toJS(dataFilterForm.values);
296
+
247
297
  if (editOnCancel) {
248
298
  editOnCancel === null || editOnCancel === void 0 ? void 0 : editOnCancel(formData, e);
249
299
  setPopConfirmVisible(!popConfirmVisible);
@@ -253,6 +303,7 @@ var InfoValueItem = function InfoValueItem(props) {
253
303
  setEditVisible(!editVisible);
254
304
  }
255
305
  };
306
+
256
307
  return /*#__PURE__*/React.createElement("div", {
257
308
  className: cls('edit'),
258
309
  onMouseEnter: function onMouseEnter() {
@@ -290,6 +341,7 @@ var InfoValueItem = function InfoValueItem(props) {
290
341
  })
291
342
  }), renderAction(), extra && extra);
292
343
  }
344
+
293
345
  return /*#__PURE__*/React.createElement("div", {
294
346
  className: cls('item-value')
295
347
  }, /*#__PURE__*/React.createElement(ProField, _objectSpread(_objectSpread({
@@ -299,4 +351,5 @@ var InfoValueItem = function InfoValueItem(props) {
299
351
  dataSource: getDataSource()
300
352
  }, others), getFieldProps())), renderAction(), extra && extra);
301
353
  };
354
+
302
355
  export default InfoValueItem;
@@ -6,34 +6,39 @@ import { Ellipsis, LabelIconTip } from '../../../field';
6
6
  import './index.scss';
7
7
  var cls = usePrefixCls('teamix-pro-info-item');
8
8
  var Row = Grid.Row,
9
- Col = Grid.Col;
9
+ Col = Grid.Col;
10
+
10
11
  var ProInfoItem = function ProInfoItem(prop) {
11
12
  var value = prop.value,
12
- label = prop.label,
13
- baseInfoLayout = prop.baseInfoLayout,
14
- headerInfoLayout = prop.headerInfoLayout,
15
- loading = prop.loading,
16
- tooltip = prop.tooltip,
17
- tooltipIcon = prop.tooltipIcon,
18
- valueType = prop.valueType,
19
- render = prop.render,
20
- alignItems = prop.alignItems;
21
- // 判断是否需要居中
13
+ label = prop.label,
14
+ baseInfoLayout = prop.baseInfoLayout,
15
+ headerInfoLayout = prop.headerInfoLayout,
16
+ loading = prop.loading,
17
+ tooltip = prop.tooltip,
18
+ tooltipIcon = prop.tooltipIcon,
19
+ valueType = prop.valueType,
20
+ render = prop.render,
21
+ alignItems = prop.alignItems; // 判断是否需要居中
22
+
22
23
  var isAlignItemsCenter = function isAlignItemsCenter() {
23
24
  if (typeof render !== 'function') {
24
25
  var type = render === null || render === void 0 ? void 0 : render.type;
26
+
25
27
  if (valueType === 'selectGroup') {
26
28
  return true;
27
29
  }
30
+
28
31
  if (type === 'tag' || type === 'statusIconTag' || type === 'eventLevelTag' || type === 'warningLevelTag') {
29
32
  return true;
30
33
  }
31
34
  }
35
+
32
36
  return false;
33
37
  };
38
+
34
39
  if (baseInfoLayout) {
35
40
  var labelCol = baseInfoLayout.labelCol,
36
- wrapperCol = baseInfoLayout.wrapperCol;
41
+ wrapperCol = baseInfoLayout.wrapperCol;
37
42
  return /*#__PURE__*/React.createElement("div", {
38
43
  className: cls('')
39
44
  }, /*#__PURE__*/React.createElement(Row, {
@@ -61,9 +66,10 @@ var ProInfoItem = function ProInfoItem(prop) {
61
66
  className: cls('base-skeleton-box')
62
67
  }, /*#__PURE__*/React.createElement(ProSkeletonRaw.Info.Item, null)), !loading && value)));
63
68
  }
69
+
64
70
  if (headerInfoLayout) {
65
71
  var _headerInfoLayout$lab = headerInfoLayout.labelGutter,
66
- labelGutter = _headerInfoLayout$lab === void 0 ? '16px' : _headerInfoLayout$lab;
72
+ labelGutter = _headerInfoLayout$lab === void 0 ? '16px' : _headerInfoLayout$lab;
67
73
  return /*#__PURE__*/React.createElement("div", {
68
74
  className: cls()
69
75
  }, /*#__PURE__*/React.createElement(Row, {
@@ -87,6 +93,8 @@ var ProInfoItem = function ProInfoItem(prop) {
87
93
  className: cls('base-skeleton-box')
88
94
  }, /*#__PURE__*/React.createElement(ProSkeletonRaw.Info.Item, null)), !loading && /*#__PURE__*/React.createElement(React.Fragment, null, value))));
89
95
  }
96
+
90
97
  return /*#__PURE__*/React.createElement(React.Fragment, null);
91
98
  };
99
+
92
100
  export default ProInfoItem;