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,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
 
@@ -123,8 +123,9 @@ var CustomDaysView = /** @class */ (function (_super) {
123
123
  return content;
124
124
  };
125
125
  _this.renderDay = function (props, currentDate) {
126
+ var _a;
126
127
  var todayActiveStyle = props.todayActiveStyle; /** 只有today才会传入这个属性 */
127
- var _a = _this.props, cx = _a.classnames, __ = _a.translate; _a.env;
128
+ var _b = _this.props, cx = _b.classnames, __ = _b.translate, testIdBuilder = _b.testIdBuilder;
128
129
  var injectedProps = omit(props, ['todayActiveStyle']);
129
130
  /** 某些情况下需要用inline style覆盖动态class,需要hack important的样式 */
130
131
  var todayDomRef = function (node) {
@@ -249,10 +250,10 @@ var CustomDaysView = /** @class */ (function (_super) {
249
250
  }
250
251
  }
251
252
  return (React__default.createElement("td", __assign({}, injectedProps),
252
- React__default.createElement("span", { style: todayActiveStyle, ref: todayDomRef }, currentDate.date())));
253
+ React__default.createElement("span", __assign({ style: todayActiveStyle, ref: todayDomRef }, (_a = testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild(props.key)) === null || _a === void 0 ? void 0 : _a.getTestId()), currentDate.date())));
253
254
  };
254
255
  _this.renderTimes = function () {
255
- var _a = _this.props, timeFormat = _a.timeFormat, selectedDate = _a.selectedDate, viewDate = _a.viewDate, isEndDate = _a.isEndDate, cx = _a.classnames;
256
+ var _a = _this.props, timeFormat = _a.timeFormat, selectedDate = _a.selectedDate, viewDate = _a.viewDate, isEndDate = _a.isEndDate, cx = _a.classnames, testIdBuilder = _a.testIdBuilder;
256
257
  var date = selectedDate || (isEndDate ? viewDate.endOf('day') : viewDate);
257
258
  var inputs = [];
258
259
  var timeConstraints = _this.timeConstraints;
@@ -281,20 +282,21 @@ var CustomDaysView = /** @class */ (function (_super) {
281
282
  return _this.setTime(type, Math.max(min_1, Math.min(parseInt(e.currentTarget.value.replace(/\D/g, ''), 10) || 0, max_1)));
282
283
  }
283
284
  });
285
+ var itemTIB = testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild(type);
284
286
  return (React__default.createElement("div", { className: cx('CalendarInputWrapper', 'CalendarInputWrapperMT') },
285
287
  React__default.createElement("div", { className: cx('CalendarInput-sugs', type === 'hours'
286
288
  ? 'CalendarInput-sugsHours'
287
289
  : 'CalendarInput-sugsTimes'), id: "".concat(_this.state.uniqueTag, "-").concat(i, "-input") }, options_1.map(function (option) {
288
- var _a;
289
- return (React__default.createElement("div", { key: option.value, className: cx('CalendarInput-sugsItem', {
290
+ var _a, _b;
291
+ return (React__default.createElement("div", __assign({ key: option.value, className: cx('CalendarInput-sugsItem', {
290
292
  'is-highlight': selectedDate
291
293
  ? option.value === date.format(formatMap_1[type])
292
294
  : option.value === ((_a = options_1 === null || options_1 === void 0 ? void 0 : options_1[0]) === null || _a === void 0 ? void 0 : _a.value)
293
- }), onClick: function () {
295
+ }) }, (_b = itemTIB === null || itemTIB === void 0 ? void 0 : itemTIB.getChild(option.value)) === null || _b === void 0 ? void 0 : _b.getTestId(), { onClick: function () {
294
296
  _this.setTime(type, parseInt(option.value, 10));
295
297
  _this.scrollToTop(type, parseInt(option.value, 10), i);
296
298
  closeMenu();
297
- } }, option.value));
299
+ } }), option.value));
298
300
  }))));
299
301
  }));
300
302
  inputs.push(React__default.createElement("span", { key: i + 'divider' }));
@@ -484,7 +486,7 @@ var CustomDaysView = /** @class */ (function (_super) {
484
486
  }).filter(function (item) { return !!item; });
485
487
  };
