@foblex/flow 17.1.0 → 17.1.1

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 (231) hide show
  1. package/domain/css-cls.d.ts +13 -0
  2. package/domain/f-background/providers.d.ts +1 -1
  3. package/domain/f-canvas/providers.d.ts +1 -1
  4. package/domain/f-connection/index.d.ts +0 -3
  5. package/domain/f-connection/providers.d.ts +1 -4
  6. package/domain/f-connection/redraw-connections/redraw-connections.execution.d.ts +2 -2
  7. package/domain/f-connectors/calculate-closest-input/calculate-closest-input.execution.d.ts +11 -0
  8. package/domain/f-connectors/calculate-closest-input/calculate-closest-input.request.d.ts +7 -0
  9. package/domain/f-connectors/calculate-closest-input/index.d.ts +2 -0
  10. package/domain/f-connectors/find-input-at-position/find-input-at-position.execution.d.ts +24 -0
  11. package/domain/f-connectors/find-input-at-position/find-input-at-position.request.d.ts +8 -0
  12. package/domain/f-connectors/find-input-at-position/index.d.ts +2 -0
  13. package/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.execution.d.ts +14 -0
  14. package/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.request.d.ts +5 -0
  15. package/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/index.d.ts +2 -0
  16. package/domain/f-connectors/get-connector-and-rect/get-connector-and-rect-request.d.ts +5 -0
  17. package/domain/f-connectors/get-connector-and-rect/get-connector-and-rect.execution.d.ts +11 -0
  18. package/domain/f-connectors/get-connector-and-rect/index.d.ts +2 -0
  19. package/domain/{f-connection/find-closest-input → f-connectors}/i-closest-input.d.ts +1 -1
  20. package/domain/{f-connection/get-connector-with-rect/i-connector-with-rect.d.ts → f-connectors/i-connector-and-rect.d.ts} +2 -2
  21. package/domain/f-connectors/index.d.ts +8 -0
  22. package/domain/f-connectors/mark-all-can-be-connected-inputs/index.d.ts +2 -0
  23. package/domain/f-connectors/mark-all-can-be-connected-inputs/mark-all-can-be-connected-inputs.execution.d.ts +10 -0
  24. package/domain/f-connectors/mark-all-can-be-connected-inputs/mark-all-can-be-connected-inputs.request.d.ts +5 -0
  25. package/domain/f-connectors/providers.d.ts +7 -1
  26. package/domain/f-connectors/unmark-all-can-be-connected-inputs/index.d.ts +2 -0
  27. package/domain/f-connectors/unmark-all-can-be-connected-inputs/unmark-all-can-be-connected-inputs.execution.d.ts +10 -0
  28. package/domain/f-connectors/unmark-all-can-be-connected-inputs/unmark-all-can-be-connected-inputs.request.d.ts +5 -0
  29. package/domain/f-flow/get-flow-state/providers.d.ts +1 -1
  30. package/domain/f-flow/providers.d.ts +1 -1
  31. package/domain/f-node/providers.d.ts +1 -1
  32. package/domain/f-node/update-node-when-state-or-size-changed/update-node-when-state-or-size-changed.execution.d.ts +2 -0
  33. package/domain/f-selection/select/select.execution.d.ts +2 -5
  34. package/domain/f-selection/select-all/select-all.execution.d.ts +2 -5
  35. package/domain/f-zoom/add-zoom-to-store/add-zoom-to-store-request.d.ts +5 -0
  36. package/domain/f-zoom/add-zoom-to-store/add-zoom-to-store.execution.d.ts +9 -0
  37. package/domain/f-zoom/add-zoom-to-store/index.d.ts +2 -0
  38. package/domain/f-zoom/f-zoom-tag.d.ts +1 -0
  39. package/domain/f-zoom/index.d.ts +6 -0
  40. package/domain/f-zoom/providers.d.ts +5 -0
  41. package/domain/f-zoom/remove-zoom-from-store/index.d.ts +2 -0
  42. package/domain/f-zoom/remove-zoom-from-store/remove-zoom-from-store-request.d.ts +2 -0
  43. package/domain/f-zoom/remove-zoom-from-store/remove-zoom-from-store.execution.d.ts +9 -0
  44. package/domain/f-zoom/reset-zoom/index.d.ts +2 -0
  45. package/domain/f-zoom/reset-zoom/reset-zoom-request.d.ts +2 -0
  46. package/domain/f-zoom/reset-zoom/reset-zoom.execution.d.ts +10 -0
  47. package/domain/f-zoom/set-zoom/index.d.ts +2 -0
  48. package/domain/f-zoom/set-zoom/set-zoom-request.d.ts +8 -0
  49. package/domain/f-zoom/set-zoom/set-zoom.execution.d.ts +16 -0
  50. package/domain/i-f-action-trigger.d.ts +14 -0
  51. package/domain/index.d.ts +4 -0
  52. package/domain/log-deprecated.d.ts +1 -0
  53. package/domain/providers.d.ts +1 -1
  54. package/esm2022/domain/css-cls.mjs +14 -0
  55. package/esm2022/domain/f-connection/index.mjs +1 -4
  56. package/esm2022/domain/f-connection/providers.mjs +1 -7
  57. package/esm2022/domain/f-connection/redraw-connections/redraw-connections.execution.mjs +9 -9
  58. package/esm2022/domain/f-connectors/calculate-closest-input/calculate-closest-input.execution.mjs +42 -0
  59. package/esm2022/domain/f-connectors/calculate-closest-input/calculate-closest-input.request.mjs +9 -0
  60. package/esm2022/domain/f-connectors/calculate-closest-input/index.mjs +3 -0
  61. package/esm2022/domain/f-connectors/find-input-at-position/find-input-at-position.execution.mjs +89 -0
  62. package/esm2022/domain/f-connectors/find-input-at-position/find-input-at-position.request.mjs +11 -0
  63. package/esm2022/domain/f-connectors/find-input-at-position/index.mjs +3 -0
  64. package/esm2022/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.execution.mjs +45 -0
  65. package/esm2022/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.request.mjs +7 -0
  66. package/esm2022/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/index.mjs +3 -0
  67. package/esm2022/domain/f-connectors/get-connector-and-rect/get-connector-and-rect-request.mjs +7 -0
  68. package/esm2022/domain/f-connectors/get-connector-and-rect/get-connector-and-rect.execution.mjs +28 -0
  69. package/esm2022/domain/f-connectors/get-connector-and-rect/index.mjs +3 -0
  70. package/esm2022/domain/f-connectors/i-closest-input.mjs +2 -0
  71. package/esm2022/domain/f-connectors/i-connector-and-rect.mjs +2 -0
  72. package/esm2022/domain/f-connectors/index.mjs +9 -1
  73. package/esm2022/domain/f-connectors/mark-all-can-be-connected-inputs/index.mjs +3 -0
  74. package/esm2022/domain/f-connectors/mark-all-can-be-connected-inputs/mark-all-can-be-connected-inputs.execution.mjs +27 -0
  75. package/esm2022/domain/f-connectors/mark-all-can-be-connected-inputs/mark-all-can-be-connected-inputs.request.mjs +7 -0
  76. package/esm2022/domain/f-connectors/providers.mjs +14 -2
  77. package/esm2022/domain/f-connectors/unmark-all-can-be-connected-inputs/index.mjs +3 -0
  78. package/esm2022/domain/f-connectors/unmark-all-can-be-connected-inputs/unmark-all-can-be-connected-inputs.execution.mjs +27 -0
  79. package/esm2022/domain/f-connectors/unmark-all-can-be-connected-inputs/unmark-all-can-be-connected-inputs.request.mjs +7 -0
  80. package/esm2022/domain/f-draggable/end-drag-sequence/end-drag-sequence.execution.mjs +3 -2
  81. package/esm2022/domain/f-draggable/start-drag-sequence/start-drag-sequence.execution.mjs +3 -2
  82. package/esm2022/domain/f-node/update-node-when-state-or-size-changed/update-node-when-state-or-size-changed.execution.mjs +39 -5
  83. package/esm2022/domain/f-selection/select/select.execution.mjs +15 -19
  84. package/esm2022/domain/f-selection/select-all/select-all.execution.mjs +15 -19
  85. package/esm2022/domain/f-zoom/add-zoom-to-store/add-zoom-to-store-request.mjs +7 -0
  86. package/esm2022/domain/f-zoom/add-zoom-to-store/add-zoom-to-store.execution.mjs +25 -0
  87. package/esm2022/domain/f-zoom/add-zoom-to-store/index.mjs +3 -0
  88. package/esm2022/domain/f-zoom/f-zoom-tag.mjs +2 -0
  89. package/esm2022/domain/f-zoom/index.mjs +7 -0
  90. package/esm2022/domain/f-zoom/providers.mjs +11 -0
  91. package/esm2022/domain/f-zoom/remove-zoom-from-store/index.mjs +3 -0
  92. package/esm2022/domain/f-zoom/remove-zoom-from-store/remove-zoom-from-store-request.mjs +3 -0
  93. package/esm2022/domain/f-zoom/remove-zoom-from-store/remove-zoom-from-store.execution.mjs +25 -0
  94. package/esm2022/domain/f-zoom/reset-zoom/index.mjs +3 -0
  95. package/esm2022/domain/f-zoom/reset-zoom/reset-zoom-request.mjs +3 -0
  96. package/esm2022/domain/f-zoom/reset-zoom/reset-zoom.execution.mjs +27 -0
  97. package/esm2022/domain/f-zoom/set-zoom/index.mjs +3 -0
  98. package/esm2022/domain/f-zoom/set-zoom/set-zoom-request.mjs +13 -0
  99. package/esm2022/domain/f-zoom/set-zoom/set-zoom.execution.mjs +50 -0
  100. package/esm2022/domain/i-f-action-trigger.mjs +11 -0
  101. package/esm2022/domain/index.mjs +5 -1
  102. package/esm2022/domain/log-deprecated.mjs +11 -0
  103. package/esm2022/domain/providers.mjs +3 -1
  104. package/esm2022/f-canvas/domain/f-canvas-change.event.mjs +1 -1
  105. package/esm2022/f-canvas/f-canvas-base.mjs +1 -1
  106. package/esm2022/f-canvas/f-canvas.component.mjs +25 -2
  107. package/esm2022/f-connection/f-connection/f-connection.component.mjs +7 -5
  108. package/esm2022/f-connection/f-connection-for-create/f-connection-for-create.component.mjs +7 -5
  109. package/esm2022/f-connection/f-snap-connection/f-snap-connection.component.mjs +9 -6
  110. package/esm2022/f-connectors/f-connector-base.mjs +9 -5
  111. package/esm2022/f-connectors/f-node-input/f-node-input.directive.mjs +23 -23
  112. package/esm2022/f-connectors/f-node-outlet/f-node-outlet.directive.mjs +16 -17
  113. package/esm2022/f-connectors/f-node-output/f-node-output.directive.mjs +28 -24
  114. package/esm2022/f-connectors/index.mjs +1 -2
  115. package/esm2022/f-draggable/canvas/canvas-move-finalize/canvas-move-finalize.execution.mjs +8 -11
  116. package/esm2022/f-draggable/canvas/canvas-move-finalize/index.mjs +1 -2
  117. package/esm2022/f-draggable/canvas/canvas-move-preparation/canvas-move-preparation.execution.mjs +36 -19
  118. package/esm2022/f-draggable/canvas/canvas-move-preparation/index.mjs +1 -3
  119. package/esm2022/f-draggable/canvas/canvas.drag-handler.mjs +8 -8
  120. package/esm2022/f-draggable/canvas/providers.mjs +5 -5
  121. package/esm2022/f-draggable/connections/create-connection/create-connection-finalize/create-connection-finalize.execution.mjs +13 -10
  122. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-drag-handler/create-connection-drag-handler.execution.mjs +2 -2
  123. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-drag-handler/create-connection-drag-handler.request.mjs +4 -4
  124. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-from-outlet-preparation/create-connection-from-outlet-preparation.execution.mjs +3 -3
  125. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-from-output-preparation/create-connection-from-output-preparation.execution.mjs +7 -7
  126. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-preparation.execution.mjs +5 -5
  127. package/esm2022/f-draggable/connections/create-connection/create-connection.drag-handler.mjs +54 -50
  128. package/esm2022/f-draggable/connections/i-create-reassign-connection-drag-data.mjs +2 -0
  129. package/esm2022/f-draggable/connections/index.mjs +2 -2
  130. package/esm2022/f-draggable/connections/providers.mjs +1 -4
  131. package/esm2022/f-draggable/connections/reassign-connection/reassign-connection-finalize/reassign-connection-finalize.execution.mjs +9 -5
  132. package/esm2022/f-draggable/connections/reassign-connection/reassign-connection.drag-handler.mjs +70 -53
  133. package/esm2022/f-draggable/i-draggable-item.mjs +1 -1
  134. package/esm2022/f-draggable/node/connection-base-drag-handler.mjs +4 -4
  135. package/esm2022/f-node/f-group.directive.mjs +9 -7
  136. package/esm2022/f-node/f-node.directive.mjs +10 -8
  137. package/esm2022/f-storage/f-components-store.mjs +2 -1
  138. package/esm2022/f-zoom/e-f-zoom-action.mjs +6 -0
  139. package/esm2022/f-zoom/e-f-zoom-direction.mjs +6 -0
  140. package/esm2022/f-zoom/f-zoom-base.mjs +2 -98
  141. package/esm2022/f-zoom/f-zoom.directive.mjs +139 -21
  142. package/esm2022/f-zoom/index.mjs +3 -1
  143. package/f-backgroud/providers.d.ts +1 -1
  144. package/f-canvas/f-canvas-base.d.ts +2 -2
  145. package/f-canvas/f-canvas.component.d.ts +9 -0
  146. package/f-connection/f-connection/f-connection.component.d.ts +2 -0
  147. package/f-connection/f-connection-for-create/f-connection-for-create.component.d.ts +2 -0
  148. package/f-connection/f-snap-connection/f-snap-connection.component.d.ts +3 -0
  149. package/f-connection/providers.d.ts +1 -1
  150. package/f-connectors/f-connector-base.d.ts +4 -2
  151. package/f-connectors/f-node-input/f-node-input.directive.d.ts +6 -6
  152. package/f-connectors/f-node-outlet/f-node-outlet.directive.d.ts +6 -6
  153. package/f-connectors/f-node-output/f-node-output.directive.d.ts +8 -7
  154. package/f-connectors/index.d.ts +0 -1
  155. package/f-connectors/providers.d.ts +1 -1
  156. package/f-draggable/canvas/canvas-move-finalize/canvas-move-finalize.execution.d.ts +1 -3
  157. package/f-draggable/canvas/canvas-move-finalize/index.d.ts +0 -1
  158. package/f-draggable/canvas/canvas-move-preparation/canvas-move-preparation.execution.d.ts +7 -6
  159. package/f-draggable/canvas/canvas-move-preparation/index.d.ts +0 -2
  160. package/f-draggable/canvas/canvas.drag-handler.d.ts +2 -2
  161. package/f-draggable/canvas/providers.d.ts +3 -1
  162. package/f-draggable/connections/create-connection/create-connection-finalize/create-connection-finalize.execution.d.ts +3 -2
  163. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-drag-handler/create-connection-drag-handler.request.d.ts +3 -3
  164. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-preparation.execution.d.ts +2 -2
  165. package/f-draggable/connections/create-connection/create-connection.drag-handler.d.ts +14 -15
  166. package/f-draggable/connections/i-create-reassign-connection-drag-data.d.ts +7 -0
  167. package/f-draggable/connections/index.d.ts +1 -1
  168. package/f-draggable/connections/providers.d.ts +1 -2
  169. package/f-draggable/connections/reassign-connection/reassign-connection-finalize/reassign-connection-finalize.execution.d.ts +1 -0
  170. package/f-draggable/connections/reassign-connection/reassign-connection.drag-handler.d.ts +17 -15
  171. package/f-draggable/i-draggable-item.d.ts +2 -1
  172. package/f-draggable/node/connection-base-drag-handler.d.ts +3 -3
  173. package/f-draggable/node-resize/node-resize-preparation/providers.d.ts +1 -1
  174. package/f-draggable/node-resize/providers.d.ts +1 -1
  175. package/f-draggable/providers.d.ts +1 -1
  176. package/f-minimap/providers.d.ts +1 -1
  177. package/f-node/f-group.directive.d.ts +4 -0
  178. package/f-node/f-node.directive.d.ts +4 -0
  179. package/f-node/providers.d.ts +1 -1
  180. package/f-storage/f-components-store.d.ts +2 -0
  181. package/f-storage/providers.d.ts +1 -1
  182. package/f-zoom/e-f-zoom-action.d.ts +4 -0
  183. package/f-zoom/e-f-zoom-direction.d.ts +4 -0
  184. package/f-zoom/f-zoom-base.d.ts +0 -17
  185. package/f-zoom/f-zoom.directive.d.ts +40 -5
  186. package/f-zoom/index.d.ts +2 -0
  187. package/fesm2022/foblex-flow.mjs +1152 -915
  188. package/fesm2022/foblex-flow.mjs.map +1 -1
  189. package/package.json +1 -1
  190. package/domain/f-connection/find-closest-input/find-closest-input.execution.d.ts +0 -11
  191. package/domain/f-connection/find-closest-input/find-closest-input.request.d.ts +0 -7
  192. package/domain/f-connection/find-closest-input/index.d.ts +0 -3
  193. package/domain/f-connection/get-all-can-be-connected-input-positions/get-all-can-be-connected-input-positions.execution.d.ts +0 -21
  194. package/domain/f-connection/get-all-can-be-connected-input-positions/get-all-can-be-connected-input-positions.request.d.ts +0 -4
  195. package/domain/f-connection/get-all-can-be-connected-input-positions/index.d.ts +0 -2
  196. package/domain/f-connection/get-connector-with-rect/get-connector-with-rect-request.d.ts +0 -5
  197. package/domain/f-connection/get-connector-with-rect/get-connector-with-rect.execution.d.ts +0 -10
  198. package/domain/f-connection/get-connector-with-rect/index.d.ts +0 -3
  199. package/esm2022/domain/f-connection/find-closest-input/find-closest-input.execution.mjs +0 -42
  200. package/esm2022/domain/f-connection/find-closest-input/find-closest-input.request.mjs +0 -9
  201. package/esm2022/domain/f-connection/find-closest-input/i-closest-input.mjs +0 -2
  202. package/esm2022/domain/f-connection/find-closest-input/index.mjs +0 -4
  203. package/esm2022/domain/f-connection/get-all-can-be-connected-input-positions/get-all-can-be-connected-input-positions.execution.mjs +0 -57
  204. package/esm2022/domain/f-connection/get-all-can-be-connected-input-positions/get-all-can-be-connected-input-positions.request.mjs +0 -7
  205. package/esm2022/domain/f-connection/get-all-can-be-connected-input-positions/index.mjs +0 -3
  206. package/esm2022/domain/f-connection/get-connector-with-rect/get-connector-with-rect-request.mjs +0 -7
  207. package/esm2022/domain/f-connection/get-connector-with-rect/get-connector-with-rect.execution.mjs +0 -25
  208. package/esm2022/domain/f-connection/get-connector-with-rect/i-connector-with-rect.mjs +0 -2
  209. package/esm2022/domain/f-connection/get-connector-with-rect/index.mjs +0 -4
  210. package/esm2022/f-connectors/domain/calculate-connector-connectable-side/calculate-connector-connectable-side-request.mjs +0 -9
  211. package/esm2022/f-connectors/domain/calculate-connector-connectable-side/calculate-connector-connectable-side.handler.mjs +0 -38
  212. package/esm2022/f-connectors/domain/calculate-connector-connectable-side/index.mjs +0 -3
  213. package/esm2022/f-connectors/domain/index.mjs +0 -2
  214. package/esm2022/f-draggable/canvas/canvas-move-finalize/providers.mjs +0 -5
  215. package/esm2022/f-draggable/canvas/canvas-move-preparation/canvas-move-preparation.validator.mjs +0 -46
  216. package/esm2022/f-draggable/canvas/canvas-move-preparation/providers.mjs +0 -7
  217. package/esm2022/f-draggable/connections/get-input-under-pointer/get-input-under-pointer.execution.mjs +0 -88
  218. package/esm2022/f-draggable/connections/get-input-under-pointer/get-input-under-pointer.request.mjs +0 -9
  219. package/esm2022/f-draggable/connections/get-input-under-pointer/get-input-under-pointer.validator.mjs +0 -36
  220. package/esm2022/f-draggable/connections/get-input-under-pointer/index.mjs +0 -4
  221. package/f-connectors/domain/calculate-connector-connectable-side/calculate-connector-connectable-side-request.d.ts +0 -6
  222. package/f-connectors/domain/calculate-connector-connectable-side/calculate-connector-connectable-side.handler.d.ts +0 -7
  223. package/f-connectors/domain/calculate-connector-connectable-side/index.d.ts +0 -2
  224. package/f-connectors/domain/index.d.ts +0 -1
  225. package/f-draggable/canvas/canvas-move-finalize/providers.d.ts +0 -2
  226. package/f-draggable/canvas/canvas-move-preparation/canvas-move-preparation.validator.d.ts +0 -17
  227. package/f-draggable/canvas/canvas-move-preparation/providers.d.ts +0 -3
  228. package/f-draggable/connections/get-input-under-pointer/get-input-under-pointer.execution.d.ts +0 -27
  229. package/f-draggable/connections/get-input-under-pointer/get-input-under-pointer.request.d.ts +0 -8
  230. package/f-draggable/connections/get-input-under-pointer/get-input-under-pointer.validator.d.ts +0 -13
  231. package/f-draggable/connections/get-input-under-pointer/index.d.ts +0 -3
@@ -1,15 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, Injectable, Directive, ElementRef, Input, HostBinding, EventEmitter, DestroyRef, Output, booleanAttribute, Inject, Component, ChangeDetectionStrategy, ViewChild, Optional, ContentChildren, NgZone, ContentChild, NgModule } from '@angular/core';
3
- import { RectExtensions, RoundedRect, TransformModelExtensions, PointExtensions, Point, SizeExtensions, LineExtensions, GetIntersections, findClosestAlignment, setRectToElement, adjustRectToMinSize, setRectToViewBox } from '@foblex/2d';
2
+ import { InjectionToken, inject, Injectable, Directive, ElementRef, Input, HostBinding, EventEmitter, DestroyRef, booleanAttribute, Output, Inject, Component, ChangeDetectionStrategy, ViewChild, Optional, numberAttribute, ContentChildren, NgZone, ContentChild, Renderer2, NgModule } from '@angular/core';
3
+ import { RectExtensions, RoundedRect, TransformModelExtensions, PointExtensions, Point, LineExtensions, GetIntersections, SizeExtensions, findClosestAlignment, setRectToElement, adjustRectToMinSize, setRectToViewBox } from '@foblex/2d';
4
4
  import { __decorate } from 'tslib';
5
- import * as i2 from '@foblex/mediator';
5
+ import * as i2$1 from '@foblex/mediator';
6
6
  import { FExecutionRegister, FMediator, FValidatorRegister } from '@foblex/mediator';
7
7
  import * as i1 from '@foblex/platform';
8
8
  import { BrowserService, EOperationSystem } from '@foblex/platform';
9
- import { normalizeDomElementId, castToEnum, flatMap, isClosestElementHasClass, getDataAttrValueFromClosestElementWithClass, deepCloneNode, castToBoolean } from '@foblex/utils';
10
- import * as i2$1 from '@angular/common';
9
+ import { normalizeDomElementId, castToEnum, flatMap, isClosestElementHasClass, getDataAttrValueFromClosestElementWithClass, deepCloneNode } from '@foblex/utils';
10
+ import * as i2 from '@angular/common';
11
11
  import { CommonModule } from '@angular/common';
12
- import { DragAndDropBase, EventExtensions } from '@foblex/drag-toolkit';
12
+ import { DragAndDropBase } from '@foblex/drag-toolkit';
13
13
 
14
14
  const F_BACKGROUND_PATTERN = new InjectionToken('F_BACKGROUND_PATTERN');
15
15
 
@@ -217,6 +217,7 @@ class FComponentsStore {
217
217
  get flowHost() {
218
218
  return this.fFlow?.hostElement;
219
219
  }
220
+ fComponents = {};
220
221
  fFlow;
221
222
  fCanvas;
222
223
  fBackground;
@@ -919,171 +920,6 @@ function createSVGElement$1(tag, fBrowser) {
919
920
  return fBrowser.document.createElementNS('http://www.w3.org/2000/svg', tag);
920
921
  }
921
922
 
922
- class FindClosestInputRequest {
923
- position;
924
- canBeConnectedInputs;
925
- constructor(position, canBeConnectedInputs) {
926
- this.position = position;
927
- this.canBeConnectedInputs = canBeConnectedInputs;
928
- }
929
- }
930
-
931
- let FindClosestInputExecution = class FindClosestInputExecution {
932
- handle(payload) {
933
- let result;
934
- let minDistance = Infinity;
935
- for (const element of payload.canBeConnectedInputs) {
936
- const distance = this.distanceToRectangle(payload.position, element);
937
- if (distance < minDistance) {
938
- minDistance = distance;
939
- result = element;
940
- }
941
- }
942
- return result ? {
943
- ...result,
944
- distance: minDistance,
945
- } : undefined;
946
- }
947
- distanceToRectangle(point, inputWithRect) {
948
- const closestX = this.clamp(point.x, inputWithRect.fRect.x, inputWithRect.fRect.x + inputWithRect.fRect.width);
949
- const closestY = this.clamp(point.y, inputWithRect.fRect.y, inputWithRect.fRect.y + inputWithRect.fRect.height);
950
- const dx = point.x - closestX;
951
- const dy = point.y - closestY;
952
- return Math.sqrt(dx * dx + dy * dy);
953
- }
954
- clamp(value, min, max) {
955
- return Math.max(min, Math.min(max, value));
956
- }
957
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FindClosestInputExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
958
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FindClosestInputExecution });
959
- };
960
- FindClosestInputExecution = __decorate([
961
- FExecutionRegister(FindClosestInputRequest)
962
- ], FindClosestInputExecution);
963
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FindClosestInputExecution, decorators: [{
964
- type: Injectable
965
- }] });
966
-
967
- class GetAllCanBeConnectedInputPositionsRequest {
968
- fOutputId;
969
- constructor(fOutputId) {
970
- this.fOutputId = fOutputId;
971
- }
972
- }
973
-
974
- class GetConnectorWithRectRequest {
975
- connector;
976
- constructor(connector) {
977
- this.connector = connector;
978
- }
979
- }
980
-
981
- class GetNormalizedElementRectRequest {
982
- element;
983
- isRoundedRect;
984
- constructor(element, isRoundedRect = true) {
985
- this.element = element;
986
- this.isRoundedRect = isRoundedRect;
987
- }
988
- }
989
-
990
- let GetNormalizedElementRectExecution = class GetNormalizedElementRectExecution {
991
- _fComponentsStore = inject(FComponentsStore);
992
- _fMediator = inject(FMediator);
993
- get _transform() {
994
- return this._fComponentsStore.fCanvas.transform;
995
- }
996
- handle(request) {
997
- const systemRect = this._getElementRoundedRect(request);
998
- const position = this._normalizePosition(systemRect);
999
- const size = this._normalizeSize(systemRect);
1000
- return new RoundedRect(position.x, position.y, size.width, size.height, systemRect.radius1, systemRect.radius2, systemRect.radius3, systemRect.radius4);
1001
- }
1002
- _getElementRoundedRect(request) {
1003
- return request.isRoundedRect ? this._fMediator.send(new GetElementRoundedRectRequest(request.element)) : RoundedRect.fromRect(RectExtensions.fromElement(request.element));
1004
- }
1005
- _normalizePosition(rect) {
1006
- return Point.fromPoint(rect).elementTransform(this._fComponentsStore.flowHost).sub(this._transform.scaledPosition).sub(this._transform.position).div(this._transform.scale);
1007
- }
1008
- _normalizeSize(rect) {
1009
- return SizeExtensions.initialize(rect.width / this._transform.scale, rect.height / this._transform.scale);
1010
- }
1011
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNormalizedElementRectExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1012
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNormalizedElementRectExecution });
1013
- };
1014
- GetNormalizedElementRectExecution = __decorate([
1015
- FExecutionRegister(GetNormalizedElementRectRequest)
1016
- ], GetNormalizedElementRectExecution);
1017
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNormalizedElementRectExecution, decorators: [{
1018
- type: Injectable
1019
- }] });
1020
-
1021
- let GetConnectorWithRectExecution = class GetConnectorWithRectExecution {
1022
- _fMediator = inject(FMediator);
1023
- handle(request) {
1024
- return {
1025
- fConnector: request.connector,
1026
- fRect: this._fMediator.send(new GetNormalizedElementRectRequest(request.connector.hostElement, true))
1027
- };
1028
- }
1029
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetConnectorWithRectExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1030
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetConnectorWithRectExecution });
1031
- };
1032
- GetConnectorWithRectExecution = __decorate([
1033
- FExecutionRegister(GetConnectorWithRectRequest)
1034
- ], GetConnectorWithRectExecution);
1035
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetConnectorWithRectExecution, decorators: [{
1036
- type: Injectable
1037
- }] });
1038
-
1039
- let GetAllCanBeConnectedInputPositionsExecution = class GetAllCanBeConnectedInputPositionsExecution {
1040
- fComponentsStore;
1041
- fMediator;
1042
- get fNodes() {
1043
- return this.fComponentsStore.fNodes;
1044
- }
1045
- get fInputs() {
1046
- return this.fComponentsStore.fInputs;
1047
- }
1048
- constructor(fComponentsStore, fMediator) {
1049
- this.fComponentsStore = fComponentsStore;
1050
- this.fMediator = fMediator;
1051
- }
1052
- handle(payload) {
1053
- return this.getCanBeConnectedInputs(this.getOutput(payload.fOutputId)).map((x) => {
1054
- return this.fMediator.send(new GetConnectorWithRectRequest(x));
1055
- });
1056
- }
1057
- getOutput(fId) {
1058
- return this.findOutputById(fId) || this.findOutletById(fId);
1059
- }
1060
- findOutputById(fId) {
1061
- return this.fComponentsStore.fOutputs.find((x) => x.fId === fId);
1062
- }
1063
- findOutletById(fId) {
1064
- return this.fComponentsStore.fOutlets.find((x) => x.fId === fId);
1065
- }
1066
- getCanBeConnectedInputs(output) {
1067
- return output.isSelfConnectable ?
1068
- this.fInputs.filter((x) => x.canBeConnected) :
1069
- this.filterSelfConnectable(this.fInputs.filter((x) => x.canBeConnected), output);
1070
- }
1071
- filterSelfConnectable(inputs, output) {
1072
- return inputs.filter((x) => this.getNodeOfConnector(output)?.hostElement !== this.getNodeOfConnector(x)?.hostElement);
1073
- }
1074
- getNodeOfConnector(connector) {
1075
- return this.fNodes.find((x) => x.isContains(connector.hostElement));
1076
- }
1077
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetAllCanBeConnectedInputPositionsExecution, deps: [{ token: FComponentsStore }, { token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
1078
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetAllCanBeConnectedInputPositionsExecution });
1079
- };
1080
- GetAllCanBeConnectedInputPositionsExecution = __decorate([
1081
- FExecutionRegister(GetAllCanBeConnectedInputPositionsRequest)
1082
- ], GetAllCanBeConnectedInputPositionsExecution);
1083
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetAllCanBeConnectedInputPositionsExecution, decorators: [{
1084
- type: Injectable
1085
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2.FMediator }] });
1086
-
1087
923
  class CalculateConnectionLineByBehaviorRequest {
1088
924
  outputRect;
1089
925
  inputRect;
@@ -1170,66 +1006,25 @@ var EFConnectableSide;
1170
1006
  EFConnectableSide["AUTO"] = "auto";
1171
1007
  })(EFConnectableSide || (EFConnectableSide = {}));
