dcim-topology2d 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (512) hide show
  1. package/activity-diagram/index.d.ts +5 -0
  2. package/activity-diagram/index.js +6 -0
  3. package/activity-diagram/index.js.map +1 -0
  4. package/activity-diagram/src/final/final.d.ts +2 -0
  5. package/activity-diagram/src/final/final.js +10 -0
  6. package/activity-diagram/src/final/final.js.map +1 -0
  7. package/activity-diagram/src/final/final.rect.d.ts +3 -0
  8. package/activity-diagram/src/final/final.rect.js +11 -0
  9. package/activity-diagram/src/final/final.rect.js.map +1 -0
  10. package/activity-diagram/src/final/index.d.ts +2 -0
  11. package/activity-diagram/src/final/index.js +3 -0
  12. package/activity-diagram/src/final/index.js.map +1 -0
  13. package/activity-diagram/src/fork/fork.anchor.d.ts +3 -0
  14. package/activity-diagram/src/fork/fork.anchor.js +28 -0
  15. package/activity-diagram/src/fork/fork.anchor.js.map +1 -0
  16. package/activity-diagram/src/fork/fork.d.ts +2 -0
  17. package/activity-diagram/src/fork/fork.js +25 -0
  18. package/activity-diagram/src/fork/fork.js.map +1 -0
  19. package/activity-diagram/src/fork/fork.rect.d.ts +3 -0
  20. package/activity-diagram/src/fork/fork.rect.js +9 -0
  21. package/activity-diagram/src/fork/fork.rect.js.map +1 -0
  22. package/activity-diagram/src/fork/index.d.ts +3 -0
  23. package/activity-diagram/src/fork/index.js +4 -0
  24. package/activity-diagram/src/fork/index.js.map +1 -0
  25. package/activity-diagram/src/register.d.ts +1 -0
  26. package/activity-diagram/src/register.js +13 -0
  27. package/activity-diagram/src/register.js.map +1 -0
  28. package/activity-diagram/src/swimlaneH/index.d.ts +2 -0
  29. package/activity-diagram/src/swimlaneH/index.js +3 -0
  30. package/activity-diagram/src/swimlaneH/index.js.map +1 -0
  31. package/activity-diagram/src/swimlaneH/swimlaneH.d.ts +2 -0
  32. package/activity-diagram/src/swimlaneH/swimlaneH.js +27 -0
  33. package/activity-diagram/src/swimlaneH/swimlaneH.js.map +1 -0
  34. package/activity-diagram/src/swimlaneH/swimlaneH.rect.d.ts +3 -0
  35. package/activity-diagram/src/swimlaneH/swimlaneH.rect.js +9 -0
  36. package/activity-diagram/src/swimlaneH/swimlaneH.rect.js.map +1 -0
  37. package/activity-diagram/src/swimlaneV/index.d.ts +2 -0
  38. package/activity-diagram/src/swimlaneV/index.js +3 -0
  39. package/activity-diagram/src/swimlaneV/index.js.map +1 -0
  40. package/activity-diagram/src/swimlaneV/swimlaneV.d.ts +2 -0
  41. package/activity-diagram/src/swimlaneV/swimlaneV.js +27 -0
  42. package/activity-diagram/src/swimlaneV/swimlaneV.js.map +1 -0
  43. package/activity-diagram/src/swimlaneV/swimlaneV.rect.d.ts +3 -0
  44. package/activity-diagram/src/swimlaneV/swimlaneV.rect.js +9 -0
  45. package/activity-diagram/src/swimlaneV/swimlaneV.rect.js.map +1 -0
  46. package/chart-diagram/index.d.ts +3 -0
  47. package/chart-diagram/index.js +4 -0
  48. package/chart-diagram/index.js.map +1 -0
  49. package/chart-diagram/src/echarts/echarts.min.js +22 -0
  50. package/chart-diagram/src/echarts/index.d.ts +4 -0
  51. package/chart-diagram/src/echarts/index.js +104 -0
  52. package/chart-diagram/src/echarts/index.js.map +1 -0
  53. package/chart-diagram/src/register.d.ts +1 -0
  54. package/chart-diagram/src/register.js +12 -0
  55. package/chart-diagram/src/register.js.map +1 -0
  56. package/class-diagram/index.d.ts +2 -0
  57. package/class-diagram/index.js +3 -0
  58. package/class-diagram/index.js.map +1 -0
  59. package/class-diagram/src/class/class.d.ts +3 -0
  60. package/class-diagram/src/class/class.js +56 -0
  61. package/class-diagram/src/class/class.js.map +1 -0
  62. package/class-diagram/src/class/class.rect.d.ts +5 -0
  63. package/class-diagram/src/class/class.rect.js +16 -0
  64. package/class-diagram/src/class/class.rect.js.map +1 -0
  65. package/class-diagram/src/class/index.d.ts +2 -0
  66. package/class-diagram/src/class/index.js +3 -0
  67. package/class-diagram/src/class/index.js.map +1 -0
  68. package/class-diagram/src/register.d.ts +1 -0
  69. package/class-diagram/src/register.js +7 -0
  70. package/class-diagram/src/register.js.map +1 -0
  71. package/core/index.d.ts +8 -0
  72. package/core/index.js +26 -0
  73. package/core/index.js.map +1 -0
  74. package/core/src/activeLayer.d.ts +55 -0
  75. package/core/src/activeLayer.js +679 -0
  76. package/core/src/activeLayer.js.map +1 -0
  77. package/core/src/animateLayer.d.ts +23 -0
  78. package/core/src/animateLayer.js +227 -0
  79. package/core/src/animateLayer.js.map +1 -0
  80. package/core/src/calling.d.ts +37 -0
  81. package/core/src/calling.js +253 -0
  82. package/core/src/canvas.d.ts +19 -0
  83. package/core/src/canvas.js +81 -0
  84. package/core/src/canvas.js.map +1 -0
  85. package/core/src/common.d.ts +102 -0
  86. package/core/src/common.js +1254 -0
  87. package/core/src/core.d.ts +104 -0
  88. package/core/src/core.js +2281 -0
  89. package/core/src/core.js.map +1 -0
  90. package/core/src/divLayer.d.ts +61 -0
  91. package/core/src/divLayer.js +485 -0
  92. package/core/src/divLayer.js.map +1 -0
  93. package/core/src/healps/changeData.d.ts +8 -0
  94. package/core/src/healps/changeData.js +205 -0
  95. package/core/src/healps/index.d.ts +1 -0
  96. package/core/src/healps/index.js +1 -0
  97. package/core/src/hoverLayer.d.ts +32 -0
  98. package/core/src/hoverLayer.js +199 -0
  99. package/core/src/hoverLayer.js.map +1 -0
  100. package/core/src/layer.d.ts +5 -0
  101. package/core/src/layer.js +11 -0
  102. package/core/src/layer.js.map +1 -0
  103. package/core/src/middles/arrows/circle.d.ts +3 -0
  104. package/core/src/middles/arrows/circle.js +20 -0
  105. package/core/src/middles/arrows/circle.js.map +1 -0
  106. package/core/src/middles/arrows/diamond.d.ts +3 -0
  107. package/core/src/middles/arrows/diamond.js +28 -0
  108. package/core/src/middles/arrows/diamond.js.map +1 -0
  109. package/core/src/middles/arrows/line.d.ts +4 -0
  110. package/core/src/middles/arrows/line.js +42 -0
  111. package/core/src/middles/arrows/line.js.map +1 -0
  112. package/core/src/middles/arrows/triangle.d.ts +3 -0
  113. package/core/src/middles/arrows/triangle.js +25 -0
  114. package/core/src/middles/arrows/triangle.js.map +1 -0
  115. package/core/src/middles/default.anchor.d.ts +2 -0
  116. package/core/src/middles/default.anchor.js +9 -0
  117. package/core/src/middles/default.anchor.js.map +1 -0
  118. package/core/src/middles/default.d.ts +12 -0
  119. package/core/src/middles/default.js +257 -0
  120. package/core/src/middles/default.js.map +1 -0
  121. package/core/src/middles/default.rect.d.ts +3 -0
  122. package/core/src/middles/default.rect.js +19 -0
  123. package/core/src/middles/default.rect.js.map +1 -0
  124. package/core/src/middles/index.d.ts +3 -0
  125. package/core/src/middles/index.js +4 -0
  126. package/core/src/middles/index.js.map +1 -0
  127. package/core/src/middles/lines/curve.d.ts +10 -0
  128. package/core/src/middles/lines/curve.js +127 -0
  129. package/core/src/middles/lines/curve.js.map +1 -0
  130. package/core/src/middles/lines/line.d.ts +4 -0
  131. package/core/src/middles/lines/line.js +11 -0
  132. package/core/src/middles/lines/line.js.map +1 -0
  133. package/core/src/middles/lines/mind.d.ts +6 -0
  134. package/core/src/middles/lines/mind.js +90 -0
  135. package/core/src/middles/lines/mind.js.map +1 -0
  136. package/core/src/middles/lines/polyline.d.ts +7 -0
  137. package/core/src/middles/lines/polyline.js +309 -0
  138. package/core/src/middles/lines/polyline.js.map +1 -0
  139. package/core/src/middles/nodes/arbitrarygraph.anchor.d.ts +2 -0
  140. package/core/src/middles/nodes/arbitrarygraph.anchor.js +18 -0
  141. package/core/src/middles/nodes/arbitrarygraph.d.ts +2 -0
  142. package/core/src/middles/nodes/arbitrarygraph.js +17 -0
  143. package/core/src/middles/nodes/arrow.anchor.d.ts +2 -0
  144. package/core/src/middles/nodes/arrow.anchor.js +7 -0
  145. package/core/src/middles/nodes/arrow.anchor.js.map +1 -0
  146. package/core/src/middles/nodes/arrow.d.ts +4 -0
  147. package/core/src/middles/nodes/arrow.js +44 -0
  148. package/core/src/middles/nodes/arrow.js.map +1 -0
  149. package/core/src/middles/nodes/arrow.rect.d.ts +7 -0
  150. package/core/src/middles/nodes/arrow.rect.js +23 -0
  151. package/core/src/middles/nodes/arrow.rect.js.map +1 -0
  152. package/core/src/middles/nodes/circle.anchor.d.ts +2 -0
  153. package/core/src/middles/nodes/circle.anchor.js +18 -0
  154. package/core/src/middles/nodes/circle.anchor.js.map +1 -0
  155. package/core/src/middles/nodes/circle.d.ts +2 -0
  156. package/core/src/middles/nodes/circle.js +7 -0
  157. package/core/src/middles/nodes/circle.js.map +1 -0
  158. package/core/src/middles/nodes/circle.rect.d.ts +3 -0
  159. package/core/src/middles/nodes/circle.rect.js +27 -0
  160. package/core/src/middles/nodes/circle.rect.js.map +1 -0
  161. package/core/src/middles/nodes/cloud.anchor.d.ts +2 -0
  162. package/core/src/middles/nodes/cloud.anchor.js +9 -0
  163. package/core/src/middles/nodes/cloud.anchor.js.map +1 -0
  164. package/core/src/middles/nodes/cloud.d.ts +2 -0
  165. package/core/src/middles/nodes/cloud.js +11 -0
  166. package/core/src/middles/nodes/cloud.js.map +1 -0
  167. package/core/src/middles/nodes/cloud.rect.d.ts +3 -0
  168. package/core/src/middles/nodes/cloud.rect.js +9 -0
  169. package/core/src/middles/nodes/cloud.rect.js.map +1 -0
  170. package/core/src/middles/nodes/cube.anchor.d.ts +2 -0
  171. package/core/src/middles/nodes/cube.anchor.js +10 -0
  172. package/core/src/middles/nodes/cube.anchor.js.map +1 -0
  173. package/core/src/middles/nodes/cube.d.ts +2 -0
  174. package/core/src/middles/nodes/cube.js +5 -0
  175. package/core/src/middles/nodes/cube.js.map +1 -0
  176. package/core/src/middles/nodes/cube.model.d.ts +14 -0
  177. package/core/src/middles/nodes/cube.model.js +64 -0
  178. package/core/src/middles/nodes/cube.model.js.map +1 -0
  179. package/core/src/middles/nodes/cube.rect.d.ts +3 -0
  180. package/core/src/middles/nodes/cube.rect.js +11 -0
  181. package/core/src/middles/nodes/cube.rect.js.map +1 -0
  182. package/core/src/middles/nodes/diamond.d.ts +2 -0
  183. package/core/src/middles/nodes/diamond.js +11 -0
  184. package/core/src/middles/nodes/diamond.js.map +1 -0
  185. package/core/src/middles/nodes/diamond.rect.d.ts +3 -0
  186. package/core/src/middles/nodes/diamond.rect.js +27 -0
  187. package/core/src/middles/nodes/diamond.rect.js.map +1 -0
  188. package/core/src/middles/nodes/file.d.ts +2 -0
  189. package/core/src/middles/nodes/file.js +16 -0
  190. package/core/src/middles/nodes/file.js.map +1 -0
  191. package/core/src/middles/nodes/formtable.d.ts +2 -0
  192. package/core/src/middles/nodes/formtable.js +100 -0
  193. package/core/src/middles/nodes/hexagon.anchor.d.ts +2 -0
  194. package/core/src/middles/nodes/hexagon.anchor.js +21 -0
  195. package/core/src/middles/nodes/hexagon.anchor.js.map +1 -0
  196. package/core/src/middles/nodes/hexagon.d.ts +2 -0
  197. package/core/src/middles/nodes/hexagon.js +14 -0
  198. package/core/src/middles/nodes/hexagon.js.map +1 -0
  199. package/core/src/middles/nodes/hexagon.rect.d.ts +3 -0
  200. package/core/src/middles/nodes/hexagon.rect.js +14 -0
  201. package/core/src/middles/nodes/hexagon.rect.js.map +1 -0
  202. package/core/src/middles/nodes/image.anchor.d.ts +2 -0
  203. package/core/src/middles/nodes/image.anchor.js +12 -0
  204. package/core/src/middles/nodes/image.anchor.js.map +1 -0
  205. package/core/src/middles/nodes/image.rect.d.ts +3 -0
  206. package/core/src/middles/nodes/image.rect.js +65 -0
  207. package/core/src/middles/nodes/image.rect.js.map +1 -0
  208. package/core/src/middles/nodes/line.anchor.d.ts +2 -0
  209. package/core/src/middles/nodes/line.anchor.js +13 -0
  210. package/core/src/middles/nodes/line.anchor.js.map +1 -0
  211. package/core/src/middles/nodes/line.d.ts +2 -0
  212. package/core/src/middles/nodes/line.js +9 -0
  213. package/core/src/middles/nodes/line.js.map +1 -0
  214. package/core/src/middles/nodes/line.rect.d.ts +3 -0
  215. package/core/src/middles/nodes/line.rect.js +9 -0
  216. package/core/src/middles/nodes/line.rect.js.map +1 -0
  217. package/core/src/middles/nodes/message.anchor.d.ts +2 -0
  218. package/core/src/middles/nodes/message.anchor.js +9 -0
  219. package/core/src/middles/nodes/message.anchor.js.map +1 -0
  220. package/core/src/middles/nodes/message.d.ts +2 -0
  221. package/core/src/middles/nodes/message.js +14 -0
  222. package/core/src/middles/nodes/message.js.map +1 -0
  223. package/core/src/middles/nodes/message.rect.d.ts +3 -0
  224. package/core/src/middles/nodes/message.rect.js +10 -0
  225. package/core/src/middles/nodes/message.rect.js.map +1 -0
  226. package/core/src/middles/nodes/pentagon.anchor.d.ts +2 -0
  227. package/core/src/middles/nodes/pentagon.anchor.js +10 -0
  228. package/core/src/middles/nodes/pentagon.anchor.js.map +1 -0
  229. package/core/src/middles/nodes/pentagon.d.ts +2 -0
  230. package/core/src/middles/nodes/pentagon.js +12 -0
  231. package/core/src/middles/nodes/pentagon.js.map +1 -0
  232. package/core/src/middles/nodes/pentagon.rect.d.ts +3 -0
  233. package/core/src/middles/nodes/pentagon.rect.js +23 -0
  234. package/core/src/middles/nodes/pentagon.rect.js.map +1 -0
  235. package/core/src/middles/nodes/pentagram.anchor.d.ts +2 -0
  236. package/core/src/middles/nodes/pentagram.anchor.js +10 -0
  237. package/core/src/middles/nodes/pentagram.anchor.js.map +1 -0
  238. package/core/src/middles/nodes/pentagram.d.ts +2 -0
  239. package/core/src/middles/nodes/pentagram.js +11 -0
  240. package/core/src/middles/nodes/pentagram.js.map +1 -0
  241. package/core/src/middles/nodes/pentagram.rect.d.ts +3 -0
  242. package/core/src/middles/nodes/pentagram.rect.js +11 -0
  243. package/core/src/middles/nodes/pentagram.rect.js.map +1 -0
  244. package/core/src/middles/nodes/people.d.ts +2 -0
  245. package/core/src/middles/nodes/people.js +17 -0
  246. package/core/src/middles/nodes/people.js.map +1 -0
  247. package/core/src/middles/nodes/people.rect.d.ts +3 -0
  248. package/core/src/middles/nodes/people.rect.js +9 -0
  249. package/core/src/middles/nodes/people.rect.js.map +1 -0
  250. package/core/src/middles/nodes/rectangle.d.ts +2 -0
  251. package/core/src/middles/nodes/rectangle.js +25 -0
  252. package/core/src/middles/nodes/rectangle.js.map +1 -0
  253. package/core/src/middles/nodes/rectangle.rect.d.ts +3 -0
  254. package/core/src/middles/nodes/rectangle.rect.js +11 -0
  255. package/core/src/middles/nodes/rectangle.rect.js.map +1 -0
  256. package/core/src/middles/nodes/tablePagination.d.ts +2 -0
  257. package/core/src/middles/nodes/tablePagination.js +106 -0
  258. package/core/src/middles/nodes/text.d.ts +8 -0
  259. package/core/src/middles/nodes/text.js +295 -0
  260. package/core/src/middles/nodes/text.js.map +1 -0
  261. package/core/src/middles/nodes/triangle.anchor.d.ts +2 -0
  262. package/core/src/middles/nodes/triangle.anchor.js +9 -0
  263. package/core/src/middles/nodes/triangle.anchor.js.map +1 -0
  264. package/core/src/middles/nodes/triangle.d.ts +2 -0
  265. package/core/src/middles/nodes/triangle.js +10 -0
  266. package/core/src/middles/nodes/triangle.js.map +1 -0
  267. package/core/src/middles/nodes/triangle.rect.d.ts +3 -0
  268. package/core/src/middles/nodes/triangle.rect.js +23 -0
  269. package/core/src/middles/nodes/triangle.rect.js.map +1 -0
  270. package/core/src/models/data.d.ts +26 -0
  271. package/core/src/models/data.js +77 -0
  272. package/core/src/models/data.js.map +1 -0
  273. package/core/src/models/direction.d.ts +7 -0
  274. package/core/src/models/direction.js +9 -0
  275. package/core/src/models/direction.js.map +1 -0
  276. package/core/src/models/event.d.ts +13 -0
  277. package/core/src/models/event.js +16 -0
  278. package/core/src/models/event.js.map +1 -0
  279. package/core/src/models/index.d.ts +9 -0
  280. package/core/src/models/index.js +10 -0
  281. package/core/src/models/index.js.map +1 -0
  282. package/core/src/models/line.d.ts +53 -0
  283. package/core/src/models/line.js +442 -0
  284. package/core/src/models/line.js.map +1 -0
  285. package/core/src/models/node.d.ts +95 -0
  286. package/core/src/models/node.js +944 -0
  287. package/core/src/models/node.js.map +1 -0
  288. package/core/src/models/pen.d.ts +122 -0
  289. package/core/src/models/pen.js +362 -0
  290. package/core/src/models/pen.js.map +1 -0
  291. package/core/src/models/point.d.ts +25 -0
  292. package/core/src/models/point.js +59 -0
  293. package/core/src/models/point.js.map +1 -0
  294. package/core/src/models/rect.d.ts +22 -0
  295. package/core/src/models/rect.js +93 -0
  296. package/core/src/models/rect.js.map +1 -0
  297. package/core/src/models/status.d.ts +10 -0
  298. package/core/src/models/status.js +13 -0
  299. package/core/src/models/status.js.map +1 -0
  300. package/core/src/mqtt.d.ts +14 -0
  301. package/core/src/mqtt.js +82 -0
  302. package/core/src/mqtt.js.map +1 -0
  303. package/core/src/mqtt.min.d.ts +2 -0
  304. package/core/src/mqtt.min.js +2447 -0
  305. package/core/src/mqtt.min.js.map +1 -0
  306. package/core/src/offscreen.d.ts +16 -0
  307. package/core/src/offscreen.js +70 -0
  308. package/core/src/offscreen.js.map +1 -0
  309. package/core/src/options.d.ts +66 -0
  310. package/core/src/options.js +42 -0
  311. package/core/src/options.js.map +1 -0
  312. package/core/src/poll.js +39 -0
  313. package/core/src/preview.d.ts +29 -0
  314. package/core/src/preview.js +247 -0
  315. package/core/src/renderLayer.d.ts +36 -0
  316. package/core/src/renderLayer.js +187 -0
  317. package/core/src/renderLayer.js.map +1 -0
  318. package/core/src/socket.d.ts +10 -0
  319. package/core/src/socket.js +51 -0
  320. package/core/src/socket.js.map +1 -0
  321. package/core/src/utils/browser.d.ts +1 -0
  322. package/core/src/utils/browser.js +4 -0
  323. package/core/src/utils/browser.js.map +1 -0
  324. package/core/src/utils/canvas.d.ts +13 -0
  325. package/core/src/utils/canvas.js +84 -0
  326. package/core/src/utils/canvas.js.map +1 -0
  327. package/core/src/utils/construction.d.ts +41 -0
  328. package/core/src/utils/construction.js +36 -0
  329. package/core/src/utils/conversion.d.ts +0 -0
  330. package/core/src/utils/conversion.js +0 -0
  331. package/core/src/utils/dom.d.ts +8 -0
  332. package/core/src/utils/dom.js +67 -0
  333. package/core/src/utils/dom.js.map +1 -0
  334. package/core/src/utils/index.d.ts +9 -0
  335. package/core/src/utils/index.js +10 -0
  336. package/core/src/utils/index.js.map +1 -0
  337. package/core/src/utils/math.d.ts +3 -0
  338. package/core/src/utils/math.js +118 -0
  339. package/core/src/utils/math.js.map +1 -0
  340. package/core/src/utils/onmousevent.d.ts +5 -0
  341. package/core/src/utils/onmousevent.js +57 -0
  342. package/core/src/utils/padding.d.ts +7 -0
  343. package/core/src/utils/padding.js +47 -0
  344. package/core/src/utils/padding.js.map +1 -0
  345. package/core/src/utils/rect.d.ts +7 -0
  346. package/core/src/utils/rect.js +72 -0
  347. package/core/src/utils/rect.js.map +1 -0
  348. package/core/src/utils/uuid.d.ts +4 -0
  349. package/core/src/utils/uuid.js +13 -0
  350. package/core/src/utils/uuid.js.map +1 -0
  351. package/flow-diagram/index.d.ts +12 -0
  352. package/flow-diagram/index.js +13 -0
  353. package/flow-diagram/index.js.map +1 -0
  354. package/flow-diagram/src/comment/comment.anchor.d.ts +2 -0
  355. package/flow-diagram/src/comment/comment.anchor.js +5 -0
  356. package/flow-diagram/src/comment/comment.anchor.js.map +1 -0
  357. package/flow-diagram/src/comment/comment.d.ts +2 -0
  358. package/flow-diagram/src/comment/comment.js +10 -0
  359. package/flow-diagram/src/comment/comment.js.map +1 -0
  360. package/flow-diagram/src/comment/index.d.ts +2 -0
  361. package/flow-diagram/src/comment/index.js +3 -0
  362. package/flow-diagram/src/comment/index.js.map +1 -0
  363. package/flow-diagram/src/data/data.anchor.d.ts +2 -0
  364. package/flow-diagram/src/data/data.anchor.js +8 -0
  365. package/flow-diagram/src/data/data.anchor.js.map +1 -0
  366. package/flow-diagram/src/data/data.d.ts +2 -0
  367. package/flow-diagram/src/data/data.js +12 -0
  368. package/flow-diagram/src/data/data.js.map +1 -0
  369. package/flow-diagram/src/data/data.rect.d.ts +3 -0
  370. package/flow-diagram/src/data/data.rect.js +9 -0
  371. package/flow-diagram/src/data/data.rect.js.map +1 -0
  372. package/flow-diagram/src/data/index.d.ts +3 -0
  373. package/flow-diagram/src/data/index.js +4 -0
  374. package/flow-diagram/src/data/index.js.map +1 -0
  375. package/flow-diagram/src/db/db.d.ts +2 -0
  376. package/flow-diagram/src/db/db.js +14 -0
  377. package/flow-diagram/src/db/db.js.map +1 -0
  378. package/flow-diagram/src/db/db.rect.d.ts +4 -0
  379. package/flow-diagram/src/db/db.rect.js +9 -0
  380. package/flow-diagram/src/db/db.rect.js.map +1 -0
  381. package/flow-diagram/src/db/index.d.ts +2 -0
  382. package/flow-diagram/src/db/index.js +3 -0
  383. package/flow-diagram/src/db/index.js.map +1 -0
  384. package/flow-diagram/src/display/display.anchor.d.ts +2 -0
  385. package/flow-diagram/src/display/display.anchor.js +8 -0
  386. package/flow-diagram/src/display/display.anchor.js.map +1 -0
  387. package/flow-diagram/src/display/display.d.ts +2 -0
  388. package/flow-diagram/src/display/display.js +13 -0
  389. package/flow-diagram/src/display/display.js.map +1 -0
  390. package/flow-diagram/src/display/display.rect.d.ts +3 -0
  391. package/flow-diagram/src/display/display.rect.js +9 -0
  392. package/flow-diagram/src/display/display.rect.js.map +1 -0
  393. package/flow-diagram/src/display/index.d.ts +3 -0
  394. package/flow-diagram/src/display/index.js +4 -0
  395. package/flow-diagram/src/display/index.js.map +1 -0
  396. package/flow-diagram/src/document/document.anchor.d.ts +2 -0
  397. package/flow-diagram/src/document/document.anchor.js +8 -0
  398. package/flow-diagram/src/document/document.anchor.js.map +1 -0
  399. package/flow-diagram/src/document/document.d.ts +2 -0
  400. package/flow-diagram/src/document/document.js +15 -0
  401. package/flow-diagram/src/document/document.js.map +1 -0
  402. package/flow-diagram/src/document/document.rect.d.ts +3 -0
  403. package/flow-diagram/src/document/document.rect.js +9 -0
  404. package/flow-diagram/src/document/document.rect.js.map +1 -0
  405. package/flow-diagram/src/document/index.d.ts +3 -0
  406. package/flow-diagram/src/document/index.js +4 -0
  407. package/flow-diagram/src/document/index.js.map +1 -0
  408. package/flow-diagram/src/externStorage/externStorage.anchor.d.ts +2 -0
  409. package/flow-diagram/src/externStorage/externStorage.anchor.js +8 -0
  410. package/flow-diagram/src/externStorage/externStorage.anchor.js.map +1 -0
  411. package/flow-diagram/src/externStorage/externStorage.d.ts +2 -0
  412. package/flow-diagram/src/externStorage/externStorage.js +12 -0
  413. package/flow-diagram/src/externStorage/externStorage.js.map +1 -0
  414. package/flow-diagram/src/externStorage/externStorage.rect.d.ts +3 -0
  415. package/flow-diagram/src/externStorage/externStorage.rect.js +9 -0
  416. package/flow-diagram/src/externStorage/externStorage.rect.js.map +1 -0
  417. package/flow-diagram/src/externStorage/index.d.ts +3 -0
  418. package/flow-diagram/src/externStorage/index.js +4 -0
  419. package/flow-diagram/src/externStorage/index.js.map +1 -0
  420. package/flow-diagram/src/internalStorage/index.d.ts +2 -0
  421. package/flow-diagram/src/internalStorage/index.js +3 -0
  422. package/flow-diagram/src/internalStorage/index.js.map +1 -0
  423. package/flow-diagram/src/internalStorage/internalStorage.d.ts +2 -0
  424. package/flow-diagram/src/internalStorage/internalStorage.js +16 -0
  425. package/flow-diagram/src/internalStorage/internalStorage.js.map +1 -0
  426. package/flow-diagram/src/internalStorage/internalStorage.rect.d.ts +3 -0
  427. package/flow-diagram/src/internalStorage/internalStorage.rect.js +10 -0
  428. package/flow-diagram/src/internalStorage/internalStorage.rect.js.map +1 -0
  429. package/flow-diagram/src/manually/index.d.ts +3 -0
  430. package/flow-diagram/src/manually/index.js +4 -0
  431. package/flow-diagram/src/manually/index.js.map +1 -0
  432. package/flow-diagram/src/manually/manually.anchor.d.ts +2 -0
  433. package/flow-diagram/src/manually/manually.anchor.js +8 -0
  434. package/flow-diagram/src/manually/manually.anchor.js.map +1 -0
  435. package/flow-diagram/src/manually/manually.d.ts +2 -0
  436. package/flow-diagram/src/manually/manually.js +12 -0
  437. package/flow-diagram/src/manually/manually.js.map +1 -0
  438. package/flow-diagram/src/manually/manually.rect.d.ts +3 -0
  439. package/flow-diagram/src/manually/manually.rect.js +9 -0
  440. package/flow-diagram/src/manually/manually.rect.js.map +1 -0
  441. package/flow-diagram/src/parallel/index.d.ts +2 -0
  442. package/flow-diagram/src/parallel/index.js +3 -0
  443. package/flow-diagram/src/parallel/index.js.map +1 -0
  444. package/flow-diagram/src/parallel/parallel.anchor.d.ts +2 -0
  445. package/flow-diagram/src/parallel/parallel.anchor.js +6 -0
  446. package/flow-diagram/src/parallel/parallel.anchor.js.map +1 -0
  447. package/flow-diagram/src/parallel/parallel.d.ts +2 -0
  448. package/flow-diagram/src/parallel/parallel.js +9 -0
  449. package/flow-diagram/src/parallel/parallel.js.map +1 -0
  450. package/flow-diagram/src/queue/index.d.ts +2 -0
  451. package/flow-diagram/src/queue/index.js +3 -0
  452. package/flow-diagram/src/queue/index.js.map +1 -0
  453. package/flow-diagram/src/queue/queue.d.ts +2 -0
  454. package/flow-diagram/src/queue/queue.js +9 -0
  455. package/flow-diagram/src/queue/queue.js.map +1 -0
  456. package/flow-diagram/src/queue/queue.rect.d.ts +3 -0
  457. package/flow-diagram/src/queue/queue.rect.js +11 -0
  458. package/flow-diagram/src/queue/queue.rect.js.map +1 -0
  459. package/flow-diagram/src/register.d.ts +1 -0
  460. package/flow-diagram/src/register.js +26 -0
  461. package/flow-diagram/src/register.js.map +1 -0
  462. package/flow-diagram/src/subprocess/index.d.ts +2 -0
  463. package/flow-diagram/src/subprocess/index.js +3 -0
  464. package/flow-diagram/src/subprocess/index.js.map +1 -0
  465. package/flow-diagram/src/subprocess/subprocess.d.ts +2 -0
  466. package/flow-diagram/src/subprocess/subprocess.js +16 -0
  467. package/flow-diagram/src/subprocess/subprocess.js.map +1 -0
  468. package/flow-diagram/src/subprocess/subprocess.rect.d.ts +3 -0
  469. package/flow-diagram/src/subprocess/subprocess.rect.js +9 -0
  470. package/flow-diagram/src/subprocess/subprocess.rect.js.map +1 -0
  471. package/layout/index.d.ts +2 -0
  472. package/layout/index.js +3 -0
  473. package/layout/index.js.map +1 -0
  474. package/layout/src/align.d.ts +3 -0
  475. package/layout/src/align.js +67 -0
  476. package/layout/src/align.js.map +1 -0
  477. package/layout/src/layout.d.ts +9 -0
  478. package/layout/src/layout.js +50 -0
  479. package/layout/src/layout.js.map +1 -0
  480. package/myShape-diagram/myShape.js +196 -0
  481. package/myShape-diagram/myShape.ts +1 -0
  482. package/package.json +15 -0
  483. package/sequence-diagram/index.d.ts +3 -0
  484. package/sequence-diagram/index.js +4 -0
  485. package/sequence-diagram/index.js.map +1 -0
  486. package/sequence-diagram/src/focus/focus.anchor.d.ts +2 -0
  487. package/sequence-diagram/src/focus/focus.anchor.js +15 -0
  488. package/sequence-diagram/src/focus/focus.anchor.js.map +1 -0
  489. package/sequence-diagram/src/focus/focus.d.ts +2 -0
  490. package/sequence-diagram/src/focus/focus.js +13 -0
  491. package/sequence-diagram/src/focus/focus.js.map +1 -0
  492. package/sequence-diagram/src/focus/focus.rect.d.ts +3 -0
  493. package/sequence-diagram/src/focus/focus.rect.js +9 -0
  494. package/sequence-diagram/src/focus/focus.rect.js.map +1 -0
  495. package/sequence-diagram/src/focus/index.d.ts +3 -0
  496. package/sequence-diagram/src/focus/index.js +4 -0
  497. package/sequence-diagram/src/focus/index.js.map +1 -0
  498. package/sequence-diagram/src/lifeline/index.d.ts +3 -0
  499. package/sequence-diagram/src/lifeline/index.js +4 -0
  500. package/sequence-diagram/src/lifeline/index.js.map +1 -0
  501. package/sequence-diagram/src/lifeline/lifeline.anchor.d.ts +2 -0
  502. package/sequence-diagram/src/lifeline/lifeline.anchor.js +9 -0
  503. package/sequence-diagram/src/lifeline/lifeline.anchor.js.map +1 -0
  504. package/sequence-diagram/src/lifeline/lifeline.d.ts +2 -0
  505. package/sequence-diagram/src/lifeline/lifeline.js +35 -0
  506. package/sequence-diagram/src/lifeline/lifeline.js.map +1 -0
  507. package/sequence-diagram/src/lifeline/lifeline.rect.d.ts +3 -0
  508. package/sequence-diagram/src/lifeline/lifeline.rect.js +9 -0
  509. package/sequence-diagram/src/lifeline/lifeline.rect.js.map +1 -0
  510. package/sequence-diagram/src/register.d.ts +1 -0
  511. package/sequence-diagram/src/register.js +8 -0
  512. package/sequence-diagram/src/register.js.map +1 -0
