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

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.all.min.css +1 -0
  2. package/dist/pro.css +1 -1
  3. package/dist/pro.js +78506 -59443
  4. package/dist/pro.min.css +1 -1
  5. package/dist/pro.min.js +1 -1
  6. package/dist/pro.min.js.LICENSE.txt +13 -6
  7. package/dist/pro.xconsole.min.css +1 -0
  8. package/es/actions/base.js +8 -21
  9. package/es/actions/dialog-component.js +2 -9
  10. package/es/actions/dialog-form.js +37 -75
  11. package/es/actions/dialog-info.js +1 -5
  12. package/es/actions/dialog.js +57 -95
  13. package/es/actions/index.d.ts +7 -0
  14. package/es/actions/index.js +93 -153
  15. package/es/actions/index.scss +6 -1
  16. package/es/actions/link.js +3 -5
  17. package/es/actions/quick.d.ts +2 -0
  18. package/es/actions/quick.js +26 -0
  19. package/es/actions/request.js +12 -27
  20. package/es/actions/utils.js +1 -9
  21. package/es/card/card-container.js +0 -5
  22. package/es/card/divider.js +0 -5
  23. package/es/card/index.js +61 -100
  24. package/es/card/index.scss +15 -0
  25. package/es/card/selectable.js +4 -13
  26. package/es/card/tab.js +1 -10
  27. package/es/card/utils.js +0 -2
  28. package/es/card/xconsole.scss +3 -0
  29. package/es/form/Components/Editable/index.js +16 -55
  30. package/es/form/Components/FormGroup/index.d.ts +1 -0
  31. package/es/form/Components/FormGroup/index.js +7 -22
  32. package/es/form/Components/LightFilter/index.js +15 -35
  33. package/es/form/Components/ProField/index.js +2 -14
  34. package/es/form/Components/ProField/mapDateFormat.js +2 -28
  35. package/es/form/Components/Text/index.d.ts +1 -0
  36. package/es/form/Components/Text/index.js +2 -11
  37. package/es/form/Filter/AdvancedFilter.js +11 -26
  38. package/es/form/Filter/Layout.js +11 -24
  39. package/es/form/Filter/LightFilter.js +13 -24
  40. package/es/form/Filter/SimpleFilter.js +7 -21
  41. package/es/form/Filter/index.js +117 -171
  42. package/es/form/Filter/index2.js +11 -28
  43. package/es/form/Filter/layout.scss +1 -1
  44. package/es/form/Filter/useBindUrl.js +18 -46
  45. package/es/form/Filter/useSpecialProps.js +8 -13
  46. package/es/form/ProForm/addCascadeEffect.d.ts +2 -0
  47. package/es/form/ProForm/addCascadeEffect.js +203 -0
  48. package/es/form/ProForm/customComponent.js +0 -5
  49. package/es/form/ProForm/index.js +30 -38
  50. package/es/form/ProForm/useAutoLayout.js +21 -42
  51. package/es/form/ProForm/useAutoSubmit.js +3 -8
  52. package/es/form/ProForm/useFieldRequest.js +0 -5
  53. package/es/form/ProForm/useFormDisplayValues.js +12 -28
  54. package/es/form/ProForm/useInitialRequest.js +0 -5
  55. package/es/form/SchemaForm/adapterComponent.js +0 -3
  56. package/es/form/SchemaForm/adapterDecorator.d.ts +1 -1
  57. package/es/form/SchemaForm/adapterDecorator.js +0 -8
  58. package/es/form/SchemaForm/adapterType.js +0 -2
  59. package/es/form/SchemaForm/index.js +78 -114
  60. package/es/form/SchemaForm/initializeArrayCards.js +0 -6
  61. package/es/form/SchemaForm/initializeArrayCollapse.js +0 -6
  62. package/es/form/SchemaForm/initializeArrayItems.js +2 -9
  63. package/es/form/SchemaForm/initializeArrayTable.js +21 -34
  64. package/es/form/SchemaForm/initializeDataSource.js +2 -6
  65. package/es/form/SchemaForm/initializeFormButton.js +14 -31
  66. package/es/form/SchemaForm/initializeFormCollapse.js +8 -18
  67. package/es/form/SchemaForm/initializeFormGroup.js +10 -20
  68. package/es/form/SchemaForm/initializeFormStep.js +11 -23
  69. package/es/form/SchemaForm/initializeFormTab.js +10 -20
  70. package/es/form/SchemaForm/initializeReactions.js +9 -33
  71. package/es/form/SchemaForm/initializeRequest.js +2 -16
  72. package/es/form/SchemaForm/initializeRules.js +4 -22
  73. package/es/form/SchemaForm/initializeSelectTable.js +7 -33
  74. package/es/form/SchemaForm/reactions.js +19 -34
  75. package/es/form/docs/ActionResponse.d.ts +1 -0
  76. package/es/form/index.d.ts +9 -9
  77. package/es/form/index.js +0 -9
  78. package/es/form/typing.d.ts +26 -4
  79. package/es/form/utils.d.ts +1 -1
  80. package/es/form/utils.js +4 -49
  81. package/es/form/warning.js +2 -7
  82. package/es/global.scss +3 -1
  83. package/es/index-without-icon.js +4 -3
  84. package/es/index.d.ts +1 -1
  85. package/es/index.js +18 -8
  86. package/es/info/components/InfoGroup/index.js +21 -32
  87. package/es/info/components/InfoValueItem/index.js +66 -119
  88. package/es/info/components/ProInfoItem/index.js +13 -21
  89. package/es/info/components/baseInfo/index.js +17 -27
  90. package/es/info/components/headerInfo/index.js +8 -20
  91. package/es/info/components/tableInfo/index.js +20 -50
  92. package/es/info/index.js +61 -86
  93. package/es/info/typing.d.ts +2 -0
  94. package/es/info/utils/index.js +0 -11
  95. package/es/next-xconsole.scss +34 -0
  96. package/es/nocode/configurators/ProTable.js +1 -22
  97. package/es/nocode/configurators/common.js +5 -6
  98. package/es/nocode/configurators/index.js +2 -3
  99. package/es/nocode/index.js +6 -6
  100. package/es/nocode/pages/editor.js +5 -9
  101. package/es/nocode/pages/index.js +5 -30
  102. package/es/nocode/pages/playground.js +18 -35
  103. package/es/nocode/pages/renderer.js +9 -42
  104. package/es/nocode/playground.js +10 -23
  105. package/es/page-header/index.d.ts +2 -2
  106. package/es/page-header/index.js +40 -76
  107. package/es/page-header/index.scss +2 -1
  108. package/es/page-header/xconsole.scss +5 -0
  109. package/es/sidebar/components/sidebar-container/index.js +54 -69
  110. package/es/sidebar/components/sidebar-container/index.scss +21 -14
  111. package/es/sidebar/components/tree/index.js +100 -138
  112. package/es/sidebar/components/tree-node/components/HoverTooltip/index.js +11 -26
  113. package/es/sidebar/components/tree-node/components/IconAction/index.js +9 -35
  114. package/es/sidebar/components/tree-node/components/IconSwitch/index.d.ts +2 -2
  115. package/es/sidebar/components/tree-node/components/IconSwitch/index.js +12 -25
  116. package/es/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
  117. package/es/sidebar/components/tree-node/index.js +42 -84
  118. package/es/sidebar/components/tree-node/index.scss +6 -0
  119. package/es/sidebar/index.d.ts +2 -0
  120. package/es/sidebar/index.js +72 -95
  121. package/es/sidebar/typing.d.ts +4 -0
  122. package/es/sidebar/utils/action-ref.js +2 -7
  123. package/es/sidebar/utils/index.d.ts +5 -2
  124. package/es/sidebar/utils/index.js +41 -98
  125. package/es/table/components/CardView/index.d.ts +5 -0
  126. package/es/table/components/CardView/index.js +392 -0
  127. package/es/table/components/CardView/index.scss +46 -0
  128. package/es/table/components/Filter/index.d.ts +6 -3
  129. package/es/table/components/Filter/index.js +115 -128
  130. package/es/table/components/Layout/index.js +32 -47
  131. package/es/table/components/Layout/index.scss +2 -1
  132. package/es/table/components/LoadMore/index.d.ts +20 -0
  133. package/es/table/components/LoadMore/index.js +88 -0
  134. package/es/table/components/LoadMore/index.scss +19 -0
  135. package/es/table/components/Pagination/index.js +25 -58
  136. package/es/table/components/QuickAction/index.d.ts +1 -0
  137. package/es/table/components/QuickAction/index.js +3 -11
  138. package/es/table/components/ToolBar/CardSwitch.d.ts +8 -0
  139. package/es/table/components/ToolBar/CardSwitch.js +52 -0
  140. package/es/table/components/ToolBar/DensityIcon.js +19 -31
  141. package/es/table/components/ToolBar/FilterColumnIcon.js +87 -125
  142. package/es/table/components/ToolBar/FullScreenIcon.js +7 -62
  143. package/es/table/components/ToolBar/Fullscreen.js +25 -28
  144. package/es/table/components/ToolBar/RefreshIcon.js +162 -27
  145. package/es/table/components/ToolBar/index.d.ts +1 -1
  146. package/es/table/components/ToolBar/index.js +130 -38
  147. package/es/table/components/ToolBar/index.scss +49 -3
  148. package/es/table/index.js +455 -423
  149. package/es/table/index.scss +8 -0
  150. package/es/table/typing.d.ts +125 -6
  151. package/es/table/utils/columnRender.d.ts +3 -3
  152. package/es/table/utils/columnRender.js +39 -79
  153. package/es/table/utils/genProColumnToColumn.d.ts +2 -2
  154. package/es/table/utils/genProColumnToColumn.js +13 -16
  155. package/es/table/utils/index.js +14 -47
  156. package/es/table/utils/pureColumnRender.js +21 -53
  157. package/es/table/utils/pureGenProColumnToColumn.d.ts +1 -1
  158. package/es/table/utils/pureGenProColumnToColumn.js +2 -10
  159. package/es/table/utils/useTableSelection.js +6 -33
  160. package/es/table/utils/util.d.ts +5 -0
  161. package/es/table/utils/util.js +19 -0
  162. package/es/templates/List/index.js +2 -9
  163. package/es/timeline/ProTimeLineItem/index.js +25 -65
  164. package/es/timeline/index.js +8 -22
  165. package/es/timeline/typing.d.ts +1 -0
  166. package/es/utils/message.d.ts +2 -2
  167. package/es/utils/message.js +0 -5
  168. package/es/xconsole.scss +503 -0
  169. package/lib/actions/base.js +8 -24
  170. package/lib/actions/confirm.js +0 -5
  171. package/lib/actions/danger-confirm.js +0 -5
  172. package/lib/actions/danger-pop-confirm.js +0 -4
  173. package/lib/actions/dialog-component.js +2 -15
  174. package/lib/actions/dialog-form.js +36 -89
  175. package/lib/actions/dialog-info.js +1 -10
  176. package/lib/actions/dialog-table.js +0 -5
  177. package/lib/actions/dialog.js +55 -112
  178. package/lib/actions/drawer-form.js +0 -3
  179. package/lib/actions/drawer-info.js +0 -3
  180. package/lib/actions/drawer-table.js +0 -3
  181. package/lib/actions/drawer.js +0 -4
  182. package/lib/actions/error.js +0 -5
  183. package/lib/actions/index.d.ts +7 -0
  184. package/lib/actions/index.js +115 -184
  185. package/lib/actions/index.scss +6 -1
  186. package/lib/actions/link.js +1 -10
  187. package/lib/actions/notice.js +0 -5
  188. package/lib/actions/pop-confirm.js +0 -5
  189. package/lib/actions/quick.d.ts +2 -0
  190. package/lib/actions/quick.js +33 -0
  191. package/lib/actions/request.js +8 -32
  192. package/lib/actions/utils.js +1 -9
  193. package/lib/card/card-container.js +0 -9
  194. package/lib/card/divider.js +0 -7
  195. package/lib/card/index.js +61 -127
  196. package/lib/card/index.scss +15 -0
  197. package/lib/card/selectable.js +4 -20
  198. package/lib/card/tab.js +1 -14
  199. package/lib/card/utils.js +0 -6
  200. package/lib/card/xconsole.scss +3 -0
  201. package/lib/field/index.js +0 -6
  202. package/lib/form/Components/Editable/index.js +15 -65
  203. package/lib/form/Components/FormGroup/index.d.ts +1 -0
  204. package/lib/form/Components/FormGroup/index.js +7 -28
  205. package/lib/form/Components/LightFilter/index.js +15 -47
  206. package/lib/form/Components/ProField/index.js +2 -21
  207. package/lib/form/Components/ProField/mapDateFormat.js +2 -32
  208. package/lib/form/Components/Text/index.d.ts +1 -0
  209. package/lib/form/Components/Text/index.js +2 -16
  210. package/lib/form/Filter/AdvancedFilter.js +11 -34
  211. package/lib/form/Filter/Layout.js +11 -33
  212. package/lib/form/Filter/LightFilter.js +13 -32
  213. package/lib/form/Filter/SimpleFilter.js +5 -27
  214. package/lib/form/Filter/index.js +116 -191
  215. package/lib/form/Filter/index2.js +11 -38
  216. package/lib/form/Filter/layout.scss +1 -1
  217. package/lib/form/Filter/useBindUrl.js +18 -50
  218. package/lib/form/Filter/useSpecialProps.js +6 -13
  219. package/lib/form/ProForm/addCascadeEffect.d.ts +2 -0
  220. package/lib/form/ProForm/addCascadeEffect.js +210 -0
  221. package/lib/form/ProForm/customComponent.js +0 -8
  222. package/lib/form/ProForm/index.js +30 -60
  223. package/lib/form/ProForm/useAutoLayout.js +21 -45
  224. package/lib/form/ProForm/useAutoSubmit.js +1 -10
  225. package/lib/form/ProForm/useFieldRequest.js +0 -8
  226. package/lib/form/ProForm/useFormDisplayValues.js +12 -34
  227. package/lib/form/ProForm/useInitialRequest.js +0 -6
  228. package/lib/form/SchemaForm/adapterComponent.js +0 -6
  229. package/lib/form/SchemaForm/adapterDecorator.d.ts +1 -1
  230. package/lib/form/SchemaForm/adapterDecorator.js +0 -12
  231. package/lib/form/SchemaForm/adapterType.js +0 -5
  232. package/lib/form/SchemaForm/index.js +78 -144
  233. package/lib/form/SchemaForm/initializeArrayCards.js +0 -7
  234. package/lib/form/SchemaForm/initializeArrayCollapse.js +0 -7
  235. package/lib/form/SchemaForm/initializeArrayItems.js +2 -10
  236. package/lib/form/SchemaForm/initializeArrayTable.js +21 -34
  237. package/lib/form/SchemaForm/initializeDataSource.js +2 -8
  238. package/lib/form/SchemaForm/initializeFormButton.js +14 -32
  239. package/lib/form/SchemaForm/initializeFormCollapse.js +8 -18
  240. package/lib/form/SchemaForm/initializeFormGroup.js +10 -20
  241. package/lib/form/SchemaForm/initializeFormStep.js +11 -23
  242. package/lib/form/SchemaForm/initializeFormTab.js +10 -20
  243. package/lib/form/SchemaForm/initializeReactions.js +9 -37
  244. package/lib/form/SchemaForm/initializeRequest.js +2 -18
  245. package/lib/form/SchemaForm/initializeRules.js +4 -24
  246. package/lib/form/SchemaForm/initializeSelectTable.js +7 -36
  247. package/lib/form/SchemaForm/reactions.js +17 -37
  248. package/lib/form/docs/ActionResponse.d.ts +1 -0
  249. package/lib/form/docs/ActionResponse.js +0 -5
  250. package/lib/form/index.d.ts +9 -9
  251. package/lib/form/index.js +0 -25
  252. package/lib/form/typing.d.ts +26 -4
  253. package/lib/form/utils.d.ts +1 -1
  254. package/lib/form/utils.js +4 -61
  255. package/lib/form/warning.js +2 -8
  256. package/lib/global.scss +3 -1
  257. package/lib/hooks/index.js +0 -5
  258. package/lib/index-without-icon.js +2 -36
  259. package/lib/index.d.ts +1 -1
  260. package/lib/index.js +13 -40
  261. package/lib/info/components/InfoGroup/index.js +21 -42
  262. package/lib/info/components/InfoValueItem/index.js +66 -134
  263. package/lib/info/components/ProInfoItem/index.js +13 -29
  264. package/lib/info/components/baseInfo/index.js +17 -39
  265. package/lib/info/components/headerInfo/index.js +8 -31
  266. package/lib/info/components/tableInfo/index.js +20 -62
  267. package/lib/info/index.js +61 -101
  268. package/lib/info/typing.d.ts +2 -0
  269. package/lib/info/utils/index.js +0 -19
  270. package/lib/info/utils/utils.js +0 -1
  271. package/lib/next-xconsole.scss +34 -0
  272. package/lib/nocode/configurators/PageHeader.js +0 -2
  273. package/lib/nocode/configurators/ProTable.js +1 -24
  274. package/lib/nocode/configurators/common.js +5 -10
  275. package/lib/nocode/configurators/index.js +2 -10
  276. package/lib/nocode/configurators/map.js +0 -5
  277. package/lib/nocode/index.js +0 -11
  278. package/lib/nocode/pages/editor.js +5 -19
  279. package/lib/nocode/pages/index.js +3 -35
  280. package/lib/nocode/pages/playground.js +18 -52
  281. package/lib/nocode/pages/renderer.js +9 -53
  282. package/lib/nocode/playground.js +10 -35
  283. package/lib/page-container/index.js +0 -6
  284. package/lib/page-header/index.d.ts +2 -2
  285. package/lib/page-header/index.js +39 -90
  286. package/lib/page-header/index.scss +2 -1
  287. package/lib/page-header/xconsole.scss +5 -0
  288. package/lib/sidebar/components/sidebar-container/index.js +54 -81
  289. package/lib/sidebar/components/sidebar-container/index.scss +21 -14
  290. package/lib/sidebar/components/tree/index.js +100 -152
  291. package/lib/sidebar/components/tree-node/components/HoverTooltip/index.js +11 -34
  292. package/lib/sidebar/components/tree-node/components/IconAction/index.js +9 -46
  293. package/lib/sidebar/components/tree-node/components/IconSwitch/index.d.ts +2 -2
  294. package/lib/sidebar/components/tree-node/components/IconSwitch/index.js +12 -35
  295. package/lib/sidebar/components/tree-node/components/IconSwitch/index.scss +1 -1
  296. package/lib/sidebar/components/tree-node/index.js +42 -100
  297. package/lib/sidebar/components/tree-node/index.scss +6 -0
  298. package/lib/sidebar/index.d.ts +2 -0
  299. package/lib/sidebar/index.js +79 -111
  300. package/lib/sidebar/typing.d.ts +4 -0
  301. package/lib/sidebar/utils/action-ref.js +2 -8
  302. package/lib/sidebar/utils/index.d.ts +5 -2
  303. package/lib/sidebar/utils/index.js +41 -106
  304. package/lib/skeleton/index.js +0 -6
  305. package/lib/table/components/CardView/index.d.ts +5 -0
  306. package/lib/table/components/CardView/index.js +402 -0
  307. package/lib/table/components/CardView/index.scss +46 -0
  308. package/lib/table/components/EmptyContent/index.js +0 -6
  309. package/lib/table/components/Filter/index.d.ts +6 -3
  310. package/lib/table/components/Filter/index.js +114 -137
  311. package/lib/table/components/Layout/index.js +32 -60
  312. package/lib/table/components/Layout/index.scss +2 -1
  313. package/lib/table/components/LoadMore/index.d.ts +20 -0
  314. package/lib/table/components/LoadMore/index.js +99 -0
  315. package/lib/table/components/LoadMore/index.scss +19 -0
  316. package/lib/table/components/Pagination/index.js +25 -68
  317. package/lib/table/components/QuickAction/index.d.ts +1 -0
  318. package/lib/table/components/QuickAction/index.js +3 -15
  319. package/lib/table/components/ToolBar/CardSwitch.d.ts +8 -0
  320. package/lib/table/components/ToolBar/CardSwitch.js +60 -0
  321. package/lib/table/components/ToolBar/DensityIcon.js +19 -42
  322. package/lib/table/components/ToolBar/FilterColumnIcon.js +86 -136
  323. package/lib/table/components/ToolBar/FullScreenIcon.js +10 -74
  324. package/lib/table/components/ToolBar/Fullscreen.js +25 -35
  325. package/lib/table/components/ToolBar/RefreshIcon.js +164 -36
  326. package/lib/table/components/ToolBar/index.d.ts +1 -1
  327. package/lib/table/components/ToolBar/index.js +133 -47
  328. package/lib/table/components/ToolBar/index.scss +49 -3
  329. package/lib/table/index.js +454 -445
  330. package/lib/table/index.scss +8 -0
  331. package/lib/table/typing.d.ts +125 -6
  332. package/lib/table/utils/columnRender.d.ts +3 -3
  333. package/lib/table/utils/columnRender.js +39 -92
  334. package/lib/table/utils/genProColumnToColumn.d.ts +2 -2
  335. package/lib/table/utils/genProColumnToColumn.js +13 -21
  336. package/lib/table/utils/getTableProps.js +0 -2
  337. package/lib/table/utils/getTableSortIcons.js +0 -5
  338. package/lib/table/utils/index.js +12 -55
  339. package/lib/table/utils/pureColumnRender.js +21 -64
  340. package/lib/table/utils/pureGenProColumnToColumn.d.ts +1 -1
  341. package/lib/table/utils/pureGenProColumnToColumn.js +2 -11
  342. package/lib/table/utils/useTableSelection.js +6 -35
  343. package/lib/table/utils/util.d.ts +5 -0
  344. package/lib/table/utils/util.js +25 -0
  345. package/lib/templates/Detail/index.js +0 -5
  346. package/lib/templates/Form/index.js +0 -5
  347. package/lib/templates/List/index.js +2 -19
  348. package/lib/templates/index.js +0 -6
  349. package/lib/timeline/ProTimeLineItem/index.js +25 -76
  350. package/lib/timeline/index.js +8 -33
  351. package/lib/timeline/typing.d.ts +1 -0
  352. package/lib/utils/index.js +0 -6
  353. package/lib/utils/message.d.ts +2 -2
  354. package/lib/utils/message.js +0 -10
  355. package/lib/xconsole.scss +503 -0
  356. package/package.json +1 -1
