amis-ui 6.2.2 → 6.4.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 (815) hide show
  1. package/esm/_virtual/_commonjsHelpers.js +10 -0
  2. package/esm/_virtual/pdf.worker.min.js +8 -0
  3. package/esm/components/404.js +1 -1
  4. package/esm/components/Alert.d.ts +124 -122
  5. package/esm/components/Alert.js +10 -6
  6. package/esm/components/Alert2.d.ts +20 -20
  7. package/esm/components/Alert2.js +1 -1
  8. package/esm/components/AnchorNav.d.ts +20 -20
  9. package/esm/components/AnchorNav.js +1 -1
  10. package/esm/components/ArrayInput.d.ts +40 -40
  11. package/esm/components/ArrayInput.js +1 -1
  12. package/esm/components/AsideNav.d.ts +2 -1
  13. package/esm/components/AsideNav.js +6 -3
  14. package/esm/components/AssociatedSelection.d.ts +120 -120
  15. package/esm/components/AssociatedSelection.js +4 -4
  16. package/esm/components/Avatar.d.ts +140 -140
  17. package/esm/components/Avatar.js +1 -1
  18. package/esm/components/Badge.js +1 -1
  19. package/esm/components/BaiduMapPicker.js +1 -1
  20. package/esm/components/BarCode.js +1 -1
  21. package/esm/components/Breadcrumb.d.ts +3 -0
  22. package/esm/components/Breadcrumb.js +7 -6
  23. package/esm/components/Button.d.ts +32 -31
  24. package/esm/components/Button.js +4 -4
  25. package/esm/components/CalendarMobile.d.ts +45 -40
  26. package/esm/components/CalendarMobile.js +41 -6
  27. package/esm/components/Card.d.ts +140 -140
  28. package/esm/components/Card.js +1 -1
  29. package/esm/components/Cascader.js +1 -1
  30. package/esm/components/ChainedDropdownSelection.d.ts +120 -120
  31. package/esm/components/ChainedDropdownSelection.js +1 -1
  32. package/esm/components/ChainedSelection.d.ts +120 -120
  33. package/esm/components/ChainedSelection.js +8 -6
  34. package/esm/components/Checkbox.d.ts +12 -11
  35. package/esm/components/Checkbox.js +7 -7
  36. package/esm/components/CityArea.js +1 -1
  37. package/esm/components/CityDB.d.ts +1 -1
  38. package/esm/components/CityDB.js +377 -889
  39. package/esm/components/CodeMirror.d.ts +1 -0
  40. package/esm/components/CodeMirror.js +16 -5
  41. package/esm/components/Collapse.d.ts +140 -140
  42. package/esm/components/Collapse.js +1 -1
  43. package/esm/components/CollapseGroup.d.ts +30 -30
  44. package/esm/components/CollapseGroup.js +1 -1
  45. package/esm/components/ColorPicker.d.ts +80 -80
  46. package/esm/components/ColorPicker.js +1 -1
  47. package/esm/components/Combo.js +1 -1
  48. package/esm/components/ConfirmBox.d.ts +81 -80
  49. package/esm/components/ConfirmBox.js +6 -3
  50. package/esm/components/ContextMenu.d.ts +17 -3
  51. package/esm/components/ContextMenu.js +72 -20
  52. package/esm/components/DatePicker.d.ts +84 -82
  53. package/esm/components/DatePicker.js +12 -12
  54. package/esm/components/DateRangePicker.d.ts +133 -129
  55. package/esm/components/DateRangePicker.js +40 -27
  56. package/esm/components/DndContainer.js +1 -1
  57. package/esm/components/Drawer.d.ts +30 -30
  58. package/esm/components/Drawer.js +1 -1
  59. package/esm/components/DropDownSelection.d.ts +120 -120
  60. package/esm/components/DropDownSelection.js +1 -1
  61. package/esm/components/Editor.d.ts +120 -120
  62. package/esm/components/Editor.js +3 -3
  63. package/esm/components/Form.js +1 -1
  64. package/esm/components/FormField.js +1 -1
  65. package/esm/components/GaodeMapPicker.js +1 -1
  66. package/esm/components/GridNav.js +1 -1
  67. package/esm/components/GroupedSelection.d.ts +120 -120
  68. package/esm/components/GroupedSelection.js +5 -4
  69. package/esm/components/Html.js +1 -1
  70. package/esm/components/ImageGallery.d.ts +40 -40
  71. package/esm/components/ImageGallery.js +2 -1
  72. package/esm/components/Input.d.ts +3 -1
  73. package/esm/components/Input.js +3 -3
  74. package/esm/components/InputBox.d.ts +14 -13
  75. package/esm/components/InputBox.js +7 -7
  76. package/esm/components/InputBoxWithSuggestion.js +7 -7
  77. package/esm/components/InputTable.js +1 -1
  78. package/esm/components/Layout.d.ts +10 -10
  79. package/esm/components/Layout.js +1 -1
  80. package/esm/components/Link.js +1 -1
  81. package/esm/components/ListGroup.d.ts +10 -10
  82. package/esm/components/ListGroup.js +1 -1
  83. package/esm/components/ListMenu.d.ts +82 -80
  84. package/esm/components/ListMenu.js +3 -3
  85. package/esm/components/LocationPicker.d.ts +40 -40
  86. package/esm/components/LocationPicker.js +1 -1
  87. package/esm/components/Markdown.js +1 -1
  88. package/esm/components/Modal.d.ts +120 -120
  89. package/esm/components/Modal.js +1 -1
  90. package/esm/components/ModalManager.js +1 -1
  91. package/esm/components/MonthRangePicker.d.ts +120 -120
  92. package/esm/components/MultilineText.d.ts +40 -40
  93. package/esm/components/MultilineText.js +1 -1
  94. package/esm/components/NumberInput.d.ts +30 -21
  95. package/esm/components/NumberInput.js +36 -6
  96. package/esm/components/OverflowTpl.js +1 -1
  97. package/esm/components/Pagination.d.ts +200 -110
  98. package/esm/components/Pagination.js +21 -21
  99. package/esm/components/PdfViewer.d.ts +49 -0
  100. package/esm/components/PdfViewer.js +85 -0
  101. package/esm/components/Picker.d.ts +1 -0
  102. package/esm/components/Picker.js +4 -4
  103. package/esm/components/PickerColumn.d.ts +1 -0
  104. package/esm/components/PickerColumn.js +8 -6
  105. package/esm/components/PickerContainer.d.ts +1 -2
  106. package/esm/components/PickerContainer.js +26 -16
  107. package/esm/components/PopOverContainer.d.ts +1 -0
  108. package/esm/components/PopOverContainer.js +3 -3
  109. package/esm/components/PopUp.d.ts +120 -120
  110. package/esm/components/PopUp.js +1 -1
  111. package/esm/components/Progress.d.ts +60 -60
  112. package/esm/components/Progress.js +1 -1
  113. package/esm/components/PullRefresh.js +1 -1
  114. package/esm/components/Radios.d.ts +12 -10
  115. package/esm/components/Radios.js +4 -3
  116. package/esm/components/Range.js +1 -1
  117. package/esm/components/Rating.d.ts +20 -20
  118. package/esm/components/Rating.js +1 -1
  119. package/esm/components/ResultBox.d.ts +82 -81
  120. package/esm/components/ResultBox.js +25 -21
  121. package/esm/components/ResultList.d.ts +42 -40
  122. package/esm/components/ResultList.js +5 -4
  123. package/esm/components/ResultTableList.d.ts +120 -120
  124. package/esm/components/ResultTableList.js +5 -4
  125. package/esm/components/ResultTreeList.d.ts +40 -40
  126. package/esm/components/ResultTreeList.js +3 -3
  127. package/esm/components/RichText.js +1 -1
  128. package/esm/components/SearchBox.d.ts +82 -81
  129. package/esm/components/SearchBox.js +8 -8
  130. package/esm/components/Select.d.ts +1363 -1354
  131. package/esm/components/Select.js +13 -12
  132. package/esm/components/SelectMobile.js +22 -19
  133. package/esm/components/Selection.d.ts +122 -120
  134. package/esm/components/Selection.js +1 -1
  135. package/esm/components/Signature.d.ts +280 -0
  136. package/esm/components/Signature.js +271 -0
  137. package/esm/components/SparkLine.d.ts +40 -40
  138. package/esm/components/SparkLine.js +1 -1
  139. package/esm/components/Spinner.d.ts +60 -60
  140. package/esm/components/Spinner.js +1 -1
  141. package/esm/components/Steps.js +1 -1
  142. package/esm/components/Switch.d.ts +12 -12
  143. package/esm/components/Switch.js +4 -4
  144. package/esm/components/TableSelection.d.ts +120 -120
  145. package/esm/components/TableSelection.js +6 -5
  146. package/esm/components/Tabs.d.ts +83 -81
  147. package/esm/components/Tabs.js +21 -22
  148. package/esm/components/TabsTransfer.d.ts +40 -40
  149. package/esm/components/TabsTransfer.js +16 -14
  150. package/esm/components/TabsTransferPicker.js +1 -1
  151. package/esm/components/Tag.d.ts +70 -70
  152. package/esm/components/Tag.js +1 -1
  153. package/esm/components/Textarea.d.ts +42 -42
  154. package/esm/components/Textarea.js +4 -4
  155. package/esm/components/Timeline.js +1 -1
  156. package/esm/components/TimelineItem.d.ts +1 -1
  157. package/esm/components/TimelineItem.js +1 -1
  158. package/esm/components/Tinymce.js +7 -4
  159. package/esm/components/TitleBar.d.ts +10 -10
  160. package/esm/components/TitleBar.js +1 -1
  161. package/esm/components/Toast.d.ts +120 -120
  162. package/esm/components/Toast.js +1 -1
  163. package/esm/components/Tooltip.js +1 -1
  164. package/esm/components/TooltipWrapper.d.ts +32 -32
  165. package/esm/components/TooltipWrapper.js +1 -1
  166. package/esm/components/Transfer.d.ts +174 -172
  167. package/esm/components/Transfer.js +16 -16
  168. package/esm/components/TransferDropDown.d.ts +160 -160
  169. package/esm/components/TransferDropDown.js +1 -1
  170. package/esm/components/TransferPicker.js +1 -1
  171. package/esm/components/TransferSearch.js +1 -1
  172. package/esm/components/Tree.d.ts +206 -210
  173. package/esm/components/Tree.js +32 -30
  174. package/esm/components/TreeSelection.d.ts +120 -120
  175. package/esm/components/TreeSelection.js +1 -1
  176. package/esm/components/UserSelect.d.ts +40 -40
  177. package/esm/components/UserSelect.js +1 -1
  178. package/esm/components/UserTabSelect.d.ts +40 -40
  179. package/esm/components/UserTabSelect.js +1 -1
  180. package/esm/components/WithRemoteConfig.d.ts +9 -0
  181. package/esm/components/WithRemoteConfig.js +19 -3
  182. package/esm/components/WithStore.js +1 -1
  183. package/esm/components/calendar/Calendar.d.ts +2 -1
  184. package/esm/components/calendar/Calendar.js +7 -6
  185. package/esm/components/calendar/CalendarContainer.js +1 -1
  186. package/esm/components/calendar/DaysView.d.ts +2 -1
  187. package/esm/components/calendar/DaysView.js +17 -15
  188. package/esm/components/calendar/MonthsView.d.ts +2 -0
  189. package/esm/components/calendar/MonthsView.js +8 -6
  190. package/esm/components/calendar/QuartersView.d.ts +2 -0
  191. package/esm/components/calendar/QuartersView.js +7 -6
  192. package/esm/components/calendar/TimeView.d.ts +2 -0
  193. package/esm/components/calendar/TimeView.js +8 -7
  194. package/esm/components/calendar/YearsView.d.ts +2 -0
  195. package/esm/components/calendar/YearsView.js +6 -5
  196. package/esm/components/condition-builder/Expression.js +1 -1
  197. package/esm/components/condition-builder/Field.js +1 -1
  198. package/esm/components/condition-builder/Func.js +1 -1
  199. package/esm/components/condition-builder/Group.js +1 -1
  200. package/esm/components/condition-builder/GroupOrItem.js +1 -1
  201. package/esm/components/condition-builder/InputSwitch.js +1 -1
  202. package/esm/components/condition-builder/Item.js +1 -1
  203. package/esm/components/condition-builder/Value.d.ts +1 -0
  204. package/esm/components/condition-builder/Value.js +30 -14
  205. package/esm/components/condition-builder/config.js +1 -1
  206. package/esm/components/condition-builder/index.js +1 -1
  207. package/esm/components/formula/CodeEditor.d.ts +92 -0
  208. package/esm/components/formula/CodeEditor.js +99 -0
  209. package/esm/components/formula/Editor.d.ts +64 -69
  210. package/esm/components/formula/Editor.js +173 -81
  211. package/esm/components/formula/FuncList.d.ts +1 -1
  212. package/esm/components/formula/FuncList.js +10 -9
  213. package/esm/components/formula/Input.d.ts +68 -54
  214. package/esm/components/formula/Input.js +45 -102
  215. package/esm/components/formula/Picker.d.ts +74 -60
  216. package/esm/components/formula/Picker.js +129 -69
  217. package/esm/components/formula/VariableList.d.ts +1 -1
  218. package/esm/components/formula/VariableList.js +26 -12
  219. package/esm/components/formula/plugin.d.ts +28 -7
  220. package/esm/components/formula/plugin.js +217 -90
  221. package/esm/components/icons.d.ts +4 -2
  222. package/esm/components/icons.js +14 -5
  223. package/esm/components/index.d.ts +5 -3
  224. package/esm/components/json-schema/Array.js +2 -2
  225. package/esm/components/json-schema/Item.d.ts +3 -1
  226. package/esm/components/json-schema/Item.js +35 -9
  227. package/esm/components/json-schema/Object.d.ts +3 -1
  228. package/esm/components/json-schema/Object.js +112 -52
  229. package/esm/components/json-schema/index.d.ts +53 -50
  230. package/esm/components/json-schema/index.js +14 -5
  231. package/esm/components/menu/MenuContext.js +1 -1
  232. package/esm/components/menu/MenuItem.d.ts +2 -1
  233. package/esm/components/menu/MenuItem.js +4 -4
  234. package/esm/components/menu/SubMenu.d.ts +2 -1
  235. package/esm/components/menu/SubMenu.js +6 -6
  236. package/esm/components/menu/index.d.ts +66 -63
  237. package/esm/components/menu/index.js +10 -7
  238. package/esm/components/schema-editor/Array.js +23 -8
  239. package/esm/components/schema-editor/Common.d.ts +17 -1
  240. package/esm/components/schema-editor/Common.js +84 -37
  241. package/esm/components/schema-editor/Item.js +2 -2
  242. package/esm/components/schema-editor/Object.d.ts +7 -1
  243. package/esm/components/schema-editor/Object.js +106 -14
  244. package/esm/components/schema-editor/SchemaVariableList.d.ts +1 -1
  245. package/esm/components/schema-editor/SchemaVariableList.js +1 -1
  246. package/esm/components/schema-editor/SchemaVariableListPicker.js +1 -1
  247. package/esm/components/schema-editor/index.d.ts +48 -40
  248. package/esm/components/schema-editor/index.js +4 -4
  249. package/esm/components/table/Cell.d.ts +2 -0
  250. package/esm/components/table/Cell.js +4 -4
  251. package/esm/components/table/ColGroup.js +1 -1
  252. package/esm/components/table/Head.d.ts +2 -0
  253. package/esm/components/table/Head.js +12 -9
  254. package/esm/components/table/HeadCellDropDown.d.ts +2 -0
  255. package/esm/components/table/HeadCellDropDown.js +1 -1
  256. package/esm/components/table/HeadCellFilter.d.ts +42 -40
  257. package/esm/components/table/HeadCellFilter.js +8 -8
  258. package/esm/components/table/HeadCellSelect.d.ts +40 -40
  259. package/esm/components/table/HeadCellSelect.js +1 -1
  260. package/esm/components/table/HeadCellSort.d.ts +2 -0
  261. package/esm/components/table/HeadCellSort.js +8 -8
  262. package/esm/components/table/ItemActionsWrapper.js +1 -1
  263. package/esm/components/table/Row.d.ts +2 -0
  264. package/esm/components/table/Row.js +4 -3
  265. package/esm/components/table/SummaryRow.js +1 -1
  266. package/esm/components/table/index.d.ts +162 -160
  267. package/esm/components/table/index.js +7 -5
  268. package/esm/components/table/util.d.ts +7 -7
  269. package/esm/components/table/util.js +4 -2
  270. package/esm/components/virtual-list/AutoSizer.js +1 -1
  271. package/esm/components/virtual-list/SizeAndPositionManager.js +1 -1
  272. package/esm/components/virtual-list/constants.js +1 -1
  273. package/esm/components/virtual-list/index.js +1 -1
  274. package/esm/hooks/use-set-state.js +1 -1
  275. package/esm/hooks/use-sub-form.js +1 -1
  276. package/esm/hooks/use-touch.js +1 -1
  277. package/esm/hooks/use-update-effect.js +1 -1
  278. package/esm/hooks/use-validation-resolver.js +1 -1
  279. package/esm/icons/alert-danger.svg.js +1 -1
  280. package/esm/icons/alert-info.svg.js +1 -1
  281. package/esm/icons/alert-success.svg.js +1 -1
  282. package/esm/icons/alert-warning.svg.js +1 -1
  283. package/esm/icons/arrow-double-left.svg.js +1 -1
  284. package/esm/icons/arrow-double-right.svg.js +1 -1
  285. package/esm/icons/back.svg.js +1 -1
  286. package/esm/icons/calendar.svg.js +1 -1
  287. package/esm/icons/caret.svg.js +1 -1
  288. package/esm/icons/check.svg.js +1 -1
  289. package/esm/icons/clock.svg.js +1 -1
  290. package/esm/icons/close-small.svg.js +1 -1
  291. package/esm/icons/close.svg.js +1 -1
  292. package/esm/icons/cloud-upload.svg.js +1 -1
  293. package/esm/icons/column-filter.svg.js +1 -1
  294. package/esm/icons/columns.svg.js +1 -1
  295. package/esm/icons/compress-alt.svg.js +1 -1
  296. package/esm/icons/copy.svg.js +1 -1
  297. package/esm/icons/date.svg.js +1 -1
  298. package/esm/icons/department.svg.js +1 -1
  299. package/esm/icons/desk-empty.svg.js +1 -1
  300. package/esm/icons/dot.svg.js +1 -1
  301. package/esm/icons/down-arrow-bold.svg.js +1 -1
  302. package/esm/icons/down.svg.js +1 -1
  303. package/esm/icons/download.svg.js +1 -1
  304. package/esm/icons/drag-bar.svg.js +1 -1
  305. package/esm/icons/drag.svg.js +1 -1
  306. package/esm/icons/edit.svg.js +1 -1
  307. package/esm/icons/ellipsis-v.svg.js +1 -1
  308. package/esm/icons/enter.svg.js +1 -1
  309. package/esm/icons/exchange.svg.js +1 -1
  310. package/esm/icons/expand-alt.svg.js +1 -1
  311. package/esm/icons/fail.svg.js +1 -1
  312. package/esm/icons/file.svg.js +1 -1
  313. package/esm/icons/filter.svg.js +1 -1
  314. package/esm/icons/folder.svg.js +1 -1
  315. package/esm/icons/fullscreen.svg.js +21 -0
  316. package/esm/icons/function.svg.js +1 -1
  317. package/esm/icons/home.svg.js +1 -1
  318. package/esm/icons/if.svg.js +1 -1
  319. package/esm/icons/image.svg.js +1 -1
  320. package/esm/icons/info-circle.svg.js +1 -1
  321. package/esm/icons/info.svg.js +1 -1
  322. package/esm/icons/input-clear.svg.js +1 -1
  323. package/esm/icons/invisible.svg.js +1 -1
  324. package/esm/icons/left-arrow.svg.js +1 -1
  325. package/esm/icons/loading-outline.svg.js +1 -1
  326. package/esm/icons/location.svg.js +1 -1
  327. package/esm/icons/menu.svg.js +1 -1
  328. package/esm/icons/minus.svg.js +1 -1
  329. package/esm/icons/move.svg.js +1 -1
  330. package/esm/icons/mute.svg.js +1 -1
  331. package/esm/icons/new-edit.svg.js +1 -1
  332. package/esm/icons/pause.svg.js +1 -1
  333. package/esm/icons/pencil.svg.js +1 -1
  334. package/esm/icons/play.svg.js +1 -1
  335. package/esm/icons/plus-cicle.svg.js +1 -1
  336. package/esm/icons/plus-fine.svg.js +1 -1
  337. package/esm/icons/plus.svg.js +1 -1
  338. package/esm/icons/post.svg.js +1 -1
  339. package/esm/icons/question-mark.svg.js +1 -1
  340. package/esm/icons/question.svg.js +1 -1
  341. package/esm/icons/redo.svg.js +1 -1
  342. package/esm/icons/refresh.svg.js +1 -1
  343. package/esm/icons/reload.svg.js +1 -1
  344. package/esm/icons/remove.svg.js +1 -1
  345. package/esm/icons/retry.svg.js +1 -1
  346. package/esm/icons/right-arrow-bold.svg.js +1 -1
  347. package/esm/icons/right-arrow.svg.js +1 -1
  348. package/esm/icons/right-double-arrow.svg.js +1 -1
  349. package/esm/icons/role.svg.js +1 -1
  350. package/esm/icons/rotate-left.svg.js +1 -1
  351. package/esm/icons/rotate-right.svg.js +1 -1
  352. package/esm/icons/scale-origin.svg.js +1 -1
  353. package/esm/icons/schedule.svg.js +1 -1
  354. package/esm/icons/search.svg.js +1 -1
  355. package/esm/icons/setting.svg.js +1 -1
  356. package/esm/icons/slider-handle-icon.svg.js +1 -1
  357. package/esm/icons/sort-asc.svg.js +1 -1
  358. package/esm/icons/sort-default.svg.js +1 -1
  359. package/esm/icons/sort-desc.svg.js +1 -1
  360. package/esm/icons/star.svg.js +1 -1
  361. package/esm/icons/status-close.svg.js +1 -1
  362. package/esm/icons/steps-finsh.svg.js +1 -1
  363. package/esm/icons/sub-plus.svg.js +20 -0
  364. package/esm/icons/success.svg.js +1 -1
  365. package/esm/icons/transparent.svg.js +1 -1
  366. package/esm/icons/trash.svg.js +1 -1
  367. package/esm/icons/tree-down.svg.js +1 -1
  368. package/esm/icons/undo-normal.svg.js +25 -0
  369. package/esm/icons/undo.svg.js +1 -1
  370. package/esm/icons/unfullscreen.svg.js +21 -0
  371. package/esm/icons/upload.svg.js +1 -1
  372. package/esm/icons/user-remove.svg.js +1 -1
  373. package/esm/icons/view.svg.js +1 -1
  374. package/esm/icons/volume.svg.js +1 -1
  375. package/esm/icons/warning-mark.svg.js +1 -1
  376. package/esm/icons/warning.svg.js +1 -1
  377. package/esm/icons/window-restore.svg.js +1 -1
  378. package/esm/icons/zoom-in.svg.js +1 -1
  379. package/esm/icons/zoom-out.svg.js +1 -1
  380. package/esm/index.js +4 -2
  381. package/esm/locale/de-DE.js +27 -11
  382. package/esm/locale/en-US.js +18 -2
  383. package/esm/locale/zh-CN.js +19 -3
  384. package/esm/node_modules/pdfjs-dist/build/pdf.worker.min.js +37 -0
  385. package/esm/node_modules/smooth-signature/es/index.js +506 -0
  386. package/esm/themes/ang.js +1 -1
  387. package/esm/themes/antd.js +1 -1
  388. package/esm/themes/cxd.js +1 -1
  389. package/esm/themes/dark.js +1 -1
  390. package/lib/_virtual/_commonjsHelpers.js +14 -0
  391. package/lib/_virtual/pdf.worker.min.js +12 -0
  392. package/lib/components/404.js +1 -1
  393. package/lib/components/Alert.d.ts +124 -122
  394. package/lib/components/Alert.js +10 -6
  395. package/lib/components/Alert2.d.ts +20 -20
  396. package/lib/components/Alert2.js +1 -1
  397. package/lib/components/AnchorNav.d.ts +20 -20
  398. package/lib/components/AnchorNav.js +1 -1
  399. package/lib/components/ArrayInput.d.ts +40 -40
  400. package/lib/components/ArrayInput.js +1 -1
  401. package/lib/components/AsideNav.d.ts +12 -11
  402. package/lib/components/AsideNav.js +5 -2
  403. package/lib/components/AssociatedSelection.d.ts +80 -80
  404. package/lib/components/AssociatedSelection.js +4 -4
  405. package/lib/components/Avatar.d.ts +70 -70
  406. package/lib/components/Avatar.js +1 -1
  407. package/lib/components/Badge.d.ts +1 -1
  408. package/lib/components/Badge.js +1 -1
  409. package/lib/components/BaiduMapPicker.js +1 -1
  410. package/lib/components/BarCode.js +1 -1
  411. package/lib/components/Breadcrumb.d.ts +3 -0
  412. package/lib/components/Breadcrumb.js +7 -6
  413. package/lib/components/Button.d.ts +42 -41
  414. package/lib/components/Button.js +3 -3
  415. package/lib/components/CalendarMobile.d.ts +85 -80
  416. package/lib/components/CalendarMobile.js +41 -6
  417. package/lib/components/Card.d.ts +110 -110
  418. package/lib/components/Card.js +1 -1
  419. package/lib/components/Cascader.js +1 -1
  420. package/lib/components/ChainedDropdownSelection.d.ts +80 -80
  421. package/lib/components/ChainedDropdownSelection.js +1 -1
  422. package/lib/components/ChainedSelection.d.ts +80 -80
  423. package/lib/components/ChainedSelection.js +8 -6
  424. package/lib/components/Checkbox.d.ts +12 -11
  425. package/lib/components/Checkbox.js +6 -6
  426. package/lib/components/CityArea.js +1 -1
  427. package/lib/components/CityDB.d.ts +1 -1
  428. package/lib/components/CityDB.js +377 -889
  429. package/lib/components/CodeMirror.d.ts +1 -0
  430. package/lib/components/CodeMirror.js +15 -4
  431. package/lib/components/Collapse.d.ts +140 -140
  432. package/lib/components/Collapse.js +1 -1
  433. package/lib/components/CollapseGroup.d.ts +20 -20
  434. package/lib/components/CollapseGroup.js +1 -1
  435. package/lib/components/ColorPicker.d.ts +40 -40
  436. package/lib/components/ColorPicker.js +1 -1
  437. package/lib/components/Combo.js +1 -1
  438. package/lib/components/ConfirmBox.d.ts +81 -80
  439. package/lib/components/ConfirmBox.js +6 -3
  440. package/lib/components/ContextMenu.d.ts +17 -3
  441. package/lib/components/ContextMenu.js +73 -20
  442. package/lib/components/DatePicker.d.ts +124 -122
  443. package/lib/components/DatePicker.js +12 -12
  444. package/lib/components/DateRangePicker.d.ts +293 -289
  445. package/lib/components/DateRangePicker.js +40 -27
  446. package/lib/components/DndContainer.js +1 -1
  447. package/lib/components/Drawer.d.ts +30 -30
  448. package/lib/components/Drawer.js +1 -1
  449. package/lib/components/DropDownSelection.d.ts +80 -80
  450. package/lib/components/DropDownSelection.js +1 -1
  451. package/lib/components/Editor.d.ts +120 -120
  452. package/lib/components/Editor.js +3 -3
  453. package/lib/components/Form.js +1 -1
  454. package/lib/components/FormField.js +1 -1
  455. package/lib/components/GaodeMapPicker.js +1 -1
  456. package/lib/components/GridNav.js +1 -1
  457. package/lib/components/GroupedSelection.d.ts +80 -80
  458. package/lib/components/GroupedSelection.js +5 -4
  459. package/lib/components/Html.js +1 -1
  460. package/lib/components/ImageGallery.d.ts +40 -40
  461. package/lib/components/ImageGallery.js +2 -1
  462. package/lib/components/Input.d.ts +3 -1
  463. package/lib/components/Input.js +3 -3
  464. package/lib/components/InputBox.d.ts +14 -13
  465. package/lib/components/InputBox.js +6 -6
  466. package/lib/components/InputBoxWithSuggestion.js +7 -7
  467. package/lib/components/InputTable.js +1 -1
  468. package/lib/components/Layout.d.ts +10 -10
  469. package/lib/components/Layout.js +1 -1
  470. package/lib/components/Link.js +1 -1
  471. package/lib/components/ListGroup.d.ts +10 -10
  472. package/lib/components/ListGroup.js +1 -1
  473. package/lib/components/ListMenu.d.ts +82 -80
  474. package/lib/components/ListMenu.js +3 -3
  475. package/lib/components/LocationPicker.d.ts +40 -40
  476. package/lib/components/LocationPicker.js +1 -1
  477. package/lib/components/Markdown.js +1 -1
  478. package/lib/components/Modal.d.ts +80 -80
  479. package/lib/components/Modal.js +1 -1
  480. package/lib/components/ModalManager.js +1 -1
  481. package/lib/components/MonthRangePicker.d.ts +160 -160
  482. package/lib/components/MultilineText.d.ts +40 -40
  483. package/lib/components/MultilineText.js +1 -1
  484. package/lib/components/NumberInput.d.ts +30 -21
  485. package/lib/components/NumberInput.js +36 -6
  486. package/lib/components/OverflowTpl.js +1 -1
  487. package/lib/components/Pagination.d.ts +200 -110
  488. package/lib/components/Pagination.js +20 -20
  489. package/lib/components/PdfViewer.d.ts +49 -0
  490. package/lib/components/PdfViewer.js +91 -0
  491. package/lib/components/Picker.d.ts +1 -0
  492. package/lib/components/Picker.js +4 -4
  493. package/lib/components/PickerColumn.d.ts +1 -0
  494. package/lib/components/PickerColumn.js +7 -5
  495. package/lib/components/PickerContainer.d.ts +1 -2
  496. package/lib/components/PickerContainer.js +26 -16
  497. package/lib/components/PopOverContainer.d.ts +1 -0
  498. package/lib/components/PopOverContainer.js +3 -3
  499. package/lib/components/PopUp.d.ts +40 -40
  500. package/lib/components/PopUp.js +1 -1
  501. package/lib/components/Progress.d.ts +50 -50
  502. package/lib/components/Progress.js +1 -1
  503. package/lib/components/PullRefresh.js +1 -1
  504. package/lib/components/Radios.d.ts +12 -10
  505. package/lib/components/Radios.js +4 -3
  506. package/lib/components/Range.js +1 -1
  507. package/lib/components/Rating.d.ts +10 -10
  508. package/lib/components/Rating.js +1 -1
  509. package/lib/components/ResultBox.d.ts +82 -81
  510. package/lib/components/ResultBox.js +25 -21
  511. package/lib/components/ResultList.d.ts +42 -40
  512. package/lib/components/ResultList.js +5 -4
  513. package/lib/components/ResultTableList.d.ts +80 -80
  514. package/lib/components/ResultTableList.js +5 -4
  515. package/lib/components/ResultTreeList.d.ts +40 -40
  516. package/lib/components/ResultTreeList.js +3 -3
  517. package/lib/components/RichText.js +1 -1
  518. package/lib/components/SearchBox.d.ts +82 -81
  519. package/lib/components/SearchBox.js +7 -7
  520. package/lib/components/Select.d.ts +1366 -1357
  521. package/lib/components/Select.js +12 -11
  522. package/lib/components/SelectMobile.js +22 -19
  523. package/lib/components/Selection.d.ts +82 -80
  524. package/lib/components/Selection.js +1 -1
  525. package/lib/components/Signature.d.ts +280 -0
  526. package/lib/components/Signature.js +275 -0
  527. package/lib/components/SparkLine.d.ts +40 -40
  528. package/lib/components/SparkLine.js +1 -1
  529. package/lib/components/Spinner.d.ts +60 -60
  530. package/lib/components/Spinner.js +1 -1
  531. package/lib/components/Steps.js +1 -1
  532. package/lib/components/Switch.d.ts +12 -12
  533. package/lib/components/Switch.js +3 -3
  534. package/lib/components/TableSelection.d.ts +80 -80
  535. package/lib/components/TableSelection.js +6 -5
  536. package/lib/components/Tabs.d.ts +83 -81
  537. package/lib/components/Tabs.js +21 -22
  538. package/lib/components/TabsTransfer.d.ts +40 -40
  539. package/lib/components/TabsTransfer.js +16 -14
  540. package/lib/components/TabsTransferPicker.js +1 -1
  541. package/lib/components/Tag.d.ts +70 -70
  542. package/lib/components/Tag.js +1 -1
  543. package/lib/components/Textarea.d.ts +42 -42
  544. package/lib/components/Textarea.js +3 -3
  545. package/lib/components/Timeline.js +1 -1
  546. package/lib/components/TimelineItem.d.ts +1 -1
  547. package/lib/components/TimelineItem.js +1 -1
  548. package/lib/components/Tinymce.js +7 -4
  549. package/lib/components/TitleBar.d.ts +10 -10
  550. package/lib/components/TitleBar.js +1 -1
  551. package/lib/components/Toast.d.ts +80 -80
  552. package/lib/components/Toast.js +1 -1
  553. package/lib/components/Tooltip.js +1 -1
  554. package/lib/components/TooltipWrapper.d.ts +42 -42
  555. package/lib/components/TooltipWrapper.js +1 -1
  556. package/lib/components/Transfer.d.ts +192 -190
  557. package/lib/components/Transfer.js +16 -16
  558. package/lib/components/TransferDropDown.d.ts +160 -160
  559. package/lib/components/TransferDropDown.js +1 -1
  560. package/lib/components/TransferPicker.js +1 -1
  561. package/lib/components/TransferSearch.js +1 -1
  562. package/lib/components/Tree.d.ts +286 -290
  563. package/lib/components/Tree.js +31 -29
  564. package/lib/components/TreeSelection.d.ts +120 -120
  565. package/lib/components/TreeSelection.js +1 -1
  566. package/lib/components/UserSelect.d.ts +40 -40
  567. package/lib/components/UserSelect.js +1 -1
  568. package/lib/components/UserTabSelect.d.ts +40 -40
  569. package/lib/components/UserTabSelect.js +1 -1
  570. package/lib/components/WithRemoteConfig.d.ts +9 -0
  571. package/lib/components/WithRemoteConfig.js +19 -3
  572. package/lib/components/WithStore.js +1 -1
  573. package/lib/components/calendar/Calendar.d.ts +2 -1
  574. package/lib/components/calendar/Calendar.js +6 -5
  575. package/lib/components/calendar/CalendarContainer.js +1 -1
  576. package/lib/components/calendar/DaysView.d.ts +2 -1
  577. package/lib/components/calendar/DaysView.js +17 -15
  578. package/lib/components/calendar/MonthsView.d.ts +2 -0
  579. package/lib/components/calendar/MonthsView.js +8 -6
  580. package/lib/components/calendar/QuartersView.d.ts +2 -0
  581. package/lib/components/calendar/QuartersView.js +7 -6
  582. package/lib/components/calendar/TimeView.d.ts +2 -0
  583. package/lib/components/calendar/TimeView.js +8 -7
  584. package/lib/components/calendar/YearsView.d.ts +2 -0
  585. package/lib/components/calendar/YearsView.js +6 -5
  586. package/lib/components/condition-builder/Expression.js +1 -1
  587. package/lib/components/condition-builder/Field.js +1 -1
  588. package/lib/components/condition-builder/Func.js +1 -1
  589. package/lib/components/condition-builder/Group.js +1 -1
  590. package/lib/components/condition-builder/GroupOrItem.js +1 -1
  591. package/lib/components/condition-builder/InputSwitch.js +1 -1
  592. package/lib/components/condition-builder/Item.js +1 -1
  593. package/lib/components/condition-builder/Value.d.ts +1 -0
  594. package/lib/components/condition-builder/Value.js +28 -12
  595. package/lib/components/condition-builder/config.js +1 -1
  596. package/lib/components/condition-builder/index.d.ts +1 -1
  597. package/lib/components/condition-builder/index.js +1 -1
  598. package/lib/components/formula/CodeEditor.d.ts +92 -0
  599. package/lib/components/formula/CodeEditor.js +110 -0
  600. package/lib/components/formula/Editor.d.ts +64 -69
  601. package/lib/components/formula/Editor.js +172 -78
  602. package/lib/components/formula/FuncList.d.ts +1 -1
  603. package/lib/components/formula/FuncList.js +10 -9
  604. package/lib/components/formula/Input.d.ts +68 -54
  605. package/lib/components/formula/Input.js +43 -101
  606. package/lib/components/formula/Picker.d.ts +74 -60
  607. package/lib/components/formula/Picker.js +128 -68
  608. package/lib/components/formula/VariableList.d.ts +1 -1
  609. package/lib/components/formula/VariableList.js +24 -10
  610. package/lib/components/formula/plugin.d.ts +28 -7
  611. package/lib/components/formula/plugin.js +220 -89
  612. package/lib/components/icons.d.ts +4 -2
  613. package/lib/components/icons.js +14 -5
  614. package/lib/components/index.d.ts +5 -3
  615. package/lib/components/json-schema/Array.js +3 -3
  616. package/lib/components/json-schema/Item.d.ts +3 -1
  617. package/lib/components/json-schema/Item.js +39 -8
  618. package/lib/components/json-schema/Object.d.ts +3 -1
  619. package/lib/components/json-schema/Object.js +113 -51
  620. package/lib/components/json-schema/index.d.ts +53 -50
  621. package/lib/components/json-schema/index.js +18 -5
  622. package/lib/components/menu/MenuContext.js +1 -1
  623. package/lib/components/menu/MenuItem.d.ts +2 -1
  624. package/lib/components/menu/MenuItem.js +3 -3
  625. package/lib/components/menu/SubMenu.d.ts +2 -1
  626. package/lib/components/menu/SubMenu.js +5 -5
  627. package/lib/components/menu/index.d.ts +86 -83
  628. package/lib/components/menu/index.js +10 -7
  629. package/lib/components/schema-editor/Array.js +23 -8
  630. package/lib/components/schema-editor/Common.d.ts +17 -1
  631. package/lib/components/schema-editor/Common.js +83 -36
  632. package/lib/components/schema-editor/Item.js +2 -2
  633. package/lib/components/schema-editor/Object.d.ts +7 -1
  634. package/lib/components/schema-editor/Object.js +105 -13
  635. package/lib/components/schema-editor/SchemaVariableList.d.ts +1 -1
  636. package/lib/components/schema-editor/SchemaVariableList.js +1 -1
  637. package/lib/components/schema-editor/SchemaVariableListPicker.js +1 -1
  638. package/lib/components/schema-editor/index.d.ts +48 -40
  639. package/lib/components/schema-editor/index.js +4 -4
  640. package/lib/components/table/Cell.d.ts +2 -0
  641. package/lib/components/table/Cell.js +4 -4
  642. package/lib/components/table/ColGroup.js +1 -1
  643. package/lib/components/table/Head.d.ts +2 -0
  644. package/lib/components/table/Head.js +12 -9
  645. package/lib/components/table/HeadCellDropDown.d.ts +2 -0
  646. package/lib/components/table/HeadCellDropDown.js +1 -1
  647. package/lib/components/table/HeadCellFilter.d.ts +82 -80
  648. package/lib/components/table/HeadCellFilter.js +8 -8
  649. package/lib/components/table/HeadCellSelect.d.ts +40 -40
  650. package/lib/components/table/HeadCellSelect.js +1 -1
  651. package/lib/components/table/HeadCellSort.d.ts +2 -0
  652. package/lib/components/table/HeadCellSort.js +7 -7
  653. package/lib/components/table/ItemActionsWrapper.js +1 -1
  654. package/lib/components/table/Row.d.ts +2 -0
  655. package/lib/components/table/Row.js +4 -3
  656. package/lib/components/table/SummaryRow.js +1 -1
  657. package/lib/components/table/index.d.ts +122 -120
  658. package/lib/components/table/index.js +7 -5
  659. package/lib/components/table/util.d.ts +7 -7
  660. package/lib/components/table/util.js +4 -2
  661. package/lib/components/virtual-list/AutoSizer.js +1 -1
  662. package/lib/components/virtual-list/SizeAndPositionManager.js +1 -1
  663. package/lib/components/virtual-list/constants.js +1 -1
  664. package/lib/components/virtual-list/index.js +1 -1
  665. package/lib/hooks/use-set-state.js +1 -1
  666. package/lib/hooks/use-sub-form.js +1 -1
  667. package/lib/hooks/use-touch.js +1 -1
  668. package/lib/hooks/use-update-effect.js +1 -1
  669. package/lib/hooks/use-validation-resolver.js +1 -1
  670. package/lib/icons/alert-danger.svg.js +1 -1
  671. package/lib/icons/alert-info.svg.js +1 -1
  672. package/lib/icons/alert-success.svg.js +1 -1
  673. package/lib/icons/alert-warning.svg.js +1 -1
  674. package/lib/icons/arrow-double-left.svg.js +1 -1
  675. package/lib/icons/arrow-double-right.svg.js +1 -1
  676. package/lib/icons/back.svg.js +1 -1
  677. package/lib/icons/calendar.svg.js +1 -1
  678. package/lib/icons/caret.svg.js +1 -1
  679. package/lib/icons/check.svg.js +1 -1
  680. package/lib/icons/clock.svg.js +1 -1
  681. package/lib/icons/close-small.svg.js +1 -1
  682. package/lib/icons/close.svg.js +1 -1
  683. package/lib/icons/cloud-upload.svg.js +1 -1
  684. package/lib/icons/column-filter.svg.js +1 -1
  685. package/lib/icons/columns.svg.js +1 -1
  686. package/lib/icons/compress-alt.svg.js +1 -1
  687. package/lib/icons/copy.svg.js +1 -1
  688. package/lib/icons/date.svg.js +1 -1
  689. package/lib/icons/department.svg.js +1 -1
  690. package/lib/icons/desk-empty.svg.js +1 -1
  691. package/lib/icons/dot.svg.js +1 -1
  692. package/lib/icons/down-arrow-bold.svg.js +1 -1
  693. package/lib/icons/down.svg.js +1 -1
  694. package/lib/icons/download.svg.js +1 -1
  695. package/lib/icons/drag-bar.svg.js +1 -1
  696. package/lib/icons/drag.svg.js +1 -1
  697. package/lib/icons/edit.svg.js +1 -1
  698. package/lib/icons/ellipsis-v.svg.js +1 -1
  699. package/lib/icons/enter.svg.js +1 -1
  700. package/lib/icons/exchange.svg.js +1 -1
  701. package/lib/icons/expand-alt.svg.js +1 -1
  702. package/lib/icons/fail.svg.js +1 -1
  703. package/lib/icons/file.svg.js +1 -1
  704. package/lib/icons/filter.svg.js +1 -1
  705. package/lib/icons/folder.svg.js +1 -1
  706. package/lib/icons/fullscreen.svg.js +28 -0
  707. package/lib/icons/function.svg.js +1 -1
  708. package/lib/icons/home.svg.js +1 -1
  709. package/lib/icons/if.svg.js +1 -1
  710. package/lib/icons/image.svg.js +1 -1
  711. package/lib/icons/info-circle.svg.js +1 -1
  712. package/lib/icons/info.svg.js +1 -1
  713. package/lib/icons/input-clear.svg.js +1 -1
  714. package/lib/icons/invisible.svg.js +1 -1
  715. package/lib/icons/left-arrow.svg.js +1 -1
  716. package/lib/icons/loading-outline.svg.js +1 -1
  717. package/lib/icons/location.svg.js +1 -1
  718. package/lib/icons/menu.svg.js +1 -1
  719. package/lib/icons/minus.svg.js +1 -1
  720. package/lib/icons/move.svg.js +1 -1
  721. package/lib/icons/mute.svg.js +1 -1
  722. package/lib/icons/new-edit.svg.js +1 -1
  723. package/lib/icons/pause.svg.js +1 -1
  724. package/lib/icons/pencil.svg.js +1 -1
  725. package/lib/icons/play.svg.js +1 -1
  726. package/lib/icons/plus-cicle.svg.js +1 -1
  727. package/lib/icons/plus-fine.svg.js +1 -1
  728. package/lib/icons/plus.svg.js +1 -1
  729. package/lib/icons/post.svg.js +1 -1
  730. package/lib/icons/question-mark.svg.js +1 -1
  731. package/lib/icons/question.svg.js +1 -1
  732. package/lib/icons/redo.svg.js +1 -1
  733. package/lib/icons/refresh.svg.js +1 -1
  734. package/lib/icons/reload.svg.js +1 -1
  735. package/lib/icons/remove.svg.js +1 -1
  736. package/lib/icons/retry.svg.js +1 -1
  737. package/lib/icons/right-arrow-bold.svg.js +1 -1
  738. package/lib/icons/right-arrow.svg.js +1 -1
  739. package/lib/icons/right-double-arrow.svg.js +1 -1
  740. package/lib/icons/role.svg.js +1 -1
  741. package/lib/icons/rotate-left.svg.js +1 -1
  742. package/lib/icons/rotate-right.svg.js +1 -1
  743. package/lib/icons/scale-origin.svg.js +1 -1
  744. package/lib/icons/schedule.svg.js +1 -1
  745. package/lib/icons/search.svg.js +1 -1
  746. package/lib/icons/setting.svg.js +1 -1
  747. package/lib/icons/slider-handle-icon.svg.js +1 -1
  748. package/lib/icons/sort-asc.svg.js +1 -1
  749. package/lib/icons/sort-default.svg.js +1 -1
  750. package/lib/icons/sort-desc.svg.js +1 -1
  751. package/lib/icons/star.svg.js +1 -1
  752. package/lib/icons/status-close.svg.js +1 -1
  753. package/lib/icons/steps-finsh.svg.js +1 -1
  754. package/lib/icons/sub-plus.svg.js +27 -0
  755. package/lib/icons/success.svg.js +1 -1
  756. package/lib/icons/transparent.svg.js +1 -1
  757. package/lib/icons/trash.svg.js +1 -1
  758. package/lib/icons/tree-down.svg.js +1 -1
  759. package/lib/icons/undo-normal.svg.js +32 -0
  760. package/lib/icons/undo.svg.js +1 -1
  761. package/lib/icons/unfullscreen.svg.js +28 -0
  762. package/lib/icons/upload.svg.js +1 -1
  763. package/lib/icons/user-remove.svg.js +1 -1
  764. package/lib/icons/view.svg.js +1 -1
  765. package/lib/icons/volume.svg.js +1 -1
  766. package/lib/icons/warning-mark.svg.js +1 -1
  767. package/lib/icons/warning.svg.js +1 -1
  768. package/lib/icons/window-restore.svg.js +1 -1
  769. package/lib/icons/zoom-in.svg.js +1 -1
  770. package/lib/icons/zoom-out.svg.js +1 -1
  771. package/lib/index.js +6 -1
  772. package/lib/locale/de-DE.js +27 -11
  773. package/lib/locale/en-US.js +18 -2
  774. package/lib/locale/zh-CN.js +19 -3
  775. package/lib/node_modules/pdfjs-dist/build/pdf.worker.min.js +41 -0
  776. package/lib/node_modules/smooth-signature/es/index.js +510 -0
  777. package/lib/{scss → packages/amis-ui/scss}/helper.scss.js +1 -1
  778. package/lib/{scss → packages/amis-ui/scss}/themes/ang.scss.js +1 -1
  779. package/lib/{scss → packages/amis-ui/scss}/themes/antd.scss.js +1 -1
  780. package/lib/{scss → packages/amis-ui/scss}/themes/cxd.scss.js +1 -1
  781. package/lib/{scss → packages/amis-ui/scss}/themes/dark.scss.js +1 -1
  782. package/lib/{scss → packages/amis-ui/scss}/themes/default.scss.js +1 -1
  783. package/lib/themes/ang.css +1032 -38
  784. package/lib/themes/ang.js +1 -1
  785. package/lib/themes/antd.css +1032 -38
  786. package/lib/themes/antd.js +1 -1
  787. package/lib/themes/cxd.css +1032 -38
  788. package/lib/themes/cxd.js +1 -1
  789. package/lib/themes/dark.css +1032 -38
  790. package/lib/themes/dark.js +1 -1
  791. package/lib/themes/default.css +1032 -38
  792. package/package.json +4 -3
  793. package/scss/_components.scss +7 -0
  794. package/scss/_mixins.scss +1 -0
  795. package/scss/_thirds.scss +3 -0
  796. package/scss/components/_collapse.scss +1 -1
  797. package/scss/components/_condition-builder.scss +18 -0
  798. package/scss/components/_crud2.scss +4 -0
  799. package/scss/components/_formula.scss +148 -26
  800. package/scss/components/_image-gallery.scss +7 -1
  801. package/scss/components/_input-box.scss +6 -0
  802. package/scss/components/_json-schema-editor.scss +24 -3
  803. package/scss/components/_json-schema.scss +5 -0
  804. package/scss/components/_menu.scss +3 -0
  805. package/scss/components/_pdf_viewer.scss +47 -0
  806. package/scss/components/_signature.scss +97 -0
  807. package/scss/components/_table.scss +6 -1
  808. package/scss/components/_tabs.scss +10 -4
  809. package/scss/components/form/_combo.scss +1 -0
  810. package/scss/components/form/_form.scss +10 -0
  811. package/scss/components/form/_icon-select.scss +3 -0
  812. package/scss/components/form/_picker.scss +2 -1
  813. package/scss/components/form/_tag.scss +2 -1
  814. package/scss/components/form/_text.scss +4 -4
  815. package/scss/themes/_common.scss +2 -0
