amis 1.4.2-beta.1 → 1.4.2-beta.15

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 (449) hide show
  1. package/lib/Schema.d.ts +11 -3
  2. package/lib/Schema.js.map +1 -1
  3. package/lib/components/AnchorNav.d.ts +22 -21
  4. package/lib/components/AnchorNav.js +7 -3
  5. package/lib/components/AnchorNav.js.map +2 -2
  6. package/lib/components/ArrayInput.d.ts +84 -84
  7. package/lib/components/AssociatedSelection.d.ts +930 -0
  8. package/lib/components/AssociatedSelection.js +89 -0
  9. package/lib/components/AssociatedSelection.js.map +13 -0
  10. package/lib/components/Badge.js +2 -2
  11. package/lib/components/Badge.js.map +2 -2
  12. package/lib/components/{ChainedCheckboxes.d.ts → ChainedSelection.d.ts} +267 -98
  13. package/lib/components/{ChainedCheckboxes.js → ChainedSelection.js} +30 -24
  14. package/lib/components/ChainedSelection.js.map +13 -0
  15. package/lib/components/Checkbox.d.ts +20 -20
  16. package/lib/components/Collapse.d.ts +51 -23
  17. package/lib/components/Collapse.js +69 -11
  18. package/lib/components/Collapse.js.map +2 -2
  19. package/lib/components/CollapseGroup.d.ts +88 -0
  20. package/lib/components/CollapseGroup.js +81 -0
  21. package/lib/components/CollapseGroup.js.map +13 -0
  22. package/lib/components/ColorPicker.d.ts +84 -84
  23. package/lib/components/DatePicker.d.ts +84 -84
  24. package/lib/components/DateRangePicker.d.ts +84 -84
  25. package/lib/components/Editor.d.ts +84 -84
  26. package/lib/components/GridNav.d.ts +52 -0
  27. package/lib/components/GridNav.js +123 -0
  28. package/lib/components/GridNav.js.map +13 -0
  29. package/lib/components/GroupedSelection.d.ts +907 -0
  30. package/lib/components/GroupedSelection.js +48 -0
  31. package/lib/components/GroupedSelection.js.map +13 -0
  32. package/lib/components/InputBox.d.ts +22 -21
  33. package/lib/components/InputBox.js +10 -2
  34. package/lib/components/InputBox.js.map +2 -2
  35. package/lib/components/Link.d.ts +29 -36
  36. package/lib/components/Link.js +14 -15
  37. package/lib/components/Link.js.map +2 -2
  38. package/lib/components/ListGroup.d.ts +21 -21
  39. package/lib/components/ModalManager.js +1 -1
  40. package/lib/components/ModalManager.js.map +2 -2
  41. package/lib/components/MonthRangePicker.d.ts +84 -84
  42. package/lib/components/NumberInput.d.ts +20 -20
  43. package/lib/components/PickerColumn.d.ts +514 -0
  44. package/lib/components/PickerColumn.js +279 -0
  45. package/lib/components/PickerColumn.js.map +13 -0
  46. package/lib/components/PickerContainer.d.ts +513 -0
  47. package/lib/components/PickerContainer.js +96 -0
  48. package/lib/components/PickerContainer.js.map +13 -0
  49. package/lib/components/Radios.d.ts +22 -21
  50. package/lib/components/Radios.js +1 -0
  51. package/lib/components/Radios.js.map +2 -2
  52. package/lib/components/Rating.d.ts +21 -21
  53. package/lib/components/ResultBox.d.ts +84 -84
  54. package/lib/components/ResultBox.js +10 -2
  55. package/lib/components/ResultBox.js.map +2 -2
  56. package/lib/components/SearchBox.d.ts +84 -84
  57. package/lib/components/SearchBox.js +4 -4
  58. package/lib/components/SearchBox.js.map +2 -2
  59. package/lib/components/Select.d.ts +245 -237
  60. package/lib/components/Select.js +25 -4
  61. package/lib/components/Select.js.map +2 -2
  62. package/lib/components/{Checkboxes.d.ts → Selection.d.ts} +273 -98
  63. package/lib/components/Selection.js +134 -0
  64. package/lib/components/Selection.js.map +13 -0
  65. package/lib/components/{TableCheckboxes.d.ts → TableSelection.d.ts} +266 -96
  66. package/lib/components/{TableCheckboxes.js → TableSelection.js} +30 -30
  67. package/lib/components/TableSelection.js.map +13 -0
  68. package/lib/components/Tabs.d.ts +20 -20
  69. package/lib/components/TabsTransfer.d.ts +84 -84
  70. package/lib/components/TabsTransfer.js +9 -9
  71. package/lib/components/TabsTransfer.js.map +2 -2
  72. package/lib/components/TabsTransferPicker.d.ts +489 -0
  73. package/lib/components/TabsTransferPicker.js +60 -0
  74. package/lib/components/TabsTransferPicker.js.map +13 -0
  75. package/lib/components/Toast.d.ts +86 -85
  76. package/lib/components/Toast.js +6 -3
  77. package/lib/components/Toast.js.map +2 -2
  78. package/lib/components/Transfer.d.ts +908 -274
  79. package/lib/components/Transfer.js +31 -24
  80. package/lib/components/Transfer.js.map +2 -2
  81. package/lib/components/TransferDropDown.d.ts +488 -0
  82. package/lib/components/TransferDropDown.js +59 -0
  83. package/lib/components/TransferDropDown.js.map +13 -0
  84. package/lib/components/TransferPicker.d.ts +493 -0
  85. package/lib/components/TransferPicker.js +60 -0
  86. package/lib/components/TransferPicker.js.map +13 -0
  87. package/lib/components/Tree.d.ts +115 -84
  88. package/lib/components/Tree.js +183 -30
  89. package/lib/components/Tree.js.map +2 -2
  90. package/lib/components/{TreeCheckboxes.d.ts → TreeSelection.d.ts} +269 -99
  91. package/lib/components/{TreeCheckboxes.js → TreeSelection.js} +36 -32
  92. package/lib/components/TreeSelection.js.map +13 -0
  93. package/lib/components/WithRemoteConfig.js +1 -1
  94. package/lib/components/WithRemoteConfig.js.map +2 -2
  95. package/lib/components/condition-builder/Field.js +5 -2
  96. package/lib/components/condition-builder/Field.js.map +2 -2
  97. package/lib/components/condition-builder/Func.js +2 -2
  98. package/lib/components/condition-builder/Func.js.map +2 -2
  99. package/lib/components/condition-builder/InputSwitch.js +2 -2
  100. package/lib/components/condition-builder/InputSwitch.js.map +2 -2
  101. package/lib/components/condition-builder/Item.js +3 -3
  102. package/lib/components/condition-builder/Item.js.map +2 -2
  103. package/lib/components/icons.js +2 -0
  104. package/lib/components/icons.js.map +2 -2
  105. package/lib/components/index.d.ts +8 -8
  106. package/lib/components/index.js +16 -16
  107. package/lib/components/index.js.map +2 -2
  108. package/lib/envOverwrite.d.ts +1 -1
  109. package/lib/envOverwrite.js +24 -9
  110. package/lib/envOverwrite.js.map +2 -2
  111. package/lib/factory.d.ts +15 -1
  112. package/lib/factory.js +35 -6
  113. package/lib/factory.js.map +2 -2
  114. package/lib/helper.css.map +1 -1
  115. package/lib/hooks/index.d.ts +5 -0
  116. package/lib/hooks/index.js +14 -0
  117. package/lib/hooks/index.js.map +13 -0
  118. package/lib/hooks/use-set-state.d.ts +2 -0
  119. package/lib/hooks/use-set-state.js +15 -0
  120. package/lib/hooks/use-set-state.js.map +13 -0
  121. package/lib/hooks/use-touch.d.ts +16 -0
  122. package/lib/hooks/use-touch.js +73 -0
  123. package/lib/hooks/use-touch.js.map +13 -0
  124. package/lib/hooks/use-update-effect.d.ts +3 -0
  125. package/lib/hooks/use-update-effect.js +17 -0
  126. package/lib/hooks/use-update-effect.js.map +13 -0
  127. package/lib/icons/download.js +7 -0
  128. package/lib/icons/drag-bar.js +10 -3
  129. package/lib/index.d.ts +5 -0
  130. package/lib/index.js +6 -1
  131. package/lib/index.js.map +2 -2
  132. package/lib/locale/de-DE.js +2 -0
  133. package/lib/locale/de-DE.js.map +2 -2
  134. package/lib/locale/en-US.js +3 -0
  135. package/lib/locale/en-US.js.map +2 -2
  136. package/lib/locale/zh-CN.js +5 -2
  137. package/lib/locale/zh-CN.js.map +2 -2
  138. package/lib/renderers/Action.d.ts +4 -3
  139. package/lib/renderers/Action.js +17 -4
  140. package/lib/renderers/Action.js.map +2 -2
  141. package/lib/renderers/AnchorNav.d.ts +1 -0
  142. package/lib/renderers/AnchorNav.js +2 -2
  143. package/lib/renderers/AnchorNav.js.map +2 -2
  144. package/lib/renderers/Avatar.js +3 -3
  145. package/lib/renderers/Avatar.js.map +2 -2
  146. package/lib/renderers/Breadcrumb.js +1 -1
  147. package/lib/renderers/Breadcrumb.js.map +2 -2
  148. package/lib/renderers/CRUD.d.ts +9 -0
  149. package/lib/renderers/CRUD.js +24 -4
  150. package/lib/renderers/CRUD.js.map +2 -2
  151. package/lib/renderers/Card.d.ts +4 -0
  152. package/lib/renderers/Card.js +29 -23
  153. package/lib/renderers/Card.js.map +2 -2
  154. package/lib/renderers/Chart.js +1 -1
  155. package/lib/renderers/Chart.js.map +2 -2
  156. package/lib/renderers/Collapse.d.ts +25 -20
  157. package/lib/renderers/Collapse.js +10 -72
  158. package/lib/renderers/Collapse.js.map +2 -2
  159. package/lib/renderers/CollapseGroup.d.ts +42 -0
  160. package/lib/renderers/CollapseGroup.js +33 -0
  161. package/lib/renderers/CollapseGroup.js.map +13 -0
  162. package/lib/renderers/DropDownButton.js +1 -1
  163. package/lib/renderers/DropDownButton.js.map +2 -2
  164. package/lib/renderers/Form/DiffEditor.d.ts +4 -3
  165. package/lib/renderers/Form/Editor.d.ts +3 -2
  166. package/lib/renderers/Form/InputCity.d.ts +84 -84
  167. package/lib/renderers/Form/InputCity.js +7 -6
  168. package/lib/renderers/Form/InputCity.js.map +2 -2
  169. package/lib/renderers/Form/InputColor.d.ts +84 -84
  170. package/lib/renderers/Form/InputFile.d.ts +6 -0
  171. package/lib/renderers/Form/InputFile.js +28 -8
  172. package/lib/renderers/Form/InputFile.js.map +2 -2
  173. package/lib/renderers/Form/InputImage.js +11 -4
  174. package/lib/renderers/Form/InputImage.js.map +2 -2
  175. package/lib/renderers/Form/Item.d.ts +1 -1
  176. package/lib/renderers/Form/Item.js +2 -1
  177. package/lib/renderers/Form/Item.js.map +2 -2
  178. package/lib/renderers/Form/Options.js +13 -3
  179. package/lib/renderers/Form/Options.js.map +2 -2
  180. package/lib/renderers/Form/Select.d.ts +42 -4
  181. package/lib/renderers/Form/Select.js +37 -3
  182. package/lib/renderers/Form/Select.js.map +2 -2
  183. package/lib/renderers/Form/TabsTransferPicker.d.ts +48 -0
  184. package/lib/renderers/Form/TabsTransferPicker.js +29 -0
  185. package/lib/renderers/Form/TabsTransferPicker.js.map +13 -0
  186. package/lib/renderers/Form/Transfer.js +18 -3
  187. package/lib/renderers/Form/Transfer.js.map +2 -2
  188. package/lib/renderers/Form/TransferPicker.d.ts +52 -0
  189. package/lib/renderers/Form/TransferPicker.js +43 -0
  190. package/lib/renderers/Form/TransferPicker.js.map +13 -0
  191. package/lib/renderers/Form/TreeSelect.js +2 -2
  192. package/lib/renderers/Form/TreeSelect.js.map +2 -2
  193. package/lib/renderers/Form/index.d.ts +5 -0
  194. package/lib/renderers/Form/index.js +5 -3
  195. package/lib/renderers/Form/index.js.map +2 -2
  196. package/lib/renderers/Form/wrapControl.js +13 -1
  197. package/lib/renderers/Form/wrapControl.js.map +2 -2
  198. package/lib/renderers/GridNav.d.ts +99 -0
  199. package/lib/renderers/GridNav.js +82 -0
  200. package/lib/renderers/GridNav.js.map +13 -0
  201. package/lib/renderers/IFrame.js +1 -3
  202. package/lib/renderers/IFrame.js.map +2 -2
  203. package/lib/renderers/Json.d.ts +4 -0
  204. package/lib/renderers/Json.js +4 -13
  205. package/lib/renderers/Json.js.map +2 -2
  206. package/lib/renderers/Link.d.ts +4 -2
  207. package/lib/renderers/Link.js +15 -6
  208. package/lib/renderers/Link.js.map +2 -2
  209. package/lib/renderers/List.js +1 -1
  210. package/lib/renderers/List.js.map +2 -2
  211. package/lib/renderers/Mapping.d.ts +9 -2
  212. package/lib/renderers/Mapping.js +18 -6
  213. package/lib/renderers/Mapping.js.map +2 -2
  214. package/lib/renderers/Nav.d.ts +21 -21
  215. package/lib/renderers/Nav.js +39 -21
  216. package/lib/renderers/Nav.js.map +2 -2
  217. package/lib/renderers/Portlet.d.ts +125 -0
  218. package/lib/renderers/Portlet.js +156 -0
  219. package/lib/renderers/Portlet.js.map +13 -0
  220. package/lib/renderers/Property.js +2 -1
  221. package/lib/renderers/Property.js.map +2 -2
  222. package/lib/renderers/SearchBox.d.ts +6 -1
  223. package/lib/renderers/SearchBox.js +19 -5
  224. package/lib/renderers/SearchBox.js.map +2 -2
  225. package/lib/renderers/Table/TableContent.d.ts +4 -1
  226. package/lib/renderers/Table/TableContent.js +21 -1
  227. package/lib/renderers/Table/TableContent.js.map +2 -2
  228. package/lib/renderers/Table/index.d.ts +5 -1
  229. package/lib/renderers/Table/index.js +65 -30
  230. package/lib/renderers/Table/index.js.map +2 -2
  231. package/lib/renderers/Tabs.js +9 -1
  232. package/lib/renderers/Tabs.js.map +2 -2
  233. package/lib/renderers/WebComponent.js +1 -1
  234. package/lib/renderers/WebComponent.js.map +2 -2
  235. package/lib/store/combo.d.ts +2 -16
  236. package/lib/store/crud.js +3 -7
  237. package/lib/store/crud.js.map +2 -2
  238. package/lib/store/form.d.ts +1 -1
  239. package/lib/store/form.js +5 -6
  240. package/lib/store/form.js.map +2 -2
  241. package/lib/store/formItem.js +44 -4
  242. package/lib/store/formItem.js.map +2 -2
  243. package/lib/store/service.js +5 -4
  244. package/lib/store/service.js.map +2 -2
  245. package/lib/store/table.d.ts +3 -2
  246. package/lib/store/table.js +35 -12
  247. package/lib/store/table.js.map +2 -2
  248. package/lib/themes/ang-ie11.css +689 -175
  249. package/lib/themes/ang.css +689 -175
  250. package/lib/themes/ang.css.map +1 -1
  251. package/lib/themes/antd-ie11.css +689 -175
  252. package/lib/themes/antd.css +689 -175
  253. package/lib/themes/antd.css.map +1 -1
  254. package/lib/themes/cxd-ie11.css +728 -213
  255. package/lib/themes/cxd.css +728 -213
  256. package/lib/themes/cxd.css.map +1 -1
  257. package/lib/themes/dark-ie11.css +689 -175
  258. package/lib/themes/dark.css +689 -175
  259. package/lib/themes/dark.css.map +1 -1
  260. package/lib/themes/default.css +728 -213
  261. package/lib/themes/default.css.map +1 -1
  262. package/lib/types.d.ts +38 -1
  263. package/lib/types.js +0 -5
  264. package/lib/types.js.map +2 -2
  265. package/lib/utils/api.d.ts +4 -2
  266. package/lib/utils/api.js +104 -17
  267. package/lib/utils/api.js.map +2 -2
  268. package/lib/utils/dom.d.ts +4 -0
  269. package/lib/utils/dom.js +11 -1
  270. package/lib/utils/dom.js.map +2 -2
  271. package/lib/utils/helper.d.ts +8 -0
  272. package/lib/utils/helper.js +28 -2
  273. package/lib/utils/helper.js.map +2 -2
  274. package/lib/utils/icon.js +3 -0
  275. package/lib/utils/icon.js.map +2 -2
  276. package/package.json +1 -1
  277. package/schema.json +3326 -836
  278. package/scss/_mixins.scss +1 -3
  279. package/scss/_properties.scss +25 -1
  280. package/scss/base/_common.scss +3 -0
  281. package/scss/base/_normalize.scss +2 -0
  282. package/scss/components/_anchor-nav.scss +89 -29
  283. package/scss/components/_card.scss +8 -14
  284. package/scss/components/_collapse-group.scss +11 -0
  285. package/scss/components/_collapse.scss +48 -22
  286. package/scss/components/_grid-nav.scss +128 -0
  287. package/scss/components/_input-box.scss +1 -0
  288. package/scss/components/_mapping.scss +6 -0
  289. package/scss/components/_nav.scss +2 -2
  290. package/scss/components/_picker-columns.scss +124 -0
  291. package/scss/components/_popover.scss +13 -0
  292. package/scss/components/_portlet.scss +51 -0
  293. package/scss/components/_result-box.scss +1 -0
  294. package/scss/components/_spinner.scss +5 -4
  295. package/scss/components/_status.scss +1 -1
  296. package/scss/components/_table.scss +32 -0
  297. package/scss/components/form/_checks.scss +0 -351
  298. package/scss/components/form/_combo.scss +4 -0
  299. package/scss/components/form/_fieldset.scss +5 -1
  300. package/scss/components/form/_file.scss +11 -0
  301. package/scss/components/form/_form.scss +48 -0
  302. package/scss/components/form/_selection.scss +354 -0
  303. package/scss/components/form/_transfer.scss +75 -18
  304. package/scss/components/form/_tree.scss +42 -0
  305. package/scss/themes/_common.scss +7 -0
  306. package/scss/themes/_cxd-variables.scss +8 -6
  307. package/scss/themes/cxd.scss +17 -12
  308. package/sdk/ang-ie11.css +786 -196
  309. package/sdk/ang.css +820 -213
  310. package/sdk/antd-ie11.css +786 -196
  311. package/sdk/antd.css +820 -213
  312. package/sdk/charts.js +13 -13
  313. package/sdk/color-picker.js +65 -69
  314. package/sdk/cropperjs.js +2 -2
  315. package/sdk/cxd-ie11.css +825 -236
  316. package/sdk/cxd.css +862 -254
  317. package/sdk/dark-ie11.css +787 -197
  318. package/sdk/dark.css +820 -213
  319. package/sdk/exceljs.js +1 -1
  320. package/sdk/helper.css.map +1 -1
  321. package/sdk/iconfont.svg +2513 -0
  322. package/sdk/iconfont.ttf +0 -0
  323. package/sdk/iconfont.woff +0 -0
  324. package/sdk/locale/de-DE.js +2 -0
  325. package/sdk/markdown.js +69 -69
  326. package/sdk/papaparse.js +1 -1
  327. package/sdk/renderers/Form/CityDB.js +1 -1
  328. package/sdk/rest.js +20 -28
  329. package/sdk/rich-text.js +62 -62
  330. package/sdk/sdk-ie11.css +825 -236
  331. package/sdk/sdk.css +862 -254
  332. package/sdk/sdk.js +1243 -1175
  333. package/sdk/thirds/hls.js/hls.js +1 -1
  334. package/sdk/thirds/mpegts.js/mpegts.js +1 -1
  335. package/sdk/tinymce.js +57 -57
  336. package/src/Schema.ts +19 -1
  337. package/src/components/AnchorNav.tsx +15 -4
  338. package/src/components/{AssociatedCheckboxes.tsx → AssociatedSelection.tsx} +43 -37
  339. package/src/components/Badge.tsx +3 -3
  340. package/src/components/{ChainedCheckboxes.tsx → ChainedSelection.tsx} +57 -40
  341. package/src/components/Collapse.tsx +144 -20
  342. package/src/components/CollapseGroup.tsx +130 -0
  343. package/src/components/GridNav.tsx +233 -0
  344. package/src/components/{ListCheckboxes.tsx → GroupedSelection.tsx} +26 -21
  345. package/src/components/InputBox.tsx +10 -9
  346. package/src/components/Link.tsx +28 -37
  347. package/src/components/ModalManager.ts +1 -1
  348. package/src/components/PickerColumn.tsx +429 -0
  349. package/src/components/PickerContainer.tsx +128 -0
  350. package/src/components/Radios.tsx +3 -8
  351. package/src/components/ResultBox.tsx +9 -9
  352. package/src/components/SearchBox.tsx +4 -5
  353. package/src/components/Select.tsx +57 -5
  354. package/src/components/{Checkboxes.tsx → Selection.tsx} +75 -21
  355. package/src/components/{TableCheckboxes.tsx → TableSelection.tsx} +46 -25
  356. package/src/components/TabsTransfer.tsx +13 -7
  357. package/src/components/TabsTransferPicker.tsx +85 -0
  358. package/src/components/Toast.tsx +23 -16
  359. package/src/components/Transfer.tsx +71 -50
  360. package/src/components/TransferDropDown.tsx +120 -0
  361. package/src/components/TransferPicker.tsx +91 -0
  362. package/src/components/Tree.tsx +194 -8
  363. package/src/components/{TreeCheckboxes.tsx → TreeSelection.tsx} +33 -26
  364. package/src/components/WithRemoteConfig.tsx +7 -2
  365. package/src/components/condition-builder/Field.tsx +5 -5
  366. package/src/components/condition-builder/Func.tsx +3 -3
  367. package/src/components/condition-builder/InputSwitch.tsx +3 -3
  368. package/src/components/condition-builder/Item.tsx +5 -12
  369. package/src/components/icons.tsx +2 -0
  370. package/src/components/index.tsx +13 -13
  371. package/src/envOverwrite.ts +20 -8
  372. package/src/factory.tsx +70 -9
  373. package/src/hooks/index.ts +5 -0
  374. package/src/hooks/use-set-state.ts +19 -0
  375. package/src/hooks/use-touch.ts +100 -0
  376. package/src/hooks/use-update-effect.ts +16 -0
  377. package/src/icons/download.svg +4 -0
  378. package/src/icons/drag-bar.svg +12 -6
  379. package/src/index.tsx +5 -0
  380. package/src/locale/de-DE.ts +2 -0
  381. package/src/locale/en-US.ts +3 -0
  382. package/src/locale/zh-CN.ts +5 -2
  383. package/src/renderers/Action.tsx +28 -2
  384. package/src/renderers/AnchorNav.tsx +4 -0
  385. package/src/renderers/Avatar.tsx +8 -4
  386. package/src/renderers/Breadcrumb.tsx +5 -1
  387. package/src/renderers/CRUD.tsx +33 -3
  388. package/src/renderers/Card.tsx +63 -34
  389. package/src/renderers/Chart.tsx +6 -2
  390. package/src/renderers/Collapse.tsx +70 -115
  391. package/src/renderers/CollapseGroup.tsx +80 -0
  392. package/src/renderers/DropDownButton.tsx +1 -1
  393. package/src/renderers/Form/InputCity.tsx +4 -8
  394. package/src/renderers/Form/InputFile.tsx +65 -24
  395. package/src/renderers/Form/InputImage.tsx +11 -3
  396. package/src/renderers/Form/Item.tsx +3 -2
  397. package/src/renderers/Form/Options.tsx +16 -2
  398. package/src/renderers/Form/Select.tsx +162 -21
  399. package/src/renderers/Form/TabsTransferPicker.tsx +123 -0
  400. package/src/renderers/Form/Transfer.tsx +19 -4
  401. package/src/renderers/Form/TransferPicker.tsx +145 -0
  402. package/src/renderers/Form/TreeSelect.tsx +25 -0
  403. package/src/renderers/Form/index.tsx +15 -2
  404. package/src/renderers/Form/wrapControl.tsx +26 -1
  405. package/src/renderers/GridNav.tsx +204 -0
  406. package/src/renderers/IFrame.tsx +2 -4
  407. package/src/renderers/Json.tsx +9 -9
  408. package/src/renderers/Link.tsx +27 -13
  409. package/src/renderers/List.tsx +1 -1
  410. package/src/renderers/Mapping.tsx +27 -11
  411. package/src/renderers/Nav.tsx +108 -60
  412. package/src/renderers/Portlet.tsx +423 -0
  413. package/src/renderers/Property.tsx +3 -2
  414. package/src/renderers/SearchBox.tsx +23 -4
  415. package/src/renderers/Table/TableContent.tsx +40 -2
  416. package/src/renderers/Table/index.tsx +88 -43
  417. package/src/renderers/Tabs.tsx +9 -1
  418. package/src/renderers/WebComponent.tsx +2 -2
  419. package/src/store/crud.ts +3 -8
  420. package/src/store/form.ts +5 -10
  421. package/src/store/formItem.ts +94 -2
  422. package/src/store/service.ts +5 -4
  423. package/src/store/table.ts +55 -14
  424. package/src/types.ts +58 -1
  425. package/src/utils/api.ts +133 -26
  426. package/src/utils/dom.tsx +12 -0
  427. package/src/utils/helper.ts +27 -0
  428. package/src/utils/icon.tsx +4 -0
  429. package/tsconfig-for-declaration.json +1 -1
  430. package/dump.rdb +0 -0
  431. package/lib/components/AssociatedCheckboxes.d.ts +0 -762
  432. package/lib/components/AssociatedCheckboxes.js +0 -90
  433. package/lib/components/AssociatedCheckboxes.js.map +0 -13
  434. package/lib/components/ChainedCheckboxes.js.map +0 -13
  435. package/lib/components/Checkboxes.js +0 -101
  436. package/lib/components/Checkboxes.js.map +0 -13
  437. package/lib/components/ListCheckboxes.d.ts +0 -739
  438. package/lib/components/ListCheckboxes.js +0 -48
  439. package/lib/components/ListCheckboxes.js.map +0 -13
  440. package/lib/components/ListRadios.d.ts +0 -763
  441. package/lib/components/ListRadios.js +0 -86
  442. package/lib/components/ListRadios.js.map +0 -13
  443. package/lib/components/TableCheckboxes.js.map +0 -13
  444. package/lib/components/TreeCheckboxes.js.map +0 -13
  445. package/lib/components/TreeRadios.d.ts +0 -838
  446. package/lib/components/TreeRadios.js +0 -116
  447. package/lib/components/TreeRadios.js.map +0 -13
  448. package/src/components/ListRadios.tsx +0 -159
  449. package/src/components/TreeRadios.tsx +0 -202
