amis-ui 6.11.0-beta.1 → 6.11.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (639) hide show
  1. package/esm/components/404.js +1 -1
  2. package/esm/components/Alert.js +1 -1
  3. package/esm/components/Alert2.js +1 -1
  4. package/esm/components/AnchorNav.js +1 -1
  5. package/esm/components/AnchorNavSection.js +1 -1
  6. package/esm/components/ArrayInput.js +1 -1
  7. package/esm/components/AsideNav.js +1 -1
  8. package/esm/components/AssociatedSelection.js +1 -1
  9. package/esm/components/AutoSizer.js +1 -1
  10. package/esm/components/Avatar.js +1 -1
  11. package/esm/components/Badge.js +1 -1
  12. package/esm/components/BaiduMapPicker.js +1 -1
  13. package/esm/components/BarCode.js +1 -1
  14. package/esm/components/Breadcrumb.js +1 -1
  15. package/esm/components/Button.js +1 -1
  16. package/esm/components/CalendarMobile.js +1 -1
  17. package/esm/components/Card.js +1 -1
  18. package/esm/components/Cascader.js +1 -1
  19. package/esm/components/ChainedDropdownSelection.js +1 -1
  20. package/esm/components/ChainedSelection.js +1 -1
  21. package/esm/components/Checkbox.js +1 -1
  22. package/esm/components/CityArea.js +1 -1
  23. package/esm/components/CityDB.js +1 -1
  24. package/esm/components/CodeMirror.js +1 -1
  25. package/esm/components/Collapse.js +1 -1
  26. package/esm/components/CollapseGroup.js +1 -1
  27. package/esm/components/ColorPicker.js +1 -1
  28. package/esm/components/Combo.js +1 -1
  29. package/esm/components/ConditionBuilder.js +1 -1
  30. package/esm/components/ConfirmBox.js +1 -1
  31. package/esm/components/ContextMenu.js +1 -1
  32. package/esm/components/DatePicker.js +1 -1
  33. package/esm/components/DateRangePicker.js +1 -1
  34. package/esm/components/DiffEditor.js +2 -2
  35. package/esm/components/DndContainer.js +1 -1
  36. package/esm/components/Drawer.js +1 -1
  37. package/esm/components/DropDownSelection.js +1 -1
  38. package/esm/components/Editor.js +1 -1
  39. package/esm/components/Form.js +1 -1
  40. package/esm/components/FormField.js +1 -1
  41. package/esm/components/FormulaPicker.js +1 -1
  42. package/esm/components/GaodeMapPicker.js +1 -1
  43. package/esm/components/GridNav.js +1 -1
  44. package/esm/components/GridNavItem.js +1 -1
  45. package/esm/components/GroupedSelection.js +1 -1
  46. package/esm/components/HeadCellDropDown.js +1 -1
  47. package/esm/components/Html.js +1 -1
  48. package/esm/components/Icon.js +1 -1
  49. package/esm/components/ImageGallery.js +1 -1
  50. package/esm/components/Input.js +1 -1
  51. package/esm/components/InputBox.js +1 -1
  52. package/esm/components/InputBoxWithSuggestion.js +1 -1
  53. package/esm/components/InputJSONSchema.js +1 -1
  54. package/esm/components/InputTable.js +1 -1
  55. package/esm/components/JSONSchemaEditor.js +1 -1
  56. package/esm/components/Layout.js +1 -1
  57. package/esm/components/Link.js +1 -1
  58. package/esm/components/ListGroup.js +1 -1
  59. package/esm/components/ListMenu.js +1 -1
  60. package/esm/components/LocationPicker.js +1 -1
  61. package/esm/components/Markdown.js +1 -1
  62. package/esm/components/Menu.js +1 -1
  63. package/esm/components/MobileDevTool.d.ts +1 -0
  64. package/esm/components/MobileDevTool.js +4 -3
  65. package/esm/components/Modal.js +1 -1
  66. package/esm/components/ModalManager.js +1 -1
  67. package/esm/components/MultilineText.js +1 -1
  68. package/esm/components/NumberInput.js +1 -1
  69. package/esm/components/OverflowTpl.js +1 -1
  70. package/esm/components/Pagination.js +1 -1
  71. package/esm/components/PdfViewer.js +1 -1
  72. package/esm/components/Picker.js +1 -1
  73. package/esm/components/PickerColumn.js +1 -1
  74. package/esm/components/PickerContainer.js +1 -1
  75. package/esm/components/PopOverContainer.js +1 -1
  76. package/esm/components/PopUp.js +1 -1
  77. package/esm/components/Progress.js +1 -1
  78. package/esm/components/PullRefresh.js +1 -1
  79. package/esm/components/Radios.js +1 -1
  80. package/esm/components/Range.js +1 -1
  81. package/esm/components/Rating.js +1 -1
  82. package/esm/components/ResultBox.js +1 -1
  83. package/esm/components/ResultList.js +1 -1
  84. package/esm/components/ResultTableList.js +1 -1
  85. package/esm/components/ResultTreeList.js +1 -1
  86. package/esm/components/RichText.js +1 -1
  87. package/esm/components/SearchBox.js +1 -1
  88. package/esm/components/Select.js +1 -1
  89. package/esm/components/SelectMobile.js +1 -1
  90. package/esm/components/Selection.js +1 -1
  91. package/esm/components/Shape.d.ts +58 -0
  92. package/esm/components/Shape.js +429 -0
  93. package/esm/components/Signature.js +2 -1
  94. package/esm/components/SparkLine.js +1 -1
  95. package/esm/components/Spinner.js +1 -1
  96. package/esm/components/Steps.js +1 -1
  97. package/esm/components/Switch.js +1 -1
  98. package/esm/components/Tab.js +1 -1
  99. package/esm/components/Table.js +1 -1
  100. package/esm/components/TableSelection.js +1 -1
  101. package/esm/components/Tabs.js +1 -1
  102. package/esm/components/TabsTransfer.js +1 -1
  103. package/esm/components/TabsTransferPicker.js +1 -1
  104. package/esm/components/Tag.js +1 -1
  105. package/esm/components/Textarea.js +1 -1
  106. package/esm/components/Timeline.js +1 -1
  107. package/esm/components/TimelineItem.js +1 -1
  108. package/esm/components/Tinymce.js +1 -1
  109. package/esm/components/TitleBar.js +1 -1
  110. package/esm/components/Toast.js +1 -1
  111. package/esm/components/Tooltip.js +1 -1
  112. package/esm/components/TooltipWrapper.js +1 -1
  113. package/esm/components/Transfer.js +1 -1
  114. package/esm/components/TransferDropDown.js +1 -1
  115. package/esm/components/TransferPicker.js +1 -1
  116. package/esm/components/TransferSearch.js +1 -1
  117. package/esm/components/Tree.js +1 -1
  118. package/esm/components/TreeSelection.js +1 -1
  119. package/esm/components/UserSelect.js +1 -1
  120. package/esm/components/UserTabSelect.js +1 -1
  121. package/esm/components/VerificationCode.js +1 -1
  122. package/esm/components/VirtualList.js +1 -1
  123. package/esm/components/WithRemoteConfig.js +1 -1
  124. package/esm/components/WithStore.js +1 -1
  125. package/esm/components/calendar/Calendar.js +1 -1
  126. package/esm/components/calendar/CalendarContainer.js +1 -1
  127. package/esm/components/calendar/DaysView.js +1 -1
  128. package/esm/components/calendar/MonthsView.js +1 -1
  129. package/esm/components/calendar/QuartersView.js +1 -1
  130. package/esm/components/calendar/TimeView.js +1 -1
  131. package/esm/components/calendar/YearsView.js +1 -1
  132. package/esm/components/condition-builder/Expression.js +1 -1
  133. package/esm/components/condition-builder/Field.js +1 -1
  134. package/esm/components/condition-builder/Func.js +1 -1
  135. package/esm/components/condition-builder/Group.js +1 -1
  136. package/esm/components/condition-builder/GroupOrItem.js +1 -1
  137. package/esm/components/condition-builder/InputSwitch.js +1 -1
  138. package/esm/components/condition-builder/Item.js +1 -1
  139. package/esm/components/condition-builder/Value.js +1 -1
  140. package/esm/components/condition-builder/config.js +1 -1
  141. package/esm/components/condition-builder/index.js +1 -1
  142. package/esm/components/formula/CodeEditor.js +1 -1
  143. package/esm/components/formula/Editor.js +1 -1
  144. package/esm/components/formula/FuncList.js +1 -1
  145. package/esm/components/formula/Input.js +1 -1
  146. package/esm/components/formula/Picker.js +1 -1
  147. package/esm/components/formula/VariableList.js +1 -1
  148. package/esm/components/formula/plugin.js +1 -1
  149. package/esm/components/icons.js +1 -1
  150. package/esm/components/index.d.ts +3 -1
  151. package/esm/components/json-schema/Array.js +1 -1
  152. package/esm/components/json-schema/Item.js +1 -1
  153. package/esm/components/json-schema/Object.js +1 -1
  154. package/esm/components/json-schema/index.js +1 -1
  155. package/esm/components/menu/MenuContext.js +1 -1
  156. package/esm/components/menu/MenuItem.js +1 -1
  157. package/esm/components/menu/SubMenu.js +1 -1
  158. package/esm/components/menu/index.js +1 -1
  159. package/esm/components/schema-editor/Array.js +1 -1
  160. package/esm/components/schema-editor/Common.js +1 -1
  161. package/esm/components/schema-editor/Item.js +1 -1
  162. package/esm/components/schema-editor/Object.js +1 -1
  163. package/esm/components/schema-editor/SchemaVariableList.js +1 -1
  164. package/esm/components/schema-editor/SchemaVariableListPicker.js +1 -1
  165. package/esm/components/schema-editor/index.js +1 -1
  166. package/esm/components/table/Cell.js +1 -1
  167. package/esm/components/table/ColGroup.js +1 -1
  168. package/esm/components/table/Head.js +1 -1
  169. package/esm/components/table/HeadCellDropDown.js +1 -1
  170. package/esm/components/table/HeadCellFilter.js +1 -1
  171. package/esm/components/table/HeadCellSelect.js +1 -1
  172. package/esm/components/table/HeadCellSort.js +1 -1
  173. package/esm/components/table/ItemActionsWrapper.js +1 -1
  174. package/esm/components/table/Row.js +1 -1
  175. package/esm/components/table/SummaryRow.js +1 -1
  176. package/esm/components/table/index.js +1 -1
  177. package/esm/components/table/util.js +1 -1
  178. package/esm/components/virtual-list/AutoSizer.js +1 -1
  179. package/esm/components/virtual-list/SizeAndPositionManager.js +1 -1
  180. package/esm/components/virtual-list/constants.js +1 -1
  181. package/esm/components/virtual-list/index.js +1 -1
  182. package/esm/components/withBadge.js +1 -1
  183. package/esm/hooks/use-on-screen.js +1 -1
  184. package/esm/hooks/use-set-state.js +1 -1
  185. package/esm/hooks/use-sub-form.js +1 -1
  186. package/esm/hooks/use-touch.js +1 -1
  187. package/esm/hooks/use-update-effect.js +1 -1
  188. package/esm/hooks/use-validation-resolver.js +1 -1
  189. package/esm/icons/alert-danger.svg.js +1 -1
  190. package/esm/icons/alert-info.svg.js +1 -1
  191. package/esm/icons/alert-success.svg.js +1 -1
  192. package/esm/icons/alert-warning.svg.js +1 -1
  193. package/esm/icons/arrow-double-left.svg.js +1 -1
  194. package/esm/icons/arrow-double-right.svg.js +1 -1
  195. package/esm/icons/back.svg.js +1 -1
  196. package/esm/icons/calendar.svg.js +1 -1
  197. package/esm/icons/caret.svg.js +1 -1
  198. package/esm/icons/check.svg.js +1 -1
  199. package/esm/icons/clock.svg.js +1 -1
  200. package/esm/icons/close-small.svg.js +1 -1
  201. package/esm/icons/close.svg.js +1 -1
  202. package/esm/icons/cloud-upload.svg.js +1 -1
  203. package/esm/icons/column-filter.svg.js +1 -1
  204. package/esm/icons/columns.svg.js +1 -1
  205. package/esm/icons/compress-alt.svg.js +1 -1
  206. package/esm/icons/copy.svg.js +1 -1
  207. package/esm/icons/date.svg.js +1 -1
  208. package/esm/icons/department.svg.js +1 -1
  209. package/esm/icons/desk-empty.svg.js +1 -1
  210. package/esm/icons/dot.svg.js +1 -1
  211. package/esm/icons/down-arrow-bold.svg.js +1 -1
  212. package/esm/icons/down.svg.js +1 -1
  213. package/esm/icons/download.svg.js +1 -1
  214. package/esm/icons/drag-bar.svg.js +1 -1
  215. package/esm/icons/drag.svg.js +1 -1
  216. package/esm/icons/edit.svg.js +1 -1
  217. package/esm/icons/ellipsis-v.svg.js +1 -1
  218. package/esm/icons/enter.svg.js +1 -1
  219. package/esm/icons/exchange.svg.js +1 -1
  220. package/esm/icons/expand-alt.svg.js +1 -1
  221. package/esm/icons/fail.svg.js +1 -1
  222. package/esm/icons/file.svg.js +1 -1
  223. package/esm/icons/filter.svg.js +1 -1
  224. package/esm/icons/folder.svg.js +1 -1
  225. package/esm/icons/fullscreen.svg.js +1 -1
  226. package/esm/icons/function.svg.js +1 -1
  227. package/esm/icons/home.svg.js +1 -1
  228. package/esm/icons/if.svg.js +1 -1
  229. package/esm/icons/image.svg.js +1 -1
  230. package/esm/icons/info-circle.svg.js +1 -1
  231. package/esm/icons/info.svg.js +1 -1
  232. package/esm/icons/input-clear.svg.js +1 -1
  233. package/esm/icons/invisible.svg.js +1 -1
  234. package/esm/icons/left-arrow.svg.js +1 -1
  235. package/esm/icons/loading-outline.svg.js +1 -1
  236. package/esm/icons/location.svg.js +1 -1
  237. package/esm/icons/menu.svg.js +1 -1
  238. package/esm/icons/minus.svg.js +1 -1
  239. package/esm/icons/move.svg.js +1 -1
  240. package/esm/icons/mute.svg.js +1 -1
  241. package/esm/icons/new-edit.svg.js +1 -1
  242. package/esm/icons/pause.svg.js +1 -1
  243. package/esm/icons/pencil.svg.js +1 -1
  244. package/esm/icons/play.svg.js +1 -1
  245. package/esm/icons/plus-cicle.svg.js +1 -1
  246. package/esm/icons/plus-fine.svg.js +1 -1
  247. package/esm/icons/plus.svg.js +1 -1
  248. package/esm/icons/post.svg.js +1 -1
  249. package/esm/icons/question-mark.svg.js +1 -1
  250. package/esm/icons/question.svg.js +1 -1
  251. package/esm/icons/redo.svg.js +1 -1
  252. package/esm/icons/refresh.svg.js +1 -1
  253. package/esm/icons/reload.svg.js +1 -1
  254. package/esm/icons/remove.svg.js +1 -1
  255. package/esm/icons/retry.svg.js +1 -1
  256. package/esm/icons/right-arrow-bold.svg.js +1 -1
  257. package/esm/icons/right-arrow.svg.js +1 -1
  258. package/esm/icons/right-double-arrow.svg.js +1 -1
  259. package/esm/icons/role.svg.js +1 -1
  260. package/esm/icons/rotate-left.svg.js +1 -1
  261. package/esm/icons/rotate-right.svg.js +1 -1
  262. package/esm/icons/rotate-screen.svg.js +1 -1
  263. package/esm/icons/scale-origin.svg.js +1 -1
  264. package/esm/icons/schedule.svg.js +1 -1
  265. package/esm/icons/search.svg.js +1 -1
  266. package/esm/icons/setting.svg.js +1 -1
  267. package/esm/icons/slider-handle-icon.svg.js +1 -1
  268. package/esm/icons/sort-asc.svg.js +1 -1
  269. package/esm/icons/sort-default.svg.js +1 -1
  270. package/esm/icons/sort-desc.svg.js +1 -1
  271. package/esm/icons/star.svg.js +1 -1
  272. package/esm/icons/status-close.svg.js +1 -1
  273. package/esm/icons/steps-finsh.svg.js +1 -1
  274. package/esm/icons/sub-plus.svg.js +1 -1
  275. package/esm/icons/success.svg.js +1 -1
  276. package/esm/icons/transparent.svg.js +1 -1
  277. package/esm/icons/trash.svg.js +1 -1
  278. package/esm/icons/tree-down.svg.js +1 -1
  279. package/esm/icons/undo-normal.svg.js +1 -1
  280. package/esm/icons/undo.svg.js +1 -1
  281. package/esm/icons/unfullscreen.svg.js +1 -1
  282. package/esm/icons/upload.svg.js +1 -1
  283. package/esm/icons/user-remove.svg.js +1 -1
  284. package/esm/icons/view.svg.js +1 -1
  285. package/esm/icons/volume.svg.js +1 -1
  286. package/esm/icons/warning-mark.svg.js +1 -1
  287. package/esm/icons/warning.svg.js +1 -1
  288. package/esm/icons/window-restore.svg.js +1 -1
  289. package/esm/icons/zoom-in.svg.js +1 -1
  290. package/esm/icons/zoom-out.svg.js +1 -1
  291. package/esm/index.js +2 -1
  292. package/esm/locale/de-DE.js +2 -1
  293. package/esm/locale/en-US.js +2 -1
  294. package/esm/locale/zh-CN.js +2 -1
  295. package/esm/themes/ang.js +1 -1
  296. package/esm/themes/antd.js +1 -1
  297. package/esm/themes/cxd.js +1 -1
  298. package/esm/themes/dark.js +1 -1
  299. package/esm/utils/smoothSignature.js +1 -1
  300. package/esm/utils/vectorComputed.d.ts +20 -0
  301. package/esm/utils/vectorComputed.js +75 -0
  302. package/esm/withRemoteConfig.js +1 -1
  303. package/esm/withStore.js +1 -1
  304. package/lib/components/404.js +1 -1
  305. package/lib/components/Alert.d.ts +40 -40
  306. package/lib/components/Alert.js +1 -1
  307. package/lib/components/Alert2.d.ts +10 -10
  308. package/lib/components/Alert2.js +1 -1
  309. package/lib/components/AnchorNav.d.ts +10 -10
  310. package/lib/components/AnchorNav.js +1 -1
  311. package/lib/components/AnchorNavSection.js +1 -1
  312. package/lib/components/ArrayInput.js +1 -1
  313. package/lib/components/AsideNav.js +1 -1
  314. package/lib/components/AssociatedSelection.js +1 -1
  315. package/lib/components/AutoSizer.js +1 -1
  316. package/lib/components/Avatar.js +1 -1
  317. package/lib/components/Badge.js +1 -1
  318. package/lib/components/BaiduMapPicker.js +1 -1
  319. package/lib/components/BarCode.js +1 -1
  320. package/lib/components/Breadcrumb.js +1 -1
  321. package/lib/components/Button.js +1 -1
  322. package/lib/components/CalendarMobile.js +1 -1
  323. package/lib/components/Card.d.ts +10 -10
  324. package/lib/components/Card.js +1 -1
  325. package/lib/components/Cascader.js +1 -1
  326. package/lib/components/ChainedDropdownSelection.js +1 -1
  327. package/lib/components/ChainedSelection.js +1 -1
  328. package/lib/components/Checkbox.js +1 -1
  329. package/lib/components/CityArea.js +1 -1
  330. package/lib/components/CityDB.js +1 -1
  331. package/lib/components/CodeMirror.js +1 -1
  332. package/lib/components/Collapse.js +1 -1
  333. package/lib/components/CollapseGroup.js +1 -1
  334. package/lib/components/ColorPicker.js +1 -1
  335. package/lib/components/Combo.js +1 -1
  336. package/lib/components/ConditionBuilder.js +1 -1
  337. package/lib/components/ConfirmBox.js +1 -1
  338. package/lib/components/ContextMenu.js +1 -1
  339. package/lib/components/DatePicker.js +1 -1
  340. package/lib/components/DateRangePicker.js +1 -1
  341. package/lib/components/DiffEditor.js +2 -2
  342. package/lib/components/DndContainer.js +1 -1
  343. package/lib/components/Drawer.d.ts +10 -10
  344. package/lib/components/Drawer.js +1 -1
  345. package/lib/components/DropDownSelection.js +1 -1
  346. package/lib/components/Editor.js +1 -1
  347. package/lib/components/Form.js +1 -1
  348. package/lib/components/FormField.js +1 -1
  349. package/lib/components/FormulaPicker.js +1 -1
  350. package/lib/components/GaodeMapPicker.js +1 -1
  351. package/lib/components/GridNav.js +1 -1
  352. package/lib/components/GridNavItem.js +1 -1
  353. package/lib/components/GroupedSelection.js +1 -1
  354. package/lib/components/HeadCellDropDown.js +1 -1
  355. package/lib/components/Html.js +1 -1
  356. package/lib/components/Icon.js +1 -1
  357. package/lib/components/ImageGallery.js +1 -1
  358. package/lib/components/Input.js +1 -1
  359. package/lib/components/InputBox.js +1 -1
  360. package/lib/components/InputBoxWithSuggestion.js +1 -1
  361. package/lib/components/InputJSONSchema.js +1 -1
  362. package/lib/components/InputTable.js +1 -1
  363. package/lib/components/JSONSchemaEditor.js +1 -1
  364. package/lib/components/Layout.js +1 -1
  365. package/lib/components/Link.js +1 -1
  366. package/lib/components/ListGroup.d.ts +10 -10
  367. package/lib/components/ListGroup.js +1 -1
  368. package/lib/components/ListMenu.js +1 -1
  369. package/lib/components/LocationPicker.js +1 -1
  370. package/lib/components/Markdown.js +1 -1
  371. package/lib/components/Menu.js +1 -1
  372. package/lib/components/MobileDevTool.d.ts +1 -0
  373. package/lib/components/MobileDevTool.js +4 -3
  374. package/lib/components/Modal.d.ts +40 -40
  375. package/lib/components/Modal.js +1 -1
  376. package/lib/components/ModalManager.js +1 -1
  377. package/lib/components/MultilineText.js +1 -1
  378. package/lib/components/NumberInput.js +1 -1
  379. package/lib/components/OverflowTpl.js +1 -1
  380. package/lib/components/Pagination.js +1 -1
  381. package/lib/components/PdfViewer.js +1 -1
  382. package/lib/components/Picker.js +1 -1
  383. package/lib/components/PickerColumn.js +1 -1
  384. package/lib/components/PickerContainer.js +1 -1
  385. package/lib/components/PopOverContainer.js +1 -1
  386. package/lib/components/PopUp.js +1 -1
  387. package/lib/components/Progress.js +1 -1
  388. package/lib/components/PullRefresh.js +1 -1
  389. package/lib/components/Radios.js +1 -1
  390. package/lib/components/Range.js +1 -1
  391. package/lib/components/Rating.js +1 -1
  392. package/lib/components/ResultBox.js +1 -1
  393. package/lib/components/ResultList.js +1 -1
  394. package/lib/components/ResultTableList.js +1 -1
  395. package/lib/components/ResultTreeList.js +1 -1
  396. package/lib/components/RichText.js +1 -1
  397. package/lib/components/SearchBox.js +1 -1
  398. package/lib/components/Select.js +1 -1
  399. package/lib/components/SelectMobile.js +1 -1
  400. package/lib/components/Selection.js +1 -1
  401. package/lib/components/Shape.d.ts +58 -0
  402. package/lib/components/Shape.js +434 -0
  403. package/lib/components/Signature.js +2 -1
  404. package/lib/components/SparkLine.js +1 -1
  405. package/lib/components/Spinner.js +1 -1
  406. package/lib/components/Steps.js +1 -1
  407. package/lib/components/Switch.js +1 -1
  408. package/lib/components/Tab.js +1 -1
  409. package/lib/components/Table.js +1 -1
  410. package/lib/components/TableSelection.js +1 -1
  411. package/lib/components/Tabs.d.ts +40 -40
  412. package/lib/components/Tabs.js +1 -1
  413. package/lib/components/TabsTransfer.d.ts +40 -40
  414. package/lib/components/TabsTransfer.js +1 -1
  415. package/lib/components/TabsTransferPicker.js +1 -1
  416. package/lib/components/Tag.js +1 -1
  417. package/lib/components/Textarea.js +1 -1
  418. package/lib/components/Timeline.js +1 -1
  419. package/lib/components/TimelineItem.js +1 -1
  420. package/lib/components/Tinymce.js +1 -1
  421. package/lib/components/TitleBar.js +1 -1
  422. package/lib/components/Toast.js +1 -1
  423. package/lib/components/Tooltip.js +1 -1
  424. package/lib/components/TooltipWrapper.js +1 -1
  425. package/lib/components/Transfer.d.ts +40 -40
  426. package/lib/components/Transfer.js +1 -1
  427. package/lib/components/TransferDropDown.d.ts +40 -40
  428. package/lib/components/TransferDropDown.js +1 -1
  429. package/lib/components/TransferPicker.js +1 -1
  430. package/lib/components/TransferSearch.js +1 -1
  431. package/lib/components/Tree.js +1 -1
  432. package/lib/components/TreeSelection.d.ts +40 -40
  433. package/lib/components/TreeSelection.js +1 -1
  434. package/lib/components/UserSelect.js +1 -1
  435. package/lib/components/UserTabSelect.js +1 -1
  436. package/lib/components/VerificationCode.js +1 -1
  437. package/lib/components/VirtualList.js +1 -1
  438. package/lib/components/WithRemoteConfig.js +1 -1
  439. package/lib/components/WithStore.js +1 -1
  440. package/lib/components/calendar/Calendar.js +1 -1
  441. package/lib/components/calendar/CalendarContainer.js +1 -1
  442. package/lib/components/calendar/DaysView.js +1 -1
  443. package/lib/components/calendar/MonthsView.js +1 -1
  444. package/lib/components/calendar/QuartersView.js +1 -1
  445. package/lib/components/calendar/TimeView.js +1 -1
  446. package/lib/components/calendar/YearsView.js +1 -1
  447. package/lib/components/condition-builder/Expression.js +1 -1
  448. package/lib/components/condition-builder/Field.js +1 -1
  449. package/lib/components/condition-builder/Func.js +1 -1
  450. package/lib/components/condition-builder/Group.js +1 -1
  451. package/lib/components/condition-builder/GroupOrItem.js +1 -1
  452. package/lib/components/condition-builder/InputSwitch.js +1 -1
  453. package/lib/components/condition-builder/Item.js +1 -1
  454. package/lib/components/condition-builder/Value.js +1 -1
  455. package/lib/components/condition-builder/config.js +1 -1
  456. package/lib/components/condition-builder/index.js +1 -1
  457. package/lib/components/formula/CodeEditor.js +1 -1
  458. package/lib/components/formula/Editor.js +1 -1
  459. package/lib/components/formula/FuncList.js +1 -1
  460. package/lib/components/formula/Input.js +1 -1
  461. package/lib/components/formula/Picker.js +1 -1
  462. package/lib/components/formula/VariableList.js +1 -1
  463. package/lib/components/formula/plugin.js +1 -1
  464. package/lib/components/icons.js +1 -1
  465. package/lib/components/index.d.ts +3 -1
  466. package/lib/components/json-schema/Array.js +1 -1
  467. package/lib/components/json-schema/Item.js +1 -1
  468. package/lib/components/json-schema/Object.js +1 -1
  469. package/lib/components/json-schema/index.js +1 -1
  470. package/lib/components/menu/MenuContext.js +1 -1
  471. package/lib/components/menu/MenuItem.js +1 -1
  472. package/lib/components/menu/SubMenu.js +1 -1
  473. package/lib/components/menu/index.js +1 -1
  474. package/lib/components/schema-editor/Array.js +1 -1
  475. package/lib/components/schema-editor/Common.js +1 -1
  476. package/lib/components/schema-editor/Item.js +1 -1
  477. package/lib/components/schema-editor/Object.js +1 -1
  478. package/lib/components/schema-editor/SchemaVariableList.js +1 -1
  479. package/lib/components/schema-editor/SchemaVariableListPicker.js +1 -1
  480. package/lib/components/schema-editor/index.js +1 -1
  481. package/lib/components/table/Cell.js +1 -1
  482. package/lib/components/table/ColGroup.js +1 -1
  483. package/lib/components/table/Head.js +1 -1
  484. package/lib/components/table/HeadCellDropDown.js +1 -1
  485. package/lib/components/table/HeadCellFilter.js +1 -1
  486. package/lib/components/table/HeadCellSelect.js +1 -1
  487. package/lib/components/table/HeadCellSort.js +1 -1
  488. package/lib/components/table/ItemActionsWrapper.js +1 -1
  489. package/lib/components/table/Row.js +1 -1
  490. package/lib/components/table/SummaryRow.js +1 -1
  491. package/lib/components/table/index.js +1 -1
  492. package/lib/components/table/util.d.ts +1 -1
  493. package/lib/components/table/util.js +1 -1
  494. package/lib/components/virtual-list/AutoSizer.js +1 -1
  495. package/lib/components/virtual-list/SizeAndPositionManager.js +1 -1
  496. package/lib/components/virtual-list/constants.js +1 -1
  497. package/lib/components/virtual-list/index.js +1 -1
  498. package/lib/components/withBadge.js +1 -1
  499. package/lib/hooks/use-on-screen.js +1 -1
  500. package/lib/hooks/use-set-state.js +1 -1
  501. package/lib/hooks/use-sub-form.js +1 -1
  502. package/lib/hooks/use-touch.js +1 -1
  503. package/lib/hooks/use-update-effect.js +1 -1
  504. package/lib/hooks/use-validation-resolver.js +1 -1
  505. package/lib/icons/alert-danger.svg.js +1 -1
  506. package/lib/icons/alert-info.svg.js +1 -1
  507. package/lib/icons/alert-success.svg.js +1 -1
  508. package/lib/icons/alert-warning.svg.js +1 -1
  509. package/lib/icons/arrow-double-left.svg.js +1 -1
  510. package/lib/icons/arrow-double-right.svg.js +1 -1
  511. package/lib/icons/back.svg.js +1 -1
  512. package/lib/icons/calendar.svg.js +1 -1
  513. package/lib/icons/caret.svg.js +1 -1
  514. package/lib/icons/check.svg.js +1 -1
  515. package/lib/icons/clock.svg.js +1 -1
  516. package/lib/icons/close-small.svg.js +1 -1
  517. package/lib/icons/close.svg.js +1 -1
  518. package/lib/icons/cloud-upload.svg.js +1 -1
  519. package/lib/icons/column-filter.svg.js +1 -1
  520. package/lib/icons/columns.svg.js +1 -1
  521. package/lib/icons/compress-alt.svg.js +1 -1
  522. package/lib/icons/copy.svg.js +1 -1
  523. package/lib/icons/date.svg.js +1 -1
  524. package/lib/icons/department.svg.js +1 -1
  525. package/lib/icons/desk-empty.svg.js +1 -1
  526. package/lib/icons/dot.svg.js +1 -1
  527. package/lib/icons/down-arrow-bold.svg.js +1 -1
  528. package/lib/icons/down.svg.js +1 -1
  529. package/lib/icons/download.svg.js +1 -1
  530. package/lib/icons/drag-bar.svg.js +1 -1
  531. package/lib/icons/drag.svg.js +1 -1
  532. package/lib/icons/edit.svg.js +1 -1
  533. package/lib/icons/ellipsis-v.svg.js +1 -1
  534. package/lib/icons/enter.svg.js +1 -1
  535. package/lib/icons/exchange.svg.js +1 -1
  536. package/lib/icons/expand-alt.svg.js +1 -1
  537. package/lib/icons/fail.svg.js +1 -1
  538. package/lib/icons/file.svg.js +1 -1
  539. package/lib/icons/filter.svg.js +1 -1
  540. package/lib/icons/folder.svg.js +1 -1
  541. package/lib/icons/fullscreen.svg.js +1 -1
  542. package/lib/icons/function.svg.js +1 -1
  543. package/lib/icons/home.svg.js +1 -1
  544. package/lib/icons/if.svg.js +1 -1
  545. package/lib/icons/image.svg.js +1 -1
  546. package/lib/icons/info-circle.svg.js +1 -1
  547. package/lib/icons/info.svg.js +1 -1
  548. package/lib/icons/input-clear.svg.js +1 -1
  549. package/lib/icons/invisible.svg.js +1 -1
  550. package/lib/icons/left-arrow.svg.js +1 -1
  551. package/lib/icons/loading-outline.svg.js +1 -1
  552. package/lib/icons/location.svg.js +1 -1
  553. package/lib/icons/menu.svg.js +1 -1
  554. package/lib/icons/minus.svg.js +1 -1
  555. package/lib/icons/move.svg.js +1 -1
  556. package/lib/icons/mute.svg.js +1 -1
  557. package/lib/icons/new-edit.svg.js +1 -1
  558. package/lib/icons/pause.svg.js +1 -1
  559. package/lib/icons/pencil.svg.js +1 -1
  560. package/lib/icons/play.svg.js +1 -1
  561. package/lib/icons/plus-cicle.svg.js +1 -1
  562. package/lib/icons/plus-fine.svg.js +1 -1
  563. package/lib/icons/plus.svg.js +1 -1
  564. package/lib/icons/post.svg.js +1 -1
  565. package/lib/icons/question-mark.svg.js +1 -1
  566. package/lib/icons/question.svg.js +1 -1
  567. package/lib/icons/redo.svg.js +1 -1
  568. package/lib/icons/refresh.svg.js +1 -1
  569. package/lib/icons/reload.svg.js +1 -1
  570. package/lib/icons/remove.svg.js +1 -1
  571. package/lib/icons/retry.svg.js +1 -1
  572. package/lib/icons/right-arrow-bold.svg.js +1 -1
  573. package/lib/icons/right-arrow.svg.js +1 -1
  574. package/lib/icons/right-double-arrow.svg.js +1 -1
  575. package/lib/icons/role.svg.js +1 -1
  576. package/lib/icons/rotate-left.svg.js +1 -1
  577. package/lib/icons/rotate-right.svg.js +1 -1
  578. package/lib/icons/rotate-screen.svg.js +1 -1
  579. package/lib/icons/scale-origin.svg.js +1 -1
  580. package/lib/icons/schedule.svg.js +1 -1
  581. package/lib/icons/search.svg.js +1 -1
  582. package/lib/icons/setting.svg.js +1 -1
  583. package/lib/icons/slider-handle-icon.svg.js +1 -1
  584. package/lib/icons/sort-asc.svg.js +1 -1
  585. package/lib/icons/sort-default.svg.js +1 -1
  586. package/lib/icons/sort-desc.svg.js +1 -1
  587. package/lib/icons/star.svg.js +1 -1
  588. package/lib/icons/status-close.svg.js +1 -1
  589. package/lib/icons/steps-finsh.svg.js +1 -1
  590. package/lib/icons/sub-plus.svg.js +1 -1
  591. package/lib/icons/success.svg.js +1 -1
  592. package/lib/icons/transparent.svg.js +1 -1
  593. package/lib/icons/trash.svg.js +1 -1
  594. package/lib/icons/tree-down.svg.js +1 -1
  595. package/lib/icons/undo-normal.svg.js +1 -1
  596. package/lib/icons/undo.svg.js +1 -1
  597. package/lib/icons/unfullscreen.svg.js +1 -1
  598. package/lib/icons/upload.svg.js +1 -1
  599. package/lib/icons/user-remove.svg.js +1 -1
  600. package/lib/icons/view.svg.js +1 -1
  601. package/lib/icons/volume.svg.js +1 -1
  602. package/lib/icons/warning-mark.svg.js +1 -1
  603. package/lib/icons/warning.svg.js +1 -1
  604. package/lib/icons/window-restore.svg.js +1 -1
  605. package/lib/icons/zoom-in.svg.js +1 -1
  606. package/lib/icons/zoom-out.svg.js +1 -1
  607. package/lib/index.js +3 -1
  608. package/lib/locale/de-DE.js +2 -1
  609. package/lib/locale/en-US.js +2 -1
  610. package/lib/locale/zh-CN.js +2 -1
  611. package/lib/scss/helper.scss.js +1 -1
  612. package/lib/scss/themes/ang.scss.js +1 -1
  613. package/lib/scss/themes/antd.scss.js +1 -1
  614. package/lib/scss/themes/cxd.scss.js +1 -1
  615. package/lib/scss/themes/dark.scss.js +1 -1
  616. package/lib/scss/themes/default.scss.js +1 -1
  617. package/lib/themes/ang.css +52 -30
  618. package/lib/themes/ang.js +1 -1
  619. package/lib/themes/antd.css +52 -30
  620. package/lib/themes/antd.js +1 -1
  621. package/lib/themes/cxd.css +52 -30
  622. package/lib/themes/cxd.js +1 -1
  623. package/lib/themes/dark.css +52 -30
  624. package/lib/themes/dark.js +1 -1
  625. package/lib/themes/default.css +52 -30
  626. package/lib/utils/smoothSignature.js +1 -1
  627. package/lib/utils/vectorComputed.d.ts +20 -0
  628. package/lib/utils/vectorComputed.js +84 -0
  629. package/lib/withRemoteConfig.js +1 -1
  630. package/lib/withStore.js +1 -1
  631. package/package.json +3 -3
  632. package/scss/_mixins.scss +7 -6
  633. package/scss/_properties.scss +1 -0
  634. package/scss/components/_button.scss +1 -0
  635. package/scss/components/_crud.scss +5 -0
  636. package/scss/components/_shape.scss +19 -0
  637. package/scss/components/form/_picker.scss +14 -9
  638. package/scss/components/form/_user-select.scss +1 -1
  639. package/scss/themes/_common.scss +1 -0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @file Shape.tsx 图形组件
