@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
@@ -1,9 +1,15 @@
1
1
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+
2
3
  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."); }
4
+
3
5
  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); }
6
+
4
7
  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; }
8
+
5
9
  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; }
10
+
6
11
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
+
7
13
  import { useForm } from '@formily/react';
8
14
  import { toJS } from '@formily/reactive';
9
15
  import { isArr, isPlainObj, isUsable, getValueByValue } from '@teamix/utils';
@@ -19,22 +25,25 @@ import fieldTypeMap from '../fieldTypeMap';
19
25
  };
20
26
  console.log(getDisplayValues(example));
21
27
  */
28
+
22
29
  var getDisplayValues = function getDisplayValues(form, values) {
23
30
  var prefix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
24
- var displayValues;
25
- // 拼接路径
31
+ var displayValues; // 拼接路径
32
+
26
33
  var connectPath = function connectPath(path) {
27
34
  return prefix ? "".concat(prefix, ".").concat(path) : "".concat(path);
28
- };
29
- // 根据值路径获取地址
35
+ }; // 根据值路径获取地址
36
+
37
+
30
38
  var getAddress = function getAddress(path) {
31
39
  return form.indexes[path];
32
- };
33
- // 当前field
34
- var field = form.query(getAddress(prefix)).take();
35
- // 是否真实字段值(自定义组件、布局组件、自增数组组件为非真实字段)
36
- var isFieldValue = Object.keys(fieldTypeMap).includes(field === null || field === void 0 ? void 0 : field.component[0]);
37
- // 判断值的类型,递归获取每个值在该结构中的完整路径
40
+ }; // 当前field
41
+
42
+
43
+ var field = form.query(getAddress(prefix)).take(); // 是否真实字段值(自定义组件、布局组件、自增数组组件为非真实字段)
44
+
45
+ var isFieldValue = Object.keys(fieldTypeMap).includes(field === null || field === void 0 ? void 0 : field.component[0]); // 判断值的类型,递归获取每个值在该结构中的完整路径
46
+
38
47
  if (!isUsable(values)) {
39
48
  displayValues = {};
40
49
  } else if (isPlainObj(values) && !isFieldValue) {
@@ -42,8 +51,9 @@ var getDisplayValues = function getDisplayValues(form, values) {
42
51
  displayValues = {};
43
52
  Object.entries(values).forEach(function (_ref) {
44
53
  var _ref2 = _slicedToArray(_ref, 2),
45
- key = _ref2[0],
46
- value = _ref2[1];
54
+ key = _ref2[0],
55
+ value = _ref2[1];
56
+
47
57
  displayValues[key] = getDisplayValues(form, value, connectPath(key));
48
58
  });
49
59
  } else if (isArr(values) && !isFieldValue) {
@@ -56,8 +66,10 @@ var getDisplayValues = function getDisplayValues(form, values) {
56
66
  });
57
67
  } else {
58
68
  var _values$value;
69
+
59
70
  // 通过值的完整路径获取字段address(从form实例的indexes中),然后获取该字段的value在该字段dataSource中对应的label
60
71
  var realValue = (_values$value = values === null || values === void 0 ? void 0 : values.value) !== null && _values$value !== void 0 ? _values$value : values; // 针对单个字段的值是对象,例如Select的useDetailValue
72
+
61
73
  var displayValue = getValueByValue(field === null || field === void 0 ? void 0 : field.dataSource, realValue);
62
74
  displayValues = {
63
75
  title: field === null || field === void 0 ? void 0 : field.title,
@@ -66,13 +78,17 @@ var getDisplayValues = function getDisplayValues(form, values) {
66
78
  displayValue: displayValue
67
79
  };
68
80
  }
81
+
69
82
  return displayValues;
70
83
  };
84
+
71
85
  var useFormDisplayValues = function useFormDisplayValues() {
72
86
  var form = useForm();
73
87
  return getDisplayValues(form, toJS(form.values));
74
88
  };
89
+
75
90
  var getFormDisplayValues = function getFormDisplayValues(form) {
76
91
  return getDisplayValues(form, toJS(form.values));
77
92
  };
93
+
78
94
  export { useFormDisplayValues, getFormDisplayValues };
@@ -1,10 +1,15 @@
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
+
2
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+
3
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; }
6
+
4
7
  import { doCommonRequest } from '@teamix/utils';
8
+
5
9
  var useInitialRequest = function useInitialRequest(initialRequest, context) {
6
10
  return doCommonRequest(_objectSpread({
7
11
  method: 'GET'
8
12
  }, initialRequest), context);
9
13
  };
