@api-client/ui 0.2.2 → 0.2.4

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 (371) hide show
  1. package/.vscode/settings.json +3 -3
  2. package/build/src/elements/authorization/ui/ApiKeyAuthorization.d.ts +1 -1
  3. package/build/src/elements/authorization/ui/ApiKeyAuthorization.d.ts.map +1 -1
  4. package/build/src/elements/authorization/ui/ApiKeyAuthorization.js +7 -7
  5. package/build/src/elements/authorization/ui/ApiKeyAuthorization.js.map +1 -1
  6. package/build/src/elements/authorization/ui/Authorization.styles.js +4 -4
  7. package/build/src/elements/authorization/ui/Authorization.styles.js.map +1 -1
  8. package/build/src/elements/authorization/ui/BasicAuthorization.d.ts +1 -1
  9. package/build/src/elements/authorization/ui/BasicAuthorization.d.ts.map +1 -1
  10. package/build/src/elements/authorization/ui/BasicAuthorization.js +5 -5
  11. package/build/src/elements/authorization/ui/BasicAuthorization.js.map +1 -1
  12. package/build/src/elements/authorization/ui/BearerAuthorization.d.ts +1 -1
  13. package/build/src/elements/authorization/ui/BearerAuthorization.d.ts.map +1 -1
  14. package/build/src/elements/authorization/ui/BearerAuthorization.js +3 -3
  15. package/build/src/elements/authorization/ui/BearerAuthorization.js.map +1 -1
  16. package/build/src/elements/authorization/ui/NtlmAuthorization.d.ts +1 -1
  17. package/build/src/elements/authorization/ui/NtlmAuthorization.d.ts.map +1 -1
  18. package/build/src/elements/authorization/ui/NtlmAuthorization.js +7 -7
  19. package/build/src/elements/authorization/ui/NtlmAuthorization.js.map +1 -1
  20. package/build/src/elements/authorization/ui/OAuth2Authorization.d.ts +1 -1
  21. package/build/src/elements/authorization/ui/OAuth2Authorization.d.ts.map +1 -1
  22. package/build/src/elements/authorization/ui/OAuth2Authorization.js +32 -27
  23. package/build/src/elements/authorization/ui/OAuth2Authorization.js.map +1 -1
  24. package/build/src/elements/authorization/ui/OidcAuthorization.js +4 -4
  25. package/build/src/elements/authorization/ui/OidcAuthorization.js.map +1 -1
  26. package/build/src/elements/autocomplete/autocomplete-input.d.ts +10 -0
  27. package/build/src/elements/autocomplete/autocomplete-input.d.ts.map +1 -0
  28. package/build/src/{md/text-field/ui-text-field.js → elements/autocomplete/autocomplete-input.js} +9 -9
  29. package/build/src/elements/autocomplete/autocomplete-input.js.map +1 -0
  30. package/build/src/elements/autocomplete/internals/autocomplete.d.ts +209 -0
  31. package/build/src/elements/autocomplete/internals/autocomplete.d.ts.map +1 -0
  32. package/build/src/elements/autocomplete/internals/autocomplete.js +493 -0
  33. package/build/src/elements/autocomplete/internals/autocomplete.js.map +1 -0
  34. package/build/src/elements/autocomplete/internals/autocomplete.styles.d.ts +3 -0
  35. package/build/src/elements/autocomplete/internals/autocomplete.styles.d.ts.map +1 -0
  36. package/build/src/elements/autocomplete/internals/autocomplete.styles.js +25 -0
  37. package/build/src/elements/autocomplete/internals/autocomplete.styles.js.map +1 -0
  38. package/build/src/elements/dialog/internals/DeleteCookieAction.element.d.ts +1 -1
  39. package/build/src/elements/dialog/internals/DeleteCookieAction.element.d.ts.map +1 -1
  40. package/build/src/elements/dialog/internals/DeleteCookieAction.element.js +5 -5
  41. package/build/src/elements/dialog/internals/DeleteCookieAction.element.js.map +1 -1
  42. package/build/src/elements/dialog/internals/Rename.d.ts +1 -1
  43. package/build/src/elements/dialog/internals/Rename.d.ts.map +1 -1
  44. package/build/src/elements/dialog/internals/Rename.js +3 -3
  45. package/build/src/elements/dialog/internals/Rename.js.map +1 -1
  46. package/build/src/elements/dialog/internals/SetCookieAction.element.d.ts +1 -1
  47. package/build/src/elements/dialog/internals/SetCookieAction.element.d.ts.map +1 -1
  48. package/build/src/elements/dialog/internals/SetCookieAction.element.js +9 -9
  49. package/build/src/elements/dialog/internals/SetCookieAction.element.js.map +1 -1
  50. package/build/src/elements/environment/EnvironmentEditor.d.ts +1 -1
  51. package/build/src/elements/environment/EnvironmentEditor.d.ts.map +1 -1
  52. package/build/src/elements/environment/EnvironmentEditor.js +3 -3
  53. package/build/src/elements/environment/EnvironmentEditor.js.map +1 -1
  54. package/build/src/elements/environment/EnvironmentEditor.styles.js +1 -1
  55. package/build/src/elements/environment/EnvironmentEditor.styles.js.map +1 -1
  56. package/build/src/elements/environment/ServerEditor.d.ts +1 -1
  57. package/build/src/elements/environment/ServerEditor.d.ts.map +1 -1
  58. package/build/src/elements/environment/ServerEditor.js +7 -7
  59. package/build/src/elements/environment/ServerEditor.js.map +1 -1
  60. package/build/src/elements/environment/ServerEditor.styles.js +1 -1
  61. package/build/src/elements/environment/ServerEditor.styles.js.map +1 -1
  62. package/build/src/elements/http/BodyMultipartEditor.d.ts.map +1 -1
  63. package/build/src/elements/http/BodyMultipartEditor.js +4 -0
  64. package/build/src/elements/http/BodyMultipartEditor.js.map +1 -1
  65. package/build/src/elements/http/CertificateAdd.element.d.ts +1 -1
  66. package/build/src/elements/http/CertificateAdd.element.d.ts.map +1 -1
  67. package/build/src/elements/http/CertificateAdd.element.js +8 -8
  68. package/build/src/elements/http/CertificateAdd.element.js.map +1 -1
  69. package/build/src/elements/http/CertificateAdd.styles.js +1 -1
  70. package/build/src/elements/http/CertificateAdd.styles.js.map +1 -1
  71. package/build/src/elements/http/HttpAssertions.element.js +3 -3
  72. package/build/src/elements/http/HttpAssertions.element.js.map +1 -1
  73. package/build/src/elements/http/HttpFlows.element.js +3 -3
  74. package/build/src/elements/http/HttpFlows.element.js.map +1 -1
  75. package/build/src/elements/http/HttpFlowsUi.d.ts +1 -1
  76. package/build/src/elements/http/HttpFlowsUi.d.ts.map +1 -1
  77. package/build/src/elements/http/HttpFlowsUi.js +31 -31
  78. package/build/src/elements/http/HttpFlowsUi.js.map +1 -1
  79. package/build/src/elements/http/RequestConfigElement.d.ts +1 -1
  80. package/build/src/elements/http/RequestConfigElement.d.ts.map +1 -1
  81. package/build/src/elements/http/RequestConfigElement.js +7 -7
  82. package/build/src/elements/http/RequestConfigElement.js.map +1 -1
  83. package/build/src/elements/http/UrlParamsForm.d.ts +1 -1
  84. package/build/src/elements/http/UrlParamsForm.d.ts.map +1 -1
  85. package/build/src/elements/http/UrlParamsForm.js +1 -1
  86. package/build/src/elements/http/UrlParamsForm.js.map +1 -1
  87. package/build/src/elements/project/ProjectRunner.d.ts +1 -1
  88. package/build/src/elements/project/ProjectRunner.d.ts.map +1 -1
  89. package/build/src/elements/project/ProjectRunner.js +5 -5
  90. package/build/src/elements/project/ProjectRunner.js.map +1 -1
  91. package/build/src/md/input/Input.d.ts +0 -15
  92. package/build/src/md/input/Input.d.ts.map +1 -1
  93. package/build/src/md/input/Input.js +7 -42
  94. package/build/src/md/input/Input.js.map +1 -1
  95. package/build/src/md/list/internals/List.d.ts +7 -2
  96. package/build/src/md/list/internals/List.d.ts.map +1 -1
  97. package/build/src/md/list/internals/List.js +6 -0
  98. package/build/src/md/list/internals/List.js.map +1 -1
  99. package/build/src/md/list/internals/ListItem.styles.d.ts.map +1 -1
  100. package/build/src/md/list/internals/ListItem.styles.js +8 -0
  101. package/build/src/md/list/internals/ListItem.styles.js.map +1 -1
  102. package/build/src/md/listbox/internals/Listbox.d.ts +2 -2
  103. package/build/src/md/listbox/internals/Listbox.d.ts.map +1 -1
  104. package/build/src/md/listbox/internals/Listbox.js.map +1 -1
  105. package/build/src/md/text-area/internals/TextAreaElement.d.ts.map +1 -1
  106. package/build/src/md/text-area/internals/TextAreaElement.js +0 -5
  107. package/build/src/md/text-area/internals/TextAreaElement.js.map +1 -1
  108. package/build/src/md/text-area/ui-text-area.d.ts.map +1 -1
  109. package/build/src/md/text-area/ui-text-area.js +3 -2
  110. package/build/src/md/text-area/ui-text-area.js.map +1 -1
  111. package/build/src/md/text-field/internals/{TextFieldElement.d.ts → TextField.d.ts} +2 -2
  112. package/build/src/md/text-field/internals/TextField.d.ts.map +1 -0
  113. package/build/src/md/text-field/internals/{TextFieldElement.js → TextField.js} +2 -5
  114. package/build/src/md/text-field/internals/TextField.js.map +1 -0
  115. package/build/src/{visualization/elements/WorkspaceStyles.d.ts → md/text-field/internals/common.styles.d.ts} +1 -1
  116. package/build/src/md/text-field/internals/common.styles.d.ts.map +1 -0
  117. package/build/src/md/text-field/internals/{TextField.styles.js → common.styles.js} +8 -94
  118. package/build/src/md/text-field/internals/common.styles.js.map +1 -0
  119. package/build/src/md/text-field/internals/{TextField.styles.d.ts → filled.styles.d.ts} +1 -1
  120. package/build/src/md/text-field/internals/filled.styles.d.ts.map +1 -0
  121. package/build/src/md/text-field/internals/filled.styles.js +107 -0
  122. package/build/src/md/text-field/internals/filled.styles.js.map +1 -0
  123. package/build/src/md/text-field/internals/outlined.styles.d.ts +3 -0
  124. package/build/src/md/text-field/internals/outlined.styles.d.ts.map +1 -0
  125. package/build/src/md/text-field/internals/outlined.styles.js +43 -0
  126. package/build/src/md/text-field/internals/outlined.styles.js.map +1 -0
  127. package/build/src/md/text-field/ui-filled-text-field.d.ts +11 -0
  128. package/build/src/md/text-field/ui-filled-text-field.d.ts.map +1 -0
  129. package/build/src/md/text-field/ui-filled-text-field.js +28 -0
  130. package/build/src/md/text-field/ui-filled-text-field.js.map +1 -0
  131. package/build/src/md/text-field/ui-outlined-text-field.d.ts +11 -0
  132. package/build/src/md/text-field/ui-outlined-text-field.d.ts.map +1 -0
  133. package/build/src/md/text-field/ui-outlined-text-field.js +28 -0
  134. package/build/src/md/text-field/ui-outlined-text-field.js.map +1 -0
  135. package/build/src/types/input.d.ts +1 -1
  136. package/build/src/types/input.d.ts.map +1 -1
  137. package/build/src/types/input.js.map +1 -1
  138. package/demo/elements/authorization/oauth-authorize.html +4 -4
  139. package/demo/elements/authorization/oauth-authorize.ts +1 -1
  140. package/demo/elements/autocomplete/index.html +24 -0
  141. package/demo/elements/autocomplete/index.ts +123 -0
  142. package/demo/elements/http/body-editor.ts +3 -3
  143. package/demo/elements/index.html +15 -11
  144. package/demo/md/index.html +1 -1
  145. package/demo/md/inputs/input.html +10 -15
  146. package/demo/md/inputs/input.ts +389 -101
  147. package/demo/page.css +4 -0
  148. package/package.json +7 -2
  149. package/src/elements/authorization/ui/ApiKeyAuthorization.ts +7 -7
  150. package/src/elements/authorization/ui/Authorization.styles.ts +4 -4
  151. package/src/elements/authorization/ui/BasicAuthorization.ts +5 -5
  152. package/src/elements/authorization/ui/BearerAuthorization.ts +3 -3
  153. package/src/elements/authorization/ui/NtlmAuthorization.ts +7 -7
  154. package/src/elements/authorization/ui/OAuth2Authorization.ts +32 -27
  155. package/src/elements/authorization/ui/OidcAuthorization.ts +4 -4
  156. package/src/elements/autocomplete/autocomplete-input.ts +14 -0
  157. package/src/elements/autocomplete/internals/autocomplete.styles.ts +25 -0
  158. package/src/elements/autocomplete/internals/autocomplete.ts +490 -0
  159. package/src/elements/dialog/internals/DeleteCookieAction.element.ts +5 -5
  160. package/src/elements/dialog/internals/Rename.ts +3 -3
  161. package/src/elements/dialog/internals/SetCookieAction.element.ts +9 -9
  162. package/src/elements/environment/EnvironmentEditor.styles.ts +1 -1
  163. package/src/elements/environment/EnvironmentEditor.ts +3 -3
  164. package/src/elements/environment/ServerEditor.styles.ts +1 -1
  165. package/src/elements/environment/ServerEditor.ts +7 -7
  166. package/src/elements/http/BodyMultipartEditor.ts +4 -0
  167. package/src/elements/http/CertificateAdd.element.ts +8 -8
  168. package/src/elements/http/CertificateAdd.styles.ts +1 -1
  169. package/src/elements/http/HttpAssertions.element.ts +3 -3
  170. package/src/elements/http/HttpFlows.element.ts +3 -3
  171. package/src/elements/http/HttpFlowsUi.ts +31 -31
  172. package/src/elements/http/RequestConfigElement.ts +7 -7
  173. package/src/elements/http/UrlParamsForm.ts +1 -1
  174. package/src/elements/project/ProjectRunner.ts +5 -5
  175. package/src/md/input/Input.ts +6 -21
  176. package/src/md/list/internals/List.ts +14 -2
  177. package/src/md/list/internals/ListItem.styles.ts +8 -0
  178. package/src/md/listbox/internals/Listbox.ts +2 -2
  179. package/src/md/text-area/internals/TextAreaElement.ts +0 -5
  180. package/src/md/text-area/ui-text-area.ts +3 -2
  181. package/src/md/text-field/internals/{TextFieldElement.ts → TextField.ts} +1 -4
  182. package/src/md/text-field/internals/{TextField.styles.ts → common.styles.ts} +7 -93
  183. package/src/md/text-field/internals/filled.styles.ts +107 -0
  184. package/src/md/text-field/internals/outlined.styles.ts +43 -0
  185. package/src/md/text-field/ui-filled-text-field.ts +16 -0
  186. package/src/md/text-field/ui-outlined-text-field.ts +16 -0
  187. package/src/types/input.ts +0 -1
  188. package/test/elements/authorization/basic-method.test.ts +3 -3
  189. package/test/elements/authorization/bearer-method.test.ts +2 -2
  190. package/test/elements/authorization/ntlm-method.test.ts +4 -4
  191. package/test/elements/autocomplete/autocomplete-input.spec.ts +448 -0
  192. package/test/elements/http/BodyMultipartEditorElement.test.ts +15 -16
  193. package/test/elements/http/CertificateAdd.test.ts +11 -11
  194. package/test/elements/http/HttpAssertions.test.ts +9 -9
  195. package/test/elements/http/HttpFlows.test.ts +4 -4
  196. package/test/env.ts +15 -0
  197. package/test/tsconfig.json +1 -7
  198. package/web-test-runner.config.js +5 -1
  199. package/build/src/md/text-field/internals/TextField.styles.d.ts.map +0 -1
  200. package/build/src/md/text-field/internals/TextField.styles.js.map +0 -1
  201. package/build/src/md/text-field/internals/TextFieldElement.d.ts.map +0 -1
  202. package/build/src/md/text-field/internals/TextFieldElement.js.map +0 -1
  203. package/build/src/md/text-field/ui-text-field.d.ts +0 -11
  204. package/build/src/md/text-field/ui-text-field.d.ts.map +0 -1
  205. package/build/src/md/text-field/ui-text-field.js.map +0 -1
  206. package/build/src/visualization/elements/VizAssociationElement.d.ts +0 -4
  207. package/build/src/visualization/elements/VizAssociationElement.d.ts.map +0 -1
  208. package/build/src/visualization/elements/VizAssociationElement.js +0 -4
  209. package/build/src/visualization/elements/VizAssociationElement.js.map +0 -1
  210. package/build/src/visualization/elements/VizWorkspaceElement.d.ts +0 -110
  211. package/build/src/visualization/elements/VizWorkspaceElement.d.ts.map +0 -1
  212. package/build/src/visualization/elements/VizWorkspaceElement.js +0 -321
  213. package/build/src/visualization/elements/VizWorkspaceElement.js.map +0 -1
  214. package/build/src/visualization/elements/WorkspaceStyles.d.ts.map +0 -1
  215. package/build/src/visualization/elements/WorkspaceStyles.js +0 -168
  216. package/build/src/visualization/elements/WorkspaceStyles.js.map +0 -1
  217. package/build/src/visualization/lib/AnchorFinder.d.ts +0 -64
  218. package/build/src/visualization/lib/AnchorFinder.d.ts.map +0 -1
  219. package/build/src/visualization/lib/AnchorFinder.js +0 -107
  220. package/build/src/visualization/lib/AnchorFinder.js.map +0 -1
  221. package/build/src/visualization/lib/AnchorUtils.d.ts +0 -10
  222. package/build/src/visualization/lib/AnchorUtils.d.ts.map +0 -1
  223. package/build/src/visualization/lib/AnchorUtils.js +0 -44
  224. package/build/src/visualization/lib/AnchorUtils.js.map +0 -1
  225. package/build/src/visualization/lib/AssociationAnchors.d.ts +0 -134
  226. package/build/src/visualization/lib/AssociationAnchors.d.ts.map +0 -1
  227. package/build/src/visualization/lib/AssociationAnchors.js +0 -351
  228. package/build/src/visualization/lib/AssociationAnchors.js.map +0 -1
  229. package/build/src/visualization/lib/LabelSketch.d.ts +0 -16
  230. package/build/src/visualization/lib/LabelSketch.d.ts.map +0 -1
  231. package/build/src/visualization/lib/LabelSketch.js +0 -53
  232. package/build/src/visualization/lib/LabelSketch.js.map +0 -1
  233. package/build/src/visualization/lib/LineSketch.d.ts +0 -26
  234. package/build/src/visualization/lib/LineSketch.d.ts.map +0 -1
  235. package/build/src/visualization/lib/LineSketch.js +0 -55
  236. package/build/src/visualization/lib/LineSketch.js.map +0 -1
  237. package/build/src/visualization/lib/Point.d.ts +0 -74
  238. package/build/src/visualization/lib/Point.d.ts.map +0 -1
  239. package/build/src/visualization/lib/Point.js +0 -121
  240. package/build/src/visualization/lib/Point.js.map +0 -1
  241. package/build/src/visualization/lib/PositionUtils.d.ts +0 -65
  242. package/build/src/visualization/lib/PositionUtils.d.ts.map +0 -1
  243. package/build/src/visualization/lib/PositionUtils.js +0 -205
  244. package/build/src/visualization/lib/PositionUtils.js.map +0 -1
  245. package/build/src/visualization/lib/SelectionManager.d.ts +0 -183
  246. package/build/src/visualization/lib/SelectionManager.d.ts.map +0 -1
  247. package/build/src/visualization/lib/SelectionManager.js +0 -481
  248. package/build/src/visualization/lib/SelectionManager.js.map +0 -1
  249. package/build/src/visualization/lib/ShapeArtist.d.ts +0 -45
  250. package/build/src/visualization/lib/ShapeArtist.d.ts.map +0 -1
  251. package/build/src/visualization/lib/ShapeArtist.js +0 -209
  252. package/build/src/visualization/lib/ShapeArtist.js.map +0 -1
  253. package/build/src/visualization/lib/SvgMarkers.d.ts +0 -14
  254. package/build/src/visualization/lib/SvgMarkers.d.ts.map +0 -1
  255. package/build/src/visualization/lib/SvgMarkers.js +0 -77
  256. package/build/src/visualization/lib/SvgMarkers.js.map +0 -1
  257. package/build/src/visualization/lib/TipSketch.d.ts +0 -26
  258. package/build/src/visualization/lib/TipSketch.d.ts.map +0 -1
  259. package/build/src/visualization/lib/TipSketch.js +0 -77
  260. package/build/src/visualization/lib/TipSketch.js.map +0 -1
  261. package/build/src/visualization/lib/TouchSupport.d.ts +0 -14
  262. package/build/src/visualization/lib/TouchSupport.d.ts.map +0 -1
  263. package/build/src/visualization/lib/TouchSupport.js +0 -55
  264. package/build/src/visualization/lib/TouchSupport.js.map +0 -1
  265. package/build/src/visualization/lib/Utils.d.ts +0 -25
  266. package/build/src/visualization/lib/Utils.d.ts.map +0 -1
  267. package/build/src/visualization/lib/Utils.js +0 -59
  268. package/build/src/visualization/lib/Utils.js.map +0 -1
  269. package/build/src/visualization/lib/VisualizationTypes.d.ts +0 -216
  270. package/build/src/visualization/lib/VisualizationTypes.d.ts.map +0 -1
  271. package/build/src/visualization/lib/VisualizationTypes.js +0 -3
  272. package/build/src/visualization/lib/VisualizationTypes.js.map +0 -1
  273. package/build/src/visualization/lib/WorkspaceAlignment.d.ts +0 -51
  274. package/build/src/visualization/lib/WorkspaceAlignment.d.ts.map +0 -1
  275. package/build/src/visualization/lib/WorkspaceAlignment.js +0 -243
  276. package/build/src/visualization/lib/WorkspaceAlignment.js.map +0 -1
  277. package/build/src/visualization/lib/WorkspaceDebugging.d.ts +0 -104
  278. package/build/src/visualization/lib/WorkspaceDebugging.d.ts.map +0 -1
  279. package/build/src/visualization/lib/WorkspaceDebugging.js +0 -286
  280. package/build/src/visualization/lib/WorkspaceDebugging.js.map +0 -1
  281. package/build/src/visualization/lib/WorkspaceEdges.d.ts +0 -293
  282. package/build/src/visualization/lib/WorkspaceEdges.d.ts.map +0 -1
  283. package/build/src/visualization/lib/WorkspaceEdges.js +0 -1073
  284. package/build/src/visualization/lib/WorkspaceEdges.js.map +0 -1
  285. package/build/src/visualization/lib/WorkspaceGestures.d.ts +0 -119
  286. package/build/src/visualization/lib/WorkspaceGestures.d.ts.map +0 -1
  287. package/build/src/visualization/lib/WorkspaceGestures.js +0 -376
  288. package/build/src/visualization/lib/WorkspaceGestures.js.map +0 -1
  289. package/build/src/visualization/lib/WorkspaceSizing.d.ts +0 -66
  290. package/build/src/visualization/lib/WorkspaceSizing.d.ts.map +0 -1
  291. package/build/src/visualization/lib/WorkspaceSizing.js +0 -168
  292. package/build/src/visualization/lib/WorkspaceSizing.js.map +0 -1
  293. package/build/src/visualization/lib/lines/RectilinearLine.d.ts +0 -114
  294. package/build/src/visualization/lib/lines/RectilinearLine.d.ts.map +0 -1
  295. package/build/src/visualization/lib/lines/RectilinearLine.js +0 -605
  296. package/build/src/visualization/lib/lines/RectilinearLine.js.map +0 -1
  297. package/build/src/visualization/lib/tips/RectilinearTip.d.ts +0 -26
  298. package/build/src/visualization/lib/tips/RectilinearTip.d.ts.map +0 -1
  299. package/build/src/visualization/lib/tips/RectilinearTip.js +0 -149
  300. package/build/src/visualization/lib/tips/RectilinearTip.js.map +0 -1
  301. package/build/src/visualization/lib/tips/TipArtist.d.ts +0 -22
  302. package/build/src/visualization/lib/tips/TipArtist.d.ts.map +0 -1
  303. package/build/src/visualization/lib/tips/TipArtist.js +0 -31
  304. package/build/src/visualization/lib/tips/TipArtist.js.map +0 -1
  305. package/build/src/visualization/lib/types.d.ts +0 -164
  306. package/build/src/visualization/lib/types.d.ts.map +0 -1
  307. package/build/src/visualization/lib/types.js +0 -2
  308. package/build/src/visualization/lib/types.js.map +0 -1
  309. package/build/src/visualization/plugin/dnd/DragAndDropPlugin.d.ts +0 -126
  310. package/build/src/visualization/plugin/dnd/DragAndDropPlugin.d.ts.map +0 -1
  311. package/build/src/visualization/plugin/dnd/DragAndDropPlugin.js +0 -260
  312. package/build/src/visualization/plugin/dnd/DragAndDropPlugin.js.map +0 -1
  313. package/build/src/visualization/plugin/group-selection/GroupSelection.d.ts +0 -93
  314. package/build/src/visualization/plugin/group-selection/GroupSelection.d.ts.map +0 -1
  315. package/build/src/visualization/plugin/group-selection/GroupSelection.js +0 -250
  316. package/build/src/visualization/plugin/group-selection/GroupSelection.js.map +0 -1
  317. package/build/src/visualization/plugin/positioning/DataModelLayout.d.ts +0 -10
  318. package/build/src/visualization/plugin/positioning/DataModelLayout.d.ts.map +0 -1
  319. package/build/src/visualization/plugin/positioning/DataModelLayout.js +0 -105
  320. package/build/src/visualization/plugin/positioning/DataModelLayout.js.map +0 -1
  321. package/build/src/visualization/plugin/positioning/WorkspaceLayout.d.ts +0 -93
  322. package/build/src/visualization/plugin/positioning/WorkspaceLayout.d.ts.map +0 -1
  323. package/build/src/visualization/plugin/positioning/WorkspaceLayout.js +0 -96
  324. package/build/src/visualization/plugin/positioning/WorkspaceLayout.js.map +0 -1
  325. package/build/src/visualization/viz-association.d.ts +0 -7
  326. package/build/src/visualization/viz-association.d.ts.map +0 -1
  327. package/build/src/visualization/viz-association.js +0 -3
  328. package/build/src/visualization/viz-association.js.map +0 -1
  329. package/build/src/visualization/viz-workspace.d.ts +0 -7
  330. package/build/src/visualization/viz-workspace.d.ts.map +0 -1
  331. package/build/src/visualization/viz-workspace.js +0 -3
  332. package/build/src/visualization/viz-workspace.js.map +0 -1
  333. package/src/md/text-field/ui-text-field.ts +0 -15
  334. package/src/visualization/elements/VizAssociationElement.ts +0 -3
  335. package/src/visualization/elements/VizWorkspaceElement.ts +0 -302
  336. package/src/visualization/elements/WorkspaceStyles.ts +0 -168
  337. package/src/visualization/lib/AnchorFinder.ts +0 -112
  338. package/src/visualization/lib/AnchorUtils.ts +0 -53
  339. package/src/visualization/lib/AssociationAnchors.ts +0 -418
  340. package/src/visualization/lib/LabelSketch.ts +0 -67
  341. package/src/visualization/lib/LineSketch.ts +0 -62
  342. package/src/visualization/lib/Point.ts +0 -134
  343. package/src/visualization/lib/PositionUtils.ts +0 -218
  344. package/src/visualization/lib/SelectionManager.ts +0 -513
  345. package/src/visualization/lib/ShapeArtist.ts +0 -222
  346. package/src/visualization/lib/SvgMarkers.ts +0 -80
  347. package/src/visualization/lib/TipSketch.ts +0 -91
  348. package/src/visualization/lib/TouchSupport.ts +0 -72
  349. package/src/visualization/lib/Utils.ts +0 -63
  350. package/src/visualization/lib/VisualizationTypes.ts +0 -232
  351. package/src/visualization/lib/WorkspaceAlignment.ts +0 -261
  352. package/src/visualization/lib/WorkspaceDebugging.ts +0 -313
  353. package/src/visualization/lib/WorkspaceEdges.ts +0 -1153
  354. package/src/visualization/lib/WorkspaceGestures.ts +0 -400
  355. package/src/visualization/lib/WorkspaceSizing.ts +0 -181
  356. package/src/visualization/lib/lines/RectilinearLine.ts +0 -589
  357. package/src/visualization/lib/tips/RectilinearTip.ts +0 -156
  358. package/src/visualization/lib/tips/TipArtist.ts +0 -34
  359. package/src/visualization/lib/types.ts +0 -173
  360. package/src/visualization/plugin/dnd/DragAndDropPlugin.ts +0 -294
  361. package/src/visualization/plugin/group-selection/GroupSelection.ts +0 -271
  362. package/src/visualization/plugin/positioning/DataModelLayout.ts +0 -114
  363. package/src/visualization/plugin/positioning/WorkspaceLayout.ts +0 -149
  364. package/src/visualization/viz-association.ts +0 -9
  365. package/src/visualization/viz-workspace.ts +0 -9
  366. package/test/env.d.ts +0 -9
  367. package/test/env.js +0 -7
  368. package/test/visualization/lib/AnchorFinder.test.ts +0 -313
  369. package/test/visualization/lib/AnchorUtils.test.ts +0 -178
  370. package/test/visualization/lib/PositionUtils.test.ts +0 -406
  371. package/test/visualization/lib/test-styles.css +0 -80
