@teamix/pro 1.0.22 → 1.1.0

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 (443) hide show
  1. package/dist/all.css +1 -1
  2. package/dist/all.js +12421 -13334
  3. package/dist/all.min.css +1 -1
  4. package/dist/all.min.js +1 -1
  5. package/es/actions/base.d.ts +13 -0
  6. package/es/actions/base.js +23 -0
  7. package/es/actions/confirm.d.ts +7 -0
  8. package/es/actions/confirm.js +11 -0
  9. package/es/actions/danger-confirm.d.ts +7 -0
  10. package/es/actions/danger-confirm.js +14 -0
  11. package/es/actions/dialog-component.d.ts +10 -0
  12. package/es/actions/dialog-component.js +25 -0
  13. package/es/actions/dialog-form.d.ts +15 -0
  14. package/es/actions/dialog-form.js +129 -0
  15. package/es/actions/dialog-table.d.ts +4 -0
  16. package/es/actions/dialog-table.js +1 -0
  17. package/es/actions/dialog.d.ts +17 -0
  18. package/es/actions/dialog.js +197 -0
  19. package/es/actions/drawer-form.d.ts +6 -0
  20. package/es/actions/drawer-form.js +7 -0
  21. package/es/actions/drawer-table.d.ts +2 -0
  22. package/es/actions/drawer-table.js +1 -0
  23. package/es/actions/drawer.d.ts +6 -0
  24. package/es/actions/drawer.js +7 -0
  25. package/es/actions/error.d.ts +7 -0
  26. package/es/actions/error.js +11 -0
  27. package/es/actions/index.d.ts +76 -0
  28. package/es/actions/index.js +317 -0
  29. package/es/actions/index.scss +34 -0
  30. package/es/actions/link.d.ts +14 -0
  31. package/es/actions/link.js +45 -0
  32. package/es/actions/notice.d.ts +7 -0
  33. package/es/actions/notice.js +11 -0
  34. package/es/actions/request.d.ts +9 -0
  35. package/es/actions/request.js +60 -0
  36. package/es/card/index.d.ts +30 -0
  37. package/es/card/index.js +159 -0
  38. package/es/card/index.scss +98 -0
  39. package/es/field/index.d.ts +3 -0
  40. package/es/field/index.js +3 -0
  41. package/es/form/Components/Editable/index.d.ts +20 -0
  42. package/es/form/Components/Editable/index.js +228 -0
  43. package/es/form/Components/FormGroup/index.d.ts +13 -0
  44. package/es/form/Components/FormGroup/index.js +89 -0
  45. package/es/form/Components/FormGroup/index.scss +23 -0
  46. package/es/form/Components/ProField/index.d.ts +150 -0
  47. package/es/form/Components/ProField/index.js +53 -0
  48. package/es/form/Components/Query/index.d.ts +4 -0
  49. package/es/form/Components/Query/index.js +70 -0
  50. package/es/form/Components/Query/index.scss +90 -0
  51. package/es/form/Components/QueryFilter/index.d.ts +3 -0
  52. package/es/form/Components/QueryFilter/index.js +111 -0
  53. package/es/form/Components/Search/index.d.ts +11 -0
  54. package/es/form/Components/Search/index.js +89 -0
  55. package/es/form/Filter/index.d.ts +16 -0
  56. package/es/form/Filter/index.js +218 -0
  57. package/es/form/ProForm/index.d.ts +5 -0
  58. package/es/form/ProForm/index.js +100 -0
  59. package/es/form/ProForm/index.scss +248 -0
  60. package/es/form/SchemaForm/adapterComponent.d.ts +5 -0
  61. package/es/form/SchemaForm/adapterComponent.js +17 -0
  62. package/es/form/SchemaForm/adapterDecorator.d.ts +6 -0
  63. package/es/form/SchemaForm/adapterDecorator.js +28 -0
  64. package/es/form/SchemaForm/adapterType.d.ts +5 -0
  65. package/es/form/SchemaForm/adapterType.js +54 -0
  66. package/es/form/SchemaForm/index.d.ts +4 -0
  67. package/es/form/SchemaForm/index.js +258 -0
  68. package/es/form/SchemaForm/initializeArrayCards.d.ts +3 -0
  69. package/es/form/SchemaForm/initializeArrayCards.js +69 -0
  70. package/es/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
  71. package/es/form/SchemaForm/initializeArrayCollapse.js +78 -0
  72. package/es/form/SchemaForm/initializeArrayIcon.d.ts +3 -0
  73. package/es/form/SchemaForm/initializeArrayIcon.js +50 -0
  74. package/es/form/SchemaForm/initializeArrayItems.d.ts +3 -0
  75. package/es/form/SchemaForm/initializeArrayItems.js +97 -0
  76. package/es/form/SchemaForm/initializeArrayTable.d.ts +3 -0
  77. package/es/form/SchemaForm/initializeArrayTable.js +66 -0
  78. package/es/form/SchemaForm/initializeFormButton.d.ts +3 -0
  79. package/es/form/SchemaForm/initializeFormButton.js +75 -0
  80. package/es/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
  81. package/es/form/SchemaForm/initializeFormCollapse.js +43 -0
  82. package/es/form/SchemaForm/initializeFormGroup.d.ts +3 -0
  83. package/es/form/SchemaForm/initializeFormGroup.js +46 -0
  84. package/es/form/SchemaForm/initializeFormStep.d.ts +3 -0
  85. package/es/form/SchemaForm/initializeFormStep.js +48 -0
  86. package/es/form/SchemaForm/initializeFormTab.d.ts +3 -0
  87. package/es/form/SchemaForm/initializeFormTab.js +53 -0
  88. package/es/form/SchemaForm/initializeProField.d.ts +5 -0
  89. package/es/form/SchemaForm/initializeProField.js +69 -0
  90. package/es/form/SchemaForm/initializeRequest.d.ts +11 -0
  91. package/es/form/SchemaForm/initializeRequest.js +25 -0
  92. package/es/form/SchemaForm/reactions.d.ts +4 -0
  93. package/es/form/SchemaForm/reactions.js +62 -0
  94. package/es/form/index.d.ts +20 -0
  95. package/es/form/index.js +24 -0
  96. package/es/form/typing.d.ts +78 -0
  97. package/es/form/typing.js +1 -0
  98. package/es/form/utils.d.ts +9 -0
  99. package/es/form/utils.js +108 -0
  100. package/es/form/warning.d.ts +3 -0
  101. package/es/form/warning.js +20 -0
  102. package/es/hooks/index.d.ts +2 -0
  103. package/es/hooks/index.js +2 -0
  104. package/es/index.d.ts +24 -22
  105. package/es/index.js +25 -23
  106. package/es/info/components/FormItem/index.d.ts +5 -0
  107. package/es/info/components/FormItem/index.js +63 -0
  108. package/es/info/components/FormItem/index.scss +49 -0
  109. package/es/info/components/InfoGroup/index.d.ts +5 -0
  110. package/es/info/components/InfoGroup/index.js +16 -0
  111. package/es/info/components/InfoGroup/index.scss +8 -0
  112. package/es/info/components/InfoValueItem/index.d.ts +5 -0
  113. package/es/info/components/InfoValueItem/index.js +211 -0
  114. package/es/info/components/InfoValueItem/index.scss +21 -0
  115. package/es/info/components/baseInfo/index.d.ts +7 -0
  116. package/es/info/components/baseInfo/index.js +72 -0
  117. package/es/info/components/baseInfo/index.scss +3 -0
  118. package/es/info/components/headerInfo/index.d.ts +7 -0
  119. package/es/info/components/headerInfo/index.js +84 -0
  120. package/es/info/components/headerInfo/index.scss +0 -0
  121. package/es/info/components/tableInfo/index.d.ts +8 -0
  122. package/es/info/components/tableInfo/index.js +172 -0
  123. package/es/info/components/tableInfo/index.scss +18 -0
  124. package/es/info/index.d.ts +9 -0
  125. package/es/info/index.js +85 -0
  126. package/es/info/index.scss +8 -0
  127. package/es/info/typing.d.ts +143 -0
  128. package/es/info/typing.js +1 -0
  129. package/es/info/utils/index.d.ts +3 -0
  130. package/es/info/utils/index.js +12 -0
  131. package/es/info/utils/layout.d.ts +2 -0
  132. package/es/info/utils/layout.js +58 -0
  133. package/es/info/utils/useInfoRequest.d.ts +14 -0
  134. package/es/info/utils/useInfoRequest.js +73 -0
  135. package/es/info/utils/utils.d.ts +1 -0
  136. package/es/info/utils/utils.js +13 -0
  137. package/es/layout/index.d.ts +3 -0
  138. package/es/layout/index.js +3 -0
  139. package/es/nocode/configurators/Card.d.ts +3 -0
  140. package/es/nocode/configurators/Card.js +109 -0
  141. package/es/nocode/configurators/PageHeader.d.ts +3 -0
  142. package/es/nocode/configurators/PageHeader.js +196 -0
  143. package/es/nocode/configurators/ProTable.d.ts +3 -0
  144. package/es/nocode/configurators/ProTable.js +317 -0
  145. package/es/nocode/configurators/common.d.ts +176 -0
  146. package/es/nocode/configurators/common.js +314 -0
  147. package/es/nocode/configurators/index.d.ts +15 -0
  148. package/es/nocode/configurators/index.js +27 -0
  149. package/es/nocode/configurators/map.d.ts +2 -0
  150. package/es/nocode/configurators/map.js +8 -0
  151. package/es/nocode/index.d.ts +8 -0
  152. package/es/nocode/index.js +11 -0
  153. package/es/nocode/index.scss +93 -0
  154. package/es/nocode/pages/editor.d.ts +12 -0
  155. package/es/nocode/pages/editor.js +40 -0
  156. package/es/nocode/pages/index.d.ts +14 -0
  157. package/es/nocode/pages/index.js +41 -0
  158. package/es/nocode/pages/playground.d.ts +11 -0
  159. package/es/nocode/pages/playground.js +130 -0
  160. package/es/nocode/pages/renderer.d.ts +10 -0
  161. package/es/nocode/pages/renderer.js +144 -0
  162. package/es/nocode/playground.d.ts +14 -0
  163. package/es/nocode/playground.js +68 -0
  164. package/es/page-container/index.d.ts +3 -0
  165. package/es/page-container/index.js +3 -0
  166. package/es/page-header/index.d.ts +42 -0
  167. package/es/page-header/index.js +222 -0
  168. package/es/page-header/index.scss +171 -0
  169. package/es/skeleton/index.d.ts +3 -0
  170. package/es/skeleton/index.js +3 -0
  171. package/es/table/components/Filter/index.d.ts +9 -0
  172. package/es/table/components/Filter/index.js +231 -0
  173. package/es/table/components/Filter/index.scss +23 -0
  174. package/es/table/components/Layout/index.d.ts +5 -0
  175. package/es/table/components/Layout/index.js +241 -0
  176. package/es/table/components/Layout/index.scss +39 -0
  177. package/es/table/components/QuickAction/index.d.ts +10 -0
  178. package/es/table/components/QuickAction/index.js +53 -0
  179. package/es/table/components/QuickAction/index.scss +0 -0
  180. package/es/table/components/ToolBar/DensityIcon.d.ts +4 -0
  181. package/es/table/components/ToolBar/DensityIcon.js +117 -0
  182. package/es/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
  183. package/es/table/components/ToolBar/FilterColumnIcon.js +284 -0
  184. package/es/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
  185. package/es/table/components/ToolBar/FullScreenIcon.js +89 -0
  186. package/es/table/components/ToolBar/Fullscreen.d.ts +10 -0
  187. package/es/table/components/ToolBar/Fullscreen.js +68 -0
  188. package/es/table/components/ToolBar/RefreshIcon.d.ts +4 -0
  189. package/es/table/components/ToolBar/RefreshIcon.js +45 -0
  190. package/es/table/components/ToolBar/index.d.ts +5 -0
  191. package/es/table/components/ToolBar/index.js +79 -0
  192. package/es/table/components/ToolBar/index.scss +110 -0
  193. package/es/table/index.d.ts +7 -0
  194. package/es/table/index.js +620 -0
  195. package/es/table/index.scss +104 -0
  196. package/es/table/typing.d.ts +222 -0
  197. package/es/table/typing.js +1 -0
  198. package/es/table/utils/columnRender.d.ts +13 -0
  199. package/es/table/utils/columnRender.js +185 -0
  200. package/es/table/utils/genProColumnToColumn.d.ts +9 -0
  201. package/es/table/utils/genProColumnToColumn.js +51 -0
  202. package/es/table/utils/getTableProps.d.ts +2 -0
  203. package/es/table/utils/getTableProps.js +4 -0
  204. package/es/table/utils/getTableSortIcons.d.ts +3 -0
  205. package/es/table/utils/getTableSortIcons.js +21 -0
  206. package/es/table/utils/index.d.ts +4 -0
  207. package/es/table/utils/index.js +100 -0
  208. package/es/table/utils/useTableSelection.d.ts +3 -0
  209. package/es/table/utils/useTableSelection.js +107 -0
  210. package/es/templates/Detail/index.d.ts +2 -0
  211. package/es/templates/Detail/index.js +5 -0
  212. package/es/templates/Detail/index.scss +3 -0
  213. package/es/templates/Form/index.d.ts +2 -0
  214. package/es/templates/Form/index.js +5 -0
  215. package/es/templates/Form/index.scss +3 -0
  216. package/es/templates/List/index.d.ts +9 -0
  217. package/es/templates/List/index.js +45 -0
  218. package/es/templates/List/index.scss +3 -0
  219. package/es/templates/index.d.ts +5 -0
  220. package/es/templates/index.js +7 -0
  221. package/es/templates/index.scss +3 -0
  222. package/es/utils/index.d.ts +2 -0
  223. package/es/utils/index.js +2 -0
  224. package/lib/actions/base.d.ts +13 -0
  225. package/lib/actions/base.js +33 -0
  226. package/lib/actions/confirm.d.ts +7 -0
  227. package/lib/actions/confirm.js +25 -0
  228. package/lib/actions/danger-confirm.d.ts +7 -0
  229. package/lib/actions/danger-confirm.js +28 -0
  230. package/lib/actions/dialog-component.d.ts +10 -0
  231. package/lib/actions/dialog-component.js +39 -0
  232. package/lib/actions/dialog-form.d.ts +15 -0
  233. package/lib/actions/dialog-form.js +152 -0
  234. package/lib/actions/dialog-table.d.ts +4 -0
  235. package/lib/actions/dialog-table.js +5 -0
  236. package/lib/actions/dialog.d.ts +17 -0
  237. package/lib/actions/dialog.js +219 -0
  238. package/lib/actions/drawer-form.d.ts +6 -0
  239. package/lib/actions/drawer-form.js +18 -0
  240. package/lib/actions/drawer-table.d.ts +2 -0
  241. package/lib/actions/drawer-table.js +5 -0
  242. package/lib/actions/drawer.d.ts +6 -0
  243. package/lib/actions/drawer.js +20 -0
  244. package/lib/actions/error.d.ts +7 -0
  245. package/lib/actions/error.js +25 -0
  246. package/lib/actions/index.d.ts +76 -0
  247. package/lib/actions/index.js +356 -0
  248. package/lib/actions/index.scss +34 -0
  249. package/lib/actions/link.d.ts +14 -0
  250. package/lib/actions/link.js +60 -0
  251. package/lib/actions/notice.d.ts +7 -0
  252. package/lib/actions/notice.js +25 -0
  253. package/lib/actions/request.d.ts +9 -0
  254. package/lib/actions/request.js +75 -0
  255. package/lib/card/index.d.ts +30 -0
  256. package/lib/card/index.js +179 -0
  257. package/lib/card/index.scss +98 -0
  258. package/lib/field/index.d.ts +3 -0
  259. package/lib/field/index.js +30 -0
  260. package/lib/form/Components/Editable/index.d.ts +20 -0
  261. package/lib/form/Components/Editable/index.js +251 -0
  262. package/lib/form/Components/FormGroup/index.d.ts +13 -0
  263. package/lib/form/Components/FormGroup/index.js +103 -0
  264. package/lib/form/Components/FormGroup/index.scss +23 -0
  265. package/lib/form/Components/ProField/index.d.ts +150 -0
  266. package/lib/form/Components/ProField/index.js +68 -0
  267. package/lib/form/Components/Query/index.d.ts +4 -0
  268. package/lib/form/Components/Query/index.js +91 -0
  269. package/lib/form/Components/Query/index.scss +90 -0
  270. package/lib/form/Components/QueryFilter/index.d.ts +3 -0
  271. package/lib/form/Components/QueryFilter/index.js +130 -0
  272. package/lib/form/Components/Search/index.d.ts +11 -0
  273. package/lib/form/Components/Search/index.js +103 -0
  274. package/lib/form/Filter/index.d.ts +16 -0
  275. package/lib/form/Filter/index.js +242 -0
  276. package/lib/form/ProForm/index.d.ts +5 -0
  277. package/lib/form/ProForm/index.js +125 -0
  278. package/lib/form/ProForm/index.scss +248 -0
  279. package/lib/form/SchemaForm/adapterComponent.d.ts +5 -0
  280. package/lib/form/SchemaForm/adapterComponent.js +27 -0
  281. package/lib/form/SchemaForm/adapterDecorator.d.ts +6 -0
  282. package/lib/form/SchemaForm/adapterDecorator.js +34 -0
  283. package/lib/form/SchemaForm/adapterType.d.ts +5 -0
  284. package/lib/form/SchemaForm/adapterType.js +64 -0
  285. package/lib/form/SchemaForm/index.d.ts +4 -0
  286. package/lib/form/SchemaForm/index.js +301 -0
  287. package/lib/form/SchemaForm/initializeArrayCards.d.ts +3 -0
  288. package/lib/form/SchemaForm/initializeArrayCards.js +76 -0
  289. package/lib/form/SchemaForm/initializeArrayCollapse.d.ts +3 -0
  290. package/lib/form/SchemaForm/initializeArrayCollapse.js +85 -0
  291. package/lib/form/SchemaForm/initializeArrayIcon.d.ts +3 -0
  292. package/lib/form/SchemaForm/initializeArrayIcon.js +61 -0
  293. package/lib/form/SchemaForm/initializeArrayItems.d.ts +3 -0
  294. package/lib/form/SchemaForm/initializeArrayItems.js +104 -0
  295. package/lib/form/SchemaForm/initializeArrayTable.d.ts +3 -0
  296. package/lib/form/SchemaForm/initializeArrayTable.js +73 -0
  297. package/lib/form/SchemaForm/initializeFormButton.d.ts +3 -0
  298. package/lib/form/SchemaForm/initializeFormButton.js +82 -0
  299. package/lib/form/SchemaForm/initializeFormCollapse.d.ts +3 -0
  300. package/lib/form/SchemaForm/initializeFormCollapse.js +50 -0
  301. package/lib/form/SchemaForm/initializeFormGroup.d.ts +3 -0
  302. package/lib/form/SchemaForm/initializeFormGroup.js +53 -0
  303. package/lib/form/SchemaForm/initializeFormStep.d.ts +3 -0
  304. package/lib/form/SchemaForm/initializeFormStep.js +55 -0
  305. package/lib/form/SchemaForm/initializeFormTab.d.ts +3 -0
  306. package/lib/form/SchemaForm/initializeFormTab.js +60 -0
  307. package/lib/form/SchemaForm/initializeProField.d.ts +5 -0
  308. package/lib/form/SchemaForm/initializeProField.js +76 -0
  309. package/lib/form/SchemaForm/initializeRequest.d.ts +11 -0
  310. package/lib/form/SchemaForm/initializeRequest.js +34 -0
  311. package/lib/form/SchemaForm/reactions.d.ts +4 -0
  312. package/lib/form/SchemaForm/reactions.js +72 -0
  313. package/lib/form/index.d.ts +20 -0
  314. package/lib/form/index.js +149 -0
  315. package/lib/form/typing.d.ts +78 -0
  316. package/lib/form/typing.js +5 -0
  317. package/lib/form/utils.d.ts +9 -0
  318. package/lib/form/utils.js +124 -0
  319. package/lib/form/warning.d.ts +3 -0
  320. package/lib/form/warning.js +28 -0
  321. package/lib/hooks/index.d.ts +2 -0
  322. package/lib/hooks/index.js +17 -0
  323. package/lib/index.d.ts +24 -22
  324. package/lib/index.js +84 -57
  325. package/lib/info/components/FormItem/index.d.ts +5 -0
  326. package/lib/info/components/FormItem/index.js +78 -0
  327. package/lib/info/components/FormItem/index.scss +49 -0
  328. package/lib/info/components/InfoGroup/index.d.ts +5 -0
  329. package/lib/info/components/InfoGroup/index.js +27 -0
  330. package/lib/info/components/InfoGroup/index.scss +8 -0
  331. package/lib/info/components/InfoValueItem/index.d.ts +5 -0
  332. package/lib/info/components/InfoValueItem/index.js +237 -0
  333. package/lib/info/components/InfoValueItem/index.scss +21 -0
  334. package/lib/info/components/baseInfo/index.d.ts +7 -0
  335. package/lib/info/components/baseInfo/index.js +99 -0
  336. package/lib/info/components/baseInfo/index.scss +3 -0
  337. package/lib/info/components/headerInfo/index.d.ts +7 -0
  338. package/lib/info/components/headerInfo/index.js +111 -0
  339. package/lib/info/components/headerInfo/index.scss +0 -0
  340. package/lib/info/components/tableInfo/index.d.ts +8 -0
  341. package/lib/info/components/tableInfo/index.js +193 -0
  342. package/lib/info/components/tableInfo/index.scss +18 -0
  343. package/lib/info/index.d.ts +9 -0
  344. package/lib/info/index.js +121 -0
  345. package/lib/info/index.scss +8 -0
  346. package/lib/info/typing.d.ts +143 -0
  347. package/lib/info/typing.js +5 -0
  348. package/lib/info/utils/index.d.ts +3 -0
  349. package/lib/info/utils/index.js +19 -0
  350. package/lib/info/utils/layout.d.ts +2 -0
  351. package/lib/info/utils/layout.js +65 -0
  352. package/lib/info/utils/useInfoRequest.d.ts +14 -0
  353. package/lib/info/utils/useInfoRequest.js +82 -0
  354. package/lib/info/utils/utils.d.ts +1 -0
  355. package/lib/info/utils/utils.js +20 -0
  356. package/lib/layout/index.d.ts +3 -0
  357. package/lib/layout/index.js +30 -0
  358. package/lib/nocode/configurators/Card.d.ts +3 -0
  359. package/lib/nocode/configurators/Card.js +116 -0
  360. package/lib/nocode/configurators/PageHeader.d.ts +3 -0
  361. package/lib/nocode/configurators/PageHeader.js +205 -0
  362. package/lib/nocode/configurators/ProTable.d.ts +3 -0
  363. package/lib/nocode/configurators/ProTable.js +326 -0
  364. package/lib/nocode/configurators/common.d.ts +176 -0
  365. package/lib/nocode/configurators/common.js +325 -0
  366. package/lib/nocode/configurators/index.d.ts +15 -0
  367. package/lib/nocode/configurators/index.js +44 -0
  368. package/lib/nocode/configurators/map.d.ts +2 -0
  369. package/lib/nocode/configurators/map.js +21 -0
  370. package/lib/nocode/index.d.ts +8 -0
  371. package/lib/nocode/index.js +76 -0
  372. package/lib/nocode/index.scss +93 -0
  373. package/lib/nocode/pages/editor.d.ts +12 -0
  374. package/lib/nocode/pages/editor.js +58 -0
  375. package/lib/nocode/pages/index.d.ts +14 -0
  376. package/lib/nocode/pages/index.js +93 -0
  377. package/lib/nocode/pages/playground.d.ts +11 -0
  378. package/lib/nocode/pages/playground.js +158 -0
  379. package/lib/nocode/pages/renderer.d.ts +10 -0
  380. package/lib/nocode/pages/renderer.js +164 -0
  381. package/lib/nocode/playground.d.ts +14 -0
  382. package/lib/nocode/playground.js +91 -0
  383. package/lib/page-container/index.d.ts +3 -0
  384. package/lib/page-container/index.js +30 -0
  385. package/lib/page-header/index.d.ts +42 -0
  386. package/lib/page-header/index.js +240 -0
  387. package/lib/page-header/index.scss +171 -0
  388. package/lib/skeleton/index.d.ts +3 -0
  389. package/lib/skeleton/index.js +30 -0
  390. package/lib/table/components/Filter/index.d.ts +9 -0
  391. package/lib/table/components/Filter/index.js +252 -0
  392. package/lib/table/components/Filter/index.scss +23 -0
  393. package/lib/table/components/Layout/index.d.ts +5 -0
  394. package/lib/table/components/Layout/index.js +265 -0
  395. package/lib/table/components/Layout/index.scss +39 -0
  396. package/lib/table/components/QuickAction/index.d.ts +10 -0
  397. package/lib/table/components/QuickAction/index.js +65 -0
  398. package/lib/table/components/QuickAction/index.scss +0 -0
  399. package/lib/table/components/ToolBar/DensityIcon.d.ts +4 -0
  400. package/lib/table/components/ToolBar/DensityIcon.js +135 -0
  401. package/lib/table/components/ToolBar/FilterColumnIcon.d.ts +4 -0
  402. package/lib/table/components/ToolBar/FilterColumnIcon.js +303 -0
  403. package/lib/table/components/ToolBar/FullScreenIcon.d.ts +4 -0
  404. package/lib/table/components/ToolBar/FullScreenIcon.js +107 -0
  405. package/lib/table/components/ToolBar/Fullscreen.d.ts +10 -0
  406. package/lib/table/components/ToolBar/Fullscreen.js +85 -0
  407. package/lib/table/components/ToolBar/RefreshIcon.d.ts +4 -0
  408. package/lib/table/components/ToolBar/RefreshIcon.js +60 -0
  409. package/lib/table/components/ToolBar/index.d.ts +5 -0
  410. package/lib/table/components/ToolBar/index.js +96 -0
  411. package/lib/table/components/ToolBar/index.scss +110 -0
  412. package/lib/table/index.d.ts +7 -0
  413. package/lib/table/index.js +681 -0
  414. package/lib/table/index.scss +104 -0
  415. package/lib/table/typing.d.ts +222 -0
  416. package/lib/table/typing.js +5 -0
  417. package/lib/table/utils/columnRender.d.ts +13 -0
  418. package/lib/table/utils/columnRender.js +201 -0
  419. package/lib/table/utils/genProColumnToColumn.d.ts +9 -0
  420. package/lib/table/utils/genProColumnToColumn.js +62 -0
  421. package/lib/table/utils/getTableProps.d.ts +2 -0
  422. package/lib/table/utils/getTableProps.js +13 -0
  423. package/lib/table/utils/getTableSortIcons.d.ts +3 -0
  424. package/lib/table/utils/getTableSortIcons.js +34 -0
  425. package/lib/table/utils/index.d.ts +4 -0
  426. package/lib/table/utils/index.js +112 -0
  427. package/lib/table/utils/useTableSelection.d.ts +3 -0
  428. package/lib/table/utils/useTableSelection.js +112 -0
  429. package/lib/templates/Detail/index.d.ts +2 -0
  430. package/lib/templates/Detail/index.js +18 -0
  431. package/lib/templates/Detail/index.scss +3 -0
  432. package/lib/templates/Form/index.d.ts +2 -0
  433. package/lib/templates/Form/index.js +18 -0
  434. package/lib/templates/Form/index.scss +3 -0
  435. package/lib/templates/List/index.d.ts +9 -0
  436. package/lib/templates/List/index.js +67 -0
  437. package/lib/templates/List/index.scss +3 -0
  438. package/lib/templates/index.d.ts +5 -0
  439. package/lib/templates/index.js +59 -0
  440. package/lib/templates/index.scss +3 -0
  441. package/lib/utils/index.d.ts +2 -0
  442. package/lib/utils/index.js +17 -0
  443. package/package.json +21 -11