14
+
10
15
  export default useInitialRequest;
@@ -1,5 +1,7 @@
1
1
  var _componentMap;
2
+
2
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; }
4
+
3
5
  /**
4
6
  * Formily组件在ProForm的别名
5
7
  */
@@ -10,5 +12,6 @@ export default (function (component) {
10
12
  if (componentMap[component]) {
11
13
  return componentMap[component];
12
14
  }
15
+
13
16
  return component;
14
17
  });
@@ -2,5 +2,5 @@
2
2
  * 优先使用配置,即非 undefined
3
3
  * 未配置则按默认规则为基础组件和某些聚合组件添加FormItem
4
4
  */
5
- declare const _default: (decorator?: string | null, component?: any) => string | null | undefined;
5
+ declare const _default: (decorator?: string | null | undefined, component?: any) => string | null | undefined;
6
6
  export default _default;
@@ -1,9 +1,15 @@
1
1
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
+
2
3
  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."); }
4
+
3
5
  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); }
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 _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; }
12
+
7
13
  /**
8
14
  * 优先使用配置,即非 undefined
9
15
  * 未配置则按默认规则为基础组件和某些聚合组件添加FormItem
@@ -13,8 +19,10 @@ export default (function (decorator, component) {
13
19
  if (decorator !== undefined) {
14
20
  return decorator;
15
21
  }
22
+
16
23
  if ([].concat(_toConsumableArray(Object.keys(fieldTypeMap)), ['Upload', 'SelectTable', 'ArrayCards', 'ArrayCollapse', 'ArrayTable', 'ArrayItems']).includes(component)) {
17
24
  return 'FormItem';
18
25
  }
26
+
19
27
  return decorator;
20
28
  });
@@ -1,5 +1,7 @@
1
1
  var _typeMap;
2
+
2
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; }
4
+
3
5
  /**
4
6
  * 组件的默认type类型,未指定类型为void
5
7
  */
@@ -1,19 +1,35 @@
1
1
  var _excluded = ["type", "name", "component", "props", "decorator", "decoratorProps", "dataSource", "reactions", "rules", "children", "items", "tooltip", "request", "data"];
2
+
2
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
+
3
5
  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."); }
6
+
4
7
  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; }
8
+
5
9
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
10
+
6
11
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
12
+
7
13
  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."); }
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 _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
18
+
10
19
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
20
+
11
21
  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; }
22
+
12
23
  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; }
24
+
13
25
  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; }
26
+
14
27
  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; }
28
+
15
29
  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; }
30
+
16
31
  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; }
32
+
17
33
  import React, { memo, useCallback, useRef, useMemo } from 'react';
18
34
  import { createSchemaField } from '@formily/react';
19
35
  import { cls, isUsable } from '@teamix/utils';
@@ -40,14 +56,14 @@ import { getFieldName, mapSchemaName } from '../utils';
40
56
  import warning from '../warning';