@@ -0,0 +1,295 @@
1
+ // getWords: Get the word array from text. A single Chinese character is a word.
2
+ export function getWords(txt) {
3
+ var words = [];
4
+ var word = '';
5
+ if (!txt) {
6
+ txt = '';
7
+ }
8
+ for (var i = 0; i < txt.length; ++i) {
9
+ var ch = txt.charCodeAt(i);
10
+ if (ch < 33 || ch > 126) {
11
+ if (word) {
12
+ words.push(word);
13
+ word = '';
14
+ }
15
+ words.push(txt[i]);
16
+ continue;
17
+ }
18
+ else {
19
+ word += txt[i];
20
+ }
21
+ }
22
+ if (word) {
23
+ words.push(word);
24
+ }
25
+ return words;
26
+ }
27
+ // getLines:Get lines of drawing text.
28
+ // words - the word array of text, to avoid spliting a word.
29
+ // maxWidth - the max width of the rect.
30
+ export function getLines(ctx, words, maxWidth, fontSize) {
31
+ var lines = [];
32
+ var currentLine = words[0] || '';
33
+ for (var i = 1; i < words.length; ++i) {
34
+ var word = words[i] || '';
35
+ var text_1 = currentLine + word;
36
+ var chinese = text_1.match(/[\u4e00-\u9fa5]/g) || '';
37
+ var chineseLen = chinese.length;
38
+ if ((text_1.length - chineseLen) * fontSize * 0.5 + chineseLen * fontSize < maxWidth) {
39
+ currentLine += word;
40
+ }
41
+ else {
42
+ lines.push(currentLine);
43
+ currentLine = word;
44
+ }
45
+ }
46
+ lines.push(currentLine);
47
+ return lines;
48
+ }
49
+ function textBk(ctx, str, x, y, height, color) {
50
+ if (!str || !color) {
51
+ return;
52
+ }
53
+ var w = ctx.measureText(str).width;
54
+ ctx.save();
55
+ ctx.fillStyle = color;
56
+ var l = x - w / 2;
57
+ var t = y - height / 2;
58
+ switch (ctx.textAlign) {
59
+ case 'left':
60
+ l = x;
61
+ break;
62
+ case 'right':
63
+ l = x - w;
64
+ break;
65
+ }
66
+ switch (ctx.textBaseline) {
67
+ case 'top':
68
+ t = y;
69
+ break;
70
+ case 'bottom':
71
+ t = y - height;
72
+ break;
73
+ }
74
+ ctx.fillRect(l, t, w, height);
75
+ ctx.restore();
76
+ }
77
+ export function defaultText(ctx, node, type) {
78
+ const fontNode = type === 'head' ? node.font.thFont : node.font;
79
+ const lineHeight = fontNode.lineHeight ? `/${fontNode.lineHeight}` : '';
80
+ ctx.font = `${fontNode.fontStyle || 'normal'} ${fontNode.fontWeight || 'normal'} ${fontNode.fontSize}px ${lineHeight} ${fontNode.fontFamily}`;
81
+ if (fontNode.color) {
82
+ ctx.fillStyle = fontNode.activeColor && !node.activeImgeIndex ? fontNode.activeColor : fontNode.color;
83
+ }
84
+ else {
85
+ ctx.fillStyle = node.name === 'formTable' ? '#fff' : '#222';
86
+ }
87
+ if(node.name === 'tablePagination') return;
88
+ if (fontNode.textAlign) {
89
+ ctx.textAlign = fontNode.textAlign;
90
+ }
91
+ if (fontNode.textBaseline) {
92
+ ctx.textBaseline = fontNode.textBaseline;
93
+ }
94
+ }
95
+
96
+ function tableBaseText(ctx, node, type) {
97
+ defaultText(ctx, node, type)
98
+ switch (ctx.textAlign) {
99
+ case 'left':
100
+ ctx.textAlign = 'right'
101
+ break;
102
+ case 'right':
103
+ ctx.textAlign = 'left'
104
+ break;
105
+ }
106
+ switch (ctx.textBaseline) {
107
+ case 'top':
108
+ ctx.textBaseline = 'bottom'
109
+ break;
110
+ case 'bottom':
111
+ ctx.textBaseline = 'top'
112
+ break;
113
+ }
114
+ }
115
+
116
+ export function fillText(ctx, lines, x, y, width, height, lineHeight, maxLineLen, bk) {
117
+ if (!maxLineLen || maxLineLen > lines.length) {
118
+ maxLineLen = lines.length;
119
+ }
120
+ else {
121
+ maxLineLen = Math.ceil(maxLineLen);
122
+ }
123
+ for (var i = 0; i < maxLineLen - 1; ++i) {
124
+ if (bk) {
125
+ textBk(ctx, lines[i], x, y + i * lineHeight, lineHeight, bk);
126
+ }
127
+ ctx.fillText(lines[i], x, y + i * lineHeight);
128
+ }
129
+ if (maxLineLen < lines.length) {
130
+ var str = (lines[maxLineLen - 1] || '') + '...';
131
+ if (lines[maxLineLen - 1] && ctx.measureText(str).width > width) {
132
+ str = lines[maxLineLen - 1].substr(0, lines[maxLineLen - 1].length - 2) + '...';
133
+ }
134
+ if (bk) {
135
+ textBk(ctx, str, x, y + (maxLineLen - 1) * lineHeight, lineHeight, bk);
136
+ }
137
+ ctx.fillText(str, x, y + (maxLineLen - 1) * lineHeight);
138
+ }
139
+ else {
140
+ if (bk) {
141
+ textBk(ctx, lines[maxLineLen - 1], x, y + (maxLineLen - 1) * lineHeight, lineHeight, bk);
142
+ }
143
+ ctx.fillText(lines[maxLineLen - 1], x, y + (maxLineLen - 1) * lineHeight);
144
+ }
145
+ }
146
+
147
+ export function tableText(ctx, node) {
148
+ const { tableHeader, tableBody, styleNode } = node.formData;
149
+ const boxWidth = node.rect.width / tableHeader.length;
150
+ // 表头文字内容
151
+ tableBaseText(ctx, node, 'head');
152
+ tableHeader.forEach((item, i) => {
153
+ ctx.fillText(item.name, node.rect.x + boxWidth * i + boxWidth/2, node.rect.y + node.formStyle.thHeight/2);
154
+ });
155
+
156
+ if(!tableBody) return;
157
+ // 表格主体文字
158
+ const boxHeight = tableBody.length > 0 ? (node.rect.height - node.formStyle.thHeight) / tableBody.length : 44;
159
+ tableBaseText(ctx, node);
160
+ tableBody.forEach((item, index) => {
161
+ const state = item['state'] || item['status'];
162
+ let fontColor = '';
163
+ // 0:发生告警;1:离线告警;2,3:无告警;4:故障告警
164
+ if(parseInt(state) === 0) fontColor = '#FF0000';
165
+ if(parseInt(state) === 1) fontColor = '#6d6d6d';
166
+ if(parseInt(state) === 4) fontColor = '#D38C00';
167
+ tableHeader.forEach((hnode, i) => {
168
+ const styleData = styleNode ? styleNode[`${index}-${i}`] || styleNode[`row-${i}`] || styleNode[`${index}-col`] : '';
169
+ if(fontColor) {
170
+ ctx.fillStyle = fontColor;
171
+ }else {
172
+ ctx.fillStyle = styleData ? styleData.color : node.font.color;
173
+ }
174
+ const textLength = item[hnode.key].length * node.font.fontSize + 10;
175
+ let textStr = item[hnode.key];
176
+ if(textLength >= boxWidth) textStr = textStr.substring(0, boxWidth/node.font.fontSize- 2) + '...';
177
+ ctx.fillText(textStr, node.rect.x + boxWidth * i + boxWidth/2, node.rect.y + boxHeight * index + node.formStyle.thHeight + boxHeight/2);
178
+ })
179
+ })
180
+ }
181
+
182
+ export function text(ctx, node) {
183
+ if (!node.text) {
184
+ return;
185
+ }
186
+ if (!node.text.split) {
187
+ node.text += '';
188
+ }
189
+ ctx.save();
190
+ ctx.beginPath();
191
+ delete ctx.shadowColor;
192
+ delete ctx.shadowBlur;
193
+ defaultText(ctx, node)
194
+ var textRect = node.getTextRect();
195
+ var lines = [];
196
+ var paragraphs = node.text.split(/[\n]/g);
197
+ for (var i = 0; i < paragraphs.length; ++i) {
198
+ var l = getLines(ctx, getWords(paragraphs[i]), textRect.width, node.font.fontSize);
199
+ lines.push.apply(lines, l);
200
+ }
201
+ var lineHeight = node.font.fontSize * node.font.lineHeight;
202
+ var maxLineLen = node.textMaxLine || lines.length;
203
+ // const rectLines = textRect.height / lineHeight;
204
+ // if (!maxLineLen) {
205
+ // maxLineLen = lines.length > rectLines ? rectLines : lines.length;
206
+ // }
207
+ // By default, the text is center aligned.
208
+ var x = textRect.x + textRect.width / 2;
209
+ var y = textRect.y + (textRect.height - lineHeight * maxLineLen) / 2 + (lineHeight * 4) / 7;
210
+ switch (ctx.textAlign) {
211
+ case 'left':
212
+ x = textRect.x;
213
+ break;
214
+ case 'right':
215
+ x = textRect.x + textRect.width;
216
+ break;
217
+ }
218
+ switch (ctx.textBaseline) {
219
+ case 'top':
220
+ y = textRect.y + (lineHeight - node.font.fontSize) / 2;
221
+ break;
222
+ case 'bottom':
223
+ y = textRect.ey - lineHeight * lines.length + lineHeight;
224
+ break;
225
+ }
226
+ fillText(ctx, lines, x + node.textOffsetX, y + node.textOffsetY, textRect.width, textRect.height, lineHeight, maxLineLen, node.font.background);
227
+ ctx.restore();
228
+ }
229
+ export function iconfont(ctx, node) {
230
+ ctx.save();
231
+ ctx.textAlign = 'center';
232
+ ctx.textBaseline = 'middle';
233
+ var iconRect = node.getIconRect();
234
+ var x = iconRect.x + iconRect.width / 2;
235
+ var y = iconRect.y + iconRect.height / 2;
236
+ switch (node.imageAlign) {
237
+ case 'top':
238
+ y = iconRect.y;
239
+ ctx.textBaseline = 'top';
240
+ break;
241
+ case 'bottom':
242
+ y = iconRect.ey;
243
+ ctx.textBaseline = 'bottom';
244
+ break;
245
+ case 'left':
246
+ x = iconRect.x;
247
+ ctx.textAlign = 'left';
248
+ break;
249
+ case 'right':
250
+ x = iconRect.ex;
251
+ ctx.textAlign = 'right';
252
+ break;
253
+ case 'left-top':
254
+ x = iconRect.x;
255
+ y = iconRect.y;
256
+ ctx.textAlign = 'left';
257
+ ctx.textBaseline = 'top';
258
+ break;
259
+ case 'right-top':
260
+ x = iconRect.ex;
261
+ y = iconRect.y;
262
+ ctx.textAlign = 'right';
263
+ ctx.textBaseline = 'top';
264
+ break;
265
+ case 'left-bottom':
266
+ x = iconRect.x;
267
+ y = iconRect.ey;
268
+ ctx.textAlign = 'left';
269
+ ctx.textBaseline = 'bottom';
270
+ break;
271
+ case 'right-bottom':
272
+ x = iconRect.ex;
273
+ y = iconRect.ey;
274
+ ctx.textAlign = 'right';
275
+ ctx.textBaseline = 'bottom';
276
+ break;
277
+ }
278
+ if (node.iconSize > 0) {
279
+ ctx.font = node.iconSize + "px " + node.iconFamily;
280
+ }
281
+ else if (iconRect.width > iconRect.height) {
282
+ ctx.font = iconRect.height + "px " + node.iconFamily;
283
+ }
284
+ else {
285
+ ctx.font = iconRect.width + "px " + node.iconFamily;
286
+ }
287
+ if (!node.iconColor) {
288
+ node.iconColor = '#2f54eb';
289
+ }
290
+ ctx.fillStyle = node.iconColor;
291
+ ctx.beginPath();
292
+ ctx.fillText(node.icon, x, y);
293
+ ctx.restore();
294
+ }
295
+ //# sourceMappingURL=text.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text.js","sourceRoot":"","sources":["../../../../../packages/core/src/middles/nodes/text.ts"],"names":[],"mappings":"AAG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AAG,MAAM,CAAC;YACvB,GAAG,CAAC,YAAY,GAAG,QAAQ,CAAC;YAC5B,MAAM;QACR,KAAK,cAAc;YACjB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC;YAChB,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC;YAChB,GAAG,CAAC,SAAS,GAAG,OAAO,CAAC;YACxB,GAAG,CAAC,YAAY,GAAG,QAAQ,CAAC;YAC5B,MAAM;KACT;IAED,IAAI,IAAI,CAAC,QAAQ,GAAG,CAAC,EAAE;QACrB,GAAG,CAAC,IAAI,GAAM,IAAI,CAAC,QAAQ,WAAM,IAAI,CAAC,UAAY,CAAC;KACpD;SAAM,IAAI,QAAQ,CAAC,KAAK,GAAG,QAAQ,CAAC,MAAM,EAAE;QAC3C,GAAG,CAAC,IAAI,GAAM,QAAQ,CAAC,MAAM,WAAM,IAAI,CAAC,UAAY,CAAC;KACtD;SAAM;QACL,GAAG,CAAC,IAAI,GAAM,QAAQ,CAAC,KAAK,WAAM,IAAI,CAAC,UAAY,CAAC;KACrD;IACD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;QACnB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;KAC5B;IACD,GAAG,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;IAC/B,GAAG,CAAC,SAAS,EAAE,CAAC;IAChB,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9B,GAAG,CAAC,OAAO,EAAE,CAAC;AAChB,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Node } from '../../models/node';
2
+ export declare function triangleAnchors(node: Node): void;
@@ -0,0 +1,9 @@
1
+ import { Point } from '../../models/point';
2
+ import { Direction } from '../../models/direction';
3
+ export function triangleAnchors(node) {
4
+ node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y, Direction.Up));
5
+ node.anchors.push(new Point(node.rect.x + (node.rect.width * 3) / 4, node.rect.y + node.rect.height / 2, Direction.Right));
6
+ node.anchors.push(new Point(node.rect.x + node.rect.width / 2, node.rect.y + node.rect.height, Direction.Bottom));
7
+ node.anchors.push(new Point(node.rect.x + node.rect.width / 4, node.rect.y + node.rect.height / 2, Direction.Left));
8
+ }
9
+ //# sourceMappingURL=triangle.anchor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"triangle.anchor.js","sourceRoot":"","sources":["../../../../../packages/core/src/middles/nodes/triangle.anchor.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,MAAM,UAAU,eAAe,CAAC,IAAU;IACxC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3F,IAAI,CAAC,OAAO,CAAC,IAAI,CACf,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC,CACxG,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAClH,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;AACtH,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { Node } from '../../models/node';
2
+ export declare function triangle(ctx: CanvasRenderingContext2D, node: Node): void;
@@ -0,0 +1,10 @@
1
+ export function triangle(ctx, node) {
2
+ ctx.beginPath();
3
+ ctx.moveTo(node.rect.x + node.rect.width / 2, node.rect.y);
4
+ ctx.lineTo(node.rect.x + node.rect.width, node.rect.y + node.rect.height);
5
+ ctx.lineTo(node.rect.x, node.rect.y + node.rect.height);
6
+ ctx.closePath();
7
+ (node.fillStyle || node.bkType) && ctx.fill();
8
+ ctx.stroke();
9
+ }
10
+ //# sourceMappingURL=triangle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"triangle.js","sourceRoot":"","sources":["../../../../../packages/core/src/middles/nodes/triangle.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,QAAQ,CAAC,GAA6B,EAAE,IAAU;IAChE,GAAG,CAAC,SAAS,EAAE,CAAC;IAChB,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC3D,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC1E,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxD,GAAG,CAAC,SAAS,EAAE,CAAC;IAChB,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;IAC9C,GAAG,CAAC,MAAM,EAAE,CAAC;AACf,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Node } from '../../models/node';
2
+ export declare function triangleIconRect(node: Node): void;
3
+ export declare function triangleTextRect(node: Node): void;
@@ -0,0 +1,23 @@
1
+ import { Rect } from '../../models/rect';
2
+ export function triangleIconRect(node) {
3
+ var w = (node.rect.width * 2) / 7;
4
+ var h = (node.rect.height * 2) / 7;
5
+ if (w > h) {
6
+ w = h;
7
+ }
8
+ else {
9
+ h = w;
10
+ }
11
+ var top = w;
12
+ if (top < 10) {
13
+ top = 10;
14
+ }
15
+ node.iconRect = new Rect(node.rect.x + (node.rect.width - w) / 2, node.rect.y + top, w, h);
16
+ }
17
+ export function triangleTextRect(node) {
18
+ node.textRect = new Rect(node.rect.x + node.rect.width / 4, node.rect.y + (node.rect.height * 2) / 3, node.rect.width / 2, node.rect.height / 3 - 5);
19
+ var w = node.rect.width / 2;
20
+ var h = (node.rect.height * 3) / 7;
21
+ node.fullTextRect = new Rect(node.rect.x + (node.rect.width - w) / 2, node.rect.y + node.rect.height / 2 - 5, w, h);
22
+ }
23
+ //# sourceMappingURL=triangle.rect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"triangle.rect.js","sourceRoot":"","sources":["../../../../../packages/core/src/middles/nodes/triangle.rect.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,MAAM,UAAU,gBAAgB,CAAC,IAAU;IACzC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,C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AI,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;AACtH,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { Pen } from './pen';
2
+ import { Lock } from './status';
3
+ export declare class TopologyData {
4
+ pens: Pen[];
5
+ lineName: string;
6
+ fromArrowType: string;
7
+ toArrowType: string;
8
+ scale: number;
9
+ locked: Lock;
10
+ bkImage: string;
11
+ bkColor: string;
12
+ grid?: boolean;
13
+ websocket?: string;
14
+ mqttUrl?: string;
15
+ mqttOptions?: {
16
+ clientId?: string;
17
+ username?: string;
18
+ password?: string;
19
+ };
20
+ mqttTopics?: string;
21
+ manualCps?: boolean;
22
+ dataConstruct?: any;
23
+ data?: any;
24
+ bkImageRect?: any;
25
+ constructor(json?: any);
26
+ }
@@ -0,0 +1,77 @@
1
+ import { Node } from './node';
2
+ import { Line } from './line';
3
+ import { Lock } from './status';
4
+ import { s8 } from '../utils';
5
+ var TopologyData = /** @class */ (function () {
6
+ function TopologyData(json) {
7
+ this.pens = [];
8
+ this.lineName = 'curve';
9
+ this.fromArrowType = '';
10
+ this.toArrowType = 'triangleSolid';
11
+ this.scale = 1;
12
+ this.locked = Lock.None;
13
+ this.bkImageRect = null;
14
+ this.mqttOptions = {
15
+ clientId: s8()
16
+ };
17
+ this.dataConstruct = {};
18
+ if (json) {
19
+ this.pens = [];
20
+ json.dataConstruct = {};
21
+ for (var _i = 0, _a = json.pens; _i < _a.length; _i++) {
22
+ var item = _a[_i];
23
+ if (item.from) {
24
+ this.pens.push(new Line(item));
25
+ }
26
+ else {
27
+ if(item.name === 'formTable') {
28
+ json.dataConstruct[item.id] = {
29
+ id: item.id,
30
+ name: 'table'
31
+ }
32
+ }
33
+ this.pens.push(new Node(item));
34
+ }
35
+ }
36
+ this.lineName = json.lineName || 'curve';
37
+ this.fromArrowType = json.fromArrowType || '';
38
+ this.toArrowType = json.toArrowType || 'triangleSolid';
39
+ this.scale = json.scale || 1;
40
+ this.locked = json.locked || Lock.None;
41
+ this.bkImage = json.bkImage;
42
+ this.bkColor = json.bkColor;
43
+ this.grid = json.grid;
44
+ this.manualCps = json.manualCps;
45
+ this.websocket = json.websocket;
46
+ this.mqttUrl = json.mqttUrl;
47
+ this.bkImageRect = json.bkImageRect;
48
+ if (json.mqttOptions) {
49
+ var opts = '';
50
+ if (typeof json.mqttOptions === 'object') {
51
+ opts = JSON.stringify(json.mqttOptions);
52
+ }
53
+ else {
54
+ opts = json.mqttOptions + '';
55
+ }
56
+ this.mqttOptions = JSON.parse(opts);
57
+ }
58
+ else {
59
+ this.mqttOptions = { clientId: s8() };
60
+ }
61
+ this.dataConstruct = json.dataConstruct ? json.dataConstruct : {};
62
+ this.mqttTopics = json.mqttTopics;
63
+ if (typeof json.data === 'object') {
64
+ this.data = JSON.parse(JSON.stringify(json.data));
65
+ }
66
+ else {
67
+ this.data = json.data || '';
68
+ }
69
+ }
70
+ if (!this.mqttOptions) {
71
+ this.mqttOptions = { clientId: s8() };
72
+ }
73
+ }
74
+ return TopologyData;
75
+ }());
76
+ export { TopologyData };
77
+ //# sourceMappingURL=data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data.js","sourceRoot":"","sources":["../../../../packages/core/src/models/data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,EAAE,EAAE,MAAM,UAAU,CAAC;AAE9B;IAsBE,sBAAY,IAAU;QArBtB,SAAI,GAAU,EAAE,CAAC;QACjB,aAAQ,GAAG,OAAO,CAAC;QACnB,kBAAa,GAAG,EAAE,CAAC;QACnB,gBAAW,GAAG,eAAe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AI,CAAC,WAAW,EAAE;gBACpB,IAAI,IAAI,GAAG,EAAE,CAAC;gBACd,IAAI,OAAO,IAAI,CAAC,WAAW,KAAK,QAAQ,EAAE;oBACxC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;iBACzC;qBAAM;oBACL,IAAI,GAAG,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;iBAC9B;gBACD,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;aACrC;iBAAM;gBACL,IAAI,CAAC,WAAW,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;aACvC;YACD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;YAElC,IAAI,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;gBACjC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;aACnD;iBAAM;gBACL,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,IAAI,EAAE,CAAC;aAC7B;SACF;QACD,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACrB,IAAI,CAAC,WAAW,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC;SACvC;IACH,CAAC;IACH,mBAAC;AAAD,CAAC,AAnED,IAmEC"}
@@ -0,0 +1,7 @@
1
+ export declare enum Direction {
2
+ None = 0,
3
+ Up = 1,
4
+ Right = 2,
5
+ Bottom = 3,
6
+ Left = 4
7
+ }
@@ -0,0 +1,9 @@
1
+ export var Direction;
2
+ (function (Direction) {
3
+ Direction[Direction["None"] = 0] = "None";
4
+ Direction[Direction["Up"] = 1] = "Up";
5
+ Direction[Direction["Right"] = 2] = "Right";
6
+ Direction[Direction["Bottom"] = 3] = "Bottom";
7
+ Direction[Direction["Left"] = 4] = "Left";
8
+ })(Direction || (Direction = {}));
9
+ //# sourceMappingURL=direction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"direction.js","sourceRoot":"","sources":["../../../../packages/core/src/models/direction.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,yCAAI,CAAA;IACJ,qCAAE,CAAA;IACF,2CAAK,CAAA;IACL,6CAAM,CAAA;IACN,yCAAI,CAAA;AACN,CAAC,EANW,SAAS,KAAT,SAAS,QAMpB"}
@@ -0,0 +1,13 @@
1
+ export declare enum EventType {
2
+ Click = 0,
3
+ DblClick = 1,
4
+ WebSocket = 2,
5
+ Mqtt = 3
6
+ }
7
+ export declare enum EventAction {
8
+ Link = 0,
9
+ Animate = 1,
10
+ Function = 2,
11
+ WindowFn = 3,
12
+ SetProps = 4
13
+ }
@@ -0,0 +1,16 @@
1
+ export var EventType;
2
+ (function (EventType) {
3
+ EventType[EventType["Click"] = 0] = "Click";
4
+ EventType[EventType["DblClick"] = 1] = "DblClick";
5
+ EventType[EventType["WebSocket"] = 2] = "WebSocket";
6
+ EventType[EventType["Mqtt"] = 3] = "Mqtt";
7
+ })(EventType || (EventType = {}));
8
+ export var EventAction;
9
+ (function (EventAction) {
10
+ EventAction[EventAction["Link"] = 0] = "Link";
11
+ EventAction[EventAction["Animate"] = 1] = "Animate";
12
+ EventAction[EventAction["Function"] = 2] = "Function";
13
+ EventAction[EventAction["WindowFn"] = 3] = "WindowFn";
14
+ EventAction[EventAction["SetProps"] = 4] = "SetProps";
15
+ })(EventAction || (EventAction = {}));
16
+ //# sourceMappingURL=event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event.js","sourceRoot":"","sources":["../../../../packages/core/src/models/event.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,2CAAK,CAAA;IACL,iDAAQ,CAAA;IACR,mDAAS,CAAA;IACT,yCAAI,CAAA;AACN,CAAC,EALW,SAAS,KAAT,SAAS,QAKpB;AAED,MAAM,CAAN,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,6CAAI,CAAA;IACJ,mDAAO,CAAA;IACP,qDAAQ,CAAA;IACR,qDAAQ,CAAA;IACR,qDAAQ,CAAA;AACV,CAAC,EANW,WAAW,KAAX,WAAW,QAMtB"}
@@ -0,0 +1,9 @@
1
+ export * from './data';
2
+ export * from './pen';
3
+ export * from './node';
4
+ export * from './line';
5
+ export * from './direction';
6
+ export * from './point';
7
+ export * from './rect';
8
+ export * from './status';
9
+ export * from './event';
@@ -0,0 +1,10 @@
1
+ export * from './data';
2
+ export * from './pen';
3
+ export * from './node';
4
+ export * from './line';
5
+ export * from './direction';
6
+ export * from './point';
7
+ export * from './rect';
8
+ export * from './status';
9
+ export * from './event';
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/core/src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,53 @@
1
+ import { Pen } from './pen';
2
+ import { Point } from './point';
3
+ import { Rect } from './rect';
4
+ export declare class Line extends Pen {
5
+ from: Point;
6
+ to: Point;
7
+ controlPoints: Point[];
8
+ fromArrow: string;
9
+ toArrow: string;
10
+ fromArrowSize: number;
11
+ toArrowSize: number;
12
+ fromArrowColor: string;
13
+ toArrowColor: string;
14
+ length: number;
15
+ borderWidth: number;
16
+ borderColor: string;
17
+ animateColor: string;
18
+ animateSpan: number;
19
+ animatePos: number;
20
+ animateLineDash: number[];
21
+ isAnimate: boolean;
22
+ animateFromSize: number;
23
+ animateToSize: number;
24
+ animateDot: {
25
+ x: number;
26
+ y: number;
27
+ };
28
+ animateDotSize: number;
29
+ lineJoin: CanvasLineJoin;
30
+ manualCps: boolean;
31
+ disableEmptyLine: boolean;
32
+ constructor(json?: any);
33
+ setFrom(from: Point, fromArrow?: string): void;
34
+ setTo(to: Point, toArrow?: string): void;
35
+ calcControlPoints(force?: boolean): void;
36
+ draw(ctx: CanvasRenderingContext2D): void;
37
+ pointIn(pt: Point): any;
38
+ getLen(): number;
39
+ calcTextRect(): void;
40
+ getTextRect(): Rect;
41
+ getCenter(): Point;
42
+ getLineCenter(from: Point, to: Point): Point;
43
+ getPointByPos(pos: number): Point;
44
+ getLinePtByPos(from: Point, to: Point, pos: number): Point;
45
+ calcRectInParent(parent: Pen): void;
46
+ calcRectByParent(parent: Pen): void;
47
+ animate(now: number): void;
48
+ getBubbles(): any[];
49
+ round(): void;
50
+ translate(x: number, y: number): void;
51
+ scale(scale: number, center: Point): void;
52
+ clone(): Line;
53
+ }