aldehyde 0.2.490 → 0.2.491

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 (689) hide show
  1. package/LICENSE +201 -201
  2. package/README.md +2 -2
  3. package/lib/controls/2dEditor/2dEditor/index.less +5 -5
  4. package/lib/controls/2dEditor/2dView/index.less +8 -8
  5. package/lib/controls/2dEditor/components/component.less +83 -83
  6. package/lib/controls/action/index.css +8 -8
  7. package/lib/controls/action/index.d.ts.map +1 -1
  8. package/lib/controls/chemstruc/graph.d.ts.map +1 -1
  9. package/lib/controls/chemstruc/index.css +28 -28
  10. package/lib/controls/collapse-card/index.css +8 -8
  11. package/lib/controls/collapse-card/index.d.ts.map +1 -1
  12. package/lib/controls/cquery/cquick-button.d.ts.map +1 -1
  13. package/lib/controls/date-picker/index.js +9 -9
  14. package/lib/controls/date-picker/index.js.map +1 -1
  15. package/lib/controls/entity-select/entity-select.d.ts.map +1 -1
  16. package/lib/controls/entity-select/index.css +7 -7
  17. package/lib/controls/entity-select/lab-tree-select.d.ts.map +1 -1
  18. package/lib/controls/entity-select/popover-entity-select.d.ts.map +1 -1
  19. package/lib/controls/file-view/index.less +9 -9
  20. package/lib/controls/html-editor/index.less +67 -67
  21. package/lib/controls/icon-selector/icon/aldehyde-menu-icon/iconfont.css +147 -147
  22. package/lib/controls/icon-selector/icon/phonenode-menu-icon/iconfont.css +63 -63
  23. package/lib/controls/password-setter/index.css +2 -2
  24. package/lib/controls/password-setter/index.d.ts.map +1 -1
  25. package/lib/controls/qr-code/index.less +28 -28
  26. package/lib/controls/relation-existion/index.css +3 -3
  27. package/lib/controls/relation-existion/index.d.ts.map +1 -1
  28. package/lib/controls/rfield/index.css +4 -4
  29. package/lib/controls/rfield/index.d.ts.map +1 -1
  30. package/lib/controls/select/index.d.ts.map +1 -1
  31. package/lib/controls/signature/index.d.ts.map +1 -1
  32. package/lib/controls/text/ellipsis-text.d.ts.map +1 -1
  33. package/lib/controls/text/index.less +7 -7
  34. package/lib/controls/upload/index.d.ts.map +1 -1
  35. package/lib/controls/upload/mult-file-upload.d.ts.map +1 -1
  36. package/lib/custom-page/dtmpl-custom-edit-modal-page.d.ts +4 -0
  37. package/lib/custom-page/dtmpl-custom-edit-modal-page.d.ts.map +1 -1
  38. package/lib/custom-page/dtmpl-custom-edit-modal-page.js +3 -1
  39. package/lib/custom-page/dtmpl-custom-edit-modal-page.js.map +1 -1
  40. package/lib/detail/button/bottom-submit-button-bar.d.ts.map +1 -1
  41. package/lib/detail/button/cquery-button-bar.d.ts.map +1 -1
  42. package/lib/detail/button/fix-right-submit-button-bar.d.ts.map +1 -1
  43. package/lib/detail/button/index.css +42 -42
  44. package/lib/detail/dtmpl.css +72 -72
  45. package/lib/detail/edit/fields-edit-card.d.ts.map +1 -1
  46. package/lib/detail/edit/modal-row-edit.d.ts.map +1 -1
  47. package/lib/detail/edit/popover-edit-card.d.ts.map +1 -1
  48. package/lib/detail/rightbar/index.css +34 -34
  49. package/lib/detail/rightbar/index.d.ts.map +1 -1
  50. package/lib/detail/view/act-dtmpl-view.d.ts.map +1 -1
  51. package/lib/detail/view/field-view-group.d.ts.map +1 -1
  52. package/lib/detail/view/modal-dtmpl-view.d.ts.map +1 -1
  53. package/lib/detail/view/snapshot-timeline.d.ts.map +1 -1
  54. package/lib/detail/view/tab-act-dtmpl-view.d.ts.map +1 -1
  55. package/lib/draw-canvas-edit/components/asset-bar/index.less +35 -35
  56. package/lib/draw-canvas-edit/components/main-header/index.less +23 -23
  57. package/lib/draw-canvas-edit/components/render/components/index.less +60 -60
  58. package/lib/draw-canvas-edit/components/render/components/workstation-component.js +6 -6
  59. package/lib/draw-canvas-edit/index.less +48 -48
  60. package/lib/draw-canvas-view/index.less +66 -66
  61. package/lib/export/export-frame.css +2 -2
  62. package/lib/export/export-frame.d.ts.map +1 -1
  63. package/lib/export/select-code-export-frame.d.ts.map +1 -1
  64. package/lib/form/dtmpl-form.css +3 -3
  65. package/lib/form/dtmpl-form.d.ts.map +1 -1
  66. package/lib/form/field-group-form.d.ts.map +1 -1
  67. package/lib/form/form-Item-group.d.ts.map +1 -1
  68. package/lib/form/index.css +12 -12
  69. package/lib/import/excel-import.d.ts.map +1 -1
  70. package/lib/import/index.css +53 -53
  71. package/lib/import/template.css +50 -50
  72. package/lib/layout/common.css +64 -64
  73. package/lib/layout/coverstyle.css +51 -51
  74. package/lib/layout/footer/index.css +5 -5
  75. package/lib/layout/header/index.css +122 -122
  76. package/lib/layout/menu/block.css +7 -7
  77. package/lib/layout/menu/block.d.ts.map +1 -1
  78. package/lib/layout/menu/l2menu-quick-bar.d.ts.map +1 -1
  79. package/lib/layout/menu/menu-2layers.d.ts.map +1 -1
  80. package/lib/layout/menu/message-bar.less +73 -73
  81. package/lib/layout/menu/reset-password.d.ts.map +1 -1
  82. package/lib/layout/menu/user-bar.d.ts.map +1 -1
  83. package/lib/layout/menu/userinfo-bar.d.ts.map +1 -1
  84. package/lib/layout/sidebar/index.css +57 -57
  85. package/lib/layout2/components/system-messages.js +1 -1
  86. package/lib/layout2/components/system-messages.js.map +1 -1
  87. package/lib/layout2/components/user-notification.js +1 -1
  88. package/lib/layout2/components/user-notification.js.map +1 -1
  89. package/lib/layout2/css/header.css +41 -41
  90. package/lib/layout2/css/sider.less +17 -17
  91. package/lib/layout2/css/tabs-layout.less +18 -18
  92. package/lib/layout3/css/header.less +195 -195
  93. package/lib/layout3/css/main.less +161 -161
  94. package/lib/layout3/css/sider.less +32 -32
  95. package/lib/layout3/css/tabs-layout.less +38 -38
  96. package/lib/layout4/css/header.less +196 -196
  97. package/lib/layout4/css/main.less +154 -154
  98. package/lib/layout4/css/sider.less +37 -37
  99. package/lib/layout4/css/tabs-layout.less +42 -42
  100. package/lib/layout5/css/header.less +35 -35
  101. package/lib/layout5/css/sider.less +18 -18
  102. package/lib/list/calendar/index.less +20 -20
  103. package/lib/list/card-list/index.less +154 -154
  104. package/lib/list/gantt/index.less +8 -8
  105. package/lib/list/vertical-list/index.less +208 -208
  106. package/lib/login/index.css +19 -19
  107. package/lib/login/login.d.ts.map +1 -1
  108. package/lib/login/vertify/index.css +143 -143
  109. package/lib/login3/index.less +136 -136
  110. package/lib/lowcode-components/act-table/index.less +26 -26
  111. package/lib/lowcode-components/base-button/index.less +7 -7
  112. package/lib/lowcode-components/base-map/index.js +6 -6
  113. package/lib/lowcode-components/base-radio/index.less +23 -23
  114. package/lib/lowcode-components/base-table/index.less +61 -61
  115. package/lib/lowcode-components/base-tabs/index.less +14 -14
  116. package/lib/lowcode-components/base-text/index.less +19 -19
  117. package/lib/lowcode-components/border/border10/index.less +26 -26
  118. package/lib/lowcode-components/border/border11/index.js +46 -46
  119. package/lib/lowcode-components/border/border11/index.less +17 -17
  120. package/lib/lowcode-components/border/border12/index.js +13 -13
  121. package/lib/lowcode-components/border/border12/index.less +13 -13
  122. package/lib/lowcode-components/border/border13/index.js +5 -5
  123. package/lib/lowcode-components/border/border13/index.less +13 -13
  124. package/lib/lowcode-components/border/border2/index.less +17 -17
  125. package/lib/lowcode-components/border/border3/index.less +25 -25
  126. package/lib/lowcode-components/border/border4/index.js +2 -2
  127. package/lib/lowcode-components/border/border4/index.less +72 -72
  128. package/lib/lowcode-components/border/border5/index.js +2 -2
  129. package/lib/lowcode-components/border/border5/index.less +35 -35
  130. package/lib/lowcode-components/border/border6/index.less +17 -17
  131. package/lib/lowcode-components/border/border7/index.less +26 -26
  132. package/lib/lowcode-components/border/border8/index.less +13 -13
  133. package/lib/lowcode-components/border/border9/index.js +14 -14
  134. package/lib/lowcode-components/border/border9/index.less +13 -13
  135. package/lib/lowcode-components/column-chart/index.d.ts +1 -0
  136. package/lib/lowcode-components/column-chart/index.d.ts.map +1 -1
  137. package/lib/lowcode-components/column-chart/index.js +49 -7
  138. package/lib/lowcode-components/column-chart/index.js.map +1 -1
  139. package/lib/lowcode-components/data-number/index.less +10 -10
  140. package/lib/lowcode-components/date-time/index.less +4 -4
  141. package/lib/lowcode-components/decoration/decoration1/index.less +7 -7
  142. package/lib/lowcode-components/decoration/decoration10/index.js +3 -3
  143. package/lib/lowcode-components/decoration/decoration10/index.less +5 -5
  144. package/lib/lowcode-components/decoration/decoration11/index.less +5 -5
  145. package/lib/lowcode-components/decoration/decoration2/index.less +6 -6
  146. package/lib/lowcode-components/decoration/decoration3/index.less +7 -7
  147. package/lib/lowcode-components/decoration/decoration4/index.less +29 -29
  148. package/lib/lowcode-components/decoration/decoration5/index.less +3 -3
  149. package/lib/lowcode-components/decoration/decoration6/index.less +7 -7
  150. package/lib/lowcode-components/decoration/decoration7/index.less +4 -4
  151. package/lib/lowcode-components/decoration/decoration8/index.less +14 -14
  152. package/lib/lowcode-components/decoration/decoration9/index.less +4 -4
  153. package/lib/lowcode-components/effectScatter-map/index.js +6 -6
  154. package/lib/lowcode-components/effectScatter-map-3d/index.js +6 -6
  155. package/lib/lowcode-components/four-angle-glow-border/index.less +49 -49
  156. package/lib/lowcode-components/line-bar-chart/index.d.ts +2 -1
  157. package/lib/lowcode-components/line-bar-chart/index.d.ts.map +1 -1
  158. package/lib/lowcode-components/line-bar-chart/index.js +53 -11
  159. package/lib/lowcode-components/line-bar-chart/index.js.map +1 -1
  160. package/lib/lowcode-components/line-chart/index.d.ts +1 -0
  161. package/lib/lowcode-components/line-chart/index.d.ts.map +1 -1
  162. package/lib/lowcode-components/line-chart/index.js +52 -10
  163. package/lib/lowcode-components/line-chart/index.js.map +1 -1
  164. package/lib/lowcode-components/lowcode-view/component/font/FontGlobal.css +26 -26
  165. package/lib/lowcode-components/lowcode-view/component/screen-fit/index.less +13 -13
  166. package/lib/lowcode-components/lowcode-view/index.d.ts.map +1 -1
  167. package/lib/lowcode-components/lowcode-view/index.js +3 -1
  168. package/lib/lowcode-components/lowcode-view/index.js.map +1 -1
  169. package/lib/lowcode-components/lowcode-view/index.less +19 -19
  170. package/lib/lowcode-components/search-form/index.less +25 -25
  171. package/lib/lowcode-components/text-scroller/index.less +28 -28
  172. package/lib/module/dtmpl-edit-card.d.ts +2 -0
  173. package/lib/module/dtmpl-edit-card.d.ts.map +1 -1
  174. package/lib/module/dtmpl-edit-card.js +15 -12
  175. package/lib/module/dtmpl-edit-card.js.map +1 -1
  176. package/lib/module/dtmpl-edit-drawer.d.ts +1 -0
  177. package/lib/module/dtmpl-edit-drawer.d.ts.map +1 -1
  178. package/lib/module/dtmpl-edit-drawer.js.map +1 -1
  179. package/lib/module/dtmpl-edit-modal.d.ts +1 -0
  180. package/lib/module/dtmpl-edit-modal.d.ts.map +1 -1
  181. package/lib/module/dtmpl-edit-modal.js.map +1 -1
  182. package/lib/module/dtmpl-edit-page.d.ts +2 -0
  183. package/lib/module/dtmpl-edit-page.d.ts.map +1 -1
  184. package/lib/module/dtmpl-edit-page.js +16 -12
  185. package/lib/module/dtmpl-edit-page.js.map +1 -1
  186. package/lib/module/index.less +4 -4
  187. package/lib/module/ltmpl-modal.d.ts.map +1 -1
  188. package/lib/module/ltmpl-table.d.ts +4 -0
  189. package/lib/module/ltmpl-table.d.ts.map +1 -1
  190. package/lib/module/ltmpl-table.js +10 -6
  191. package/lib/module/ltmpl-table.js.map +1 -1
  192. package/lib/routable/index.less +25 -25
  193. package/lib/routable/ltmpl-route.d.ts +1 -0
  194. package/lib/routable/ltmpl-route.d.ts.map +1 -1
  195. package/lib/routable/ltmpl-route.js +5 -3
  196. package/lib/routable/ltmpl-route.js.map +1 -1
  197. package/lib/routable/splitview-ltmpl-route.d.ts.map +1 -1
  198. package/lib/routable/splitview-ltmpl-route.js +4 -2
  199. package/lib/routable/splitview-ltmpl-route.js.map +1 -1
  200. package/lib/table/act-table.d.ts +3 -1
  201. package/lib/table/act-table.d.ts.map +1 -1
  202. package/lib/table/act-table.js +8 -7
  203. package/lib/table/act-table.js.map +1 -1
  204. package/lib/table/column/column-builder.d.ts.map +1 -1
  205. package/lib/table/column/column-builder.js +15 -6
  206. package/lib/table/column/column-builder.js.map +1 -1
  207. package/lib/table/column/index.less +85 -85
  208. package/lib/table/index.css +211 -211
  209. package/lib/table/modal-select-table.d.ts.map +1 -1
  210. package/lib/table/page-chart.less +9 -9
  211. package/lib/table/pagination.css +14 -14
  212. package/lib/table/pagination.d.ts.map +1 -1
  213. package/lib/table/relation-table.d.ts.map +1 -1
  214. package/lib/table/selected-rows-card.d.ts.map +1 -1
  215. package/lib/table/stat/restat.d.ts.map +1 -1
  216. package/lib/tmpl/interface.d.ts +4 -1
  217. package/lib/tmpl/interface.d.ts.map +1 -1
  218. package/lib/tmpl/interface.js.map +1 -1
  219. package/lib/tree/act-tree.d.ts.map +1 -1
  220. package/lib/tree/block-menu-auth-tree.d.ts.map +1 -1
  221. package/lib/tree/index.css +22 -22
  222. package/lib/tree/tmpl-tree.d.ts.map +1 -1
  223. package/lib/welcome/components/menu-card.less +96 -96
  224. package/lib/welcome/components/page-card.less +49 -49
  225. package/lib/welcome/components/quick-entrance.less +120 -120
  226. package/lib/welcome/components/user-menus.less +192 -192
  227. package/lib/welcome/components/workbench.less +118 -118
  228. package/lib/welcome/index.css +13 -13
  229. package/package.json +224 -224
  230. package/src/aldehyde/controls/2dEditor/2dEditor/index.less +5 -5
  231. package/src/aldehyde/controls/2dEditor/2dEditor/index.tsx +270 -270
  232. package/src/aldehyde/controls/2dEditor/2dView/index.less +8 -8
  233. package/src/aldehyde/controls/2dEditor/2dView/index.tsx +110 -110
  234. package/src/aldehyde/controls/2dEditor/components/card.tsx +256 -256
  235. package/src/aldehyde/controls/2dEditor/components/component.less +83 -83
  236. package/src/aldehyde/controls/2dEditor/components/data.d.ts +32 -32
  237. package/src/aldehyde/controls/2dEditor/components/hotspot.tsx +80 -80
  238. package/src/aldehyde/controls/2dEditor/components/html-box.tsx +101 -101
  239. package/src/aldehyde/controls/2dEditor/components/image.tsx +99 -99
  240. package/src/aldehyde/controls/2dEditor/components/line.tsx +73 -73
  241. package/src/aldehyde/controls/action/index.css +8 -8
  242. package/src/aldehyde/controls/action/index.tsx +406 -406
  243. package/src/aldehyde/controls/action/utils.tsx +306 -306
  244. package/src/aldehyde/controls/auto-complete/index.tsx +82 -82
  245. package/src/aldehyde/controls/cascader/index.tsx +112 -112
  246. package/src/aldehyde/controls/chemstruc/graph.tsx +185 -185
  247. package/src/aldehyde/controls/chemstruc/index.css +28 -28
  248. package/src/aldehyde/controls/code-editor/sql-code-editor.tsx +73 -73
  249. package/src/aldehyde/controls/collapse-card/index.css +8 -8
  250. package/src/aldehyde/controls/collapse-card/index.tsx +109 -109
  251. package/src/aldehyde/controls/color-picker/index.tsx +21 -21
  252. package/src/aldehyde/controls/counting-tag/index.tsx +53 -53
  253. package/src/aldehyde/controls/cquery/cquick-button.tsx +145 -145
  254. package/src/aldehyde/controls/date-picker/index.tsx +199 -199
  255. package/src/aldehyde/controls/direct-file-view/drawer-file-view.tsx +54 -54
  256. package/src/aldehyde/controls/direct-file-view/index.tsx +147 -147
  257. package/src/aldehyde/controls/direct-upload/index.tsx +140 -140
  258. package/src/aldehyde/controls/entity-select/entity-select.tsx +791 -791
  259. package/src/aldehyde/controls/entity-select/index.css +7 -7
  260. package/src/aldehyde/controls/entity-select/lab-tree-select.tsx +154 -154
  261. package/src/aldehyde/controls/entity-select/popover-entity-select.tsx +205 -205
  262. package/src/aldehyde/controls/entry-control.tsx +431 -431
  263. package/src/aldehyde/controls/enum-badge/index.tsx +42 -42
  264. package/src/aldehyde/controls/enum-tag/index.tsx +45 -45
  265. package/src/aldehyde/controls/field-history/index.tsx +81 -81
  266. package/src/aldehyde/controls/file-export/select-code-export.tsx +40 -40
  267. package/src/aldehyde/controls/file-view/drawer-file-view.tsx +117 -117
  268. package/src/aldehyde/controls/file-view/index.less +9 -9
  269. package/src/aldehyde/controls/file-view/index.tsx +148 -148
  270. package/src/aldehyde/controls/file-view/multi-file-view.tsx +39 -39
  271. package/src/aldehyde/controls/file-view/newin-file-view.tsx +40 -40
  272. package/src/aldehyde/controls/html-editor/draft.tsx +136 -136
  273. package/src/aldehyde/controls/html-editor/index.less +67 -67
  274. package/src/aldehyde/controls/icon-selector/app-icon-selector.tsx +68 -68
  275. package/src/aldehyde/controls/icon-selector/icon/aldehyde-menu-icon/iconfont.css +147 -147
  276. package/src/aldehyde/controls/icon-selector/icon/aldehyde-menu-icon/iconfont.json +240 -240
  277. package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.css +63 -63
  278. package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.json +93 -93
  279. package/src/aldehyde/controls/icon-selector/pc-icon-selector.tsx +68 -68
  280. package/src/aldehyde/controls/input-number/index.tsx +148 -148
  281. package/src/aldehyde/controls/input-range/index.tsx +59 -59
  282. package/src/aldehyde/controls/password-setter/index.css +2 -2
  283. package/src/aldehyde/controls/password-setter/index.js +88 -88
  284. package/src/aldehyde/controls/progress/index.tsx +74 -74
  285. package/src/aldehyde/controls/qr-code/index.less +28 -28
  286. package/src/aldehyde/controls/qr-code/index.tsx +40 -40
  287. package/src/aldehyde/controls/relation-existion/index.css +3 -3
  288. package/src/aldehyde/controls/relation-existion/index.tsx +144 -144
  289. package/src/aldehyde/controls/rfield/index.css +4 -4
  290. package/src/aldehyde/controls/rfield/index.tsx +225 -225
  291. package/src/aldehyde/controls/select/index.tsx +226 -226
  292. package/src/aldehyde/controls/signature/index.tsx +226 -226
  293. package/src/aldehyde/controls/single-checkbox/index.tsx +18 -18
  294. package/src/aldehyde/controls/steps/index.tsx +59 -59
  295. package/src/aldehyde/controls/text/ellipsis-text.tsx +98 -98
  296. package/src/aldehyde/controls/text/index.less +7 -7
  297. package/src/aldehyde/controls/tree-select/navigation-tree.tsx +122 -122
  298. package/src/aldehyde/controls/tree-select/tree-entity-select.tsx +121 -121
  299. package/src/aldehyde/controls/upload/index.tsx +128 -128
  300. package/src/aldehyde/controls/upload/mult-file-upload.tsx +240 -240
  301. package/src/aldehyde/controls/upload-read-excel/index.tsx +43 -43
  302. package/src/aldehyde/controls/view-control.tsx +289 -289
  303. package/src/aldehyde/custom-page/custom-detail-modal-page.tsx +69 -69
  304. package/src/aldehyde/custom-page/custom-page-router.tsx +64 -64
  305. package/src/aldehyde/custom-page/def-custom-page.tsx +17 -17
  306. package/src/aldehyde/custom-page/dtmpl-custom-edit-modal-page.tsx +91 -88
  307. package/src/aldehyde/detail/button/bottom-submit-button-bar.tsx +91 -91
  308. package/src/aldehyde/detail/button/cquery-button-bar.tsx +144 -144
  309. package/src/aldehyde/detail/button/edit-button.tsx +61 -61
  310. package/src/aldehyde/detail/button/fix-right-submit-button-bar.tsx +186 -186
  311. package/src/aldehyde/detail/button/index.css +42 -42
  312. package/src/aldehyde/detail/button/inline-edit-button.tsx +40 -40
  313. package/src/aldehyde/detail/button/submit-button-bar.tsx +57 -57
  314. package/src/aldehyde/detail/button/view-button.tsx +64 -64
  315. package/src/aldehyde/detail/dtmpl.css +72 -72
  316. package/src/aldehyde/detail/edit/dtmpl-edit.tsx +279 -279
  317. package/src/aldehyde/detail/edit/fields-edit-card.tsx +145 -145
  318. package/src/aldehyde/detail/edit/modal-row-edit.tsx +95 -95
  319. package/src/aldehyde/detail/edit/popover-edit-card.tsx +167 -167
  320. package/src/aldehyde/detail/edit/popover-editor.tsx +70 -70
  321. package/src/aldehyde/detail/edit/post-result/index.tsx +86 -86
  322. package/src/aldehyde/detail/rightbar/index.css +34 -34
  323. package/src/aldehyde/detail/rightbar/index.tsx +92 -92
  324. package/src/aldehyde/detail/tooltipbar/index.tsx +32 -32
  325. package/src/aldehyde/detail/view/act-dtmpl-view.tsx +288 -288
  326. package/src/aldehyde/detail/view/dtmpl-view.tsx +334 -334
  327. package/src/aldehyde/detail/view/field-view-group.tsx +88 -88
  328. package/src/aldehyde/detail/view/modal-dtmpl-view.tsx +73 -73
  329. package/src/aldehyde/detail/view/snapshot-timeline.tsx +231 -231
  330. package/src/aldehyde/detail/view/tab-act-dtmpl-view.tsx +304 -304
  331. package/src/aldehyde/detail/view/view-compare-panel.tsx +57 -57
  332. package/src/aldehyde/draw-canvas-edit/components/asset-bar/index.less +35 -35
  333. package/src/aldehyde/draw-canvas-edit/components/asset-bar/index.tsx +110 -110
  334. package/src/aldehyde/draw-canvas-edit/components/main-header/index.less +23 -23
  335. package/src/aldehyde/draw-canvas-edit/components/main-header/index.tsx +263 -263
  336. package/src/aldehyde/draw-canvas-edit/components/render/components/index.less +60 -60
  337. package/src/aldehyde/draw-canvas-edit/components/render/components/index.ts +3 -3
  338. package/src/aldehyde/draw-canvas-edit/components/render/components/workstation-component.tsx +220 -220
  339. package/src/aldehyde/draw-canvas-edit/components/render/draws/bg-draw.ts +177 -177
  340. package/src/aldehyde/draw-canvas-edit/components/render/draws/contextmenu-draw.ts +330 -330
  341. package/src/aldehyde/draw-canvas-edit/components/render/draws/graph-draw.ts +249 -249
  342. package/src/aldehyde/draw-canvas-edit/components/render/draws/index.ts +7 -7
  343. package/src/aldehyde/draw-canvas-edit/components/render/draws/link-draw.ts +1415 -1415
  344. package/src/aldehyde/draw-canvas-edit/components/render/draws/preview-draw.ts +274 -274
  345. package/src/aldehyde/draw-canvas-edit/components/render/draws/ref-line-draw.ts +71 -71
  346. package/src/aldehyde/draw-canvas-edit/components/render/draws/ruler-draw.ts +166 -166
  347. package/src/aldehyde/draw-canvas-edit/components/render/graphs/base-graph.ts +241 -241
  348. package/src/aldehyde/draw-canvas-edit/components/render/graphs/bezier.ts +542 -542
  349. package/src/aldehyde/draw-canvas-edit/components/render/graphs/circle.ts +699 -699
  350. package/src/aldehyde/draw-canvas-edit/components/render/graphs/curve.ts +500 -500
  351. package/src/aldehyde/draw-canvas-edit/components/render/graphs/index.ts +5 -5
  352. package/src/aldehyde/draw-canvas-edit/components/render/graphs/line.ts +493 -493
  353. package/src/aldehyde/draw-canvas-edit/components/render/graphs/rect.ts +680 -680
  354. package/src/aldehyde/draw-canvas-edit/components/render/handlers/drag-handlers.ts +68 -68
  355. package/src/aldehyde/draw-canvas-edit/components/render/handlers/drag-outside-handlers.ts +77 -77
  356. package/src/aldehyde/draw-canvas-edit/components/render/handlers/graph-handlers.ts +113 -113
  357. package/src/aldehyde/draw-canvas-edit/components/render/handlers/index.ts +9 -9
  358. package/src/aldehyde/draw-canvas-edit/components/render/handlers/key-move-handlers.ts +49 -49
  359. package/src/aldehyde/draw-canvas-edit/components/render/handlers/link-handlers.ts +45 -45
  360. package/src/aldehyde/draw-canvas-edit/components/render/handlers/selection-handlers.ts +410 -410
  361. package/src/aldehyde/draw-canvas-edit/components/render/handlers/shutcut-handlers.ts +45 -45
  362. package/src/aldehyde/draw-canvas-edit/components/render/handlers/text-handlers.ts +81 -81
  363. package/src/aldehyde/draw-canvas-edit/components/render/handlers/zoom-handlers.ts +59 -59
  364. package/src/aldehyde/draw-canvas-edit/components/render/index.ts +817 -817
  365. package/src/aldehyde/draw-canvas-edit/components/render/tools/align-tool.ts +89 -89
  366. package/src/aldehyde/draw-canvas-edit/components/render/tools/asset-tool.ts +154 -154
  367. package/src/aldehyde/draw-canvas-edit/components/render/tools/attract-tool.ts +457 -457
  368. package/src/aldehyde/draw-canvas-edit/components/render/tools/component-factory.ts +269 -269
  369. package/src/aldehyde/draw-canvas-edit/components/render/tools/copy-tool.ts +244 -244
  370. package/src/aldehyde/draw-canvas-edit/components/render/tools/import-export-tool.ts +588 -588
  371. package/src/aldehyde/draw-canvas-edit/components/render/tools/index.ts +10 -10
  372. package/src/aldehyde/draw-canvas-edit/components/render/tools/link-tool.ts +222 -222
  373. package/src/aldehyde/draw-canvas-edit/components/render/tools/position-tool.ts +191 -191
  374. package/src/aldehyde/draw-canvas-edit/components/render/tools/selection-tool.ts +140 -140
  375. package/src/aldehyde/draw-canvas-edit/components/render/tools/z-index-tool.ts +224 -224
  376. package/src/aldehyde/draw-canvas-edit/components/render/types.ts +298 -298
  377. package/src/aldehyde/draw-canvas-edit/components/render/utils/a-star.ts +116 -116
  378. package/src/aldehyde/draw-canvas-edit/components/render/utils/bezier-scene-func.ts +72 -72
  379. package/src/aldehyde/draw-canvas-edit/components/setting-form/imag-upload.tsx +119 -119
  380. package/src/aldehyde/draw-canvas-edit/components/setting-form/index.tsx +305 -305
  381. package/src/aldehyde/draw-canvas-edit/constant.ts +5 -5
  382. package/src/aldehyde/draw-canvas-edit/index.less +48 -48
  383. package/src/aldehyde/draw-canvas-edit/index.tsx +213 -213
  384. package/src/aldehyde/draw-canvas-view/index.less +66 -66
  385. package/src/aldehyde/draw-canvas-view/index.tsx +49 -49
  386. package/src/aldehyde/draw-canvas-view/view.tsx +237 -237
  387. package/src/aldehyde/export/export-frame.css +2 -2
  388. package/src/aldehyde/export/export-frame.tsx +301 -301
  389. package/src/aldehyde/export/select-code-export-frame.tsx +212 -212
  390. package/src/aldehyde/form/criteria-form.tsx +604 -604
  391. package/src/aldehyde/form/dtmpl-form.css +3 -3
  392. package/src/aldehyde/form/dtmpl-form.tsx +571 -571
  393. package/src/aldehyde/form/field-group-form.tsx +103 -103
  394. package/src/aldehyde/form/fields-form.tsx +45 -45
  395. package/src/aldehyde/form/form-Item-group.tsx +246 -246
  396. package/src/aldehyde/form/index.css +12 -12
  397. package/src/aldehyde/hooks/use-match-route/index.tsx +62 -62
  398. package/src/aldehyde/hooks/use-tabs/index.tsx +139 -139
  399. package/src/aldehyde/hooks/useVarCssColor.ts +6 -6
  400. package/src/aldehyde/icon/aliIcon.tsx +9 -9
  401. package/src/aldehyde/icon/index.tsx +28 -28
  402. package/src/aldehyde/import/excel-import.tsx +450 -450
  403. package/src/aldehyde/import/index.css +53 -53
  404. package/src/aldehyde/import/template.css +50 -50
  405. package/src/aldehyde/index.tsx +220 -220
  406. package/src/aldehyde/layout/MainPage.tsx +334 -334
  407. package/src/aldehyde/layout/common.css +64 -64
  408. package/src/aldehyde/layout/coverstyle.css +51 -51
  409. package/src/aldehyde/layout/footer/index.css +5 -5
  410. package/src/aldehyde/layout/footer/index.js +17 -17
  411. package/src/aldehyde/layout/header/index.css +122 -122
  412. package/src/aldehyde/layout/header/index.tsx +152 -152
  413. package/src/aldehyde/layout/menu/block.css +7 -7
  414. package/src/aldehyde/layout/menu/block.tsx +174 -174
  415. package/src/aldehyde/layout/menu/l2menu-message-bar.tsx +160 -160
  416. package/src/aldehyde/layout/menu/l2menu-quick-bar.tsx +175 -175
  417. package/src/aldehyde/layout/menu/menu-2layers.tsx +117 -117
  418. package/src/aldehyde/layout/menu/menu-render.tsx +168 -168
  419. package/src/aldehyde/layout/menu/message-bar.less +73 -73
  420. package/src/aldehyde/layout/menu/reset-password.tsx +255 -255
  421. package/src/aldehyde/layout/menu/user-bar.tsx +259 -259
  422. package/src/aldehyde/layout/menu/userinfo-bar.tsx +69 -69
  423. package/src/aldehyde/layout/sidebar/index.css +57 -57
  424. package/src/aldehyde/layout/sidebar/index.tsx +84 -84
  425. package/src/aldehyde/layout2/components/icon-font.tsx +7 -7
  426. package/src/aldehyde/layout2/components/screenfull-button.tsx +21 -21
  427. package/src/aldehyde/layout2/components/search-menu.tsx +85 -85
  428. package/src/aldehyde/layout2/components/system-messages.tsx +75 -75
  429. package/src/aldehyde/layout2/components/theme-button.tsx +65 -65
  430. package/src/aldehyde/layout2/components/user-button.tsx +258 -258
  431. package/src/aldehyde/layout2/components/user-notification.tsx +74 -74
  432. package/src/aldehyde/layout2/css/header.css +41 -41
  433. package/src/aldehyde/layout2/css/sider.less +17 -17
  434. package/src/aldehyde/layout2/css/tabs-layout.less +18 -18
  435. package/src/aldehyde/layout2/header.tsx +278 -278
  436. package/src/aldehyde/layout2/layout-context.tsx +95 -95
  437. package/src/aldehyde/layout2/main.tsx +30 -30
  438. package/src/aldehyde/layout2/page.tsx +315 -315
  439. package/src/aldehyde/layout2/sider.tsx +230 -230
  440. package/src/aldehyde/layout2/tabs/tabs-context.tsx +37 -37
  441. package/src/aldehyde/layout2/tabs/tabs-layout.tsx +146 -146
  442. package/src/aldehyde/layout2/type/layout-type.ts +15 -15
  443. package/src/aldehyde/layout2/util/menu-util.tsx +125 -125
  444. package/src/aldehyde/layout3/components/tabs-layout.tsx +110 -110
  445. package/src/aldehyde/layout3/components/time.tsx +25 -25
  446. package/src/aldehyde/layout3/css/header.less +195 -195
  447. package/src/aldehyde/layout3/css/main.less +161 -161
  448. package/src/aldehyde/layout3/css/sider.less +32 -32
  449. package/src/aldehyde/layout3/css/tabs-layout.less +38 -38
  450. package/src/aldehyde/layout3/header.tsx +187 -187
  451. package/src/aldehyde/layout3/main.tsx +29 -29
  452. package/src/aldehyde/layout3/page.tsx +110 -110
  453. package/src/aldehyde/layout3/sider.tsx +198 -198
  454. package/src/aldehyde/layout4/components/tabs-layout.tsx +110 -110
  455. package/src/aldehyde/layout4/css/header.less +196 -196
  456. package/src/aldehyde/layout4/css/main.less +154 -154
  457. package/src/aldehyde/layout4/css/sider.less +37 -37
  458. package/src/aldehyde/layout4/css/tabs-layout.less +42 -42
  459. package/src/aldehyde/layout4/header.tsx +190 -190
  460. package/src/aldehyde/layout4/imgs/user.svg +26 -26
  461. package/src/aldehyde/layout4/main.tsx +29 -29
  462. package/src/aldehyde/layout4/page.tsx +125 -125
  463. package/src/aldehyde/layout4/sider.tsx +201 -201
  464. package/src/aldehyde/layout5/css/header.less +35 -35
  465. package/src/aldehyde/layout5/css/sider.less +18 -18
  466. package/src/aldehyde/layout5/header.tsx +204 -204
  467. package/src/aldehyde/layout5/page.tsx +107 -107
  468. package/src/aldehyde/layout5/sider.tsx +235 -235
  469. package/src/aldehyde/list/calendar/index.less +20 -20
  470. package/src/aldehyde/list/calendar/index.tsx +157 -157
  471. package/src/aldehyde/list/card-list/card-list-item.tsx +112 -112
  472. package/src/aldehyde/list/card-list/index.less +154 -154
  473. package/src/aldehyde/list/card-list/index.tsx +83 -83
  474. package/src/aldehyde/list/gantt/index.less +8 -8
  475. package/src/aldehyde/list/gantt/index.tsx +508 -508
  476. package/src/aldehyde/list/vertical-list/index.less +208 -208
  477. package/src/aldehyde/list/vertical-list/index.tsx +55 -55
  478. package/src/aldehyde/list/vertical-list/item.tsx +136 -136
  479. package/src/aldehyde/locale/LocaleButton.tsx +48 -48
  480. package/src/aldehyde/locale/LocaleProvider.tsx +265 -265
  481. package/src/aldehyde/locale/langMp.ts +45 -45
  482. package/src/aldehyde/locale/translate.ts +80 -80
  483. package/src/aldehyde/locale/useLocale.ts +72 -72
  484. package/src/aldehyde/login/context-setter.tsx +130 -130
  485. package/src/aldehyde/login/index.css +19 -19
  486. package/src/aldehyde/login/login.tsx +255 -255
  487. package/src/aldehyde/login/router-login.tsx +107 -107
  488. package/src/aldehyde/login/vertify/index.css +143 -143
  489. package/src/aldehyde/login/vertify/index.tsx +360 -360
  490. package/src/aldehyde/login/vertify/tool.ts +13 -13
  491. package/src/aldehyde/login2/login-page.tsx +92 -92
  492. package/src/aldehyde/login2/login.tsx +227 -227
  493. package/src/aldehyde/login3/index.less +136 -136
  494. package/src/aldehyde/login3/login-page.tsx +71 -71
  495. package/src/aldehyde/lowcode-components/act-table/index.less +26 -26
  496. package/src/aldehyde/lowcode-components/act-table/index.tsx +139 -139
  497. package/src/aldehyde/lowcode-components/assets/lowcode-constant.tsx +12 -12
  498. package/src/aldehyde/lowcode-components/bar-chart/index.tsx +272 -272
  499. package/src/aldehyde/lowcode-components/base-button/index.less +7 -7
  500. package/src/aldehyde/lowcode-components/base-button/index.tsx +197 -197
  501. package/src/aldehyde/lowcode-components/base-color-block/index.tsx +31 -31
  502. package/src/aldehyde/lowcode-components/base-image/index.tsx +220 -220
  503. package/src/aldehyde/lowcode-components/base-map/index.tsx +292 -292
  504. package/src/aldehyde/lowcode-components/base-radio/index.less +23 -23
  505. package/src/aldehyde/lowcode-components/base-radio/index.tsx +157 -157
  506. package/src/aldehyde/lowcode-components/base-table/index.less +61 -61
  507. package/src/aldehyde/lowcode-components/base-table/index.tsx +268 -268
  508. package/src/aldehyde/lowcode-components/base-tabs/index.less +14 -14
  509. package/src/aldehyde/lowcode-components/base-tabs/index.tsx +183 -183
  510. package/src/aldehyde/lowcode-components/base-text/index.less +19 -19
  511. package/src/aldehyde/lowcode-components/base-text/index.tsx +58 -58
  512. package/src/aldehyde/lowcode-components/border/border1/index.tsx +70 -70
  513. package/src/aldehyde/lowcode-components/border/border10/index.less +26 -26
  514. package/src/aldehyde/lowcode-components/border/border10/index.tsx +45 -45
  515. package/src/aldehyde/lowcode-components/border/border11/index.less +17 -17
  516. package/src/aldehyde/lowcode-components/border/border11/index.tsx +232 -232
  517. package/src/aldehyde/lowcode-components/border/border12/index.less +13 -13
  518. package/src/aldehyde/lowcode-components/border/border12/index.tsx +115 -115
  519. package/src/aldehyde/lowcode-components/border/border13/index.less +13 -13
  520. package/src/aldehyde/lowcode-components/border/border13/index.tsx +69 -69
  521. package/src/aldehyde/lowcode-components/border/border2/index.less +17 -17
  522. package/src/aldehyde/lowcode-components/border/border2/index.tsx +51 -51
  523. package/src/aldehyde/lowcode-components/border/border3/index.less +25 -25
  524. package/src/aldehyde/lowcode-components/border/border3/index.tsx +61 -61
  525. package/src/aldehyde/lowcode-components/border/border4/index.less +72 -72
  526. package/src/aldehyde/lowcode-components/border/border4/index.tsx +79 -79
  527. package/src/aldehyde/lowcode-components/border/border5/index.less +35 -35
  528. package/src/aldehyde/lowcode-components/border/border5/index.tsx +75 -75
  529. package/src/aldehyde/lowcode-components/border/border6/index.less +17 -17
  530. package/src/aldehyde/lowcode-components/border/border6/index.tsx +60 -60
  531. package/src/aldehyde/lowcode-components/border/border7/index.less +26 -26
  532. package/src/aldehyde/lowcode-components/border/border7/index.tsx +75 -75
  533. package/src/aldehyde/lowcode-components/border/border8/index.less +13 -13
  534. package/src/aldehyde/lowcode-components/border/border8/index.tsx +84 -84
  535. package/src/aldehyde/lowcode-components/border/border9/index.less +13 -13
  536. package/src/aldehyde/lowcode-components/border/border9/index.tsx +154 -154
  537. package/src/aldehyde/lowcode-components/capsule-bar-chart/index.tsx +290 -290
  538. package/src/aldehyde/lowcode-components/carousel/index.tsx +218 -218
  539. package/src/aldehyde/lowcode-components/circular-progress-chart/index.tsx +263 -263
  540. package/src/aldehyde/lowcode-components/column-3d-chart/index.tsx +442 -442
  541. package/src/aldehyde/lowcode-components/column-chart/index.tsx +349 -297
  542. package/src/aldehyde/lowcode-components/data-number/index.less +10 -10
  543. package/src/aldehyde/lowcode-components/data-number/index.tsx +219 -219
  544. package/src/aldehyde/lowcode-components/data.d.ts +19 -19
  545. package/src/aldehyde/lowcode-components/date-time/index.less +4 -4
  546. package/src/aldehyde/lowcode-components/date-time/index.tsx +64 -64
  547. package/src/aldehyde/lowcode-components/decoration/decoration1/index.less +7 -7
  548. package/src/aldehyde/lowcode-components/decoration/decoration1/index.tsx +153 -153
  549. package/src/aldehyde/lowcode-components/decoration/decoration10/index.less +5 -5
  550. package/src/aldehyde/lowcode-components/decoration/decoration10/index.tsx +89 -89
  551. package/src/aldehyde/lowcode-components/decoration/decoration11/index.less +5 -5
  552. package/src/aldehyde/lowcode-components/decoration/decoration11/index.tsx +133 -133
  553. package/src/aldehyde/lowcode-components/decoration/decoration2/index.less +6 -6
  554. package/src/aldehyde/lowcode-components/decoration/decoration2/index.tsx +61 -61
  555. package/src/aldehyde/lowcode-components/decoration/decoration3/index.less +7 -7
  556. package/src/aldehyde/lowcode-components/decoration/decoration3/index.tsx +87 -87
  557. package/src/aldehyde/lowcode-components/decoration/decoration4/index.less +29 -29
  558. package/src/aldehyde/lowcode-components/decoration/decoration4/index.tsx +53 -53
  559. package/src/aldehyde/lowcode-components/decoration/decoration5/index.less +3 -3
  560. package/src/aldehyde/lowcode-components/decoration/decoration5/index.tsx +116 -116
  561. package/src/aldehyde/lowcode-components/decoration/decoration6/index.less +7 -7
  562. package/src/aldehyde/lowcode-components/decoration/decoration6/index.tsx +121 -121
  563. package/src/aldehyde/lowcode-components/decoration/decoration7/index.less +4 -4
  564. package/src/aldehyde/lowcode-components/decoration/decoration7/index.tsx +70 -70
  565. package/src/aldehyde/lowcode-components/decoration/decoration8/index.less +14 -14
  566. package/src/aldehyde/lowcode-components/decoration/decoration8/index.tsx +122 -122
  567. package/src/aldehyde/lowcode-components/decoration/decoration9/index.less +4 -4
  568. package/src/aldehyde/lowcode-components/decoration/decoration9/index.tsx +196 -196
  569. package/src/aldehyde/lowcode-components/effectScatter-map/index.tsx +315 -315
  570. package/src/aldehyde/lowcode-components/effectScatter-map-3d/index.tsx +419 -419
  571. package/src/aldehyde/lowcode-components/four-angle-glow-border/index.less +49 -49
  572. package/src/aldehyde/lowcode-components/four-angle-glow-border/index.tsx +53 -53
  573. package/src/aldehyde/lowcode-components/gauge-chart/index.tsx +254 -254
  574. package/src/aldehyde/lowcode-components/index.ts +130 -130
  575. package/src/aldehyde/lowcode-components/line-bar-chart/index.tsx +356 -304
  576. package/src/aldehyde/lowcode-components/line-chart/index.tsx +346 -294
  577. package/src/aldehyde/lowcode-components/liquid-chart/index.tsx +250 -250
  578. package/src/aldehyde/lowcode-components/lowcode-view/component/abstract-controller.ts +64 -64
  579. package/src/aldehyde/lowcode-components/lowcode-view/component/abstract-definition.ts +77 -77
  580. package/src/aldehyde/lowcode-components/lowcode-view/component/abstract-designer-loader.ts +36 -36
  581. package/src/aldehyde/lowcode-components/lowcode-view/component/assets.ts +478 -478
  582. package/src/aldehyde/lowcode-components/lowcode-view/component/component-container.tsx +91 -91
  583. package/src/aldehyde/lowcode-components/lowcode-view/component/component-controller.ts +153 -153
  584. package/src/aldehyde/lowcode-components/lowcode-view/component/component-definition.ts +23 -23
  585. package/src/aldehyde/lowcode-components/lowcode-view/component/font/FontGlobal.css +26 -26
  586. package/src/aldehyde/lowcode-components/lowcode-view/component/group-layer/controller.ts +36 -36
  587. package/src/aldehyde/lowcode-components/lowcode-view/component/group-layer/definition.ts +53 -53
  588. package/src/aldehyde/lowcode-components/lowcode-view/component/group-layer/index.tsx +15 -15
  589. package/src/aldehyde/lowcode-components/lowcode-view/component/layer-builder.tsx +98 -98
  590. package/src/aldehyde/lowcode-components/lowcode-view/component/loading.tsx +20 -20
  591. package/src/aldehyde/lowcode-components/lowcode-view/component/screen-fit/index.less +13 -13
  592. package/src/aldehyde/lowcode-components/lowcode-view/component/screen-fit/index.tsx +121 -121
  593. package/src/aldehyde/lowcode-components/lowcode-view/component/util.ts +27 -27
  594. package/src/aldehyde/lowcode-components/lowcode-view/index.less +19 -19
  595. package/src/aldehyde/lowcode-components/lowcode-view/index.tsx +279 -277
  596. package/src/aldehyde/lowcode-components/lowcode-view/interface.ts +189 -189
  597. package/src/aldehyde/lowcode-components/pie-chart/index.tsx +353 -353
  598. package/src/aldehyde/lowcode-components/placeholder-component/index.tsx +81 -81
  599. package/src/aldehyde/lowcode-components/progress-chart/index.tsx +295 -295
  600. package/src/aldehyde/lowcode-components/radar-chart/index.tsx +322 -322
  601. package/src/aldehyde/lowcode-components/search-form/index.less +25 -25
  602. package/src/aldehyde/lowcode-components/search-form/index.tsx +121 -121
  603. package/src/aldehyde/lowcode-components/stroke-animation/index.tsx +219 -219
  604. package/src/aldehyde/lowcode-components/text-scroller/index.less +28 -28
  605. package/src/aldehyde/lowcode-components/text-scroller/index.tsx +173 -173
  606. package/src/aldehyde/module/block-menu-tree-drawer.tsx +118 -118
  607. package/src/aldehyde/module/criteria-page.tsx1 +175 -175
  608. package/src/aldehyde/module/draggable-modal.tsx +66 -66
  609. package/src/aldehyde/module/dtmpl-edit-card.tsx +479 -477
  610. package/src/aldehyde/module/dtmpl-edit-drawer.tsx +24 -23
  611. package/src/aldehyde/module/dtmpl-edit-modal.tsx +26 -25
  612. package/src/aldehyde/module/dtmpl-edit-page.tsx +600 -597
  613. package/src/aldehyde/module/dtmpl-editor.tsx +165 -165
  614. package/src/aldehyde/module/dtmpl-view-card.tsx +64 -64
  615. package/src/aldehyde/module/dtmpl-view-drawer.tsx +71 -71
  616. package/src/aldehyde/module/dtmpl-view-modal.tsx +56 -56
  617. package/src/aldehyde/module/embed-dtmpl-edit-page.tsx +137 -137
  618. package/src/aldehyde/module/index.less +4 -4
  619. package/src/aldehyde/module/ltmpl-drawer.tsx +60 -60
  620. package/src/aldehyde/module/ltmpl-modal.tsx +63 -63
  621. package/src/aldehyde/module/ltmpl-table.tsx +388 -379
  622. package/src/aldehyde/module/ttmpl-tree.tsx +47 -47
  623. package/src/aldehyde/routable/dtmpl-route.tsx +173 -173
  624. package/src/aldehyde/routable/import-route.tsx +35 -35
  625. package/src/aldehyde/routable/index.less +25 -25
  626. package/src/aldehyde/routable/ltmpl-route.tsx +544 -539
  627. package/src/aldehyde/routable/splitview-ltmpl-route.tsx +382 -377
  628. package/src/aldehyde/routable/ttmpl-route.tsx +93 -93
  629. package/src/aldehyde/routable/withroute.tsx +36 -36
  630. package/src/aldehyde/sso-Login/index.tsx +73 -73
  631. package/src/aldehyde/sso-Login/service/index.js +16 -16
  632. package/src/aldehyde/sso-Login/service/login.js +75 -75
  633. package/src/aldehyde/table/act-table.tsx +1846 -1844
  634. package/src/aldehyde/table/column/column-builder.tsx +882 -876
  635. package/src/aldehyde/table/column/column-selector.tsx +130 -130
  636. package/src/aldehyde/table/column/index.less +85 -85
  637. package/src/aldehyde/table/column/summary-builder.tsx +712 -712
  638. package/src/aldehyde/table/column/theme-color-getter.tsx +25 -25
  639. package/src/aldehyde/table/control-table-x-axis-wrapper.tsx +80 -80
  640. package/src/aldehyde/table/index.css +211 -211
  641. package/src/aldehyde/table/l2-act-table.tsx +91 -91
  642. package/src/aldehyde/table/modal-select-table.tsx +308 -308
  643. package/src/aldehyde/table/page-chart.less +9 -9
  644. package/src/aldehyde/table/page-chart.tsx +196 -196
  645. package/src/aldehyde/table/page-config-button.tsx +203 -203
  646. package/src/aldehyde/table/pagination.css +14 -14
  647. package/src/aldehyde/table/pagination.tsx +81 -81
  648. package/src/aldehyde/table/query-table.tsx +668 -668
  649. package/src/aldehyde/table/relation-table.tsx +1078 -1078
  650. package/src/aldehyde/table/report-table.tsx +125 -125
  651. package/src/aldehyde/table/resizable-table.tsx +97 -97
  652. package/src/aldehyde/table/row-table.tsx +22 -22
  653. package/src/aldehyde/table/select-table.tsx +559 -559
  654. package/src/aldehyde/table/selected-rows-card.tsx +78 -78
  655. package/src/aldehyde/table/stat/restat.tsx +122 -122
  656. package/src/aldehyde/table/table-util.tsx +25 -25
  657. package/src/aldehyde/tmpl/control-type-supportor.tsx +154 -154
  658. package/src/aldehyde/tmpl/hc-data-source.tsx +574 -574
  659. package/src/aldehyde/tmpl/hcservice-v3.tsx +1590 -1590
  660. package/src/aldehyde/tmpl/interface.tsx +939 -936
  661. package/src/aldehyde/tmpl/model-struc-v3.tsx +111 -111
  662. package/src/aldehyde/tmpl/superagent.js +146 -146
  663. package/src/aldehyde/tmpl/tmpl-config-analysis.tsx +585 -585
  664. package/src/aldehyde/tmpl/web-socket.ts +366 -366
  665. package/src/aldehyde/tree/act-tree.tsx +217 -217
  666. package/src/aldehyde/tree/block-menu-auth-tree.tsx +189 -189
  667. package/src/aldehyde/tree/index.css +22 -22
  668. package/src/aldehyde/tree/navigation-tree.tsx +39 -39
  669. package/src/aldehyde/tree/tmpl-tree.tsx +751 -751
  670. package/src/aldehyde/tree/tree-node.tsx +73 -73
  671. package/src/aldehyde/tree/tree-utils.tsx +317 -317
  672. package/src/aldehyde/units/EncryptUtils.js +37 -37
  673. package/src/aldehyde/units/image.d.ts +7 -7
  674. package/src/aldehyde/units/index.tsx +1367 -1367
  675. package/src/aldehyde/units/storage.js +2 -2
  676. package/src/aldehyde/utils/dsu.ts +27 -27
  677. package/src/aldehyde/welcome/HCWelcome.js +404 -404
  678. package/src/aldehyde/welcome/HCWelcome1.js +259 -259
  679. package/src/aldehyde/welcome/components/menu-card.less +96 -96
  680. package/src/aldehyde/welcome/components/menu-card.tsx +70 -70
  681. package/src/aldehyde/welcome/components/page-card.less +49 -49
  682. package/src/aldehyde/welcome/components/page-card.tsx +97 -97
  683. package/src/aldehyde/welcome/components/quick-entrance.less +120 -120
  684. package/src/aldehyde/welcome/components/quick-entrance.tsx +80 -80
  685. package/src/aldehyde/welcome/components/user-menus.less +192 -192
  686. package/src/aldehyde/welcome/components/user-menus.tsx +279 -279
  687. package/src/aldehyde/welcome/components/workbench.less +118 -118
  688. package/src/aldehyde/welcome/components/workbench.tsx +146 -146
  689. package/src/aldehyde/welcome/index.css +13 -13