3
+ *
4
+ * @author allenve(yupeng12@baidu.com)
5
+ * @created: 2024/12/12
6
+ */
7
+ /// <reference types="hoist-non-react-statics" />
8
+ import React from 'react';
9
+ import { ThemeProps } from 'amis-core';
10
+ export type IShapeType = 'square' | 'triangle' | 'right-triangle' | 'rectangle' | 'convex-arc-rectangle' | 'concave-arc-rectangle' | 'double-convex-arc-rectangle' | 'double-concave-arc-rectangle' | 'barrel-rectangle' | 'rhombus' | 'parallelogram' | 'rectangle-1' | 'rectangle-2' | 'rectangle-3' | 'pentagon' | 'hexagon' | 'octagon' | 'hexagon-star' | 'star' | 'heart' | 'circle' | 'arrow' | 'leaf';
11
+ export type IShapeCustomType = 'custom';
12
+ export type ISHapeStrokeType = 'line' | 'dash' | 'dot';
13
+ export interface IShapeProps extends ThemeProps {
14
+ shapeType: IShapeType | IShapeCustomType;
15
+ radius: number;
16
+ width?: number;
17
+ height?: number;
18
+ color?: string;
19
+ stroke?: string;
20
+ strokeWidth?: number;
21
+ strokeType?: 'line' | 'dash' | 'dot';
22
+ paths?: string[];
23
+ onClick?: (event: React.MouseEvent) => void;
24
+ }
25
+ declare const _default: {
26
+ new (props: Omit<IShapeProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps): {
27
+ ref: any;
28
+ childRef(ref: any): void;
29
+ getWrappedInstance(): any;
30
+ render(): React.JSX.Element;
31
+ context: unknown;
32
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<Omit<IShapeProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
33
+ forceUpdate(callback?: (() => void) | undefined): void;
34
+ readonly props: Readonly<Omit<IShapeProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>;
35
+ state: Readonly<{}>;
36
+ refs: {
37
+ [key: string]: React.ReactInstance;
38
+ };
39
+ componentDidMount?(): void;
40
+ shouldComponentUpdate?(nextProps: Readonly<Omit<IShapeProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): boolean;
41
+ componentWillUnmount?(): void;
42
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
43
+ getSnapshotBeforeUpdate?(prevProps: Readonly<Omit<IShapeProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>): any;
44
+ componentDidUpdate?(prevProps: Readonly<Omit<IShapeProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, prevState: Readonly<{}>, snapshot?: any): void;
45
+ componentWillMount?(): void;
46
+ UNSAFE_componentWillMount?(): void;
47
+ componentWillReceiveProps?(nextProps: Readonly<Omit<IShapeProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
48
+ UNSAFE_componentWillReceiveProps?(nextProps: Readonly<Omit<IShapeProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextContext: any): void;
49
+ componentWillUpdate?(nextProps: Readonly<Omit<IShapeProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
50
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<Omit<IShapeProps, keyof ThemeProps> & import("packages/amis-core/lib/theme").ThemeOuterProps>, nextState: Readonly<{}>, nextContext: any): void;
51
+ };
52
+ displayName: string;
53
+ contextType: React.Context<string>;
54
+ ComposedComponent: React.ComponentType<React.FC<IShapeProps>>;
55
+ } & import("hoist-non-react-statics").NonReactStatics<React.FC<IShapeProps>, {}> & {
56
+ ComposedComponent: React.FC<IShapeProps>;
57
+ };
58
+ export default _default;
@@ -0,0 +1,429 @@
1
+ /**
2
+ * amis-ui v6.11.0-beta.3
3
+ * Copyright 2018-2024 fex
4
+ */
5
+
6
+ import { __assign, __read } from 'tslib';
7
+ import React__default from 'react';
8
+ import { themeable } from 'amis-core';
9
+ import { radiusStartEndPoint } from '../utils/vectorComputed.js';
10
+
11
+ /**
12
+ * @file Shape.tsx 图形组件
13
+ *
14
+ * @author allenve(yupeng12@baidu.com)
15
+ * @created: 2024/12/12
16
+ */
17
+ var SvgPathGenerator = /** @class */ (function () {
18
+ function SvgPathGenerator(size) {
19
+ this.size = size;
20
+ }
21
+ SvgPathGenerator.getPath = function (type, props) {
22
+ var radius = props.radius, paths = props.paths;
23
+ var generator = new SvgPathGenerator(200);
24
+ if (type === 'custom') {
25
+ return this.getCustomPath(paths);
26
+ }
27
+ var genFun = generator.getGenerage(type);
28
+ if (!genFun) {
29
+ return [];
30
+ }
31
+ return genFun(radius * 10);
32
+ };
33
+ SvgPathGenerator.getStrokeProps = function (stroke, strokeWidth, strokeType) {
34
+ if (strokeType === 'line') {
35
+ return {
36
+ stroke: stroke,
37
+ strokeWidth: strokeWidth
38
+ };
39
+ }
40
+ else if (strokeType === 'dash') {
41
+ return {
42
+ stroke: stroke,
43
+ strokeWidth: strokeWidth,
44
+ strokeDasharray: "".concat(strokeWidth * 2, ",").concat(strokeWidth)
45
+ };
46
+ }
47
+ else if (strokeType === 'dot') {
48
+ return {
49
+ stroke: stroke,
50
+ strokeWidth: strokeWidth,
51
+ strokeDasharray: "1,".concat(strokeWidth * 2),
52
+ strokeLinecap: 'round',
53
+ strokeLinejoin: 'miter'
54
+ };
55
+ }
56
+ };
57
+ SvgPathGenerator.prototype.toRadians = function (degrees) {
58
+ return degrees * (Math.PI / 180);
59
+ };
60
+ SvgPathGenerator.prototype.getGenerage = function (type) {
61
+ var ShapeConfig = {
62
+ 'square': this.getSquarePath.bind(this),
63
+ 'triangle': this.getTrianglePath.bind(this),
64
+ 'right-triangle': this.getRightTrianglePath.bind(this),
65
+ 'rectangle': this.getRectanglePath.bind(this),
66
+ 'convex-arc-rectangle': this.getConvexArcRectangle.bind(this),
67
+ 'concave-arc-rectangle': this.getConcaveArcRectangle.bind(this),
68
+ 'double-convex-arc-rectangle': this.getDConvexArcRectangle.bind(this),
69
+ 'double-concave-arc-rectangle': this.getDConcaveArcRectangle.bind(this),
70
+ 'barrel-rectangle': this.getBarrelRectangle.bind(this),
71
+ 'rhombus': this.getRhombusPath.bind(this),
72
+ 'parallelogram': this.getParallelogramPath.bind(this),
73
+ 'rectangle-1': this.getRectangleType1Path.bind(this),
74
+ 'rectangle-2': this.getRectangleType2Path.bind(this),
75
+ 'rectangle-3': this.getRectangleType3Path.bind(this),
76
+ 'pentagon': this.getPentagon.bind(this),
77
+ 'hexagon': this.getHexagon.bind(this),
78
+ 'octagon': this.getOctagonPath.bind(this),
79
+ 'hexagon-star': this.getHexagonStar.bind(this),
80
+ 'star': this.getStar.bind(this),
81
+ 'heart': this.getHeart.bind(this),
82
+ 'circle': this.getCirclePath.bind(this),
83
+ 'arrow': this.getArrowPath.bind(this),
84
+ 'leaf': this.getLeafPath.bind(this)
85
+ };
86
+ return ShapeConfig[type];
87
+ };
88
+ SvgPathGenerator.prototype.radiusPath = function (radius, _a, _b, _c) {
89
+ var _d = __read(_a, 2), endX1 = _d[0], endY1 = _d[1];
90
+ var _e = __read(_b, 2), startX = _e[0], startY = _e[1];
91
+ var _f = __read(_c, 2), endX2 = _f[0], endY2 = _f[1];
92
+ var flag = true;
93
+ if (radius < 0) {
94
+ radius = radius * -1;
95
+ // 圆角向内
96
+ flag = false;
97
+ }
98
+ var _g = radiusStartEndPoint([startX, startY, endX1, endY1], [startX, startY, endX2, endY2], radius), start = _g.start, end = _g.end, mxRadius = _g.radius, sweepFlag = _g.sweepFlag;
99
+ return [
100
+ "".concat(start[0], ",").concat(start[1]),
101
+ "".concat(mxRadius, " ").concat(mxRadius, " ").concat(0, " ").concat(0, " ").concat(flag ? sweepFlag : sweepFlag ^ 1, "\n ").concat(end[0], ",").concat(end[1])
102
+ ];
103
+ };
104
+ /**
105
+ * 将 SVG 路径的每个角添加圆角
106
+ *
107
+ * @param {string[]} path
108
+ * @param {number} radius
109
+ * @returns
110
+ * @memberof SvgPathGenerator
111
+ */
112
+ SvgPathGenerator.prototype.addRoundCornersToPath = function (points, radius) {
113
+ var newPath = [];
114
+ for (var i = 0; i < points.length; i++) {
115
+ var nextItem = points[i + 1] || points[0];
116
+ var preItem = points[i - 1] || points[points.length - 1];
117
+ var _a = __read(points[i], 2), startX = _a[0], startY = _a[1];
118
+ var _b = __read(nextItem, 2), endX1 = _b[0], endY1 = _b[1];
119
+ var _c = __read(preItem, 2), endX2 = _c[0], endY2 = _c[1];
120
+ if (!radius) {
121
+ newPath.push("".concat(i === 0 ? 'M' : 'L').concat(startX, ",").concat(startY));
122
+ continue;
123
+ }
124
+ var _d = __read(this.radiusPath(radius, [endX2, endY2], [startX, startY], [endX1, endY1]), 2), start = _d[0], A = _d[1];
125
+ newPath.push("".concat(i === 0 ? 'M' : 'L').concat(start), "A".concat(A));
126
+ }
127
+ newPath.push('Z');
128
+ return newPath;
129
+ };
130
+ // 正方形
131
+ SvgPathGenerator.prototype.getSquarePath = function (radius) {
132
+ var S = this.size;
133
+ var ponits1 = [
134
+ [0, 0],
135
+ [S, 0],
136
+ [S, S],
137
+ [0, S]
138
+ ];
139
+ var path1 = this.addRoundCornersToPath(ponits1, radius);
140
+ return [path1];
141
+ };
142
+ // 等边三角形
143
+ SvgPathGenerator.prototype.getTrianglePath = function (radius) {
144
+ var S = this.size;
145
+ var height = Math.sin(this.toRadians(60)) * S;
146
+ // 内切圆为最大圆角,其半径是高度的1/3
147
+ var maxRadius = Math.min(radius, height / 3) || 0;
148
+ // sin30度,所以斜边是R的2倍,斜边减去R就是高度移动的距离
149
+ var dy = (S - height - maxRadius) / 2;
150
+ var points1 = [
151
+ [0, height + dy],
152
+ [S / 2, dy],
153
+ [S, height + dy]
154
+ ];
155
+ var path1 = this.addRoundCornersToPath(points1, radius);
156
+ return [path1];
157
+ };
158
+ // 直角三角形
159
+ SvgPathGenerator.prototype.getRightTrianglePath = function (radius) {
160
+ var points1 = [
161
+ [0, 0],
162
+ [200, 200],
163
+ [0, 200]
164
+ ];
165
+ var path1 = this.addRoundCornersToPath(points1, radius);
166
+ return [path1];
167
+ };
168
+ // 矩形
169
+ SvgPathGenerator.prototype.getRectanglePath = function (radius) {
170
+ var S = this.size;
171
+ var points1 = [
172
+ [0, S / 4],
173
+ [S, S / 4],
174
+ [S, (S / 4) * 3],
175
+ [0, (S / 4) * 3]
176
+ ];
177
+ var path1 = this.addRoundCornersToPath(points1, radius);
178
+ return [path1];
179
+ };
180
+ // 凸弧矩形
181
+ SvgPathGenerator.prototype.getConvexArcRectangle = function (radius) {
182
+ var S = this.size;
183
+ var w = S;
184
+ var h = (S / 3) * 2;
185
+ var x = (S - h) / 2 - radius / 4;
186
+ var path1 = "\n M 0 ".concat(h + x, "\n L 0 ").concat(radius + x, "\n Q ").concat(w / 2, " ").concat(x, " ").concat(w, " ").concat(radius + x, "\n L ").concat(w, " ").concat(h + x, "\n Z\n ");
187
+ return [path1];
188
+ };
189
+ // 凹弧矩形
190
+ SvgPathGenerator.prototype.getConcaveArcRectangle = function (radius) {
191
+ var S = this.size;
192
+ var w = S;
193
+ var h = S / 2;
194
+ var x = (S - h) / 2;
195
+ var path1 = "\n M 0 ".concat(h + x, "\n L 0 ").concat(x, "\n Q ").concat(w / 2, " ").concat(radius + x, " ").concat(w, " ").concat(x, "\n L ").concat(w, " ").concat(h + x, "\n Z\n ");
196
+ return [path1];
197
+ };
198
+ // 双凸弧矩形
199
+ SvgPathGenerator.prototype.getDConvexArcRectangle = function (radius) {
200
+ var S = this.size;
201
+ var dx = radius;
202
+ var path1 = "\n M 0 ".concat(S / 4, "\n Q ").concat(S / 2, " ").concat(S / 4 - dx, " ").concat(S, " ").concat(S / 4, "\n L ").concat(S, " ").concat((S / 4) * 3, "\n Q ").concat(S / 2, " ").concat((S / 4) * 3 + dx, " 0 ").concat((S / 4) * 3, "\n Z\n ");
203
+ return [path1];
204
+ };
205
+ // 双凹弧矩形
206
+ SvgPathGenerator.prototype.getDConcaveArcRectangle = function (radius) {
207
+ var S = this.size;
208
+ var dx = radius;
209
+ var path1 = "\n M 0 ".concat(S / 4, "\n Q ").concat(S / 2, " ").concat(S / 4 + dx, " ").concat(S, " ").concat(S / 4, "\n L ").concat(S, " ").concat((S / 4) * 3, "\n Q ").concat(S / 2, " ").concat((S / 4) * 3 - dx, " 0 ").concat((S / 4) * 3, "\n Z\n ");
210
+ return [path1];
211
+ };
212
+ // 桶形矩形
213
+ SvgPathGenerator.prototype.getBarrelRectangle = function (radius) {
214
+ var S = this.size;
215
+ var R = radius;
216
+ var dx = R / 4;
217
+ var path1 = "\n M 0 ".concat(S / 4 - dx, "\n Q ").concat(S / 2, " ").concat(S / 4 + R - dx, " ").concat(S, " ").concat(S / 4 - dx, "\n L ").concat(S, " ").concat((S / 4) * 3 - dx, "\n Q ").concat(S / 2, " ").concat((S / 4) * 3 + R - dx, " 0 ").concat((S / 4) * 3 - dx, "\n Z\n ");
218
+ return [path1];
219
+ };
220
+ // 菱形
221
+ SvgPathGenerator.prototype.getRhombusPath = function (radius) {
222
+ var ponits1 = [
223
+ [100, 0],
224
+ [200, 100],
225
+ [100, 200],
226
+ [0, 100]
227
+ ];
228
+ var path1 = this.addRoundCornersToPath(ponits1, radius);
229
+ return [path1];
230
+ };
231
+ // 平行四边形
232
+ SvgPathGenerator.prototype.getParallelogramPath = function (radius) {
233
+ var points1 = [
234
+ [50, 0],
235
+ [200, 0],
236
+ [150, 200],
237
+ [0, 200]
238
+ ];
239
+ var path1 = this.addRoundCornersToPath(points1, radius);
240
+ return [path1];
241
+ };
242
+ // 矩形-类型1
243
+ SvgPathGenerator.prototype.getRectangleType1Path = function () {
244
+ var S = this.size;
245
+ var x = 20;
246
+ var points = [
247
+ [x, 0],
248
+ [S - x, 0],
249
+ [S - x, x],
250
+ [S, x],
251
+ [S, S - x],
252
+ [S - x, S - x],
253
+ [S - x, S],
254
+ [x, S],
255
+ [x, S - x],
256
+ [0, S - x],
257
+ [0, x],
258
+ [x, x]
259
+ ];
260
+ var path = this.addRoundCornersToPath(points, 0);
261
+ return [path];
262
+ };
263
+ // 矩形-类型2
264
+ SvgPathGenerator.prototype.getRectangleType2Path = function (radius) {
265
+ var S = this.size;
266
+ var dx = 35;
267
+ var points = [
268
+ [0, 0],
269
+ [S - dx, 0],
270
+ [S, S / 2],
271
+ [S - dx, S],
272
+ [0, S],
273
+ [dx, S / 2]
274
+ ];
275
+ var path = this.addRoundCornersToPath(points, radius);
276
+ return [path];
277
+ };
278
+ // 矩形-类型3
279
+ SvgPathGenerator.prototype.getRectangleType3Path = function (radius) {
280
+ var S = this.size;
281
+ var dx = 35;
282
+ var points = [
283
+ [0, 0],
284
+ [S - dx, 0],
285
+ [S, S / 2],
286
+ [S - dx, S],
287
+ [0, S]
288
+ ];
289
+ var path = this.addRoundCornersToPath(points, radius);
290
+ return [path];
291
+ };
292
+ // 星形
293
+ SvgPathGenerator.prototype.getStar = function (radius) {
294
+ var points = [
295
+ [100, 11.1297757],
296
+ [129.05723, 70.0061542],
297
+ [194.031171, 79.4474205],
298
+ [147.015586, 125.27629],
299
+ [158.11446, 189.987692],
300
+ [100, 159.435112],
301
+ [41.8855403, 189.987692],
302
+ [52.9844145, 125.27629],
303
+ [5.96882894, 79.4474205],
304
+ [70.9427701, 70.0061542]
305
+ ];
306
+ var path = this.addRoundCornersToPath(points, radius);
307
+ return [path];
308
+ };
309
+ // 心形
310
+ SvgPathGenerator.prototype.getHeart = function () {
311
+ var path = "\n M143.526375,12\n C132.21418,12 124.346417,16.1423074 111.598905,27.0093876\n C111.007635,27.5125184 107.668026,30.3835001 106.701139,31.2037806\n C103.410893,33.9868624 98.5891073,33.9868624 95.2988609,31.2037806\n C94.331974,30.3807731 90.9923649,27.5125184 90.4010952,27.0093876\n C77.653583,16.1423074 69.78582,12 58.4736246,12\n C24.0713382,12 2,39.4823959 2,79.1438299\n C2,109.386491 32.9900653,146.921686 95.9859458,190.440184\n C99.0044944,192.519939 102.995506,192.519939 106.014054,190.440184\n C169.009935,146.924413 200,109.386491 200,79.1438299\n C200,39.4823959 177.928662,12 143.526375,12\n Z";
312
+ return [path];
313
+ };
314
+ // 五边形
315
+ SvgPathGenerator.prototype.getPentagon = function (radius) {
316
+ var S = this.size;
317
+ var a = S / (Math.tan(this.toRadians(54)) * 2);
318
+ var b = S / 2;
319
+ var c = Math.sqrt(a * a + b * b);
320
+ var x1 = Math.sin(this.toRadians(18)) * c;
321
+ var x2 = Math.cos(this.toRadians(18)) * c;
322
+ var dx = (S - (a + x2)) / 2;
323
+ var points1 = [
324
+ [S, a + dx],
325
+ [S - x1, a + x2 + dx],
326
+ [x1, a + x2 + dx],
327
+ [0, a + dx],
328
+ [b, dx]
329
+ ];
330
+ var path1 = this.addRoundCornersToPath(points1, radius);
331
+ return [path1];
332
+ };
333
+ // 六边形
334
+ SvgPathGenerator.prototype.getHexagon = function (radius) {
335
+ var points1 = [
336
+ [100, 0.577350269],
337
+ [186.10254, 50.2886751],
338
+ [186.10254, 149.711325],
339
+ [100, 199.42265],
340
+ [13.8974596, 149.711325],
341
+ [13.8974596, 50.2886751]
342
+ ];
343
+ var path1 = this.addRoundCornersToPath(points1, radius);
344
+ return [path1];
345
+ };
346
+ // 正八边形
347
+ SvgPathGenerator.prototype.getOctagonPath = function (radius) {
348
+ var S = this.size;
349
+ var x = S / (2 + Math.sqrt(2));
350
+ var points1 = [
351
+ [x, 0],
352
+ [S - x, 0],
353
+ [S, x],
354
+ [S, S - x],
355
+ [S - x, S],
356
+ [x, S],
357
+ [0, S - x],
358
+ [0, x]
359
+ ];
360
+ var path1 = this.addRoundCornersToPath(points1, radius);
361
+ return [path1];
362
+ };
363
+ // 六角星
364
+ SvgPathGenerator.prototype.getHexagonStar = function (radius) {
365
+ var points1 = [
366
+ [149.380343, 14.4707367],
367
+ [142.764632, 75.3098284],
368
+ [198.760686, 100],
369
+ [142.764632, 124.690172],
370
+ [149.380343, 185.529263],
371
+ [100, 149.380343],
372
+ [50.6196568, 185.529263],
373
+ [57.2353684, 124.690172],
374
+ [1.23931367, 100],
375
+ [57.2353684, 75.3098284],
376
+ [50.6196568, 14.4707367],
377
+ [100, 50.6196568]
378
+ ];
379
+ var path1 = this.addRoundCornersToPath(points1, radius);
380
+ return [path1];
381
+ };
382
+ // 圆
383
+ SvgPathGenerator.prototype.getCirclePath = function () {
384
+ var path = "\n M 100 0\n A 100 100 0 0 1 100 200\n A 100 100 0 0 1 100 0\n Z\n ";
385
+ return [path];
386
+ };
387
+ // 箭头
388
+ SvgPathGenerator.prototype.getArrowPath = function (radius) {
389
+ var points = [
390
+ [0, 75],
391
+ [110, 75],
392
+ [110, 30],
393
+ [200, 100],
394
+ [110, 170],
395
+ [110, 125],
396
+ [0, 125]
397
+ ];
398
+ return [this.addRoundCornersToPath(points, radius)];
399
+ };
400
+ // 树叶形状
401
+ SvgPathGenerator.prototype.getLeafPath = function () {
402
+ var path = "\n M 0 140\n Q 0 60 80 60\n L 200 60\n Q 200 140 120 140\n Z\n ";
403
+ return [path];
404
+ };
405
+ SvgPathGenerator.getCustomPath = function (paths) {
406
+ return paths || [];
407
+ };
408
+ return SvgPathGenerator;
409
+ }());
410
+ var Shape = function (props) {
411
+ var BASE_SIZE = 200;
412
+ var cx = props.classnames, className = props.className, shapeType = props.shapeType, color = props.color, _a = props.stroke, stroke = _a === void 0 ? 'currentColor' : _a, _b = props.strokeWidth, strokeWidth = _b === void 0 ? 0 : _b, _c = props.strokeType, strokeType = _c === void 0 ? 'line' : _c, _d = props.width, width = _d === void 0 ? BASE_SIZE : _d, _e = props.height, height = _e === void 0 ? BASE_SIZE : _e;
413
+ var paths = SvgPathGenerator.getPath(shapeType, props);
414
+ var strokeProps = SvgPathGenerator.getStrokeProps(stroke, strokeWidth, strokeType);
415
+ var getStyle = React__default.useCallback(function () { return [
416
+ {
417
+ width: width + 'px',
418
+ height: height + 'px'
419
+ },
420
+ {
421
+ transform: "scale(".concat(width / BASE_SIZE, ", ").concat(height / BASE_SIZE, ")")
422
+ }
423
+ ]; }, [width, height]);
424
+ return (React__default.createElement("div", { className: cx('Shape', className), style: getStyle()[0], onClick: props.onClick },
425
+ React__default.createElement("svg", { className: cx('Shape-svg'), width: BASE_SIZE, height: BASE_SIZE, style: getStyle()[1], fill: color ? color : 'currentColor', viewBox: "0 0 ".concat(BASE_SIZE, " ").concat(BASE_SIZE) }, paths.map(function (path, index) { return (React__default.createElement("path", __assign({}, strokeProps, { key: index, d: path }))); }))));
426
+ };
427
+ var Shape$1 = themeable(Shape);
428
+
429
+ export { Shape$1 as default };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -110,6 +110,7 @@ import './InputBoxWithSuggestion.js';
110
110
  import './CodeMirror.js';
111
111
  import './OverflowTpl.js';
112
112
  import './VerificationCode.js';
113
+ import './Shape.js';
113
114
  import 'amis-ui';
114
115
  import 'lodash/debounce';
115
116
  import 'react-overlays';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * amis-ui v6.11.0-beta.1
2
+ * amis-ui v6.11.0-beta.3
3
3
  * Copyright 2018-2024 fex
4
4
  */
5
5