@@ -0,0 +1,54 @@
1
+ var _typeMap;
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
+
5
+ /**
6
+ * 组件的默认type类型,未指定类型为void
7
+ */
8
+ var typeMap = (_typeMap = {
9
+ Input: 'string',
10
+ Password: 'string',
11
+ TextArea: 'string',
12
+ NumberPicker: 'number',
13
+ Percent: 'number',
14
+ Money: 'number',
15
+ Select: 'string',
16
+ MultipleSelect: 'array',
17
+ TreeSelect: 'string',
18
+ Cascader: 'string',
19
+ MultipleCascader: 'array',
20
+ ArbitraryCascader: 'string',
21
+ Radio: 'string',
22
+ Checkbox: 'array',
23
+ Switch: 'boolean',
24
+ DatePicker: 'string',
25
+ TimePicker: 'string',
26
+ DateTimePicker: 'string',
27
+ WeekPicker: 'string',
28
+ MonthPicker: 'string',
29
+ YearPicker: 'string',
30
+ QuarterPicker: 'string',
31
+ DateRangePicker: 'array',
32
+ // TimeRangePicker: 'array',
33
+ DateTimeRangePicker: 'array',
34
+ WeekRangePicker: 'array',
35
+ MonthRangePicker: 'array',
36
+ YearRangePicker: 'array',
37
+ QuarterRangePicker: 'array',
38
+ Transfer: 'array',
39
+ Upload: 'object',
40
+ ColorPicker: 'string',
41
+ ColorRadio: 'string',
42
+ ColorSwatches: 'string',
43
+ ColorTwitter: 'string',
44
+ IconPicker: 'string',
45
+ JsonInput: 'object',
46
+ Search: 'array',
47
+ ArrayCollapse: 'array',
48
+ ArrayCards: 'array',
49
+ ArrayTable: 'array',
50
+ ArrayItems: 'array'
51
+ }, _defineProperty(_typeMap, 'Editable.Popover', 'object'), _defineProperty(_typeMap, 'Editable.Dialog', 'object'), _defineProperty(_typeMap, 'Editable.Drawer', 'object'), _typeMap);
52
+ export default (function (type, component) {
53
+ return type || typeMap[component] || 'void';
54
+ });
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { IProFormProps } from '../typing';
3
+ declare const _default: React.MemoExoticComponent<({ schema, scope, components }: IProFormProps) => JSX.Element>;
4
+ export default _default;
@@ -0,0 +1,258 @@
1
+ var _excluded = ["component", "type", "name", "props", "decorator", "decoratorProps", "dataSource", "reactions", "rules", "children", "content", "items", "tooltip", "display", "visible", "hidden", "disabled", "readOnly", "readPretty", "pattern", "request"];
2
+
3
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
+
5
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
+
7
+ 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); }
8
+
9
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
10
+
11
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
12
+
13
+ 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; }
14
+
15
+ 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; }
16
+
17
+ 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; }
18
+
19
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
20
+
21
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
22
+
23
+ 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; }
24
+
25
+ import React, { memo, useCallback, useMemo } from 'react';
26
+ import { createSchemaField } from '@formily/react';
27
+ import { Upload, FormLayout, FormItem, ArrayCollapse, ArrayCards, ArrayItems, ArrayTable, Space, FormGrid, FormTab, FormCollapse, FormStep, Editable, FormDialog, FormDrawer, FormButtonGroup, Submit, Reset } from '@teamix/formily';
28
+ import ProField from '../Components/ProField';
29
+ import { EditableDialog, EditableDrawer, EditablePopover } from '../Components/Editable';
30
+ import Search from '../Components/Search';
31
+ import FormGroup from '../Components/FormGroup';
32
+ import QueryFilter from '../Components/QueryFilter';
33
+ import adapterType from './adapterType';
34
+ import adapterComponent from './adapterComponent';
35
+ import adapterDecorator from './adapterDecorator';
36
+ import initializeRequest from './initializeRequest';
37
+ import initializeProField, { proFieldTypeMap } from './initializeProField';
38
+ import initializeArrayCards from './initializeArrayCards';
39
+ import initializeArrayCollapse from './initializeArrayCollapse';
40
+ import initializeArrayTable from './initializeArrayTable';
41
+ import initializeArrayItems from './initializeArrayItems';
42
+ import initializeFormButton from './initializeFormButton';
43
+ import initializeFormGroup from './initializeFormGroup';
44
+ import initializeFormStep from './initializeFormStep';
45
+ import initializeFormTab from './initializeFormTab';
46
+ import initializeFormCollapse from './initializeFormCollapse';
47
+ import initializeArrayIcon from './initializeArrayIcon';
48
+ import { getRandomName, commonFormat } from '../utils';
49
+ import { isArr } from '@teamix/utils';
50
+ import warning from '../warning';
51
+ export default /*#__PURE__*/memo(function (_ref) {
52
+ var schema = _ref.schema,
53
+ scope = _ref.scope,
54
+ components = _ref.components;
55
+ var SchemaField = useMemo(function () {
56
+ return createSchemaField({
57
+ components: {
58
+ Upload: Upload,
59
+ ProField: ProField,
60
+ FormLayout: FormLayout,
61
+ FormItem: FormItem,
62
+ ArrayCollapse: ArrayCollapse,
63
+ ArrayCards: ArrayCards,
64
+ ArrayItems: ArrayItems,
65
+ ArrayTable: ArrayTable,
66
+ Space: Space,
67
+ FormGrid: FormGrid,
68
+ FormTab: FormTab,
69
+ FormCollapse: FormCollapse,
70
+ FormStep: FormStep,
71
+ Editable: Editable,
72
+ FormDialogFooter: FormDialog.Footer,
73
+ FormDrawerFooter: FormDrawer.Footer,
74
+ FormButtonGroup: FormButtonGroup,
75
+ Submit: Submit,
76
+ Reset: Reset,
77
+ EditableDialog: EditableDialog,
78
+ EditableDrawer: EditableDrawer,
79
+ EditablePopover: EditablePopover,
80
+ FormGroup: FormGroup,
81
+ Search: Search,
82
+ QueryFilter: QueryFilter
83
+ }
84
+ });
85
+ }, []); // 合并schema中request的scope
86
+
87
+ var newScope = useMemo(function () {
88
+ return _objectSpread({}, scope);
89
+ }, [scope]); // 格式化schema
90
+
91
+ var formatSchema = useCallback(function (schema) {
92
+ var schemaProperties = {};
93
+ schema.forEach(function (item) {
94
+ var newItem = warning(item);
95
+ var _newItem = newItem,
96
+ originalComponent = _newItem.component; // 根据component的不同,初始化为内置的item
97
+
98
+ if (originalComponent) {
99
+ if (Object.keys(proFieldTypeMap).includes(originalComponent)) {
100
+ // ProField接管组件
101
+ newItem = initializeProField(newItem);
102
+ } else {
103
+ // 未接管组件,判断是否为Formily组件别名
104
+ newItem = _objectSpread(_objectSpread({}, newItem), {}, {
105
+ component: adapterComponent(originalComponent)
106
+ });
107
+ } // 初始化高级组件 - FormButtonGroup/Subimt/Reset
108
+
109
+
110
+ if (['FormButtonGroup', 'Submit', 'Reset'].includes(originalComponent)) {
111
+ newItem = initializeFormButton(newItem);
112
+ } // 初始化高级组件 - ArrayCards
113
+
114
+
115
+ if (['ArrayCards'].includes(originalComponent)) {
116
+ newItem = initializeArrayCards(newItem);
117
+ } // 初始化高级组件 - ArrayCollapse
118
+
119
+
120
+ if (['ArrayCollapse'].includes(originalComponent)) {
121
+ newItem = initializeArrayCollapse(newItem);
122
+ } // 初始化高级组件 - ArrayTable
123
+
124
+
125
+ if (['ArrayTable'].includes(originalComponent)) {
126
+ newItem = initializeArrayTable(newItem);
127
+ } // 初始化高级组件 - ArrayItems
128
+
129
+
130
+ if (['ArrayItems'].includes(originalComponent)) {
131
+ newItem = initializeArrayItems(newItem);
132
+ } // 初始化布局组件 - FormStep
133
+
134
+
135
+ if (['FormStep'].includes(originalComponent)) {
136
+ newItem = initializeFormStep(newItem);
137
+ } // 初始化布局组件 - FormGroup
138
+
139
+
140
+ if (['FormGroup'].includes(originalComponent)) {
141
+ newItem = initializeFormGroup(newItem);
142
+ } // 初始化布局组件 - FormTab
143
+
144
+
145
+ if (['FormTab'].includes(originalComponent)) {
146
+ newItem = initializeFormTab(newItem);
147
+ } // 初始化布局组件 - FormCollapse
148
+
149
+
150
+ if (['FormCollapse'].includes(originalComponent)) {
151
+ newItem = initializeFormCollapse(newItem);
152
+ } // Array组件的Icon替换
153
+
154
+
155
+ if (/\.(Addition|Remove|MoveUp|MoveDown|SortHandle){1}$/g.test(originalComponent)) {
156
+ newItem = initializeArrayIcon(newItem);
157
+ }
158
+ }
159
+
160
+ var _newItem2 = newItem,
161
+ component = _newItem2.component,
162
+ type = _newItem2.type,
163
+ _newItem2$name = _newItem2.name,
164
+ name = _newItem2$name === void 0 ? getRandomName(component === null || component === void 0 ? void 0 : component.replace(/\./g, '')) : _newItem2$name,
165
+ props = _newItem2.props,
166
+ decorator = _newItem2.decorator,
167
+ decoratorProps = _newItem2.decoratorProps,
168
+ dataSource = _newItem2.dataSource,
169
+ reactions = _newItem2.reactions,
170
+ rules = _newItem2.rules,
171
+ children = _newItem2.children,
172
+ content = _newItem2.content,
173
+ items = _newItem2.items,
174
+ tooltip = _newItem2.tooltip,
175
+ display = _newItem2.display,
176
+ visible = _newItem2.visible,
177
+ hidden = _newItem2.hidden,
178
+ disabled = _newItem2.disabled,
179
+ readOnly = _newItem2.readOnly,
180
+ readPretty = _newItem2.readPretty,
181
+ pattern = _newItem2.pattern,
182
+ request = _newItem2.request,
183
+ otherProps = _objectWithoutProperties(_newItem2, _excluded); // 默认类型
184
+
185
+
186
+ var defaultType = adapterType(type, originalComponent); // 默认装饰组件
187
+
188
+ var defaultDecorator = adapterDecorator(decorator, originalComponent); // 默认装饰组件属性
189
+
190
+ var tooltipProps = tooltip ? {
191
+ tooltip: tooltip
192
+ } : {};
193
+
194
+ var defaultDecoratorProps = _objectSpread(_objectSpread({}, tooltipProps), decoratorProps); // 初始化request
195
+
196
+
197
+ var _initializeRequest = initializeRequest(request),
198
+ requestReactions = _initializeRequest.reactions,
199
+ requestScope = _initializeRequest.scope; // 添加request的reactions
200
+
201
+
202
+ var defaultReactions = function () {
203
+ if (isArr(reactions)) {
204
+ return [].concat(_toConsumableArray(reactions), _toConsumableArray(requestReactions));
205
+ }
206
+
207
+ if (!reactions) {
208
+ return requestReactions;
209
+ }
210
+
211
+ return reactions;
212
+ }(); // 添加request的scope
213
+
214
+
215
+ Object.keys(requestScope).map(function (item) {
216
+ newScope[item] = requestScope[item];
217
+ });
218
+ var formatParam = commonFormat({
219
+ type: defaultType,
220
+ 'x-component': component,
221
+ 'x-component-props': props,
222
+ 'x-decorator': defaultDecorator,
223
+ 'x-decorator-props': defaultDecoratorProps,
224
+ 'x-validator': rules,
225
+ 'x-reactions': defaultReactions,
226
+ 'x-display': display,
227
+ 'x-visible': visible,
228
+ 'x-hidden': hidden,
229
+ 'x-disabled': disabled,
230
+ 'x-read-only': readOnly,
231
+ 'x-read-pretty': readPretty,
232
+ 'x-pattern': pattern,
233
+ 'x-content': content,
234
+ enum: dataSource
235
+ }); // 递归子组件
236
+
237
+ var recursiveProperties = (children === null || children === void 0 ? void 0 : children.length) ? {
238
+ properties: formatSchema(children)
239
+ } : {}; // 递归items(类似子组件)
240
+
241
+ var recursiveItems = items ? formatSchema(items) : {}; // 配置组件属性
242
+
243
+ schemaProperties[name] = _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, otherProps), formatParam), recursiveProperties), recursiveItems);
244
+ });
245
+ return schemaProperties;
246
+ }, [newScope]);
247
+ var schemaPro = useMemo(function () {
248
+ return {
249
+ type: 'object',
250
+ properties: formatSchema(schema)
251
+ };
252
+ }, [formatSchema, schema]);
253
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SchemaField, {
254
+ schema: schemaPro,
255
+ components: components,
256
+ scope: newScope
257
+ }));
258
+ });
@@ -0,0 +1,3 @@
1
+ import type { IInitializeItem } from '../typing';
2
+ declare const initialize: IInitializeItem;
3
+ export default initialize;
@@ -0,0 +1,69 @@
1
+ var _excluded = ["props", "children", "items"],
2
+ _excluded2 = ["itemType"];
3
+
4
+ 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; }
5
+
6
+ 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; }
7
+
8
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
9
+
10
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
11
+
12
+ 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; }
13
+
14
+ var initializeChildren = function initializeChildren(item) {
15
+ return item;
16
+ };
17
+
18
+ var initializeAddition = function initializeAddition(item) {
19
+ return _objectSpread(_objectSpread({}, item), {}, {
20
+ component: 'ArrayCards.Addition'
21
+ });
22
+ };
23
+
24
+ var initializeString = function initializeString(items) {
25
+ return [{
26
+ name: 'items',
27
+ children: items.map(function (item) {
28
+ return initializeChildren(item);
29
+ })
30
+ }];
31
+ };
32
+
33
+ var initializeObject = function initializeObject(items) {
34
+ return [{
35
+ name: 'items',
36
+ type: 'object',
37
+ children: items.map(function (item) {
38
+ return initializeChildren(item);
39
+ })
40
+ }];
41
+ };
42
+
43
+ var initialize = function initialize(item) {
44
+ var _item$props = item.props,
45
+ props = _item$props === void 0 ? {} : _item$props,
46
+ _item$children = item.children,
47
+ children = _item$children === void 0 ? [] : _item$children,
48
+ _item$items = item.items,
49
+ items = _item$items === void 0 ? [] : _item$items,
50
+ other = _objectWithoutProperties(item, _excluded);
51
+
52
+ var _props$itemType = props.itemType,
53
+ itemType = _props$itemType === void 0 ? 'string' : _props$itemType,
54
+ otherProps = _objectWithoutProperties(props, _excluded2);
55
+
56
+ var renderItemsMap = {
57
+ string: initializeString(items),
58
+ object: initializeObject(items)
59
+ };
60
+ return _objectSpread(_objectSpread({}, other), {}, {
61
+ props: otherProps,
62
+ children: children.map(function (item) {
63
+ return initializeAddition(item);
64
+ }),
65
+ items: renderItemsMap[itemType]
66
+ });
67
+ };
68
+
69
+ export default initialize;
@@ -0,0 +1,3 @@
1
+ import type { IInitializeItem } from '../typing';
2
+ declare const initialize: IInitializeItem;
3
+ export default initialize;
@@ -0,0 +1,78 @@
1
+ var _excluded = ["props", "children", "items"],
2
+ _excluded2 = ["itemType", "title"];
3
+
4
+ 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; }
5
+
6
+ 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; }
7
+
8
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
9
+
10
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
11
+
12
+ 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; }
13
+
14
+ var initializeChildren = function initializeChildren(item) {
15
+ return item;
16
+ };
17
+
18
+ var initializeAddition = function initializeAddition(item) {
19
+ return _objectSpread(_objectSpread({}, item), {}, {
20
+ component: 'ArrayCollapse.Addition'
21
+ });
22
+ };
23
+
24
+ var initializeString = function initializeString(items, props) {
25
+ return [{
26
+ name: 'items',
27
+ component: 'ArrayCollapse.CollapsePanel',
28
+ props: props,
29
+ children: items.map(function (item) {
30
+ return initializeChildren(item);
31
+ })
32
+ }];
33
+ };
34
+
35
+ var initializeObject = function initializeObject(items, props) {
36
+ return [{
37
+ type: 'object',
38
+ name: 'items',
39
+ component: 'ArrayCollapse.CollapsePanel',
40
+ props: props,
41
+ children: items.map(function (item) {
42
+ return initializeChildren(item);
43
+ })
44
+ }];
45
+ };
46
+
47
+ var initialize = function initialize(item) {
48
+ var _item$props = item.props,
49
+ props = _item$props === void 0 ? {} : _item$props,
50
+ _item$children = item.children,
51
+ children = _item$children === void 0 ? [] : _item$children,
52
+ _item$items = item.items,
53
+ items = _item$items === void 0 ? [] : _item$items,
54
+ other = _objectWithoutProperties(item, _excluded);
55
+
56
+ var _props$itemType = props.itemType,
57
+ itemType = _props$itemType === void 0 ? 'string' : _props$itemType,
58
+ title = props.title,
59
+ otherProps = _objectWithoutProperties(props, _excluded2);
60
+
61
+ var renderItemsMap = {
62
+ string: initializeString(items, {
63
+ title: title
64
+ }),
65
+ object: initializeObject(items, {
66
+ title: title
67
+ })
68
+ };
69
+ return _objectSpread(_objectSpread({}, other), {}, {
70
+ props: otherProps,
71
+ children: children.map(function (item) {
72
+ return initializeAddition(item);
73
+ }),
74
+ items: renderItemsMap[itemType]
75
+ });
76
+ };
77
+
78
+ export default initialize;
@@ -0,0 +1,3 @@
1
+ import type { IInitializeItem } from '../typing';
2
+ declare const initialize: IInitializeItem;
3
+ export default initialize;
@@ -0,0 +1,50 @@
1
+ var _excluded = ["component", "props"];
2
+
3
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
4
+
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
6
+
7
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
8
+
9
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
+
11
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
12
+
13
+ import React from 'react';
14
+ import TeamixIcon from '@teamix/icon';
15
+
16
+ var initialize = function initialize(item) {
17
+ var component = item.component,
18
+ props = item.props,
19
+ other = _objectWithoutProperties(item, _excluded);
20
+
21
+ var iconType = '';
22
+
23
+ if (component) {
24
+ if (/Addition/.test(component)) {
25
+ iconType = 'add-line';
26
+ } else if (/Remove/.test(component)) {
27
+ iconType = 'delete-line';
28
+ } else if (/MoveUp/.test(component)) {
29
+ iconType = 'up-line';
30
+ } else if (/MoveDown/.test(component)) {
31
+ iconType = 'down-line';
32
+ } else if (/SortHandle/.test(component)) {
33
+ iconType = 'menu-line';
34
+ }
35
+ }
36
+
37
+ return _objectSpread(_objectSpread({}, other), {}, {
38
+ component: component,
39
+ props: _objectSpread({
40
+ icon: function icon(props) {
41
+ return /*#__PURE__*/React.createElement(TeamixIcon, _objectSpread({
42
+ type: iconType,
43
+ size: "small"
44
+ }, props));
45
+ }
46
+ }, props)
47
+ });
48
+ };
49
+
50
+ export default initialize;
@@ -0,0 +1,3 @@
1
+ import type { IInitializeItem } from '../typing';
2
+ declare const initialize: IInitializeItem;
3
+ export default initialize;
@@ -0,0 +1,97 @@
1
+ var _excluded = ["decoratorProps"],
2
+ _excluded2 = ["props", "children", "items"];
3
+
4
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
5
+
6
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
7
+
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
+
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
+
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
+
14
+ var initializeChildren = function initializeChildren(item) {
15
+ var decoratorProps = item.decoratorProps,
16
+ otherProps = _objectWithoutProperties(item, _excluded);
17
+
18
+ return _objectSpread({
19
+ decoratorProps: _objectSpread({
20
+ feedbackLayout: 'none'
21
+ }, decoratorProps)
22
+ }, otherProps);
23
+ };
24
+
25
+ var initializeAddition = function initializeAddition(item) {
26
+ return _objectSpread(_objectSpread({}, item), {}, {
27
+ component: 'ArrayItems.Addition'
28
+ });
29
+ };
30
+
31
+ var initializeString = function initializeString(items, props) {
32
+ return [{
33
+ name: 'items',
34
+ component: 'FormFlex',
35
+ props: props,
36
+ decoratorProps: {
37
+ feedbackLayout: 'none'
38
+ },
39
+ children: items.map(function (item) {
40
+ return initializeChildren(item);
41
+ })
42
+ }];
43
+ };
44
+
45
+ var initializeObject = function initializeObject(items, props) {
46
+ return [{
47
+ name: 'items',
48
+ type: 'object',
49
+ children: [{
50
+ component: 'FormFlex',
51
+ props: props,
52
+ children: items.map(function (item) {
53
+ return initializeChildren(item);
54
+ })
55
+ }]
56
+ }];
57
+ };
58
+
59
+ var initializeItems = function initializeItems(items, decoratorProps) {
60
+ return [{
61
+ name: 'items',
62
+ type: 'object',
63
+ decorator: 'ArrayItems.Item',
64
+ decoratorProps: decoratorProps,
65
+ children: items
66
+ }];
67
+ };
68
+
69
+ var initialize = function initialize(item) {
70
+ var _item$props = item.props,
71
+ props = _item$props === void 0 ? {} : _item$props,
72
+ _item$children = item.children,
73
+ children = _item$children === void 0 ? [] : _item$children,
74
+ _item$items = item.items,
75
+ items = _item$items === void 0 ? [] : _item$items,
76
+ otherProps = _objectWithoutProperties(item, _excluded2);
77
+
78
+ var _props$itemType = props.itemType,
79
+ itemType = _props$itemType === void 0 ? 'string' : _props$itemType,
80
+ _props$itemTypeProps = props.itemTypeProps,
81
+ itemTypeProps = _props$itemTypeProps === void 0 ? {} : _props$itemTypeProps;
82
+ var renderItemsMap = {
83
+ string: initializeString(items, itemTypeProps),
84
+ object: initializeObject(items, itemTypeProps),
85
+ card: initializeItems(items, {
86
+ type: 'card'
87
+ })
88
+ };
89
+ return _objectSpread(_objectSpread({}, otherProps), {}, {
90
+ children: children.map(function (item) {
91
+ return initializeAddition(item);
92
+ }),
93
+ items: renderItemsMap[itemType]
94
+ });
95
+ };
96
+
97
+ export default initialize;
@@ -0,0 +1,3 @@
1
+ import type { IInitializeItem } from '../typing';
2
+ declare const initialize: IInitializeItem;
3
+ export default initialize;