1172
1008
 
1173
- class CalculateConnectorConnectableSideHandler {
1174
- handle(request) {
1175
- let result;
1176
- if (request.fConnector.userFConnectableSide === EFConnectableSide.AUTO) {
1177
- result = this.getSideByDelta(request.fConnector.hostElement, request.fNodeHost);
1178
- }
1179
- else {
1180
- result = request.fConnector.userFConnectableSide;
1181
- }
1182
- return result;
1183
- }
1184
- getSideByDelta(fConnectorHost, fNodeHost) {
1185
- let result;
1186
- const childRect = RectExtensions.fromElement(fConnectorHost);
1187
- const parentRect = fNodeHost.getBoundingClientRect();
1188
- const deltaLeft = childRect.gravityCenter.x - parentRect.left;
1189
- const deltaRight = parentRect.right - childRect.gravityCenter.x;
1190
- const deltaTop = childRect.gravityCenter.y - parentRect.top;
1191
- const deltaBottom = parentRect.bottom - childRect.gravityCenter.y;
1192
- const minDelta = Math.min(deltaLeft, deltaRight, deltaTop, deltaBottom);
1193
- if (minDelta === deltaLeft) {
1194
- result = EFConnectableSide.LEFT;
1195
- }
1196
- else if (minDelta === deltaRight) {
1197
- result = EFConnectableSide.RIGHT;
1198
- }
1199
- else if (minDelta === deltaTop) {
1200
- result = EFConnectableSide.TOP;
1201
- }
1202
- else {
1203
- result = EFConnectableSide.BOTTOM;
1204
- }
1205
- return result;
1206
- }
1207
- }
1208
-
1209
- class CalculateConnectorConnectableSideRequest {
1210
- fConnector;
1211
- fNodeHost;
1212
- constructor(fConnector, fNodeHost) {
1213
- this.fConnector = fConnector;
1214
- this.fNodeHost = fNodeHost;
1215
- }
1216
- }
1217
-
1218
1009
  class FConnectorBase {
1219
1010
  _isConnected = false;
1220
1011
  get isConnected() {
1221
1012
  return this._isConnected;
1222
1013
  }
1223
- toConnector;
1014
+ toConnector = [];
1224
1015
  isSelfConnectable = true;
1225
1016
  fConnectableSide = EFConnectableSide.AUTO;
1226
1017
  userFConnectableSide = EFConnectableSide.AUTO;
1227
1018
  isContains(element) {
1228
1019
  return this.hostElement.contains(element);
1229
1020
  }
1230
- setConnected(isConnected, toConnector) {
1231
- this._isConnected = isConnected;
1232
- this.toConnector = toConnector;
1021
+ setConnected(toConnector) {
1022
+ this._isConnected = true;
1023
+ this.toConnector.push(toConnector);
1024
+ }
1025
+ resetConnected() {
1026
+ this._isConnected = false;
1027
+ this.toConnector = [];
1233
1028
  }
1234
1029
  }
1235
1030
 
@@ -1491,7 +1286,7 @@ class FGroupDirective extends FNodeBase {
1491
1286
  this._fMediator.send(new RemoveNodeFromStoreRequest(this));
1492
1287
  }
1493
1288
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FGroupDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.BrowserService }], target: i0.ɵɵFactoryTarget.Directive });
1494
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: FGroupDirective, selector: "[fGroup]", inputs: { fId: ["fGroupId", "fId"], fParentId: ["fGroupParentId", "fParentId"], position: ["fGroupPosition", "position"], size: ["fGroupSize", "size"], fDraggingDisabled: ["fGroupDraggingDisabled", "fDraggingDisabled"], fSelectionDisabled: ["fGroupSelectionDisabled", "fSelectionDisabled"], fIncludePadding: "fIncludePadding", fConnectOnNode: "fConnectOnNode" }, outputs: { positionChange: "fGroupPositionChange", sizeChange: "fGroupSizeChange" }, host: { properties: { "attr.data-f-group-id": "fId", "class.f-group-dragging-disabled": "fDraggingDisabled", "class.f-group-selection-disabled": "fSelectionDisabled" }, classAttribute: "f-group f-component" }, providers: [
1289
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: FGroupDirective, selector: "[fGroup]", inputs: { fId: ["fGroupId", "fId"], fParentId: ["fGroupParentId", "fParentId"], position: ["fGroupPosition", "position"], size: ["fGroupSize", "size"], fDraggingDisabled: ["fGroupDraggingDisabled", "fDraggingDisabled", booleanAttribute], fSelectionDisabled: ["fGroupSelectionDisabled", "fSelectionDisabled", booleanAttribute], fIncludePadding: ["fIncludePadding", "fIncludePadding", booleanAttribute], fConnectOnNode: ["fConnectOnNode", "fConnectOnNode", booleanAttribute] }, outputs: { positionChange: "fGroupPositionChange", sizeChange: "fGroupSizeChange" }, host: { properties: { "attr.data-f-group-id": "fId", "class.f-group-dragging-disabled": "fDraggingDisabled", "class.f-group-selection-disabled": "fSelectionDisabled" }, classAttribute: "f-group f-component" }, providers: [
1495
1290
  { provide: F_NODE, useExisting: FGroupDirective }
1496
1291
  ], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0 });
1497
1292
  }
@@ -1530,14 +1325,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
1530
1325
  args: ['fGroupSizeChange']
1531
1326
  }], fDraggingDisabled: [{
1532
1327
  type: Input,
1533
- args: ['fGroupDraggingDisabled']
1328
+ args: [{ alias: 'fGroupDraggingDisabled', transform: booleanAttribute }]
1534
1329
  }], fSelectionDisabled: [{
1535
1330
  type: Input,
1536
- args: ['fGroupSelectionDisabled']
1331
+ args: [{ alias: 'fGroupSelectionDisabled', transform: booleanAttribute }]
1537
1332
  }], fIncludePadding: [{
1538
- type: Input
1333
+ type: Input,
1334
+ args: [{ transform: booleanAttribute }]
1539
1335
  }], fConnectOnNode: [{
1540
- type: Input
1336
+ type: Input,
1337
+ args: [{ transform: booleanAttribute }]
1541
1338
  }] } });
1542
1339
 
1543
1340
  let uniqueId$a = 0;
@@ -1565,7 +1362,7 @@ class FNodeDirective extends FNodeBase {
1565
1362
  fDraggingDisabled = false;
1566
1363
  fSelectionDisabled = false;
1567
1364
  fIncludePadding = true;
1568
- //TODO: Add ability to connect to first connectable input if node is under pointer
1365
+ //Add ability to connect to first connectable input if node is at pointer position
1569
1366
  fConnectOnNode = true;
1570
1367
  _destroyRef = inject(DestroyRef);
1571
1368
  _fMediator = inject(FMediator);
@@ -1607,7 +1404,7 @@ class FNodeDirective extends FNodeBase {
1607
1404
  this._fMediator.send(new RemoveNodeFromStoreRequest(this));
1608
1405
  }
1609
1406
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FNodeDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.BrowserService }], target: i0.ɵɵFactoryTarget.Directive });
1610
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: FNodeDirective, selector: "[fNode]", inputs: { fId: ["fNodeId", "fId"], fParentId: ["fNodeParentId", "fParentId"], position: ["fNodePosition", "position"], size: ["fNodeSize", "size"], fDraggingDisabled: ["fNodeDraggingDisabled", "fDraggingDisabled"], fSelectionDisabled: ["fNodeSelectionDisabled", "fSelectionDisabled"], fIncludePadding: "fIncludePadding", fConnectOnNode: "fConnectOnNode" }, outputs: { positionChange: "fNodePositionChange", sizeChange: "fNodeSizeChange" }, host: { properties: { "attr.data-f-node-id": "fId", "class.f-node-dragging-disabled": "fDraggingDisabled", "class.f-node-selection-disabled": "fSelectionDisabled" }, classAttribute: "f-node f-component" }, providers: [
1407
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: FNodeDirective, selector: "[fNode]", inputs: { fId: ["fNodeId", "fId"], fParentId: ["fNodeParentId", "fParentId"], position: ["fNodePosition", "position"], size: ["fNodeSize", "size"], fDraggingDisabled: ["fNodeDraggingDisabled", "fDraggingDisabled", booleanAttribute], fSelectionDisabled: ["fNodeSelectionDisabled", "fSelectionDisabled", booleanAttribute], fIncludePadding: ["fIncludePadding", "fIncludePadding", booleanAttribute], fConnectOnNode: ["fConnectOnNode", "fConnectOnNode", booleanAttribute] }, outputs: { positionChange: "fNodePositionChange", sizeChange: "fNodeSizeChange" }, host: { properties: { "attr.data-f-node-id": "fId", "class.f-node-dragging-disabled": "fDraggingDisabled", "class.f-node-selection-disabled": "fSelectionDisabled" }, classAttribute: "f-node f-component" }, providers: [
1611
1408
  { provide: F_NODE, useExisting: FNodeDirective }
1612
1409
  ], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0 });
1613
1410
  }
@@ -1646,14 +1443,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
1646
1443
  args: ['fNodeSizeChange']
1647
1444
  }], fDraggingDisabled: [{
1648
1445
  type: Input,
1649
- args: ['fNodeDraggingDisabled']
1446
+ args: [{ alias: 'fNodeDraggingDisabled', transform: booleanAttribute }]
1650
1447
  }], fSelectionDisabled: [{
1651
1448
  type: Input,
1652
- args: ['fNodeSelectionDisabled']
1449
+ args: [{ alias: 'fNodeSelectionDisabled', transform: booleanAttribute }]
1653
1450
  }], fIncludePadding: [{
1654
- type: Input
1451
+ type: Input,
1452
+ args: [{ transform: booleanAttribute }]
1655
1453
  }], fConnectOnNode: [{
1656
- type: Input
1454
+ type: Input,
1455
+ args: [{ transform: booleanAttribute }]
1657
1456
  }] } });
1658
1457
 
1659
1458
  function isNode(element) {
@@ -1669,39 +1468,43 @@ const F_NODE_PROVIDERS = [
1669
1468
 
1670
1469
  let uniqueId$9 = 0;
1671
1470
  class FNodeInputDirective extends FNodeInputBase {
1672
- fNode;
1471
+ _elementReference = inject(ElementRef);
1472
+ _fMediator = inject(FMediator);
1473
+ _fNode = inject(F_NODE);
1673
1474
  fId = `f-node-input-${uniqueId$9++}`;
1674
1475
  multiple = true;
1675
1476
  disabled = false;
1676
1477
  userFConnectableSide = EFConnectableSide.AUTO;
1478
+ get fNodeId() {
1479
+ return this._fNode.fId;
1480
+ }
1677
1481
  get hostElement() {
1678
1482
  return this._elementReference.nativeElement;
1679
1483
  }
1680
- _elementReference = inject(ElementRef);
1681
- _fMediator = inject(FMediator);
1682
- constructor(fNode) {
1683
- super();
1684
- this.fNode = fNode;
1685
- }
1686
1484
  ngOnInit() {
1687
1485
  this._fMediator.send(new AddInputToStoreRequest(this));
1688
- this.fNode.addConnector(this);
1486
+ this._fNode.addConnector(this);
1689
1487
  }
1690
1488
  ngOnChanges(changes) {
1691
1489
  if (changes['userFConnectableSide']) {
1692
- this.fNode.refresh();
1490
+ this._fNode.refresh();
1693
1491
  }
1694
1492
  }
1695
- setConnected(isConnected, toConnector) {
1696
- super.setConnected(isConnected, toConnector);
1697
- this.hostElement.classList.toggle('f-node-input-connected', isConnected);
1698
- this.hostElement.classList.toggle('f-node-input-not-connectable', !this.canBeConnected);
1493
+ setConnected(toConnector) {
1494
+ super.setConnected(toConnector);
1495
+ this.hostElement.classList.toggle(F_CSS_CLASS.CONNECTOR.INPUT_CONNECTED, true);
1496
+ this.hostElement.classList.toggle(F_CSS_CLASS.CONNECTOR.INPUT_NOT_CONNECTABLE, !this.canBeConnected);
1497
+ }
1498
+ resetConnected() {
1499
+ super.resetConnected();
1500
+ this.hostElement.classList.toggle(F_CSS_CLASS.CONNECTOR.INPUT_CONNECTED, false);
1501
+ this.hostElement.classList.toggle(F_CSS_CLASS.CONNECTOR.INPUT_NOT_CONNECTABLE, !this.canBeConnected);
1699
1502
  }
1700
1503
  ngOnDestroy() {
1701
- this.fNode.removeConnector(this);
1504
+ this._fNode.removeConnector(this);
1702
1505
  this._fMediator.send(new RemoveInputFromStoreRequest(this));
1703
1506
  }
1704
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FNodeInputDirective, deps: [{ token: F_NODE }], target: i0.ɵɵFactoryTarget.Directive });
1507
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FNodeInputDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1705
1508
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: FNodeInputDirective, selector: "[fNodeInput]", inputs: { fId: ["fInputId", "fId"], multiple: ["fInputMultiple", "multiple"], disabled: ["fInputDisabled", "disabled", booleanAttribute], userFConnectableSide: ["fInputConnectableSide", "userFConnectableSide", (value) => castToEnum(value, 'fInputConnectableSide', EFConnectableSide)] }, host: { properties: { "attr.data-f-input-id": "fId", "class.f-node-input-multiple": "multiple", "class.f-node-input-disabled": "disabled" }, classAttribute: "f-component f-node-input" }, providers: [{ provide: F_NODE_INPUT, useExisting: FNodeInputDirective }], exportAs: ["fNodeInput"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
1706
1509
  }
1707
1510
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FNodeInputDirective, decorators: [{
@@ -1717,10 +1520,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
1717
1520
  },
1718
1521
  providers: [{ provide: F_NODE_INPUT, useExisting: FNodeInputDirective }],
1719
1522
  }]
1720
- }], ctorParameters: () => [{ type: FNodeBase, decorators: [{
1721
- type: Inject,
1722
- args: [F_NODE]
1723
- }] }], propDecorators: { fId: [{
1523
+ }], propDecorators: { fId: [{
1724
1524
  type: Input,
1725
1525
  args: ['fInputId']
1726
1526
  }], multiple: [{
@@ -1759,30 +1559,30 @@ function isNodeOutlet(element) {
1759
1559
 
1760
1560
  let uniqueId$8 = 0;
1761
1561
  class FNodeOutletDirective extends FNodeOutletBase {
1762
- fNode;
1562
+ _elementReference = inject(ElementRef);
1563
+ _fMediator = inject(FMediator);
1564
+ /// Inject FNodeBase to check if the outlet inside the node
1565
+ _fNode = inject(F_NODE);
1763
1566
  fId = `f-node-outlet-${uniqueId$8++}`;
1764
1567
  disabled = false;
1765
1568
  fConnectableSide = EFConnectableSide.AUTO;
1766
1569
  userFConnectableSide = EFConnectableSide.AUTO;
1767
1570
  isConnectionFromOutlet = false;
1571
+ canBeConnectedInputs = [];
1572
+ get fNodeId() {
1573
+ return this._fNode.fId;
1574
+ }
1768
1575
  get hostElement() {
1769
1576
  return this._elementReference.nativeElement;
1770
1577
  }
1771
- _elementReference = inject(ElementRef);
1772
- _fMediator = inject(FMediator);
1773
- /// Inject FNodeBase to check if the outlet inside the node
1774
- constructor(fNode) {
1775
- super();
1776
- this.fNode = fNode;
1777
- }
1778
1578
  ngOnInit() {
1779
1579
  this._fMediator.send(new AddOutletToStoreRequest(this));
1780
1580
  }
1781
1581
  ngOnDestroy() {
1782
1582
  this._fMediator.send(new RemoveOutletFromStoreRequest(this));
1783
1583
  }
1784
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FNodeOutletDirective, deps: [{ token: F_NODE }], target: i0.ɵɵFactoryTarget.Directive });
1785
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: FNodeOutletDirective, selector: "[fNodeOutlet]", inputs: { fId: ["fOutletId", "fId"], disabled: ["fOutletDisabled", "disabled", booleanAttribute], isConnectionFromOutlet: "isConnectionFromOutlet" }, host: { properties: { "attr.data-f-outlet-id": "fId", "class.f-node-outlet-disabled": "disabled" }, classAttribute: "f-component f-node-outlet" }, providers: [{ provide: F_NODE_OUTLET, useExisting: FNodeOutletDirective }], exportAs: ["fNodeOutlet"], usesInheritance: true, ngImport: i0 });
1584
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FNodeOutletDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1585
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: FNodeOutletDirective, selector: "[fNodeOutlet]", inputs: { fId: ["fOutletId", "fId"], disabled: ["fOutletDisabled", "disabled", booleanAttribute], isConnectionFromOutlet: "isConnectionFromOutlet", canBeConnectedInputs: ["fCanBeConnectedInputs", "canBeConnectedInputs"] }, host: { properties: { "attr.data-f-outlet-id": "fId", "class.f-node-outlet-disabled": "disabled" }, classAttribute: "f-component f-node-outlet" }, providers: [{ provide: F_NODE_OUTLET, useExisting: FNodeOutletDirective }], exportAs: ["fNodeOutlet"], usesInheritance: true, ngImport: i0 });
1786
1586
  }
1787
1587
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FNodeOutletDirective, decorators: [{
1788
1588
  type: Directive,
@@ -1796,10 +1596,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
1796
1596
  },
1797
1597
  providers: [{ provide: F_NODE_OUTLET, useExisting: FNodeOutletDirective }],
1798
1598
  }]
1799
- }], ctorParameters: () => [{ type: FNodeBase, decorators: [{
1800
- type: Inject,
1801
- args: [F_NODE]
1802
- }] }], propDecorators: { fId: [{
1599
+ }], propDecorators: { fId: [{
1803
1600
  type: Input,
1804
1601
  args: ['fOutletId']
1805
1602
  }], disabled: [{
@@ -1807,6 +1604,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
1807
1604
  args: [{ alias: 'fOutletDisabled', transform: booleanAttribute }]
1808
1605
  }], isConnectionFromOutlet: [{
1809
1606
  type: Input
1607
+ }], canBeConnectedInputs: [{
1608
+ type: Input,
1609
+ args: [{ alias: 'fCanBeConnectedInputs' }]
1810
1610
  }] } });
1811
1611
 
1812
1612
  const F_NODE_OUTPUT = new InjectionToken('F_NODE_OUTPUT');
@@ -1827,41 +1627,46 @@ function isNodeOutput(element) {
1827
1627
 
1828
1628
  let uniqueId$7 = 0;
1829
1629
  class FNodeOutputDirective extends FNodeOutputBase {
1830
- fNode;
1630
+ _elementReference = inject(ElementRef);
1631
+ _fMediator = inject(FMediator);
1632
+ _fNode = inject(F_NODE);
1831
1633
  fId = `f-node-output-${uniqueId$7++}`;
1832
1634
  multiple = false;
1833
1635
  disabled = false;
1834
1636
  userFConnectableSide = EFConnectableSide.AUTO;
1835
1637
  isSelfConnectable = true;
1638
+ canBeConnectedInputs = [];
1639
+ get fNodeId() {
1640
+ return this._fNode.fId;
1641
+ }
1836
1642
  get hostElement() {
1837
1643
  return this._elementReference.nativeElement;
1838
1644
  }
1839
- _elementReference = inject(ElementRef);
1840
- _fMediator = inject(FMediator);
1841
- constructor(fNode) {
1842
- super();
1843
- this.fNode = fNode;
1844
- }
1845
1645
  ngOnInit() {
1846
1646
  this._fMediator.send(new AddOutputToStoreRequest(this));
1847
- this.fNode.addConnector(this);
1647
+ this._fNode.addConnector(this);
1848
1648
  }
1849
1649
  ngOnChanges(changes) {
1850
1650
  if (changes['userFConnectableSide']) {
1851
- this.fNode.refresh();
1651
+ this._fNode.refresh();
1852
1652
  }
1853
1653
  }
1854
- setConnected(isConnected, toConnector) {
1855
- super.setConnected(isConnected, toConnector);
1856
- this.hostElement.classList.toggle('f-node-output-connected', isConnected);
1857
- this.hostElement.classList.toggle('f-node-output-not-connectable', !this.canBeConnected);
1654
+ setConnected(toConnector) {
1655
+ super.setConnected(toConnector);
1656
+ this.hostElement.classList.toggle(F_CSS_CLASS.CONNECTOR.OUTPUT_CONNECTED, true);
1657
+ this.hostElement.classList.toggle(F_CSS_CLASS.CONNECTOR.OUTPUT_NOT_CONNECTABLE, !this.canBeConnected);
1658
+ }
1659
+ resetConnected() {
1660
+ super.resetConnected();
1661
+ this.hostElement.classList.toggle(F_CSS_CLASS.CONNECTOR.OUTPUT_CONNECTED, false);
1662
+ this.hostElement.classList.toggle(F_CSS_CLASS.CONNECTOR.OUTPUT_NOT_CONNECTABLE, !this.canBeConnected);
1858
1663
  }
1859
1664
  ngOnDestroy() {
1860
- this.fNode.removeConnector(this);
1665
+ this._fNode.removeConnector(this);
1861
1666
  this._fMediator.send(new RemoveOutputFromStoreRequest(this));
1862
1667
  }
1863
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FNodeOutputDirective, deps: [{ token: F_NODE }], target: i0.ɵɵFactoryTarget.Directive });
1864
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: FNodeOutputDirective, selector: "[fNodeOutput]", inputs: { fId: ["fOutputId", "fId"], multiple: ["fOutputMultiple", "multiple"], disabled: ["fOutputDisabled", "disabled", booleanAttribute], userFConnectableSide: ["fOutputConnectableSide", "userFConnectableSide", (value) => castToEnum(value, 'fOutputConnectableSide', EFConnectableSide)], isSelfConnectable: "isSelfConnectable" }, host: { properties: { "attr.data-f-output-id": "fId", "class.f-node-output-multiple": "multiple", "class.f-node-output-disabled": "disabled", "class.f-node-output-self-connectable": "isSelfConnectable" }, classAttribute: "f-component f-node-output" }, providers: [{ provide: F_NODE_OUTPUT, useExisting: FNodeOutputDirective }], exportAs: ["fNodeOutput"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
1668
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FNodeOutputDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1669
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: FNodeOutputDirective, selector: "[fNodeOutput]", inputs: { fId: ["fOutputId", "fId"], multiple: ["fOutputMultiple", "multiple"], disabled: ["fOutputDisabled", "disabled", booleanAttribute], userFConnectableSide: ["fOutputConnectableSide", "userFConnectableSide", (value) => castToEnum(value, 'fOutputConnectableSide', EFConnectableSide)], isSelfConnectable: "isSelfConnectable", canBeConnectedInputs: ["fCanBeConnectedInputs", "canBeConnectedInputs"] }, host: { properties: { "attr.data-f-output-id": "fId", "class.f-node-output-multiple": "multiple", "class.f-node-output-disabled": "disabled", "class.f-node-output-self-connectable": "isSelfConnectable" }, classAttribute: "f-component f-node-output" }, providers: [{ provide: F_NODE_OUTPUT, useExisting: FNodeOutputDirective }], exportAs: ["fNodeOutput"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
1865
1670
  }
1866
1671
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FNodeOutputDirective, decorators: [{
1867
1672
  type: Directive,
@@ -1877,10 +1682,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
1877
1682
  },
1878
1683
  providers: [{ provide: F_NODE_OUTPUT, useExisting: FNodeOutputDirective }],
1879
1684
  }]
1880
- }], ctorParameters: () => [{ type: FNodeBase, decorators: [{
1881
- type: Inject,
1882
- args: [F_NODE]
1883
- }] }], propDecorators: { fId: [{
1685
+ }], propDecorators: { fId: [{
1884
1686
  type: Input,
1885
1687
  args: ['fOutputId']
1886
1688
  }], multiple: [{
@@ -1897,6 +1699,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
1897
1699
  }]
1898
1700
  }], isSelfConnectable: [{
1899
1701
  type: Input
1702
+ }], canBeConnectedInputs: [{
1703
+ type: Input,
1704
+ args: [{ alias: 'fCanBeConnectedInputs' }]
1900
1705
  }] } });
1901
1706
 
1902
1707
  const F_CONNECTORS_PROVIDERS = [
@@ -2607,7 +2412,7 @@ class FConnectionForCreateComponent extends FConnectionBase {
2607
2412
  this._fMediator.send(new RemoveConnectionForCreateFromStoreRequest());
2608
2413
  }
2609
2414
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FConnectionForCreateComponent, deps: [{ token: i0.ElementRef }, { token: FConnectionFactory }], target: i0.ɵɵFactoryTarget.Component });
2610
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.4", type: FConnectionForCreateComponent, selector: "f-connection-for-create", inputs: { fStartColor: "fStartColor", fEndColor: "fEndColor", fRadius: "fRadius", fOffset: "fOffset", fBehavior: ["fBehavior", "fBehavior", (value) => castToEnum(value, 'fBehavior', EFConnectionBehavior)], fType: "fType" }, host: { classAttribute: "f-component f-connection f-connection-for-create" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionForCreateComponent }], queries: [{ propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, descendants: true }], viewQueries: [{ propertyName: "fDefs", first: true, predicate: ["defs"], descendants: true, static: true }, { propertyName: "fPath", first: true, predicate: CONNECTION_PATH, descendants: true, static: true }, { propertyName: "fGradient", first: true, predicate: CONNECTION_GRADIENT, descendants: true, static: true }, { propertyName: "fDragHandle", first: true, predicate: FConnectionDragHandleComponent, descendants: true, static: true }, { propertyName: "fSelection", first: true, predicate: FConnectionSelectionComponent, descendants: true, static: true }, { propertyName: "fTextComponent", first: true, predicate: CONNECTION_TEXT, descendants: true, static: true }, { propertyName: "fConnectionCenter", first: true, predicate: ["fConnectionCenter"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center{pointer-events:all}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionDragHandleComponent, selector: "circle[f-connection-drag-handle]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2415
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.4", type: FConnectionForCreateComponent, selector: "f-connection-for-create", inputs: { fStartColor: "fStartColor", fEndColor: "fEndColor", fRadius: ["fRadius", "fRadius", numberAttribute], fOffset: ["fOffset", "fOffset", numberAttribute], fBehavior: ["fBehavior", "fBehavior", (value) => castToEnum(value, 'fBehavior', EFConnectionBehavior)], fType: "fType" }, host: { classAttribute: "f-component f-connection f-connection-for-create" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionForCreateComponent }], queries: [{ propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, descendants: true }], viewQueries: [{ propertyName: "fDefs", first: true, predicate: ["defs"], descendants: true, static: true }, { propertyName: "fPath", first: true, predicate: CONNECTION_PATH, descendants: true, static: true }, { propertyName: "fGradient", first: true, predicate: CONNECTION_GRADIENT, descendants: true, static: true }, { propertyName: "fDragHandle", first: true, predicate: FConnectionDragHandleComponent, descendants: true, static: true }, { propertyName: "fSelection", first: true, predicate: FConnectionSelectionComponent, descendants: true, static: true }, { propertyName: "fTextComponent", first: true, predicate: CONNECTION_TEXT, descendants: true, static: true }, { propertyName: "fConnectionCenter", first: true, predicate: ["fConnectionCenter"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center{pointer-events:all}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionDragHandleComponent, selector: "circle[f-connection-drag-handle]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2611
2416
  }