@@ -0,0 +1,145 @@
1
+ import {
2
+ OptionsControlProps,
3
+ OptionsControl,
4
+ FormOptionsControl
5
+ } from './Options';
6
+ import React from 'react';
7
+ import {Api} from '../../types';
8
+ import Spinner from '../../components/Spinner';
9
+ import {BaseTransferRenderer} from './Transfer';
10
+ import TabsTransfer from '../../components/TabsTransfer';
11
+ import {SchemaApi} from '../../Schema';
12
+ import TransferPicker from '../../components/TransferPicker';
13
+
14
+ /**
15
+ * TransferPicker 穿梭器的弹框形态
16
+ * 文档:https://baidu.gitee.io/amis/docs/components/form/transfer-picker
17
+ */
18
+ export interface TransferPickerControlSchema extends FormOptionsControl {
19
+ type: 'transfer-picker';
20
+ /**
21
+ * 边框模式,全边框,还是半边框,或者没边框。
22
+ */
23
+ borderMode?: 'full' | 'half' | 'none';
24
+
25
+ /**
26
+ * 是否显示剪头
27
+ */
28
+ showArrow?: boolean;
29
+
30
+ /**
31
+ * 可排序?
32
+ */
33
+ sortable?: boolean;
34
+
35
+ /**
36
+ * 搜索结果展示模式
37
+ */
38
+ searchResultMode?: 'table' | 'list' | 'tree' | 'chained';
39
+
40
+ /**
41
+ * 可搜索?
42
+ */
43
+ searchable?: boolean;
44
+
45
+ /**
46
+ * 搜索 API
47
+ */
48
+ searchApi?: SchemaApi;
49
+
50
+ /**
51
+ * 左侧的标题文字
52
+ */
53
+ selectTitle?: string;
54
+
55
+ /**
56
+ * 右侧结果的标题文字
57
+ */
58
+ resultTitle?: string;
59
+
60
+ /**
61
+ * 弹窗大小
62
+ */
63
+ pickerSize?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
64
+ }
65
+
66
+ export interface TabsTransferProps
67
+ extends OptionsControlProps,
68
+ Omit<
69
+ TransferPickerControlSchema,
70
+ | 'type'
71
+ | 'options'
72
+ | 'inputClassName'
73
+ | 'className'
74
+ | 'descriptionClassName'
75
+ > {}
76
+
77
+ @OptionsControl({
78
+ type: 'transfer-picker'
79
+ })
80
+ export class TransferPickerRenderer extends BaseTransferRenderer<TabsTransferProps> {
81
+ render() {
82
+ const {
83
+ className,
84
+ classnames: cx,
85
+ selectedOptions,
86
+ sortable,
87
+ loading,
88
+ searchable,
89
+ searchResultMode,
90
+ showArrow,
91
+ deferLoad,
92
+ disabled,
93
+ selectTitle,
94
+ resultTitle,
95
+ pickerSize,
96
+ columns,
97
+ leftMode,
98
+ selectMode,
99
+ borderMode
100
+ } = this.props;
101
+
102
+ // 目前 LeftOptions 没有接口可以动态加载
103
+ // 为了方便可以快速实现动态化,让选项的第一个成员携带
104
+ // LeftOptions 信息
105
+ let {options, leftOptions, leftDefaultValue} = this.props;
106
+ if (
107
+ selectMode === 'associated' &&
108
+ options &&
109
+ options.length === 1 &&
110
+ options[0].leftOptions &&
111
+ Array.isArray(options[0].children)
112
+ ) {
113
+ leftOptions = options[0].leftOptions;
114
+ leftDefaultValue = options[0].leftDefaultValue ?? leftDefaultValue;
115
+ options = options[0].children;
116
+ }
117
+
118
+ return (
119
+ <div className={cx('TransferControl', className)}>
120
+ <TransferPicker
121
+ borderMode={borderMode}
122
+ selectMode={selectMode}
123
+ value={selectedOptions}
124
+ disabled={disabled}
125
+ options={options}
126
+ onChange={this.handleChange}
127
+ option2value={this.option2value}
128
+ sortable={sortable}
129
+ searchResultMode={searchResultMode}
130
+ onSearch={searchable ? this.handleSearch : undefined}
131
+ showArrow={showArrow}
132
+ onDeferLoad={deferLoad}
133
+ selectTitle={selectTitle}
134
+ resultTitle={resultTitle}
135
+ size={pickerSize}
136
+ columns={columns}
137
+ leftMode={leftMode}
138
+ leftOptions={leftOptions}
139
+ />
140
+
141
+ <Spinner overlay key="info" show={loading} />
142
+ </div>
143
+ );
144
+ }
145
+ }
@@ -478,6 +478,19 @@ export default class TreeSelectControl extends React.Component<
478
478
  minLength,