@@ -1,34 +1,90 @@
1
1
  /**
2
- * amis-ui v6.2.2
2
+ * amis-ui v6.4.0
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
6
6
  import { __assign, __read } from 'tslib';
7
- import { eachTree } from 'amis-core';
8
- import { FormulaEditor } from './Editor.js';
7
+ import { findTree } from 'amis-core';
8
+ import { parse } from 'amis-formula';
9
+ import debounce from 'lodash/debounce';
9
10
 
10
11
  /**
11
12
  * @file 扩展 codemirror
12
13
  */
13
14
  function editorFactory(dom, cm, props, options) {
14
15
  registerLaunguageMode(cm);
15
- return cm(dom, __assign({ value: props.value || '', autofocus: true, mode: props.evalMode ? 'text/formula' : 'text/formula-template' }, options));
16
+ return cm(dom, __assign({ value: props.value || '', autofocus: false, mode: props.evalMode ? 'text/formula' : 'text/formula-template', readOnly: props.readOnly ? 'nocursor' : false }, options));
17
+ }
18
+ function traverseAst(ast, iterator) {
19
+ if (!ast || !ast.type) {
20
+ return;
21
+ }
22
+ var ret = iterator(ast);
23
+ if (ret === false) {
24
+ return;
25
+ }
26
+ Object.keys(ast).forEach(function (key) {
27
+ var value = ast[key];
28
+ if (Array.isArray(value)) {
29
+ value.forEach(function (child) { return traverseAst(child, iterator); });
30
+ }
31
+ else {
32
+ traverseAst(value, iterator);
33
+ }
34
+ });
16
35
  }