2612
2417
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FConnectionForCreateComponent, decorators: [{
2613
2418
  type: Component,
@@ -2619,9 +2424,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
2619
2424
  }], fEndColor: [{
2620
2425
  type: Input
2621
2426
  }], fRadius: [{
2622
- type: Input
2427
+ type: Input,
2428
+ args: [{ transform: numberAttribute }]
2623
2429
  }], fOffset: [{
2624
- type: Input
2430
+ type: Input,
2431
+ args: [{ transform: numberAttribute }]
2625
2432
  }], fBehavior: [{
2626
2433
  type: Input,
2627
2434
  args: [{ transform: (value) => castToEnum(value, 'fBehavior', EFConnectionBehavior) }]
@@ -2693,7 +2500,7 @@ class FConnectionComponent extends FConnectionBase {
2693
2500
  this._fMediator.send(new RemoveConnectionFromStoreRequest(this));
2694
2501
  }
2695
2502
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FConnectionComponent, deps: [{ token: i0.ElementRef }, { token: FConnectionFactory }], target: i0.ɵɵFactoryTarget.Component });
2696
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.4", type: FConnectionComponent, selector: "f-connection", inputs: { fId: ["fConnectionId", "fId"], fText: "fText", fTextStartOffset: "fTextStartOffset", fStartColor: "fStartColor", fEndColor: "fEndColor", fOutputId: "fOutputId", fInputId: "fInputId", fRadius: "fRadius", fOffset: "fOffset", fBehavior: ["fBehavior", "fBehavior", (value) => castToEnum(value, 'fBehavior', EFConnectionBehavior)], fType: "fType", fDraggingDisabled: ["fReassignDisabled", "fDraggingDisabled", booleanAttribute], fSelectionDisabled: ["fSelectionDisabled", "fSelectionDisabled", booleanAttribute] }, host: { properties: { "attr.id": "fId", "class.f-connection-selection-disabled": "fSelectionDisabled", "class.f-connection-reassign-disabled": "fDraggingDisabled" }, classAttribute: "f-component f-connection" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionComponent }], queries: [{ propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, descendants: true }], viewQueries: [{ propertyName: "fDefs", first: true, predicate: ["defs"], descendants: true, static: true }, { propertyName: "fPath", first: true, predicate: CONNECTION_PATH, descendants: true, static: true }, { propertyName: "fGradient", first: true, predicate: CONNECTION_GRADIENT, descendants: true, static: true }, { propertyName: "fDragHandle", first: true, predicate: FConnectionDragHandleComponent, descendants: true, static: true }, { propertyName: "fSelection", first: true, predicate: FConnectionSelectionComponent, descendants: true, static: true }, { propertyName: "fTextComponent", first: true, predicate: CONNECTION_TEXT, descendants: true, static: true }, { propertyName: "fConnectionCenter", first: true, predicate: ["fConnectionCenter"], descendants: true }], exportAs: ["fComponent"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"overflow: visible; display: block; vertical-align: middle;\">\n <defs #defs></defs>\n <ng-content></ng-content>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path [attr.d]=\"path\"></path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center{pointer-events:all}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionDragHandleComponent, selector: "circle[f-connection-drag-handle]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2503
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.4", type: FConnectionComponent, selector: "f-connection", inputs: { fId: ["fConnectionId", "fId"], fText: "fText", fTextStartOffset: "fTextStartOffset", fStartColor: "fStartColor", fEndColor: "fEndColor", fOutputId: "fOutputId", fInputId: "fInputId", fRadius: ["fRadius", "fRadius", numberAttribute], fOffset: ["fOffset", "fOffset", numberAttribute], fBehavior: ["fBehavior", "fBehavior", (value) => castToEnum(value, 'fBehavior', EFConnectionBehavior)], fType: "fType", fDraggingDisabled: ["fReassignDisabled", "fDraggingDisabled", booleanAttribute], fSelectionDisabled: ["fSelectionDisabled", "fSelectionDisabled", booleanAttribute] }, host: { properties: { "attr.id": "fId", "class.f-connection-selection-disabled": "fSelectionDisabled", "class.f-connection-reassign-disabled": "fDraggingDisabled" }, classAttribute: "f-component f-connection" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionComponent }], queries: [{ propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, descendants: true }], viewQueries: [{ propertyName: "fDefs", first: true, predicate: ["defs"], descendants: true, static: true }, { propertyName: "fPath", first: true, predicate: CONNECTION_PATH, descendants: true, static: true }, { propertyName: "fGradient", first: true, predicate: CONNECTION_GRADIENT, descendants: true, static: true }, { propertyName: "fDragHandle", first: true, predicate: FConnectionDragHandleComponent, descendants: true, static: true }, { propertyName: "fSelection", first: true, predicate: FConnectionSelectionComponent, descendants: true, static: true }, { propertyName: "fTextComponent", first: true, predicate: CONNECTION_TEXT, descendants: true, static: true }, { propertyName: "fConnectionCenter", first: true, predicate: ["fConnectionCenter"], descendants: true }], exportAs: ["fComponent"], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"overflow: visible; display: block; vertical-align: middle;\">\n <defs #defs></defs>\n <ng-content></ng-content>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path [attr.d]=\"path\"></path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center{pointer-events:all}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionDragHandleComponent, selector: "circle[f-connection-drag-handle]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2697
2504
  }
2698
2505
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FConnectionComponent, decorators: [{
2699
2506
  type: Component,
@@ -2719,9 +2526,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
2719
2526
  }], fInputId: [{
2720
2527
  type: Input
2721
2528
  }], fRadius: [{
2722
- type: Input
2529
+ type: Input,
2530
+ args: [{ transform: numberAttribute }]
2723
2531
  }], fOffset: [{
2724
- type: Input
2532
+ type: Input,
2533
+ args: [{ transform: numberAttribute }]
2725
2534
  }], fBehavior: [{
2726
2535
  type: Input,
2727
2536
  args: [{ transform: (value) => castToEnum(value, 'fBehavior', EFConnectionBehavior) }]
@@ -2874,7 +2683,7 @@ class FSnapConnectionComponent extends FConnectionBase {
2874
2683
  this._fMediator.send(new RemoveSnapConnectionFromStoreRequest());
2875
2684
  }
2876
2685
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FSnapConnectionComponent, deps: [{ token: i0.ElementRef }, { token: FConnectionFactory }], target: i0.ɵɵFactoryTarget.Component });
2877
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.4", type: FSnapConnectionComponent, selector: "f-snap-connection", inputs: { fStartColor: "fStartColor", fEndColor: "fEndColor", fSnapThreshold: "fSnapThreshold", fRadius: "fRadius", fOffset: "fOffset", fBehavior: ["fBehavior", "fBehavior", (value) => castToEnum(value, 'fBehavior', EFConnectionBehavior)], fType: "fType" }, host: { classAttribute: "f-component f-connection f-snap-connection" }, providers: [{ provide: F_CONNECTION, useExisting: FSnapConnectionComponent }], queries: [{ propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, descendants: true }], viewQueries: [{ propertyName: "fDefs", first: true, predicate: ["defs"], descendants: true, static: true }, { propertyName: "fPath", first: true, predicate: CONNECTION_PATH, descendants: true, static: true }, { propertyName: "fGradient", first: true, predicate: CONNECTION_GRADIENT, descendants: true, static: true }, { propertyName: "fDragHandle", first: true, predicate: FConnectionDragHandleComponent, descendants: true, static: true }, { propertyName: "fSelection", first: true, predicate: FConnectionSelectionComponent, descendants: true, static: true }, { propertyName: "fTextComponent", first: true, predicate: CONNECTION_TEXT, descendants: true, static: true }, { propertyName: "fConnectionCenter", first: true, predicate: ["fConnectionCenter"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center{pointer-events:all}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionDragHandleComponent, selector: "circle[f-connection-drag-handle]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2686
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.4", type: FSnapConnectionComponent, selector: "f-snap-connection", inputs: { fStartColor: "fStartColor", fEndColor: "fEndColor", fSnapThreshold: ["fSnapThreshold", "fSnapThreshold", numberAttribute], fRadius: ["fRadius", "fRadius", numberAttribute], fOffset: ["fOffset", "fOffset", numberAttribute], fBehavior: ["fBehavior", "fBehavior", (value) => castToEnum(value, 'fBehavior', EFConnectionBehavior)], fType: "fType" }, host: { classAttribute: "f-component f-connection f-snap-connection" }, providers: [{ provide: F_CONNECTION, useExisting: FSnapConnectionComponent }], queries: [{ propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, descendants: true }], viewQueries: [{ propertyName: "fDefs", first: true, predicate: ["defs"], descendants: true, static: true }, { propertyName: "fPath", first: true, predicate: CONNECTION_PATH, descendants: true, static: true }, { propertyName: "fGradient", first: true, predicate: CONNECTION_GRADIENT, descendants: true, static: true }, { propertyName: "fDragHandle", first: true, predicate: FConnectionDragHandleComponent, descendants: true, static: true }, { propertyName: "fSelection", first: true, predicate: FConnectionSelectionComponent, descendants: true, static: true }, { propertyName: "fTextComponent", first: true, predicate: CONNECTION_TEXT, descendants: true, static: true }, { propertyName: "fConnectionCenter", first: true, predicate: ["fConnectionCenter"], descendants: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}:host .f-connection-center{pointer-events:all}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionDragHandleComponent, selector: "circle[f-connection-drag-handle]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2878
2687
  }
2879
2688
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FSnapConnectionComponent, decorators: [{
2880
2689
  type: Component,
@@ -2886,11 +2695,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
2886
2695
  }], fEndColor: [{
2887
2696
  type: Input
2888
2697
  }], fSnapThreshold: [{
2889
- type: Input
2698
+ type: Input,
2699
+ args: [{ transform: numberAttribute }]
2890
2700
  }], fRadius: [{
2891
- type: Input
2701
+ type: Input,
2702
+ args: [{ transform: numberAttribute }]
2892
2703
  }], fOffset: [{
2893
- type: Input
2704
+ type: Input,
2705
+ args: [{ transform: numberAttribute }]
2894
2706
  }], fBehavior: [{
2895
2707
  type: Input,
2896
2708
  args: [{ transform: (value) => castToEnum(value, 'fBehavior', EFConnectionBehavior) }]
@@ -3002,6 +2814,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
3002
2814
  class RedrawConnectionsRequest {
3003
2815
  }
3004
2816
 
2817
+ class GetNormalizedElementRectRequest {
2818
+ element;
2819
+ isRoundedRect;
2820
+ constructor(element, isRoundedRect = true) {
2821
+ this.element = element;
2822
+ this.isRoundedRect = isRoundedRect;
2823
+ }
2824
+ }
2825
+
2826
+ let GetNormalizedElementRectExecution = class GetNormalizedElementRectExecution {
2827
+ _fComponentsStore = inject(FComponentsStore);
2828
+ _fMediator = inject(FMediator);
2829
+ get _transform() {
2830
+ return this._fComponentsStore.fCanvas.transform;
2831
+ }
2832
+ handle(request) {
2833
+ const systemRect = this._getElementRoundedRect(request);
2834
+ const position = this._normalizePosition(systemRect);
2835
+ const size = this._normalizeSize(systemRect);
2836
+ return new RoundedRect(position.x, position.y, size.width, size.height, systemRect.radius1, systemRect.radius2, systemRect.radius3, systemRect.radius4);
2837
+ }
2838
+ _getElementRoundedRect(request) {
2839
+ return request.isRoundedRect ? this._fMediator.send(new GetElementRoundedRectRequest(request.element)) : RoundedRect.fromRect(RectExtensions.fromElement(request.element));
2840
+ }
2841
+ _normalizePosition(rect) {
2842
+ return Point.fromPoint(rect).elementTransform(this._fComponentsStore.flowHost).sub(this._transform.scaledPosition).sub(this._transform.position).div(this._transform.scale);
2843
+ }
2844
+ _normalizeSize(rect) {
2845
+ return SizeExtensions.initialize(rect.width / this._transform.scale, rect.height / this._transform.scale);
2846
+ }
2847
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNormalizedElementRectExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2848
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNormalizedElementRectExecution });
2849
+ };
2850
+ GetNormalizedElementRectExecution = __decorate([
2851
+ FExecutionRegister(GetNormalizedElementRectRequest)
2852
+ ], GetNormalizedElementRectExecution);
2853
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNormalizedElementRectExecution, decorators: [{
2854
+ type: Injectable
2855
+ }] });
2856
+
3005
2857
  let RedrawConnectionsExecution = class RedrawConnectionsExecution {
3006
2858
  fComponentsStore;
3007
2859
  fMediator;
@@ -3010,7 +2862,7 @@ let RedrawConnectionsExecution = class RedrawConnectionsExecution {
3010
2862
  this.fMediator = fMediator;
3011
2863
  }
3012
2864
  handle(request) {
3013
- this.resetConnectors();
2865
+ this._resetConnectors();
3014
2866
  if (this.fComponentsStore.fTempConnection) {
3015
2867
  this.setMarkers(this.fComponentsStore.fTempConnection);
3016
2868
  }
@@ -3021,17 +2873,17 @@ let RedrawConnectionsExecution = class RedrawConnectionsExecution {
3021
2873
  const output = this.fComponentsStore.fOutputs.find((x) => x.fId === connection.fOutputId);
3022
2874
  const input = this.fComponentsStore.fInputs.find((x) => x.fId === connection.fInputId);
3023
2875
  if (output && input) {
3024
- this.setupConnection(output, input, connection);
2876
+ this._setupConnection(output, input, connection);
3025
2877
  }
3026
2878
  });
3027
2879
  }
3028
- resetConnectors() {
3029
- this.fComponentsStore.fOutputs.forEach((output) => output.setConnected(false, undefined));
3030
- this.fComponentsStore.fInputs.forEach((input) => input.setConnected(false, undefined));
2880
+ _resetConnectors() {
2881
+ this.fComponentsStore.fOutputs.forEach((x) => x.resetConnected());
2882
+ this.fComponentsStore.fInputs.forEach((x) => x.resetConnected());
3031
2883
  }
3032
- setupConnection(output, input, connection) {
3033
- output.setConnected(true, input);
3034
- input.setConnected(true, output);
2884
+ _setupConnection(output, input, connection) {
2885
+ output.setConnected(input);
2886
+ input.setConnected(output);
3035
2887
  const line = this.getLine(output, input, connection);
3036
2888
  this.setMarkers(connection);
3037
2889
  connection.setLine(line.point1, output.fConnectableSide, line.point2, input.fConnectableSide);
@@ -3044,7 +2896,7 @@ let RedrawConnectionsExecution = class RedrawConnectionsExecution {
3044
2896
  setMarkers(connection) {
3045
2897
  this.fMediator.send(new CreateConnectionMarkersRequest(connection));
3046
2898
  }
3047
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RedrawConnectionsExecution, deps: [{ token: FComponentsStore }, { token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
2899
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RedrawConnectionsExecution, deps: [{ token: FComponentsStore }, { token: i2$1.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
3048
2900
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RedrawConnectionsExecution });
3049
2901
  };
3050
2902
  RedrawConnectionsExecution = __decorate([
@@ -3052,7 +2904,7 @@ RedrawConnectionsExecution = __decorate([
3052
2904
  ], RedrawConnectionsExecution);
3053
2905
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RedrawConnectionsExecution, decorators: [{
3054
2906
  type: Injectable
3055
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2.FMediator }] });
2907
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2$1.FMediator }] });
3056
2908
 
3057
2909
  class RemoveConnectionForCreateFromStoreRequest {
3058
2910
  }
@@ -3148,10 +3000,7 @@ const F_CONNECTION_FEATURES = [
3148
3000
  AddConnectionToStoreExecution,
3149
3001
  AddSnapConnectionToStoreExecution,
3150
3002
  CreateConnectionMarkersExecution,
3151
- FindClosestInputExecution,
3152
- GetAllCanBeConnectedInputPositionsExecution,
3153
3003
  CalculateConnectionLineByBehaviorExecution,
3154
- GetConnectorWithRectExecution,
3155
3004
  RedrawConnectionsExecution,
3156
3005
  RemoveConnectionForCreateFromStoreExecution,
3157
3006
  RemoveConnectionFromStoreExecution,
@@ -3225,104 +3074,60 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
3225
3074
  type: Injectable
3226
3075
  }] });
3227
3076
 
3228
- class RemoveInputFromStoreRequest {
3229
- fComponent;
3230
- constructor(fComponent) {
3231
- this.fComponent = fComponent;
3232
- }
3233
- }
3234
-
3235
- let RemoveInputFromStoreExecution = class RemoveInputFromStoreExecution {
3236
- _fComponentsStore = inject(FComponentsStore);
3237
- handle(request) {
3238
- this._fComponentsStore.removeComponent(this._fComponentsStore.fInputs, request.fComponent);
3239
- }
3240
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveInputFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3241
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveInputFromStoreExecution });
3242
- };
3243
- RemoveInputFromStoreExecution = __decorate([
3244
- FExecutionRegister(RemoveInputFromStoreRequest)
3245
- ], RemoveInputFromStoreExecution);
3246
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveInputFromStoreExecution, decorators: [{
3247
- type: Injectable
3248
- }] });
3249
-
3250
- class RemoveOutletFromStoreRequest {
3251
- fComponent;
3252
- constructor(fComponent) {
3253
- this.fComponent = fComponent;
3077
+ class CalculateClosestInputRequest {
3078
+ position;
3079
+ canBeConnectedInputs;
3080
+ constructor(position, canBeConnectedInputs) {
3081
+ this.position = position;
3082
+ this.canBeConnectedInputs = canBeConnectedInputs;
3254
3083
  }
3255
3084
  }
3256
3085
 
3257
- let RemoveOutletFromStoreExecution = class RemoveOutletFromStoreExecution {
3258
- _fComponentsStore = inject(FComponentsStore);
3259
- handle(request) {
3260
- this._fComponentsStore.removeComponent(this._fComponentsStore.fOutlets, request.fComponent);
3086
+ let CalculateClosestInputExecution = class CalculateClosestInputExecution {
3087
+ handle(payload) {
3088
+ let result;
3089
+ let minDistance = Infinity;
3090
+ for (const element of payload.canBeConnectedInputs) {
3091
+ const distance = this._distanceToRectangle(payload.position, element);
3092
+ if (distance < minDistance) {
3093
+ minDistance = distance;
3094
+ result = element;
3095
+ }
3096
+ }
3097
+ return result ? {
3098
+ ...result,
3099
+ distance: minDistance,
3100
+ } : undefined;
3261
3101
  }
3262
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveOutletFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3263
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveOutletFromStoreExecution });
3264
- };
3265
- RemoveOutletFromStoreExecution = __decorate([
3266
- FExecutionRegister(RemoveOutletFromStoreRequest)
3267
- ], RemoveOutletFromStoreExecution);
3268
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveOutletFromStoreExecution, decorators: [{
3269
- type: Injectable
3270
- }] });
3271
-
3272
- class RemoveOutputFromStoreRequest {
3273
- fComponent;
3274
- constructor(fComponent) {
3275
- this.fComponent = fComponent;
3102
+ _distanceToRectangle(point, inputWithRect) {
3103
+ const closestX = this._clamp(point.x, inputWithRect.fRect.x, inputWithRect.fRect.x + inputWithRect.fRect.width);
3104
+ const closestY = this._clamp(point.y, inputWithRect.fRect.y, inputWithRect.fRect.y + inputWithRect.fRect.height);
3105
+ const dx = point.x - closestX;
3106
+ const dy = point.y - closestY;
3107
+ return Math.sqrt(dx * dx + dy * dy);
3276
3108
  }
3277
- }
3278
-
3279
- let RemoveOutputFromStoreExecution = class RemoveOutputFromStoreExecution {
3280
- _fComponentsStore = inject(FComponentsStore);
3281
- handle(request) {
3282
- this._fComponentsStore.removeComponent(this._fComponentsStore.fOutputs, request.fComponent);
3109
+ _clamp(value, min, max) {
3110
+ return Math.max(min, Math.min(max, value));
3283
3111
  }
3284
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveOutputFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3285
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveOutputFromStoreExecution });
3112
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateClosestInputExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3113
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateClosestInputExecution });
3286
3114
  };
3287
- RemoveOutputFromStoreExecution = __decorate([
3288
- FExecutionRegister(RemoveOutputFromStoreRequest)
3289
- ], RemoveOutputFromStoreExecution);
3290
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveOutputFromStoreExecution, decorators: [{
3115
+ CalculateClosestInputExecution = __decorate([
3116
+ FExecutionRegister(CalculateClosestInputRequest)
3117
+ ], CalculateClosestInputExecution);
3118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateClosestInputExecution, decorators: [{
3291
3119
  type: Injectable
3292
3120
  }] });
3293
3121
 
3294
- const F_CONNECTORS_FEATURES = [
3295
- AddInputToStoreExecution,
3296
- AddOutletToStoreExecution,
3297
- AddOutputToStoreExecution,
3298
- RemoveInputFromStoreExecution,
3299
- RemoveOutletFromStoreExecution,
3300
- RemoveOutputFromStoreExecution
3301
- ];
3302
-
3303
- class AddDndToStoreRequest {
3304
- fComponent;
3305
- constructor(fComponent) {
3306
- this.fComponent = fComponent;
3307
- }
3308
- }
3309
-
3310
- let AddDndToStoreExecution = class AddDndToStoreExecution {
3311
- _fComponentsStore = inject(FComponentsStore);
3312
- handle(request) {
3313
- this._fComponentsStore.fDraggable = request.fComponent;
3122
+ class FindInputAtPositionRequest {
3123
+ pointerPosition;
3124
+ toConnectorRect;
3125
+ canBeConnectedInputs;
3126
+ constructor(pointerPosition, toConnectorRect, canBeConnectedInputs) {
3127
+ this.pointerPosition = pointerPosition;
3128
+ this.toConnectorRect = toConnectorRect;
3129
+ this.canBeConnectedInputs = canBeConnectedInputs;
3314
3130
  }
3315
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: AddDndToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3316
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: AddDndToStoreExecution });
3317
- };
3318
- AddDndToStoreExecution = __decorate([
3319
- FExecutionRegister(AddDndToStoreRequest)
3320
- ], AddDndToStoreExecution);
3321
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: AddDndToStoreExecution, decorators: [{
3322
- type: Injectable
3323
- }] });
3324
-
3325
- class EmitSelectionChangeEventRequest {
3326
3131
  }
3327
3132
 
3328
3133
  class CanvasMoveFinalizeRequest {
@@ -3332,24 +3137,6 @@ class CanvasMoveFinalizeRequest {
3332
3137
  }
3333
3138
  }
3334
3139
 
3335
- class CanvasDragHandler {
3336
- fComponentsStore;
3337
- onPointerDownPosition = PointExtensions.initialize();
3338
- constructor(fComponentsStore) {
3339
- this.fComponentsStore = fComponentsStore;
3340
- }
3341
- prepareDragSequence() {
3342
- this.onPointerDownPosition = this.fComponentsStore.fCanvas.transform.position;
3343
- }
3344
- onPointerMove(difference) {
3345
- this.fComponentsStore.fCanvas.setPosition(Point.fromPoint(this.onPointerDownPosition).add(difference));
3346
- this.fComponentsStore.fCanvas.redraw();
3347
- }
3348
- onPointerUp() {
3349
- this.fComponentsStore.fCanvas.emitCanvasChangeEvent();
3350
- }
3351
- }
3352
-
3353
3140
  class FDraggableDataContext {
3354
3141
  selectedItems = [];
3355
3142
  isSelectedChanged = false;
@@ -3374,21 +3161,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
3374
3161
  type: Injectable
3375
3162
  }] });
3376
3163
 
3377
- let CanvasMoveFinalizeExecution = class CanvasMoveFinalizeExecution {
3378
- fDraggableDataContext;
3379
- constructor(fDraggableDataContext) {
3380
- this.fDraggableDataContext = fDraggableDataContext;
3164
+ class CanvasDragHandler {
3165
+ _fComponentsStore;
3166
+ onPointerDownPosition = PointExtensions.initialize();
3167
+ constructor(_fComponentsStore) {
3168
+ this._fComponentsStore = _fComponentsStore;
3169
+ }
3170
+ prepareDragSequence() {
3171
+ this.onPointerDownPosition = this._fComponentsStore.fCanvas.transform.position;
3172
+ }
3173
+ onPointerMove(difference) {
3174
+ this._fComponentsStore.fCanvas.setPosition(Point.fromPoint(this.onPointerDownPosition).add(difference));
3175
+ this._fComponentsStore.fCanvas.redraw();
3381
3176
  }
3177
+ onPointerUp() {
3178
+ this._fComponentsStore.fCanvas.emitCanvasChangeEvent();
3179
+ }
3180
+ }
3181
+
3182
+ let CanvasMoveFinalizeExecution = class CanvasMoveFinalizeExecution {
3183
+ _fDraggableDataContext = inject(FDraggableDataContext);
3382
3184
  handle(request) {
3383
3185
  if (!this._isValid()) {
3384
3186
  return;
3385
3187
  }
3386
- this.fDraggableDataContext.draggableItems.forEach((x) => x.onPointerUp?.());
3188
+ this._fDraggableDataContext.draggableItems.forEach((x) => x.onPointerUp?.());
3387
3189
  }
3388
3190
  _isValid() {
3389
- return this.fDraggableDataContext.draggableItems.some((x) => x instanceof CanvasDragHandler);
3191
+ return this._fDraggableDataContext.draggableItems.some((x) => x instanceof CanvasDragHandler);
3390
3192
  }
3391
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CanvasMoveFinalizeExecution, deps: [{ token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
3193
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CanvasMoveFinalizeExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3392
3194
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CanvasMoveFinalizeExecution });
3393
3195
  };
3394
3196
  CanvasMoveFinalizeExecution = __decorate([
@@ -3396,11 +3198,7 @@ CanvasMoveFinalizeExecution = __decorate([
3396
3198
  ], CanvasMoveFinalizeExecution);
3397
3199
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CanvasMoveFinalizeExecution, decorators: [{
3398
3200
  type: Injectable
3399
- }], ctorParameters: () => [{ type: FDraggableDataContext }] });
3400
-
3401
- const CANVAS_MOVE_FINALIZE_PROVIDERS = [
3402
- CanvasMoveFinalizeExecution,
3403
- ];
3201
+ }] });
3404
3202
 