479
479
  labelField,
480
480
  nodePath,
481
+ onAdd,
482
+ creatable,
483
+ createTip,
484
+ addControls,
485
+ onEdit,
486
+ editable,
487
+ editTip,
488
+ editControls,
489
+ removable,
490
+ removeTip,
491
+ onDelete,
492
+ rootCreatable,
493
+ rootCreateTip,
481
494
  translate: __,
482
495
  deferLoad,
483
496
  expandTreeOptions
@@ -533,6 +546,18 @@ export default class TreeSelectControl extends React.Component<
533
546
  pathSeparator={pathSeparator}
534
547
  maxLength={maxLength}
535
548
  minLength={minLength}
549
+ onAdd={onAdd}
550
+ creatable={creatable}
551
+ createTip={createTip}
552
+ rootCreatable={rootCreatable}
553
+ rootCreateTip={rootCreateTip}
554
+ onEdit={onEdit}
555
+ editable={editable}
556
+ editTip={editTip}
557
+ removable={removable}
558
+ removeTip={removeTip}
559
+ onDelete={onDelete}
560
+ bultinCUD={!addControls && !editControls}
536
561
  onDeferLoad={deferLoad}
537
562
  onExpandTree={expandTreeOptions}
538
563
  />
@@ -202,6 +202,11 @@ export interface FormSchema extends BaseSchema {
202
202
  */
203
203
  mode?: 'normal' | 'inline' | 'horizontal';
204
204
 
205
+ /**
206
+ * 表单项显示为几列
207
+ */
208
+ columnCount?: number;
209
+
205
210
  /**
206
211
  * 如果是水平排版,这个属性可以细化水平排版的左右宽度占比。
207
212
  */
@@ -347,6 +352,7 @@ export default class Form extends React.Component<FormProps, object> {
347
352
  right: 10,
348
353
  offset: 2
349
354
  },
355
+ columnCount: 0,
350
356
  panelClassName: 'Panel--default',
351
357
  messages: {
352
358
  fetchFailed: 'fetchFailed',
@@ -367,6 +373,7 @@ export default class Form extends React.Component<FormProps, object> {
367
373
  'initFetch',
368
374
  'wrapWithPanel',
369
375
  'mode',
376
+ 'columnCount',
370
377
  'collapsable',
371
378
  'horizontal',
372
379
  'panelClassName',
@@ -827,7 +834,7 @@ export default class Form extends React.Component<FormProps, object> {
827
834
  );
828
835
  }
829
836
 
830
- if (store.persistData) {
837
+ if (store.persistData && store.inited) {
831
838
  store.setLocalPersistData();
832
839
  }
833
840
  }
@@ -1418,6 +1425,7 @@ export default class Form extends React.Component<FormProps, object> {
1418
1425
  debug,
1419
1426
  $path,
1420
1427
  store,
1428
+ columnCount,
1421
1429
  render
1422
1430
  } = this.props;
1423
1431
 
@@ -1429,7 +1437,12 @@ export default class Form extends React.Component<FormProps, object> {
1429
1437
 
1430
1438
  return (
1431
1439
  <WrapperComponent
1432
- className={cx(`Form`, `Form--${mode || 'normal'}`, className)}
1440
+ className={cx(
1441
+ `Form`,
1442
+ `Form--${mode || 'normal'}`,
1443
+ columnCount ? `Form--column Form--column-${columnCount}` : null,
1444
+ className
1445
+ )}
1433
1446
  onSubmit={this.handleFormSubmit}
1434
1447
  noValidate
1435
1448
  >
@@ -479,8 +479,17 @@ export function wrapControl<
479
479
  const {
480
480
  formStore: form,
481
481
  onChange,
482
- $schema: {name, onChange: onFormItemChange, maxLength, minLength},
482
+ $schema: {
483
+ name,
484
+ id,
485
+ label,
486
+ type,
487
+ onChange: onFormItemChange,
488
+ maxLength,
489
+ minLength
490
+ },
483
491
  data,
492
+ env,
484
493
  validateOnChange,
485
494
  formSubmited
486
495
  } = this.props;
@@ -495,6 +504,22 @@ export function wrapControl<
495
504
  return;
496
505
  }
497
506
 
507
+ if (type !== 'input-password') {
508
+ env?.tracker(
509
+ {
510
+ eventType: 'formItemChange',
511
+ eventData: {
512
+ id,
513
+ name,
514
+ label,
515
+ type,
516
+ value
517
+ }
518
+ },
519
+ this.props
520
+ );
521
+ }
522
+
498
523
  this.model.changeEmitedValue(value);
499
524
  if (
500
525
  onFormItemChange?.(value, oldValue, this.model, form) === false
@@ -0,0 +1,204 @@
1
+ import React from 'react';
2
+ import {Renderer, RendererProps} from '../factory';
3
+ import {autobind, getPropValue} from '../utils/helper';
4
+ import {isPureVariable, resolveVariableAndFilter} from '../utils/tpl-builtin';
5
+ import {
6
+ BaseSchema,
7
+ SchemaTokenizeableString,
8
+ SchemaTpl,
9
+ SchemaUrlPath
10
+ } from '../Schema';
11
+ import {ActionSchema} from './Action';
12
+ import GridNav, {GridNavDirection, GridNavItem} from '../components/GridNav';
13
+ import {BadgeSchema} from '../components/Badge';
14
+ import handleAction from '../utils/handleAction';
15
+ import {validations} from '../utils/validations';
16
+
17
+ export interface ListItemSchema extends Omit<BaseSchema, 'type'> {
18
+ /**
19
+ * 单项点击事件
20
+ */
21
+ clickAction?: ActionSchema;
22
+
23
+ /**
24
+ * 跳转地址
25
+ */
26
+ link?: string;
27
+
28
+ /**
29
+ * 打开方式
30
+ */
31
+ blank?: string;
32
+
33
+ /**
34
+ * 图片地址
35
+ */
36
+ icon?: SchemaUrlPath;
37
+
38
+ /**
39
+ * 描述
40
+ */
41
+ text?: SchemaTpl;
42
+
43
+ /**
44
+ * 图标最大宽度比例 0-100
45
+ */
46
+ iconRatio?: number;
47
+
48
+ /**
49
+ * 角标
50
+ */
51
+ badge?: BadgeSchema;
52
+ }
53
+
54
+ /**
55
+ * List 列表展示控件。
56
+ * 文档:https://baidu.gitee.io/amis/docs/components/card
57
+ */
58
+ export interface ListSchema extends BaseSchema {
59
+ /**
60
+ * 指定为 List 列表展示控件。
61
+ */
62
+ type: 'grid-nav';
63
+
64
+ /**
65
+ * 列表项类名
66
+ */
67
+ itemClassName?: string;
68
+
69
+ /**
70
+ * 静态图片列表配置
71
+ */
72
+ options?: Array<ListItemSchema>;
73
+
74
+ /**
75
+ * 是否将列表项固定为正方形
76
+ */
77
+ square?: boolean;
78
+
79
+ /**
80
+ * 是否将列表项内容居中显示
81
+ */
82
+ center?: boolean;
83
+
84
+ /**
85
+ * 是否显示列表项边框
86
+ */
87
+ border?: boolean;
88
+
89
+ /**
90
+ * 列表项之间的间距,默认单位为px
91
+ */
92
+ gutter?: number;
93
+
94
+ /**
95
+ * 图标宽度占比, 1-100
96
+ */
97
+ iconRatio?: number;
98
+
99
+ /**
100
+ * 列表项内容排列的方向,可选值为 horizontal 、vertical
101
+ */
102
+ direction?: GridNavDirection;
103
+
104
+ /**
105
+ * 列数
106
+ */
107
+ columnNum?: number;
108
+
109
+ /**
110
+ * 数据源: 绑定当前环境变量
111
+ *
112
+ * @default ${items}
113
+ */
114
+ source?: SchemaTokenizeableString;
115
+ }
116
+
117
+ export interface Column {
118
+ type: string;
119
+ [propName: string]: any;
120
+ }
121
+
122
+ export interface ListProps
123
+ extends RendererProps,
124
+ Omit<ListSchema, 'type' | 'className'> {
125
+ handleClick: (item?: ListItemSchema) => void;
126
+ }
127
+
128
+ @Renderer({
129
+ type: 'grid-nav'
130
+ })
131
+ export default class List extends React.Component<ListProps, object> {
132
+ @autobind
133
+ handleClick(item: ListItemSchema) {
134
+ return (e: React.MouseEvent) => {
135
+ let action;
136
+ if (item.link) {
137
+ action = validations.isUrl({}, item.link)
138
+ ? {
139
+ type: 'button',
140
+ actionType: 'url',
141
+ url: item.link,
142
+ blank: item.blank
143
+ }
144
+ : {
145
+ type: 'button',
146
+ actionType: 'link',
147
+ link: item.link
148
+ };
149
+ } else {
150
+ action = item.clickAction!;
151
+ }
152
+ handleAction(e, action as ActionSchema, this.props);
153
+ };
154
+ }
155
+
156
+ render() {
157
+ const {itemClassName, source, data, options, classnames} = this.props;
158
+
159
+ let value = getPropValue(this.props);
160
+ let list: any = [];
161
+
162
+ if (typeof source === 'string' && isPureVariable(source)) {
163
+ list = resolveVariableAndFilter(source, data, '| raw') || undefined;
164
+ } else if (Array.isArray(value)) {
165
+ list = value;
166
+ } else if (Array.isArray(options)) {
167
+ list = options;
168
+ }
169
+
170
+ if (list && !Array.isArray(list)) {
171
+ list = [list];
172
+ }
173
+
174
+ if (!list?.length) {
175
+ return null;
176
+ }
177
+
178
+ return (
179
+ <GridNav {...this.props}>
180
+ {list.map((item: ListItemSchema, index: number) => (
181
+ <GridNavItem
182
+ key={index}
183
+ onClick={
184
+ item.clickAction || item.link ? this.handleClick(item) : undefined
185
+ }
186
+ className={itemClassName}
187
+ text={item.text}
188
+ icon={item.icon}
189
+ classnames={classnames}
190
+ badge={
191
+ item.badge
192
+ ? {
193
+ badge: item.badge,
194
+ data: data,
195
+ classnames
196
+ }
197
+ : undefined
198
+ }
199
+ />
200
+ ))}
201
+ </GridNav>
202
+ );
203
+ }
204
+ }
@@ -6,7 +6,7 @@ import {ScopedContext, IScopedContext} from '../Scoped';
6
6
  import {buildApi, isApiOutdated} from '../utils/api';
7
7
  import {BaseSchema, SchemaUrlPath} from '../Schema';
8
8
  import {ActionSchema} from './Action';
9
- import {isPureVariable, resolveVariableAndFilter} from '../utils/tpl-builtin';
9
+ import {dataMapping} from '../utils/tpl-builtin';
10
10
 
11
11
  /**
12
12
  * IFrame 渲染器
@@ -161,9 +161,7 @@ export default class IFrame extends React.Component<IFrameProps, object> {
161
161
  ...style
162
162
  };
163
163
 
164
- if (isPureVariable(src)) {
165
- src = resolveVariableAndFilter(src, data, '| raw');
166
- }
164
+ src = dataMapping(src, data);
167
165
 
168
166
  const finalSrc = src ? buildApi(src, data).url : undefined;
169
167
 
@@ -29,6 +29,11 @@ export interface JsonSchema extends BaseSchema {
29
29
  * 是否可修改
30
30
  */
31
31
  mutable?: boolean;
32
+
33
+ /**
34
+ * 是否显示数据类型
35
+ */
36
+ displayDataTypes?: boolean;
32
37
  }
33
38
 
34
39
  export interface JSONProps extends RendererProps, JsonSchema {
@@ -44,7 +49,8 @@ export class JSONField extends React.Component<JSONProps, object> {
44
49
  static defaultProps: Partial<JSONProps> = {
45
50
  placeholder: '-',
46
51
  levelExpand: 1,
47
- source: ''
52
+ source: '',
53
+ displayDataTypes: false
48
54
  };
49
55
 
50
56
  @autobind
@@ -79,6 +85,7 @@ export class JSONField extends React.Component<JSONProps, object> {
79
85
  source,
80
86
  levelExpand,
81
87
  mutable,
88
+ displayDataTypes,
82
89
  name
83
90
  } = this.props;
84
91
 
@@ -87,14 +94,6 @@ export class JSONField extends React.Component<JSONProps, object> {
87
94
  let data = value;
88
95
  if (source !== undefined && isPureVariable(source)) {
89
96
  data = resolveVariableAndFilter(source, this.props.data, '| raw');
90
- } else if (typeof value === 'string') {
91
- try {
92
- data = JSON.parse(value);
93
- } catch (e) {
94
- data = {
95
- error: e.message
96
- };
97
- }
98
97
  }
99
98
 
100
99
  let jsonThemeValue = jsonTheme;
@@ -124,6 +123,7 @@ export class JSONField extends React.Component<JSONProps, object> {
124
123
  theme={(jsonThemeValue as any) ?? 'rjv-default'}
125
124
  shouldCollapse={this.shouldExpandNode}
126
125
  enableClipboard={false}
126
+ displayDataTypes={displayDataTypes}
127
127
  iconStyle="square"
128
128
  onEdit={name && mutable ? this.emitChange : false}
129
129
  onDelete={name && mutable ? this.emitChange : false}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import {Renderer, RendererProps} from '../factory';
3
3
  import {BaseSchema, SchemaTpl} from '../Schema';
4
- import {getPropValue} from '../utils/helper';
4
+ import {autobind, getPropValue} from '../utils/helper';
5
5
  import {filter} from '../utils/tpl';
6
6
  import {BadgeSchema, withBadge} from '../components/Badge';
7
7
  import Link from '../components/Link';
@@ -42,9 +42,9 @@ export interface LinkSchema extends BaseSchema {
42
42
  icon?: string;
43
43
 
44
44
  /**
45
- * 图标位置
45
+ * 右侧图标
46
46
  */
47
- position?: string;
47
+ rightIcon?: string;
48
48
  }
49
49
 
50
50
  export interface LinkProps
@@ -55,9 +55,23 @@ export class LinkCmpt extends React.Component<LinkProps, object> {
55
55
  static defaultProps = {
56
56
  blank: true,
57
57
  disabled: false,
58
- htmlTarget: '_self'
58
+ htmlTarget: ''
59
59
  };
60
60
 
61
+ handleClick(href: string) {
62
+ const {env, blank, body} = this.props;
63
+ env?.tracker(
64
+ {
65
+ eventType: 'url',
66
+ // 需要和 action 里命名一致方便后续分析
67
+ eventData: {url: href, blank, label: body}
68
+ },
69
+ this.props
70
+ );
71
+ }
72
+
73
+ getHref() {}
74
+
61
75
  render() {
62
76
  const {
63
77
  className,
@@ -72,25 +86,25 @@ export class LinkCmpt extends React.Component<LinkProps, object> {
72
86
  translate: __,
73
87
  title,
74
88
  icon,
75
- position
89
+ rightIcon
76
90
  } = this.props;
77
91
 
78
- let value = getPropValue(this.props);
79
- const finnalHref = href ? filter(href, data, '| raw') : '';
80
- const text = body ? render('body', body) : finnalHref || value || __('link');
92
+ let value =
93
+ (typeof href === 'string' && href
94
+ ? filter(href, data, '| raw')
95
+ : undefined) || getPropValue(this.props);
81
96
 
82
97
  return (
83
98
  <Link
84
99
  className={className}
85
- href={href}
86
- body={text}
87
- blank={blank}
100
+ href={value}
88
101
  disabled={disabled}
89
102
  title={title}
90
- htmlTarget={htmlTarget}
103
+ htmlTarget={htmlTarget || (blank ? '_blank' : '_self')}
91
104
  icon={icon}
92
- position={position}
105
+ rightIcon={rightIcon}
93
106
  >
107
+ {body ? render('body', body) : value || __('link')}
94
108
  </Link>
95
109
  );
96
110
  }
@@ -1189,7 +1189,7 @@ export class ListItem extends React.Component<ListItemProps> {
1189
1189
  }
1190
1190
 
1191
1191
  renderFeild(region: string, field: any, key: any, props: any) {
1192
- const render = props.render || this.props.render;
1192
+ const render = props?.render || this.props.render;
1193
1193
  const data = this.props.data;
1194
1194
  const cx = this.props.classnames;
1195
1195
  const itemIndex = this.props.itemIndex;