@@ -1 +0,0 @@
1
- {"version":3,"file":"AssociationAnchors.js","sourceRoot":"","sources":["../../../../src/visualization/lib/AssociationAnchors.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAI5C,MAAM,KAAK,GAAG,4BAA4B,CAAA;AAE1C,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAA;AACtD,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAA;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC,CAAA;AAC1D,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAA;AACtD,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAA;AAqCtD;;;;;;;;GAQG;AACH,MAAM,OAAO,kBAAkB;IAkCV;IAjCnB,CAAC,cAAc,CAAC,GAAG,KAAK,CAAA;IAExB;;OAEG;IACH,OAAO,GAAG,KAAK,CAAA;IAEf;;OAEG;IACH,WAAW,CAAa;IAExB;;;OAGG;IACH,QAAQ,GAAG,KAAK,CAAA;IAEhB;;OAEG;IACH,aAAa,GAAG,IAAI,UAAU,EAAE,CAAA;IAEhC;;OAEG;IACH,UAAU,CAAiB;IAE3B;;OAEG;IACH,UAAU,CAAkB;IAE5B,YAAmB,SAA8B;QAA9B,cAAS,GAAT,SAAS,CAAqB;QAC/C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC1B,IAAI,CA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SAAS,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAA;QAC3D,MAAM,CAAC,gBAAgB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAA;IAC1D,CAAC;IAED;;OAEG;IACH,kBAAkB;QAChB,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,CAAA;QAC1B,SAAS,CAAC,mBAAmB,CAAC,WAAW,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAA;QAClE,SAAS,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAA;QAC9D,MAAM,CAAC,mBAAmB,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC,CAAA;IAC7D,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { getRelativeClickPoint } from './PositionUtils.js'\nimport { anchorToPoint } from './AnchorUtils.js'\nimport { LineSketch } from './LineSketch.js'\nimport VizWorkspaceElement from '../elements/VizWorkspaceElement.js'\nimport { Point } from './Point.js'\n\nconst SvgNS = 'http://www.w3.org/2000/svg'\n\nexport const connectedValue = Symbol('connectedValue')\nexport const mouseDownHandler = Symbol('mouseDownHandler')\nexport const mouseMoveHandler = Symbol('mouseMoveHandler')\nexport const mouseUpHandler = Symbol('mouseUpHandler')\nexport const keydownHandler = Symbol('keydownHandler')\n\nexport interface EdgeCreateInfo {\n /**\n * The slot name of the source object.\n */\n slot: string\n /**\n * The workspace coordinates of the staring point\n */\n point: Point\n /**\n * The domain element that is the source of the association.\n */\n source: HTMLElement\n}\n\nexport interface IEdgeUpdateInfo {\n /**\n * The name of the tip that is being dragged.\n * It's either `start` or `end`.\n */\n direction: string\n /**\n * The association domain id.\n */\n id: string\n /**\n * The start point of the line\n */\n sp: Point\n /**\n * The end point of the line\n */\n ep: Point\n}\n\n/**\n * A helper that allows to manually draw a line from one visualization object to another.\n * The visualization object has to have the `data-association-slots` attribute set on the element\n * and the mouse event target having the `data-association-slot` attribute with the index of the slot.\n *\n * The association line can be drawn to another object that has both attributes.\n *\n * After the user finish a DOM event is dispatched from the visualization workspace.\n */\nexport class AssociationAnchors {\n [connectedValue] = false\n\n /**\n * Whether a line is being constructed.\n */\n drawing = false\n\n /**\n * A reference to the currently injected SVG element.\n */\n lineElement?: SVGElement\n\n /**\n * Whether an association position is being updated.\n * In such case it dispatches different event at the end.\n */\n updating = false\n\n /**\n * The processor used to draw lines\n */\n lineProcessor = new LineSketch()\n\n /**\n * Set when a new association is being created\n */\n createInfo?: EdgeCreateInfo\n\n /**\n * Set when an association update is performed\n */\n updateInfo?: IEdgeUpdateInfo\n\n constructor(public workspace: VizWorkspaceElement) {\n this.workspace = workspace\n this[mouseDownHandler] = this[mouseDownHandler].bind(this)\n this[mouseMoveHandler] = this[mouseMoveHandler].bind(this)\n this[mouseUpHandler] = this[mouseUpHandler].bind(this)\n this[keydownHandler] = this[keydownHandler].bind(this)\n }\n\n /**\n * Starts listening for the user events\n */\n connect(): void {\n if (this[connectedValue]) {\n return\n }\n this[connectedValue] = true\n const { workspace } = this\n // const { canvas } = workspace;\n workspace.addEventListener('mousedown', this[mouseDownHandler], true)\n }\n\n /**\n * Stops listening for the user events\n */\n disconnect(): void {\n this[connectedValue] = false\n const { workspace } = this\n // const { canvas } = workspace;\n workspace.removeEventListener('mousedown', this[mouseDownHandler], true)\n }\n\n findSlotParent(path: Node[]): Element {\n const element = path.find((node) => {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return false\n }\n const typed = node as Element\n return typed.hasAttribute('data-association-slots')\n })\n return element as Element\n }\n\n [mouseDownHandler](e: MouseEvent): void {\n if (e.button !== 0) {\n return\n }\n let node = e.target as HTMLElement\n if (!e.composed || node.nodeType !== Node.ELEMENT_NODE) {\n return\n }\n const [source] = e.composedPath() as HTMLElement[]\n if (node === source) {\n const parent = this.findSlotParent(e.composedPath() as Node[])\n if (!parent) {\n return\n }\n node = parent as HTMLElement\n }\n const { dataset } = source\n const isSvgDraggable = source.classList && source.classList.contains('association-draggable')\n if (isSvgDraggable) {\n e.preventDefault()\n e.stopPropagation()\n this.startUpdate(dataset.key!, dataset.dir!)\n return\n }\n if (!node.hasAttribute('data-association-slots')) {\n return\n }\n if (source.nodeType !== Node.ELEMENT_NODE) {\n return\n }\n if (!dataset.associationSlot) {\n return\n }\n e.preventDefault()\n e.stopPropagation()\n const startPoint = anchorToPoint(source, this.workspace)\n this.start(node, dataset.associationSlot, startPoint)\n }\n\n [mouseMoveHandler](e: MouseEvent): void {\n if (!this.drawing) {\n return\n }\n const { clientX, clientY } = e\n const pos = getRelativeClickPoint(clientX, clientY, this.workspace)\n this.updateLinePosition(pos)\n }\n\n [mouseUpHandler](e: MouseEvent): void {\n if (!this.drawing) {\n return\n }\n this.drawing = false\n this.cancel()\n let node = e.target as HTMLElement\n if (!e.composed || node.nodeType !== Node.ELEMENT_NODE) {\n this.cleanup()\n return\n }\n if (!node.hasAttribute('data-association-slots')) {\n const parent = this.findSlotParent(e.composedPath() as Node[])\n if (!parent) {\n return\n }\n node = parent as HTMLElement\n }\n if (!node.hasAttribute('data-association-slots')) {\n this.cleanup()\n return\n }\n const [source] = e.composedPath() as HTMLElement[]\n if (source.nodeType !== Node.ELEMENT_NODE) {\n this.cleanup()\n return\n }\n const { dataset } = source\n if (!dataset.associationSlot) {\n this.cleanup()\n return\n }\n const { clientX, clientY } = e\n const endPoint = getRelativeClickPoint(clientX, clientY, this.workspace)\n if (this.updating) {\n this.endUpdate(node.dataset.key!, dataset.associationSlot, endPoint)\n } else {\n this.end(node.dataset.key!, dataset.associationSlot, endPoint)\n }\n }\n\n [keydownHandler](e: KeyboardEvent): void {\n if (e.code !== 'Escape') {\n return\n }\n this.cancel()\n this.cleanup()\n }\n\n /**\n * Cancels the operation.\n */\n cancel(): void {\n this.unlistenDargEvents()\n this.removeLine()\n if (this.updating) {\n const model = this.workspace.edges.get(this.updateInfo!.id)!\n model.shape.selection!.hidden = false\n this.workspace.requestUpdate()\n }\n }\n\n /**\n * Clears variables set in the `start()` function.\n */\n cleanup(): void {\n this.createInfo = undefined\n this.updateInfo = undefined\n this.updating = false\n this.drawing = false\n }\n\n start(domainObject: HTMLElement, slot: string, startPoint: Point): void {\n this.drawing = true\n this.createInfo = {\n slot,\n point: startPoint,\n source: domainObject,\n }\n this.addLine(startPoint, startPoint)\n this.listenDargEvents()\n }\n\n /**\n * @param key The domain id of the association being updated\n * @param dir The name of the tip that is being dragged.\n */\n startUpdate(key: string, dir: string): void {\n const model = this.workspace.edges.get(key)\n if (!model) {\n throw new Error(`The edge is not prepared.`)\n }\n model.shape.selection!.hidden = true\n const { coordinates } = model.shape.line\n const [sp] = coordinates!\n const ep = coordinates![coordinates!.length - 1]\n const startPoint = dir === 'end' ? sp : ep\n const endPoint = dir === 'end' ? ep : sp\n this.updating = true\n this.updateInfo = {\n direction: dir,\n ep: endPoint,\n sp: startPoint,\n id: key,\n }\n this.drawing = true\n this.addLine(startPoint, endPoint)\n this.listenDargEvents()\n this.workspace.requestUpdate()\n }\n\n end(id: string, slot: string, endPoint: Point): void {\n const { createInfo } = this\n if (!createInfo) {\n throw new Error(`updateInfo is not set.`)\n }\n const detail = {\n source: {\n id: createInfo.source.dataset.key,\n point: createInfo.point,\n slot: createInfo.slot,\n },\n target: {\n id, // : domainObject.dataset.key,\n point: endPoint,\n slot,\n },\n }\n createInfo.source.dispatchEvent(\n new CustomEvent('anchorassociationcreate', {\n composed: true,\n cancelable: true,\n bubbles: true,\n detail,\n })\n )\n this.cleanup()\n }\n\n endUpdate(id: string, slot: string, endPoint: Point): void {\n const { updateInfo } = this\n if (!updateInfo) {\n throw new Error(`updateInfo is not set.`)\n }\n const detail = {\n source: {\n associationId: updateInfo.id,\n direction: updateInfo.direction,\n },\n target: {\n id, // : domainObject.dataset.key,\n point: endPoint,\n slot,\n },\n }\n const model = this.workspace.edges.get(updateInfo.id)!\n const eventTarget = this.workspace.querySelector(`[data-key=\"${model.source}\"]`)!\n this.cleanup()\n eventTarget.dispatchEvent(\n new CustomEvent('anchorassociationupdate', {\n composed: true,\n cancelable: true,\n bubbles: true,\n detail,\n })\n )\n }\n\n /**\n * Insets a child with a line definition into the workspace's SVG element.\n * @param start The starting point of the line\n * @param end The ending point of the line\n */\n addLine(start: Point, end: Point): void {\n const line = document.createElementNS(SvgNS, 'line')\n line.setAttribute('x1', `${start.x}`)\n line.setAttribute('y1', `${start.y}`)\n line.setAttribute('x2', `${end.x}`)\n line.setAttribute('y2', `${end.y}`)\n line.classList.add('association-line')\n const { associationSvg } = this.workspace\n associationSvg.append(line)\n this.lineElement = line\n }\n\n /**\n * Removes the previously added line from the SVG\n */\n removeLine(): void {\n const { lineElement } = this\n if (!lineElement) {\n return\n }\n const { associationSvg } = this.workspace\n associationSvg.removeChild(lineElement)\n this.lineElement = undefined\n }\n\n /**\n * Updates the end position of the line.\n * @param {Point} point\n */\n updateLinePosition(point: Point): void {\n const { lineElement } = this\n\n if (!lineElement) {\n return\n }\n\n // lineElement.setAttribute('d', definition.path);\n lineElement.setAttribute('x2', `${point.x}`)\n lineElement.setAttribute('y2', `${point.y}`)\n }\n\n /**\n * Listens for the mouse move and mouse up events to draw the line and finish the operation.\n * This is only initialized when starting drawing a line.\n */\n listenDargEvents(): void {\n const { workspace } = this\n workspace.addEventListener('mousemove', this[mouseMoveHandler])\n workspace.addEventListener('mouseup', this[mouseUpHandler])\n window.addEventListener('keydown', this[keydownHandler])\n }\n\n /**\n * Removes previously registered events.\n */\n unlistenDargEvents(): void {\n const { workspace } = this\n workspace.removeEventListener('mousemove', this[mouseMoveHandler])\n workspace.removeEventListener('mouseup', this[mouseUpHandler])\n window.removeEventListener('keydown', this[keydownHandler])\n }\n}\n"]}
@@ -1,16 +0,0 @@
1
- import { IEdgeDirections } from './types.js';
2
- import { IAssociationLabelShape, IVisualizationAssociationShape, IVisualizationRectilinearLineShape } from './VisualizationTypes.js';
3
- /**
4
- * A class that specializes in sketching a label (association label) on the workspace.
5
- */
6
- export declare class LabelSketch {
7
- /**
8
- * Computes sketch of the label.
9
- */
10
- sketch(lineShape: IVisualizationAssociationShape, value: string, directions: IEdgeDirections): IAssociationLabelShape | null;
11
- /**
12
- * Computes sketch of the label on a rectilinear shape.
13
- */
14
- sketchRectilinear(lineShape: IVisualizationRectilinearLineShape, value: string, directions: IEdgeDirections): IAssociationLabelShape | null;
15
- }
16
- //# sourceMappingURL=LabelSketch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LabelSketch.d.ts","sourceRoot":"","sources":["../../../../src/visualization/lib/LabelSketch.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5C,OAAO,EACL,sBAAsB,EACtB,8BAA8B,EAC9B,kCAAkC,EACnC,MAAM,yBAAyB,CAAA;AAEhC;;GAEG;AACH,qBAAa,WAAW;IACtB;;OAEG;IACH,MAAM,CACJ,SAAS,EAAE,8BAA8B,EACzC,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,eAAe,GAC1B,sBAAsB,GAAG,IAAI;IAShC;;OAEG;IACH,iBAAiB,CACf,SAAS,EAAE,kCAAkC,EAC7C,KAAK,EAAE,MAAM,EACb,UAAU,EAAE,eAAe,GAC1B,sBAAsB,GAAG,IAAI;CA8BjC"}
@@ -1,53 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
2
- /**
3
- * A class that specializes in sketching a label (association label) on the workspace.
4
- */
5
- export class LabelSketch {
6
- /**
7
- * Computes sketch of the label.
8
- */
9
- sketch(lineShape, value, directions) {
10
- switch (lineShape.type) {
11
- case 'rectilinear':
12
- return this.sketchRectilinear(lineShape, value, directions);
13
- default:
14
- return null;
15
- }
16
- }
17
- /**
18
- * Computes sketch of the label on a rectilinear shape.
19
- */
20
- sketchRectilinear(lineShape, value, directions) {
21
- const [position] = lineShape.coordinates;
22
- const point = position.copy();
23
- const transformOrigin = `${position.x}px ${position.y}px`;
24
- const { start } = directions;
25
- let anchor = 'start';
26
- if (start === 'south') {
27
- point.x += 8;
28
- point.y += 20;
29
- }
30
- else if (start === 'east') {
31
- point.x += 8;
32
- point.y -= 8;
33
- }
34
- else if (start === 'north') {
35
- point.x += 8;
36
- point.y -= 24;
37
- }
38
- else {
39
- point.x -= 8;
40
- point.y -= 8;
41
- anchor = 'end';
42
- }
43
- return {
44
- x: point.x,
45
- y: point.y,
46
- value,
47
- transformOrigin,
48
- rotate: 0,
49
- anchor,
50
- };
51
- }
52
- }
53
- //# sourceMappingURL=LabelSketch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LabelSketch.js","sourceRoot":"","sources":["../../../../src/visualization/lib/LabelSketch.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAS7D;;GAEG;AACH,MAAM,OAAO,WAAW;IACtB;;OAEG;IACH,MAAM,CACJ,SAAyC,EACzC,KAAa,EACb,UAA2B;QAE3B,QAAQ,SAAS,CAAC,IAAI,EAAE,CAAC;YACvB,KAAK,aAAa;gBAChB,OAAO,IAAI,CAAC,iBAAiB,CAAC,SAA+C,EAAE,KAAK,EAAE,UAAU,CAAC,CAAA;YACnG;gBACE,OAAO,IAAI,CAAA;QACf,CAAC;IACH,CAAC;IAED;;OAEG;IACH,iBAAiB,CACf,SAA6C,EAC7C,KAAa,EACb,UAA2B;QAE3B,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS,CAAC,WAAY,CAAA;QACzC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAA;QAC7B,MAAM,eAAe,GAAG,GAAG,QAAQ,CAAC,CAAC,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAA;QACzD,MAAM,EAAE,KAAK,EAAE,GAAG,UAAU,CAAA;QAC5B,IAAI,MAAM,GAAG,OAAO,CAAA;QACpB,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;YACtB,KAAK,CAAC,CAAC,IAAI,CAAC,CAAA;YACZ,KAAK,CAAC,CAAC,IAAI,EAAE,CAAA;QACf,CAAC;aAAM,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;YAC5B,KAAK,CAAC,CAAC,IAAI,CAAC,CAAA;YACZ,KAAK,CAAC,CAAC,IAAI,CAAC,CAAA;QACd,CAAC;aAAM,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;YAC7B,KAAK,CAAC,CAAC,IAAI,CAAC,CAAA;YACZ,KAAK,CAAC,CAAC,IAAI,EAAE,CAAA;QACf,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,CAAC,IAAI,CAAC,CAAA;YACZ,KAAK,CAAC,CAAC,IAAI,CAAC,CAAA;YACZ,MAAM,GAAG,KAAK,CAAA;QAChB,CAAC;QAED,OAAO;YACL,CAAC,EAAE,KAAK,CAAC,CAAC;YACV,CAAC,EAAE,KAAK,CAAC,CAAC;YACV,KAAK;YACL,eAAe;YACf,MAAM,EAAE,CAAC;YACT,MAAM;SACP,CAAA;IACH,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\n\nimport { IEdgeDirections } from './types.js'\nimport {\n IAssociationLabelShape,\n IVisualizationAssociationShape,\n IVisualizationRectilinearLineShape,\n} from './VisualizationTypes.js'\n\n/**\n * A class that specializes in sketching a label (association label) on the workspace.\n */\nexport class LabelSketch {\n /**\n * Computes sketch of the label.\n */\n sketch(\n lineShape: IVisualizationAssociationShape,\n value: string,\n directions: IEdgeDirections\n ): IAssociationLabelShape | null {\n switch (lineShape.type) {\n case 'rectilinear':\n return this.sketchRectilinear(lineShape as IVisualizationRectilinearLineShape, value, directions)\n default:\n return null\n }\n }\n\n /**\n * Computes sketch of the label on a rectilinear shape.\n */\n sketchRectilinear(\n lineShape: IVisualizationRectilinearLineShape,\n value: string,\n directions: IEdgeDirections\n ): IAssociationLabelShape | null {\n const [position] = lineShape.coordinates!\n const point = position.copy()\n const transformOrigin = `${position.x}px ${position.y}px`\n const { start } = directions\n let anchor = 'start'\n if (start === 'south') {\n point.x += 8\n point.y += 20\n } else if (start === 'east') {\n point.x += 8\n point.y -= 8\n } else if (start === 'north') {\n point.x += 8\n point.y -= 24\n } else {\n point.x -= 8\n point.y -= 8\n anchor = 'end'\n }\n\n return {\n x: point.x,\n y: point.y,\n value,\n transformOrigin,\n rotate: 0,\n anchor,\n }\n }\n}\n"]}
@@ -1,26 +0,0 @@
1
- import { ILineSketchOptions, IVisualizationAssociationShape, IVisualizationRectilinearLineShape } from './VisualizationTypes.js';
2
- /**
3
- * A class that is responsible for sketching different kind of lines.
4
- * It computes list of points and other properties so the visualization workspace can
5
- * use this definition in the SVG drawing.
6
- */
7
- export declare class LineSketch {
8
- /**
9
- * Creates an association line for the given configuration.
10
- * @param config The line building options
11
- * @returns Computed model for the association.
12
- */
13
- sketch(config: ILineSketchOptions): IVisualizationAssociationShape | null;
14
- /**
15
- * Sketches a regular line.
16
- * @returns Computed model for the association.
17
- */
18
- computeLine(config: ILineSketchOptions): IVisualizationAssociationShape | null;
19
- /**
20
- * Sketches a regular line.
21
- *
22
- * @returns Computed model for the association.
23
- */
24
- computeRectilinearLine(config: ILineSketchOptions): IVisualizationRectilinearLineShape | null;
25
- }
26
- //# sourceMappingURL=LineSketch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LineSketch.d.ts","sourceRoot":"","sources":["../../../../src/visualization/lib/LineSketch.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,kBAAkB,EAClB,8BAA8B,EAC9B,kCAAkC,EACnC,MAAM,yBAAyB,CAAA;AAEhC;;;;GAIG;AACH,qBAAa,UAAU;IACrB;;;;OAIG;IACH,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,8BAA8B,GAAG,IAAI;IAYzE;;;OAGG;IACH,WAAW,CAAC,MAAM,EAAE,kBAAkB,GAAG,8BAA8B,GAAG,IAAI;IAiB9E;;;;OAIG;IACH,sBAAsB,CAAC,MAAM,EAAE,kBAAkB,GAAG,kCAAkC,GAAG,IAAI;CAI9F"}
@@ -1,55 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-non-null-assertion */
2
- import { RectilinearLine } from './lines/RectilinearLine.js';
3
- /**
4
- * A class that is responsible for sketching different kind of lines.
5
- * It computes list of points and other properties so the visualization workspace can
6
- * use this definition in the SVG drawing.
7
- */
8
- export class LineSketch {
9
- /**
10
- * Creates an association line for the given configuration.
11
- * @param config The line building options
12
- * @returns Computed model for the association.
13
- */
14
- sketch(config) {
15
- const { type } = config;
16
- switch (type) {
17
- case 'linear':
18
- return this.computeLine(config);
19
- case 'rectilinear':
20
- return this.computeRectilinearLine(config);
21
- default:
22
- return null;
23
- }
24
- }
25
- /**
26
- * Sketches a regular line.
27
- * @returns Computed model for the association.
28
- */
29
- computeLine(config) {
30
- const { startPoint, endPoint, type } = config;
31
- if (!startPoint.validate() || !endPoint.validate()) {
32
- return null;
33
- }
34
- const coordinates = [startPoint, endPoint];
35
- const transformOrigin = `${startPoint.x}px ${endPoint.y}px`;
36
- return {
37
- transformOrigin,
38
- coordinates,
39
- rotate: 0,
40
- type: type,
41
- startPoint,
42
- endPoint,
43
- };
44
- }
45
- /**
46
- * Sketches a regular line.
47
- *
48
- * @returns Computed model for the association.
49
- */
50
- computeRectilinearLine(config) {
51
- const artist = new RectilinearLine(config);
52
- return artist.sketch();
53
- }
54
- }
55
- //# sourceMappingURL=LineSketch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LineSketch.js","sourceRoot":"","sources":["../../../../src/visualization/lib/LineSketch.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAO5D;;;;GAIG;AACH,MAAM,OAAO,UAAU;IACrB;;;;OAIG;IACH,MAAM,CAAC,MAA0B;QAC/B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAA;QACvB,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,QAAQ;gBACX,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;YACjC,KAAK,aAAa;gBAChB,OAAO,IAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAA;YAC5C;gBACE,OAAO,IAAI,CAAA;QACf,CAAC;IACH,CAAC;IAED;;;OAGG;IACH,WAAW,CAAC,MAA0B;QACpC,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,MAAM,CAAA;QAC7C,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,EAAE,CAAC;YACnD,OAAO,IAAI,CAAA;QACb,CAAC;QACD,MAAM,WAAW,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAA;QAC1C,MAAM,eAAe,GAAG,GAAG,UAAU,CAAC,CAAC,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAA;QAC3D,OAAO;YACL,eAAe;YACf,WAAW;YACX,MAAM,EAAE,CAAC;YACT,IAAI,EAAE,IAAK;YACX,UAAU;YACV,QAAQ;SACT,CAAA;IACH,CAAC;IAED;;;;OAIG;IACH,sBAAsB,CAAC,MAA0B;QAC/C,MAAM,MAAM,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,CAAA;QAC1C,OAAO,MAAM,CAAC,MAAM,EAAE,CAAA;IACxB,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { RectilinearLine } from './lines/RectilinearLine.js'\nimport {\n ILineSketchOptions,\n IVisualizationAssociationShape,\n IVisualizationRectilinearLineShape,\n} from './VisualizationTypes.js'\n\n/**\n * A class that is responsible for sketching different kind of lines.\n * It computes list of points and other properties so the visualization workspace can\n * use this definition in the SVG drawing.\n */\nexport class LineSketch {\n /**\n * Creates an association line for the given configuration.\n * @param config The line building options\n * @returns Computed model for the association.\n */\n sketch(config: ILineSketchOptions): IVisualizationAssociationShape | null {\n const { type } = config\n switch (type) {\n case 'linear':\n return this.computeLine(config)\n case 'rectilinear':\n return this.computeRectilinearLine(config)\n default:\n return null\n }\n }\n\n /**\n * Sketches a regular line.\n * @returns Computed model for the association.\n */\n computeLine(config: ILineSketchOptions): IVisualizationAssociationShape | null {\n const { startPoint, endPoint, type } = config\n if (!startPoint.validate() || !endPoint.validate()) {\n return null\n }\n const coordinates = [startPoint, endPoint]\n const transformOrigin = `${startPoint.x}px ${endPoint.y}px`\n return {\n transformOrigin,\n coordinates,\n rotate: 0,\n type: type!,\n startPoint,\n endPoint,\n }\n }\n\n /**\n * Sketches a regular line.\n *\n * @returns Computed model for the association.\n */\n computeRectilinearLine(config: ILineSketchOptions): IVisualizationRectilinearLineShape | null {\n const artist = new RectilinearLine(config)\n return artist.sketch()\n }\n}\n"]}
@@ -1,74 +0,0 @@
1
- import { xPositionOrCoord } from './types.js';
2
- /**
3
- * An object representing a point in a 2-d space (Euclidean space)
4
- */
5
- export declare class Point {
6
- x: number;
7
- y: number;
8
- /**
9
- * @param x The x coordinate or the array with x and y position values
10
- * @param y Optional when the `x` is an array. The y position of the point
11
- */
12
- constructor(x: xPositionOrCoord, y?: number);
13
- /**
14
- * Copies the current point as new object
15
- * @return A copy of the object
16
- */
17
- copy(): Point;
18
- /**
19
- * Validates the point value.
20
- * @return True if the point has valid values.
21
- */
22
- validate(): boolean;
23
- /**
24
- * Adds another point to this point and returns a new point.
25
- * @param v Point or a number to add.
26
- * @returns Created new point
27
- */
28
- add(v: Point | number): Point;
29
- /**
30
- * Subtracts another point from this point and returns a new point.
31
- * @param v Point or a number to add.
32
- * @returns Created new point
33
- */
34
- subtract(v: Point | number): Point;
35
- /**
36
- * Multiplies this point by another point or a number and returns a new point.
37
- * @param v Point or a number to add.
38
- * @returns Created new point
39
- */
40
- multiply(v: Point | number): Point;
41
- /**
42
- * Divides this point by another point or a number and returns a new point.
43
- * @param v Point or a number to add.
44
- * @returns Created new point
45
- */
46
- divide(v: Point | number): Point;
47
- /**
48
- * Subtracts another point to this point and returns a new point.
49
- * @param v Point or a number to add.
50
- * @returns True when points are equal
51
- */
52
- equals(v: Point): boolean;
53
- /**
54
- * Computes an angle to another point in radians.
55
- * @param v Point or a number to add.
56
- * @returns True when points are equal
57
- */
58
- angle(v: Point): number;
59
- /**
60
- * Computes an angle to another point in degrees.
61
- * @param v Point or a number to add.
62
- * @returns True when points are equal
63
- */
64
- degrees(v: Point): number;
65
- /**
66
- * Computes the distance to the other point.
67
- */
68
- distance(other: Point): number;
69
- /**
70
- * Computes the distance between two points.
71
- */
72
- static distance(p1: Point, p2: Point): number;
73
- }
74
- //# sourceMappingURL=Point.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Point.d.ts","sourceRoot":"","sources":["../../../../src/visualization/lib/Point.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAA;AAE7C;;GAEG;AACH,qBAAa,KAAK;IAChB,CAAC,EAAE,MAAM,CAAA;IAET,CAAC,EAAE,MAAM,CAAA;IAET;;;OAGG;gBACS,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,EAAE,MAAM;IAa3C;;;OAGG;IACH,IAAI,IAAI,KAAK;IAIb;;;OAGG;IACH,QAAQ,IAAI,OAAO;IAKnB;;;;OAIG;IACH,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK;IAO7B;;;;OAIG;IACH,QAAQ,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK;IAOlC;;;;OAIG;IACH,QAAQ,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK;IAOlC;;;;OAIG;IACH,MAAM,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK;IAOhC;;;;OAIG;IACH,MAAM,CAAC,CAAC,EAAE,KAAK,GAAG,OAAO;IAIzB;;;;OAIG;IACH,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM;IAIvB;;;;OAIG;IACH,OAAO,CAAC,CAAC,EAAE,KAAK,GAAG,MAAM;IAIzB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM;IAI9B;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,GAAG,MAAM;CAG9C"}
@@ -1,121 +0,0 @@
1
- /**
2
- * An object representing a point in a 2-d space (Euclidean space)
3
- */
4
- export class Point {
5
- x;
6
- y;
7
- /**
8
- * @param x The x coordinate or the array with x and y position values
9
- * @param y Optional when the `x` is an array. The y position of the point
10
- */
11
- constructor(x, y) {
12
- let xValue;
13
- let yValue;
14
- if (Array.isArray(x)) {
15
- ;
16
- [xValue, yValue] = x;
17
- }
18
- else {
19
- xValue = x;
20
- yValue = y;
21
- }
22
- this.x = xValue;
23
- this.y = yValue;
24
- }
25
- /**
26
- * Copies the current point as new object
27
- * @return A copy of the object
28
- */
29
- copy() {
30
- return new Point(this.x, this.y);
31
- }
32
- /**
33
- * Validates the point value.
34
- * @return True if the point has valid values.
35
- */
36
- validate() {
37
- const { x, y } = this;
38
- return !Number.isNaN(x) && !Number.isNaN(y);
39
- }
40
- /**
41
- * Adds another point to this point and returns a new point.
42
- * @param v Point or a number to add.
43
- * @returns Created new point
44
- */
45
- add(v) {
46
- if (v instanceof Point) {
47
- return new Point(this.x + v.x, this.y + v.y);
48
- }
49
- return new Point(this.x + v, this.y + v);
50
- }
51
- /**
52
- * Subtracts another point from this point and returns a new point.
53
- * @param v Point or a number to add.
54
- * @returns Created new point
55
- */
56
- subtract(v) {
57
- if (v instanceof Point) {
58
- return new Point(this.x - v.x, this.y - v.y);
59
- }
60
- return new Point(this.x - v, this.y - v);
61
- }
62
- /**
63
- * Multiplies this point by another point or a number and returns a new point.
64
- * @param v Point or a number to add.
65
- * @returns Created new point
66
- */
67
- multiply(v) {
68
- if (v instanceof Point) {
69
- return new Point(this.x * v.x, this.y * v.y);
70
- }
71
- return new Point(this.x * v, this.y * v);
72
- }
73
- /**
74
- * Divides this point by another point or a number and returns a new point.
75
- * @param v Point or a number to add.
76
- * @returns Created new point
77
- */
78
- divide(v) {
79
- if (v instanceof Point) {
80
- return new Point(this.x / v.x, this.y / v.y);
81
- }
82
- return new Point(this.x / v, this.y / v);
83
- }
84
- /**
85
- * Subtracts another point to this point and returns a new point.
86
- * @param v Point or a number to add.
87
- * @returns True when points are equal
88
- */
89
- equals(v) {
90
- return this.x === v.x && this.y === v.y;
91
- }
92
- /**
93
- * Computes an angle to another point in radians.
94
- * @param v Point or a number to add.
95
- * @returns True when points are equal
96
- */
97
- angle(v) {
98
- return Math.atan2(v.y - this.y, v.x - this.x);
99
- }
100
- /**
101
- * Computes an angle to another point in degrees.
102
- * @param v Point or a number to add.
103
- * @returns True when points are equal
104
- */
105
- degrees(v) {
106
- return (this.angle(v) * 180) / Math.PI;
107
- }
108
- /**
109
- * Computes the distance to the other point.
110
- */
111
- distance(other) {
112
- return Math.sqrt((this.x - other.x) ** 2 + (this.y - other.y) ** 2);
113
- }
114
- /**
115
- * Computes the distance between two points.
116
- */
117
- static distance(p1, p2) {
118
- return p1.distance(p2);
119
- }
120
- }
121
- //# sourceMappingURL=Point.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Point.js","sourceRoot":"","sources":["../../../../src/visualization/lib/Point.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,OAAO,KAAK;IAChB,CAAC,CAAQ;IAET,CAAC,CAAQ;IAET;;;OAGG;IACH,YAAY,CAAmB,EAAE,CAAU;QACzC,IAAI,MAAM,CAAA;QACV,IAAI,MAAM,CAAA;QACV,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YACrB,CAAC;YAAA,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAA;QACvB,CAAC;aAAM,CAAC;YACN,MAAM,GAAG,CAAC,CAAA;YACV,MAAM,GAAG,CAAC,CAAA;QACZ,CAAC;QACD,IAAI,CAAC,CAAC,GAAG,MAAM,CAAA;QACf,IAAI,CAAC,CAAC,GA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ACrE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,EAAS,EAAE,EAAS;QAClC,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;IACxB,CAAC;CACF","sourcesContent":["/* eslint-disable @typescript-eslint/no-non-null-assertion */\nimport { xPositionOrCoord } from './types.js'\n\n/**\n * An object representing a point in a 2-d space (Euclidean space)\n */\nexport class Point {\n x: number\n\n y: number\n\n /**\n * @param x The x coordinate or the array with x and y position values\n * @param y Optional when the `x` is an array. The y position of the point\n */\n constructor(x: xPositionOrCoord, y?: number) {\n let xValue\n let yValue\n if (Array.isArray(x)) {\n ;[xValue, yValue] = x\n } else {\n xValue = x\n yValue = y\n }\n this.x = xValue\n this.y = yValue!\n }\n\n /**\n * Copies the current point as new object\n * @return A copy of the object\n */\n copy(): Point {\n return new Point(this.x, this.y)\n }\n\n /**\n * Validates the point value.\n * @return True if the point has valid values.\n */\n validate(): boolean {\n const { x, y } = this\n return !Number.isNaN(x) && !Number.isNaN(y)\n }\n\n /**\n * Adds another point to this point and returns a new point.\n * @param v Point or a number to add.\n * @returns Created new point\n */\n add(v: Point | number): Point {\n if (v instanceof Point) {\n return new Point(this.x + v.x, this.y + v.y)\n }\n return new Point(this.x + v, this.y + v)\n }\n\n /**\n * Subtracts another point from this point and returns a new point.\n * @param v Point or a number to add.\n * @returns Created new point\n */\n subtract(v: Point | number): Point {\n if (v instanceof Point) {\n return new Point(this.x - v.x, this.y - v.y)\n }\n return new Point(this.x - v, this.y - v)\n }\n\n /**\n * Multiplies this point by another point or a number and returns a new point.\n * @param v Point or a number to add.\n * @returns Created new point\n */\n multiply(v: Point | number): Point {\n if (v instanceof Point) {\n return new Point(this.x * v.x, this.y * v.y)\n }\n return new Point(this.x * v, this.y * v)\n }\n\n /**\n * Divides this point by another point or a number and returns a new point.\n * @param v Point or a number to add.\n * @returns Created new point\n */\n divide(v: Point | number): Point {\n if (v instanceof Point) {\n return new Point(this.x / v.x, this.y / v.y)\n }\n return new Point(this.x / v, this.y / v)\n }\n\n /**\n * Subtracts another point to this point and returns a new point.\n * @param v Point or a number to add.\n * @returns True when points are equal\n */\n equals(v: Point): boolean {\n return this.x === v.x && this.y === v.y\n }\n\n /**\n * Computes an angle to another point in radians.\n * @param v Point or a number to add.\n * @returns True when points are equal\n */\n angle(v: Point): number {\n return Math.atan2(v.y - this.y, v.x - this.x)\n }\n\n /**\n * Computes an angle to another point in degrees.\n * @param v Point or a number to add.\n * @returns True when points are equal\n */\n degrees(v: Point): number {\n return (this.angle(v) * 180) / Math.PI\n }\n\n /**\n * Computes the distance to the other point.\n */\n distance(other: Point): number {\n return Math.sqrt((this.x - other.x) ** 2 + (this.y - other.y) ** 2)\n }\n\n /**\n * Computes the distance between two points.\n */\n static distance(p1: Point, p2: Point): number {\n return p1.distance(p2)\n }\n}\n"]}
@@ -1,65 +0,0 @@
1
- import VizWorkspaceElement from '../elements/VizWorkspaceElement.js';
2
- import { Point } from './Point.js';
3
- import { IEdgeDirections } from './types.js';
4
- /**
5
- * Computes a point from the `x` and `y` coordinates of the viewport and applies
6
- * the current scale to it to correctly position the click coordinates.
7
- *
8
- * @param wrapper The relatively positioned wrapper
9
- * @param container The absolutely positioned container
10
- * @param scale The current scale applied to the container
11
- * @returns A point with x and y scaled coordinates.
12
- */
13
- export declare function clickPoint(x: number, y: number, wrapper: HTMLElement, container: HTMLElement, scale: number): Point;
14
- /**
15
- * Computes a point from the `x` and `y` coordinates of the viewport and applies
16
- * the current scale to it to correctly position the click coordinates.
17
- *
18
- * @param workspace The workspace element
19
- * @returns A point with x and y scaled coordinates.
20
- */
21
- export declare function getRelativeClickPoint(x: number, y: number, workspace: VizWorkspaceElement): Point;
22
- /**
23
- * Computes the direction for both start and end points relative to their
24
- * shapes.
25
- * The `end` property describes the direction of an abstract arrow would be pointing to.
26
- * The `start` is the direction facing the beginning of the path.
27
- *
28
- * @param sp The start point to calculate the direction from
29
- * @param ep The end point to calculate the direction to
30
- * @param sBox DOM rectangle of the source
31
- * @param eBox DOM rectangle of the target
32
- */
33
- export declare function findDirection(sp: Point, ep: Point, sBox: DOMRect, eBox: DOMRect): IEdgeDirections;
34
- /**
35
- * Finds a pair of points closest to each other but from both sets.
36
- *
37
- * @param s1 First set.
38
- * @param s2 Second set.
39
- * @param avoid1 Avoid these points (when possible) from the set1
40
- * @param avoid2 Avoid these points (when possible) from the set2
41
- * @returns A list of two points closest to each other or null if there were no points in the set.
42
- */
43
- export declare function closetsPair(s1: Point[], s2: Point[], avoid1?: Point[], avoid2?: Point[]): Point[] | null;
44
- /**
45
- * Filters out invalid points
46
- */
47
- export declare function filterPoints(points: Point[]): Point[];
48
- /**
49
- * Computes a point of the click inside the workspace element (not the content wrapper).
50
- * This then can be used to position elements that are not inside the visualization
51
- * workspace.
52
- *
53
- * @param workspace The workspace element
54
- * @returns A point with x and y scaled coordinates.
55
- */
56
- export declare function getWorkspaceClick(x: number, y: number, workspace: VizWorkspaceElement): Point;
57
- export declare function getObjectBoundingClientRect(element: Element, workspace: VizWorkspaceElement): DOMRect;
58
- /**
59
- * Dispatches the `positionchange` custom event on an element that has been positioned.
60
- *
61
- * @param dx The difference in the `x` position in relation to the object position before the move
62
- * @param dy The difference in the `y` position in relation to the object position before the move
63
- */
64
- export declare function notifyMoved(element: EventTarget, dx: number, dy: number): void;
65
- //# sourceMappingURL=PositionUtils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PositionUtils.d.ts","sourceRoot":"","sources":["../../../../src/visualization/lib/PositionUtils.ts"],"names":[],"mappings":"AACA,OAAO,mBAAmB,MAAM,oCAAoC,CAAA;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,eAAe,EAAgB,MAAM,YAAY,CAAA;AAE1D;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE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