@@ -1,21 +1,12 @@
1
1
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
-
3
2
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
3
  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; }
6
-
7
4
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
8
-
9
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."); }
10
-
11
6
  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); }
12
-
13
7
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
14
-
15
8
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
16
-
17
9
  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
-
19
10
  import React, { useMemo } from 'react';
20
11
  import './index.scss';
21
12
  import { Table } from '@alicloudfe/components';
@@ -25,21 +16,19 @@ import InfoValueItem from '../InfoValueItem';
25
16
  import { ProSkeletonRaw } from '../../..';
26
17
  import { getDataIndexValue, isHidden } from '../../utils';
27
18
  import cloneDeep from 'lodash.clonedeep';
28
-
29
19
  var ProTableInfo = function ProTableInfo(props) {
30
20
  var columns = props.columns,
31
- dataSource = props.dataSource,
32
- _props$layout = props.layout,
33
- layout = _props$layout === void 0 ? {} : _props$layout,
34
- loading = props.loading,
35
- result = props.result,
36
- actionRef = props.actionRef,
37
- context = props.context;
21
+ dataSource = props.dataSource,
22
+ _props$layout = props.layout,
23
+ layout = _props$layout === void 0 ? {} : _props$layout,
24
+ loading = props.loading,
25
+ result = props.result,
26
+ actionRef = props.actionRef,
27
+ context = props.context;
38
28
  var _layout$colNum = layout.colNum,
39
- colNum = _layout$colNum === void 0 ? 2 : _layout$colNum,
40
- _layout$labelGutter = layout.labelGutter,
41
- labelGutter = _layout$labelGutter === void 0 ? '80px' : _layout$labelGutter;
42
-
29
+ colNum = _layout$colNum === void 0 ? 2 : _layout$colNum,
30
+ _layout$labelGutter = layout.labelGutter,
31
+ labelGutter = _layout$labelGutter === void 0 ? '80px' : _layout$labelGutter;
43
32
  var getNewColumns = function getNewColumns() {
44
33
  // 需要 fill 填充 否则有可能不执行
45
34
  return _toConsumableArray(new Array(colNum)).fill(1).map(function (_, index) {
@@ -56,10 +45,8 @@ var ProTableInfo = function ProTableInfo(props) {
56
45
  return [].concat(_toConsumableArray(acc), _toConsumableArray(cur));
57
46
  }, []);
58
47
  };
59
-
60
48
  var getInfoValueItem = function getInfoValueItem(item) {
61
49
  var _item$valueType;
62
-
63
50
  return /*#__PURE__*/React.createElement(InfoValueItem, {
64
51
  type: (_item$valueType = item === null || item === void 0 ? void 0 : item.valueType) !== null && _item$valueType !== void 0 ? _item$valueType : 'text',
65
52
  value: getDataIndexValue(item.dataIndex, dataSource !== null && dataSource !== void 0 ? dataSource : result),
@@ -71,77 +58,66 @@ var ProTableInfo = function ProTableInfo(props) {
71
58
  props: item.props
72
59
  });
73
60
  };
74
-
75
61
  var newDataSource = useMemo(function () {
76
62
  var nResult = [];
77
63
  var columnsCopy = cloneDeep(columns).filter(function (item) {
78
64
  return !isHidden(item.hidden, getDataIndexValue(item.dataIndex, dataSource !== null && dataSource !== void 0 ? dataSource : result), dataSource !== null && dataSource !== void 0 ? dataSource : result, context);
79
- }); // 取当前行的数据。直到取完
80
-
65
+ });
66
+ // 取当前行的数据。直到取完
81
67
  while (columnsCopy.length > 0) {
82
68
  var filterColumns = [];
83
- var col = colNum * 2; // 需要判断是否有合并行情况
84
-
69
+ var col = colNum * 2;
70
+ // 需要判断是否有合并行情况
85
71
  while (col >= 2) {
86
72
  if (columnsCopy.length > 0) {
87
73
  var _columnsItem$colSpan;
88
-
89
74
  var columnsItem = columnsCopy.shift();
90
- var needCol = 1 + ((_columnsItem$colSpan = columnsItem === null || columnsItem === void 0 ? void 0 : columnsItem.colSpan) !== null && _columnsItem$colSpan !== void 0 ? _columnsItem$colSpan : 1); // 如果剩余的col能满足下一组数据那么就放在这一组
91
-
75
+ var needCol = 1 + ((_columnsItem$colSpan = columnsItem === null || columnsItem === void 0 ? void 0 : columnsItem.colSpan) !== null && _columnsItem$colSpan !== void 0 ? _columnsItem$colSpan : 1);
76
+ // 如果剩余的col能满足下一组数据那么就放在这一组
92
77
  if (needCol <= col) {
93
78
  col = col - needCol;
94
79
  filterColumns.push(columnsItem);
95
80
  } else {
96
81
  var _filterColumns$0$colS;
97
-
98
82
  // 不满足条件。再安回去。。。
99
- columnsCopy.unshift(columnsItem); // 并且把剩余的col都分配给前一组数据
100
-
101
- filterColumns[0].colSpan = ((_filterColumns$0$colS = filterColumns[0].colSpan) !== null && _filterColumns$0$colS !== void 0 ? _filterColumns$0$colS : 1) + col; // 置0
102
-
83
+ columnsCopy.unshift(columnsItem);
84
+ // 并且把剩余的col都分配给前一组数据
85
+ filterColumns[0].colSpan = ((_filterColumns$0$colS = filterColumns[0].colSpan) !== null && _filterColumns$0$colS !== void 0 ? _filterColumns$0$colS : 1) + col;
86
+ // 置0
103
87
  col = 0;
104
88
  }
105
89
  }
106
-
107
90
  if (columnsCopy.length === 0) {
108
91
  // 如果剩余仍有列数并且已经没有columns分配了
109
92
  col = 0;
110
93
  }
111
94
  }
112
-
113
95
  var itemData = filterColumns.map(function (item, index) {
114
96
  var _item$title, _data;
115
-
116
97
  var data = (_data = {}, _defineProperty(_data, "label_".concat(index), /*#__PURE__*/React.createElement(LabelIconTip, {
117
98
  label: (_item$title = item === null || item === void 0 ? void 0 : item.title) !== null && _item$title !== void 0 ? _item$title : '',
118
99
  tooltip: item.tooltip,
119
100
  icon: item.tooltipIcon
120
101
  })), _defineProperty(_data, "value_".concat(index), /*#__PURE__*/React.createElement(React.Fragment, null, loading && /*#__PURE__*/React.createElement(ProSkeletonRaw.Info.Item, null), !loading && getInfoValueItem(item))), _data);
121
-
122
102
  if (item.colSpan) {
123
103
  data['formatter'] = {
124
104
  colSpan: item.colSpan
125
105
  };
126
106
  }
127
-
128
107
  return data;
129
108
  }).reduce(function (acc, cur) {
130
109
  return _objectSpread(_objectSpread({}, acc), cur);
131
110
  }, {});
132
111
  nResult.push(itemData);
133
112
  }
134
-
135
113
  return nResult;
136
114
  }, [loading, result]);
137
-
138
115
  var setCellProps = function setCellProps(rowIndex, colIndex, dataIndex, record) {
139
116
  if (colIndex % 2 === 0) {
140
117
  return {
141
118
  className: 'key-type'
142
119
  };
143
120
  }
144
-
145
121
  if (record.formatter) {
146
122
  if (record.formatter.colSpan) {
147
123
  if (colIndex === record.formatter.colSpan) {
@@ -149,28 +125,23 @@ var ProTableInfo = function ProTableInfo(props) {
149
125
  colSpan: record.formatter.colSpan
150
126
  };
151
127
  }
152
-
153
128
  var length = Object.keys(record).length;
154
-
155
129
  if (length <= 3) {
156
130
  return {
157
131
  colSpan: record.formatter.colSpan
158
132
  };
159
133
  }
160
-
161
134
  if (length > 5) {
162
135
  return {
163
136
  colSpan: record.formatter.colSpan
164
137
  };
165
138
  }
166
139
  }
167
-
168
140
  return {
169
141
  rowSpan: record.formatter.rowSpan
170
142
  };
171
143
  }
172
144
  };
173
-
174
145
  return /*#__PURE__*/React.createElement(Table.StickyLock, {
175
146
  className: "teamix-pro-info-table",
176
147
  cellProps: setCellProps,
@@ -180,5 +151,4 @@ var ProTableInfo = function ProTableInfo(props) {
180
151
  dataSource: newDataSource
181
152
  });
182
153
  };
183
-
184
154
  export default ProTableInfo;
package/es/info/index.js CHANGED
@@ -1,28 +1,16 @@
1
- var _excluded = ["type", "url", "method", "formatResult", "formatParams", "params", "actionRef", "header", "onSuccess", "onError", "beforeRequest", "extendParams", "className", "style", "columns", "layout", "dataSource", "loading", "extra", "context"],
2
- _excluded2 = ["context"];
3
-
1
+ var _excluded = ["type", "url", "method", "formatResult", "formatParams", "params", "actionRef", "header", "onSuccess", "onError", "beforeRequest", "extendParams", "className", "style", "columns", "layout", "dataSource", "loading", "extra", "context", "disabledAutoSize"],
2
+ _excluded2 = ["context"];
4
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; }
5
-
6
4
  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; }