@@ -1,700 +1,700 @@
1
- import Konva from 'konva';
2
- import { GraphAnchor, Render, AssetInfoPoint } from '../types';
3
- import { GraphDraw, LinkDraw, PreviewDraw } from '../draws';
4
- import { BaseGraph } from './base-graph';
5
-
6
- /**
7
- * 图形 圆/椭圆
8
- */
9
- export class Circle extends BaseGraph {
10
- // 实现:更新 图形 的 调整点 的 锚点位置
11
- static override updateAnchorShadows(graph: Konva.Group, anchorShadows: Konva.Circle[]): void {
12
- const { width, height } = graph.size();
13
- for (const shadow of anchorShadows) {
14
- switch (shadow.attrs.adjustType) {
15
- case 'top':
16
- shadow.position({ x: width / 2, y: 0 });
17
- break;
18
- case 'bottom':
19
- shadow.position({ x: width / 2, y: height });
20
- break;
21
- case 'left':
22
- shadow.position({ x: 0, y: height / 2 });
23
- break;
24
- case 'right':
25
- shadow.position({ x: width, y: height / 2 });
26
- break;
27
- case 'top-left':
28
- shadow.position({ x: 0, y: 0 });
29
- break;
30
- case 'top-right':
31
- shadow.position({ x: width, y: 0 });
32
- break;
33
- case 'bottom-left':
34
- shadow.position({ x: 0, y: height });
35
- break;
36
- case 'bottom-right':
37
- shadow.position({ x: width, y: height });
38
- break;
39
- }
40
- }
41
- }
42
-
43
- // 实现:更新 图形 的 连接点 的 锚点位置
44
- static override updateLinkAnchorShadows(graph: Konva.Group, linkAnchorShadows: Konva.Circle[]): void {
45
- const { width, height } = graph.size();
46
- for (const shadow of linkAnchorShadows) {
47
- switch (shadow.attrs.alias) {
48
- case 'top':
49
- shadow.position({ x: width / 2, y: 0 });
50
- break;
51
- case 'bottom':
52
- shadow.position({ x: width / 2, y: height });
53
- break;
54
- case 'left':
55
- shadow.position({ x: 0, y: height / 2 });
56
- break;
57
- case 'right':
58
- shadow.position({ x: width, y: height / 2 });
59
- break;
60
- case 'center':
61
- shadow.position({ x: width / 2, y: height / 2 });
62
- break;
63
- }
64
- }
65
- }
66
-
67
- // 实现:生成 调整点
68
- static override createAnchorShapes(
69
- render: Render,
70
- graph: Konva.Group,
71
- anchorAndShadows: {
72
- anchor: GraphAnchor,
73
- anchorShadow: Konva.Circle,
74
- shape?: Konva.Shape
75
- }[],
76
- // eslint-disable-next-line
77
- adjustAnchor?: GraphAnchor
78
- ): {
79
- anchorAndShadows: {
80
- anchor: GraphAnchor;
81
- anchorShadow: Konva.Circle;
82
- shape?: Konva.Shape | undefined;
83
- }[]
84
- } {
85
- const stageState = render.getStageState();
86
- for (const anchorAndShadow of anchorAndShadows) {
87
- const { anchor, anchorShadow } = anchorAndShadow;
88
- const x = render.toStageValue(anchorShadow.getAbsolutePosition().x - stageState.x),
89
- y = render.toStageValue(anchorShadow.getAbsolutePosition().y - stageState.y);
90
- const offset = render.toStageValue(render.pointSize + 5);
91
- const anchorShape = new Konva.Line({
92
- name: 'anchor',
93
- anchor: anchor,
94
- stroke: `rgba(0,0,255,0.4)`,
95
- strokeWidth: render.toStageValue(2),
96
- hitStrokeWidth: render.toStageValue(3),
97
- x,
98
- y,
99
- points: {
100
- 'top-left': [[-offset, offset / 2], [-offset, -offset], [offset / 2, -offset]].flat(),
101
- top: [[-offset, -offset], [offset, -offset]].flat(),
102
- 'top-right': [[-offset / 2, -offset], [offset, -offset], [offset, offset / 2]].flat(),
103
- right: [[offset, -offset], [offset, offset]].flat(),
104
- 'bottom-right': [[-offset / 2, offset], [offset, offset], [offset, -offset / 2]].flat(),
105
- bottom: [[-offset, offset], [offset, offset]].flat(),
106
- 'bottom-left': [[-offset, -offset / 2], [-offset, offset], [offset / 2, offset]].flat(),
107
- left: [[-offset, -offset], [-offset, offset]].flat()
108
- }[anchor.adjustType] ?? [],
109
- rotation: graph.getAbsoluteRotation(), // 旋转角度
110
- visible: graph.attrs.adjusting || graph.attrs.hover === true
111
- });
112
- anchorShape.on('mouseenter', () => {
113
- document.body.style.cursor = 'move';
114
- graph.setAttr('hover', true);
115
- graph.setAttr('hoverAnchor', true);
116
- });
117
- anchorShape.on('mouseleave', () => {
118
- document.body.style.cursor = anchorShape.attrs.adjusting ? 'move' : 'default';
119
- graph.setAttr('hover', false);
120
- graph.setAttr('hoverAnchor', false);
121
- // 进入其他元素区域时离开需要靠它 redraw
122
- render.redraw([GraphDraw.NAME]);
123
- });
124
- anchorAndShadow.shape = anchorShape;
125
- }
126
- return { anchorAndShadows };
127
- }
128
-
129
- // 实现:调整 图形
130
- static override adjust(
131
- render: Render,
132
- graph: Konva.Group,
133
- graphSnap: Konva.Group,
134
- adjustShape: Konva.Shape,
135
- anchorAndShadows: {
136
- anchor: GraphAnchor,
137
- anchorShadow: Konva.Circle,
138
- shape?: Konva.Shape | undefined,
139
- }[],
140
- startPoint: Konva.Vector2d,
141
- endPoint: Konva.Vector2d,
142
- hoverRect?: Konva.Rect
143
- ) {
144
- // 目标 圆/椭圆
145
- const circle = graph.findOne('.graph') as Konva.Ellipse;
146
- // 镜像
147
- const circleSnap = graphSnap.findOne('.graph') as Konva.Ellipse;
148
- // 调整点 锚点
149
- const anchors = (graph.find('.anchor') ?? []) as Konva.Circle[];
150
- // 镜像
151
- const anchorsSnap = (graphSnap.find('.anchor') ?? []) as Konva.Circle[];
152
- // 连接点 锚点
153
- const linkAnchors = (graph.find('.link-anchor') ?? []) as Konva.Circle[];
154
- if (circle && circleSnap) {
155
- const [graphRotation, adjustType, ex, ey] = [
156
- Math.round(graph.rotation()),
157
- adjustShape.attrs.anchor?.adjustType,
158
- endPoint.x,
159
- endPoint.y
160
- ];
161
- let anchorShadow: Konva.Circle | undefined, anchorShadowAcross: Konva.Circle | undefined;
162
- switch (adjustType) {
163
- case 'top':
164
- anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'top');
165
- anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'bottom');
166
- break;
167
- case 'bottom':
168
- anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'bottom');
169
- anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'top');
170
- break;
171
- case 'left':
172
- anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'left');
173
- anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'right');
174
- break;
175
- case 'right':
176
- anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'right');
177
- anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'left');
178
- break;
179
- case 'top-left':
180
- anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'top-left');
181
- anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'bottom-right');
182
- break;
183
- case 'top-right':
184
- anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'top-right');
185
- anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'bottom-left');
186
- break;
187
- case 'bottom-left':
188
- anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'bottom-left');
189
- anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'top-right');
190
- break;
191
- case 'bottom-right':
192
- anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'bottom-right');
193
- anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'top-left');
194
- break;
195
- }
196
- if (anchorShadow && anchorShadowAcross) {
197
- const { x: sx, y: sy } = anchorShadow.getAbsolutePosition();
198
- const { x: ax, y: ay } = anchorShadowAcross.getAbsolutePosition();
199
- {
200
- const d1 = Math.sqrt(Math.pow(sx - ax, 2) + Math.pow(sy - ay, 2));
201
- const d2 = Math.sqrt(Math.pow(ex - ax, 2) + Math.pow(ey - ay, 2));
202
- const r1 = d2 / d1;
203
- let zeroWidth = 1, zeroHeight = 1;
204
- switch (adjustType) {
205
- case 'top':
206
- if (graphRotation >= 45 && graphRotation < 135) {
207
- zeroHeight = ex <= ax ? 0 : 1;
208
- } else if (graphRotation >= -135 && graphRotation < -45) {
209
- zeroHeight = ex >= ax ? 0 : 1;
210
- } else if (graphRotation >= -45 && graphRotation < 45) {
211
- zeroHeight = ey >= ay ? 0 : 1;
212
- } else {
213
- zeroHeight = ey <= ay ? 0 : 1;
214
- }
215
- break;
216
- case 'bottom':
217
- if (graphRotation >= 45 && graphRotation < 135) {
218
- zeroHeight = ex <= ax ? 1 : 0;
219
- } else if (graphRotation >= -135 && graphRotation < -45) {
220
- zeroHeight = ex >= ax ? 1 : 0;
221
- } else if (graphRotation >= -45 && graphRotation < 45) {
222
- zeroHeight = ey >= ay ? 1 : 0;
223
- } else {
224
- zeroHeight = ey <= ay ? 1 : 0;
225
- }
226
- break;
227
- case 'left':
228
- if (graphRotation >= 45 && graphRotation < 135) {
229
- zeroWidth = ey >= ay ? 0 : 1;
230
- } else if (graphRotation >= -135 && graphRotation < -45) {
231
- zeroWidth = ex <= ax ? 0 : 1;
232
- } else if (graphRotation >= -45 && graphRotation < 45) {
233
- zeroWidth = ex >= ax ? 0 : 1;
234
- } else {
235
- zeroWidth = ey <= ay ? 0 : 1;
236
- }
237
- break;
238
- case 'right':
239
- if (graphRotation >= 45 && graphRotation < 135) {
240
- zeroWidth = ey >= ay ? 1 : 0;
241
- } else if (graphRotation >= -135 && graphRotation < -45) {
242
- zeroWidth = ex <= ax ? 1 : 0;
243
- } else if (graphRotation >= -45 && graphRotation < 45) {
244
- zeroWidth = ex >= ax ? 1 : 0;
245
- } else {
246
- zeroWidth = ey <= ay ? 1 : 0;
247
- }
248
- break;
249
- case 'top-left':
250
- if (graphRotation > -45 && graphRotation < 45) {
251
- if (ex >= ax && ey >= ay) {
252
- zeroWidth = 0;
253
- zeroHeight = 0;
254
- } else {
255
- zeroWidth = 1;
256
- zeroHeight = 1;
257
- }
258
- } else if (graphRotation === 45) {
259
- if (ey >= ay) {
260
- zeroWidth = 0;
261
- zeroHeight = 0;
262
- } else {
263
- zeroWidth = 1;
264
- zeroHeight = 1;
265
- }
266
- } else if (graphRotation > 45 && graphRotation < 135) {
267
- if (ex <= ax && ey >= ay) {
268
- zeroWidth = 0;
269
- zeroHeight = 0;
270
- } else {
271
- zeroWidth = 1;
272
- zeroHeight = 1;
273
- }
274
- } else if (graphRotation === 135) {
275
- if (ex <= ax) {
276
- zeroWidth = 0;
277
- zeroHeight = 0;
278
- } else {
279
- zeroWidth = 1;
280
- zeroHeight = 1;
281
- }
282
- } else if ((graphRotation > 135 && graphRotation <= 180) || (graphRotation >= -180 && graphRotation < -135)) {
283
- if (ex <= ax && ey <= ay) {
284
- zeroWidth = 0;
285
- zeroHeight = 0;
286
- } else {
287
- zeroWidth = 1;
288
- zeroHeight = 1;
289
- }
290
- } else if (graphRotation === -135) {
291
- if (ey <= ay) {
292
- zeroWidth = 0;
293
- zeroHeight = 0;
294
- } else {
295
- zeroWidth = 1;
296
- zeroHeight = 1;
297
- }
298
- } else if (graphRotation > -135 && graphRotation < -45) {
299
- if (ex >= ax && ey <= ay) {
300
- zeroWidth = 0;
301
- zeroHeight = 0;
302
- } else {
303
- zeroWidth = 1;
304
- zeroHeight = 1;
305
- }
306
- } else if (graphRotation === -45) {
307
- if (ex >= ax) {
308
- zeroWidth = 0;
309
- zeroHeight = 0;
310
- } else {
311
- zeroWidth = 1;
312
- zeroHeight = 1;
313
- }
314
- }
315
- break;
316
- case 'top-right':
317
- if (graphRotation > -45 && graphRotation < 45) {
318
- if (ex <= ax && ey >= ay) {
319
- zeroWidth = 0;
320
- zeroHeight = 0;
321
- } else {
322
- zeroWidth = 1;
323
- zeroHeight = 1;
324
- }
325
- } else if (graphRotation === 45) {
326
- if (ex <= ax) {
327
- zeroWidth = 0;
328
- zeroHeight = 0;
329
- } else {
330
- zeroWidth = 1;
331
- zeroHeight = 1;
332
- }
333
- } else if (graphRotation > 45 && graphRotation < 135) {
334
- if (ex <= ax && ey <= ay) {
335
- zeroWidth = 0;
336
- zeroHeight = 0;
337
- } else {
338
- zeroWidth = 1;
339
- zeroHeight = 1;
340
- }
341
- } else if (graphRotation === 135) {
342
- if (ey <= ay) {
343
- zeroWidth = 0;
344
- zeroHeight = 0;
345
- } else {
346
- zeroWidth = 1;
347
- zeroHeight = 1;
348
- }
349
- } else if ((graphRotation > 135 && graphRotation <= 180) || (graphRotation >= -180 && graphRotation < -135)) {
350
- if (ex >= ax && ey <= ay) {
351
- zeroWidth = 0;
352
- zeroHeight = 0;
353
- } else {
354
- zeroWidth = 1;
355
- zeroHeight = 1;
356
- }
357
- } else if (graphRotation === -135) {
358
- if (ex >= ax) {
359
- zeroWidth = 0;
360
- zeroHeight = 0;
361
- } else {
362
- zeroWidth = 1;
363
- zeroHeight = 1;
364
- }
365
- } else if (graphRotation > -135 && graphRotation < -45) {
366
- if (ex >= ax && ey >= ay) {
367
- zeroWidth = 0;
368
- zeroHeight = 0;
369
- } else {
370
- zeroWidth = 1;
371
- zeroHeight = 1;
372
- }
373
- } else if (graphRotation === -45) {
374
- if (ey >= ay) {
375
- zeroWidth = 0;
376
- zeroHeight = 0;
377
- } else {
378
- zeroWidth = 1;
379
- zeroHeight = 1;
380
- }
381
- }
382
- break;
383
- case 'bottom-left':
384
- if (graphRotation > -45 && graphRotation < 45) {
385
- if (ex >= ax && ey <= ay) {
386
- zeroWidth = 0;
387
- zeroHeight = 0;
388
- } else {
389
- zeroWidth = 1;
390
- zeroHeight = 1;
391
- }
392
- } else if (graphRotation === 45) {
393
- if (ex >= ax) {
394
- zeroWidth = 0;
395
- zeroHeight = 0;
396
- } else {
397
- zeroWidth = 1;
398
- zeroHeight = 1;
399
- }
400
- } else if (graphRotation > 45 && graphRotation < 135) {
401
- if (ex >= ax && ey >= ay) {
402
- zeroWidth = 0;
403
- zeroHeight = 0;
404
- } else {
405
- zeroWidth = 1;
406
- zeroHeight = 1;
407
- }
408
- } else if (graphRotation === 135) {
409
- if (ey >= ay) {
410
- zeroWidth = 0;
411
- zeroHeight = 0;
412
- } else {
413
- zeroWidth = 1;
414
- zeroHeight = 1;
415
- }
416
- } else if ((graphRotation > 135 && graphRotation <= 180) || (graphRotation >= -180 && graphRotation < -135)) {
417
- if (ex <= ax && ey >= ay) {
418
- zeroWidth = 0;
419
- zeroHeight = 0;
420
- } else {
421
- zeroWidth = 1;
422
- zeroHeight = 1;
423
- }
424
- } else if (graphRotation === -135) {
425
- if (ex <= ax) {
426
- zeroWidth = 0;
427
- zeroHeight = 0;
428
- } else {
429
- zeroWidth = 1;
430
- zeroHeight = 1;
431
- }
432
- } else if (graphRotation > -135 && graphRotation < -45) {
433
- if (ex <= ax && ey <= ay) {
434
- zeroWidth = 0;
435
- zeroHeight = 0;
436
- } else {
437
- zeroWidth = 1;
438
- zeroHeight = 1;
439
- }
440
- } else if (graphRotation === -45) {
441
- if (ey <= ay) {
442
- zeroWidth = 0;
443
- zeroHeight = 0;
444
- } else {
445
- zeroWidth = 1;
446
- zeroHeight = 1;
447
- }
448
- }
449
- break;
450
- case 'bottom-right':
451
- if (graphRotation > -45 && graphRotation < 45) {
452
- if (ex <= ax && ey <= ay) {
453
- zeroWidth = 0;
454
- zeroHeight = 0;
455
- } else {
456
- zeroWidth = 1;
457
- zeroHeight = 1;
458
- }
459
- } else if (graphRotation === 45) {
460
- if (ey <= ay) {
461
- zeroWidth = 0;
462
- zeroHeight = 0;
463
- } else {
464
- zeroWidth = 1;
465
- zeroHeight = 1;
466
- }
467
- } else if (graphRotation > 45 && graphRotation < 135) {
468
- if (ex >= ax && ey <= ay) {
469
- zeroWidth = 0;
470
- zeroHeight = 0;
471
- } else {
472
- zeroWidth = 1;
473
- zeroHeight = 1;
474
- }
475
- } else if (graphRotation === 135) {
476
- if (ex >= ax) {
477
- zeroWidth = 0;
478
- zeroHeight = 0;
479
- } else {
480
- zeroWidth = 1;
481
- zeroHeight = 1;
482
- }
483
- } else if ((graphRotation > 135 && graphRotation <= 180) || (graphRotation >= -180 && graphRotation < -135)) {
484
- if (ex >= ax && ey >= ay) {
485
- zeroWidth = 0;
486
- zeroHeight = 0;
487
- } else {
488
- zeroWidth = 1;
489
- zeroHeight = 1;
490
- }
491
- } else if (graphRotation === -135) {
492
- if (ey >= ay) {
493
- zeroWidth = 0;
494
- zeroHeight = 0;
495
- } else {
496
- zeroWidth = 1;
497
- zeroHeight = 1;
498
- }
499
- } else if (graphRotation > -135 && graphRotation < -45) {
500
- if (ex <= ax && ey >= ay) {
501
- zeroWidth = 0;
502
- zeroHeight = 0;
503
- } else {
504
- zeroWidth = 1;
505
- zeroHeight = 1;
506
- }
507
- } else if (graphRotation === -45) {
508
- if (ex <= ax) {
509
- zeroWidth = 0;
510
- zeroHeight = 0;
511
- } else {
512
- zeroWidth = 1;
513
- zeroHeight = 1;
514
- }
515
- }
516
- break;
517
- }
518
- if (/-?(left|right)$/.test(adjustType)) {
519
- graph.width(Math.max(2, graphSnap.width() * r1 * zeroWidth));
520
- }
521
- if (/^(top|bottom)-?/.test(adjustType)) {
522
- graph.height(Math.max(2, graphSnap.height() * r1 * zeroHeight));
523
- }
524
- }
525
- {
526
- const [graphWidth, graphHeight] = [graph.width() * graph.scaleX(), graph.height() * graph.scaleY()];
527
- const cos = Math.cos((graphRotation * Math.PI) / 180);
528
- const sin = Math.sin((graphRotation * Math.PI) / 180);
529
- const tan = Math.tan((graphRotation * Math.PI) / 180);
530
- switch (adjustType) {
531
- case 'top':
532
- graph.x(ax - (graphWidth / 2 - graphHeight * tan) * cos);
533
- if (graphRotation !== 90 && graphRotation !== -90) {
534
- graph.y(ay - (graphHeight / cos + (graphWidth / 2 - graphHeight * tan) * sin));
535
- }
536
- break;
537
- case 'bottom': // 无需处理
538
- break;
539
- case 'left':
540
- if ([90, -90].includes(graphRotation)) {
541
- graph.y(ay - graphWidth);
542
- } else if (Math.abs(graphRotation) === 180) {
543
- graph.x(ax + graphWidth);
544
- } else {
545
- const v1 = graphHeight / 2 / cos;
546
- const v2 = v1 * sin;
547
- const v3 = graphWidth - v2;
548
- const v4 = v3 * sin;
549
- graph.x(ax - v3 * cos);
550
- graph.y(ay - (v1 + v4));
551
- }
552
- break;
553
- case 'right': // 无需处理
554
- break;
555
- case 'top-left':
556
- graph.x(ax - (graphWidth - graphHeight * tan) * cos);
557
- graph.y(ay - (graphWidth * sin + graphHeight * cos));
558
- break;
559
- case 'top-right':
560
- graph.x(ax + graphHeight * sin);
561
- graph.y(ay - graphHeight * cos);
562
- break;
563
- case 'bottom-left':
564
- graph.x(ax - graphWidth * cos);
565
- graph.y(ay - graphWidth * sin);
566
- break;
567
- case 'bottom-right': // 无需处理
568
- break;
569
- }
570
- }
571
- }
572
- const [graphWidth, graphHeight] = [graph.width(), graph.height()];
573
- // 更新 圆/椭圆 大小
574
- circle.x(graphWidth / 2);
575
- circle.radiusX(graphWidth / 2);
576
- circle.y(graphHeight / 2);
577
- circle.radiusY(graphHeight / 2);
578
- // 更新 调整点 的 锚点 位置
579
- Circle.updateAnchorShadows(graph, anchors);
580
- // 更新 图形 的 连接点 的 锚点位置
581
- Circle.updateLinkAnchorShadows(graph, linkAnchors);
582
- const stageState = render.getStageState();
583
- // 更新 调整点 位置
584
- for (const anchor of anchors) {
585
- for (const { shape } of anchorAndShadows) {
586
- if (shape) {
587
- if (shape.attrs.anchor?.adjustType === anchor.attrs.adjustType) {
588
- const anchorShadow = graph.find(`.anchor`).find((o) => o.attrs.adjustType === anchor.attrs.adjustType);
589
- if (anchorShadow) {
590
- shape.position({
591
- x: render.toStageValue(anchorShadow.getAbsolutePosition().x - stageState.x),
592
- y: render.toStageValue(anchorShadow.getAbsolutePosition().y - stageState.y)
593
- });
594
- shape.rotation(graph.getAbsoluteRotation());
595
- }
596
- }
597
- }
598
- }
599
- }
600
- render.redraw([GraphDraw.NAME, LinkDraw.NAME, PreviewDraw.NAME]); // 重绘
601
- }
602
- BaseGraph.adjust(render, graph, graphSnap, adjustShape, anchorAndShadows, startPoint, endPoint, hoverRect);
603
- }
604
-
605
- /**
606
- * 提供给 GraphDraw draw 使用
607
- */
608
- static override draw(graph: Konva.Group, render: Render, adjustAnchor?: GraphAnchor) {
609
- const { anchorAndShadows } = super.draw(graph, render, adjustAnchor);
610
- return Circle.createAnchorShapes(render, graph, anchorAndShadows, adjustAnchor);
611
- }
612
-
613
- /**
614
- * 默认图形大小
615
- */
616
- static size = 100;
617
-
618
- /**
619
- * 圆/椭圆 对应的 Konva 实例
620
- */
621
- private circle: Konva.Ellipse;
622
-
623
- constructor(render: Render, dropPoint: Konva.Vector2d) {
624
- super(render, dropPoint, {
625
- type: "Circle",
626
- anchors: [
627
- { adjustType: 'top' },
628
- { adjustType: 'bottom' },
629
- { adjustType: 'left' },
630
- { adjustType: 'right' },
631
- { adjustType: 'top-left' },
632
- { adjustType: 'top-right' },
633
- { adjustType: 'bottom-left' },
634
- { adjustType: 'bottom-right' }
635
- ].map((o) => ({ adjustType: o.adjustType })),
636
- linkAnchors: [
637
- { x: 0, y: 0, alias: 'top', direction: 'top' },
638
- { x: 0, y: 0, alias: 'bottom', direction: 'bottom' },
639
- { x: 0, y: 0, alias: 'left', direction: 'left' },
640
- { x: 0, y: 0, alias: 'right', direction: 'right' },
641
- { x: 0, y: 0, alias: 'center' }
642
- ] as AssetInfoPoint[]
643
- });
644
- this.circle = new Konva.Ellipse({
645
- name: 'graph',
646
- x: 0,
647
- y: 0,
648
- radiusX: 0,
649
- radiusY: 0,
650
- stroke: "#000000",
651
- strokeWidth: 1,
652
- });
653
- this.group.add(this.circle);
654
- this.group.position(this.dropPoint); // 鼠标按下位置 作为起点
655
- }
656
-
657
- // 实现:拖动进行时
658
- override drawMove(point: Konva.Vector2d): void {
659
- // 鼠标拖动偏移量
660
- let offsetX = point.x - this.dropPoint.x,
661
- offsetY = point.y - this.dropPoint.y;
662
- if (offsetX < 1) offsetX = 1;
663
- if (offsetY < 1) offsetY = 1;
664
- // 半径
665
- const radiusX = offsetX / 2, radiusY = offsetY / 2;
666
- // 圆/椭圆 位置大小
667
- this.circle.x(radiusX);
668
- this.circle.y(radiusY);
669
- this.circle.radiusX(radiusX);
670
- this.circle.radiusY(radiusY);
671
- this.group.size({ width: offsetX, height: offsetY });
672
- Circle.updateAnchorShadows(this.group, this.anchorShadows);
673
- Circle.updateLinkAnchorShadows(this.group, this.linkAnchorShadows);
674
- this.render.redraw([GraphDraw.NAME, LinkDraw.NAME, PreviewDraw.NAME]);
675
- }
676
-
677
- // 实现:拖动结束
678
- override drawEnd(): void {
679
- if (this.circle.radiusX() <= 1 && this.circle.radiusY() <= 1) {
680
- const width = Circle.size, height = width;
681
- const radiusX = Circle.size / 2, radiusY = radiusX;
682
- this.circle.x(radiusX);
683
- this.circle.y(radiusY);
684
- this.circle.radiusX(radiusX - this.circle.strokeWidth());
685
- this.circle.radiusY(radiusY - this.circle.strokeWidth());
686
- this.group.size({ width, height });
687
- // 更新 图形 的 调整点 的 锚点位置
688
- Circle.updateAnchorShadows(this.group, this.anchorShadows);
689
- // 更新 图形 的 连接点 的 锚点位置
690
- Circle.updateLinkAnchorShadows(this.group, this.linkAnchorShadows);
691
- // 对齐线清除
692
- this.render.attractTool.alignLinesClear();
693
- // 更新历史
694
- this.render.updateHistory();
695
- // 重绘
696
- this.render.redraw([GraphDraw.NAME, LinkDraw.NAME, PreviewDraw.NAME]);
697
- }
698
- super.drawEnd();
699
- }
1
+ import Konva from 'konva';
2
+ import { GraphAnchor, Render, AssetInfoPoint } from '../types';
3
+ import { GraphDraw, LinkDraw, PreviewDraw } from '../draws';
4
+ import { BaseGraph } from './base-graph';
5
+
6
+ /**
7
+ * 图形 圆/椭圆
8
+ */
9
+ export class Circle extends BaseGraph {
10
+ // 实现:更新 图形 的 调整点 的 锚点位置
11
+ static override updateAnchorShadows(graph: Konva.Group, anchorShadows: Konva.Circle[]): void {
12
+ const { width, height } = graph.size();
13
+ for (const shadow of anchorShadows) {
14
+ switch (shadow.attrs.adjustType) {
15
+ case 'top':
16
+ shadow.position({ x: width / 2, y: 0 });
17
+ break;
18
+ case 'bottom':
19
+ shadow.position({ x: width / 2, y: height });
20
+ break;
21
+ case 'left':
22
+ shadow.position({ x: 0, y: height / 2 });
23
+ break;
24
+ case 'right':
25
+ shadow.position({ x: width, y: height / 2 });
26
+ break;
27
+ case 'top-left':
28
+ shadow.position({ x: 0, y: 0 });
29
+ break;
30
+ case 'top-right':
31
+ shadow.position({ x: width, y: 0 });
32
+ break;
33
+ case 'bottom-left':
34
+ shadow.position({ x: 0, y: height });
35
+ break;
36
+ case 'bottom-right':
37
+ shadow.position({ x: width, y: height });
38
+ break;
39
+ }
40
+ }
41
+ }
42
+
43
+ // 实现:更新 图形 的 连接点 的 锚点位置
44
+ static override updateLinkAnchorShadows(graph: Konva.Group, linkAnchorShadows: Konva.Circle[]): void {
45
+ const { width, height } = graph.size();
46
+ for (const shadow of linkAnchorShadows) {
47
+ switch (shadow.attrs.alias) {
48
+ case 'top':
49
+ shadow.position({ x: width / 2, y: 0 });
50
+ break;
51
+ case 'bottom':
52
+ shadow.position({ x: width / 2, y: height });
53
+ break;
54
+ case 'left':
55
+ shadow.position({ x: 0, y: height / 2 });
56
+ break;
57
+ case 'right':
58
+ shadow.position({ x: width, y: height / 2 });
59
+ break;
60
+ case 'center':
61
+ shadow.position({ x: width / 2, y: height / 2 });
62
+ break;
63
+ }
64
+ }
65
+ }
66
+
67
+ // 实现:生成 调整点
68
+ static override createAnchorShapes(
69
+ render: Render,
70
+ graph: Konva.Group,
71
+ anchorAndShadows: {
72
+ anchor: GraphAnchor,
73
+ anchorShadow: Konva.Circle,
74
+ shape?: Konva.Shape
75
+ }[],
76
+ // eslint-disable-next-line
77
+ adjustAnchor?: GraphAnchor
78
+ ): {
79
+ anchorAndShadows: {
80
+ anchor: GraphAnchor;
81
+ anchorShadow: Konva.Circle;
82
+ shape?: Konva.Shape | undefined;
83
+ }[]
84
+ } {
85
+ const stageState = render.getStageState();
86
+ for (const anchorAndShadow of anchorAndShadows) {
87
+ const { anchor, anchorShadow } = anchorAndShadow;
88
+ const x = render.toStageValue(anchorShadow.getAbsolutePosition().x - stageState.x),
89
+ y = render.toStageValue(anchorShadow.getAbsolutePosition().y - stageState.y);
90
+ const offset = render.toStageValue(render.pointSize + 5);
91
+ const anchorShape = new Konva.Line({
92
+ name: 'anchor',
93
+ anchor: anchor,
94
+ stroke: `rgba(0,0,255,0.4)`,
95
+ strokeWidth: render.toStageValue(2),
96
+ hitStrokeWidth: render.toStageValue(3),
97
+ x,
98
+ y,
99
+ points: {
100
+ 'top-left': [[-offset, offset / 2], [-offset, -offset], [offset / 2, -offset]].flat(),
101
+ top: [[-offset, -offset], [offset, -offset]].flat(),
102
+ 'top-right': [[-offset / 2, -offset], [offset, -offset], [offset, offset / 2]].flat(),
103
+ right: [[offset, -offset], [offset, offset]].flat(),
104
+ 'bottom-right': [[-offset / 2, offset], [offset, offset], [offset, -offset / 2]].flat(),
105
+ bottom: [[-offset, offset], [offset, offset]].flat(),
106
+ 'bottom-left': [[-offset, -offset / 2], [-offset, offset], [offset / 2, offset]].flat(),
107
+ left: [[-offset, -offset], [-offset, offset]].flat()
108
+ }[anchor.adjustType] ?? [],
109
+ rotation: graph.getAbsoluteRotation(), // 旋转角度
110
+ visible: graph.attrs.adjusting || graph.attrs.hover === true
111
+ });
112
+ anchorShape.on('mouseenter', () => {
113
+ document.body.style.cursor = 'move';
114
+ graph.setAttr('hover', true);
115
+ graph.setAttr('hoverAnchor', true);
116
+ });
117
+ anchorShape.on('mouseleave', () => {
118
+ document.body.style.cursor = anchorShape.attrs.adjusting ? 'move' : 'default';
119
+ graph.setAttr('hover', false);
120
+ graph.setAttr('hoverAnchor', false);
121
+ // 进入其他元素区域时离开需要靠它 redraw
122
+ render.redraw([GraphDraw.NAME]);
123
+ });
124
+ anchorAndShadow.shape = anchorShape;
125
+ }
126
+ return { anchorAndShadows };
127
+ }
128
+
129
+ // 实现:调整 图形
130
+ static override adjust(
131
+ render: Render,
132
+ graph: Konva.Group,
133
+ graphSnap: Konva.Group,
134
+ adjustShape: Konva.Shape,
135
+ anchorAndShadows: {
136
+ anchor: GraphAnchor,
137
+ anchorShadow: Konva.Circle,
138
+ shape?: Konva.Shape | undefined,
139
+ }[],
140
+ startPoint: Konva.Vector2d,
141
+ endPoint: Konva.Vector2d,
142
+ hoverRect?: Konva.Rect
143
+ ) {
144
+ // 目标 圆/椭圆
145
+ const circle = graph.findOne('.graph') as Konva.Ellipse;
146
+ // 镜像
147
+ const circleSnap = graphSnap.findOne('.graph') as Konva.Ellipse;
148
+ // 调整点 锚点
149
+ const anchors = (graph.find('.anchor') ?? []) as Konva.Circle[];
150
+ // 镜像
151
+ const anchorsSnap = (graphSnap.find('.anchor') ?? []) as Konva.Circle[];
152
+ // 连接点 锚点
153
+ const linkAnchors = (graph.find('.link-anchor') ?? []) as Konva.Circle[];
154
+ if (circle && circleSnap) {
155
+ const [graphRotation, adjustType, ex, ey] = [
156
+ Math.round(graph.rotation()),
157
+ adjustShape.attrs.anchor?.adjustType,
158
+ endPoint.x,
159
+ endPoint.y
160
+ ];
161
+ let anchorShadow: Konva.Circle | undefined, anchorShadowAcross: Konva.Circle | undefined;
162
+ switch (adjustType) {
163
+ case 'top':
164
+ anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'top');
165
+ anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'bottom');
166
+ break;
167
+ case 'bottom':
168
+ anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'bottom');
169
+ anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'top');
170
+ break;
171
+ case 'left':
172
+ anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'left');
173
+ anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'right');
174
+ break;
175
+ case 'right':
176
+ anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'right');
177
+ anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'left');
178
+ break;
179
+ case 'top-left':
180
+ anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'top-left');
181
+ anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'bottom-right');
182
+ break;
183
+ case 'top-right':
184
+ anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'top-right');
185
+ anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'bottom-left');
186
+ break;
187
+ case 'bottom-left':
188
+ anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'bottom-left');
189
+ anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'top-right');
190
+ break;
191
+ case 'bottom-right':
192
+ anchorShadow = anchorsSnap.find((o) => o.attrs.adjustType === 'bottom-right');
193
+ anchorShadowAcross = anchorsSnap.find((o) => o.attrs.adjustType === 'top-left');
194
+ break;
195
+ }
196
+ if (anchorShadow && anchorShadowAcross) {
197
+ const { x: sx, y: sy } = anchorShadow.getAbsolutePosition();
198
+ const { x: ax, y: ay } = anchorShadowAcross.getAbsolutePosition();
199
+ {
200
+ const d1 = Math.sqrt(Math.pow(sx - ax, 2) + Math.pow(sy - ay, 2));
201
+ const d2 = Math.sqrt(Math.pow(ex - ax, 2) + Math.pow(ey - ay, 2));
202
+ const r1 = d2 / d1;
203
+ let zeroWidth = 1, zeroHeight = 1;
204
+ switch (adjustType) {
205
+ case 'top':
206
+ if (graphRotation >= 45 && graphRotation < 135) {
207
+ zeroHeight = ex <= ax ? 0 : 1;
208
+ } else if (graphRotation >= -135 && graphRotation < -45) {
209
+ zeroHeight = ex >= ax ? 0 : 1;
210
+ } else if (graphRotation >= -45 && graphRotation < 45) {
211
+ zeroHeight = ey >= ay ? 0 : 1;
212
+ } else {
213
+ zeroHeight = ey <= ay ? 0 : 1;
214
+ }
215
+ break;
216
+ case 'bottom':
217
+ if (graphRotation >= 45 && graphRotation < 135) {
218
+ zeroHeight = ex <= ax ? 1 : 0;
219
+ } else if (graphRotation >= -135 && graphRotation < -45) {
220
+ zeroHeight = ex >= ax ? 1 : 0;
221
+ } else if (graphRotation >= -45 && graphRotation < 45) {
222
+ zeroHeight = ey >= ay ? 1 : 0;
223
+ } else {
224
+ zeroHeight = ey <= ay ? 1 : 0;
225
+ }
226
+ break;
227
+ case 'left':
228
+ if (graphRotation >= 45 && graphRotation < 135) {
229
+ zeroWidth = ey >= ay ? 0 : 1;
230
+ } else if (graphRotation >= -135 && graphRotation < -45) {
231
+ zeroWidth = ex <= ax ? 0 : 1;
232
+ } else if (graphRotation >= -45 && graphRotation < 45) {
233
+ zeroWidth = ex >= ax ? 0 : 1;
234
+ } else {
235
+ zeroWidth = ey <= ay ? 0 : 1;
236
+ }
237
+ break;
238
+ case 'right':
239
+ if (graphRotation >= 45 && graphRotation < 135) {
240
+ zeroWidth = ey >= ay ? 1 : 0;
241
+ } else if (graphRotation >= -135 && graphRotation < -45) {
242
+ zeroWidth = ex <= ax ? 1 : 0;
243
+ } else if (graphRotation >= -45 && graphRotation < 45) {
244
+ zeroWidth = ex >= ax ? 1 : 0;
245
+ } else {
246
+ zeroWidth = ey <= ay ? 1 : 0;
247
+ }
248
+ break;
249
+ case 'top-left':
250
+ if (graphRotation > -45 && graphRotation < 45) {
251
+ if (ex >= ax && ey >= ay) {
252
+ zeroWidth = 0;
253
+ zeroHeight = 0;
254
+ } else {
255
+ zeroWidth = 1;
256
+ zeroHeight = 1;
257
+ }
258
+ } else if (graphRotation === 45) {
259
+ if (ey >= ay) {
260
+ zeroWidth = 0;
261
+ zeroHeight = 0;
262
+ } else {
263
+ zeroWidth = 1;
264
+ zeroHeight = 1;
265
+ }
266
+ } else if (graphRotation > 45 && graphRotation < 135) {
267
+ if (ex <= ax && ey >= ay) {
268
+ zeroWidth = 0;
269
+ zeroHeight = 0;
270
+ } else {
271
+ zeroWidth = 1;
272
+ zeroHeight = 1;
273
+ }
274
+ } else if (graphRotation === 135) {
275
+ if (ex <= ax) {
276
+ zeroWidth = 0;
277
+ zeroHeight = 0;
278
+ } else {
279
+ zeroWidth = 1;
280
+ zeroHeight = 1;
281
+ }
282
+ } else if ((graphRotation > 135 && graphRotation <= 180) || (graphRotation >= -180 && graphRotation < -135)) {
283
+ if (ex <= ax && ey <= ay) {
284
+ zeroWidth = 0;
285
+ zeroHeight = 0;
286
+ } else {
287
+ zeroWidth = 1;
288
+ zeroHeight = 1;
289
+ }
290
+ } else if (graphRotation === -135) {
291
+ if (ey <= ay) {
292
+ zeroWidth = 0;
293
+ zeroHeight = 0;
294
+ } else {
295
+ zeroWidth = 1;
296
+ zeroHeight = 1;
297
+ }
298
+ } else if (graphRotation > -135 && graphRotation < -45) {
299
+ if (ex >= ax && ey <= ay) {
300
+ zeroWidth = 0;
301
+ zeroHeight = 0;
302
+ } else {
303
+ zeroWidth = 1;
304
+ zeroHeight = 1;
305
+ }
306
+ } else if (graphRotation === -45) {
307
+ if (ex >= ax) {
308
+ zeroWidth = 0;
309
+ zeroHeight = 0;
310
+ } else {
311
+ zeroWidth = 1;
312
+ zeroHeight = 1;
313
+ }
314
+ }
315
+ break;
316
+ case 'top-right':
317
+ if (graphRotation > -45 && graphRotation < 45) {
318
+ if (ex <= ax && ey >= ay) {
319
+ zeroWidth = 0;
320
+ zeroHeight = 0;
321
+ } else {
322
+ zeroWidth = 1;
323
+ zeroHeight = 1;
324
+ }
325
+ } else if (graphRotation === 45) {
326
+ if (ex <= ax) {
327
+ zeroWidth = 0;
328
+ zeroHeight = 0;
329
+ } else {
330
+ zeroWidth = 1;
331
+ zeroHeight = 1;
332
+ }
333
+ } else if (graphRotation > 45 && graphRotation < 135) {
334
+ if (ex <= ax && ey <= ay) {
335
+ zeroWidth = 0;
336
+ zeroHeight = 0;
337
+ } else {
338
+ zeroWidth = 1;
339
+ zeroHeight = 1;
340
+ }
341
+ } else if (graphRotation === 135) {
342
+ if (ey <= ay) {
343
+ zeroWidth = 0;
344
+ zeroHeight = 0;
345
+ } else {
346
+ zeroWidth = 1;
347
+ zeroHeight = 1;
348
+ }
349
+ } else if ((graphRotation > 135 && graphRotation <= 180) || (graphRotation >= -180 && graphRotation < -135)) {
350
+ if (ex >= ax && ey <= ay) {
351
+ zeroWidth = 0;
352
+ zeroHeight = 0;
353
+ } else {
354
+ zeroWidth = 1;
355
+ zeroHeight = 1;
356
+ }
357
+ } else if (graphRotation === -135) {
358
+ if (ex >= ax) {
359
+ zeroWidth = 0;
360
+ zeroHeight = 0;
361
+ } else {
362
+ zeroWidth = 1;
363
+ zeroHeight = 1;
364
+ }
365
+ } else if (graphRotation > -135 && graphRotation < -45) {
366
+ if (ex >= ax && ey >= ay) {
367
+ zeroWidth = 0;
368
+ zeroHeight = 0;
369
+ } else {
370
+ zeroWidth = 1;
371
+ zeroHeight = 1;
372
+ }
373
+ } else if (graphRotation === -45) {
374
+ if (ey >= ay) {
375
+ zeroWidth = 0;
376
+ zeroHeight = 0;
377
+ } else {
378
+ zeroWidth = 1;
379
+ zeroHeight = 1;
380
+ }
381
+ }
382
+ break;
383
+ case 'bottom-left':
384
+ if (graphRotation > -45 && graphRotation < 45) {
385
+ if (ex >= ax && ey <= ay) {
386
+ zeroWidth = 0;
387
+ zeroHeight = 0;
388
+ } else {
389
+ zeroWidth = 1;
390
+ zeroHeight = 1;
391
+ }
392
+ } else if (graphRotation === 45) {
393
+ if (ex >= ax) {
394
+ zeroWidth = 0;
395
+ zeroHeight = 0;
396
+ } else {
397
+ zeroWidth = 1;
398
+ zeroHeight = 1;
399
+ }
400
+ } else if (graphRotation > 45 && graphRotation < 135) {
401
+ if (ex >= ax && ey >= ay) {
402
+ zeroWidth = 0;
403
+ zeroHeight = 0;
404
+ } else {
405
+ zeroWidth = 1;
406
+ zeroHeight = 1;
407
+ }
408
+ } else if (graphRotation === 135) {
409
+ if (ey >= ay) {
410
+ zeroWidth = 0;
411
+ zeroHeight = 0;
412
+ } else {
413
+ zeroWidth = 1;
414
+ zeroHeight = 1;
415
+ }
416
+ } else if ((graphRotation > 135 && graphRotation <= 180) || (graphRotation >= -180 && graphRotation < -135)) {
417
+ if (ex <= ax && ey >= ay) {
418
+ zeroWidth = 0;
419
+ zeroHeight = 0;
420
+ } else {
421
+ zeroWidth = 1;
422
+ zeroHeight = 1;
423
+ }
424
+ } else if (graphRotation === -135) {
425
+ if (ex <= ax) {
426
+ zeroWidth = 0;
427
+ zeroHeight = 0;
428
+ } else {
429
+ zeroWidth = 1;
430
+ zeroHeight = 1;
431
+ }
432
+ } else if (graphRotation > -135 && graphRotation < -45) {
433
+ if (ex <= ax && ey <= ay) {
434
+ zeroWidth = 0;
435
+ zeroHeight = 0;
436
+ } else {
437
+ zeroWidth = 1;
438
+ zeroHeight = 1;
439
+ }
440
+ } else if (graphRotation === -45) {
441
+ if (ey <= ay) {
442
+ zeroWidth = 0;
443
+ zeroHeight = 0;
444
+ } else {
445
+ zeroWidth = 1;
446
+ zeroHeight = 1;
447
+ }
448
+ }
449
+ break;
450
+ case 'bottom-right':
451
+ if (graphRotation > -45 && graphRotation < 45) {
452
+ if (ex <= ax && ey <= ay) {
453
+ zeroWidth = 0;
454
+ zeroHeight = 0;
455
+ } else {
456
+ zeroWidth = 1;
457
+ zeroHeight = 1;
458
+ }
459
+ } else if (graphRotation === 45) {
460
+ if (ey <= ay) {
461
+ zeroWidth = 0;
462
+ zeroHeight = 0;
463
+ } else {
464
+ zeroWidth = 1;
465
+ zeroHeight = 1;
466
+ }
467
+ } else if (graphRotation > 45 && graphRotation < 135) {
468
+ if (ex >= ax && ey <= ay) {
469
+ zeroWidth = 0;
470
+ zeroHeight = 0;
471
+ } else {
472
+ zeroWidth = 1;
473
+ zeroHeight = 1;
474
+ }
475
+ } else if (graphRotation === 135) {
476
+ if (ex >= ax) {
477
+ zeroWidth = 0;
478
+ zeroHeight = 0;
479
+ } else {
480
+ zeroWidth = 1;
481
+ zeroHeight = 1;
482
+ }
483
+ } else if ((graphRotation > 135 && graphRotation <= 180) || (graphRotation >= -180 && graphRotation < -135)) {
484
+ if (ex >= ax && ey >= ay) {
485
+ zeroWidth = 0;
486
+ zeroHeight = 0;
487
+ } else {
488
+ zeroWidth = 1;
489
+ zeroHeight = 1;
490
+ }
491
+ } else if (graphRotation === -135) {
492
+ if (ey >= ay) {
493
+ zeroWidth = 0;
494
+ zeroHeight = 0;
495
+ } else {
496
+ zeroWidth = 1;
497
+ zeroHeight = 1;
498
+ }
499
+ } else if (graphRotation > -135 && graphRotation < -45) {
500
+ if (ex <= ax && ey >= ay) {
501
+ zeroWidth = 0;
502
+ zeroHeight = 0;
503
+ } else {
504
+ zeroWidth = 1;
505
+ zeroHeight = 1;
506
+ }
507
+ } else if (graphRotation === -45) {
508
+ if (ex <= ax) {
509
+ zeroWidth = 0;
510
+ zeroHeight = 0;
511
+ } else {
512
+ zeroWidth = 1;
513
+ zeroHeight = 1;
514
+ }
515
+ }
516
+ break;
517
+ }
518
+ if (/-?(left|right)$/.test(adjustType)) {
519
+ graph.width(Math.max(2, graphSnap.width() * r1 * zeroWidth));
520
+ }
521
+ if (/^(top|bottom)-?/.test(adjustType)) {
522
+ graph.height(Math.max(2, graphSnap.height() * r1 * zeroHeight));
523
+ }
524
+ }
525
+ {
526
+ const [graphWidth, graphHeight] = [graph.width() * graph.scaleX(), graph.height() * graph.scaleY()];
527
+ const cos = Math.cos((graphRotation * Math.PI) / 180);
528
+ const sin = Math.sin((graphRotation * Math.PI) / 180);
529
+ const tan = Math.tan((graphRotation * Math.PI) / 180);
530
+ switch (adjustType) {
531
+ case 'top':
532
+ graph.x(ax - (graphWidth / 2 - graphHeight * tan) * cos);
533
+ if (graphRotation !== 90 && graphRotation !== -90) {
534
+ graph.y(ay - (graphHeight / cos + (graphWidth / 2 - graphHeight * tan) * sin));
535
+ }
536
+ break;
537
+ case 'bottom': // 无需处理
538
+ break;
539
+ case 'left':
540
+ if ([90, -90].includes(graphRotation)) {
541
+ graph.y(ay - graphWidth);
542
+ } else if (Math.abs(graphRotation) === 180) {
543
+ graph.x(ax + graphWidth);
544
+ } else {
545
+ const v1 = graphHeight / 2 / cos;
546
+ const v2 = v1 * sin;
547
+ const v3 = graphWidth - v2;
548
+ const v4 = v3 * sin;
549
+ graph.x(ax - v3 * cos);
550
+ graph.y(ay - (v1 + v4));
551
+ }
552
+ break;
553
+ case 'right': // 无需处理
554
+ break;
555
+ case 'top-left':
556
+ graph.x(ax - (graphWidth - graphHeight * tan) * cos);
557
+ graph.y(ay - (graphWidth * sin + graphHeight * cos));
558
+ break;
559
+ case 'top-right':
560
+ graph.x(ax + graphHeight * sin);
561
+ graph.y(ay - graphHeight * cos);
562
+ break;
563
+ case 'bottom-left':
564
+ graph.x(ax - graphWidth * cos);
565
+ graph.y(ay - graphWidth * sin);
566
+ break;
567
+ case 'bottom-right': // 无需处理
568
+ break;
569
+ }
570
+ }
571
+ }
572
+ const [graphWidth, graphHeight] = [graph.width(), graph.height()];
573
+ // 更新 圆/椭圆 大小
574
+ circle.x(graphWidth / 2);
575
+ circle.radiusX(graphWidth / 2);
576
+ circle.y(graphHeight / 2);
577
+ circle.radiusY(graphHeight / 2);
578
+ // 更新 调整点 的 锚点 位置
579
+ Circle.updateAnchorShadows(graph, anchors);
580
+ // 更新 图形 的 连接点 的 锚点位置
581
+ Circle.updateLinkAnchorShadows(graph, linkAnchors);
582
+ const stageState = render.getStageState();
583
+ // 更新 调整点 位置
584
+ for (const anchor of anchors) {
585
+ for (const { shape } of anchorAndShadows) {
586
+ if (shape) {
587
+ if (shape.attrs.anchor?.adjustType === anchor.attrs.adjustType) {
588
+ const anchorShadow = graph.find(`.anchor`).find((o) => o.attrs.adjustType === anchor.attrs.adjustType);
589
+ if (anchorShadow) {
590
+ shape.position({
591
+ x: render.toStageValue(anchorShadow.getAbsolutePosition().x - stageState.x),
592
+ y: render.toStageValue(anchorShadow.getAbsolutePosition().y - stageState.y)
593
+ });
594
+ shape.rotation(graph.getAbsoluteRotation());
595
+ }
596
+ }
597
+ }
598
+ }
599
+ }
600
+ render.redraw([GraphDraw.NAME, LinkDraw.NAME, PreviewDraw.NAME]); // 重绘
601
+ }
602
+ BaseGraph.adjust(render, graph, graphSnap, adjustShape, anchorAndShadows, startPoint, endPoint, hoverRect);
603
+ }
604
+
605
+ /**
606
+ * 提供给 GraphDraw draw 使用
607
+ */
608
+ static override draw(graph: Konva.Group, render: Render, adjustAnchor?: GraphAnchor) {
609
+ const { anchorAndShadows } = super.draw(graph, render, adjustAnchor);
610
+ return Circle.createAnchorShapes(render, graph, anchorAndShadows, adjustAnchor);
611
+ }
612
+
613
+ /**
614
+ * 默认图形大小
615
+ */
616
+ static size = 100;
617
+
618
+ /**
619
+ * 圆/椭圆 对应的 Konva 实例
620
+ */
621
+ private circle: Konva.Ellipse;
622
+
623
+ constructor(render: Render, dropPoint: Konva.Vector2d) {
624
+ super(render, dropPoint, {
625
+ type: "Circle",
626
+ anchors: [
627
+ { adjustType: 'top' },
628
+ { adjustType: 'bottom' },
629
+ { adjustType: 'left' },
630
+ { adjustType: 'right' },
631
+ { adjustType: 'top-left' },
632
+ { adjustType: 'top-right' },
633
+ { adjustType: 'bottom-left' },
634
+ { adjustType: 'bottom-right' }
635
+ ].map((o) => ({ adjustType: o.adjustType })),
636
+ linkAnchors: [
637
+ { x: 0, y: 0, alias: 'top', direction: 'top' },
638
+ { x: 0, y: 0, alias: 'bottom', direction: 'bottom' },
639
+ { x: 0, y: 0, alias: 'left', direction: 'left' },
640
+ { x: 0, y: 0, alias: 'right', direction: 'right' },
641
+ { x: 0, y: 0, alias: 'center' }
642
+ ] as AssetInfoPoint[]
643
+ });
644
+ this.circle = new Konva.Ellipse({
645
+ name: 'graph',
646
+ x: 0,
647
+ y: 0,
648
+ radiusX: 0,
649
+ radiusY: 0,
650
+ stroke: "#000000",
651
+ strokeWidth: 1,
652
+ });
653
+ this.group.add(this.circle);
654
+ this.group.position(this.dropPoint); // 鼠标按下位置 作为起点
655
+ }
656
+
657
+ // 实现:拖动进行时
658
+ override drawMove(point: Konva.Vector2d): void {
659
+ // 鼠标拖动偏移量
660
+ let offsetX = point.x - this.dropPoint.x,
661
+ offsetY = point.y - this.dropPoint.y;
662
+ if (offsetX < 1) offsetX = 1;
663
+ if (offsetY < 1) offsetY = 1;
664
+ // 半径
665
+ const radiusX = offsetX / 2, radiusY = offsetY / 2;
666
+ // 圆/椭圆 位置大小
667
+ this.circle.x(radiusX);
668
+ this.circle.y(radiusY);
669
+ this.circle.radiusX(radiusX);
670
+ this.circle.radiusY(radiusY);
671
+ this.group.size({ width: offsetX, height: offsetY });
672
+ Circle.updateAnchorShadows(this.group, this.anchorShadows);
673
+ Circle.updateLinkAnchorShadows(this.group, this.linkAnchorShadows);
674
+ this.render.redraw([GraphDraw.NAME, LinkDraw.NAME, PreviewDraw.NAME]);
675
+ }
676
+
677
+ // 实现:拖动结束
678
+ override drawEnd(): void {
679
+ if (this.circle.radiusX() <= 1 && this.circle.radiusY() <= 1) {
680
+ const width = Circle.size, height = width;
681
+ const radiusX = Circle.size / 2, radiusY = radiusX;
682
+ this.circle.x(radiusX);
683
+ this.circle.y(radiusY);
684
+ this.circle.radiusX(radiusX - this.circle.strokeWidth());
685
+ this.circle.radiusY(radiusY - this.circle.strokeWidth());
686
+ this.group.size({ width, height });
687
+ // 更新 图形 的 调整点 的 锚点位置
688
+ Circle.updateAnchorShadows(this.group, this.anchorShadows);
689
+ // 更新 图形 的 连接点 的 锚点位置
690
+ Circle.updateLinkAnchorShadows(this.group, this.linkAnchorShadows);
691
+ // 对齐线清除
692
+ this.render.attractTool.alignLinesClear();
693
+ // 更新历史
694
+ this.render.updateHistory();
695
+ // 重绘
696
+ this.render.redraw([GraphDraw.NAME, LinkDraw.NAME, PreviewDraw.NAME]);
697
+ }
698
+ super.drawEnd();
699
+ }
700
700
  }