17
36
  var FormulaPlugin = /** @class */ (function () {
18
- function FormulaPlugin(editor, cm, getProps) {
37
+ function FormulaPlugin(editor, cm) {
38
+ var _this = this;
19
39
  this.editor = editor;
20
40
  this.cm = cm;
21
- this.getProps = getProps;
22
- // editor.on('change', this.autoMarkText);
23
- this.autoMarkText();
41
+ /**
42
+ * 用于提示的变量集合,默认为空
43
+ */
44
+ this.variables = [];
45
+ /**
46
+ * 函数集合,默认不需要传,即 amis-formula 里面那个函数
47
+ * 如果有扩充,则需要传。
48
+ */
49
+ this.functions = [];
50
+ /**
51
+ * evalMode 即直接就是表达式,否则就是混合模式
52
+ */
53
+ this.evalMode = true;
54
+ this.highlightMode = 'formula';
55
+ this.disableAutoMark = false;
56
+ this.widgets = [];
57
+ this.marks = [];
58
+ // this.autoMarkText();
59
+ this.autoMarkText = debounce(this.autoMarkText.bind(this), 250, {
60
+ leading: false,
61
+ trailing: true
62
+ });
63
+ editor.on('blur', function () { return _this.autoMarkText(); });
24
64
  }
25
- FormulaPlugin.prototype.autoMarkText = function () {
26
- var _a = this.getProps(); _a.functions; var variables = _a.variables, value = _a.value;
27
- if (value) {
28
- // todo functions 也需要自动替换
29
- this.autoMark(variables);
30
- this.focus(value);
65
+ FormulaPlugin.prototype.setVariables = function (variables) {
66
+ this.variables = Array.isArray(variables) ? variables : [];
67
+ };
68
+ FormulaPlugin.prototype.setFunctions = function (functions) {
69
+ this.functions = Array.isArray(functions) ? functions : [];
70
+ };
71
+ FormulaPlugin.prototype.setEvalMode = function (evalMode) {
72
+ this.evalMode = evalMode;
73
+ };
74
+ FormulaPlugin.prototype.setHighlightMode = function (highlightMode) {
75
+ this.highlightMode = highlightMode;
76
+ };
77
+ FormulaPlugin.prototype.setDisableAutoMark = function (disableAutoMark) {
78
+ this.disableAutoMark = disableAutoMark;
79
+ this.autoMarkText(true);
80
+ };
81
+ FormulaPlugin.prototype.autoMarkText = function (forceClear) {
82
+ var _a;
83
+ if (forceClear === void 0) { forceClear = false; }
84
+ if (forceClear || !this.editor.hasFocus()) {
85
+ (_a = this.editor) === null || _a === void 0 ? void 0 : _a.getAllMarks().forEach(function (mark) { return mark.clear(); });
31
86
  }
87
+ this.disableAutoMark || this.autoMark();
32
88
  };
33
89
  // 计算 `${`、`}` 括号的位置,如 ${a}+${b}, 结果是 [ { from: 0, to: 3 }, { from: 5, to: 8 } ]
34
90
  FormulaPlugin.prototype.computedBracesPosition = function (exp) {
@@ -86,34 +142,17 @@ var FormulaPlugin = /** @class */ (function () {
86
142
  this.editor.replaceSelection('}');
87
143
  }
88
144
  };
89
- FormulaPlugin.prototype.insertContent = function (value, type, className, toMark) {
90
- var _this = this;
91
- if (className === void 0) { className = 'cm-field'; }
92
- if (toMark === void 0) { toMark = true; }
145
+ FormulaPlugin.prototype.insertContent = function (value, type) {
93
146
  var from = this.editor.getCursor();
94
- var evalMode = this.getProps().evalMode;
147
+ var evalMode = this.evalMode;
95
148
  if (type === 'variable') {
96
149
  this.editor.replaceSelection(value.key);
97
- var to_1 = this.editor.getCursor();
98
- if (toMark) {
99
- // 路径中每个变量分别进行标记
100
- var markFrom_1 = from.ch;
101
- value.path.split('.').forEach(function (label, index) {
102
- var val = value.key.split('.')[index];
103
- _this.markText({ line: from.line, ch: markFrom_1 }, { line: to_1.line, ch: markFrom_1 + val.length }, label, className);
104
- markFrom_1 += 1 + val.length;
105
- });
106
- }
107
- !evalMode && this.insertBraces(from, to_1);
150
+ var to = this.editor.getCursor();
151
+ !evalMode && this.insertBraces(from, to);
108
152
  }
109
153
  else if (type === 'func') {
110
154
  this.editor.replaceSelection("".concat(value, "()"));
111
155
  var to = this.editor.getCursor();
112
- toMark &&
113
- this.markText(from, {
114
- line: to.line,
115
- ch: to.ch - 2
116
- }, value, 'cm-func');
117
156
  this.editor.setCursor({
118
157
  line: to.line,
119
158
  ch: to.ch - 1
@@ -129,7 +168,6 @@ var FormulaPlugin = /** @class */ (function () {
129
168
  else if (typeof value === 'string') {
130
169
  this.editor.replaceSelection(value);
131
170
  // 非变量、非函数,可能是组合模式,也需要标记
132
- toMark && setTimeout(function () { return _this.autoMarkText(); }, 0);
133
171
  }
134
172
  this.editor.focus();
135
173
  };
@@ -139,75 +177,161 @@ var FormulaPlugin = /** @class */ (function () {
139
177
  FormulaPlugin.prototype.getValue = function () {
140
178
  return this.editor.getValue();
141
179
  };
142
- FormulaPlugin.prototype.markText = function (from, to, label, className) {
180
+ FormulaPlugin.prototype.markText = function (from, to, label, className, rawString) {
143
181
  if (className === void 0) { className = 'cm-func'; }
144
182
  var text = document.createElement('span');
145
183
  text.className = className;
146
184
  text.innerText = label;
147
- this.editor.markText(from, to, {
185
+ if (rawString) {
186
+ text.setAttribute('data-tooltip', rawString);
187
+ text.setAttribute('data-position', 'bottom');
188
+ }
189
+ return this.editor.markText(from, to, {
148
190
  atomic: true,
149
191
  replacedWith: text
150
192
  });
151
193
  };
152
- FormulaPlugin.prototype.autoMark = function (variables) {
194
+ FormulaPlugin.prototype.autoMark = function () {
153
195
  var _this = this;
154
- if (!Array.isArray(variables) || !variables.length) {
155
- return;
156
- }
157
- var varMap = {};
158
- eachTree(variables, function (item) {
159
- var _a;
160
- if (item.value) {
161
- varMap[item.value] = (_a = item.path) !== null && _a !== void 0 ? _a : item.label;
162
- }
163
- });
164
- var vars = Object.keys(varMap).sort(function (a, b) { return b.length - a.length; });
165
196
  var editor = this.editor;
166
- var lines = editor.lineCount();
167
- var _a = this.getProps().evalMode, evalMode = _a === void 0 ? true : _a;
168
- var _loop_1 = function (line) {
169
- var content = editor.getLine(line);
170
- // 标记方法调用
171
- content.replace(/([A-Z]+)\s*\(/g, function (_, func, pos) {
172
- _this.markText({
173
- line: line,
174
- ch: pos
175
- }, {
176
- line: line,
177
- ch: pos + func.length
178
- }, func, 'cm-func');
179
- return _;
197
+ var value = editor.getValue();
198
+ var functions = this.functions;
199
+ var variables = this.variables;
200
+ var highlightMode = this.highlightMode;
201
+ // 把旧的清掉
202
+ this.widgets.forEach(function (widget) { return editor.removeLineWidget(widget); });
203
+ this.widgets = [];
204
+ this.marks.forEach(function (mark) { return mark.clear(); });
205
+ this.marks = [];
206
+ try {
207
+ var ast = parse(value, {
208
+ evalMode: this.evalMode,
209
+ variableMode: false
180
210
  });
181
- var REPLACE_KEY = 'AMIS_FORMULA_REPLACE_KEY';
182
- // 标记变量
183
- vars.forEach(function (v) {
184
- var from = 0;
185
- var idx = -1;
186
- var _loop_2 = function () {
187
- var encode = FormulaEditor.replaceStrByIndex(content, idx, v, REPLACE_KEY);
188
- var reg = FormulaEditor.getRegExpByMode(evalMode, REPLACE_KEY);
189
- if (reg.test(encode)) {
190
- var markFrom_2 = idx;
191
- v.split('.').forEach(function (val, index) {
211
+ traverseAst(ast, function (ast) {
212
+ var _a, _b;
213
+ if (highlightMode === 'expression') {
214
+ if (ast.type === 'script') {
215
+ _this.markText({
216
+ line: ast.start.line - 1,
217
+ ch: ast.start.column - 1
218
+ }, {
219
+ line: ast.end.line - 1,
220
+ ch: ast.end.column - 1
221
+ }, value.substring(ast.start.index + 2, ast.end.index - 1), 'cm-expression', value);
222
+ }
223
+ return;
224
+ }
225
+ if (ast.type === 'func_call') {
226
+ var funName_1 = ast.identifier;
227
+ var exists = functions.some(function (item) {
228
+ return item.items.some(function (i) { return i.name === funName_1; });
229
+ });
230
+ if (exists) {
231
+ _this.markText({
232
+ line: ast.start.line - 1,
233
+ ch: ast.start.column - 1
234
+ }, {
235
+ line: ast.start.line - 1,
236
+ ch: ast.start.column + funName_1.length - 1
237
+ }, funName_1, 'cm-func');
238
+ }
239
+ }
240
+ else if (ast.type === 'getter') {
241
+ // 获取对象中的变量
242
+ var list = [ast];
243
+ var current = ast;
244
+ while ((current === null || current === void 0 ? void 0 : current.type) === 'getter') {
245
+ current = current.host;
246
+ list.unshift(current);
247
+ }
248
+ var host_1 = list.shift();
249
+ if ((host_1 === null || host_1 === void 0 ? void 0 : host_1.type) === 'variable') {
250
+ var variable = findTree(variables, function (item) { return item.value === host_1.name; });
251
+ if (variable) {
252
+ // 先标记顶层对象
192
253
  _this.markText({
193
- line: line,
194
- ch: markFrom_2
254
+ line: host_1.start.line - 1,
255
+ ch: host_1.start.column - 1
195
256
  }, {
196
- line: line,
197
- ch: markFrom_2 + val.length
198
- }, varMap[v].split('.')[index], 'cm-field');
199
- markFrom_2 += 1 + val.length;
200
- });
257
+ line: host_1.end.line - 1,
258
+ ch: host_1.end.column - 1
259
+ }, variable.label, 'cm-field', host_1.name);
260
+ // 再标记子对象
261
+ var path_1 = host_1.name + '.';
262
+ var vars = variable.children || [];
263
+ var _loop_1 = function (i, len) {
264
+ var item = (_a = list[i]) === null || _a === void 0 ? void 0 : _a.key;
265
+ // 只能识别这种固定下标的情况
266
+ if ((item === null || item === void 0 ? void 0 : item.type) === 'identifier') {
267
+ var variable_1 = (_b = findTree(vars, function (v) { return v.value === path_1 + item.name; })) !== null && _b !== void 0 ? _b : findTree(vars, function (v) { return v.value === item.name; } // 兼容不带路径的情况
268
+ );
269
+ if (variable_1) {
270
+ _this.markText({
271
+ line: item.start.line - 1,
272
+ ch: item.start.column - 1
273
+ }, {
274
+ line: item.end.line - 1,
275
+ ch: item.end.column - 1
276
+ }, variable_1.label, 'cm-field', item.name);
277
+ path_1 += item.name + '.';
278
+ vars = variable_1.children || [];
279
+ }
280
+ else {
281
+ return "break";
282
+ }
283
+ }
284
+ };
285
+ for (var i = 0, len = list.length; i < len; i++) {
286
+ var state_1 = _loop_1(i, len);
287
+ if (state_1 === "break")
288
+ break;
289
+ }
290
+ }
291
+ }
292
+ return false;
293
+ }
294
+ else if (ast.type === 'variable') {
295
+ // 直接就是变量
296
+ var variable = findTree(variables, function (item) { return item.value === ast.name; });
297
+ if (variable) {
298
+ _this.markText({
299
+ line: ast.start.line - 1,
300
+ ch: ast.start.column - 1
301
+ }, {
302
+ line: ast.end.line - 1,
303
+ ch: ast.end.column - 1
304
+ }, variable.label, 'cm-field', ast.name);
201
305
  }
202
- from = idx + v.length;
203
- };
204
- while (~(idx = content.indexOf(v, from))) {
205
- _loop_2();
306
+ return false;
206
307
  }
207
308
  });
208
- };
209
- for (var line = 0; line < lines; line++) {
210
- _loop_1(line);
309
+ }
310
+ catch (e) {
311
+ var reg = /^Unexpected\stoken\s(.+)\sin\s(\d+):(\d+)$/.exec(e.message);
312
+ if (reg) {
313
+ var token = reg[1];
314
+ var line = parseInt(reg[2], 10);
315
+ var column = parseInt(reg[3], 10);
316
+ var msg = document.createElement('div');
317
+ var icon = msg.appendChild(document.createElement('span'));
318
+ icon.innerText = '!!';
319
+ icon.className = 'lint-error-icon';
320
+ msg.appendChild(document.createTextNode("Unexpected token `".concat(token, "`")));
321
+ msg.className = 'lint-error';
322
+ this.widgets.push(editor.addLineWidget(line - 1, msg, {
323
+ coverGutter: false,
324
+ noHScroll: true
325
+ }));
326
+ this.marks.push(this.markText({
327
+ line: line - 1,
328
+ ch: column - 1
329
+ }, {
330
+ line: line - 1,
331
+ ch: column + token.length - 1
332
+ }, token, 'cm-error-token'));
333
+ }
334
+ console.warn('synax error, ignore it');
211
335
  }
212
336
  };
213
337
  // 焦点放在最后
@@ -217,7 +341,9 @@ var FormulaPlugin = /** @class */ (function () {
217
341
  ch: (value === null || value === void 0 ? void 0 : value.length) || 0
218
342
  });
219
343
  };
220
- FormulaPlugin.prototype.dispose = function () { };
344
+ FormulaPlugin.prototype.dispose = function () {
345
+ this.autoMarkText.cancel();
346
+ };
221
347
  FormulaPlugin.prototype.validate = function () { };
222
348
  return FormulaPlugin;
223
349
  }());
@@ -227,6 +353,7 @@ function registerLaunguageMode(cm) {
227
353
  return;
228
354
  }
229
355
  modeRegisted = true;
356
+ // TODO 自定义语言规则
230
357
  // 对应 evalMode
231
358
  cm.defineMode('formula', function (config, parserConfig) {
232
359
  var formula = cm.getMode(config, 'javascript');
@@ -28,6 +28,7 @@ import Role from '../icons/role.svg';
28
28
  import Department from '../icons/department.svg';
29
29
  import Post from '../icons/post.svg';
30
30
  import RightDoubleArrowIcon from '../icons/right-double-arrow.svg';
31
+ import type { TestIdBuilder } from 'amis-core';
31
32
  export declare const closeIcon: React.JSX.Element;
32
33
  export declare const unDoIcon: React.JSX.Element;
33
34
  export declare const reDoIcon: React.JSX.Element;
@@ -39,7 +40,7 @@ export declare const pauseIcon: React.JSX.Element;
39
40
  export declare const leftArrowIcon: React.JSX.Element;
40
41
  export declare const rightArrowIcon: React.JSX.Element;
41
42
  export declare function getIconNames(): string[];
42
- export declare function getIcon(key: string): React.ElementType<{}>;
43
+ export declare function getIcon(key: string): React.ElementType<{}, keyof React.JSX.IntrinsicElements>;
43
44
  export declare function hasIcon(iconName: string): boolean;
44
45
  export declare function registerIcon(key: string, component: React.ElementType<{}>): void;
45
46
  export interface IconCheckedSchema {
@@ -51,8 +52,9 @@ export interface IconCheckedSchemaNew {
51
52
  type: 'icon';
52
53
  icon: IconCheckedSchema;
53
54
  }
54
- export declare function Icon({ icon, className, classPrefix, classNameProp, iconContent, vendor, cx: iconCx, onClick, onMouseEnter, onMouseLeave, onMouseOver, onMouseOut, onMouseDown, onMouseUp, onMouseMove, onBlur, onFocus, onTouchStart, onTouchMove, onTouchEnd, onTouchCancel, style }: {
55
+ export declare function Icon({ icon, className, classPrefix, classNameProp, iconContent, vendor, cx: iconCx, onClick, onMouseEnter, onMouseLeave, onMouseOver, onMouseOut, onMouseDown, onMouseUp, onMouseMove, onBlur, onFocus, onTouchStart, onTouchMove, onTouchEnd, onTouchCancel, style, testIdBuilder }: {
55
56
  icon: string;
56
57
  iconContent?: string;
58
+ testIdBuilder?: TestIdBuilder;
57
59
  } & React.ComponentProps<any>): React.JSX.Element | null;
58
60
  export { InputClearIcon, CloseIcon, UnDoIcon, ReDoIcon, EnterIcon, VolumeIcon, MuteIcon, PlayIcon, PauseIcon, ReloadIcon, LeftArrowIcon, RightArrowIcon, CheckIcon, PlusIcon, MinusIcon, PencilIcon, FunctionIcon, MenuIcon, UserRemove, Role, Department, Post, RightDoubleArrowIcon, DownArrowBoldIcon };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.2.2
2
+ * amis-ui v6.4.0
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -12,6 +12,7 @@ import SvgCloseSmall from '../icons/close-small.svg.js';
12
12
  import SvgStatusClose from '../icons/status-close.svg.js';
13
13
  import SvgUndo from '../icons/undo.svg.js';
14
14
  export { default as UnDoIcon } from '../icons/undo.svg.js';
15
+ import SvgUndoNormal from '../icons/undo-normal.svg.js';
15
16
  import SvgRedo from '../icons/redo.svg.js';
16
17
  export { default as ReDoIcon } from '../icons/redo.svg.js';
17
18
  import SvgEnter from '../icons/enter.svg.js';
@@ -34,6 +35,7 @@ import SvgCheck from '../icons/check.svg.js';
34
35
  export { default as CheckIcon } from '../icons/check.svg.js';
35
36
  import SvgPlus from '../icons/plus.svg.js';
36
37
  export { default as PlusIcon } from '../icons/plus.svg.js';
38
+ import SvgSubPlus from '../icons/sub-plus.svg.js';
37
39
  import SvgMinus from '../icons/minus.svg.js';
38
40
  export { default as MinusIcon } from '../icons/minus.svg.js';
39
41
  import SvgPencil from '../icons/pencil.svg.js';
@@ -65,6 +67,8 @@ import SvgRefresh from '../icons/refresh.svg.js';
65
67
  import SvgDrag from '../icons/drag.svg.js';
66
68
  import SvgEdit from '../icons/edit.svg.js';
67
69
  import SvgDeskEmpty from '../icons/desk-empty.svg.js';
70
+ import SvgFullscreen from '../icons/fullscreen.svg.js';
71
+ import SvgUnfullscreen from '../icons/unfullscreen.svg.js';
68
72
  import SvgCopy from '../icons/copy.svg.js';
69
73
  import SvgFilter from '../icons/filter.svg.js';
70
74
  import SvgCaret from '../icons/caret.svg.js';
@@ -157,6 +161,9 @@ registerIcon('close', SvgClose);
157
161
  registerIcon('close-small', SvgCloseSmall);
158
162
  registerIcon('status-close', SvgStatusClose);
159
163
  registerIcon('undo', SvgUndo);
164
+ registerIcon('undo-normal', SvgUndoNormal);
165
+ registerIcon('full-screen', SvgFullscreen);
166
+ registerIcon('un-fullscreen', SvgUnfullscreen);
160
167
  registerIcon('redo', SvgRedo);
161
168
  registerIcon('enter', SvgEnter);
162
169
  registerIcon('volume', SvgVolume);
@@ -169,6 +176,7 @@ registerIcon('prev', SvgLeftArrow);
169
176
  registerIcon('next', SvgRightArrow);
170
177
  registerIcon('check', SvgCheck);
171
178
  registerIcon('plus', SvgPlus);
179
+ registerIcon('sub-plus', SvgSubPlus);
172
180
  registerIcon('add', SvgPlus);
173
181
  registerIcon('minus', SvgMinus);
174
182
  registerIcon('pencil', SvgPencil);
@@ -258,7 +266,7 @@ registerIcon('scale-origin', SvgScaleOrigin);
258
266
  registerIcon('if', SvgIf);
259
267
  function Icon(_a) {
260
268
  var _b;
261
- var icon = _a.icon, className = _a.className, _c = _a.classPrefix, classPrefix = _c === void 0 ? '' : _c, classNameProp = _a.classNameProp, iconContent = _a.iconContent, vendor = _a.vendor, iconCx = _a.cx, onClick = _a.onClick, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onMouseOver = _a.onMouseOver, onMouseOut = _a.onMouseOut, onMouseDown = _a.onMouseDown, onMouseUp = _a.onMouseUp, onMouseMove = _a.onMouseMove, onBlur = _a.onBlur, onFocus = _a.onFocus, onTouchStart = _a.onTouchStart, onTouchMove = _a.onTouchMove, onTouchEnd = _a.onTouchEnd, onTouchCancel = _a.onTouchCancel, style = _a.style;
269
+ var icon = _a.icon, className = _a.className, _c = _a.classPrefix, classPrefix = _c === void 0 ? '' : _c, classNameProp = _a.classNameProp, iconContent = _a.iconContent, vendor = _a.vendor, iconCx = _a.cx, onClick = _a.onClick, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onMouseOver = _a.onMouseOver, onMouseOut = _a.onMouseOut, onMouseDown = _a.onMouseDown, onMouseUp = _a.onMouseUp, onMouseMove = _a.onMouseMove, onBlur = _a.onBlur, onFocus = _a.onFocus, onTouchStart = _a.onTouchStart, onTouchMove = _a.onTouchMove, onTouchEnd = _a.onTouchEnd, onTouchCancel = _a.onTouchCancel, style = _a.style, testIdBuilder = _a.testIdBuilder;
262
270
  var cx$1 = iconCx || cx;
263
271
  if (typeof jest !== 'undefined' && icon) {
264
272
  iconContent = '';
@@ -305,14 +313,14 @@ function Icon(_a) {
305
313
  }
306
314
  }
307
315
  };
308
- return (React__default.createElement("div", __assign({}, events, { className: cx$1(iconContent, className, classNameProp), ref: refFn, style: style })));
316
+ return (React__default.createElement("div", __assign({}, events, { className: cx$1(iconContent, className, classNameProp), ref: refFn, style: style }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getTestId())));
309
317
  }
310
318
  // 获取注册的icon
311
319
  var Component = getIcon(icon);
312
320
  if (Component) {
313
321
  return (React__default.createElement(Component, __assign({}, events, { className: cx$1(className, "icon-".concat(icon), classNameProp),
314
322
  // @ts-ignore
315
- icon: icon, style: style })));
323
+ icon: icon, style: style }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getTestId())));
316
324
  }
317
325
  // 符合schema的icon
318
326
  if (isObject(icon) &&
@@ -338,7 +346,8 @@ function Icon(_a) {
338
346
  // 直接传入svg字符串
339
347
  if (typeof icon === 'string' && icon.startsWith('<svg')) {
340
348
  var svgStr = /<svg .*?>(.*?)<\/svg>/.exec(icon);
341
- var svgHTML = createElement('svg', __assign(__assign({}, events), { className: cx$1('icon', className, classNameProp), style: style, dangerouslySetInnerHTML: { __html: svgStr ? svgStr[1] : '' }, viewBox: '0 0 16 16' }));
349
+ var viewBox = /viewBox="(.*?)"/.exec(icon);
350
+ var svgHTML = createElement('svg', __assign(__assign({}, events), { className: cx$1('icon', className, classNameProp), style: style, dangerouslySetInnerHTML: { __html: svgStr ? svgStr[1] : '' }, viewBox: (viewBox === null || viewBox === void 0 ? void 0 : viewBox[1]) || '0 0 16 16' }));
342
351
  return svgHTML;
343
352
  }
344
353
  // icon是链接
@@ -29,7 +29,7 @@ import { PopOver } from 'amis-core';
29
29
  import Radios from './Radios';
30
30
  import Range from './Range';
31
31
  import Rating from './Rating';
32
- import Select from './Select';
32
+ import Select, { value2array } from './Select';
33
33
  import SparkLine from './SparkLine';
34
34
  import { default as Spinner, type SpinnerExtraProps } from './Spinner';
35
35
  import Switch from './Switch';
@@ -62,7 +62,8 @@ import SchemaVariableList from './schema-editor/SchemaVariableList';
62
62
  import VariableList from './formula/VariableList';
63
63
  import FormulaPicker from './formula/Picker';
64
64
  import { FormulaEditor } from './formula/Editor';
65
- import type { VariableItem } from './formula/Editor';
65
+ import FormulaCodeEditor from './formula/CodeEditor';
66
+ import type { VariableItem } from './formula/CodeEditor';
66
67
  import PickerContainer from './PickerContainer';
67
68
  import InputJSONSchema from './json-schema';
68
69
  import { Badge, withBadge } from './Badge';
@@ -115,4 +116,5 @@ import InputBoxWithSuggestion from './InputBoxWithSuggestion';
115
116
  import { CodeMirrorEditor } from './CodeMirror';
116
117
  import type CodeMirror from 'codemirror';
117
118
  import OverflowTpl from './OverflowTpl';
118
- export { NotFound, Alert as AlertComponent, alert, Avatar, confirm, prompt, setRenderSchemaFn, ContextMenu, openContextMenus, closeContextMenus, Alert2, AsideNav, Button, Breadcrumb, Checkbox, Selection as Checkboxes, Collapse, CollapseGroup, DatePicker, DateRangePicker, Drawer, Tabs, Tab, Editor, Html, Icons, Layout, LazyComponent, Modal, Overlay, PopOver, Radios, Range, Rating, Select, SparkLine, Spinner, SpinnerExtraProps, Switch, Textarea, TitleBar, ToastComponent, toast, Tooltip, TooltipWrapper, Tree, Transfer, TabsTransfer, Selection, GroupedSelection, ChainedSelection, TableSelection, TreeSelection, AssociatedSelection, ResultBox, InputBox, InputBoxWithSuggestion, SearchBox, ListGroup, NumberInput, ArrayInput, PullRefresh, Table, SchemaVariableListPicker, SchemaVariableList, VariableList, PickerContainer, ConfirmBox, FormulaPicker, VariableItem, FormulaEditor, InputJSONSchema, withBadge, BadgeObject, Icon, withRemoteConfig, RemoteOptionsProps, ConditionBuilder, ConditionBuilderFuncs, ConditionBuilderFields, ConditionBuilderConfig, CityArea, PresetColor, ListMenu, Input, JSONSchemaEditor, LocationPicker, PopUp, Cascader, TransferDropDown, TabsTransferPicker, ResultList, TransferPicker, UserSelect, UserTabSelect, getIcon, getIconNames, registerIcon, Badge, HeadCellDropDown, AnchorNav, AnchorNavSection, Card, GridNavDirection, GridNav, GridNavItem, Link, VirtualList, AutoSizer, withStore, PopOverContainer, Pagination, Progress, Steps, StepStatus, Tag, Timeline, ImageGallery, BaiduMapPicker, MultilineText, Form, FormField, Controller, Combo, InputTable, InputTableColumnProps, DndContainer, Menu, CodeMirror, CodeMirrorEditor, OverflowTpl };
119
+ import Signature from './Signature';
120
+ export { NotFound, Alert as AlertComponent, alert, Avatar, confirm, prompt, setRenderSchemaFn, ContextMenu, openContextMenus, closeContextMenus, Alert2, AsideNav, Button, Breadcrumb, Checkbox, Selection as Checkboxes, Collapse, CollapseGroup, DatePicker, DateRangePicker, Drawer, Tabs, Tab, Editor, Html, Icons, Layout, LazyComponent, Modal, Overlay, PopOver, Radios, Range, Rating, Select, value2array, SparkLine, Spinner, SpinnerExtraProps, Switch, Textarea, TitleBar, ToastComponent, toast, Tooltip, TooltipWrapper, Tree, Transfer, TabsTransfer, Selection, GroupedSelection, ChainedSelection, TableSelection, TreeSelection, AssociatedSelection, ResultBox, InputBox, InputBoxWithSuggestion, SearchBox, ListGroup, NumberInput, ArrayInput, PullRefresh, Table, SchemaVariableListPicker, SchemaVariableList, VariableList, PickerContainer, ConfirmBox, FormulaPicker, FormulaCodeEditor, VariableItem, FormulaEditor, InputJSONSchema, withBadge, BadgeObject, Icon, withRemoteConfig, RemoteOptionsProps, ConditionBuilder, ConditionBuilderFuncs, ConditionBuilderFields, ConditionBuilderConfig, CityArea, PresetColor, ListMenu, Input, JSONSchemaEditor, LocationPicker, PopUp, Cascader, TransferDropDown, TabsTransferPicker, ResultList, TransferPicker, UserSelect, UserTabSelect, getIcon, getIconNames, registerIcon, Badge, HeadCellDropDown, AnchorNav, AnchorNavSection, Card, GridNavDirection, GridNav, GridNavItem, Link, VirtualList, AutoSizer, withStore, PopOverContainer, Pagination, Progress, Steps, StepStatus, Tag, Timeline, ImageGallery, BaiduMapPicker, MultilineText, Form, FormField, Controller, Combo, InputTable, InputTableColumnProps, DndContainer, Menu, CodeMirror, CodeMirrorEditor, OverflowTpl, Signature };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.2.2
2
+ * amis-ui v6.4.0
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -8,7 +8,7 @@ import React__default from 'react';
8
8
  import { guid } from 'amis-core';
9
9
  import Button from '../Button.js';
10
10
  import { Icon } from '../icons.js';
11
- import { InputJSONSchemaItem } from './Item.js';
11
+ import InputJSONSchemaItem from './Item.js';
12
12
 
13
13
  function InputJSONSchemaArray(props) {
14
14
  var _a, _b, _c;
@@ -1,3 +1,5 @@
1
1
  import React from 'react';
2
2
  import type { InputJSONSchemaItemProps } from './index';
3
- export declare function InputJSONSchemaItem(props: InputJSONSchemaItemProps): React.JSX.Element;
3
+ export declare function InputJSONSchemaItem(props: InputJSONSchemaItemProps, ref: any): React.JSX.Element;
4
+ declare const _default: React.ForwardRefExoticComponent<InputJSONSchemaItemProps & React.RefAttributes<unknown>>;
5
+ export default _default;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.2.2
2
+ * amis-ui v6.4.0
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -9,12 +9,24 @@ import InputBox from '../InputBox.js';
9
9
  import NumberInput from '../NumberInput.js';
10
10
  import Switch from '../Switch.js';
11
11
  import { InputJSONSchemaArray } from './Array.js';
12
- import { InputJSONSchemaObject } from './Object.js';
12
+ import InputJSONSchemaObject from './Object.js';
13
+ import { FormulaPicker } from '../formula/Picker.js';
13
14
 
14
- function InputJSONSchemaItem(props) {
15
+ function InputJSONSchemaItem(props, ref) {
16
+ var _a, _b, _c, _d, _e;
17
+ var childRef = React__default.useRef();
18
+ React__default.useImperativeHandle(ref, function () {
19
+ return {
20
+ validate: function () {
21
+ var _a;
22
+ return (_a = childRef.current) === null || _a === void 0 ? void 0 : _a.validate();
23
+ }
24
+ };
25
+ });
15
26
  var schema = props.schema;
27
+ var formua = props.formula;
16
28
  if (schema.type === 'object') {
17
- return React__default.createElement(InputJSONSchemaObject, __assign({}, props));
29
+ return React__default.createElement(InputJSONSchemaObject, __assign({}, props, { ref: childRef }));
18
30
  }
19
31
  else if (schema.type === 'array') {
20
32
  return React__default.createElement(InputJSONSchemaArray, __assign({}, props));
@@ -22,16 +34,30 @@ function InputJSONSchemaItem(props) {
22
34
  else if (props.renderValue) {
23
35
  return props.renderValue(props.value, props.onChange, schema, props);
24
36
  }
37
+ else if (formua) {
38
+ var inputSettings = React__default.useMemo(function () {
39
+ var inputSettings = __assign({}, formua.inputSettings);
40
+ if (schema.type === 'number' || schema.type === 'integer') {
41
+ inputSettings.type = 'number';
42
+ }
43
+ else if (schema.type === 'boolean') {
44
+ inputSettings.type = 'boolean';
45
+ }
46
+ return inputSettings;
47
+ }, [formua.inputSettings, schema.type]);
48
+ return (React__default.createElement(FormulaPicker, __assign({ mode: "input-group", mixedMode: true }, formua, { inputSettings: inputSettings, value: (_a = props.value) !== null && _a !== void 0 ? _a : schema.default, onChange: props.onChange, className: props.className, disabled: props.disabled, placeholder: props.placeholder, theme: props.theme, classPrefix: props.classPrefix, classnames: props.classnames, translate: props.translate, locale: props.locale })));
49
+ }
25
50
  else if (schema.type == 'number') {
26
- return (React__default.createElement(NumberInput, { value: props.value, onChange: props.onChange, placeholder: props.placeholder, mobileUI: props.mobileUI }));
51
+ return (React__default.createElement(NumberInput, { className: props.className, value: (_b = props.value) !== null && _b !== void 0 ? _b : schema.default, onChange: props.onChange, placeholder: props.placeholder, mobileUI: props.mobileUI }));
27
52
  }
28
53
  else if (schema.type == 'integer') {
29
- return (React__default.createElement(NumberInput, { value: props.value, onChange: props.onChange, precision: 0, placeholder: props.placeholder, mobileUI: props.mobileUI }));
54
+ return (React__default.createElement(NumberInput, { className: props.className, value: (_c = props.value) !== null && _c !== void 0 ? _c : schema.default, onChange: props.onChange, precision: 0, placeholder: props.placeholder, mobileUI: props.mobileUI }));
30
55
  }
31
56
  else if (schema.type == 'boolean') {
32
- return (React__default.createElement(Switch, { value: props.value, onChange: props.onChange, className: "mt-2" }));
57
+ return (React__default.createElement(Switch, { value: (_d = props.value) !== null && _d !== void 0 ? _d : schema.default, onChange: props.onChange, className: "mt-2" }));
33
58
  }
34
- return (React__default.createElement(InputBox, { value: props.value, onChange: props.onChange, placeholder: props.placeholder, mobileUI: props.mobileUI }));
59
+ return (React__default.createElement(InputBox, { className: props.className, value: (_e = props.value) !== null && _e !== void 0 ? _e : schema.default, onChange: props.onChange, placeholder: props.placeholder, mobileUI: props.mobileUI }));
35
60
  }
61
+ var InputJSONSchemaItem$1 = React__default.forwardRef(InputJSONSchemaItem);
36
62
 
37
- export { InputJSONSchemaItem };
63
+ export { InputJSONSchemaItem, InputJSONSchemaItem$1 as default };
@@ -1,3 +1,5 @@
1
1
  import React from 'react';
2
2
  import type { InputJSONSchemaItemProps } from './index';
3
- export declare function InputJSONSchemaObject(props: InputJSONSchemaItemProps): React.JSX.Element;
3
+ export declare function InputJSONSchemaObject(props: InputJSONSchemaItemProps, ref: any): React.JSX.Element;
4
+ declare const _default: React.ForwardRefExoticComponent<InputJSONSchemaItemProps & React.RefAttributes<unknown>>;
5
+ export default _default;