3405
3203
  class CanvasMovePreparationRequest {
3406
3204
  event;
@@ -3410,79 +3208,53 @@ class CanvasMovePreparationRequest {
3410
3208
  }
3411
3209
 
3412
3210
  let CanvasMovePreparationExecution = class CanvasMovePreparationExecution {
3413
- fComponentsStore;
3414
- fDraggableDataContext;
3415
- get flowHost() {
3416
- return this.fComponentsStore.fFlow.hostElement;
3417
- }
3418
- constructor(fComponentsStore, fDraggableDataContext) {
3419
- this.fComponentsStore = fComponentsStore;
3420
- this.fDraggableDataContext = fDraggableDataContext;
3211
+ _fComponentsStore = inject(FComponentsStore);
3212
+ _fDraggableDataContext = inject(FDraggableDataContext);
3213
+ get _fHost() {
3214
+ return this._fComponentsStore.fFlow.hostElement;
3421
3215
  }
3422
3216
  handle(request) {
3423
- this.fDraggableDataContext.onPointerDownScale = 1;
3424
- this.fDraggableDataContext.onPointerDownPosition = Point.fromPoint(request.event.getPosition())
3425
- .elementTransform(this.flowHost);
3426
- this.fDraggableDataContext.draggableItems = [
3427
- new CanvasDragHandler(this.fComponentsStore)
3217
+ if (!this._isValid(request)) {
3218
+ return;
3219
+ }
3220
+ this._fDraggableDataContext.onPointerDownScale = 1;
3221
+ this._fDraggableDataContext.onPointerDownPosition = Point.fromPoint(request.event.getPosition())
3222
+ .elementTransform(this._fHost);
3223
+ this._fDraggableDataContext.draggableItems = [
3224
+ new CanvasDragHandler(this._fComponentsStore)
3428
3225
  ];
3429
3226
  }
3430
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CanvasMovePreparationExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
3431
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CanvasMovePreparationExecution });
3432
- };
3433
- CanvasMovePreparationExecution = __decorate([
3434
- FExecutionRegister(CanvasMovePreparationRequest)
3435
- ], CanvasMovePreparationExecution);
3436
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CanvasMovePreparationExecution, decorators: [{
3437
- type: Injectable
3438
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }] });
3439
-
3440
- let CanvasMovePreparationValidator = class CanvasMovePreparationValidator {
3441
- fComponentsStore;
3442
- fDraggableDataContext;
3443
- get flowHost() {
3444
- return this.fComponentsStore.fFlow.hostElement;
3445
- }
3446
- constructor(fComponentsStore, fDraggableDataContext) {
3447
- this.fComponentsStore = fComponentsStore;
3448
- this.fDraggableDataContext = fDraggableDataContext;
3449
- }
3450
- handle(request) {
3451
- return !this.fDraggableDataContext.draggableItems.length &&
3452
- (this.isBackgroundElement(request.event.targetElement) || this.isDragOnHost(request.event.targetElement));
3227
+ _isValid(request) {
3228
+ return this._fDraggableDataContext.isEmpty() &&
3229
+ (this._isBackgroundElement(request.event.targetElement) || this._isDragOnHost(request.event.targetElement));
3453
3230
  }
3454
- isBackgroundElement(targetElement) {
3455
- return this.fComponentsStore.fBackground?.hostElement.contains(targetElement);
3231
+ _isBackgroundElement(targetElement) {
3232
+ return this._fComponentsStore.fBackground?.hostElement.contains(targetElement);
3456
3233
  }
3457
- isDragOnHost(targetElement) {
3458
- return this.flowHost.contains(targetElement) && !this.getNode(targetElement);
3234
+ _isDragOnHost(targetElement) {
3235
+ return this._fHost.contains(targetElement) && !this._getNode(targetElement);
3459
3236
  }
3460
- getNode(targetElement) {
3461
- let result = this.fComponentsStore.fNodes
3462
- .find(n => n.isContains(targetElement));
3237
+ _getNode(targetElement) {
3238
+ let result = this._fComponentsStore.fNodes
3239
+ .find(x => x.isContains(targetElement));
3463
3240
  if (result && result.fDraggingDisabled) {
3464
3241
  result = undefined;
3465
3242
  }
3466
3243
  return result;
3467
3244
  }
3468
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CanvasMovePreparationValidator, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
3469
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CanvasMovePreparationValidator });
3245
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CanvasMovePreparationExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3246
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CanvasMovePreparationExecution });
3470
3247
  };
3471
- CanvasMovePreparationValidator = __decorate([
3472
- FValidatorRegister(CanvasMovePreparationRequest)
3473
- ], CanvasMovePreparationValidator);
3474
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CanvasMovePreparationValidator, decorators: [{
3248
+ CanvasMovePreparationExecution = __decorate([
3249
+ FExecutionRegister(CanvasMovePreparationRequest)
3250
+ ], CanvasMovePreparationExecution);
3251
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CanvasMovePreparationExecution, decorators: [{
3475
3252
  type: Injectable
3476
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }] });
3477
-
3478
- const CANVAS_MOVE_PREPARATION_PROVIDERS = [
3479
- CanvasMovePreparationExecution,
3480
- CanvasMovePreparationValidator,
3481
- ];
3253
+ }] });
3482
3254
 
3483
3255
  const CANVAS_PROVIDERS = [
3484
- ...CANVAS_MOVE_FINALIZE_PROVIDERS,
3485
- ...CANVAS_MOVE_PREPARATION_PROVIDERS,
3256
+ CanvasMoveFinalizeExecution,
3257
+ CanvasMovePreparationExecution,
3486
3258
  ];
3487
3259
 
3488
3260
  class CreateConnectionFinalizeRequest {
@@ -3600,207 +3372,96 @@ class FCreateConnectionEvent {
3600
3372
  }
3601
3373
 
3602
3374
  class CreateConnectionDragHandler {
3603
- fMediator;
3604
- fComponentsStore;
3605
- fOutput;
3606
- onPointerDownPosition;
3607
- toConnectorRect = new RoundedRect();
3608
- get fConnection() {
3609
- return this.fComponentsStore.fTempConnection;
3610
- }
3611
- get fSnapConnection() {
3612
- return this.fComponentsStore.fSnapConnection;
3613
- }
3614
- fOutputWithRect;
3615
- canBeConnectedInputs = [];
3616
- constructor(fMediator, fComponentsStore, fOutput, onPointerDownPosition) {
3617
- this.fMediator = fMediator;
3618
- this.fComponentsStore = fComponentsStore;
3619
- this.fOutput = fOutput;
3620
- this.onPointerDownPosition = onPointerDownPosition;
3375
+ _fMediator;
3376
+ _fComponentsStore;
3377
+ _fOutput;
3378
+ _toConnectorRect = new RoundedRect();
3379
+ get _fConnection() {
3380
+ return this._fComponentsStore.fTempConnection;
3381
+ }
3382
+ get _fSnapConnection() {
3383
+ return this._fComponentsStore.fSnapConnection;
3384
+ }
3385
+ _fOutputWithRect;
3386
+ _canBeConnectedInputs = [];
3387
+ constructor(_fMediator, _fComponentsStore, _fOutput, _onPointerDownPosition) {
3388
+ this._fMediator = _fMediator;
3389
+ this._fComponentsStore = _fComponentsStore;
3390
+ this._fOutput = _fOutput;
3391
+ this._toConnectorRect = RoundedRect.fromRect(RectExtensions.initialize(_onPointerDownPosition.x, _onPointerDownPosition.y));
3621
3392
  }
3622
3393
  prepareDragSequence() {
3394
+ this._getAndMarkCanBeConnectedInputs();
3623
3395
  this._initializeSnapConnection();
3624
3396
  this._initializeConnectionForCreate();
3625
- this.canBeConnectedInputs = this.fMediator.send(new GetAllCanBeConnectedInputPositionsRequest(this.fOutput.fId));
3626
- this.fOutputWithRect = this.fMediator.send(new GetConnectorWithRectRequest(this.fOutput));
3627
- this.toConnectorRect = RoundedRect.fromRect(RectExtensions.initialize(this.onPointerDownPosition.x, this.onPointerDownPosition.y));
3628
- this.fConnection.show();
3397
+ this._fOutputWithRect = this._fMediator.execute(new GetConnectorAndRectRequest(this._fOutput));
3398
+ this._fConnection.show();
3629
3399
  this.onPointerMove(PointExtensions.initialize());
3630
3400
  }
3401
+ _getAndMarkCanBeConnectedInputs() {
3402
+ this._canBeConnectedInputs = this._fMediator.execute(new GetAllCanBeConnectedInputsAndRectsRequest(this._fOutput));
3403
+ this._fMediator.execute(new MarkAllCanBeConnectedInputsRequest(this._canBeConnectedInputs.map((x) => x.fConnector)));
3404
+ }
3631
3405
  _initializeSnapConnection() {
3632
- if (!this.fSnapConnection) {
3406
+ if (!this._fSnapConnection) {
3633
3407
  return;
3634
3408
  }
3635
- this.fSnapConnection.fOutputId = this.fOutput.fId;
3636
- this.fSnapConnection.initialize();
3409
+ this._fSnapConnection.fOutputId = this._fOutput.fId;
3410
+ this._fSnapConnection.initialize();
3637
3411
  }
3638
3412
  _initializeConnectionForCreate() {
3639
- this.fConnection.fOutputId = this.fOutput.fId;
3640
- this.fConnection.initialize();
3413
+ this._fConnection.fOutputId = this._fOutput.fId;
3414
+ this._fConnection.initialize();
3641
3415
  }
3642
3416
  onPointerMove(difference) {
3643
3417
  const fClosestInput = this._findClosestInput(difference);
3644
- this._drawConnectionForCreate(this.toConnectorRect.addPoint(difference), fClosestInput?.fConnector.fConnectableSide || EFConnectableSide.TOP);
3645
- if (this.fSnapConnection) {
3418
+ this._drawConnectionForCreate(this._toConnectorRect.addPoint(difference), fClosestInput?.fConnector.fConnectableSide || EFConnectableSide.TOP);
3419
+ if (this._fSnapConnection) {
3646
3420
  this._drawSnapConnection(this._getClosestInputForSnapConnection(fClosestInput));
3647
3421
  }
3648
3422
  }
3649
- _drawConnectionForCreate(fInputRect, fSide) {
3650
- const line = this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this.fOutputWithRect.fRect, fInputRect, this.fConnection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, fSide));
3651
- this.fConnection.setLine(line.point1, this.fOutputWithRect.fConnector.fConnectableSide, line.point2, fSide);
3652
- this.fConnection.redraw();
3423
+ _drawConnectionForCreate(toConnectorRect, fSide) {
3424
+ const line = this._fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this._fOutputWithRect.fRect, toConnectorRect, this._fConnection.fBehavior, this._fOutputWithRect.fConnector.fConnectableSide, fSide));
3425
+ this._fConnection.setLine(line.point1, this._fOutputWithRect.fConnector.fConnectableSide, line.point2, fSide);
3426
+ this._fConnection.redraw();
3653
3427
  }
3654
3428
  _drawSnapConnection(fClosestInput) {
3655
3429
  if (fClosestInput) {
3656
- const line = this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this.fOutputWithRect.fRect, fClosestInput.fRect, this.fSnapConnection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, fClosestInput.fConnector.fConnectableSide));
3657
- this.fSnapConnection.show();
3658
- this.fSnapConnection.setLine(line.point1, this.fOutputWithRect.fConnector.fConnectableSide, line.point2, fClosestInput.fConnector.fConnectableSide);
3659
- this.fSnapConnection.redraw();
3430
+ const line = this._fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this._fOutputWithRect.fRect, fClosestInput.fRect, this._fSnapConnection.fBehavior, this._fOutputWithRect.fConnector.fConnectableSide, fClosestInput.fConnector.fConnectableSide));
3431
+ this._fSnapConnection.show();
3432
+ this._fSnapConnection.setLine(line.point1, this._fOutputWithRect.fConnector.fConnectableSide, line.point2, fClosestInput.fConnector.fConnectableSide);
3433
+ this._fSnapConnection.redraw();
3660
3434
  }
3661
3435
  else {
3662
- this.fSnapConnection?.hide();
3436
+ this._fSnapConnection?.hide();
3663
3437
  }
3664
3438
  }
3665
- getClosetInput(difference) {
3666
- if (!this.fSnapConnection) {
3667
- return undefined;
3668
- }
3669
- return this._getClosestInputForSnapConnection(this._findClosestInput(difference));
3670
- }
3671
3439
  _findClosestInput(difference) {
3672
- return this.fMediator.send(new FindClosestInputRequest(Point.fromPoint(this.toConnectorRect).add(difference), this.canBeConnectedInputs));
3440
+ return this._fMediator.execute(new CalculateClosestInputRequest(this._toConnectorRect.addPoint(difference), this._canBeConnectedInputs));
3673
3441
  }
3674
3442
  _getClosestInputForSnapConnection(fClosestInput) {
3675
- return fClosestInput && fClosestInput.distance < this.fSnapConnection.fSnapThreshold ? fClosestInput : undefined;
3443
+ return fClosestInput && fClosestInput.distance < this._fSnapConnection.fSnapThreshold ? fClosestInput : undefined;
3676
3444
  }
3677
3445
  onPointerUp() {
3678
- this.fConnection.redraw();
3679
- this.fConnection.hide();
3680
- this.fSnapConnection?.hide();
3446
+ this._fConnection.redraw();
3447
+ this._fConnection.hide();
3448
+ this._fSnapConnection?.hide();
3449
+ this._fMediator.execute(new UnmarkAllCanBeConnectedInputsRequest(this._canBeConnectedInputs.map((x) => x.fConnector)));
3681
3450
  }
3682
- }
3683
-
3684
- class GetInputUnderPointerRequest {
3685
- event;
3686
- dragHandler;
3687
- constructor(event, dragHandler) {
3688
- this.event = event;
3689
- this.dragHandler = dragHandler;
3451
+ getData() {
3452
+ return {
3453
+ toConnectorRect: this._toConnectorRect,
3454
+ fOutputId: this._fOutput.fId,
3455
+ canBeConnectedInputs: this._canBeConnectedInputs
3456
+ };
3690
3457
  }
3691
3458
  }
3692
3459
 
3693
- let GetInputUnderPointerExecution = class GetInputUnderPointerExecution {
3694
- fComponentsStore;
3695
- fDraggableDataContext;
3696
- fBrowser;
3697
- get fNodes() {
3698
- return this.fComponentsStore.fNodes;
3699
- }
3700
- get fInputs() {
3701
- return this.fComponentsStore.fInputs;
3702
- }
3703
- constructor(fComponentsStore, fDraggableDataContext, fBrowser) {
3704
- this.fComponentsStore = fComponentsStore;
3705
- this.fDraggableDataContext = fDraggableDataContext;
3706
- this.fBrowser = fBrowser;
3707
- }
3708
- handle(payload) {
3709
- const output = (this.getOutput(payload.dragHandler) || this.getOutlet(payload.dragHandler));
3710
- const inputsUnderPointer = this.getInputsUnderPointer(payload.event.getPosition(), payload.dragHandler);
3711
- const connectors = output.isSelfConnectable ?
3712
- inputsUnderPointer :
3713
- this.filterSelfConnectable(inputsUnderPointer, output);
3714
- return connectors.length > 0 ? connectors[0] : undefined;
3715
- }
3716
- getOutput(dragHandler) {
3717
- return this.fComponentsStore.fOutputs.find((x) => x.fId === dragHandler.fConnection.fOutputId);
3718
- }
3719
- getOutlet(dragHandler) {
3720
- return this.fComponentsStore.fOutlets.find((x) => x.fId === dragHandler.fConnection.fOutputId);
3721
- }
3722
- getInputsUnderPointer(position, dragHandler) {
3723
- const result = this.getInputsInPosition(position);
3724
- const closestInput = dragHandler.getClosetInput(this.getDifference(position));
3725
- if (closestInput) {
3726
- result.push(closestInput.fConnector);
3727
- }
3728
- const input = this.getFirstConnectableInputOfNodeInPosition(position);
3729
- if (input) {
3730
- result.push(input);
3731
- }
3732
- return result;
3733
- }
3734
- getDifference(position) {
3735
- return Point.fromPoint(position).elementTransform(this.fComponentsStore.flowHost)
3736
- .div(this.fDraggableDataContext.onPointerDownScale).sub(this.fDraggableDataContext.onPointerDownPosition);
3737
- }
3738
- getInputsInPosition(position) {
3739
- return this.getElementsFromPoint(position).map((element) => this.fInputs.find(x => x.isContains(element) && x.canBeConnected)).filter((x) => !!x);
3740
- }
3741
- getElementsFromPoint(position) {
3742
- return this.fBrowser.document.elementsFromPoint(position.x, position.y);
3743
- }
3744
- getFirstConnectableInputOfNodeInPosition(position) {
3745
- return this.getNodesInPosition(position).map((x) => {
3746
- return this.fInputs.find((i) => x.isContains(i.hostElement) && i.canBeConnected);
3747
- }).find((x) => !!x);
3748
- }
3749
- getNodesInPosition(position) {
3750
- return this.getElementsFromPoint(position).map((element) => {
3751
- return this.fNodes.find((x) => x.isContains(element) && x.fConnectOnNode);
3752
- }).filter((x) => !!x);
3753
- }
3754
- filterSelfConnectable(inputs, connector) {
3755
- return inputs.filter((x) => {
3756
- const targetNode = this.fNodes.find((k) => k.isContains(x.hostElement));
3757
- const sourceNode = this.fNodes.find((k) => k.isContains(connector.hostElement));
3758
- return sourceNode?.hostElement !== targetNode?.hostElement;
3759
- });
3760
- }
3761
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetInputUnderPointerExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: i1.BrowserService }], target: i0.ɵɵFactoryTarget.Injectable });
3762
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetInputUnderPointerExecution });
3763
- };
3764
- GetInputUnderPointerExecution = __decorate([
3765
- FExecutionRegister(GetInputUnderPointerRequest)
3766
- ], GetInputUnderPointerExecution);
3767
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetInputUnderPointerExecution, decorators: [{
3768
- type: Injectable
3769
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: i1.BrowserService }] });
3770
-
3771
- let GetInputUnderPointerValidator = class GetInputUnderPointerValidator {
3772
- fComponentsStore;
3773
- constructor(fComponentsStore) {
3774
- this.fComponentsStore = fComponentsStore;
3775
- }
3776
- handle(request) {
3777
- let output = this.getOutput(request.dragHandler) || this.getOutlet(request.dragHandler);
3778
- if (!output) {
3779
- throw OutputNotFound(request.dragHandler.fConnection.fOutputId);
3780
- }
3781
- return true;
3782
- }
3783
- getOutput(dragHandler) {
3784
- return this.fComponentsStore.fOutputs.find((x) => x.fId === dragHandler.fConnection.fOutputId);
3785
- }
3786
- getOutlet(dragHandler) {
3787
- return this.fComponentsStore.fOutlets.find((x) => x.fId === dragHandler.fConnection.fOutputId);
3788
- }
3789
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetInputUnderPointerValidator, deps: [{ token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Injectable });
3790
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetInputUnderPointerValidator });
3791
- };
3792
- GetInputUnderPointerValidator = __decorate([
3793
- FValidatorRegister(GetInputUnderPointerRequest)
3794
- ], GetInputUnderPointerValidator);
3795
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetInputUnderPointerValidator, decorators: [{
3796
- type: Injectable
3797
- }], ctorParameters: () => [{ type: FComponentsStore }] });
3798
-
3799
3460
  let CreateConnectionFinalizeExecution = class CreateConnectionFinalizeExecution {
3800
3461
  fComponentsStore;
3801
3462
  fDraggableDataContext;
3802
3463
  fMediator;
3803
- get dragHandler() {
3464
+ get _fDragHandler() {
3804
3465
  return this.fDraggableDataContext.draggableItems[0];
3805
3466
  }
3806
3467
  constructor(fComponentsStore, fDraggableDataContext, fMediator) {
@@ -3813,30 +3474,33 @@ let CreateConnectionFinalizeExecution = class CreateConnectionFinalizeExecution
3813
3474
  return;
3814
3475
  }
3815
3476
  this.emitEvent(request.event);
3816
- this.dragHandler.onPointerUp();
3477
+ this._fDragHandler.onPointerUp();
3817
3478
  }
3818
3479
  _isValid() {
3819
3480
  return this.fDraggableDataContext.draggableItems.some((x) => x instanceof CreateConnectionDragHandler);
3820
3481
  }
3821
3482
  getTargetOutput(output) {
3822
3483
  if (!output) {
3823
- throw OutputNotFound(this.dragHandler.fConnection.fOutputId);
3484
+ throw OutputNotFound(this._getDragHandlerData().fOutputId);
3824
3485
  }
3825
3486
  return isNodeOutlet(output.hostElement) ? this.fMediator.send(new GetCanBeConnectedOutputByOutletRequest(output)) : output;
3826
3487
  }
3827
3488
  getOutput() {
3828
- return this.fComponentsStore.fOutputs.find((x) => x.fId === this.dragHandler.fConnection.fOutputId);
3489
+ return this.fComponentsStore.fOutputs.find((x) => x.fId === this._getDragHandlerData().fOutputId);
3829
3490
  }
3830
3491
  getOutlet() {
3831
- return this.fComponentsStore.fOutlets.find((x) => x.fId === this.dragHandler.fConnection.fOutputId);
3492
+ return this.fComponentsStore.fOutlets.find((x) => x.fId === this._getDragHandlerData().fOutputId);
3832
3493
  }
3833
3494
  emitEvent(event) {
3834
- this.fComponentsStore.fDraggable?.fCreateConnection.emit(new FCreateConnectionEvent(this.getTargetOutput(this.getOutput() || this.getOutlet()).fId, this.getInputUnderPointer(event)?.fId, event.getPosition()));
3495
+ this.fComponentsStore.fDraggable?.fCreateConnection.emit(new FCreateConnectionEvent(this.getTargetOutput(this.getOutput() || this.getOutlet()).fId, this._getInputUnderPointer(event)?.fId, event.getPosition()));
3496
+ }
3497
+ _getInputUnderPointer(event) {
3498
+ return this.fMediator.send(new FindInputAtPositionRequest(event.getPosition(), this._getDragHandlerData().toConnectorRect, this._getDragHandlerData().canBeConnectedInputs));
3835
3499
  }
3836
- getInputUnderPointer(event) {
3837
- return this.fMediator.send(new GetInputUnderPointerRequest(event, this.dragHandler));
3500
+ _getDragHandlerData() {
3501
+ return this._fDragHandler.getData();
3838
3502
  }
3839
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFinalizeExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
3503
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFinalizeExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: i2$1.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
3840
3504
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFinalizeExecution });
3841
3505
  };
3842
3506
  CreateConnectionFinalizeExecution = __decorate([
@@ -3844,14 +3508,14 @@ CreateConnectionFinalizeExecution = __decorate([
3844
3508
  ], CreateConnectionFinalizeExecution);
3845
3509
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFinalizeExecution, decorators: [{
3846
3510
  type: Injectable
3847
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2.FMediator }] });
3511
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2$1.FMediator }] });
3848
3512
 
3849
3513
  class CreateConnectionDragHandlerRequest {
3850
3514
  onPointerDownPosition;
3851
- connector;
3852
- constructor(onPointerDownPosition, connector) {
3515
+ fOutput;
3516
+ constructor(onPointerDownPosition, fOutput) {
3853
3517
  this.onPointerDownPosition = onPointerDownPosition;
3854
- this.connector = connector;
3518
+ this.fOutput = fOutput;
3855
3519
  }
3856
3520
  }
3857
3521
 
@@ -3878,10 +3542,10 @@ let CreateConnectionDragHandlerExecution = class CreateConnectionDragHandlerExec
3878
3542
  const positionRelativeToCanvasComponent = Point.fromPoint(positionRelativeToFlowComponent).mult(this.transform.scale)
3879
3543
  .sub(this.transform.position).sub(this.transform.scaledPosition).div(this.transform.scale);
3880
3544
  this.fDraggableDataContext.draggableItems = [
3881
- new CreateConnectionDragHandler(this.fMediator, this.fComponentsStore, request.connector, positionRelativeToCanvasComponent)
3545
+ new CreateConnectionDragHandler(this.fMediator, this.fComponentsStore, request.fOutput, positionRelativeToCanvasComponent)
3882
3546
  ];
3883
3547
  }
3884
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionDragHandlerExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
3548
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionDragHandlerExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: i2$1.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
3885
3549
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionDragHandlerExecution });
3886
3550
  };
3887
3551
  CreateConnectionDragHandlerExecution = __decorate([
@@ -3889,7 +3553,7 @@ CreateConnectionDragHandlerExecution = __decorate([
3889
3553
  ], CreateConnectionDragHandlerExecution);
3890
3554
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionDragHandlerExecution, decorators: [{
3891
3555
  type: Injectable
3892
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2.FMediator }] });
3556
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2$1.FMediator }] });
3893
3557
 
3894
3558
  class CreateConnectionFromOutletPreparationRequest {
3895
3559
  event;
@@ -3930,10 +3594,10 @@ let CreateConnectionFromOutletPreparationExecution = class CreateConnectionFromO
3930
3594
  }
3931
3595
  }
3932
3596
  }
3933
- createDragHandler(position, output) {
3934
- this.fMediator.send(new CreateConnectionDragHandlerRequest(position, output));
3597
+ createDragHandler(position, fOutput) {
3598
+ this.fMediator.send(new CreateConnectionDragHandlerRequest(position, fOutput));
3935
3599
  }
3936
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutletPreparationExecution, deps: [{ token: FComponentsStore }, { token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
3600
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutletPreparationExecution, deps: [{ token: FComponentsStore }, { token: i2$1.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
3937
3601
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutletPreparationExecution });
3938
3602
  };
3939
3603
  CreateConnectionFromOutletPreparationExecution = __decorate([
@@ -3941,7 +3605,7 @@ CreateConnectionFromOutletPreparationExecution = __decorate([
3941
3605
  ], CreateConnectionFromOutletPreparationExecution);
3942
3606
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutletPreparationExecution, decorators: [{
3943
3607
  type: Injectable
3944
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2.FMediator }] });
3608
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2$1.FMediator }] });
3945
3609
 
3946
3610
  class CreateConnectionFromOutputPreparationRequest {
3947
3611
  event;
@@ -3959,20 +3623,20 @@ let CreateConnectionFromOutputPreparationExecution = class CreateConnectionFromO
3959
3623
  }