41
57
  export default /*#__PURE__*/memo(function (_ref) {
42
58
  var schema = _ref.schema,
43
- scope = _ref.scope,
44
- components = _ref.components;
45
- var schemaScopeRef = useRef({});
46
- // 创建 SchemaField
59
+ scope = _ref.scope,
60
+ components = _ref.components;
61
+ var schemaScopeRef = useRef({}); // 创建 SchemaField
62
+
47
63
  var SchemaField = useMemo(function () {
48
64
  return createSchemaField();
49
- }, []);
50
- // 格式化 schema
65
+ }, []); // 格式化 schema
66
+
51
67
  var formatSchema = useCallback(function (schema) {
52
68
  var parentSuffix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
53
69
  var schemaProperties = {};
@@ -55,113 +71,131 @@ export default /*#__PURE__*/memo(function (_ref) {
55
71
  var suffix = "".concat(parentSuffix).concat(index);
56
72
  var newItem = warning(item);
57
73
  var _newItem = newItem,
58
- originalComponent = _newItem.component;
59
- // 根据component的不同,初始化为内置的item
74
+ originalComponent = _newItem.component; // 根据component的不同,初始化为内置的item
75
+
60
76
  if (originalComponent) {
61
- if (Object.keys(fieldTypeMap).includes(originalComponent)) {
62
- // ProField接管组件
77
+ if (Object.keys(fieldTypeMap).includes(originalComponent)) {// ProField接管组件
63
78
  } else {
64
79
  // 未接管组件,判断是否为Formily组件别名
65
80
  newItem = _objectSpread(_objectSpread({}, newItem), {}, {
66
81
  component: adapterComponent(originalComponent)
67
82
  });
68
- }
69
- // 初始化高级组件 - FormButtonGroup/Subimt/Reset
83
+ } // 初始化高级组件 - FormButtonGroup/Subimt/Reset
84
+
85
+
70
86
  if (['FormButtonGroup', 'Submit', 'Reset'].includes(originalComponent)) {
71
87
  newItem = initializeFormButton(newItem);
72
- }
73
- // 初始化高级组件 - ArrayCards
88
+ } // 初始化高级组件 - ArrayCards
89
+
90
+
74
91
  if (['ArrayCards'].includes(originalComponent)) {
75
92
  newItem = initializeArrayCards(newItem);
76
- }
77
- // 初始化高级组件 - ArrayCollapse
93
+ } // 初始化高级组件 - ArrayCollapse
94
+
95
+
78
96
  if (['ArrayCollapse'].includes(originalComponent)) {
79
97
  newItem = initializeArrayCollapse(newItem);
80
- }
81
- // 初始化高级组件 - ArrayTable
98
+ } // 初始化高级组件 - ArrayTable
99
+
100
+
82
101
  if (['ArrayTable'].includes(originalComponent)) {
83
102
  newItem = initializeArrayTable(newItem);
84
- }
85
- // 初始化高级组件 - ArrayItems
103
+ } // 初始化高级组件 - ArrayItems
104
+
105
+
86
106
  if (['ArrayItems'].includes(originalComponent)) {
87
107
  newItem = initializeArrayItems(newItem);
88
- }
89
- // 初始化布局组件 - FormStep
108
+ } // 初始化布局组件 - FormStep
109
+
110
+
90
111
  if (['FormStep'].includes(originalComponent)) {
91
112
  newItem = initializeFormStep(newItem);
92
- }
93
- // 初始化布局组件 - FormGroup
113
+ } // 初始化布局组件 - FormGroup
114
+
115
+
94
116
  if (['FormGroup'].includes(originalComponent)) {
95
117
  newItem = initializeFormGroup(newItem);
96
- }
97
- // 初始化布局组件 - FormTab
118
+ } // 初始化布局组件 - FormTab
119
+
120
+
98
121
  if (['FormTab'].includes(originalComponent)) {
99
122
  newItem = initializeFormTab(newItem);
100
- }
101
- // 初始化布局组件 - FormCollapse
123
+ } // 初始化布局组件 - FormCollapse
124
+
125
+
102
126
  if (['FormCollapse'].includes(originalComponent)) {
103
127
  newItem = initializeFormCollapse(newItem);
104
- }
105
- // 初始化选择表格 - SelectTable
128
+ } // 初始化选择表格 - SelectTable
129
+
130
+
106
131
  if (['SelectTable'].includes(originalComponent)) {
107
132
  newItem = initializeSelectTable(newItem);
108
133
  }
109
134
  }
135
+
110
136
  var _newItem2 = newItem,
111
- type = _newItem2.type,
112
- name = _newItem2.name,
113
- component = _newItem2.component,
114
- props = _newItem2.props,
115
- decorator = _newItem2.decorator,
116
- decoratorProps = _newItem2.decoratorProps,
117
- dataSource = _newItem2.dataSource,
118
- reactions = _newItem2.reactions,
119
- rules = _newItem2.rules,
120
- children = _newItem2.children,
121
- items = _newItem2.items,
122
- tooltip = _newItem2.tooltip,
123
- request = _newItem2.request,
124
- data = _newItem2.data,
125
- otherProps = _objectWithoutProperties(_newItem2, _excluded);
126
- // 默认字段名
127
- var defaultName = !name ? getFieldName(component === null || component === void 0 ? void 0 : component.replace(/\./g, ''), suffix) : name;
128
- // 默认类型
129
- var defaultType = adapterType(type, originalComponent);
130
- // 默认装饰组件
131
- var defaultDecorator = adapterDecorator(decorator, originalComponent);
132
- // 默认装饰组件属性
137
+ type = _newItem2.type,
138
+ name = _newItem2.name,
139
+ component = _newItem2.component,
140
+ props = _newItem2.props,
141
+ decorator = _newItem2.decorator,
142
+ decoratorProps = _newItem2.decoratorProps,
143
+ dataSource = _newItem2.dataSource,
144
+ reactions = _newItem2.reactions,
145
+ rules = _newItem2.rules,
146
+ children = _newItem2.children,
147
+ items = _newItem2.items,
148
+ tooltip = _newItem2.tooltip,
149
+ request = _newItem2.request,
150
+ data = _newItem2.data,
151
+ otherProps = _objectWithoutProperties(_newItem2, _excluded); // 默认字段名
152
+
153
+
154
+ var defaultName = !name ? getFieldName(component === null || component === void 0 ? void 0 : component.replace(/\./g, ''), suffix) : name; // 默认类型
155
+
156
+ var defaultType = adapterType(type, originalComponent); // 默认装饰组件
157
+
158
+ var defaultDecorator = adapterDecorator(decorator, originalComponent); // 默认装饰组件属性
159
+
133
160
  var tooltipProps = tooltip ? {
134
161
  tooltip: tooltip
135
162
  } : {};