486
488
  CustomDaysView.prototype.render = function () {
487
- var _a = this.props, date = _a.viewDate, mobileUI = _a.mobileUI, embed = _a.embed, timeFormat = _a.timeFormat; _a.classnames;
489
+ var _a = this.props, date = _a.viewDate, mobileUI = _a.mobileUI, embed = _a.embed, timeFormat = _a.timeFormat; _a.classnames; var testIdBuilder = _a.testIdBuilder;
488
490
  var locale = date.localeData();
489
491
  var __ = this.props.translate;
490
492
  if (mobileUI && !embed) {
@@ -495,16 +497,16 @@ var CustomDaysView = /** @class */ (function (_super) {
495
497
  React__default.createElement("tr", null,
496
498
  React__default.createElement("th", { colSpan: 7 },
497
499
  React__default.createElement("div", { className: "rdtHeader" },
498
- React__default.createElement("a", { className: "rdtPrev", onClick: this.props.subtractTime(1, 'years') },
500
+ React__default.createElement("a", __assign({ className: "rdtPrev", onClick: this.props.subtractTime(1, 'years') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('prev-year').getTestId()),
499
501
  React__default.createElement(Icon, { icon: "right-double-arrow", className: "icon date-icon-arrow-left" })),
500
- React__default.createElement("a", { className: "rdtPrev", onClick: this.props.subtractTime(1, 'months') },
502
+ React__default.createElement("a", __assign({ className: "rdtPrev", onClick: this.props.subtractTime(1, 'months') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('prev-month').getTestId()),
501
503
  React__default.createElement(Icon, { icon: "right-arrow", className: "icon date-icon-arrow-left" })),
502
504
  React__default.createElement("div", { className: "rdtCenter" },
503
- React__default.createElement("a", { className: "rdtSwitch", onClick: this.props.showView('years') }, date.format(__('dateformat.year'))),
504
- React__default.createElement("a", { className: "rdtSwitch", onClick: this.props.showView('months') }, date.format(__('MMM')))),
505
- React__default.createElement("a", { className: "rdtNext", onClick: this.props.addTime(1, 'months') },
505
+ React__default.createElement("a", __assign({ className: "rdtSwitch", onClick: this.props.showView('years') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('switch-years').getTestId()), date.format(__('dateformat.year'))),
506
+ React__default.createElement("a", __assign({ className: "rdtSwitch", onClick: this.props.showView('months') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('switch-months').getTestId()), date.format(__('MMM')))),
507
+ React__default.createElement("a", __assign({ className: "rdtNext", onClick: this.props.addTime(1, 'months') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('next-month').getTestId()),
506
508
  React__default.createElement(Icon, { icon: "right-arrow", className: "icon date-icon-arrow" })),
507
- React__default.createElement("a", { className: "rdtNext", onClick: this.props.addTime(1, 'years') },
509
+ React__default.createElement("a", __assign({ className: "rdtNext", onClick: this.props.addTime(1, 'years') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('next-year').getTestId()),
508
510
  React__default.createElement(Icon, { icon: "right-double-arrow", className: "icon date-icon-arrow" }))),
509
511
  React__default.createElement("div", { className: "header-line" }))),
510
512
  React__default.createElement("tr", null, this.getDaysOfWeek(locale).map(function (day, index) { return (React__default.createElement("th", { key: day + index, className: "dow" }, day)); })))),
@@ -4,6 +4,7 @@ import React from 'react';
4
4
  import { LocaleProps } from 'amis-core';
5
5
  import { PickerOption } from '../PickerColumn';
6
6
  import { DateType } from './Calendar';
7
+ import type { TestIdBuilder } from 'amis-core';
7
8
  export interface OtherProps {
8
9
  inputFormat?: string;
9
10
  hideHeader?: boolean;
@@ -32,6 +33,7 @@ export interface CustomMonthsViewProps extends LocaleProps {
32
33
  timeCell: (value: number, type: DateType) => string;
33
34
  getDateBoundary: (currentDate: moment.Moment) => any;
34
35
  mobileUI: boolean;
36
+ testIdBuilder?: TestIdBuilder;
35
37
  }
36
38
  export declare class CustomMonthsView extends React.Component<CustomMonthsViewProps> {
37
39
  maxDateObject: {
@@ -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
 
@@ -14,7 +14,7 @@ var CustomMonthsView = /** @class */ (function (_super) {
14
14
  function CustomMonthsView(props) {
15
15
  var _this = _super.call(this, props) || this;
16
16
  _this.renderMonth = function (props, month, year, date) {
17
- var __ = _this.props.translate;
17
+ var _a = _this.props, __ = _a.translate, testIdBuilder = _a.testIdBuilder;
18
18
  var localMoment = props.viewDate, rest = __rest(props, ["viewDate"]);
19
19
  var monthStr = localMoment.month(month).format(__('MMM'));
20
20
  var strLength = 3;
@@ -22,7 +22,7 @@ var CustomMonthsView = /** @class */ (function (_super) {
22
22
  // use a fixed string length for consistency
23
23
  var monthStrFixedLength = monthStr.substring(0, strLength);
24
24
  return (React__default.createElement("td", __assign({}, rest),
25
- React__default.createElement("span", null, monthStrFixedLength)));
25
+ React__default.createElement("span", __assign({}, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild(props.key).getTestId()), monthStrFixedLength)));
26
26
  };
27
27
  _this.onConfirm = function (value, types) {
28
28
  _this.props.onConfirm && _this.props.onConfirm(value, ['year', 'month']);
@@ -90,6 +90,7 @@ var CustomMonthsView = /** @class */ (function (_super) {
90
90
  return _this;
91
91
  }
92
92
  CustomMonthsView.prototype.renderMonths = function () {
93
+ this.props.testIdBuilder;
93
94
  var date = this.props.selectedDate; this.props.viewDate.month(); var year = this.props.viewDate.year(), rows = [], i = 0, months = [], renderer = this.props.renderMonth || this.renderMonth, isValid = this.props.isValidDate || this.alwaysValidDate, classes, props, currentMonth, isDisabled, noOfDaysInMonth, daysInMonth, validDay,
94
95
  // Date is irrelevant because we're only interested in month
95
96
  irrelevantDate = 1;
@@ -151,6 +152,7 @@ var CustomMonthsView = /** @class */ (function (_super) {
151
152
  };
152
153
  CustomMonthsView.prototype.render = function () {
153
154
  var __ = this.props.translate;
155
+ var testIdBuilder = this.props.testIdBuilder;
154
156
  var showYearHead = !/^mm$/i.test(this.props.inputFormat || '') && !this.props.hideHeader;
155
157
  var canClick = /yy/i.test(this.props.inputFormat || '');
156
158
  if (this.props.mobileUI) {
@@ -160,9 +162,9 @@ var CustomMonthsView = /** @class */ (function (_super) {
160
162
  showYearHead && (React__default.createElement("table", { className: "headerTable" },
161
163
  React__default.createElement("thead", null,
162
164
  React__default.createElement("tr", null,
163
- React__default.createElement("th", { className: "rdtPrev", onClick: this.props.subtractTime(1, 'years') }, "\u00AB"),
164
- canClick ? (React__default.createElement("th", { className: "rdtSwitch", onClick: this.props.showView('years') }, this.props.viewDate.format(__('dateformat.year')))) : (React__default.createElement("th", { className: "rdtSwitch" }, this.props.viewDate.format(__('dateformat.year')))),
165
- React__default.createElement("th", { className: "rdtNext", onClick: this.props.addTime(1, 'years') }, "\u00BB"))))),
165
+ React__default.createElement("th", __assign({ className: "rdtPrev", onClick: this.props.subtractTime(1, 'years') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('prev-year').getTestId()), "\u00AB"),
166
+ canClick ? (React__default.createElement("th", __assign({ className: "rdtSwitch", onClick: this.props.showView('years') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('switch-year').getTestId()), this.props.viewDate.format(__('dateformat.year')))) : (React__default.createElement("th", { className: "rdtSwitch" }, this.props.viewDate.format(__('dateformat.year')))),
167
+ React__default.createElement("th", __assign({ className: "rdtNext", onClick: this.props.addTime(1, 'years') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('next-year').getTestId()), "\u00BB"))))),
166
168
  React__default.createElement("table", null,
167
169
  React__default.createElement("tbody", null, this.renderMonths()))));
168
170
  };
@@ -2,6 +2,7 @@
2
2
  import moment from 'moment';
3
3
  import React from 'react';
4
4
  import { LocaleProps, ThemeProps } from 'amis-core';
5
+ import type { TestIdBuilder } from 'amis-core';
5
6
  export interface QuarterViewProps extends LocaleProps, ThemeProps {
6
7
  viewDate: moment.Moment;
7
8
  selectedDate: moment.Moment;
@@ -17,6 +18,7 @@ export interface QuarterViewProps extends LocaleProps, ThemeProps {
17
18
  hideHeader?: boolean;
18
19
  onConfirm?: (value: number[], types?: string[]) => void;
19
20
  onClose?: () => void;
21
+ testIdBuilder?: TestIdBuilder;
20
22
  }
21
23
  export declare class QuarterView extends React.Component<QuarterViewProps> {
22
24
  state: {
@@ -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
 
@@ -18,8 +18,9 @@ var QuarterView = /** @class */ (function (_super) {
18
18
  pickerValue: [_this.props.viewDate.year(), _this.props.viewDate.quarter()]
19
19
  };
20
20
  _this.renderQuarter = function (props, quartar, year, date) {
21
+ var testIdBuilder = _this.props.testIdBuilder;
21
22
  return (React__default.createElement("td", __assign({}, props),
22
- React__default.createElement("span", null,
23
+ React__default.createElement("span", __assign({}, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild(props.key).getTestId()),
23
24
  "Q",
24
25
  quartar)));
25
26
  };
@@ -35,7 +36,7 @@ var QuarterView = /** @class */ (function (_super) {
35
36
  return _this;
36
37
  }
37
38
  QuarterView.prototype.renderYear = function () {
38
- var __ = this.props.translate;
39
+ var _a = this.props, __ = _a.translate, testIdBuilder = _a.testIdBuilder;
39
40
  var showYearHead = !/^mm$/i.test(this.props.inputFormat || '');
40
41
  if (!showYearHead) {
41
42
  return null;
@@ -44,9 +45,9 @@ var QuarterView = /** @class */ (function (_super) {
44
45
  return (React__default.createElement("table", null,
45
46
  React__default.createElement("thead", null,
46
47
  React__default.createElement("tr", null,
47
- React__default.createElement("th", { className: "rdtPrev", onClick: this.props.subtractTime(1, 'years') }, "\u00AB"),
48
- canClick ? (React__default.createElement("th", { className: "rdtSwitch", onClick: this.props.showView('years') }, this.props.viewDate.format(__('dateformat.year')))) : (React__default.createElement("th", { className: "rdtSwitch" }, this.props.viewDate.format(__('dateformat.year')))),
49
- React__default.createElement("th", { className: "rdtNext", onClick: this.props.addTime(1, 'years') }, "\u00BB")))));
48
+ React__default.createElement("th", __assign({ className: "rdtPrev", onClick: this.props.subtractTime(1, 'years') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('prev-year').getTestId()), "\u00AB"),
49
+ canClick ? (React__default.createElement("th", __assign({ className: "rdtSwitch", onClick: this.props.showView('years') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('switch-year').getTestId()), this.props.viewDate.format(__('dateformat.year')))) : (React__default.createElement("th", { className: "rdtSwitch" }, this.props.viewDate.format(__('dateformat.year')))),
50
+ React__default.createElement("th", __assign({ className: "rdtNext", onClick: this.props.addTime(1, 'years') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('next-year').getTestId()), "\u00BB")))));
50
51
  };
51
52
  QuarterView.prototype.renderQuarters = function () {
52
53
  var date = this.props.selectedDate, quarter = this.props.viewDate.quarter(), year = this.props.viewDate.year(), rows = [], i = 1, quarters = [], renderer = this.props.renderQuarter || this.renderQuarter, isValid = this.props.isValidDate || this.alwaysValidDate, classes, props, isDisabled;
@@ -2,6 +2,7 @@
2
2
  import moment from 'moment';
3
3
  import React from 'react';
4
4
  import { LocaleProps, ClassNamesFn } from 'amis-core';
5
+ import type { TestIdBuilder } from 'amis-core';
5
6
  interface CustomTimeViewProps extends LocaleProps {
6
7
  viewDate: moment.Moment;
7
8
  selectedDate: moment.Moment;
@@ -26,6 +27,7 @@ interface CustomTimeViewProps extends LocaleProps {
26
27
  onChange: (value: moment.Moment) => void;
27
28
  timeConstraints?: any;
28
29
  timeRangeHeader?: string;
30
+ testIdBuilder?: TestIdBuilder;
29
31
  }
30
32
  interface CustomTimeViewState {
31
33
  daypart: any;
@@ -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
 
@@ -483,7 +483,7 @@ var CustomTimeView = /** @class */ (function (_super) {
483
483
  };
484
484
  CustomTimeView.prototype.render = function () {
485
485
  var _this = this;
486
- var _a = this.props, timeFormat = _a.timeFormat, selectedDate = _a.selectedDate, viewDate = _a.viewDate, isEndDate = _a.isEndDate, cx = _a.classnames, timeRangeHeader = _a.timeRangeHeader, mobileUI = _a.mobileUI;
486
+ var _a = this.props, timeFormat = _a.timeFormat, selectedDate = _a.selectedDate, viewDate = _a.viewDate, isEndDate = _a.isEndDate, cx = _a.classnames, timeRangeHeader = _a.timeRangeHeader, mobileUI = _a.mobileUI, testIdBuilder = _a.testIdBuilder;
487
487
  var __ = this.props.translate;
488
488
  var date = selectedDate || (isEndDate ? viewDate.endOf('day') : viewDate);
489
489
  var inputs = [];
@@ -516,22 +516,23 @@ var CustomTimeView = /** @class */ (function (_super) {
516
516
  return _this.setTime(type, Math.max(min_2, Math.min(parseInt(e.currentTarget.value.replace(/\D/g, ''), 10) || 0, max_2)));
517
517
  }
518
518
  });
519
+ var itemTIB = testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild(type);
519
520
  return (React__default.createElement("div", { className: cx('CalendarInputWrapper') },
520
521
  React__default.createElement("div", { className: cx('CalendarInput-sugs', type === 'hours'
521
522
  ? 'CalendarInput-sugsHours'
522
523
  : 'CalendarInput-sugsTimes'), id: "".concat(_this.state.uniqueTag, "-").concat(i, "-input") }, options_1.map(function (option) {
523
524
  var _a;
524
- return (React__default.createElement("div", { key: option.value, className: cx('CalendarInput-sugsItem', {
525
+ return (React__default.createElement("div", __assign({ key: option.value, className: cx('CalendarInput-sugsItem', {
525
526
  'is-mobile': mobileUI,
526
527
  'is-highlight': selectedDate
527
528
  ? option.value === date.format(formatMap_1[type])
528
529
  : option.value === ((_a = options_1 === null || options_1 === void 0 ? void 0 : options_1[0]) === null || _a === void 0 ? void 0 : _a.value) &&
529
530
  !mobileUI
530
- }), onClick: function () {
531
+ }) }, itemTIB === null || itemTIB === void 0 ? void 0 : itemTIB.getChild(option.value).getTestId(), { onClick: function () {
531
532
  _this.setTime(type, parseInt(option.value, 10));
532
533
  _this.scrollToTop(type, parseInt(option.value, 10), i);
533
534
  closeMenu();
534
- } }, option.value));
535
+ } }), option.value));
535
536
  }))));
536
537
  }));
537
538
  inputs.push(React__default.createElement("span", { key: i + 'divider' }));
@@ -539,14 +540,14 @@ var CustomTimeView = /** @class */ (function (_super) {
539
540
  });
540
541
  inputs.length && inputs.pop();
541
542
  var quickLists = [
542
- React__default.createElement("a", { key: "select-now", onClick: this.selectNowTime }, __('TimeNow'))
543
+ React__default.createElement("a", __assign({ key: "select-now", onClick: this.selectNowTime }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('select-now').getTestId()), __('TimeNow'))
543
544
  ];
544
545
  return (React__default.createElement(React__default.Fragment, null,
545
546
  React__default.createElement("div", { className: cx(timeRangeHeader ? 'TimeRangeHeaderWrapper' : null) }, timeRangeHeader),
546
547
  React__default.createElement("div", { className: cx('TimeContentWrapper') }, inputs),
547
548
  this.props.requiredConfirm && (React__default.createElement("div", { className: cx('TimeFooterWrapper') },
548
549
  React__default.createElement("div", { className: cx('QuickWrapper') }, quickLists),
549
- React__default.createElement("a", { className: cx('Button', 'Button--primary', 'Button--size-sm'), onClick: this.confirm }, __('confirm'))))));
550
+ React__default.createElement("a", __assign({ className: cx('Button', 'Button--primary', 'Button--size-sm'), onClick: this.confirm }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('confirm').getTestId()), __('confirm'))))));
550
551
  };
551
552
  CustomTimeView.defaultProps = {
552
553
  showToolbar: true
@@ -2,6 +2,7 @@
2
2
  import moment from 'moment';
3
3
  import React from 'react';
4
4
  import { LocaleProps } from 'amis-core';
5
+ import type { TestIdBuilder } from 'amis-core';
5
6
  interface CustomYearsViewProps extends LocaleProps {
6
7
  viewDate: moment.Moment;
7
8
  selectedDate: moment.Moment;
@@ -19,6 +20,7 @@ interface CustomYearsViewProps extends LocaleProps {
19
20
  renderYear?: (props: any, year: number) => JSX.Element;
20
21
  updateSelectedDate: (event: React.MouseEvent<any>, close?: boolean) => void;
21
22
  isValidDate?: (currentDate: moment.Moment, selected?: moment.Moment) => boolean;
23
+ testIdBuilder?: TestIdBuilder;
22
24
  }
23
25
  export declare class CustomYearsView extends React.Component<CustomYearsViewProps> {
24
26
  state: {
@@ -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
 
@@ -14,8 +14,9 @@ var CustomYearsView = /** @class */ (function (_super) {
14
14
  function CustomYearsView(props) {
15
15
  var _this = _super.call(this, props) || this;
16
16
  _this.renderYear = function (props, year, date) {
17
+ var testIdBuilder = _this.props.testIdBuilder;
17
18
  return (React__default.createElement("td", __assign({}, props),
18
- React__default.createElement("span", null, year)));
19
+ React__default.createElement("span", __assign({}, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild(props.key).getTestId()), year)));
19
20
  };
20
21
  _this.onConfirm = function (value) {
21
22
  _this.props.onConfirm && _this.props.onConfirm(value, ['year']);
@@ -100,7 +101,7 @@ var CustomYearsView = /** @class */ (function (_super) {
100
101
  CustomYearsView.prototype.render = function () {
101
102
  var year = this.props.viewDate.year();
102
103
  year = year - (year % 10);
103
- var __ = this.props.translate;
104
+ var _a = this.props, testIdBuilder = _a.testIdBuilder, __ = _a.translate;
104
105
  if (this.props.mobileUI) {
105
106
  return React__default.createElement("div", { className: "rdtYears" }, this.renderYearPicker());
106
107
  }
@@ -108,9 +109,9 @@ var CustomYearsView = /** @class */ (function (_super) {
108
109
  React__default.createElement("table", { className: "headerTable" },
109
110
  React__default.createElement("thead", null,
110
111
  React__default.createElement("tr", null,
111
- React__default.createElement("th", { className: "rdtPrev", onClick: this.props.subtractTime(10, 'years') }, "\u00AB"),
112
+ React__default.createElement("th", __assign({ className: "rdtPrev", onClick: this.props.subtractTime(10, 'years') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('prev-year').getTestId()), "\u00AB"),
112
113
  React__default.createElement("th", { className: "rdtSwitch" }, __('year-to-year', { from: year, to: year + 9 })),
113
- React__default.createElement("th", { className: "rdtNext", onClick: this.props.addTime(10, 'years') }, "\u00BB")))),
114
+ React__default.createElement("th", __assign({ className: "rdtNext", onClick: this.props.addTime(10, 'years') }, testIdBuilder === null || testIdBuilder === void 0 ? void 0 : testIdBuilder.getChild('next-year').getTestId()), "\u00BB")))),
114
115
  React__default.createElement("table", null,
115
116
  React__default.createElement("tbody", null, this.renderYears(year)))));
116
117
  };
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -16,6 +16,7 @@ export interface ValueProps extends ThemeProps, LocaleProps {
16
16
  renderEtrValue?: any;
17
17
  }
18
18
  export declare class Value extends React.Component<ValueProps> {
19
+ renderCustomValue(props: any): any;
19
20
  render(): React.JSX.Element;
20
21
  }
21
22
  declare const _default: {
@@ -1,11 +1,11 @@
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
- import { __extends, __assign } from 'tslib';
6
+ import { __extends, __assign, __decorate, __metadata } from 'tslib';
7
7
  import React__default from 'react';
8
- import { themeable, localeable } from 'amis-core';
8
+ import { autobind, themeable, localeable } from 'amis-core';
9
9
  import InputBox from '../InputBox.js';
10
10
  import NumberInput from '../NumberInput.js';
11
11
  import DatePicker from '../DatePicker.js';
@@ -18,19 +18,32 @@ var Value = /** @class */ (function (_super) {
18
18
  function Value() {
19
19
  return _super !== null && _super.apply(this, arguments) || this;
20
20
  }
21
+ Value.prototype.renderCustomValue = function (props) {
22
+ var _a = this.props, renderEtrValue = _a.renderEtrValue, data = _a.data, cx = _a.classnames;
23
+ var field = props.inputSettings;
24
+ return renderEtrValue
25
+ ? renderEtrValue(__assign(__assign({}, field.value), { name: 'TMP_WHATEVER_NAME' }), // name 随便输入,应该是 value 传入的为主,目前表单项内部逻辑还有问题先传一个 name
26
+ {
27
+ data: data,
28
+ onChange: props.onChange,
29
+ value: props.value,
30
+ inputClassName: cx(field.className, props.className)
31
+ })
32
+ : null;
33
+ };
21
34
  Value.prototype.render = function () {
22
35
  var _a;
23
- var _b = this.props, cx = _b.classnames, field = _b.field, value = _b.value, onChange = _b.onChange, op = _b.op, __ = _b.translate, data = _b.data, disabled = _b.disabled, formula = _b.formula, popOverContainer = _b.popOverContainer, renderEtrValue = _b.renderEtrValue, mobileUI = _b.mobileUI;
36
+ var _b = this.props, cx = _b.classnames, field = _b.field, value = _b.value, onChange = _b.onChange, op = _b.op, __ = _b.translate, data = _b.data, disabled = _b.disabled, formula = _b.formula, popOverContainer = _b.popOverContainer, mobileUI = _b.mobileUI;
24
37
  var input = undefined;
25
38
  if (formula) {
26
39
  // 如果配置了 formula 字段,则所有的输入变为 formula 形式
27
40
  formula = __assign(__assign({}, formula), { translate: __, classnames: cx, data: data, value: value !== null && value !== void 0 ? value : field.defaultValue, onChange: onChange, disabled: disabled });
28
- var inputSettings = field.type !== 'custom' && (formula === null || formula === void 0 ? void 0 : formula.inputSettings)
41
+ var inputSettings = (formula === null || formula === void 0 ? void 0 : formula.inputSettings)
29
42
  ? __assign(__assign(__assign({}, formula === null || formula === void 0 ? void 0 : formula.inputSettings), field), { multiple: field.type === 'select' &&
30
43
  op &&
31
44
  typeof op === 'string' &&
32
45
  ['select_any_in', 'select_not_any_in'].includes(op) }) : undefined;
33
- input = React__default.createElement(FormulaPicker, __assign({}, formula, { inputSettings: inputSettings }));
46
+ input = (React__default.createElement(FormulaPicker, __assign({}, formula, { inputSettings: inputSettings, customInputRender: this.renderCustomValue })));
34
47
  }
35
48
  else if (field.type === 'text') {
36
49
  input = (React__default.createElement(InputBox, { value: value !== null && value !== void 0 ? value : field.defaultValue, onChange: onChange, placeholder: __(field.placeholder), disabled: disabled, mobileUI: mobileUI }));
@@ -55,17 +68,20 @@ var Value = /** @class */ (function (_super) {
55
68
  input = (React__default.createElement(Switch, { value: value !== null && value !== void 0 ? value : field.defaultValue, onChange: onChange, disabled: disabled }));
56
69
  }
57
70
  else if (field.type === 'custom') {
58
- input = renderEtrValue
59
- ? renderEtrValue(__assign(__assign({}, field.value), { name: 'TMP_WHATEVER_NAME' }), // name 随便输入,应该是 value 传入的为主,目前表单项内部逻辑还有问题先传一个 name
60
- {
61
- data: data,
62
- onChange: onChange,
63
- value: value !== null && value !== void 0 ? value : field.defaultValue
64
- })
65
- : null;
71
+ input = this.renderCustomValue({
72
+ value: value !== null && value !== void 0 ? value : field.defaultValue,
73
+ onChange: onChange,
74
+ inputSettings: field
75
+ });
66
76
  }
67
77
  return React__default.createElement("div", { className: cx('CBValue') }, input);
68
78
  };
79
+ __decorate([
80
+ autobind,
81
+ __metadata("design:type", Function),
82
+ __metadata("design:paramtypes", [Object]),
83
+ __metadata("design:returntype", void 0)
84
+ ], Value.prototype, "renderCustomValue", null);
69
85
  return Value;
70
86
  }(React__default.Component));
71
87
  var Value$1 = themeable(localeable(Value));
@@ -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
 
@@ -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
 
@@ -0,0 +1,92 @@
1
+ /// <reference types="hoist-non-react-statics" />
2
+ import { ThemeProps } from 'amis-core';
3
+ import React from 'react';
4
+ import { CodeMirrorEditorProps } from '../CodeMirror';
5
+ import { FormulaPlugin } from './plugin';
6
+ import type CodeMirror from 'codemirror';
7
+ export interface VariableItem {
8
+ label: string;
9
+ value?: string;
10
+ path?: string;
11
+ children?: Array<VariableItem>;
12
+ type?: string;
13
+ tag?: string;
14
+ selectMode?: 'tree' | 'tabs';
15
+ isMember?: boolean;
16
+ }
17
+ export interface FuncGroup {
18
+ groupName: string;
19
+ items: Array<FuncItem>;
20
+ }
21
+ export interface FuncItem {
22
+ name: string;
23
+ example?: string;
24
+ description?: string;
25
+ [propName: string]: any;
26
+ }
27
+ export interface CodeEditorProps extends ThemeProps, Omit<CodeMirrorEditorProps, 'style' | 'editorFactory' | 'editorDidMount'> {
28
+ readOnly?: boolean;
29
+ /**
30
+ * 是否为单行模式,默认为 false
31
+ */
32
+ singleLine?: boolean;
33
+ /**
34
+ * evalMode 即直接就是表达式,否则
35
+ * 需要 ${这里面才是表达式}
36
+ * 默认为 true
37
+ */
38
+ evalMode?: boolean;
39
+ autoFocus?: boolean;
40
+ editorTheme?: 'dark' | 'light';
41
+ editorOptions?: any;
42
+ /**
43
+ * expression 即高亮表达式整体
44
+ * formula 即高亮表达式内部
45
+ */
46
+ highlightMode?: 'expression' | 'formula';
47
+ /**
48
+ * 用于提示的变量集合,默认为空
49
+ */
50
+ variables?: Array<VariableItem>;
51
+ /**
52
+ * 函数集合,默认不需要传,即 amis-formula 里面那个函数
53
+ * 如果有扩充,则需要传。
54
+ */
55
+ functions?: Array<FuncGroup>;
56
+ placeholder?: string;
57
+ editorDidMount?: (cm: typeof CodeMirror, editor: CodeMirror.Editor, plugin: FormulaPlugin) => void;
58
+ }
59
+ declare const _default: {
60
+ new (props: Omit<CodeEditorProps & React.RefAttributes<unknown>, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps): {
61
+ ref: any;
62
+ childRef(ref: any): void;
63
+ getWrappedInstance(): any;
64
+ render(): React.JSX.Element;
65
+ context: unknown;
66
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<CodeEditorProps & React.RefAttributes<unknown>, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
67
+ forceUpdate(callback?: (() => void) | undefined): void;
68
+ readonly props: Readonly<Omit<CodeEditorProps & React.RefAttributes<unknown>, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>;
69
+ state: Readonly<{}>;
70
+ refs: {
71
+ [key: string]: React.ReactInstance;
72
+ };
73
+ componentDidMount?(): void;
74
+ shouldComponentUpdate?(nextProps: Readonly<Omit<CodeEditorProps & React.RefAttributes<unknown>, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
75
+ componentWillUnmount?(): void;
76
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
77
+ getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<CodeEditorProps & React.RefAttributes<unknown>, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>): any;
78
+ componentDidUpdate?(prevProps: Readonly<Omit<CodeEditorProps & React.RefAttributes<unknown>, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>, snapshot?: any): void;
79
+ componentWillMount?(): void;
80
+ UNSAFE_componentWillMount?(): void;
81
+ componentWillReceiveProps?(nextProps: Readonly<Omit<CodeEditorProps & React.RefAttributes<unknown>, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
82
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<CodeEditorProps & React.RefAttributes<unknown>, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
83
+ componentWillUpdate?(nextProps: Readonly<Omit<CodeEditorProps & React.RefAttributes<unknown>, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
84
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<CodeEditorProps & React.RefAttributes<unknown>, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
85
+ };
86
+ displayName: string;
87
+ contextType: React.Context<string>;
88
+ ComposedComponent: React.ComponentType<React.ForwardRefExoticComponent<CodeEditorProps & React.RefAttributes<unknown>>>;
89
+ } & import("hoist-non-react-statics").NonReactStatics<React.ForwardRefExoticComponent<CodeEditorProps & React.RefAttributes<unknown>>, {}> & {
90
+ ComposedComponent: React.ForwardRefExoticComponent<CodeEditorProps & React.RefAttributes<unknown>>;
91
+ };
92
+ export default _default;