3960
3624
  handle(request) {
3961
3625
  const { event } = request;
3962
- const output = this.fComponentsStore.fOutputs.find((x) => {
3626
+ const fOutput = this.fComponentsStore.fOutputs.find((x) => {
3963
3627
  return x.hostElement.contains(event.targetElement);
3964
3628
  });
3965
- if (!output) {
3629
+ if (!fOutput) {
3966
3630
  throw new Error('Output not found');
3967
3631
  }
3968
- if (output.canBeConnected) {
3969
- this.createDragHandler(event.getPosition(), output);
3632
+ if (fOutput.canBeConnected) {
3633
+ this.createDragHandler(event.getPosition(), fOutput);
3970
3634
  }
3971
3635
  }
3972
- createDragHandler(position, output) {
3973
- this.fMediator.send(new CreateConnectionDragHandlerRequest(position, output));
3636
+ createDragHandler(position, fOutput) {
3637
+ this.fMediator.send(new CreateConnectionDragHandlerRequest(position, fOutput));
3974
3638
  }
3975
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutputPreparationExecution, deps: [{ token: FComponentsStore }, { token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
3639
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutputPreparationExecution, deps: [{ token: FComponentsStore }, { token: i2$1.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
3976
3640
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutputPreparationExecution });
3977
3641
  };
3978
3642
  CreateConnectionFromOutputPreparationExecution = __decorate([
@@ -3980,7 +3644,7 @@ CreateConnectionFromOutputPreparationExecution = __decorate([
3980
3644
  ], CreateConnectionFromOutputPreparationExecution);
3981
3645
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutputPreparationExecution, decorators: [{
3982
3646
  type: Injectable
3983
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2.FMediator }] });
3647
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2$1.FMediator }] });
3984
3648
 
3985
3649
  let CreateConnectionFromOutputPreparationValidator = class CreateConnectionFromOutputPreparationValidator {
3986
3650
  fComponentsStore;
@@ -4028,7 +3692,7 @@ let CreateConnectionPreparationExecution = class CreateConnectionPreparationExec
4028
3692
  if (isNodeOutlet(request.event.targetElement)) {
4029
3693
  this._fMediator.send(new CreateConnectionFromOutletPreparationRequest(request.event));
4030
3694
  }
4031
- else if (this.isNodeOutput(request.event.targetElement, this._getNode(request.event))) {
3695
+ else if (this._isNodeOutput(request.event.targetElement, this._getNode(request.event))) {
4032
3696
  this._fMediator.send(new CreateConnectionFromOutputPreparationRequest(request.event));
4033
3697
  }
4034
3698
  }
@@ -4042,10 +3706,10 @@ let CreateConnectionPreparationExecution = class CreateConnectionPreparationExec
4042
3706
  _isValidConditions() {
4043
3707
  return !this._fDraggableDataContext.draggableItems.length && !!this._fComponentsStore.fTempConnection;
4044
3708
  }
4045
- isNodeOutput(targetElement, node) {
4046
- return isNodeOutput(targetElement) && !this.getOutlets(node).length;
3709
+ _isNodeOutput(targetElement, node) {
3710
+ return isNodeOutput(targetElement) && !this._getOutlets(node).length;
4047
3711
  }
4048
- getOutlets(node) {
3712
+ _getOutlets(node) {
4049
3713
  return this._fComponentsStore.fOutlets.filter((x) => node.isContains(x.hostElement));
4050
3714
  }
4051
3715
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionPreparationExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -4066,85 +3730,102 @@ class ReassignConnectionFinalizeRequest {
4066
3730
  }
4067
3731
 
4068
3732
  class ReassignConnectionDragHandler {
4069
- fMediator;
4070
- fComponentsStore;
4071
- fConnection;
4072
- toConnectorRect = new RoundedRect();
4073
- get fSnapConnection() {
4074
- return this.fComponentsStore.fSnapConnection;
3733
+ _fMediator;
3734
+ _fComponentsStore;
3735
+ _fConnection;
3736
+ _toConnectorRect = new RoundedRect();
3737
+ get _fSnapConnection() {
3738
+ return this._fComponentsStore.fSnapConnection;
3739
+ }
3740
+ _fOutputWithRect;
3741
+ _fInputWithRect;
3742
+ _canBeConnectedInputs = [];
3743
+ get _fOutput() {
3744
+ const result = this._fComponentsStore.fOutputs.find((x) => x.fId === this._fConnection.fOutputId);
3745
+ if (!result) {
3746
+ throw new Error('Connection output not found');
3747
+ }
3748
+ return result;
4075
3749
  }
4076
- fOutputWithRect;
4077
- fInputWithRect;
4078
- canBeConnectedInputs = [];
4079
- constructor(fMediator, fComponentsStore, fConnection) {
4080
- this.fMediator = fMediator;
4081
- this.fComponentsStore = fComponentsStore;
4082
- this.fConnection = fConnection;
3750
+ get _fInput() {
3751
+ const result = this._fComponentsStore.fInputs.find((x) => x.fId === this._fConnection.fInputId);
3752
+ if (!result) {
3753
+ throw new Error('Connection input not found');
3754
+ }
3755
+ return result;
3756
+ }
3757
+ constructor(_fMediator, _fComponentsStore, _fConnection) {
3758
+ this._fMediator = _fMediator;
3759
+ this._fComponentsStore = _fComponentsStore;
3760
+ this._fConnection = _fConnection;
3761
+ this._toConnectorRect = RoundedRect.fromRect(RectExtensions.initialize(this._fConnection.line.point2.x, this._fConnection.line.point2.y));
4083
3762
  }
4084
3763
  prepareDragSequence() {
3764
+ this._getAndMarkCanBeConnectedInputs();
4085
3765
  this._initializeSnapConnection();
4086
- this.canBeConnectedInputs = this.fMediator.send(new GetAllCanBeConnectedInputPositionsRequest(this.fConnection.fOutputId));
4087
- this.fOutputWithRect = this.fMediator.send(new GetConnectorWithRectRequest(this.getOutput()));
4088
- this.fInputWithRect = this.fMediator.send(new GetConnectorWithRectRequest(this.getInput()));
4089
- this.toConnectorRect = RoundedRect.fromRect(RectExtensions.initialize(this.fConnection.line.point2.x, this.fConnection.line.point2.y));
3766
+ this._fOutputWithRect = this._fMediator.execute(new GetConnectorAndRectRequest(this._fOutput));
3767
+ this._fInputWithRect = this._fMediator.execute(new GetConnectorAndRectRequest(this._fInput));
3768
+ }
3769
+ _getAndMarkCanBeConnectedInputs() {
3770
+ this._canBeConnectedInputs = this._fMediator.execute(new GetAllCanBeConnectedInputsAndRectsRequest(this._fOutput));
3771
+ this._fMediator.execute(new MarkAllCanBeConnectedInputsRequest(this._canBeConnectedInputs.map((x) => x.fConnector)));
4090
3772
  }
4091
3773
  _initializeSnapConnection() {
4092
- if (!this.fSnapConnection) {
3774
+ if (!this._fSnapConnection) {
4093
3775
  return;
4094
3776
  }
4095
- this.fSnapConnection.fOutputId = this.fConnection.fOutputId;
4096
- this.fSnapConnection.initialize();
4097
- }
4098
- getOutput() {
4099
- return this.fComponentsStore.fOutputs.find((x) => x.fId === this.fConnection.fOutputId);
4100
- }
4101
- getInput() {
4102
- return this.fComponentsStore.fInputs.find((x) => x.fId === this.fConnection.fInputId);
3777
+ this._fSnapConnection.fOutputId = this._fConnection.fOutputId;
3778
+ this._fSnapConnection.initialize();
4103
3779
  }
4104
3780
  onPointerMove(difference) {
4105
3781
  const fClosestInput = this._findClosestInput(difference);
4106
- this._drawConnection(this.toConnectorRect.addPoint(difference), fClosestInput?.fConnector.fConnectableSide || this.fInputWithRect.fConnector.fConnectableSide);
4107
- if (this.fSnapConnection) {
3782
+ this._drawConnection(this._toConnectorRect.addPoint(difference), fClosestInput?.fConnector.fConnectableSide || this._fInputWithRect.fConnector.fConnectableSide);
3783
+ if (this._fSnapConnection) {
4108
3784
  this._drawSnapConnection(this._getClosestInputForSnapConnection(fClosestInput));
4109
3785
  }
4110
3786
  }
4111
- _drawConnection(fInputRect, fSide) {
4112
- const line = this._getLineToPointer(fInputRect, fSide);
4113
- this.fConnection.setLine(line.point1, this.fOutputWithRect.fConnector.fConnectableSide, line.point2, fSide);
4114
- this.fConnection.redraw();
3787
+ _drawConnection(difference, fSide) {
3788
+ const line = this._getLineToPointer(difference, fSide);
3789
+ this._fConnection.setLine(line.point1, this._fOutputWithRect.fConnector.fConnectableSide, line.point2, fSide);
3790
+ this._fConnection.redraw();
4115
3791
  }
4116
- _getLineToPointer(fInputRect, fSide) {
4117
- return this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this.fOutputWithRect.fRect, fInputRect, this.fConnection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, fSide));
3792
+ _getLineToPointer(difference, fSide) {
3793
+ return this._fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this._fOutputWithRect.fRect, RoundedRect.fromRect(RectExtensions.initialize(difference.x, difference.y)), this._fConnection.fBehavior, this._fOutputWithRect.fConnector.fConnectableSide, fSide));
4118
3794
  }
4119
3795
  _drawSnapConnection(fClosestInput) {
4120
3796
  if (fClosestInput) {
4121
3797
  const line = this._getLineToClosestInput(fClosestInput);
4122
- this.fSnapConnection.show();
4123
- this.fSnapConnection.setLine(line.point1, this.fOutputWithRect.fConnector.fConnectableSide, line.point2, fClosestInput.fConnector.fConnectableSide);
4124
- this.fSnapConnection.redraw();
3798
+ this._fSnapConnection.show();
3799
+ this._fSnapConnection.setLine(line.point1, this._fOutputWithRect.fConnector.fConnectableSide, line.point2, fClosestInput.fConnector.fConnectableSide);
3800
+ this._fSnapConnection.redraw();
4125
3801
  }
4126
3802
  else {
4127
- this.fSnapConnection?.hide();
3803
+ this._fSnapConnection?.hide();
4128
3804
  }
4129
3805
  }
4130
3806
  _getLineToClosestInput(fClosestInput) {
4131
- return this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this.fOutputWithRect.fRect, fClosestInput.fRect, this.fSnapConnection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, fClosestInput.fConnector.fConnectableSide));
4132
- }
4133
- getClosetInput(difference) {
4134
- if (!this.fSnapConnection) {
4135
- return undefined;
4136
- }
4137
- return this._getClosestInputForSnapConnection(this._findClosestInput(difference));
3807
+ return this._fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this._fOutputWithRect.fRect, fClosestInput.fRect, this._fSnapConnection.fBehavior, this._fOutputWithRect.fConnector.fConnectableSide, fClosestInput.fConnector.fConnectableSide));
4138
3808
  }
4139
3809
  _findClosestInput(difference) {
4140
- return this.fMediator.send(new FindClosestInputRequest(Point.fromPoint(this.toConnectorRect).add(difference), this.canBeConnectedInputs));
3810
+ return this._fMediator.execute(new CalculateClosestInputRequest(this._toConnectorRect.addPoint(difference), this._canBeConnectedInputs));
4141
3811
  }
4142
3812
  _getClosestInputForSnapConnection(fClosestInput) {
4143
- return fClosestInput && fClosestInput.distance < this.fSnapConnection.fSnapThreshold ? fClosestInput : undefined;
3813
+ return fClosestInput && fClosestInput.distance < this._fSnapConnection.fSnapThreshold ? fClosestInput : undefined;
4144
3814
  }
4145
3815
  onPointerUp() {
4146
- this._drawConnection(this.fInputWithRect.fRect, this.fInputWithRect.fConnector.fConnectableSide);
4147
- this.fSnapConnection?.hide();
3816
+ this._drawConnection(this._fInputWithRect.fRect, this._fInputWithRect.fConnector.fConnectableSide);
3817
+ this._fSnapConnection?.hide();
3818
+ this._fMediator.execute(new UnmarkAllCanBeConnectedInputsRequest(this._canBeConnectedInputs.map((x) => x.fConnector)));
3819
+ }
3820
+ getData() {
3821
+ return {
3822
+ toConnectorRect: this._toConnectorRect,
3823
+ fOutputId: this._fConnection.fOutputId,
3824
+ canBeConnectedInputs: this._canBeConnectedInputs
3825
+ };
3826
+ }
3827
+ getConnection() {
3828
+ return this._fConnection;
4148
3829
  }
4149
3830
  }
4150
3831
 
@@ -4191,16 +3872,20 @@ let ReassignConnectionFinalizeExecution = class ReassignConnectionFinalizeExecut
4191
3872
  this._emitReassignConnectionEvent(event, fInput);
4192
3873
  }
4193
3874
  _getInputUnderPointer(event) {
4194
- return this._fMediator.send(new GetInputUnderPointerRequest(event, this._fDragHandler));
3875
+ return this._fMediator.send(new FindInputAtPositionRequest(event.getPosition(), this._getDragHandlerData().toConnectorRect, this._getDragHandlerData().canBeConnectedInputs));
4195
3876
  }
4196
3877
  _isReassignToDifferentInput(fInput) {
4197
- return this._fDragHandler.fConnection.fInputId !== fInput.fId;
3878
+ return this._fDragHandler.getConnection().fInputId !== fInput.fId;
4198
3879
  }
4199
3880
  _emitReassignConnectionEvent(event, fInput) {
4200
3881
  this._fDraggable.fReassignConnection.emit(this._getEventData(event, fInput));
4201
3882
  }
4202
3883
  _getEventData(event, fInput) {
4203
- return new FReassignConnectionEvent(this._fDragHandler.fConnection.fId, this._fDragHandler.fConnection.fOutputId, this._fDragHandler.fConnection.fInputId, fInput?.fId, event.getPosition());
3884
+ const fConnection = this._fDragHandler.getConnection();
3885
+ return new FReassignConnectionEvent(fConnection.fId, fConnection.fOutputId, fConnection.fInputId, fInput?.fId, event.getPosition());
3886
+ }
3887
+ _getDragHandlerData() {
3888
+ return this._fDragHandler.getData();
4204
3889
  }
4205
3890
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ReassignConnectionFinalizeExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4206
3891
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ReassignConnectionFinalizeExecution });
@@ -4281,8 +3966,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
4281
3966
  }] });
4282
3967
 
4283
3968
  const CONNECTIONS_PROVIDERS = [
4284
- GetInputUnderPointerExecution,
4285
- GetInputUnderPointerValidator,
4286
3969
  CreateConnectionFinalizeExecution,
4287
3970
  CreateConnectionDragHandlerExecution,
4288
3971
  CreateConnectionFromOutletPreparationExecution,
@@ -4331,7 +4014,7 @@ let GetNormalizedParentNodeRectExecution = class GetNormalizedParentNodeRectExec
4331
4014
  getNodePadding(node, rect) {
4332
4015
  return this.fMediator.send(new GetNodePaddingRequest(node, rect));
4333
4016
  }
4334
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNormalizedParentNodeRectExecution, deps: [{ token: FComponentsStore }, { token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
4017
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNormalizedParentNodeRectExecution, deps: [{ token: FComponentsStore }, { token: i2$1.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
4335
4018
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNormalizedParentNodeRectExecution });
4336
4019
  };
4337
4020
  GetNormalizedParentNodeRectExecution = __decorate([
@@ -4339,7 +4022,7 @@ GetNormalizedParentNodeRectExecution = __decorate([
4339
4022
  ], GetNormalizedParentNodeRectExecution);
4340
4023
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNormalizedParentNodeRectExecution, decorators: [{
4341
4024
  type: Injectable
4342
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2.FMediator }] });
4025
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2$1.FMediator }] });
4343
4026
 
4344
4027
  class IsArrayHasParentNodeRequest {
4345
4028
  fParentNodes;
@@ -4538,8 +4221,8 @@ class ConnectionBaseDragHandler {
4538
4221
  this.connection = connection;
4539
4222
  }
4540
4223
  prepareDragSequence() {
4541
- this.fOutputWithRect = this.fMediator.send(new GetConnectorWithRectRequest(this.getOutput()));
4542
- this.fInputWithRect = this.fMediator.send(new GetConnectorWithRectRequest(this.getInput()));
4224
+ this.fOutputWithRect = this.fMediator.send(new GetConnectorAndRectRequest(this.getOutput()));
4225
+ this.fInputWithRect = this.fMediator.send(new GetConnectorAndRectRequest(this.getInput()));
4543
4226
  }
4544
4227
  getOutput() {
4545
4228
  const result = this.fComponentsStore.fOutputs.find((x) => x.fId === this.connection.fOutputId);
@@ -4568,12 +4251,12 @@ class ConnectionBaseDragHandler {
4568
4251
  this.connection.setLine(line.point1, this.fOutputWithRect.fConnector.fConnectableSide, line.point2, this.fInputWithRect.fConnector.fConnectableSide);
4569
4252
  this.connection.redraw();
4570
4253
  }
4571
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ConnectionBaseDragHandler, deps: [{ token: i2.FMediator }, { token: FComponentsStore }, { token: FConnectionBase }], target: i0.ɵɵFactoryTarget.Directive });
4254
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ConnectionBaseDragHandler, deps: [{ token: i2$1.FMediator }, { token: FComponentsStore }, { token: FConnectionBase }], target: i0.ɵɵFactoryTarget.Directive });
4572
4255
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: ConnectionBaseDragHandler, ngImport: i0 });
4573
4256
  }
4574
4257
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ConnectionBaseDragHandler, decorators: [{
4575
4258
  type: Directive
4576
- }], ctorParameters: () => [{ type: i2.FMediator }, { type: FComponentsStore }, { type: FConnectionBase }] });
4259
+ }], ctorParameters: () => [{ type: i2$1.FMediator }, { type: FComponentsStore }, { type: FConnectionBase }] });
4577
4260
 
4578
4261
  class ConnectionDragHandler extends ConnectionBaseDragHandler {
4579
4262
  sourceRestrictions;
@@ -4744,7 +4427,7 @@ let PutOutputConnectionHandlersToArrayExecution = class PutOutputConnectionHandl
4744
4427
  getNewSourceConnectionHandler(connection, nodeDragHandler) {
4745
4428
  return new ConnectionSourceDragHandler(this.fMediator, this.fComponentsStore, connection, nodeDragHandler.restrictions);
4746
4429
  }
4747
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutOutputConnectionHandlersToArrayExecution, deps: [{ token: FComponentsStore }, { token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
4430
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutOutputConnectionHandlersToArrayExecution, deps: [{ token: FComponentsStore }, { token: i2$1.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
4748
4431
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutOutputConnectionHandlersToArrayExecution });
4749
4432
  };
4750
4433
  PutOutputConnectionHandlersToArrayExecution = __decorate([
@@ -4752,7 +4435,7 @@ PutOutputConnectionHandlersToArrayExecution = __decorate([
4752
4435
  ], PutOutputConnectionHandlersToArrayExecution);
4753
4436
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutOutputConnectionHandlersToArrayExecution, decorators: [{
4754
4437
  type: Injectable
4755
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2.FMediator }] });
4438
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2$1.FMediator }] });
4756
4439
 
4757
4440
  class CalculateNodeMoveRestrictionsRequest {
4758
4441
  fNode;
@@ -5370,7 +5053,7 @@ let NodeDragToParentPreparationExecution = class NodeDragToParentPreparationExec
5370
5053
  _getNotDraggedNodes(draggedNodes) {
5371
5054
  return this.fNodes.filter((x) => !draggedNodes.includes(x));
5372
5055
  }
5373
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeDragToParentPreparationExecution, deps: [{ token: i2.FMediator }, { token: FDraggableDataContext }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Injectable });
5056
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeDragToParentPreparationExecution, deps: [{ token: i2$1.FMediator }, { token: FDraggableDataContext }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Injectable });
5374
5057
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeDragToParentPreparationExecution });
5375
5058
  };
5376
5059
  NodeDragToParentPreparationExecution = __decorate([
@@ -5378,7 +5061,7 @@ NodeDragToParentPreparationExecution = __decorate([
5378
5061
  ], NodeDragToParentPreparationExecution);
5379
5062
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeDragToParentPreparationExecution, decorators: [{
5380
5063
  type: Injectable
5381
- }], ctorParameters: () => [{ type: i2.FMediator }, { type: FDraggableDataContext }, { type: FComponentsStore }] });
5064
+ }], ctorParameters: () => [{ type: i2$1.FMediator }, { type: FDraggableDataContext }, { type: FComponentsStore }] });
5382
5065
 
5383
5066
  let NodeDragToParentPreparationValidator = class NodeDragToParentPreparationValidator {
5384
5067
  fDraggableDataContext;
@@ -5767,7 +5450,7 @@ let GetNormalizedChildrenNodesRectExecution = class GetNormalizedChildrenNodesRe
5767
5450
  concatRectWithParentPadding(rect, padding) {
5768
5451
  return RectExtensions.initialize(rect.x - padding[0], rect.y - padding[1], rect.width + padding[0] + padding[2], rect.height + +padding[1] + padding[3]);
5769
5452
  }
5770
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNormalizedChildrenNodesRectExecution, deps: [{ token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
5453
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNormalizedChildrenNodesRectExecution, deps: [{ token: i2$1.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
5771
5454
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNormalizedChildrenNodesRectExecution });
5772
5455
  };
5773
5456
  GetNormalizedChildrenNodesRectExecution = __decorate([
@@ -5775,7 +5458,7 @@ GetNormalizedChildrenNodesRectExecution = __decorate([
5775
5458
  ], GetNormalizedChildrenNodesRectExecution);
5776
5459
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNormalizedChildrenNodesRectExecution, decorators: [{
5777
5460
  type: Injectable
5778
- }], ctorParameters: () => [{ type: i2.FMediator }] });
5461
+ }], ctorParameters: () => [{ type: i2$1.FMediator }] });
5779
5462
 
5780
5463
  class GetNodeResizeRestrictionsRequest {
5781
5464
  fNode;
@@ -5804,7 +5487,7 @@ let GetNodeResizeRestrictionsExecution = class GetNodeResizeRestrictionsExecutio
5804
5487
  getNodePaddings(node, rect) {
5805
5488
  return this.fMediator.send(new GetNodePaddingRequest(node, rect));
5806
5489
  }
5807
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNodeResizeRestrictionsExecution, deps: [{ token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
5490
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNodeResizeRestrictionsExecution, deps: [{ token: i2$1.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
5808
5491
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNodeResizeRestrictionsExecution });
5809
5492
  };
5810
5493
  GetNodeResizeRestrictionsExecution = __decorate([
@@ -5812,7 +5495,7 @@ GetNodeResizeRestrictionsExecution = __decorate([
5812
5495
  ], GetNodeResizeRestrictionsExecution);
5813
5496
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNodeResizeRestrictionsExecution, decorators: [{
5814
5497
  type: Injectable
5815
- }], ctorParameters: () => [{ type: i2.FMediator }] });
5498
+ }], ctorParameters: () => [{ type: i2$1.FMediator }] });
5816
5499
 
5817
5500
  class NodeResizeFinalizeRequest {
5818
5501
  event;
@@ -5938,7 +5621,7 @@ let NodeResizePreparationExecution = class NodeResizePreparationExecution {
5938
5621
  return this.fComponentsStore
5939
5622
  .fNodes.find(n => n.isContains(targetElement));
5940
5623
  }
5941
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizePreparationExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
5624
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizePreparationExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: i2$1.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
5942
5625
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizePreparationExecution });
5943
5626
  };
5944
5627
  NodeResizePreparationExecution = __decorate([
@@ -5946,7 +5629,7 @@ NodeResizePreparationExecution = __decorate([
5946
5629
  ], NodeResizePreparationExecution);
5947
5630
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizePreparationExecution, decorators: [{
5948
5631
  type: Injectable
5949
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2.FMediator }] });
5632
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2$1.FMediator }] });
5950
5633
 
5951
5634
  let NodeResizePreparationValidator = class NodeResizePreparationValidator {
5952
5635
  fComponentsStore;
@@ -6090,7 +5773,7 @@ let SingleSelectExecution = class SingleSelectExecution {
6090
5773
  });
6091
5774
  this.fDraggableDataContext.selectedItems = [];
6092
5775
  }
6093
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SingleSelectExecution, deps: [{ token: i1.PlatformService }, { token: FComponentsStore }, { token: FDraggableDataContext }, { token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
5776
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SingleSelectExecution, deps: [{ token: i1.PlatformService }, { token: FComponentsStore }, { token: FDraggableDataContext }, { token: i2$1.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
6094
5777
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SingleSelectExecution });
6095
5778
  };
6096
5779
  SingleSelectExecution = __decorate([
@@ -6098,7 +5781,7 @@ SingleSelectExecution = __decorate([
6098
5781
  ], SingleSelectExecution);
6099
5782
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SingleSelectExecution, decorators: [{
6100
5783
  type: Injectable
6101
- }], ctorParameters: () => [{ type: i1.PlatformService }, { type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2.FMediator }] });
5784
+ }], ctorParameters: () => [{ type: i1.PlatformService }, { type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2$1.FMediator }] });
6102
5785
 
6103
5786
  const SINGLE_SELECT_PROVIDERS = [
6104
5787
  SingleSelectExecution,
@@ -6213,7 +5896,7 @@ let ExternalItemFinalizeExecution = class ExternalItemFinalizeExecution {
6213
5896
  getRectInCanvas() {
6214
5897
  return this.fMediator.send(new GetNormalizedElementRectRequest(this.dragHandler.placeholder, false));
6215
5898
  }
6216
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ExternalItemFinalizeExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: i2.FMediator }, { token: i1.BrowserService }], target: i0.ɵɵFactoryTarget.Injectable });
5899
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ExternalItemFinalizeExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: i2$1.FMediator }, { token: i1.BrowserService }], target: i0.ɵɵFactoryTarget.Injectable });
6217
5900
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ExternalItemFinalizeExecution });
6218
5901
  };
6219
5902
  ExternalItemFinalizeExecution = __decorate([
@@ -6221,7 +5904,7 @@ ExternalItemFinalizeExecution = __decorate([
6221
5904
  ], ExternalItemFinalizeExecution);
6222
5905
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ExternalItemFinalizeExecution, decorators: [{
6223
5906
  type: Injectable
6224
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2.FMediator }, { type: i1.BrowserService }] });
5907
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2$1.FMediator }, { type: i1.BrowserService }] });
6225
5908
 
6226
5909
  const EXTERNAL_ITEM_FINALIZE_PROVIDERS = [
6227
5910
  ExternalItemFinalizeExecution,
@@ -6690,7 +6373,7 @@ let MinimapDragPreparationExecution = class MinimapDragPreparationExecution {
6690
6373
  getFlowRect() {
6691
6374
  return RectExtensions.fromElement(this.flowHost);
6692
6375
  }
6693
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: MinimapDragPreparationExecution, deps: [{ token: FComponentsStore }, { token: i2.FMediator }, { token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
6376
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: MinimapDragPreparationExecution, deps: [{ token: FComponentsStore }, { token: i2$1.FMediator }, { token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
6694
6377
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: MinimapDragPreparationExecution });
6695
6378
  };
6696
6379
  MinimapDragPreparationExecution = __decorate([
@@ -6698,7 +6381,7 @@ MinimapDragPreparationExecution = __decorate([
6698
6381
  ], MinimapDragPreparationExecution);
6699
6382
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: MinimapDragPreparationExecution, decorators: [{
6700
6383
  type: Injectable
6701
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2.FMediator }, { type: FDraggableDataContext }] });
6384
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2$1.FMediator }, { type: FDraggableDataContext }] });
6702
6385
 
6703
6386
  let MinimapDragPreparationValidator = class MinimapDragPreparationValidator {
6704
6387
  fComponentsStore;
@@ -7075,7 +6758,7 @@ let SelectionAreaPreparationExecution = class SelectionAreaPreparationExecution
7075
6758
  this.fDraggableDataContext.onPointerDownPosition = Point.fromPoint(request.event.getPosition())
7076
6759
  .elementTransform(this.flowHost);
7077
6760
  }
7078
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaPreparationExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
6761
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaPreparationExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: i2$1.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
7079
6762
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaPreparationExecution });
7080
6763
  };
7081
6764
  SelectionAreaPreparationExecution = __decorate([
@@ -7083,7 +6766,7 @@ SelectionAreaPreparationExecution = __decorate([
7083
6766
  ], SelectionAreaPreparationExecution);
7084
6767
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaPreparationExecution, decorators: [{
7085
6768
  type: Injectable
7086
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2.FMediator }] });
6769
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2$1.FMediator }] });
7087
6770
 