136
- var defaultDecoratorProps = _objectSpread(_objectSpread({}, tooltipProps), decoratorProps);
137
- // 初始化request
163
+
164
+ var defaultDecoratorProps = _objectSpread(_objectSpread({}, tooltipProps), decoratorProps); // 初始化request
165
+
166
+
138
167
  var _initializeRequest = initializeRequest(request, "".concat(suffix, "r")),
139
- requestReactions = _initializeRequest.reactions,
140
- requestScope = _initializeRequest.scope;
141
- // 初始化dataSource
168
+ requestReactions = _initializeRequest.reactions,
169
+ requestScope = _initializeRequest.scope; // 初始化dataSource
170
+
171
+
142
172
  var _initializeDataSource = initializeDataSource(dataSource, "".concat(suffix, "d")),
143
- defaultDataSource = _initializeDataSource.dataSource,
144
- dataSourceReactions = _initializeDataSource.reactions,
145
- dataSourceScope = _initializeDataSource.scope,
146
- dataSourceData = _initializeDataSource.data,
147
- dataSourceProps = _initializeDataSource.props;
148
- // 初始化rules validator
173
+ defaultDataSource = _initializeDataSource.dataSource,
174
+ dataSourceReactions = _initializeDataSource.reactions,
175
+ dataSourceScope = _initializeDataSource.scope,
176
+ dataSourceData = _initializeDataSource.data,
177
+ dataSourceProps = _initializeDataSource.props; // 初始化rules validator
178
+
179
+
149
180
  var _initializeRules = initializeRules(rules, "".concat(suffix, "v")),
150
- defaultRules = _initializeRules.rules,
151
- rulesScope = _initializeRules.scope;
152
- // 合并reactions,初始化reactions
153
- var defaultReactions = initializeReactions(reactions, [].concat(_toConsumableArray(requestReactions), _toConsumableArray(dataSourceReactions)));
154
- // 合并scope
181
+ defaultRules = _initializeRules.rules,
182
+ rulesScope = _initializeRules.scope; // 合并reactions,初始化reactions
183
+
184
+
185
+ var defaultReactions = initializeReactions(reactions, [].concat(_toConsumableArray(requestReactions), _toConsumableArray(dataSourceReactions))); // 合并scope
186
+
155
187
  Object.entries(_objectSpread(_objectSpread(_objectSpread({}, requestScope), dataSourceScope), rulesScope)).map(function (_ref2) {
156
188
  var _ref3 = _slicedToArray(_ref2, 2),
157
- k = _ref3[0],
158
- v = _ref3[1];
189
+ k = _ref3[0],
190
+ v = _ref3[1];
191
+
159
192
  schemaScopeRef.current[k] = v;
160
- });
161
- // 合并字段属性
193
+ }); // 合并字段属性
194
+
162
195
  var defaultProps = _objectSpread(_objectSpread(_objectSpread({}, props), dataSourceProps), {}, {
163
196
  className: cls(props === null || props === void 0 ? void 0 : props.className, dataSourceProps === null || dataSourceProps === void 0 ? void 0 : dataSourceProps.className)
164
197
  });