7
-
8
5
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9
-
10
6
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
11
-
12
7
  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."); }
13
-
14
8
  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); }
15
-
16
9
  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; }
17
-
18
10
  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; }
19
-
20
11
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
-
22
12
  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; }
23
-
24
13
  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; }
25
-
26
14
  import React, { isValidElement, useContext, useEffect, useRef, useState, useMemo } from 'react';
27
15
  import ProTableInfo from './components/tableInfo';
28
16
  import ProHeaderInfo from './components/headerInfo';
@@ -34,67 +22,60 @@ import { doCommonRequest, cls, getTestRequestData, getTestRequestParams } from '
34
22
  import { useSize } from '@teamix/hooks';
35
23
  import { ProCard } from '..';
36
24
  export * from './typing';
37
-
38
25
  var ProInfo = function ProInfo(props) {
39
26
  var _ref;
40
-
41
27
  var _props$type = props.type,
42
- type = _props$type === void 0 ? 'base' : _props$type,
43
- url = props.url,
44
- _props$method = props.method,
45
- method = _props$method === void 0 ? 'post' : _props$method,
46
- formatResult = props.formatResult,
47
- formatParams = props.formatParams,
48
- params = props.params,
49
- propsActionRef = props.actionRef,
50
- _props$header = props.header,
51
- header = _props$header === void 0 ? {} : _props$header,
52
- onSuccess = props.onSuccess,
53
- onError = props.onError,
54
- beforeRequest = props.beforeRequest,
55
- extendParams = props.extendParams,
56
- className = props.className,
57
- style = props.style,
58
- columns = props.columns,
59
- layout = props.layout,
60
- dataSource = props.dataSource,
61
- userLoading = props.loading,
62
- extra = props.extra,
63
- infoContext = props.context,
64
- others = _objectWithoutProperties(props, _excluded);
65
-
28
+ type = _props$type === void 0 ? 'base' : _props$type,
29
+ url = props.url,
30
+ _props$method = props.method,
31
+ method = _props$method === void 0 ? 'post' : _props$method,
32
+ formatResult = props.formatResult,
33
+ formatParams = props.formatParams,
34
+ params = props.params,
35
+ propsActionRef = props.actionRef,
36
+ _props$header = props.header,
37
+ header = _props$header === void 0 ? {} : _props$header,
38
+ onSuccess = props.onSuccess,
39
+ onError = props.onError,
40
+ beforeRequest = props.beforeRequest,
41
+ extendParams = props.extendParams,
42
+ className = props.className,
43
+ style = props.style,
44
+ columns = props.columns,
45
+ layout = props.layout,
46
+ dataSource = props.dataSource,
47
+ userLoading = props.loading,
48
+ extra = props.extra,
49
+ infoContext = props.context,
50
+ disabledAutoSize = props.disabledAutoSize,
51
+ others = _objectWithoutProperties(props, _excluded);
66
52
  var _useContext = useContext(ProInfoGroupContext),
67
- contextUrl = _useContext.url,
68
- contextMethod = _useContext.method,
69
- contextParams = _useContext.params,
70
- contextFormatResult = _useContext.formatResult,
71
- contextVisible = _useContext.visible,
72
- contextSize = _useContext.size,
73
- contextOnSuccess = _useContext.onSuccess,
74
- contextOnError = _useContext.onError,
75
- contextFormatParams = _useContext.formatParams,
76
- contextBeforeRequest = _useContext.beforeRequest,
77
- contextExtendParams = _useContext.extendParams,
78
- _useContext$context = _useContext.context,
79
- contextContext = _useContext$context === void 0 ? {} : _useContext$context; // 获取容器宽度
80
-
81
-
53
+ contextUrl = _useContext.url,
54
+ contextMethod = _useContext.method,
55
+ contextParams = _useContext.params,
56
+ contextFormatResult = _useContext.formatResult,
57
+ contextVisible = _useContext.visible,
58
+ contextSize = _useContext.size,
59
+ contextOnSuccess = _useContext.onSuccess,
60
+ contextOnError = _useContext.onError,
61
+ contextFormatParams = _useContext.formatParams,
62
+ contextBeforeRequest = _useContext.beforeRequest,
63
+ contextExtendParams = _useContext.extendParams,
64
+ _useContext$context = _useContext.context,
65
+ contextContext = _useContext$context === void 0 ? {} : _useContext$context;
66
+ // 获取容器宽度
82
67
  var ref = useRef();
83
68
  var size = contextVisible ? contextSize : useSize(ref);
84
-
85
69
  var _useState = useState(false),
86
- _useState2 = _slicedToArray(_useState, 2),
87
- loading = _useState2[0],
88
- setLoading = _useState2[1]; // 请求数据
89
-
90
-
70
+ _useState2 = _slicedToArray(_useState, 2),
71
+ loading = _useState2[0],
72
+ setLoading = _useState2[1];
73
+ // 请求数据
91
74
  var _useState3 = useState(),
92
- _useState4 = _slicedToArray(_useState3, 2),
93
- data = _useState4[0],
94
- setData = _useState4[1];
95
-
75
+ _useState4 = _slicedToArray(_useState3, 2),
76
+ data = _useState4[0],
77
+ setData = _useState4[1];
96
78
  var requestDataKey = (contextMethod !== null && contextMethod !== void 0 ? contextMethod : method).toLowerCase() === 'get' ? 'params' : 'data';
97
-
98
79
  var requestConfig = _defineProperty({
99
80
  url: (_ref = contextUrl !== null && contextUrl !== void 0 ? contextUrl : url) !== null && _ref !== void 0 ? _ref : '',
100
81
  method: contextMethod !== null && contextMethod !== void 0 ? contextMethod : method,
@@ -105,7 +86,6 @@ var ProInfo = function ProInfo(props) {
105
86
  beforeRequest: contextBeforeRequest !== null && contextBeforeRequest !== void 0 ? contextBeforeRequest : beforeRequest,
106
87
  extendParams: contextExtendParams !== null && contextExtendParams !== void 0 ? contextExtendParams : extendParams
107
88
  }, requestDataKey, contextParams !== null && contextParams !== void 0 ? contextParams : params);
108
-
109
89
  useEffect(function () {
110
90
  if (url || contextUrl) {
111
91
  setLoading(false);
@@ -118,8 +98,8 @@ var ProInfo = function ProInfo(props) {
118
98
  return _objectSpread(_objectSpread({}, infoContext), {}, {
119
99
  record: dataSource !== null && dataSource !== void 0 ? dataSource : data
120
100
  }, contextContext);
121
- }, [dataSource, data]); // 获取数据
122
-
101
+ }, [dataSource, data]);
102
+ // 获取数据
123
103
  var request = function request() {
124
104
  setLoading(true);
125
105
  doCommonRequest(requestConfig).then(function (resp) {
@@ -128,38 +108,31 @@ var ProInfo = function ProInfo(props) {
128
108
  setLoading(false);
129
109
  });
130
110
  };
131
-
132
- var actionRef = useRef(); // 将 Actions 绑定到传入的 propsActionRef 中
133
-
111
+ var actionRef = useRef();
112
+ // 将 Actions 绑定到传入的 propsActionRef 中
134
113
  if (propsActionRef) {
135
114
  propsActionRef.current = actionRef.current;
136
- } // 绑定 Actions
137
-
138
-
115
+ }
116
+ // 绑定 Actions
139
117
  useActionType(actionRef, {
140
118
  refresh: function refresh() {
141
119
  request();
142
120
  }
143
121
  });
144
-
145
122
  var getExtra = function getExtra() {
146
123
  if (!extra) {
147
124
  return undefined;
148
125
  }
149
-
150
126
  if ( /*#__PURE__*/isValidElement(extra)) {
151
127
  return extra;
152
128
  }
153
-
154
129
  var _extra$context = extra.context,
155
- actionContext = _extra$context === void 0 ? {} : _extra$context,
156
- others = _objectWithoutProperties(extra, _excluded2);
157
-
130
+ actionContext = _extra$context === void 0 ? {} : _extra$context,
131
+ others = _objectWithoutProperties(extra, _excluded2);
158
132
  return _objectSpread(_objectSpread({}, others), {}, {
159
133
  context: _objectSpread(_objectSpread({}, context), actionContext)
160
134
  });
161
135
  };
162
-
163
136
  return /*#__PURE__*/React.createElement("div", {
164
137
  ref: ref,
165
138
  style: style,
@@ -181,7 +154,8 @@ var ProInfo = function ProInfo(props) {
181
154
  result: data,
182
155
  actionRef: actionRef,
183
156
  layout: layout,
184
- context: context
157
+ context: context,
158
+ disabledAutoSize: disabledAutoSize
185
159
  }), type === 'header' && /*#__PURE__*/React.createElement(ProHeaderInfo, {
186
160
  dataSource: dataSource,
187
161
  columns: columns,
@@ -191,7 +165,8 @@ var ProInfo = function ProInfo(props) {
191
165
  actionRef: actionRef,
192
166
  layout: layout,
193
167
  size: size,
194
- context: context
168
+ context: context,
169
+ disabledAutoSize: disabledAutoSize
195
170
  }), type === 'base' && /*#__PURE__*/React.createElement(ProBaseInfo, {
196
171
  dataSource: dataSource,
197
172
  columns: columns,
@@ -200,10 +175,10 @@ var ProInfo = function ProInfo(props) {
200
175
  actionRef: actionRef,
201
176
  layout: layout,
202
177
  size: size,
203
- context: context
178
+ context: context,
179
+ disabledAutoSize: disabledAutoSize
204
180
  })));
205
181
  };
206
-
207
182
  ProInfo.Group = ProInfoGroup;
208
183
  ProInfo.ProInfoGroup = ProInfoGroup;
209
184
  export default ProInfo;
@@ -51,6 +51,8 @@ export declare type ProInfoBaseProps = {
51
51
  loading?: boolean;
52
52
  /** 上下文传递 */
53
53
  context?: object;
54
+ /** 是否在获取宽度之后才渲染Info 是否忽略首次响应式计算 **/
55
+ disabledAutoSize?: boolean;
54
56
  } & ProInfoHeaderProps & ProInfoRequestProps;
55
57
  /** ProInfoColumnsProps info 单元格 定义 */
56
58
  export declare type ProInfoItemProps = ProInfoColumnsProps;
@@ -1,19 +1,14 @@
1
1
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
-
3
2
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
-
5
3
  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; }
6
-
7
4
  import { getDeepValue, getTargetValue } from '@teamix/utils';
8
5
  import React from 'react';
9
6
  export function useActionType(ref, action) {
10
7
  // 合并自定义事件
11
8
  var userAction = _objectSpread({}, action);
12
-
13
9
  ref.current = userAction;
14
10
  }
15
11
  /** ProInfoGroupContext */
16
-
17
12
  export var ProInfoGroupContext = /*#__PURE__*/React.createContext({});
18
13
  /**
19
14
  * 获取 dataIndex 值
@@ -21,14 +16,12 @@ export var ProInfoGroupContext = /*#__PURE__*/React.createContext({});
21
16
  * @param dataSource
22
17
  * @returns
23
18
  */
24
-
25
19
  export function getDataIndexValue(dataIndex, dataSource) {
26
20
  if (Array.isArray(dataIndex)) {
27
21
  return dataIndex.map(function (item) {
28
22
  return getDeepValue(item !== null && item !== void 0 ? item : '', dataSource);
29
23
  });
30
24
  }
31
-
32
25
  return getDeepValue(dataIndex !== null && dataIndex !== void 0 ? dataIndex : '', dataSource);
33
26
  }
34
27
  /**
@@ -38,7 +31,6 @@ export function getDataIndexValue(dataIndex, dataSource) {
38
31
  * @param record
39
32
  * @param context
40
33
  */
41
-
42
34
  export function isHidden(hidden, value, record, context) {
43
35
  if (typeof hidden === 'string') {
44
36
  return getTargetValue(hidden, _objectSpread(_objectSpread({}, record), {}, {
@@ -47,14 +39,11 @@ export function isHidden(hidden, value, record, context) {
47
39
  context: context
48
40
  }));
49
41
  }
50
-
51
42
  if (typeof hidden === 'boolean') {
52
43
  return hidden;
53
44
  }
54
-
55
45
  if (typeof hidden === 'function') {
56
46
  return hidden === null || hidden === void 0 ? void 0 : hidden(value, record);
57
47
  }
58
-
59
48
  return false;
60
49
  }
@@ -0,0 +1,34 @@
1
+ .theme-xconsole {
2
+ //.next-drawer-header {
3
+ // color: var(--color-text-1, #1A1A1A)
4
+ //}
5
+ //.next-message.next-message-success.next-toast .next-message-title {
6
+ // color: var(--color-text-1, #1A1A1A)
7
+ //}
8
+
9
+ --message-success-color-border-toast: var(--color-border-4, #E5E5E5);
10
+
11
+ /* --card-border-color: var(--color-text1-4, #E3E4E6); */
12
+ --card-border-color: var(--color-border-4, #E5E5E5);
13
+ /* --tab-pure-divider-border-color: var(--color-text1-4, #e5e5e5); */
14
+ --tab-pure-divider-border-color: var(--color-border-4, #E5E5E5);
15
+ --drawer-title-border-color: var(--color-border-4, #E5E5E5);
16
+
17
+ --popup-local-border-color: var(--color-border-4, #E5E5E5);
18
+
19
+ --btn-pure-normal-bg-disabled: var(--color-fill-2, #F7F7F7);
20
+ --checkbox-disabled-bg-color: var(--color-border-1, #D9D9D9);
21
+
22
+ --btn-pure-normal-border-color-disabled: var(--color-border-1, #D9D9D9);
23
+ --btn-pure-primary-border-color-disabled: var(--color-border-1, #D9D9D9);
24
+
25
+ --tab-item-margin-lr-size-m: 16px;
26
+ --tab-pure-hover-bg: transparent;
27
+
28
+ --progress-line-underlay-color: var(--color-border-4, #E5E5E5);
29
+ --range-normal-unselected-color: var(--color-border-4, #E5E5E5);
30
+
31
+ .next-formily-item-inset {
32
+ border: 1px solid var(--color-border-1, #D9D9D9);
33
+ }
34
+ }
@@ -1,27 +1,6 @@
1
1
  import { array, actions, actionGroup, filter } from './common';
2
2
  var initialValues = {
3
- columns: [{
4
- dataIndex: 'instanceName',
5
- title: '实例ID/实例名称'
6
- }, {
7
- dataIndex: 'organizationName',
8
- title: '组织',
9
- tooltip: '我这一列是可以被复制的~',
10
- render: {
11
- copy: true
12
- }
13
- }],
14
- url: 'https://oneapi.alibaba-inc.com/mock/teamix-pro/api/getTableResource',
15
- formatResult: {
16
- data: 'data',
17
- total: 'pageInfo.total'
18
- },
19
- mainAction: {
20
- actions: [{
21
- key: 'action',
22
- children: '操作按钮'
23
- }]
24
- }
3
+ columns: []
25
4
  };
26
5
  var defaultValues = {
27
6
  showSkeleton: true,
@@ -55,12 +55,11 @@ export function array(title, name, fields, main, arrayTitle) {
55
55
  }
56
56
  export function actions(props) {
57
57
  var _ref = props || {},
58
- _ref$title = _ref.title,
59
- title = _ref$title === void 0 ? '操作项' : _ref$title,
60
- _ref$name = _ref.name,
61
- name = _ref$name === void 0 ? 'actions' : _ref$name,
62
- arrayTitle = _ref.arrayTitle;
63
-
58
+ _ref$title = _ref.title,
59
+ title = _ref$title === void 0 ? '操作项' : _ref$title,
60
+ _ref$name = _ref.name,
61
+ name = _ref$name === void 0 ? 'actions' : _ref$name,
62
+ arrayTitle = _ref.arrayTitle;
64
63
  return array(title, name, [{
65
64
  name: 'children',
66
65
  title: '文字',
@@ -1,19 +1,18 @@
1
1
  import React, { useMemo } from 'react';
2
2
  import ProForm, { createForm } from '../../form';
3
+ // @ts-ignore
3
4
  export var initConfigurator = function initConfigurator(schema, defaultInitialValues, defaultValues) {
4
5
  return function (props) {
5
6
  var initialValues = props.initialValues,
6
- onValuesChange = props.onValuesChange;
7
+ onValuesChange = props.onValuesChange;
7
8
  var form = useMemo(function () {
8
9
  return createForm({
9
10
  initialValues: Object.assign({}, defaultValues, initialValues || defaultInitialValues)
10
11
  });
11
12
  }, []);
12
-
13
13
  var onChange = function onChange(values) {
14
14
  onValuesChange && onValuesChange(values);
15
15
  };
16
-
17
16
  return /*#__PURE__*/React.createElement(ProForm, {
18
17
  labelCol: 6,
19
18
  wrapperCol: 18,
@@ -1,11 +1,11 @@
1
1
  import './index.scss';
2
2
  import PageContainer from '../page-container';
3
- export { PageContainer }; // 配置器,每个 pro 组件对应一个配置器
4
-
3
+ export { PageContainer };
4
+ // 配置器,每个 pro 组件对应一个配置器
5
5
  export * from './configurators';
6
- export * from './configurators/map'; // 页面编辑器
6
+ export * from './configurators/map';
7
+ // 页面编辑器
7
8
  // 页面渲染器
8
-
9
- export * from './pages'; // 提供组件和页面编辑的页面布局
10
-
9
+ export * from './pages';
10
+ // 提供组件和页面编辑的页面布局
11
11
  export * from './playground';
@@ -6,22 +6,19 @@ import { PageMap, PageDefaultInitialValues } from '.';
6
6
  var cls = usePrefixCls('teamix-pro-pager');
7
7
  export var PageEditor = function PageEditor(props) {
8
8
  var type = props.type,
9
- initialValues = props.initialValues,
10
- field = props.field,
11
- configuratorMap = props.configuratorMap,
12
- pageMap = props.pageMap,
13
- pageDefaultInitialValues = props.pageDefaultInitialValues;
9
+ initialValues = props.initialValues,
10
+ field = props.field,
11
+ configuratorMap = props.configuratorMap,
12
+ pageMap = props.pageMap,
13
+ pageDefaultInitialValues = props.pageDefaultInitialValues;
14
14
  var values = initialValues || PageDefaultInitialValues[type] || (pageDefaultInitialValues === null || pageDefaultInitialValues === void 0 ? void 0 : pageDefaultInitialValues[type]);
15
15
  React.useEffect(function () {
16
16
  field && field.setValues(values);
17
17
  }, []);
18
-
19
18
  var onValuesChange = function onValuesChange(values) {
20
19
  field && field.setValues(values);
21
20
  };
22
-
23
21
  var Page = PageMap[type] || (pageMap === null || pageMap === void 0 ? void 0 : pageMap[type]);
24
-
25
22
  if (!Page) {
26
23
  return /*#__PURE__*/React.createElement("div", {
27
24
  className: cls('empty')
@@ -30,7 +27,6 @@ export var PageEditor = function PageEditor(props) {
30
27
  height: 160
31
28
  }), /*#__PURE__*/React.createElement("p", null, "\u9519\u8BEF\u7684\u9875\u9762\u7C7B\u578B"));
32
29
  }
33
-
34
30
  return /*#__PURE__*/React.createElement(PagePlayground, {
35
31
  page: Page,
36
32
  initialValues: values,