7088
6771
  let SelectionAreaPreparationValidator = class SelectionAreaPreparationValidator {
7089
6772
  fDraggableDataContext;
@@ -7153,38 +6836,360 @@ class FSelectionAreaComponent extends FSelectionAreaBase {
7153
6836
  onPointerDown(event) {
7154
6837
  this._fMediator.send(new SelectionAreaPreparationRequest(event, this));
7155
6838
  }
7156
- onPointerUp(event) {
7157
- this._fMediator.send(new SelectionAreaFinalizeRequest(event));
6839
+ onPointerUp(event) {
6840
+ this._fMediator.send(new SelectionAreaFinalizeRequest(event));
6841
+ }
6842
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FSelectionAreaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
6843
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.4", type: FSelectionAreaComponent, selector: "f-selection-area", host: { classAttribute: "f-selection-area f-component" }, providers: [
6844
+ { provide: F_DRAG_AND_DROP_PLUGIN, useExisting: FSelectionAreaComponent },
6845
+ ], usesInheritance: true, ngImport: i0, template: ``, isInline: true, styles: [":host{position:absolute}\n"] });
6846
+ }
6847
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FSelectionAreaComponent, decorators: [{
6848
+ type: Component,
6849
+ args: [{ selector: "f-selection-area", template: ``, host: {
6850
+ 'class': 'f-selection-area f-component'
6851
+ }, providers: [
6852
+ { provide: F_DRAG_AND_DROP_PLUGIN, useExisting: FSelectionAreaComponent },
6853
+ ], styles: [":host{position:absolute}\n"] }]
6854
+ }] });
6855
+
6856
+ const F_SELECTION_AREA_PROVIDERS = [
6857
+ FSelectionAreaComponent
6858
+ ];
6859
+
6860
+ const F_DRAGGABLE_PROVIDERS = [
6861
+ ...CANVAS_PROVIDERS,
6862
+ ...CONNECTIONS_PROVIDERS,
6863
+ ...DRAG_AND_DROP_COMMON_PROVIDERS,
6864
+ ...SINGLE_SELECT_PROVIDERS,
6865
+ ...F_EXTERNAL_ITEM_DRAG_AND_DROP_PROVIDERS,
6866
+ ...NODE_PROVIDERS,
6867
+ ...NODE_RESIZE_PROVIDERS,
6868
+ ...F_SELECTION_AREA_DRAG_AND_DROP_PROVIDERS,
6869
+ ...F_MINIMAP_DRAG_AND_DROP_PROVIDERS
6870
+ ];
6871
+
6872
+ let FindInputAtPositionExecution = class FindInputAtPositionExecution {
6873
+ _fMediator = inject(FMediator);
6874
+ _fComponentsStore = inject(FComponentsStore);
6875
+ _fDraggableDataContext = inject(FDraggableDataContext);
6876
+ _fBrowser = inject(BrowserService);
6877
+ get _fNodes() {
6878
+ return this._fComponentsStore.fNodes;
6879
+ }
6880
+ get _fSnapConnection() {
6881
+ return this._fComponentsStore.fSnapConnection;
6882
+ }
6883
+ handle(payload) {
6884
+ const fInputs = this._findInputsAtPosition(payload);
6885
+ return fInputs.length > 0 ? fInputs[0] : undefined;
6886
+ }
6887
+ _findInputsAtPosition(request) {
6888
+ const result = [];
6889
+ result.push(...this._getConnectableInputsAtPosition(request));
6890
+ const fClosestInput = this._calculateClosetInput(request);
6891
+ if (fClosestInput) {
6892
+ result.unshift(fClosestInput.fConnector);
6893
+ }
6894
+ const fInput = this._getFirstConnectableInputOfNodeAtPosition(request);
6895
+ if (fInput) {
6896
+ result.push(fInput);
6897
+ }
6898
+ return result;
6899
+ }
6900
+ _getConnectableInputsAtPosition(request) {
6901
+ return request.canBeConnectedInputs.filter((x) => {
6902
+ return RectExtensions.isIncludePoint(x.fRect, this._calculateDifference(request.pointerPosition));
6903
+ }).map((x) => x.fConnector);
6904
+ }
6905
+ _calculateDifference(position) {
6906
+ return Point.fromPoint(position)
6907
+ .elementTransform(this._fComponentsStore.flowHost)
6908
+ .div(this._fDraggableDataContext.onPointerDownScale)
6909
+ .sub(this._fDraggableDataContext.onPointerDownPosition);
6910
+ }
6911
+ //if the closest input is valid, return it
6912
+ _calculateClosetInput(request) {
6913
+ if (!this._fSnapConnection) {
6914
+ return undefined;
6915
+ }
6916
+ const position = Point.fromPoint(request.toConnectorRect).add(this._calculateDifference(request.pointerPosition));
6917
+ const fClosestInput = this._fMediator.send(new CalculateClosestInputRequest(position, request.canBeConnectedInputs));
6918
+ return this._isValidClosestInput(fClosestInput) ? fClosestInput : undefined;
6919
+ }
6920
+ _isValidClosestInput(fClosestInput) {
6921
+ return !!fClosestInput && fClosestInput.distance < this._fSnapConnection.fSnapThreshold;
6922
+ }
6923
+ //if node placed in position and fConnectOnNode is true, return the first connectable input of the node
6924
+ _getFirstConnectableInputOfNodeAtPosition(request) {
6925
+ return this._getElementsFromPoint(request.pointerPosition)
6926
+ .map((x) => this._findConnectableNode(x))
6927
+ .filter((x) => !!x)
6928
+ .map((x) => this._findFirstConnectableInputOfNode(request.canBeConnectedInputs, x))
6929
+ .find((x) => !!x);
6930
+ }
6931
+ _getElementsFromPoint(position) {
6932
+ return this._fBrowser.document.elementsFromPoint(position.x, position.y);
6933
+ }
6934
+ _findConnectableNode(element) {
6935
+ return this._fNodes.find((x) => x.isContains(element) && x.fConnectOnNode);
6936
+ }
6937
+ _findFirstConnectableInputOfNode(connectableInputs, fNode) {
6938
+ return connectableInputs.find((x) => x.fConnector.fNodeId === fNode.fId)?.fConnector;
6939
+ }
6940
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FindInputAtPositionExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6941
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FindInputAtPositionExecution });
6942
+ };
6943
+ FindInputAtPositionExecution = __decorate([
6944
+ FExecutionRegister(FindInputAtPositionRequest)
6945
+ ], FindInputAtPositionExecution);
6946
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FindInputAtPositionExecution, decorators: [{
6947
+ type: Injectable
6948
+ }] });
6949
+
6950
+ class GetAllCanBeConnectedInputsAndRectsRequest {
6951
+ fOutput;
6952
+ constructor(fOutput) {
6953
+ this.fOutput = fOutput;
6954
+ }
6955
+ }
6956
+
6957
+ class GetConnectorAndRectRequest {
6958
+ fConnector;
6959
+ constructor(fConnector) {
6960
+ this.fConnector = fConnector;
6961
+ }
6962
+ }
6963
+
6964
+ let GetConnectorAndRectExecution = class GetConnectorAndRectExecution {
6965
+ _fMediator = inject(FMediator);
6966
+ handle(request) {
6967
+ return {
6968
+ fConnector: request.fConnector,
6969
+ fRect: this._getConnectorRect(request.fConnector)
6970
+ };
6971
+ }
6972
+ _getConnectorRect(fConnector) {
6973
+ return this._fMediator.send(new GetNormalizedElementRectRequest(fConnector.hostElement, true));
6974
+ }
6975
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetConnectorAndRectExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6976
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetConnectorAndRectExecution });
6977
+ };
6978
+ GetConnectorAndRectExecution = __decorate([
6979
+ FExecutionRegister(GetConnectorAndRectRequest)
6980
+ ], GetConnectorAndRectExecution);
6981
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetConnectorAndRectExecution, decorators: [{
6982
+ type: Injectable
6983
+ }] });
6984
+
6985
+ let GetAllCanBeConnectedInputsAndRectsExecution = class GetAllCanBeConnectedInputsAndRectsExecution {
6986
+ _fMediator = inject(FMediator);
6987
+ _fComponentsStore = inject(FComponentsStore);
6988
+ get _fInputs() {
6989
+ return this._fComponentsStore.fInputs;
6990
+ }
6991
+ handle(payload) {
6992
+ return this._getCanBeConnectedInputs(payload.fOutput).map((x) => {
6993
+ return this._fMediator.execute(new GetConnectorAndRectRequest(x));
6994
+ });
6995
+ }
6996
+ _getCanBeConnectedInputs(fOutput) {
6997
+ let fInputs = [];
6998
+ if (fOutput.canBeConnectedInputs?.length) {
6999
+ fInputs = this._fInputs.filter((x) => fOutput.canBeConnectedInputs.includes(x.fId));
7000
+ }
7001
+ else {
7002
+ fInputs = this._fInputs.filter((x) => x.canBeConnected);
7003
+ if (!fOutput.isSelfConnectable) {
7004
+ fInputs = this._filterSelfConnectable(fInputs, fOutput);
7005
+ }
7006
+ }
7007
+ return fInputs;
7008
+ }
7009
+ _filterSelfConnectable(fInputs, fOutput) {
7010
+ return fInputs.filter((x) => fOutput.fNodeId !== x.fNodeId);
7011
+ }
7012
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetAllCanBeConnectedInputsAndRectsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7013
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetAllCanBeConnectedInputsAndRectsExecution });
7014
+ };
7015
+ GetAllCanBeConnectedInputsAndRectsExecution = __decorate([
7016
+ FExecutionRegister(GetAllCanBeConnectedInputsAndRectsRequest)
7017
+ ], GetAllCanBeConnectedInputsAndRectsExecution);
7018
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetAllCanBeConnectedInputsAndRectsExecution, decorators: [{
7019
+ type: Injectable
7020
+ }] });
7021
+
7022
+ class MarkAllCanBeConnectedInputsRequest {
7023
+ fInputs;
7024
+ constructor(fInputs) {
7025
+ this.fInputs = fInputs;
7026
+ }
7027
+ }
7028
+
7029
+ const F_CSS_CLASS = {
7030
+ DRAG_AND_DROP: {
7031
+ DRAGGING: 'f-dragging',
7032
+ CONNECTIONS_DRAGGING: 'f-connections-dragging',
7033
+ },
7034
+ CONNECTOR: {
7035
+ OUTPUT_CONNECTED: 'f-node-output-connected',
7036
+ OUTPUT_NOT_CONNECTABLE: 'f-node-output-not-connectable',
7037
+ INPUT_CONNECTED: 'f-node-input-connected',
7038
+ INPUT_NOT_CONNECTABLE: 'f-node-input-not-connectable',
7039
+ INPUT_CAN_BE_CONNECTED_TO: 'f-node-input-can-be-connected-to',
7040
+ }
7041
+ };
7042
+
7043
+ let MarkAllCanBeConnectedInputsExecution = class MarkAllCanBeConnectedInputsExecution {
7044
+ _fComponentsStore = inject(FComponentsStore);
7045
+ handle(payload) {
7046
+ this._fComponentsStore.flowHost.classList.add(F_CSS_CLASS.DRAG_AND_DROP.CONNECTIONS_DRAGGING);
7047
+ payload.fInputs.forEach((fInput) => this._markCanBeConnectedTo(fInput));
7048
+ }
7049
+ _markCanBeConnectedTo(fInput) {
7050
+ fInput.hostElement.classList.add(F_CSS_CLASS.CONNECTOR.INPUT_CAN_BE_CONNECTED_TO);
7051
+ }
7052
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: MarkAllCanBeConnectedInputsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7053
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: MarkAllCanBeConnectedInputsExecution });
7054
+ };
7055
+ MarkAllCanBeConnectedInputsExecution = __decorate([
7056
+ FExecutionRegister(MarkAllCanBeConnectedInputsRequest)
7057
+ ], MarkAllCanBeConnectedInputsExecution);
7058
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: MarkAllCanBeConnectedInputsExecution, decorators: [{
7059
+ type: Injectable
7060
+ }] });
7061
+
7062
+ class RemoveInputFromStoreRequest {
7063
+ fComponent;
7064
+ constructor(fComponent) {
7065
+ this.fComponent = fComponent;
7066
+ }
7067
+ }
7068
+
7069
+ let RemoveInputFromStoreExecution = class RemoveInputFromStoreExecution {
7070
+ _fComponentsStore = inject(FComponentsStore);
7071
+ handle(request) {
7072
+ this._fComponentsStore.removeComponent(this._fComponentsStore.fInputs, request.fComponent);
7073
+ }
7074
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveInputFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7075
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveInputFromStoreExecution });
7076
+ };
7077
+ RemoveInputFromStoreExecution = __decorate([
7078
+ FExecutionRegister(RemoveInputFromStoreRequest)
7079
+ ], RemoveInputFromStoreExecution);
7080
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveInputFromStoreExecution, decorators: [{
7081
+ type: Injectable
7082
+ }] });
7083
+
7084
+ class RemoveOutletFromStoreRequest {
7085
+ fComponent;
7086
+ constructor(fComponent) {
7087
+ this.fComponent = fComponent;
7088
+ }
7089
+ }
7090
+
7091
+ let RemoveOutletFromStoreExecution = class RemoveOutletFromStoreExecution {
7092
+ _fComponentsStore = inject(FComponentsStore);
7093
+ handle(request) {
7094
+ this._fComponentsStore.removeComponent(this._fComponentsStore.fOutlets, request.fComponent);
7095
+ }
7096
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveOutletFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7097
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveOutletFromStoreExecution });
7098
+ };
7099
+ RemoveOutletFromStoreExecution = __decorate([
7100
+ FExecutionRegister(RemoveOutletFromStoreRequest)
7101
+ ], RemoveOutletFromStoreExecution);
7102
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveOutletFromStoreExecution, decorators: [{
7103
+ type: Injectable
7104
+ }] });
7105
+
7106
+ class RemoveOutputFromStoreRequest {
7107
+ fComponent;
7108
+ constructor(fComponent) {
7109
+ this.fComponent = fComponent;
7110
+ }
7111
+ }
7112
+
7113
+ let RemoveOutputFromStoreExecution = class RemoveOutputFromStoreExecution {
7114
+ _fComponentsStore = inject(FComponentsStore);
7115
+ handle(request) {
7116
+ this._fComponentsStore.removeComponent(this._fComponentsStore.fOutputs, request.fComponent);
7117
+ }
7118
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveOutputFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7119
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveOutputFromStoreExecution });
7120
+ };
7121
+ RemoveOutputFromStoreExecution = __decorate([
7122
+ FExecutionRegister(RemoveOutputFromStoreRequest)
7123
+ ], RemoveOutputFromStoreExecution);
7124
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveOutputFromStoreExecution, decorators: [{
7125
+ type: Injectable
7126
+ }] });
7127
+
7128
+ class UnmarkAllCanBeConnectedInputsRequest {
7129
+ fInputs;
7130
+ constructor(fInputs) {
7131
+ this.fInputs = fInputs;
7158
7132
  }
7159
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FSelectionAreaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
7160
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.4", type: FSelectionAreaComponent, selector: "f-selection-area", host: { classAttribute: "f-selection-area f-component" }, providers: [
7161
- { provide: F_DRAG_AND_DROP_PLUGIN, useExisting: FSelectionAreaComponent },
7162
- ], usesInheritance: true, ngImport: i0, template: ``, isInline: true, styles: [":host{position:absolute}\n"] });
7163
7133
  }
7164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FSelectionAreaComponent, decorators: [{
7165
- type: Component,
7166
- args: [{ selector: "f-selection-area", template: ``, host: {
7167
- 'class': 'f-selection-area f-component'
7168
- }, providers: [
7169
- { provide: F_DRAG_AND_DROP_PLUGIN, useExisting: FSelectionAreaComponent },
7170
- ], styles: [":host{position:absolute}\n"] }]
7134
+
7135
+ let UnmarkAllCanBeConnectedInputsExecution = class UnmarkAllCanBeConnectedInputsExecution {
7136
+ _fComponentsStore = inject(FComponentsStore);
7137
+ handle(payload) {
7138
+ this._fComponentsStore.flowHost.classList.remove(F_CSS_CLASS.DRAG_AND_DROP.CONNECTIONS_DRAGGING);
7139
+ payload.fInputs.forEach((fInput) => this._unmarkCanBeConnectedTo(fInput));
7140
+ }
7141
+ _unmarkCanBeConnectedTo(fInput) {
7142
+ fInput.hostElement.classList.remove(F_CSS_CLASS.CONNECTOR.INPUT_CAN_BE_CONNECTED_TO);
7143
+ }
7144
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: UnmarkAllCanBeConnectedInputsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7145
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: UnmarkAllCanBeConnectedInputsExecution });
7146
+ };
7147
+ UnmarkAllCanBeConnectedInputsExecution = __decorate([
7148
+ FExecutionRegister(UnmarkAllCanBeConnectedInputsRequest)
7149
+ ], UnmarkAllCanBeConnectedInputsExecution);
7150
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: UnmarkAllCanBeConnectedInputsExecution, decorators: [{
7151
+ type: Injectable
7171
7152
  }] });
7172
7153
 
7173
- const F_SELECTION_AREA_PROVIDERS = [
7174
- FSelectionAreaComponent
7154
+ const F_CONNECTORS_FEATURES = [
7155
+ AddInputToStoreExecution,
7156
+ AddOutletToStoreExecution,
7157
+ AddOutputToStoreExecution,
7158
+ CalculateClosestInputExecution,
7159
+ FindInputAtPositionExecution,
7160
+ GetAllCanBeConnectedInputsAndRectsExecution,
7161
+ GetConnectorAndRectExecution,
7162
+ MarkAllCanBeConnectedInputsExecution,
7163
+ RemoveInputFromStoreExecution,
7164
+ RemoveOutletFromStoreExecution,
7165
+ RemoveOutputFromStoreExecution,
7166
+ UnmarkAllCanBeConnectedInputsExecution
7175
7167
  ];
7176
7168
 
7177
- const F_DRAGGABLE_PROVIDERS = [
7178
- ...CANVAS_PROVIDERS,
7179
- ...CONNECTIONS_PROVIDERS,
7180
- ...DRAG_AND_DROP_COMMON_PROVIDERS,
7181
- ...SINGLE_SELECT_PROVIDERS,
7182
- ...F_EXTERNAL_ITEM_DRAG_AND_DROP_PROVIDERS,
7183
- ...NODE_PROVIDERS,
7184
- ...NODE_RESIZE_PROVIDERS,
7185
- ...F_SELECTION_AREA_DRAG_AND_DROP_PROVIDERS,
7186
- ...F_MINIMAP_DRAG_AND_DROP_PROVIDERS
7187
- ];
7169
+ class AddDndToStoreRequest {
7170
+ fComponent;
7171
+ constructor(fComponent) {
7172
+ this.fComponent = fComponent;
7173
+ }
7174
+ }
7175
+
7176
+ let AddDndToStoreExecution = class AddDndToStoreExecution {
7177
+ _fComponentsStore = inject(FComponentsStore);
7178
+ handle(request) {
7179
+ this._fComponentsStore.fDraggable = request.fComponent;
7180
+ }
7181
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: AddDndToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7182
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: AddDndToStoreExecution });
7183
+ };
7184
+ AddDndToStoreExecution = __decorate([
7185
+ FExecutionRegister(AddDndToStoreRequest)
7186
+ ], AddDndToStoreExecution);
7187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: AddDndToStoreExecution, decorators: [{
7188
+ type: Injectable
7189
+ }] });
7190
+
7191
+ class EmitSelectionChangeEventRequest {
7192
+ }
7188
7193
 
7189
7194
  class ClearSelectionRequest {
7190
7195
  }
@@ -7306,34 +7311,30 @@ class SelectRequest {
7306
7311
  }
7307
7312
 
7308
7313
  let SelectExecution = class SelectExecution {
7309
- fDataContext;
7310
- fDraggableDataContext;
7311
- constructor(fDataContext, fDraggableDataContext) {
7312
- this.fDataContext = fDataContext;
7313
- this.fDraggableDataContext = fDraggableDataContext;
7314
- }
7314
+ _fDraggableDataContext = inject(FDraggableDataContext);
7315
+ _fComponentsStore = inject(FComponentsStore);
7315
7316
  handle(request) {
7316
- this.fDraggableDataContext.selectedItems.forEach((x) => {
7317
+ this._fDraggableDataContext.selectedItems.forEach((x) => {
7317
7318
  x.deselect();
7318
7319
  });
7319
- this.fDraggableDataContext.selectedItems = [];
7320
+ this._fDraggableDataContext.selectedItems = [];
7320
7321
  request.nodes.forEach((key) => {
7321
- const node = this.fDataContext.fNodes.find((x) => x.fId === key);
7322
+ const node = this._fComponentsStore.fNodes.find((x) => x.fId === key);
7322
7323
  if (node) {
7323
7324
  node.select();
7324
- this.fDraggableDataContext.selectedItems.push(node);
7325
+ this._fDraggableDataContext.selectedItems.push(node);
7325
7326
  }
7326
7327
  });
7327
7328
  request.connections.forEach((key) => {
7328
- const connection = this.fDataContext.fConnections.find((x) => x.fId === key);
7329
+ const connection = this._fComponentsStore.fConnections.find((x) => x.fId === key);
7329
7330
  if (connection) {
7330
7331
  connection.select();
7331
- this.fDraggableDataContext.selectedItems.push(connection);
7332
+ this._fDraggableDataContext.selectedItems.push(connection);
7332
7333
  }
7333
7334
  });
7334
- this.fDraggableDataContext.isSelectedChanged = true;
7335
+ this._fDraggableDataContext.isSelectedChanged = true;
7335
7336
  }
7336
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
7337
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7337
7338
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectExecution });
7338
7339
  };
7339
7340
  SelectExecution = __decorate([
@@ -7341,34 +7342,30 @@ SelectExecution = __decorate([
7341
7342
  ], SelectExecution);
7342
7343
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectExecution, decorators: [{
7343
7344
  type: Injectable
7344
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }] });
7345
+ }] });
7345
7346
 
7346
7347
  class SelectAllRequest {
7347
7348
  }
7348
7349
 
7349
7350
  let SelectAllExecution = class SelectAllExecution {
7350
- fDataContext;
7351
- fDraggableDataContext;
7352
- constructor(fDataContext, fDraggableDataContext) {
7353
- this.fDataContext = fDataContext;
7354
- this.fDraggableDataContext = fDraggableDataContext;
7355
- }
7351
+ _fDraggableDataContext = inject(FDraggableDataContext);
7352
+ _fComponentsStore = inject(FComponentsStore);
7356
7353
  handle(request) {
7357
- this.fDraggableDataContext.selectedItems.forEach((x) => {
7354
+ this._fDraggableDataContext.selectedItems.forEach((x) => {
7358
7355
  x.deselect();
7359
7356
  });
7360
- this.fDraggableDataContext.selectedItems = [];
7361
- this.fDataContext.fNodes.forEach((x) => {
7357
+ this._fDraggableDataContext.selectedItems = [];
7358
+ this._fComponentsStore.fNodes.forEach((x) => {
7362
7359
  x.select();
7363
- this.fDraggableDataContext.selectedItems.push(x);
7360
+ this._fDraggableDataContext.selectedItems.push(x);
7364
7361
  });
7365
- this.fDataContext.fConnections.forEach((x) => {
7362
+ this._fComponentsStore.fConnections.forEach((x) => {
7366
7363
  x.select();
7367
- this.fDraggableDataContext.selectedItems.push(x);
7364
+ this._fDraggableDataContext.selectedItems.push(x);
7368
7365
  });
7369
- this.fDraggableDataContext.isSelectedChanged = true;
7366
+ this._fDraggableDataContext.isSelectedChanged = true;
7370
7367
  }
7371
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectAllExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
7368
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectAllExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7372
7369
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectAllExecution });
7373
7370
  };
7374
7371
  SelectAllExecution = __decorate([
@@ -7376,7 +7373,7 @@ SelectAllExecution = __decorate([
7376
7373
  ], SelectAllExecution);
7377
7374
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectAllExecution, decorators: [{
7378
7375
  type: Injectable
7379
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }] });
7376
+ }] });
7380
7377
 
7381
7378
  class SelectAndUpdateNodeLayerRequest {
7382
7379
  fNode;
@@ -7544,7 +7541,7 @@ let UpdateItemAndChildrenLayersExecution = class UpdateItemAndChildrenLayersExec
7544
7541
  getChildrenNodesAndGroups(fId) {
7545
7542
  return this.fMediator.send(new GetDeepChildrenNodesAndGroupsRequest(fId)).map((x) => x.hostElement);
7546
7543
  }
7547
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: UpdateItemAndChildrenLayersExecution, deps: [{ token: FComponentsStore }, { token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
7544
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: UpdateItemAndChildrenLayersExecution, deps: [{ token: FComponentsStore }, { token: i2$1.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
7548
7545
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: UpdateItemAndChildrenLayersExecution });
7549
7546
  };
7550
7547
  UpdateItemAndChildrenLayersExecution = __decorate([
@@ -7552,7 +7549,7 @@ UpdateItemAndChildrenLayersExecution = __decorate([
7552
7549
  ], UpdateItemAndChildrenLayersExecution);
7553
7550
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: UpdateItemAndChildrenLayersExecution, decorators: [{
7554
7551
  type: Injectable
7555
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2.FMediator }] });
7552
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2$1.FMediator }] });
7556
7553
 
7557
7554
  let SelectAndUpdateNodeLayerExecution = class SelectAndUpdateNodeLayerExecution {
7558
7555
  fDraggableDataContext;
@@ -7572,7 +7569,7 @@ let SelectAndUpdateNodeLayerExecution = class SelectAndUpdateNodeLayerExecution
7572
7569
  this.fDraggableDataContext.isSelectedChanged = true;
7573
7570
  }
7574
7571
  }
7575
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectAndUpdateNodeLayerExecution, deps: [{ token: FDraggableDataContext }, { token: i2.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
7572
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectAndUpdateNodeLayerExecution, deps: [{ token: FDraggableDataContext }, { token: i2$1.FMediator }], target: i0.ɵɵFactoryTarget.Injectable });
7576
7573
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectAndUpdateNodeLayerExecution });
7577
7574
  };
7578
7575
  SelectAndUpdateNodeLayerExecution = __decorate([
@@ -7580,7 +7577,7 @@ SelectAndUpdateNodeLayerExecution = __decorate([
7580
7577
  ], SelectAndUpdateNodeLayerExecution);
7581
7578
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectAndUpdateNodeLayerExecution, decorators: [{
7582
7579
  type: Injectable
7583
- }], ctorParameters: () => [{ type: FDraggableDataContext }, { type: i2.FMediator }] });
7580
+ }], ctorParameters: () => [{ type: FDraggableDataContext }, { type: i2$1.FMediator }] });
7584
7581
 
7585
7582
  const F_SELECTION_FEATURES = [
7586
7583
  ClearSelectionExecution,
@@ -7632,7 +7629,7 @@ let EndDragSequenceExecution = class EndDragSequenceExecution {
7632
7629
  }
7633
7630
  _fDraggableDataContext = inject(FDraggableDataContext);
7634
7631
  handle(request) {
7635
- this._hostElement.classList.remove('f-dragging');
7632
+ this._hostElement.classList.remove(F_CSS_CLASS.DRAG_AND_DROP.DRAGGING);
7636
7633
  this._fDraggableDataContext.reset();
7637
7634
  }
7638
7635
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: EndDragSequenceExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -7717,7 +7714,7 @@ let StartDragSequenceExecution = class StartDragSequenceExecution {
7717
7714
  _fDraggableDataContext = inject(FDraggableDataContext);
7718
7715
  handle(request) {
7719
7716
  if (this._fDraggableDataContext.draggableItems.length > 0) {
7720
- this._hostElement.classList.add('f-dragging');
7717
+ this._hostElement.classList.add(F_CSS_CLASS.DRAG_AND_DROP.DRAGGING);
7721
7718
  this._fMediator.send(new EmitSelectionChangeEventRequest());
7722
7719
  }
7723
7720
  }
@@ -8213,11 +8210,44 @@ let UpdateNodeWhenStateOrSizeChangedExecution = class UpdateNodeWhenStateOrSizeC
8213
8210
  this._fMediator.send(new NotifyDataChangedRequest());
8214
8211
  });
8215
8212
  }
8216
- _calculateConnectorsConnectableSide(fConnectors, hostElement) {
8217
- fConnectors.forEach((fConnector) => {
8218
- fConnector.fConnectableSide = new CalculateConnectorConnectableSideHandler().handle(new CalculateConnectorConnectableSideRequest(fConnector, hostElement));
8213
+ _calculateConnectorsConnectableSide(fConnectors, fNodeHost) {
8214
+ fConnectors.forEach((x) => {
8215
+ x.fConnectableSide = this._calculateConnectorConnectableSide(x, fNodeHost);
8219
8216
  });
8220
8217
  }
8218
+ _calculateConnectorConnectableSide(fConnector, fNodeHost) {
8219
+ let result;
8220
+ if (fConnector.userFConnectableSide === EFConnectableSide.AUTO) {
8221
+ result = this._getSideByDelta(fConnector.hostElement, fNodeHost);
8222
+ }
8223
+ else {
8224
+ result = fConnector.userFConnectableSide;
8225
+ }
8226
+ return result;
8227
+ }
8228
+ _getSideByDelta(fConnectorHost, fNodeHost) {
8229
+ let result;
8230
+ const childRect = RectExtensions.fromElement(fConnectorHost);
8231
+ const parentRect = fNodeHost.getBoundingClientRect();
8232
+ const deltaLeft = childRect.gravityCenter.x - parentRect.left;
8233
+ const deltaRight = parentRect.right - childRect.gravityCenter.x;
8234
+ const deltaTop = childRect.gravityCenter.y - parentRect.top;
8235
+ const deltaBottom = parentRect.bottom - childRect.gravityCenter.y;
8236
+ const minDelta = Math.min(deltaLeft, deltaRight, deltaTop, deltaBottom);
8237
+ if (minDelta === deltaLeft) {
8238
+ result = EFConnectableSide.LEFT;
8239
+ }
8240
+ else if (minDelta === deltaRight) {
8241
+ result = EFConnectableSide.RIGHT;
8242
+ }
8243
+ else if (minDelta === deltaTop) {
8244
+ result = EFConnectableSide.TOP;
8245
+ }
8246
+ else {
8247
+ result = EFConnectableSide.BOTTOM;
8248
+ }
8249
+ return result;
8250
+ }
8221
8251
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: UpdateNodeWhenStateOrSizeChangedExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
8222
8252
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: UpdateNodeWhenStateOrSizeChangedExecution });
8223
8253
  };
@@ -8261,6 +8291,135 @@ const F_NODE_FEATURES = [
8261
8291
  RemoveNodeFromStoreExecution
8262
8292
  ];
8263
8293
 