198
+
165
199
  var formatParam = mapSchemaName(_objectSpread(_objectSpread({}, otherProps), {}, {
166
200
  type: defaultType,
167
201
  component: component,
@@ -174,15 +208,15 @@ export default /*#__PURE__*/memo(function (_ref) {
174
208
  data: _objectSpread(_objectSpread(_objectSpread({}, data), dataSourceData), {}, {
175
209
  __placeholder: true
176
210
  })
177
- }));
178
- // 递归子组件
211
+ })); // 递归子组件
212
+
179
213
  var recursiveProperties = (children === null || children === void 0 ? void 0 : children.length) ? {
180
214
  properties: formatSchema(children, suffix)
181
- } : {};
182
- // 递归items(类似子组件,会先由各initialize方法格式化为固定形式,type不同不统一处理)
215
+ } : {}; // 递归items(类似子组件,会先由各initialize方法格式化为固定形式,type不同不统一处理)
183
216
  // 例如:[{ name: 'items', type: 'object', children: items }]
184
- var recursiveItems = items ? formatSchema([items], suffix) : {};
185
- // 配置组件属性
217
+
218
+ var recursiveItems = items ? formatSchema([items], suffix) : {}; // 配置组件属性
219
+
186
220
  if (isUsable(item)) {
187
221
  schemaProperties[defaultName] = _objectSpread(_objectSpread(_objectSpread({}, formatParam), recursiveProperties), recursiveItems);
188
222
  }
@@ -195,12 +229,14 @@ export default /*#__PURE__*/memo(function (_ref) {
195
229
  properties: formatSchema(schema)
196
230
  };
197
231
  }, [schema]);
232
+
198
233
  var mergedScope = _objectSpread(_objectSpread({}, scope), {}, {
199
234
  $request: $request,
200
235
  $common: $common,
201
236
  $dataSource: $dataSource,
202
237
  $validator: $validator
203
238
  }, schemaScopeRef.current);
239
+
204
240
  return /*#__PURE__*/React.createElement(SchemaField, {
205
241
  schema: formilySchema,
206
242
  components: components,
@@ -1,18 +1,24 @@
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
+
2
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+
3
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; }
6
+
4
7
  var initializeItems = function initializeItems(items) {
5
8
  if (items) {
6
9
  return _objectSpread(_objectSpread({}, items), {}, {
7
10
  name: 'items'
8
11
  });
9
12
  }
13
+
10
14
  return items;
11
15
  };
16
+
12
17
  var initialize = function initialize(item) {
13
18
  var items = item.items;
14
19
  return _objectSpread(_objectSpread({}, item), {}, {
15
20
  items: items ? initializeItems(items) : {}
16
21
  });
17
22
  };
23
+
18
24
  export default initialize;
@@ -1,18 +1,24 @@
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
+
2
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+
3
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; }
6
+
4
7
  var initializeItems = function initializeItems(items) {
5
8
  if (items) {
6
9
  return _objectSpread(_objectSpread({}, items), {}, {
7
10
  name: 'items'
8
11
  });
9
12
  }
13
+
10
14
  return items;
11
15
  };
16
+
12
17
  var initialize = function initialize(item) {
13
18
  var items = item.items;
14
19
  return _objectSpread(_objectSpread({}, item), {}, {
15
20
  items: items ? initializeItems(items) : {}
16
21
  });
17
22
  };
23
+
18
24
  export default initialize;
@@ -1,14 +1,19 @@
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
+
2
3
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+
3
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; }
6
+
4
7
  var initializeItems = function initializeItems(items) {
5
8
  if (items) {
6
9
  return _objectSpread(_objectSpread({}, items), {}, {
7
10
  name: 'items'
8
11
  });
9
12
  }
13
+
10
14
  return items;
11
15
  };
16
+
12
17
  var initializeChildren = function initializeChildren(item) {
13
18
  var decoratorProps = item.decoratorProps;
14
19
  return _objectSpread(_objectSpread({}, item), decoratorProps ? {
@@ -17,10 +22,11 @@ var initializeChildren = function initializeChildren(item) {
17
22
  }, decoratorProps)
18
23
  } : {});
19
24
  };