8294
+ class AddZoomToStoreRequest {
8295
+ fComponent;
8296
+ constructor(fComponent) {
8297
+ this.fComponent = fComponent;
8298
+ }
8299
+ }
8300
+
8301
+ const F_ZOOM_TAG = 'F_ZOOM';
8302
+
8303
+ let AddZoomToStoreExecution = class AddZoomToStoreExecution {
8304
+ _fComponentsStore = inject(FComponentsStore);
8305
+ handle(request) {
8306
+ this._fComponentsStore.fComponents = {
8307
+ [F_ZOOM_TAG]: request.fComponent
8308
+ };
8309
+ }
8310
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: AddZoomToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
8311
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: AddZoomToStoreExecution });
8312
+ };
8313
+ AddZoomToStoreExecution = __decorate([
8314
+ FExecutionRegister(AddZoomToStoreRequest)
8315
+ ], AddZoomToStoreExecution);
8316
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: AddZoomToStoreExecution, decorators: [{
8317
+ type: Injectable
8318
+ }] });
8319
+
8320
+ class RemoveZoomFromStoreRequest {
8321
+ }
8322
+
8323
+ let RemoveZoomFromStoreExecution = class RemoveZoomFromStoreExecution {
8324
+ _fComponentsStore = inject(FComponentsStore);
8325
+ handle(request) {
8326
+ this._fComponentsStore.fComponents = {
8327
+ [F_ZOOM_TAG]: undefined
8328
+ };
8329
+ }
8330
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveZoomFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
8331
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveZoomFromStoreExecution });
8332
+ };
8333
+ RemoveZoomFromStoreExecution = __decorate([
8334
+ FExecutionRegister(RemoveZoomFromStoreRequest)
8335
+ ], RemoveZoomFromStoreExecution);
8336
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RemoveZoomFromStoreExecution, decorators: [{
8337
+ type: Injectable
8338
+ }] });
8339
+
8340
+ class ResetZoomRequest {
8341
+ }
8342
+
8343
+ let ResetZoomExecution = class ResetZoomExecution {
8344
+ _fComponentsStore = inject(FComponentsStore);
8345
+ get _fCanvas() {
8346
+ return this._fComponentsStore.fCanvas;
8347
+ }
8348
+ handle(request) {
8349
+ this._fCanvas.resetScale();
8350
+ this._fCanvas.redraw();
8351
+ this._fCanvas.emitCanvasChangeEvent();
8352
+ }
8353
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ResetZoomExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
8354
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ResetZoomExecution });
8355
+ };
8356
+ ResetZoomExecution = __decorate([
8357
+ FExecutionRegister(ResetZoomRequest)
8358
+ ], ResetZoomExecution);
8359
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ResetZoomExecution, decorators: [{
8360
+ type: Injectable
8361
+ }] });
8362
+
8363
+ class SetZoomRequest {
8364
+ position;
8365
+ step;
8366
+ direction;
8367
+ animate;
8368
+ constructor(position, step, direction, animate = false) {
8369
+ this.position = position;
8370
+ this.step = step;
8371
+ this.direction = direction;
8372
+ this.animate = animate;
8373
+ }
8374
+ }
8375
+
8376
+ let SetZoomExecution = class SetZoomExecution {
8377
+ _fMediator = inject(FMediator);
8378
+ _fComponentsStore = inject(FComponentsStore);
8379
+ get _fHost() {
8380
+ return this._fComponentsStore.fFlow?.hostElement;
8381
+ }
8382
+ get _fCanvas() {
8383
+ return this._fComponentsStore.fCanvas;
8384
+ }
8385
+ get _fZoomComponent() {
8386
+ return this._fComponentsStore.fComponents[F_ZOOM_TAG];
8387
+ }
8388
+ get _isDragStarted() {
8389
+ return this._fMediator.execute(new IsDragStartedRequest());
8390
+ }
8391
+ handle(request) {
8392
+ if (this._isDragStarted || !this._fZoomComponent) {
8393
+ return;
8394
+ }
8395
+ const result = this._fCanvas.transform.scale + request.step * request.direction;
8396
+ this._fCanvas.setScale(this._clamp(result), this._castPositionToFlow(request.position));
8397
+ request.animate ? this._fCanvas.redrawWithAnimation() : this._fCanvas.redraw();
8398
+ this._fCanvas.emitCanvasChangeEvent();
8399
+ }
8400
+ _clamp(value) {
8401
+ return Math.max(this._fZoomComponent.minimum, Math.min(value, this._fZoomComponent.maximum));
8402
+ }
8403
+ _castPositionToFlow(position) {
8404
+ return Point.fromPoint(position).elementTransform(this._fHost);
8405
+ }
8406
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SetZoomExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
8407
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SetZoomExecution });
8408
+ };
8409
+ SetZoomExecution = __decorate([
8410
+ FExecutionRegister(SetZoomRequest)
8411
+ ], SetZoomExecution);
8412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SetZoomExecution, decorators: [{
8413
+ type: Injectable
8414
+ }] });
8415
+
8416
+ const F_ZOOM_FEATURES = [
8417
+ AddZoomToStoreExecution,
8418
+ RemoveZoomFromStoreExecution,
8419
+ ResetZoomExecution,
8420
+ SetZoomExecution
8421
+ ];
8422
+
8264
8423
  class GetNormalizedPointRequest {
8265
8424
  position;
8266
8425
  constructor(position) {
@@ -8332,7 +8491,7 @@ let SortNodeLayersExecution = class SortNodeLayersExecution {
8332
8491
  });
8333
8492
  this.fNodesContainer.appendChild(fragment);
8334
8493
  }
8335
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SortNodeLayersExecution, deps: [{ token: FComponentsStore }, { token: i2.FMediator }, { token: i1.BrowserService }], target: i0.ɵɵFactoryTarget.Injectable });
8494
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SortNodeLayersExecution, deps: [{ token: FComponentsStore }, { token: i2$1.FMediator }, { token: i1.BrowserService }], target: i0.ɵɵFactoryTarget.Injectable });
8336
8495
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SortNodeLayersExecution });
8337
8496
  };
8338
8497
  SortNodeLayersExecution = __decorate([
@@ -8340,7 +8499,7 @@ SortNodeLayersExecution = __decorate([
8340
8499
  ], SortNodeLayersExecution);
8341
8500
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SortNodeLayersExecution, decorators: [{
8342
8501
  type: Injectable
8343
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2.FMediator }, { type: i1.BrowserService }] });
8502
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2$1.FMediator }, { type: i1.BrowserService }] });
8344
8503
 
8345
8504
  class SortItemsByParentRequest {
8346
8505
  fItemsContainer;
@@ -8391,7 +8550,7 @@ let SortItemsByParentExecution = class SortItemsByParentExecution {
8391
8550
  });
8392
8551
  this.fItemsContainer.insertBefore(fragment, nextSibling);
8393
8552
  }
8394
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SortItemsByParentExecution, deps: [{ token: FComponentsStore }, { token: i2.FMediator }, { token: i1.BrowserService }], target: i0.ɵɵFactoryTarget.Injectable });
8553
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SortItemsByParentExecution, deps: [{ token: FComponentsStore }, { token: i2$1.FMediator }, { token: i1.BrowserService }], target: i0.ɵɵFactoryTarget.Injectable });
8395
8554
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SortItemsByParentExecution });
8396
8555
  };
8397
8556
  SortItemsByParentExecution = __decorate([
@@ -8399,7 +8558,7 @@ SortItemsByParentExecution = __decorate([
8399
8558
  ], SortItemsByParentExecution);
8400
8559
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SortItemsByParentExecution, decorators: [{
8401
8560
  type: Injectable
8402
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2.FMediator }, { type: i1.BrowserService }] });
8561
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2$1.FMediator }, { type: i1.BrowserService }] });
8403
8562
 
8404
8563
  class SortItemLayersRequest {
8405
8564
  }
@@ -8419,7 +8578,7 @@ let SortItemLayersExecution = class SortItemLayersExecution {
8419
8578
  this.fMediator.send(new SortNodeLayersRequest());
8420
8579
  this.fMediator.send(new SortItemsByParentRequest(this.fComponentsStore.fCanvas.fNodesContainer.nativeElement));
8421
8580
  }
8422
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SortItemLayersExecution, deps: [{ token: i2.FMediator }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Injectable });
8581
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SortItemLayersExecution, deps: [{ token: i2$1.FMediator }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Injectable });
8423
8582
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SortItemLayersExecution });
8424
8583
  };
8425
8584
  SortItemLayersExecution = __decorate([
@@ -8427,17 +8586,39 @@ SortItemLayersExecution = __decorate([
8427
8586
  ], SortItemLayersExecution);
8428
8587
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SortItemLayersExecution, decorators: [{
8429
8588
  type: Injectable
8430
- }], ctorParameters: () => [{ type: i2.FMediator }, { type: FComponentsStore }] });
8589
+ }], ctorParameters: () => [{ type: i2$1.FMediator }, { type: FComponentsStore }] });
8431
8590
 
8432
8591
  function createSVGElement(tag, fBrowser) {
8433
8592
  return fBrowser.document.createElementNS('http://www.w3.org/2000/svg', tag);
8434
8593
  }
8435
8594
 
8595
+ var EFTriggerEvent;
8596
+ (function (EFTriggerEvent) {
8597
+ EFTriggerEvent["WHEEL"] = "wheel";
8598
+ EFTriggerEvent["DOUBLE_CLICK"] = "dblclick";
8599
+ EFTriggerEvent["MOUSE_DOWN"] = "mousedown";
8600
+ EFTriggerEvent["MOUSE_UP"] = "mouseup";
8601
+ EFTriggerEvent["MOUSE_MOVE"] = "mousemove";
8602
+ EFTriggerEvent["KEY_DOWN"] = "keydown";
8603
+ EFTriggerEvent["KEY_UP"] = "keyup";
8604
+ })(EFTriggerEvent || (EFTriggerEvent = {}));
8605
+
8436
8606
  function isMobile() {
8437
8607
  // @ts-ignore
8438
8608
  return /android|iPad|iPhone|iPod/i.test(navigator.userAgent || navigator.vendor || window['opera']);
8439
8609
  }
8440
8610
 
8611
+ function Deprecated(newMethodName, removalVersion = '18.0.0') {
8612
+ return function (target, propertyKey, descriptor) {
8613
+ const originalMethod = descriptor.value;
8614
+ descriptor.value = function (...args) {
8615
+ console.warn(`Method "${String(propertyKey)}" is deprecated. Use "${newMethodName}" instead. This method will be removed in version ${removalVersion}.`);
8616
+ return originalMethod.apply(this, args);
8617
+ };
8618
+ return descriptor;
8619
+ };
8620
+ }
8621
+
8441
8622
  function LogExecutionTime(label) {
8442
8623
  return function (target, propertyKey, descriptor) {
8443
8624
  const originalMethod = descriptor.value;
@@ -8465,6 +8646,7 @@ const COMMON_PROVIDERS = [
8465
8646
  ...F_NODE_FEATURES,
8466
8647
  GetElementRoundedRectExecution,
8467
8648
  ...F_SELECTION_FEATURES,
8649
+ ...F_ZOOM_FEATURES,
8468
8650
  GetDeepChildrenNodesAndGroupsExecution,
8469
8651
  GetNormalizedElementRectExecution,
8470
8652
  GetNormalizedPointExecution,
@@ -8787,10 +8969,25 @@ class FCanvasComponent extends FCanvasBase {
8787
8969
  resetScaleAndCenter(animated = true) {
8788
8970
  this._fMediator.send(new ResetScaleAndCenterRequest(animated));
8789
8971
  }
8972
+ getScale() {
8973
+ return this.transform.scale || 1;
8974
+ }
8975
+ /**
8976
+ * @deprecated Method "setZoom" is deprecated. Use "setScale" instead. This method will be removed in version 18.0.0.`,
8977
+ */
8790
8978
  setZoom(scale, toPosition = PointExtensions.initialize()) {
8979
+ this.setScale(scale, toPosition);
8980
+ }
8981
+ setScale(scale, toPosition = PointExtensions.initialize()) {
8791
8982
  this._fMediator.send(new UpdateScaleRequest(scale, toPosition));
8792
8983
  }
8984
+ /**
8985
+ * @deprecated Method "resetZoom" is deprecated. Use "resetScale" instead. This method will be removed in version 18.0.0.`,
8986
+ */
8793
8987
  resetZoom() {
8988
+ this.resetScale();
8989
+ }
8990
+ resetScale() {
8794
8991
  this._fMediator.send(new ResetScaleRequest());
8795
8992
  }
8796
8993
  ngOnDestroy() {
@@ -8801,6 +8998,12 @@ class FCanvasComponent extends FCanvasBase {
8801
8998
  { provide: F_CANVAS, useExisting: FCanvasComponent }
8802
8999
  ], viewQueries: [{ propertyName: "fGroupsContainer", first: true, predicate: ["fGroupsContainer"], descendants: true, static: true }, { propertyName: "fNodesContainer", first: true, predicate: ["fNodesContainer"], descendants: true, static: true }, { propertyName: "fConnectionsContainer", first: true, predicate: ["fConnectionsContainer"], descendants: true, static: true }], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0, template: "<ng-container>\n <div #fGroupsContainer>\n <ng-content select=\"[fGroup]\"></ng-content>\n </div>\n <div #fConnectionsContainer>\n <ng-content select=\"f-snap-connection\"></ng-content>\n <ng-content select=\"f-connection\"></ng-content>\n <ng-content select=\"f-connection-for-create\"></ng-content>\n </div>\n\n <div #fNodesContainer>\n <ng-content select=\"[fNode]\"></ng-content>\n </div>\n</ng-container>\n", styles: [":host{position:absolute;overflow:visible;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}:host.f-scaled-animate{transition:transform .09s}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
8803
9000
  }
9001
+ __decorate([
9002
+ Deprecated('setScale')
9003
+ ], FCanvasComponent.prototype, "setZoom", null);
9004
+ __decorate([
9005
+ Deprecated('resetScale')
9006
+ ], FCanvasComponent.prototype, "resetZoom", null);
8804
9007
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FCanvasComponent, decorators: [{
8805
9008
  type: Component,
8806
9009
  args: [{ selector: 'f-canvas', exportAs: 'fComponent', host: {
@@ -8823,7 +9026,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
8823
9026
  }], fConnectionsContainer: [{
8824
9027
  type: ViewChild,
8825
9028
  args: ['fConnectionsContainer', { static: true }]
8826
- }] } });
9029
+ }], setZoom: [], resetZoom: [] } });
8827
9030
 
8828
9031
  const F_CANVAS_PROVIDERS = [
8829
9032
  FCanvasComponent,
@@ -9086,124 +9289,156 @@ const F_FLOW_PROVIDERS = [
9086
9289
  FFlowComponent
9087
9290
  ];
9088
9291
 
9292
+ var EFZoomAction;
9293
+ (function (EFZoomAction) {
9294
+ EFZoomAction["WHEEL"] = "wheel";
9295
+ EFZoomAction["DOUBLE_CLICK"] = "dbl-click";
9296
+ })(EFZoomAction || (EFZoomAction = {}));
9297
+
9298
+ var EFZoomDirection;
9299
+ (function (EFZoomDirection) {
9300
+ EFZoomDirection[EFZoomDirection["ZOOM_IN"] = 1] = "ZOOM_IN";
9301
+ EFZoomDirection[EFZoomDirection["ZOOM_OUT"] = -1] = "ZOOM_OUT";
9302
+ })(EFZoomDirection || (EFZoomDirection = {}));
9303
+
9089
9304
  const F_ZOOM = new InjectionToken('F_ZOOM');
9090
9305
  class FZoomBase {
9091
- isEnabled = false;
9092
- _listeners = EventExtensions.emptyListener();
9306
+ }
9307
+
9308
+ class FZoomDirective extends FZoomBase {
9093
9309
  _fMediator = inject(FMediator);
9094
- get _fFlowHostElement() {
9095
- return this._fMediator.send(new GetFlowHostElementRequest());
9310
+ _rendered = inject(Renderer2);
9311
+ _triggersListener = [];
9312
+ _isEnabled = false;
9313
+ set fZoom(isEnabled) {
9314
+ if (isEnabled !== this._isEnabled) {
9315
+ this._isEnabled = isEnabled;
9316
+ this._listenTriggers();
9317
+ }
9318
+ }
9319
+ fZoomTriggers = [
9320
+ { event: EFTriggerEvent.WHEEL, action: EFZoomAction.WHEEL },
9321
+ { event: EFTriggerEvent.DOUBLE_CLICK, action: EFZoomAction.DOUBLE_CLICK }
9322
+ ];
9323
+ minimum = 0.1;
9324
+ maximum = 4;
9325
+ step = 0.1;
9326
+ dblClickStep = 0.5;
9327
+ get _fHost() {
9328
+ return this._fMediator.execute(new GetFlowHostElementRequest());
9096
9329
  }
9097
9330
  get _fCanvas() {
9098
- return this._fMediator.send(new GetCanvasRequest());
9331
+ return this._fMediator.execute(new GetCanvasRequest());
9099
9332
  }
9100
- get _isDragStarted() {
9101
- return this._fMediator.send(new IsDragStartedRequest());
9333
+ ngOnInit() {
9334
+ this._fMediator.execute(new AddZoomToStoreRequest(this));
9102
9335
  }
9103
- toggleZoom() {
9104
- if (this.isEnabled) {
9105
- this._subscribe();
9106
- }
9107
- else {
9108
- this.dispose();
9336
+ ngAfterViewInit() {
9337
+ this._listenTriggers();
9338
+ }
9339
+ ngOnChanges(changes) {
9340
+ if (changes['fZoomTriggers']) {
9341
+ this._listenTriggers();
9109
9342
  }
9110
9343
  }
9111
- _subscribe() {
9112
- this._listeners();
9113
- if (!this._fFlowHostElement) {
9344
+ _listenTriggers() {
9345
+ if (!this._fHost) {
9114
9346
  return;
9115
9347
  }
9116
- this._fFlowHostElement.addEventListener('wheel', this._onWheel);
9117
- this._fFlowHostElement.addEventListener('dblclick', this._onDoubleClick);
9118
- this._listeners = () => {
9119
- this._fFlowHostElement.removeEventListener('wheel', this._onWheel);
9120
- this._fFlowHostElement.removeEventListener('dblclick', this._onDoubleClick);
9121
- };
9348
+ this._disposeListeners();
9349
+ this._validateTriggers();
9350
+ this.fZoomTriggers.forEach((x) => {
9351
+ this._triggersListener.push(this._rendered.listen(this._fHost, x.event, this._getAction(x)));
9352
+ });
9122
9353
  }
9123
- getScale() {
9124
- return this._fCanvas.transform.scale || 1;
9354
+ _validateTriggers() {
9355
+ const SUPPORTED_EVENTS = Object.values(EFTriggerEvent);
9356
+ const SUPPORTED_ACTIONS = Object.values(EFZoomAction);
9357
+ this.fZoomTriggers.forEach((trigger) => {
9358
+ if (!SUPPORTED_EVENTS.includes(trigger.event)) {
9359
+ throw new Error(`Unsupported event: ${trigger.event}`);
9360
+ }
9361
+ if (!SUPPORTED_ACTIONS.includes(trigger.action)) {
9362
+ throw new Error(`Unsupported action: ${trigger.action}`);
9363
+ }
9364
+ });
9365
+ }
9366
+ _getAction(trigger) {
9367
+ switch (trigger.action) {
9368
+ case EFZoomAction.WHEEL:
9369
+ return (event) => this._onWheel(event, trigger);
9370
+ case EFZoomAction.DOUBLE_CLICK:
9371
+ return (event) => this._onDoubleClick(event, trigger);
9372
+ default:
9373
+ throw new Error(`Unknown action: ${trigger.action}`);
9374
+ }
9125
9375
  }
9126
- _onWheel = (event) => {
9376
+ _onWheel = (event, trigger) => {
9377
+ if (trigger.validator && !trigger.validator(event)) {
9378
+ return;
9379
+ }
9127
9380
  event.preventDefault();
9128
9381
  const targetElement = event.target;
9129
- if (this._isDragStarted || targetElement?.closest('[fLockedContext]')) {
9382
+ if (targetElement?.closest('[fLockedContext]')) {
9130
9383
  return;
9131
9384
  }
9132
- let result = this.getScale();
9133
- const direction = event.deltaY > 0 ? -1 : 1;
9134
- const step = this.step;
9135
- result = result + step * direction;
9136
- result = Math.max(this.minimum, Math.min(result, this.maximum));
9137
- const pointerPositionInFlow = new Point(event.clientX, event.clientY).elementTransform(this._fFlowHostElement);
9138
- this._fCanvas.setZoom(result, pointerPositionInFlow);
9139
- this._fCanvas.redraw();
9140
- this._fCanvas.emitCanvasChangeEvent();
9385
+ this.setZoom(PointExtensions.initialize(event.clientX, event.clientY), this.step, this._calculateDirection(event.deltaY), false);
9141
9386
  };
9142
- _onDoubleClick = (event) => {
9387
+ _calculateDirection(deltaY) {
9388
+ return deltaY > 0 ? EFZoomDirection.ZOOM_OUT : EFZoomDirection.ZOOM_IN;
9389
+ }
9390
+ _onDoubleClick = (event, trigger) => {
9391
+ if (trigger.validator && !trigger.validator(event)) {
9392
+ return;
9393
+ }
9143
9394
  event.preventDefault();
9144
9395
  const targetElement = event.target;
9145
- if (this._isDragStarted || isNode(targetElement) || targetElement?.closest('[fLockedContext]')) {
9396
+ if (isNode(targetElement) || targetElement?.closest('[fLockedContext]')) {
9146
9397
  return;
9147
9398
  }
9148
- let result = this.getScale();
9149
- const direction = 1;
9150
- const step = this.dblClickStep;
9151
- result = result + step * direction;
9152
- result = Math.max(this.minimum, Math.min(result, this.maximum));
9153
- const pointerPositionInFlow = new Point(event.clientX, event.clientY).elementTransform(this._fFlowHostElement);
9154
- this._fCanvas.setZoom(result, pointerPositionInFlow);
9155
- this._fCanvas.redrawWithAnimation();
9156
- this._fCanvas.emitCanvasChangeEvent();
9399
+ this.setZoom(PointExtensions.initialize(event.clientX, event.clientY), this.dblClickStep, EFZoomDirection.ZOOM_IN, true);
9157
9400
  };
9158
- _onZoomToCenter(deltaY, position) {
9159
- const preventDefault = () => {
9160
- };
9161
- const rect = RectExtensions.fromElement(this._fFlowHostElement);
9162
- this._onWheel({
9163
- deltaY, preventDefault, clientX: position?.x || rect.gravityCenter.x, clientY: position?.y || rect.gravityCenter.y
9164
- });
9401
+ _getToCenterPosition(position, rect) {
9402
+ return PointExtensions.initialize(position?.x || rect.gravityCenter.x, position?.y || rect.gravityCenter.y);
9165
9403
  }
9166
9404
  zoomIn(position) {
9167
- this._onZoomToCenter(-1, position);
9405
+ this._onZoomToCenter(EFZoomDirection.ZOOM_IN, position);
9168
9406
  }
9169
9407
  zoomOut(position) {
9170
- this._onZoomToCenter(1, position);
9408
+ this._onZoomToCenter(EFZoomDirection.ZOOM_OUT, position);
9171
9409
  }
9172
- reset() {
9173
- this._fCanvas.resetZoom();
9174
- this._fCanvas.redraw();
9175
- this._fCanvas.emitCanvasChangeEvent();
9410
+ _onZoomToCenter(direction, position) {
9411
+ this.setZoom(this._getToCenterPosition(position, RectExtensions.fromElement(this._fHost)), this.step, direction, false);
9176
9412
  }
9177
- dispose() {
9178
- this._listeners();
9179
- this._listeners = EventExtensions.emptyListener();
9413
+ setZoom(position, step, direction, animated) {
9414
+ this._fMediator.execute(new SetZoomRequest(position, step, direction, animated));
9180
9415
  }
9181
- }
9182
-
9183
- class FZoomDirective extends FZoomBase {
9184
- get fFlowZoom() {
9185
- return this.isEnabled;
9416
+ /**
9417
+ * @deprecated Method "getScale" is deprecated. Use "getZoomValue" instead. This method will be removed in version 18.0.0.`,
9418
+ */
9419
+ getScale() {
9420
+ return this.getZoomValue();
9186
9421
  }
9187
- set fFlowZoom(isEnabled) {
9188
- const value = castToBoolean(isEnabled);
9189
- if (value !== this.isEnabled) {
9190
- this.isEnabled = value;
9191
- this.toggleZoom();
9192
- }
9422
+ getZoomValue() {
9423
+ return this._fCanvas.transform.scale || 1;
9193
9424
  }
9194
- minimum = 0.1;
9195
- maximum = 4;
9196
- step = 0.1;
9197
- dblClickStep = 0.5;
9198
- ngAfterViewInit() {
9199
- super.toggleZoom();
9425
+ reset() {
9426
+ this._fMediator.execute(new ResetZoomRequest());
9427
+ }
9428
+ _disposeListeners() {
9429
+ this._triggersListener.forEach((listener) => listener());
9430
+ this._triggersListener = [];
9200
9431
  }
9201
9432
  ngOnDestroy() {
9202
- super.dispose();
9433
+ this._disposeListeners();
9434
+ this._fMediator.execute(new RemoveZoomFromStoreRequest());
9203
9435
  }
9204
9436
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FZoomDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
9205
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: FZoomDirective, selector: "f-canvas[fZoom]", inputs: { fFlowZoom: ["fZoom", "fFlowZoom"], minimum: ["fZoomMinimum", "minimum"], maximum: ["fZoomMaximum", "maximum"], step: ["fZoomStep", "step"], dblClickStep: ["fZoomDblClickStep", "dblClickStep"] }, host: { classAttribute: "f-zoom f-component" }, providers: [{ provide: F_ZOOM, useExisting: FZoomDirective }], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0 });
9437
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: FZoomDirective, selector: "f-canvas[fZoom]", inputs: { fZoom: ["fZoom", "fZoom", booleanAttribute], fZoomTriggers: "fZoomTriggers", minimum: ["fZoomMinimum", "minimum", numberAttribute], maximum: ["fZoomMaximum", "maximum", numberAttribute], step: ["fZoomStep", "step", numberAttribute], dblClickStep: ["fZoomDblClickStep", "dblClickStep", numberAttribute] }, host: { classAttribute: "f-zoom f-component" }, providers: [{ provide: F_ZOOM, useExisting: FZoomDirective }], exportAs: ["fComponent"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
9206
9438
  }
9439
+ __decorate([
9440
+ Deprecated('getZoomValue')
9441
+ ], FZoomDirective.prototype, "getScale", null);
9207
9442
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FZoomDirective, decorators: [{
9208
9443
  type: Directive,
9209
9444
  args: [{
@@ -9214,22 +9449,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
9214
9449
  },
9215
9450
  providers: [{ provide: F_ZOOM, useExisting: FZoomDirective }],
9216
9451
  }]
9217
- }], propDecorators: { fFlowZoom: [{
9452
+ }], propDecorators: { fZoom: [{
9218
9453
  type: Input,
9219
- args: ['fZoom']
9454
+ args: [{ alias: 'fZoom', transform: booleanAttribute }]
9455
+ }], fZoomTriggers: [{
9456
+ type: Input
9220
9457
  }], minimum: [{
9221
9458
  type: Input,
9222
- args: ['fZoomMinimum']
9459
+ args: [{ alias: 'fZoomMinimum', transform: numberAttribute }]
9223
9460
  }], maximum: [{
9224
9461
  type: Input,
9225
- args: ['fZoomMaximum']
9462
+ args: [{ alias: 'fZoomMaximum', transform: numberAttribute }]
9226
9463
  }], step: [{
9227
9464
  type: Input,
9228
- args: ['fZoomStep']
9465
+ args: [{ alias: 'fZoomStep', transform: numberAttribute }]
9229
9466
  }], dblClickStep: [{
9230
9467
  type: Input,
9231
- args: ['fZoomDblClickStep']
9232
- }] } });
9468
+ args: [{ alias: 'fZoomDblClickStep', transform: numberAttribute }]
9469
+ }], getScale: [] } });
9233
9470
 
9234
9471
  const F_ZOOM_PROVIDERS = [
9235
9472
  FZoomDirective
@@ -9281,5 +9518,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
9281
9518
  * Generated bundle index. Do not edit.
9282
9519
  */
9283
9520
 
9284
- export { AddBackgroundToStoreExecution, AddBackgroundToStoreRequest, AddCanvasToStoreExecution, AddCanvasToStoreRequest, AddConnectionForCreateToStoreExecution, AddConnectionForCreateToStoreRequest, AddConnectionMarkerToStoreExecution, AddConnectionMarkerToStoreRequest, AddConnectionToStoreExecution, AddConnectionToStoreRequest, AddDndToStoreExecution, AddDndToStoreRequest, AddFlowToStoreExecution, AddFlowToStoreRequest, AddInputToStoreExecution, AddInputToStoreRequest, AddLineAlignmentToStoreExecution, AddLineAlignmentToStoreRequest, AddNodeToStoreExecution, AddNodeToStoreRequest, AddOutletToStoreExecution, AddOutletToStoreRequest, AddOutputToStoreExecution, AddOutputToStoreRequest, AddPatternToBackgroundExecution, AddPatternToBackgroundRequest, AddSnapConnectionToStoreExecution, AddSnapConnectionToStoreRequest, ApplyChildResizeRestrictionsExecution, ApplyChildResizeRestrictionsRequest, ApplyParentResizeRestrictionsExecution, ApplyParentResizeRestrictionsRequest, CANVAS_MOVE_FINALIZE_PROVIDERS, CANVAS_MOVE_PREPARATION_PROVIDERS, CANVAS_PROVIDERS, COMMON_PROVIDERS, CONNECTIONS_PROVIDERS, CONNECTION_GRADIENT, CONNECTION_PATH, CONNECTION_TEXT, CREATE_MOVE_NODE_DRAG_MODEL_FROM_SELECTION_PROVIDERS, CalculateCenterBetweenPointsHandler, CalculateCenterBetweenPointsRequest, CalculateChangedPositionExecution, CalculateChangedPositionRequest, CalculateChangedSizeExecution, CalculateChangedSizeRequest, CalculateCommonNodeMoveRestrictionsExecution, CalculateCommonNodeMoveRestrictionsRequest, CalculateConnectionCenterHandler, CalculateConnectionCenterRequest, CalculateConnectionLineByBehaviorExecution, CalculateConnectionLineByBehaviorRequest, CalculateConnectorConnectableSideHandler, CalculateConnectorConnectableSideRequest, CalculateFlowPointFromMinimapPointExecution, CalculateFlowPointFromMinimapPointRequest, CalculateNodeMoveRestrictionsExecution, CalculateNodeMoveRestrictionsRequest, CalculateNodesBoundingBoxExecution, CalculateNodesBoundingBoxNormalizedPositionExecution, CalculateNodesBoundingBoxNormalizedPositionRequest, CalculateNodesBoundingBoxRequest, CanvasDragHandler, CanvasMoveFinalizeExecution, CanvasMoveFinalizeRequest, CanvasMovePreparationExecution, CanvasMovePreparationRequest, CanvasMovePreparationValidator, CenterGroupOrNodeExecution, CenterGroupOrNodeRequest, ClearSelectionExecution, ClearSelectionRequest, ConnectionBaseDragHandler, ConnectionDragHandler, ConnectionSourceDragHandler, ConnectionTargetDragHandler, CreateConnectionDragHandler, CreateConnectionDragHandlerExecution, CreateConnectionDragHandlerRequest, CreateConnectionFinalizeExecution, CreateConnectionFinalizeRequest, CreateConnectionFromOutletPreparationExecution, CreateConnectionFromOutletPreparationRequest, CreateConnectionFromOutputPreparationExecution, CreateConnectionFromOutputPreparationRequest, CreateConnectionFromOutputPreparationValidator, CreateConnectionMarkersExecution, CreateConnectionMarkersRequest, CreateConnectionPreparationExecution, CreateConnectionPreparationRequest, CreateMoveNodesDragModelFromSelectionExecution, CreateMoveNodesDragModelFromSelectionRequest, DRAG_AND_DROP_COMMON_PROVIDERS, EFConnectableSide, EFConnectionBehavior, EFConnectionType, EFMarkerType, EFResizeHandleType, EXTERNAL_ITEM_FINALIZE_PROVIDERS, EXTERNAL_ITEM_PREPARATION_PROVIDERS, EmitSelectionChangeEventExecution, EmitSelectionChangeEventRequest, EndDragSequenceExecution, EndDragSequenceRequest, ExternalItemDragHandler, ExternalItemFinalizeExecution, ExternalItemFinalizeRequest, ExternalItemPreparationExecution, ExternalItemPreparationRequest, ExternalItemPreparationValidator, FBackgroundBase, FBackgroundComponent, FBezierPathBuilder, FCanvasBase, FCanvasChangeEvent, FCanvasComponent, FChannel, FChannelHub, FCirclePatternComponent, FComponentsStore, FConnectionBase, FConnectionCenterDirective, FConnectionComponent, FConnectionDragHandleComponent, FConnectionFactory, FConnectionForCreateComponent, FConnectionGradientComponent, FConnectionPathComponent, FConnectionSelectionComponent, FConnectionTextComponent, FConnectionTextPathDirective, FConnectorBase, FCreateConnectionEvent, FCreateNodeEvent, FDragHandleDirective, FDraggableBase, FDraggableDataContext, FDraggableDirective, FDropToGroupEvent, FExternalItemBase, FExternalItemDirective, FExternalItemService, FFlowBase, FFlowComponent, FFlowModule, FGroupDirective, FLineAlignmentBase, FLineAlignmentComponent, FMarkerBase, FMarkerDirective, FMinimapCanvasDirective, FMinimapComponent, FMinimapData, FMinimapDragHandler, FMinimapFlowDirective, FMinimapViewDirective, FNodeBase, FNodeDirective, FNodeInputBase, FNodeInputDirective, FNodeIntersectedWithConnections, FNodeOutletBase, FNodeOutletDirective, FNodeOutputBase, FNodeOutputDirective, FReassignConnectionEvent, FRectPatternComponent, FResizeChannel, FResizeHandleDirective, FRotateHandleDirective, FSegmentPathBuilder, FSelectionAreaBase, FSelectionAreaComponent, FSelectionChangeEvent, FSnapConnectionComponent, FStraightPathBuilder, FZoomBase, FZoomDirective, F_BACKGROUND, F_BACKGROUND_FEATURES, F_BACKGROUND_PATTERN, F_BACKGROUND_PROVIDERS, F_CANVAS, F_CANVAS_FEATURES, F_CANVAS_PROVIDERS, F_CONNECTION_BUILDERS, F_CONNECTION_DRAG_HANDLE_CLASS, F_CONNECTION_FEATURES, F_CONNECTION_IDENTIFIERS, F_CONNECTION_PROVIDERS, F_CONNECTORS_FEATURES, F_CONNECTORS_PROVIDERS, F_DRAGGABLE_FEATURES, F_DRAGGABLE_PROVIDERS, F_DRAG_AND_DROP_PLUGIN, F_DRAG_HANDLE, F_EXTERNAL_ITEM, F_EXTERNAL_ITEM_DRAG_AND_DROP_PROVIDERS, F_EXTERNAL_ITEM_PROVIDERS, F_FLOW, F_FLOW_FEATURES, F_FLOW_PROVIDERS, F_LINE_ALIGNMENT, F_LINE_ALIGNMENT_FEATURES, F_LINE_ALIGNMENT_PROVIDERS, F_MARKER, F_MINIMAP_DRAG_AND_DROP_PROVIDERS, F_MINIMAP_PROVIDERS, F_NODE, F_NODE_FEATURES, F_NODE_INPUT, F_NODE_OUTLET, F_NODE_OUTPUT, F_NODE_PROVIDERS, F_RESIZE_HANDLE, F_SELECTED_CLASS, F_SELECTION_AREA_DRAG_AND_DROP_PROVIDERS, F_SELECTION_AREA_PROVIDERS, F_SELECTION_FEATURES, F_STORAGE_PROVIDERS, F_ZOOM, F_ZOOM_PROVIDERS, FindClosestInputExecution, FindClosestInputRequest, FitToFlowExecution, FitToFlowRequest, GET_FLOW_STATE_PROVIDERS, GetAllCanBeConnectedInputPositionsExecution, GetAllCanBeConnectedInputPositionsRequest, GetCanBeConnectedOutputByOutletExecution, GetCanBeConnectedOutputByOutletRequest, GetCanBeConnectedOutputByOutletValidator, GetCanBeSelectedItemsExecution, GetCanBeSelectedItemsRequest, GetCanvasExecution, GetCanvasRequest, GetConnectorWithRectExecution, GetConnectorWithRectRequest, GetCurrentSelectionExecution, GetCurrentSelectionRequest, GetDeepChildrenNodesAndGroupsExecution, GetDeepChildrenNodesAndGroupsRequest, GetElementRoundedRectExecution, GetElementRoundedRectRequest, GetFlowExecution, GetFlowHostElementExecution, GetFlowHostElementRequest, GetFlowRequest, GetFlowStateConnectionsExecution, GetFlowStateConnectionsRequest, GetFlowStateExecution, GetFlowStateNodesExecution, GetFlowStateNodesRequest, GetFlowStateRequest, GetInputUnderPointerExecution, GetInputUnderPointerRequest, GetInputUnderPointerValidator, GetNodePaddingExecution, GetNodePaddingRequest, GetNodeResizeRestrictionsExecution, GetNodeResizeRestrictionsRequest, GetNodesExecution, GetNodesRequest, GetNormalizedChildrenNodesRectExecution, GetNormalizedChildrenNodesRectRequest, GetNormalizedElementRectExecution, GetNormalizedElementRectRequest, GetNormalizedParentNodeRectExecution, GetNormalizedParentNodeRectRequest, GetNormalizedPointExecution, GetNormalizedPointRequest, GetParentNodesExecution, GetParentNodesRequest, InitializeDragSequenceExecution, InitializeDragSequenceRequest, InputCanvasPositionExecution, InputCanvasPositionRequest, InputCanvasScaleExecution, InputCanvasScaleRequest, IsArrayHasParentNodeExecution, IsArrayHasParentNodeRequest, IsConnectionUnderNodeExecution, IsConnectionUnderNodeRequest, IsDragStartedExecution, IsDragStartedRequest, LineAlignmentDragHandler, LineAlignmentPreparationExecution, LineAlignmentPreparationRequest, LineElement, LineService, ListenCountChangesExecution, ListenCountChangesRequest, ListenDataChangesExecution, ListenDataChangesRequest, ListenTransformChangesExecution, ListenTransformChangesRequest, LogExecutionTime, MINIMAP_DRAG_FINALIZE_PROVIDERS, MINIMAP_DRAG_PREPARATION_PROVIDERS, MinimapCalculateSvgScaleAndViewBoxExecution, MinimapCalculateSvgScaleAndViewBoxRequest, MinimapCalculateViewBoxExecution, MinimapCalculateViewBoxRequest, MinimapDragFinalizeExecution, MinimapDragFinalizeRequest, MinimapDragFinalizeValidator, MinimapDragPreparationExecution, MinimapDragPreparationRequest, MinimapDragPreparationValidator, MinimapDrawNodesExecution, MinimapDrawNodesRequest, MoveFrontElementsBeforeTargetElementExecution, MoveFrontElementsBeforeTargetElementRequest, NODE_DRAG_TO_PARENT_FINALIZE_PROVIDERS, NODE_DRAG_TO_PARENT_PREPARATION_PROVIDERS, NODE_MOVE_PREPARATION_PROVIDERS, NODE_PROVIDERS, NODE_RESIZE_FINALIZE_PROVIDERS, NODE_RESIZE_PREPARATION_PROVIDERS, NODE_RESIZE_PROVIDERS, NodeDragHandler, NodeDragToParentDragHandler, NodeDragToParentFinalizeExecution, NodeDragToParentFinalizeRequest, NodeDragToParentPreparationExecution, NodeDragToParentPreparationRequest, NodeDragToParentPreparationValidator, NodeMoveFinalizeExecution, NodeMoveFinalizeRequest, NodeMovePreparationExecution, NodeMovePreparationRequest, NodeResizeByChildDragHandler, NodeResizeDragHandler, NodeResizeFinalizeExecution, NodeResizeFinalizeRequest, NodeResizePreparationExecution, NodeResizePreparationRequest, NodeResizePreparationValidator, NotifyDataChangedExecution, NotifyDataChangedRequest, NotifyTransformChangedExecution, NotifyTransformChangedRequest, OnPointerMoveExecution, OnPointerMoveRequest, PrepareDragSequenceExecution, PrepareDragSequenceRequest, PreventDefaultIsExternalItemExecution, PreventDefaultIsExternalItemRequest, PutInputConnectionHandlersToArrayExecution, PutInputConnectionHandlersToArrayRequest, PutOutputConnectionHandlersToArrayExecution, PutOutputConnectionHandlersToArrayRequest, RESIZE_DIRECTIONS, ReassignConnectionDragHandler, ReassignConnectionFinalizeExecution, ReassignConnectionFinalizeRequest, ReassignConnectionPreparationExecution, ReassignConnectionPreparationRequest, RedrawCanvasWithAnimationExecution, RedrawCanvasWithAnimationRequest, RedrawConnectionsExecution, RedrawConnectionsRequest, RemoveBackgroundFromStoreExecution, RemoveBackgroundFromStoreRequest, RemoveCanvasFromStoreExecution, RemoveCanvasFromStoreRequest, RemoveConnectionForCreateFromStoreExecution, RemoveConnectionForCreateFromStoreRequest, RemoveConnectionFromStoreExecution, RemoveConnectionFromStoreRequest, RemoveConnectionMarkerFromStoreExecution, RemoveConnectionMarkerFromStoreRequest, RemoveDndFromStoreExecution, RemoveDndFromStoreRequest, RemoveFlowFromStoreExecution, RemoveFlowFromStoreRequest, RemoveInputFromStoreExecution, RemoveInputFromStoreRequest, RemoveLineAlignmentFromStoreExecution, RemoveLineAlignmentFromStoreRequest, RemoveNodeFromStoreExecution, RemoveNodeFromStoreRequest, RemoveOutletFromStoreExecution, RemoveOutletFromStoreRequest, RemoveOutputFromStoreExecution, RemoveOutputFromStoreRequest, RemoveSnapConnectionFromStoreExecution, RemoveSnapConnectionFromStoreRequest, ResetScaleAndCenterExecution, ResetScaleAndCenterRequest, ResetScaleExecution, ResetScaleRequest, SELECTION_AREA_FINALIZE_PROVIDERS, SELECTION_AREA_PREPARATION_PROVIDERS, SINGLE_SELECT_PROVIDERS, SelectAllExecution, SelectAllRequest, SelectAndUpdateNodeLayerExecution, SelectAndUpdateNodeLayerRequest, SelectExecution, SelectRequest, SelectionAreaDragHandle, SelectionAreaFinalizeExecution, SelectionAreaFinalizeRequest, SelectionAreaFinalizeValidator, SelectionAreaPreparationExecution, SelectionAreaPreparationRequest, SelectionAreaPreparationValidator, SetBackgroundTransformExecution, SetBackgroundTransformRequest, SingleSelectExecution, SingleSelectRequest, SortItemLayersExecution, SortItemLayersRequest, SortItemsByParentExecution, SortItemsByParentRequest, SortNodeLayersExecution, SortNodeLayersRequest, StartDragSequenceExecution, StartDragSequenceRequest, UpdateItemAndChildrenLayersExecution, UpdateItemAndChildrenLayersRequest, UpdateNodeWhenStateOrSizeChangedExecution, UpdateNodeWhenStateOrSizeChangedRequest, UpdateScaleExecution, UpdateScaleRequest, createSVGElement, debounceTime, fixedCenterBehavior, fixedOutboundBehavior, floatingBehavior, getExternalItem, getMarkerEndId, getMarkerSelectedEndId, getMarkerSelectedStartId, getMarkerStartId, isExternalItem, isMobile, isNode, isNodeOutlet, isNodeOutput, mixinChangeSelection, mixinChangeVisibility, notifyOnStart, transitionEnd };
9521
+ export { AddBackgroundToStoreExecution, AddBackgroundToStoreRequest, AddCanvasToStoreExecution, AddCanvasToStoreRequest, AddConnectionForCreateToStoreExecution, AddConnectionForCreateToStoreRequest, AddConnectionMarkerToStoreExecution, AddConnectionMarkerToStoreRequest, AddConnectionToStoreExecution, AddConnectionToStoreRequest, AddDndToStoreExecution, AddDndToStoreRequest, AddFlowToStoreExecution, AddFlowToStoreRequest, AddInputToStoreExecution, AddInputToStoreRequest, AddLineAlignmentToStoreExecution, AddLineAlignmentToStoreRequest, AddNodeToStoreExecution, AddNodeToStoreRequest, AddOutletToStoreExecution, AddOutletToStoreRequest, AddOutputToStoreExecution, AddOutputToStoreRequest, AddPatternToBackgroundExecution, AddPatternToBackgroundRequest, AddSnapConnectionToStoreExecution, AddSnapConnectionToStoreRequest, AddZoomToStoreExecution, AddZoomToStoreRequest, ApplyChildResizeRestrictionsExecution, ApplyChildResizeRestrictionsRequest, ApplyParentResizeRestrictionsExecution, ApplyParentResizeRestrictionsRequest, CANVAS_PROVIDERS, COMMON_PROVIDERS, CONNECTIONS_PROVIDERS, CONNECTION_GRADIENT, CONNECTION_PATH, CONNECTION_TEXT, CREATE_MOVE_NODE_DRAG_MODEL_FROM_SELECTION_PROVIDERS, CalculateCenterBetweenPointsHandler, CalculateCenterBetweenPointsRequest, CalculateChangedPositionExecution, CalculateChangedPositionRequest, CalculateChangedSizeExecution, CalculateChangedSizeRequest, CalculateClosestInputExecution, CalculateClosestInputRequest, CalculateCommonNodeMoveRestrictionsExecution, CalculateCommonNodeMoveRestrictionsRequest, CalculateConnectionCenterHandler, CalculateConnectionCenterRequest, CalculateConnectionLineByBehaviorExecution, CalculateConnectionLineByBehaviorRequest, CalculateFlowPointFromMinimapPointExecution, CalculateFlowPointFromMinimapPointRequest, CalculateNodeMoveRestrictionsExecution, CalculateNodeMoveRestrictionsRequest, CalculateNodesBoundingBoxExecution, CalculateNodesBoundingBoxNormalizedPositionExecution, CalculateNodesBoundingBoxNormalizedPositionRequest, CalculateNodesBoundingBoxRequest, CanvasDragHandler, CanvasMoveFinalizeExecution, CanvasMoveFinalizeRequest, CanvasMovePreparationExecution, CanvasMovePreparationRequest, CenterGroupOrNodeExecution, CenterGroupOrNodeRequest, ClearSelectionExecution, ClearSelectionRequest, ConnectionBaseDragHandler, ConnectionDragHandler, ConnectionSourceDragHandler, ConnectionTargetDragHandler, CreateConnectionDragHandler, CreateConnectionDragHandlerExecution, CreateConnectionDragHandlerRequest, CreateConnectionFinalizeExecution, CreateConnectionFinalizeRequest, CreateConnectionFromOutletPreparationExecution, CreateConnectionFromOutletPreparationRequest, CreateConnectionFromOutputPreparationExecution, CreateConnectionFromOutputPreparationRequest, CreateConnectionFromOutputPreparationValidator, CreateConnectionMarkersExecution, CreateConnectionMarkersRequest, CreateConnectionPreparationExecution, CreateConnectionPreparationRequest, CreateMoveNodesDragModelFromSelectionExecution, CreateMoveNodesDragModelFromSelectionRequest, DRAG_AND_DROP_COMMON_PROVIDERS, Deprecated, EFConnectableSide, EFConnectionBehavior, EFConnectionType, EFMarkerType, EFResizeHandleType, EFTriggerEvent, EFZoomAction, EFZoomDirection, EXTERNAL_ITEM_FINALIZE_PROVIDERS, EXTERNAL_ITEM_PREPARATION_PROVIDERS, EmitSelectionChangeEventExecution, EmitSelectionChangeEventRequest, EndDragSequenceExecution, EndDragSequenceRequest, ExternalItemDragHandler, ExternalItemFinalizeExecution, ExternalItemFinalizeRequest, ExternalItemPreparationExecution, ExternalItemPreparationRequest, ExternalItemPreparationValidator, FBackgroundBase, FBackgroundComponent, FBezierPathBuilder, FCanvasBase, FCanvasChangeEvent, FCanvasComponent, FChannel, FChannelHub, FCirclePatternComponent, FComponentsStore, FConnectionBase, FConnectionCenterDirective, FConnectionComponent, FConnectionDragHandleComponent, FConnectionFactory, FConnectionForCreateComponent, FConnectionGradientComponent, FConnectionPathComponent, FConnectionSelectionComponent, FConnectionTextComponent, FConnectionTextPathDirective, FConnectorBase, FCreateConnectionEvent, FCreateNodeEvent, FDragHandleDirective, FDraggableBase, FDraggableDataContext, FDraggableDirective, FDropToGroupEvent, FExternalItemBase, FExternalItemDirective, FExternalItemService, FFlowBase, FFlowComponent, FFlowModule, FGroupDirective, FLineAlignmentBase, FLineAlignmentComponent, FMarkerBase, FMarkerDirective, FMinimapCanvasDirective, FMinimapComponent, FMinimapData, FMinimapDragHandler, FMinimapFlowDirective, FMinimapViewDirective, FNodeBase, FNodeDirective, FNodeInputBase, FNodeInputDirective, FNodeIntersectedWithConnections, FNodeOutletBase, FNodeOutletDirective, FNodeOutputBase, FNodeOutputDirective, FReassignConnectionEvent, FRectPatternComponent, FResizeChannel, FResizeHandleDirective, FRotateHandleDirective, FSegmentPathBuilder, FSelectionAreaBase, FSelectionAreaComponent, FSelectionChangeEvent, FSnapConnectionComponent, FStraightPathBuilder, FZoomBase, FZoomDirective, F_BACKGROUND, F_BACKGROUND_FEATURES, F_BACKGROUND_PATTERN, F_BACKGROUND_PROVIDERS, F_CANVAS, F_CANVAS_FEATURES, F_CANVAS_PROVIDERS, F_CONNECTION_BUILDERS, F_CONNECTION_DRAG_HANDLE_CLASS, F_CONNECTION_FEATURES, F_CONNECTION_IDENTIFIERS, F_CONNECTION_PROVIDERS, F_CONNECTORS_FEATURES, F_CONNECTORS_PROVIDERS, F_CSS_CLASS, F_DRAGGABLE_FEATURES, F_DRAGGABLE_PROVIDERS, F_DRAG_AND_DROP_PLUGIN, F_DRAG_HANDLE, F_EXTERNAL_ITEM, F_EXTERNAL_ITEM_DRAG_AND_DROP_PROVIDERS, F_EXTERNAL_ITEM_PROVIDERS, F_FLOW, F_FLOW_FEATURES, F_FLOW_PROVIDERS, F_LINE_ALIGNMENT, F_LINE_ALIGNMENT_FEATURES, F_LINE_ALIGNMENT_PROVIDERS, F_MARKER, F_MINIMAP_DRAG_AND_DROP_PROVIDERS, F_MINIMAP_PROVIDERS, F_NODE, F_NODE_FEATURES, F_NODE_INPUT, F_NODE_OUTLET, F_NODE_OUTPUT, F_NODE_PROVIDERS, F_RESIZE_HANDLE, F_SELECTED_CLASS, F_SELECTION_AREA_DRAG_AND_DROP_PROVIDERS, F_SELECTION_AREA_PROVIDERS, F_SELECTION_FEATURES, F_STORAGE_PROVIDERS, F_ZOOM, F_ZOOM_FEATURES, F_ZOOM_PROVIDERS, F_ZOOM_TAG, FindInputAtPositionExecution, FindInputAtPositionRequest, FitToFlowExecution, FitToFlowRequest, GET_FLOW_STATE_PROVIDERS, GetAllCanBeConnectedInputsAndRectsExecution, GetAllCanBeConnectedInputsAndRectsRequest, GetCanBeConnectedOutputByOutletExecution, GetCanBeConnectedOutputByOutletRequest, GetCanBeConnectedOutputByOutletValidator, GetCanBeSelectedItemsExecution, GetCanBeSelectedItemsRequest, GetCanvasExecution, GetCanvasRequest, GetConnectorAndRectExecution, GetConnectorAndRectRequest, GetCurrentSelectionExecution, GetCurrentSelectionRequest, GetDeepChildrenNodesAndGroupsExecution, GetDeepChildrenNodesAndGroupsRequest, GetElementRoundedRectExecution, GetElementRoundedRectRequest, GetFlowExecution, GetFlowHostElementExecution, GetFlowHostElementRequest, GetFlowRequest, GetFlowStateConnectionsExecution, GetFlowStateConnectionsRequest, GetFlowStateExecution, GetFlowStateNodesExecution, GetFlowStateNodesRequest, GetFlowStateRequest, GetNodePaddingExecution, GetNodePaddingRequest, GetNodeResizeRestrictionsExecution, GetNodeResizeRestrictionsRequest, GetNodesExecution, GetNodesRequest, GetNormalizedChildrenNodesRectExecution, GetNormalizedChildrenNodesRectRequest, GetNormalizedElementRectExecution, GetNormalizedElementRectRequest, GetNormalizedParentNodeRectExecution, GetNormalizedParentNodeRectRequest, GetNormalizedPointExecution, GetNormalizedPointRequest, GetParentNodesExecution, GetParentNodesRequest, InitializeDragSequenceExecution, InitializeDragSequenceRequest, InputCanvasPositionExecution, InputCanvasPositionRequest, InputCanvasScaleExecution, InputCanvasScaleRequest, IsArrayHasParentNodeExecution, IsArrayHasParentNodeRequest, IsConnectionUnderNodeExecution, IsConnectionUnderNodeRequest, IsDragStartedExecution, IsDragStartedRequest, LineAlignmentDragHandler, LineAlignmentPreparationExecution, LineAlignmentPreparationRequest, LineElement, LineService, ListenCountChangesExecution, ListenCountChangesRequest, ListenDataChangesExecution, ListenDataChangesRequest, ListenTransformChangesExecution, ListenTransformChangesRequest, LogExecutionTime, MINIMAP_DRAG_FINALIZE_PROVIDERS, MINIMAP_DRAG_PREPARATION_PROVIDERS, MarkAllCanBeConnectedInputsExecution, MarkAllCanBeConnectedInputsRequest, MinimapCalculateSvgScaleAndViewBoxExecution, MinimapCalculateSvgScaleAndViewBoxRequest, MinimapCalculateViewBoxExecution, MinimapCalculateViewBoxRequest, MinimapDragFinalizeExecution, MinimapDragFinalizeRequest, MinimapDragFinalizeValidator, MinimapDragPreparationExecution, MinimapDragPreparationRequest, MinimapDragPreparationValidator, MinimapDrawNodesExecution, MinimapDrawNodesRequest, MoveFrontElementsBeforeTargetElementExecution, MoveFrontElementsBeforeTargetElementRequest, NODE_DRAG_TO_PARENT_FINALIZE_PROVIDERS, NODE_DRAG_TO_PARENT_PREPARATION_PROVIDERS, NODE_MOVE_PREPARATION_PROVIDERS, NODE_PROVIDERS, NODE_RESIZE_FINALIZE_PROVIDERS, NODE_RESIZE_PREPARATION_PROVIDERS, NODE_RESIZE_PROVIDERS, NodeDragHandler, NodeDragToParentDragHandler, NodeDragToParentFinalizeExecution, NodeDragToParentFinalizeRequest, NodeDragToParentPreparationExecution, NodeDragToParentPreparationRequest, NodeDragToParentPreparationValidator, NodeMoveFinalizeExecution, NodeMoveFinalizeRequest, NodeMovePreparationExecution, NodeMovePreparationRequest, NodeResizeByChildDragHandler, NodeResizeDragHandler, NodeResizeFinalizeExecution, NodeResizeFinalizeRequest, NodeResizePreparationExecution, NodeResizePreparationRequest, NodeResizePreparationValidator, NotifyDataChangedExecution, NotifyDataChangedRequest, NotifyTransformChangedExecution, NotifyTransformChangedRequest, OnPointerMoveExecution, OnPointerMoveRequest, PrepareDragSequenceExecution, PrepareDragSequenceRequest, PreventDefaultIsExternalItemExecution, PreventDefaultIsExternalItemRequest, PutInputConnectionHandlersToArrayExecution, PutInputConnectionHandlersToArrayRequest, PutOutputConnectionHandlersToArrayExecution, PutOutputConnectionHandlersToArrayRequest, RESIZE_DIRECTIONS, ReassignConnectionDragHandler, ReassignConnectionFinalizeExecution, ReassignConnectionFinalizeRequest, ReassignConnectionPreparationExecution, ReassignConnectionPreparationRequest, RedrawCanvasWithAnimationExecution, RedrawCanvasWithAnimationRequest, RedrawConnectionsExecution, RedrawConnectionsRequest, RemoveBackgroundFromStoreExecution, RemoveBackgroundFromStoreRequest, RemoveCanvasFromStoreExecution, RemoveCanvasFromStoreRequest, RemoveConnectionForCreateFromStoreExecution, RemoveConnectionForCreateFromStoreRequest, RemoveConnectionFromStoreExecution, RemoveConnectionFromStoreRequest, RemoveConnectionMarkerFromStoreExecution, RemoveConnectionMarkerFromStoreRequest, RemoveDndFromStoreExecution, RemoveDndFromStoreRequest, RemoveFlowFromStoreExecution, RemoveFlowFromStoreRequest, RemoveInputFromStoreExecution, RemoveInputFromStoreRequest, RemoveLineAlignmentFromStoreExecution, RemoveLineAlignmentFromStoreRequest, RemoveNodeFromStoreExecution, RemoveNodeFromStoreRequest, RemoveOutletFromStoreExecution, RemoveOutletFromStoreRequest, RemoveOutputFromStoreExecution, RemoveOutputFromStoreRequest, RemoveSnapConnectionFromStoreExecution, RemoveSnapConnectionFromStoreRequest, RemoveZoomFromStoreExecution, RemoveZoomFromStoreRequest, ResetScaleAndCenterExecution, ResetScaleAndCenterRequest, ResetScaleExecution, ResetScaleRequest, ResetZoomExecution, ResetZoomRequest, SELECTION_AREA_FINALIZE_PROVIDERS, SELECTION_AREA_PREPARATION_PROVIDERS, SINGLE_SELECT_PROVIDERS, SelectAllExecution, SelectAllRequest, SelectAndUpdateNodeLayerExecution, SelectAndUpdateNodeLayerRequest, SelectExecution, SelectRequest, SelectionAreaDragHandle, SelectionAreaFinalizeExecution, SelectionAreaFinalizeRequest, SelectionAreaFinalizeValidator, SelectionAreaPreparationExecution, SelectionAreaPreparationRequest, SelectionAreaPreparationValidator, SetBackgroundTransformExecution, SetBackgroundTransformRequest, SetZoomExecution, SetZoomRequest, SingleSelectExecution, SingleSelectRequest, SortItemLayersExecution, SortItemLayersRequest, SortItemsByParentExecution, SortItemsByParentRequest, SortNodeLayersExecution, SortNodeLayersRequest, StartDragSequenceExecution, StartDragSequenceRequest, UnmarkAllCanBeConnectedInputsExecution, UnmarkAllCanBeConnectedInputsRequest, UpdateItemAndChildrenLayersExecution, UpdateItemAndChildrenLayersRequest, UpdateNodeWhenStateOrSizeChangedExecution, UpdateNodeWhenStateOrSizeChangedRequest, UpdateScaleExecution, UpdateScaleRequest, createSVGElement, debounceTime, fixedCenterBehavior, fixedOutboundBehavior, floatingBehavior, getExternalItem, getMarkerEndId, getMarkerSelectedEndId, getMarkerSelectedStartId, getMarkerStartId, isExternalItem, isMobile, isNode, isNodeOutlet, isNodeOutput, mixinChangeSelection, mixinChangeVisibility, notifyOnStart, transitionEnd };
9285
9522
  //# sourceMappingURL=foblex-flow.mjs.map