25
+
20
26
  var initialize = function initialize(item) {
21
27
  var _item$children = item.children,
22
- children = _item$children === void 0 ? [] : _item$children,
23
- items = item.items;
28
+ children = _item$children === void 0 ? [] : _item$children,
29
+ items = item.items;
24
30
  return _objectSpread(_objectSpread({}, item), {}, {
25
31
  children: children.map(function (item) {
26
32
  return initializeChildren(item);
@@ -28,4 +34,5 @@ var initialize = function initialize(item) {
28
34
  items: items ? initializeItems(items) : {}
29
35
  });
30
36
  };
37
+
31
38
  export default initialize;
@@ -1,31 +1,39 @@
1
1
  var _excluded = ["title", "decoratorProps"],
2
- _excluded2 = ["title", "dataIndex", "cell", "htmlTitle", "sortable", "width", "align", "alignHeader", "filters", "filterMode", "filterMenuProps", "lock", "resizable", "colSpan"];
2
+ _excluded2 = ["title", "dataIndex", "cell", "htmlTitle", "sortable", "width", "align", "alignHeader", "filters", "filterMode", "filterMenuProps", "lock", "resizable", "colSpan"];
3
+
3
4
  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
+
4
6
  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
+
5
8
  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
+
6
10
  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; }
11
+
7
12
  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; }
13
+
8
14
  var initializeColumn = function initializeColumn(item) {
9
15
  var title = item.title,
10
- _item$decoratorProps = item.decoratorProps,
11
- decoratorProps = _item$decoratorProps === void 0 ? {} : _item$decoratorProps,
12
- children = _objectWithoutProperties(item, _excluded);
13
- // 将Table.Column属性和组件FormItem属性通过decoratorProps统一传入,再分别赋值
16
+ _item$decoratorProps = item.decoratorProps,
17
+ decoratorProps = _item$decoratorProps === void 0 ? {} : _item$decoratorProps,
18
+ children = _objectWithoutProperties(item, _excluded); // 将Table.Column属性和组件FormItem属性通过decoratorProps统一传入,再分别赋值
19
+
20
+
14
21
  var columnTitle = decoratorProps.title,
15
- dataIndex = decoratorProps.dataIndex,
16
- cell = decoratorProps.cell,
17
- htmlTitle = decoratorProps.htmlTitle,
18
- sortable = decoratorProps.sortable,
19
- width = decoratorProps.width,
20
- align = decoratorProps.align,
21
- alignHeader = decoratorProps.alignHeader,
22
- filters = decoratorProps.filters,
23
- filterMode = decoratorProps.filterMode,
24
- filterMenuProps = decoratorProps.filterMenuProps,
25
- lock = decoratorProps.lock,
26
- resizable = decoratorProps.resizable,
27
- colSpan = decoratorProps.colSpan,
28
- formItemDecoratorProps = _objectWithoutProperties(decoratorProps, _excluded2);
22
+ dataIndex = decoratorProps.dataIndex,
23
+ cell = decoratorProps.cell,
24
+ htmlTitle = decoratorProps.htmlTitle,
25
+ sortable = decoratorProps.sortable,
26
+ width = decoratorProps.width,
27
+ align = decoratorProps.align,
28
+ alignHeader = decoratorProps.alignHeader,
29
+ filters = decoratorProps.filters,
30
+ filterMode = decoratorProps.filterMode,
31
+ filterMenuProps = decoratorProps.filterMenuProps,
32
+ lock = decoratorProps.lock,
33
+ resizable = decoratorProps.resizable,
34
+ colSpan = decoratorProps.colSpan,
35
+ formItemDecoratorProps = _objectWithoutProperties(decoratorProps, _excluded2);
36
+
29
37
  var columnProperties = {
30
38
  title: title !== null && title !== void 0 ? title : columnTitle,
31
39
  dataIndex: dataIndex,
@@ -50,9 +58,11 @@ var initializeColumn = function initializeColumn(item) {
50
58
  })]
51
59
  };
52
60
  };
61
+
53
62
  var initializeItems = function initializeItems(items) {
54
63
  if (items) {
55
64
  var _items$children;
65
+
56
66
  return _objectSpread(_objectSpread({}, items), {}, {
57
67
  name: 'items',
58
68
  children: (_items$children = items.children) === null || _items$children === void 0 ? void 0 : _items$children.map(function (item) {
@@ -60,12 +70,14 @@ var initializeItems = function initializeItems(items) {
60
70
  })
61
71
  });
62
72
  }
73
+
63
74
  return items;
64
75
  };
76
+
65
77
  var initialize = function initialize(item) {
66
78
  var _item$props = item.props,
67
- props = _item$props === void 0 ? {} : _item$props,
68
- items = item.items;
79
+ props = _item$props === void 0 ? {} : _item$props,
80
+ items = item.items;
69
81
  return _objectSpread(_objectSpread({}, item), {}, {
70
82
  props: _objectSpread({
71
83
  pagination: {
@@ -75,4 +87,5 @@ var initialize = function initialize(item) {
75
87
  items: items ? initializeItems(items) : {}
76
88
  });
77
89
  };
90
+
78
91
  export default initialize;