@foblex/flow 17.1.1 → 17.2.0

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 (327) hide show
  1. package/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.request.d.ts +3 -3
  2. package/domain/f-connectors/providers.d.ts +1 -1
  3. package/domain/f-draggable/end-drag-sequence/end-drag-sequence.execution.d.ts +1 -0
  4. package/domain/f-draggable/providers.d.ts +1 -1
  5. package/domain/f-draggable/start-drag-sequence/start-drag-sequence.execution.d.ts +1 -0
  6. package/domain/f-event-trigger.d.ts +4 -0
  7. package/domain/f-selection/clear-selection/clear-selection.execution.d.ts +1 -3
  8. package/domain/f-selection/get-can-be-selected-items/get-can-be-selected-items.execution.d.ts +4 -6
  9. package/domain/f-selection/get-can-be-selected-items/i-can-be-selected-element-and-rect.d.ts +6 -0
  10. package/domain/f-selection/get-can-be-selected-items/index.d.ts +1 -1
  11. package/domain/f-selection/providers.d.ts +1 -1
  12. package/domain/index.d.ts +1 -0
  13. package/domain/providers.d.ts +1 -1
  14. package/domain/sort-item-layers/sort-items-by-parent/sort-items-by-parent.execution.d.ts +4 -4
  15. package/domain/update-item-and-children-layers/update-item-and-children-layers.request.d.ts +3 -3
  16. package/esm2022/domain/f-canvas/center-group-or-node/center-group-or-node.execution.mjs +2 -2
  17. package/esm2022/domain/f-canvas/fit-to-flow/fit-to-flow.execution.mjs +3 -3
  18. package/esm2022/domain/f-canvas/reset-scale-and-center/reset-scale-and-center.execution.mjs +3 -3
  19. package/esm2022/domain/f-connection/redraw-connections/redraw-connections.execution.mjs +3 -3
  20. package/esm2022/domain/f-connectors/find-input-at-position/find-input-at-position.execution.mjs +2 -2
  21. package/esm2022/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.execution.mjs +9 -9
  22. package/esm2022/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.request.mjs +4 -4
  23. package/esm2022/domain/f-connectors/get-connector-and-rect/get-connector-and-rect.execution.mjs +2 -2
  24. package/esm2022/domain/f-draggable/emit-selection-change-event/emit-selection-change-event.execution.mjs +3 -3
  25. package/esm2022/domain/f-draggable/end-drag-sequence/end-drag-sequence.execution.mjs +5 -1
  26. package/esm2022/domain/f-draggable/prepare-drag-sequence/prepare-drag-sequence.execution.mjs +2 -2
  27. package/esm2022/domain/f-draggable/start-drag-sequence/start-drag-sequence.execution.mjs +6 -2
  28. package/esm2022/domain/f-event-trigger.mjs +7 -0
  29. package/esm2022/domain/f-flow/get-flow-state/get-flow-state.execution.mjs +4 -4
  30. package/esm2022/domain/f-node/update-node-when-state-or-size-changed/update-node-when-state-or-size-changed.execution.mjs +2 -2
  31. package/esm2022/domain/f-selection/clear-selection/clear-selection.execution.mjs +9 -12
  32. package/esm2022/domain/f-selection/get-can-be-selected-items/get-can-be-selected-items.execution.mjs +8 -11
  33. package/esm2022/domain/f-selection/get-can-be-selected-items/i-can-be-selected-element-and-rect.mjs +2 -0
  34. package/esm2022/domain/f-selection/get-can-be-selected-items/index.mjs +2 -2
  35. package/esm2022/domain/f-selection/select/select.execution.mjs +4 -4
  36. package/esm2022/domain/f-selection/select-all/select-all.execution.mjs +4 -4
  37. package/esm2022/domain/f-selection/select-and-update-node-layer/select-and-update-node-layer.execution.mjs +3 -3
  38. package/esm2022/domain/f-zoom/set-zoom/set-zoom.execution.mjs +1 -1
  39. package/esm2022/domain/get-normalized-element-rect/get-normalized-element-rect.execution.mjs +2 -2
  40. package/esm2022/domain/index.mjs +2 -1
  41. package/esm2022/domain/sort-item-layers/sort-item-layers.execution.mjs +4 -4
  42. package/esm2022/domain/sort-item-layers/sort-items-by-parent/sort-items-by-parent.execution.mjs +14 -14
  43. package/esm2022/domain/sort-item-layers/sort-node-layers-by-groups/sort-node-layers.execution.mjs +2 -2
  44. package/esm2022/domain/update-item-and-children-layers/update-item-and-children-layers.execution.mjs +3 -3
  45. package/esm2022/domain/update-item-and-children-layers/update-item-and-children-layers.request.mjs +1 -1
  46. package/esm2022/f-backgroud/f-background.component.mjs +4 -4
  47. package/esm2022/f-canvas/f-canvas.component.mjs +13 -13
  48. package/esm2022/f-connection/common/f-connection-base.mjs +3 -3
  49. package/esm2022/f-connection/common/f-connection-text/f-connection-text-path.directive.mjs +4 -2
  50. package/esm2022/f-connection/common/f-connection-text/f-connection-text.component.mjs +2 -1
  51. package/esm2022/f-connection/f-connection/f-connection.component.mjs +4 -4
  52. package/esm2022/f-connection/f-connection-for-create/f-connection-for-create.component.mjs +4 -4
  53. package/esm2022/f-connection/f-marker/f-marker.directive.mjs +3 -3
  54. package/esm2022/f-connection/f-snap-connection/f-snap-connection.component.mjs +4 -4
  55. package/esm2022/f-connectors/f-node-input/f-node-input.directive.mjs +3 -3
  56. package/esm2022/f-connectors/f-node-outlet/f-node-outlet-base.mjs +1 -1
  57. package/esm2022/f-connectors/f-node-outlet/f-node-outlet.directive.mjs +3 -3
  58. package/esm2022/f-connectors/f-node-output/f-node-output-base.mjs +1 -1
  59. package/esm2022/f-connectors/f-node-output/f-node-output.directive.mjs +3 -3
  60. package/esm2022/f-draggable/connections/create-connection/create-connection-finalize/create-connection-finalize.execution.mjs +3 -3
  61. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-drag-handler-preparation/create-connection-drag-handler-preparation.execution.mjs +40 -0
  62. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-drag-handler-preparation/create-connection-drag-handler-preparation.request.mjs +9 -0
  63. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-drag-handler-preparation/index.mjs +3 -0
  64. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-from-outlet-preparation/create-connection-from-outlet-preparation.execution.mjs +36 -38
  65. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-from-outlet-preparation/create-connection-from-outlet-preparation.request.mjs +4 -2
  66. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-from-output-preparation/create-connection-from-output-preparation.execution.mjs +31 -23
  67. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-from-output-preparation/create-connection-from-output-preparation.request.mjs +4 -2
  68. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-from-output-preparation/index.mjs +1 -2
  69. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-preparation.execution.mjs +8 -12
  70. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-preparation.request.mjs +4 -2
  71. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/index.mjs +2 -2
  72. package/esm2022/f-draggable/connections/create-connection/create-connection.drag-handler.mjs +15 -14
  73. package/esm2022/f-draggable/connections/create-connection/get-can-be-connected-output-by-outlet/get-can-be-connected-output-by-outlet.execution.mjs +27 -24
  74. package/esm2022/f-draggable/connections/create-connection/get-can-be-connected-output-by-outlet/get-can-be-connected-output-by-outlet.request.mjs +4 -4
  75. package/esm2022/f-draggable/connections/create-connection/get-can-be-connected-output-by-outlet/index.mjs +1 -2
  76. package/esm2022/f-draggable/connections/providers.mjs +3 -5
  77. package/esm2022/f-draggable/connections/reassign-connection/reassign-connection-finalize/reassign-connection-finalize.execution.mjs +2 -2
  78. package/esm2022/f-draggable/connections/reassign-connection/reassign-connection-preparation/reassign-connection-preparation.execution.mjs +2 -2
  79. package/esm2022/f-draggable/connections/reassign-connection/reassign-connection-preparation/reassign-connection-preparation.request.mjs +4 -2
  80. package/esm2022/f-draggable/connections/reassign-connection/reassign-connection.drag-handler.mjs +8 -7
  81. package/esm2022/f-draggable/domain/get-normalized-parent-node-rect/get-normalized-parent-node-rect.execution.mjs +3 -3
  82. package/esm2022/f-draggable/domain/is-connection-under-node/is-connection-under-node.execution.mjs +2 -2
  83. package/esm2022/f-draggable/f-draggable-base.mjs +1 -1
  84. package/esm2022/f-draggable/f-draggable-data-context.mjs +1 -1
  85. package/esm2022/f-draggable/f-draggable.directive.mjs +55 -24
  86. package/esm2022/f-draggable/f-injector.mjs +19 -0
  87. package/esm2022/f-draggable/index.mjs +2 -1
  88. package/esm2022/f-draggable/node/connection-drag-handlers/base-connection.drag-handler.mjs +56 -0
  89. package/esm2022/f-draggable/node/connection-drag-handlers/index.mjs +5 -0
  90. package/esm2022/f-draggable/node/connection-drag-handlers/source-connection.drag-handler.mjs +11 -0
  91. package/esm2022/f-draggable/node/connection-drag-handlers/source-target-connection.drag-handler.mjs +22 -0
  92. package/esm2022/f-draggable/node/connection-drag-handlers/target-connection.drag-handler.mjs +11 -0
  93. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/create-move-nodes-drag-model-from-selection.execution.mjs +47 -45
  94. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-limits/calculate-common-node-move-limits.execution.mjs +69 -0
  95. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-limits/calculate-common-node-move-limits.request.mjs +7 -0
  96. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-limits/index.mjs +3 -0
  97. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-node-move-limits/calculate-node-move-limits.execution.mjs +49 -0
  98. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-node-move-limits/calculate-node-move-limits.request.mjs +9 -0
  99. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-node-move-limits/index.mjs +3 -0
  100. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/put-input-connection-handlers-to-array/put-input-connection-handlers-to-array.execution.mjs +27 -35
  101. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/put-input-connection-handlers-to-array/put-input-connection-handlers-to-array.request.mjs +4 -4
  102. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/put-output-connection-handlers-to-array/put-output-connection-handlers-to-array.execution.mjs +33 -46
  103. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/put-output-connection-handlers-to-array/put-output-connection-handlers-to-array.request.mjs +4 -4
  104. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/i-node-move-limits-and-position.mjs +2 -0
  105. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/i-node-move-limits.mjs +2 -0
  106. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/index.mjs +5 -4
  107. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/providers.mjs +5 -5
  108. package/esm2022/f-draggable/node/index.mjs +4 -6
  109. package/esm2022/f-draggable/node/line-alignment-preparation/line-alignment-preparation.execution.mjs +7 -18
  110. package/esm2022/f-draggable/node/line-alignment-preparation/line-alignment-preparation.request.mjs +7 -1
  111. package/esm2022/f-draggable/node/line-alignment.drag-handler.mjs +5 -4
  112. package/esm2022/f-draggable/node/node-drag-to-parent-finalize/node-drag-to-parent-finalize.execution.mjs +3 -3
  113. package/esm2022/f-draggable/node/node-drag-to-parent-preparation/index.mjs +1 -3
  114. package/esm2022/f-draggable/node/node-drag-to-parent-preparation/node-drag-to-parent-preparation.execution.mjs +13 -6
  115. package/esm2022/f-draggable/node/node-move-finalize/node-move-finalize.execution.mjs +13 -9
  116. package/esm2022/f-draggable/node/node-move-preparation/node-move-preparation.execution.mjs +5 -4
  117. package/esm2022/f-draggable/node/node.drag-handler.mjs +12 -29
  118. package/esm2022/f-draggable/node/point-bounds-limiter.mjs +41 -0
  119. package/esm2022/f-draggable/node/providers.mjs +3 -3
  120. package/esm2022/f-draggable/node/summary-node.drag-handler.mjs +36 -0
  121. package/esm2022/f-draggable/node-resize/apply-child-resize-restrictions/apply-child-resize-restrictions.execution.mjs +26 -22
  122. package/esm2022/f-draggable/node-resize/calculate-changed-size/calculate-changed-size.execution.mjs +1 -1
  123. package/esm2022/f-draggable/node-resize/get-node-resize-restrictions/get-node-resize-restrictions.execution.mjs +18 -18
  124. package/esm2022/f-draggable/node-resize/get-node-resize-restrictions/i-node-resize-restrictions.mjs +1 -1
  125. package/esm2022/f-draggable/node-resize/get-normalized-children-nodes-rect/get-normalized-children-nodes-rect.execution.mjs +3 -3
  126. package/esm2022/f-draggable/node-resize/node-resize-finalize/node-resize-finalize.execution.mjs +8 -11
  127. package/esm2022/f-draggable/node-resize/node-resize-preparation/index.mjs +1 -3
  128. package/esm2022/f-draggable/node-resize/node-resize-preparation/node-resize-preparation.execution.mjs +46 -34
  129. package/esm2022/f-draggable/node-resize/node-resize.drag-handler.mjs +47 -34
  130. package/esm2022/f-draggable/node-resize/providers.mjs +3 -3
  131. package/esm2022/f-draggable/node-resize/resize-direction.mjs +5 -1
  132. package/esm2022/f-draggable/single-select/single-select.execution.mjs +101 -70
  133. package/esm2022/f-draggable/single-select/single-select.request.mjs +4 -2
  134. package/esm2022/f-external-item/domain/external-item-finalize/external-item-finalize.execution.mjs +2 -2
  135. package/esm2022/f-external-item/domain/external-item-preparation/external-item-preparation.execution.mjs +27 -27
  136. package/esm2022/f-external-item/domain/external-item-preparation/index.mjs +1 -2
  137. package/esm2022/f-external-item/domain/external-item-preparation/providers.mjs +1 -3
  138. package/esm2022/f-external-item/domain/external-item.drag-handler.mjs +9 -8
  139. package/esm2022/f-flow/f-flow.component.mjs +15 -15
  140. package/esm2022/f-minimap/domain/f-minimap.drag-handler.mjs +2 -2
  141. package/esm2022/f-minimap/domain/minimap-calculate-svg-scale-and-view-box/minimap-calculate-svg-scale-and-view-box.execution.mjs +2 -2
  142. package/esm2022/f-minimap/domain/minimap-drag-finalize/index.mjs +1 -2
  143. package/esm2022/f-minimap/domain/minimap-drag-finalize/minimap-drag-finalize.execution.mjs +8 -1
  144. package/esm2022/f-minimap/domain/minimap-drag-finalize/providers.mjs +1 -3
  145. package/esm2022/f-minimap/domain/minimap-drag-preparation/index.mjs +1 -2
  146. package/esm2022/f-minimap/domain/minimap-drag-preparation/minimap-drag-preparation.execution.mjs +10 -2
  147. package/esm2022/f-minimap/domain/minimap-drag-preparation/providers.mjs +1 -3
  148. package/esm2022/f-minimap/f-minimap-canvas.directive.mjs +2 -2
  149. package/esm2022/f-minimap/f-minimap-flow.directive.mjs +2 -2
  150. package/esm2022/f-minimap/f-minimap-view.directive.mjs +2 -2
  151. package/esm2022/f-minimap/f-minimap.component.mjs +4 -4
  152. package/esm2022/f-node/f-group.directive.mjs +16 -10
  153. package/esm2022/f-node/f-node-base.mjs +1 -1
  154. package/esm2022/f-node/f-node.directive.mjs +16 -10
  155. package/esm2022/f-node/f-resize-handle/e-f-resize-handle-type.mjs +6 -2
  156. package/esm2022/f-node/f-resize-handle/f-resize-handle.directive.mjs +3 -3
  157. package/esm2022/f-selection-area/domain/providers.mjs +5 -5
  158. package/esm2022/f-selection-area/domain/selection-area-finalize/index.mjs +1 -3
  159. package/esm2022/f-selection-area/domain/selection-area-finalize/selection-area-finalize.execution.mjs +14 -10
  160. package/esm2022/f-selection-area/domain/selection-area-preparation/index.mjs +1 -3
  161. package/esm2022/f-selection-area/domain/selection-area-preparation/selection-area-preparation.execution.mjs +25 -23
  162. package/esm2022/f-selection-area/domain/selection-area-preparation/selection-area-preparation.request.mjs +4 -2
  163. package/esm2022/f-selection-area/domain/selection-area.drag-handle.mjs +32 -29
  164. package/esm2022/f-selection-area/f-selection-area.component.mjs +11 -6
  165. package/esm2022/mixins/change-selection/change-selection.mjs +7 -7
  166. package/esm2022/mixins/change-selection/i-selectable.mjs +2 -0
  167. package/esm2022/mixins/change-selection/index.mjs +2 -2
  168. package/f-connection/common/f-connection-base.d.ts +5 -5
  169. package/f-connection/common/f-connection-text/f-connection-text-path.directive.d.ts +1 -0
  170. package/f-connection/providers.d.ts +1 -1
  171. package/f-connectors/f-node-outlet/f-node-outlet-base.d.ts +1 -0
  172. package/f-connectors/f-node-output/f-node-output-base.d.ts +1 -0
  173. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-drag-handler-preparation/create-connection-drag-handler-preparation.execution.d.ts +12 -0
  174. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-drag-handler-preparation/create-connection-drag-handler-preparation.request.d.ts +7 -0
  175. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-drag-handler-preparation/index.d.ts +2 -0
  176. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-from-outlet-preparation/create-connection-from-outlet-preparation.execution.d.ts +6 -6
  177. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-from-outlet-preparation/create-connection-from-outlet-preparation.request.d.ts +3 -1
  178. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-from-output-preparation/create-connection-from-output-preparation.execution.d.ts +6 -6
  179. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-from-output-preparation/create-connection-from-output-preparation.request.d.ts +3 -1
  180. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-from-output-preparation/index.d.ts +0 -1
  181. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-preparation.execution.d.ts +1 -2
  182. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-preparation.request.d.ts +3 -1
  183. package/f-draggable/connections/create-connection/create-connection-preparation/index.d.ts +1 -1
  184. package/f-draggable/connections/create-connection/create-connection.drag-handler.d.ts +3 -5
  185. package/f-draggable/connections/create-connection/get-can-be-connected-output-by-outlet/get-can-be-connected-output-by-outlet.execution.d.ts +7 -7
  186. package/f-draggable/connections/create-connection/get-can-be-connected-output-by-outlet/get-can-be-connected-output-by-outlet.request.d.ts +2 -2
  187. package/f-draggable/connections/create-connection/get-can-be-connected-output-by-outlet/index.d.ts +0 -1
  188. package/f-draggable/connections/providers.d.ts +2 -2
  189. package/f-draggable/connections/reassign-connection/reassign-connection-preparation/reassign-connection-preparation.request.d.ts +3 -1
  190. package/f-draggable/connections/reassign-connection/reassign-connection.drag-handler.d.ts +2 -4
  191. package/f-draggable/f-draggable-base.d.ts +4 -1
  192. package/f-draggable/f-draggable-data-context.d.ts +2 -2
  193. package/f-draggable/f-draggable.directive.d.ts +16 -3
  194. package/f-draggable/f-injector.d.ts +8 -0
  195. package/f-draggable/index.d.ts +1 -0
  196. package/f-draggable/node/connection-drag-handlers/base-connection.drag-handler.d.ts +21 -0
  197. package/f-draggable/node/connection-drag-handlers/index.d.ts +4 -0
  198. package/f-draggable/node/connection-drag-handlers/source-connection.drag-handler.d.ts +7 -0
  199. package/f-draggable/node/connection-drag-handlers/source-target-connection.drag-handler.d.ts +10 -0
  200. package/f-draggable/node/connection-drag-handlers/target-connection.drag-handler.d.ts +7 -0
  201. package/f-draggable/node/create-move-nodes-drag-model-from-selection/create-move-nodes-drag-model-from-selection.execution.d.ts +14 -13
  202. package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-limits/calculate-common-node-move-limits.execution.d.ts +19 -0
  203. package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-limits/calculate-common-node-move-limits.request.d.ts +5 -0
  204. package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-limits/index.d.ts +2 -0
  205. package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-node-move-limits/calculate-node-move-limits.execution.d.ts +15 -0
  206. package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/{calculate-node-move-restrictions/calculate-node-move-restrictions.request.d.ts → calculate-node-move-limits/calculate-node-move-limits.request.d.ts} +1 -1
  207. package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-node-move-limits/index.d.ts +2 -0
  208. package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/put-input-connection-handlers-to-array/put-input-connection-handlers-to-array.execution.d.ts +5 -10
  209. package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/put-input-connection-handlers-to-array/put-input-connection-handlers-to-array.request.d.ts +4 -4
  210. package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/put-output-connection-handlers-to-array/put-output-connection-handlers-to-array.execution.d.ts +8 -13
  211. package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/put-output-connection-handlers-to-array/put-output-connection-handlers-to-array.request.d.ts +4 -4
  212. package/f-draggable/node/create-move-nodes-drag-model-from-selection/i-node-move-limits-and-position.d.ts +5 -0
  213. package/f-draggable/node/create-move-nodes-drag-model-from-selection/i-node-move-limits.d.ts +3 -0
  214. package/f-draggable/node/create-move-nodes-drag-model-from-selection/index.d.ts +4 -3
  215. package/f-draggable/node/create-move-nodes-drag-model-from-selection/providers.d.ts +3 -3
  216. package/f-draggable/node/index.d.ts +3 -5
  217. package/f-draggable/node/line-alignment-preparation/line-alignment-preparation.execution.d.ts +0 -2
  218. package/f-draggable/node/line-alignment-preparation/line-alignment-preparation.request.d.ts +5 -0
  219. package/f-draggable/node/line-alignment.drag-handler.d.ts +2 -3
  220. package/f-draggable/node/node-drag-to-parent-preparation/index.d.ts +0 -2
  221. package/f-draggable/node/node-drag-to-parent-preparation/node-drag-to-parent-preparation.execution.d.ts +1 -0
  222. package/f-draggable/node/node-move-finalize/node-move-finalize.execution.d.ts +2 -0
  223. package/f-draggable/node/node.drag-handler.d.ts +6 -9
  224. package/f-draggable/node/point-bounds-limiter.d.ts +15 -0
  225. package/f-draggable/node/providers.d.ts +2 -1
  226. package/f-draggable/node/summary-node.drag-handler.d.ts +14 -0
  227. package/f-draggable/node-resize/apply-child-resize-restrictions/apply-child-resize-restrictions.execution.d.ts +5 -5
  228. package/f-draggable/node-resize/get-node-resize-restrictions/get-node-resize-restrictions.execution.d.ts +5 -4
  229. package/f-draggable/node-resize/get-node-resize-restrictions/i-node-resize-restrictions.d.ts +3 -3
  230. package/f-draggable/node-resize/node-resize-finalize/node-resize-finalize.execution.d.ts +1 -3
  231. package/f-draggable/node-resize/node-resize-preparation/index.d.ts +0 -2
  232. package/f-draggable/node-resize/node-resize-preparation/node-resize-preparation.execution.d.ts +13 -11
  233. package/f-draggable/node-resize/node-resize.drag-handler.d.ts +16 -12
  234. package/f-draggable/node-resize/providers.d.ts +2 -1
  235. package/f-draggable/node-resize/resize-direction.d.ts +16 -0
  236. package/f-draggable/providers.d.ts +1 -1
  237. package/f-draggable/single-select/single-select.execution.d.ts +54 -20
  238. package/f-draggable/single-select/single-select.request.d.ts +3 -1
  239. package/f-external-item/domain/external-item-preparation/external-item-preparation.execution.d.ts +7 -11
  240. package/f-external-item/domain/external-item-preparation/index.d.ts +0 -1
  241. package/f-external-item/domain/external-item-preparation/providers.d.ts +1 -2
  242. package/f-external-item/domain/external-item.drag-handler.d.ts +2 -3
  243. package/f-external-item/domain/providers.d.ts +1 -1
  244. package/f-minimap/domain/minimap-drag-finalize/index.d.ts +0 -1
  245. package/f-minimap/domain/minimap-drag-finalize/minimap-drag-finalize.execution.d.ts +1 -0
  246. package/f-minimap/domain/minimap-drag-finalize/providers.d.ts +1 -2
  247. package/f-minimap/domain/minimap-drag-preparation/index.d.ts +0 -1
  248. package/f-minimap/domain/minimap-drag-preparation/minimap-drag-preparation.execution.d.ts +1 -0
  249. package/f-minimap/domain/minimap-drag-preparation/providers.d.ts +1 -2
  250. package/f-minimap/domain/providers.d.ts +1 -1
  251. package/f-node/f-node-base.d.ts +3 -3
  252. package/f-node/f-resize-handle/e-f-resize-handle-type.d.ts +6 -2
  253. package/f-node/providers.d.ts +1 -1
  254. package/f-selection-area/domain/providers.d.ts +3 -1
  255. package/f-selection-area/domain/selection-area-finalize/index.d.ts +0 -2
  256. package/f-selection-area/domain/selection-area-finalize/selection-area-finalize.execution.d.ts +2 -3
  257. package/f-selection-area/domain/selection-area-preparation/index.d.ts +0 -2
  258. package/f-selection-area/domain/selection-area-preparation/selection-area-preparation.execution.d.ts +6 -8
  259. package/f-selection-area/domain/selection-area-preparation/selection-area-preparation.request.d.ts +3 -1
  260. package/f-selection-area/domain/selection-area.drag-handle.d.ts +7 -6
  261. package/f-selection-area/f-selection-area.component.d.ts +3 -1
  262. package/f-storage/providers.d.ts +1 -1
  263. package/fesm2022/foblex-flow.mjs +1160 -1156
  264. package/fesm2022/foblex-flow.mjs.map +1 -1
  265. package/mixins/change-selection/change-selection.d.ts +2 -2
  266. package/mixins/change-selection/i-selectable.d.ts +10 -0
  267. package/mixins/change-selection/index.d.ts +1 -1
  268. package/package.json +2 -2
  269. package/domain/f-selection/get-can-be-selected-items/i-can-be-selected.d.ts +0 -6
  270. package/esm2022/domain/f-selection/get-can-be-selected-items/i-can-be-selected.mjs +0 -2
  271. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-drag-handler/create-connection-drag-handler.execution.mjs +0 -47
  272. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-drag-handler/create-connection-drag-handler.request.mjs +0 -9
  273. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-drag-handler/index.mjs +0 -3
  274. package/esm2022/f-draggable/connections/create-connection/create-connection-preparation/create-connection-from-output-preparation/create-connection-from-output-preparation.validator.mjs +0 -36
  275. package/esm2022/f-draggable/connections/create-connection/get-can-be-connected-output-by-outlet/get-can-be-connected-output-by-outlet.validator.mjs +0 -28
  276. package/esm2022/f-draggable/node/connection-base-drag-handler.mjs +0 -55
  277. package/esm2022/f-draggable/node/connection-source.drag-handler.mjs +0 -17
  278. package/esm2022/f-draggable/node/connection-target.drag-handler.mjs +0 -17
  279. package/esm2022/f-draggable/node/connection.drag-handler.mjs +0 -23
  280. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-restrictions/calculate-common-node-move-restrictions.execution.mjs +0 -40
  281. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-restrictions/calculate-common-node-move-restrictions.request.mjs +0 -7
  282. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-restrictions/index.mjs +0 -3
  283. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-node-move-restrictions/calculate-node-move-restrictions.execution.mjs +0 -42
  284. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-node-move-restrictions/calculate-node-move-restrictions.request.mjs +0 -9
  285. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-node-move-restrictions/index.mjs +0 -3
  286. package/esm2022/f-draggable/node/create-move-nodes-drag-model-from-selection/i-node-with-distance-restrictions.mjs +0 -2
  287. package/esm2022/f-draggable/node/node-drag-to-parent-preparation/node-drag-to-parent-preparation.validator.mjs +0 -26
  288. package/esm2022/f-draggable/node/node-drag-to-parent-preparation/providers.mjs +0 -7
  289. package/esm2022/f-draggable/node/node-resize-by-child.drag-handler.mjs +0 -16
  290. package/esm2022/f-draggable/node-resize/node-resize-preparation/node-resize-preparation.validator.mjs +0 -44
  291. package/esm2022/f-draggable/node-resize/node-resize-preparation/providers.mjs +0 -7
  292. package/esm2022/f-external-item/domain/external-item-preparation/external-item-preparation.validator.mjs +0 -30
  293. package/esm2022/f-minimap/domain/minimap-drag-finalize/minimap-drag-finalize.validator.mjs +0 -26
  294. package/esm2022/f-minimap/domain/minimap-drag-preparation/minimap-drag-preparation.validator.mjs +0 -30
  295. package/esm2022/f-selection-area/domain/selection-area-finalize/providers.mjs +0 -7
  296. package/esm2022/f-selection-area/domain/selection-area-finalize/selection-area-finalize.validator.mjs +0 -26
  297. package/esm2022/f-selection-area/domain/selection-area-preparation/providers.mjs +0 -7
  298. package/esm2022/f-selection-area/domain/selection-area-preparation/selection-area-preparation.validator.mjs +0 -32
  299. package/esm2022/mixins/change-selection/i-can-change-selection.mjs +0 -2
  300. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-drag-handler/create-connection-drag-handler.execution.d.ts +0 -17
  301. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-drag-handler/create-connection-drag-handler.request.d.ts +0 -7
  302. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-drag-handler/index.d.ts +0 -2
  303. package/f-draggable/connections/create-connection/create-connection-preparation/create-connection-from-output-preparation/create-connection-from-output-preparation.validator.d.ts +0 -14
  304. package/f-draggable/connections/create-connection/get-can-be-connected-output-by-outlet/get-can-be-connected-output-by-outlet.validator.d.ts +0 -12
  305. package/f-draggable/node/connection-base-drag-handler.d.ts +0 -24
  306. package/f-draggable/node/connection-source.drag-handler.d.ts +0 -11
  307. package/f-draggable/node/connection-target.drag-handler.d.ts +0 -11
  308. package/f-draggable/node/connection.drag-handler.d.ts +0 -14
  309. package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-restrictions/calculate-common-node-move-restrictions.execution.d.ts +0 -13
  310. package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-restrictions/calculate-common-node-move-restrictions.request.d.ts +0 -5
  311. package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-common-node-move-restrictions/index.d.ts +0 -2
  312. package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-node-move-restrictions/calculate-node-move-restrictions.execution.d.ts +0 -12
  313. package/f-draggable/node/create-move-nodes-drag-model-from-selection/domain/calculate-node-move-restrictions/index.d.ts +0 -2
  314. package/f-draggable/node/create-move-nodes-drag-model-from-selection/i-node-with-distance-restrictions.d.ts +0 -6
  315. package/f-draggable/node/node-drag-to-parent-preparation/node-drag-to-parent-preparation.validator.d.ts +0 -11
  316. package/f-draggable/node/node-drag-to-parent-preparation/providers.d.ts +0 -3
  317. package/f-draggable/node/node-resize-by-child.drag-handler.d.ts +0 -11
  318. package/f-draggable/node-resize/node-resize-preparation/node-resize-preparation.validator.d.ts +0 -17
  319. package/f-draggable/node-resize/node-resize-preparation/providers.d.ts +0 -3
  320. package/f-external-item/domain/external-item-preparation/external-item-preparation.validator.d.ts +0 -12
  321. package/f-minimap/domain/minimap-drag-finalize/minimap-drag-finalize.validator.d.ts +0 -11
  322. package/f-minimap/domain/minimap-drag-preparation/minimap-drag-preparation.validator.d.ts +0 -13
  323. package/f-selection-area/domain/selection-area-finalize/providers.d.ts +0 -3
  324. package/f-selection-area/domain/selection-area-finalize/selection-area-finalize.validator.d.ts +0 -11
  325. package/f-selection-area/domain/selection-area-preparation/providers.d.ts +0 -3
  326. package/f-selection-area/domain/selection-area-preparation/selection-area-preparation.validator.d.ts +0 -13
  327. package/mixins/change-selection/i-can-change-selection.d.ts +0 -10
@@ -1,11 +1,11 @@
1
1
  import * as i0 from '@angular/core';
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';
2
+ import { InjectionToken, inject, Injectable, Directive, ElementRef, Input, HostBinding, EventEmitter, DestroyRef, booleanAttribute, Output, Inject, Component, ChangeDetectionStrategy, ViewChild, Optional, numberAttribute, ContentChildren, Injector, NgZone, ContentChild, Renderer2, NgModule } from '@angular/core';
3
+ import { RectExtensions, RoundedRect, TransformModelExtensions, PointExtensions, SizeExtensions, Point, LineExtensions, GetIntersections, findClosestAlignment, setRectToElement, adjustRectToMinSize, setRectToViewBox } from '@foblex/2d';
4
4
  import { __decorate } from 'tslib';
5
5
  import * as i2$1 from '@foblex/mediator';
6
- import { FExecutionRegister, FMediator, FValidatorRegister } from '@foblex/mediator';
6
+ import { FExecutionRegister, FMediator } from '@foblex/mediator';
7
7
  import * as i1 from '@foblex/platform';
8
- import { BrowserService, EOperationSystem } from '@foblex/platform';
8
+ import { BrowserService, PlatformService, EOperationSystem } from '@foblex/platform';
9
9
  import { normalizeDomElementId, castToEnum, flatMap, isClosestElementHasClass, getDataAttrValueFromClosestElementWithClass, deepCloneNode } from '@foblex/utils';
10
10
  import * as i2 from '@angular/common';
11
11
  import { CommonModule } from '@angular/common';
@@ -437,7 +437,7 @@ let CenterGroupOrNodeExecution = class CenterGroupOrNodeExecution {
437
437
  return;
438
438
  }
439
439
  this.toCenter(this.getNodeRect(fNode), this.getFlowRect(), fNode.position);
440
- this._fMediator.send(new RedrawCanvasWithAnimationRequest(request.animated));
440
+ this._fMediator.execute(new RedrawCanvasWithAnimationRequest(request.animated));
441
441
  }
442
442
  toCenter(fNodeRect, fFlowRect, position) {
443
443
  this.transform.scaledPosition = PointExtensions.initialize();
@@ -478,12 +478,12 @@ let FitToFlowExecution = class FitToFlowExecution {
478
478
  }
479
479
  _fMediator = inject(FMediator);
480
480
  handle(request) {
481
- const fNodesRect = this._fMediator.send(new CalculateNodesBoundingBoxRequest()) || RectExtensions.initialize();
481
+ const fNodesRect = this._fMediator.execute(new CalculateNodesBoundingBoxRequest()) || RectExtensions.initialize();
482
482
  if (fNodesRect.width === 0 || fNodesRect.height === 0) {
483
483
  return;
484
484
  }
485
485
  this.fitToParent(fNodesRect, RectExtensions.fromElement(this._fComponentsStore.fFlow.hostElement), this._fComponentsStore.fNodes.map((x) => x.position), request.toCenter);
486
- this._fMediator.send(new RedrawCanvasWithAnimationRequest(request.animated));
486
+ this._fMediator.execute(new RedrawCanvasWithAnimationRequest(request.animated));
487
487
  }
488
488
  fitToParent(rect, parentRect, points, toCenter) {
489
489
  this.transform.scaledPosition = PointExtensions.initialize();
@@ -693,12 +693,12 @@ let ResetScaleAndCenterExecution = class ResetScaleAndCenterExecution {
693
693
  }
694
694
  _fMediator = inject(FMediator);
695
695
  handle(request) {
696
- const fNodesRect = this._fMediator.send(new CalculateNodesBoundingBoxRequest()) || RectExtensions.initialize();
696
+ const fNodesRect = this._fMediator.execute(new CalculateNodesBoundingBoxRequest()) || RectExtensions.initialize();
697
697
  if (fNodesRect.width === 0 || fNodesRect.height === 0) {
698
698
  return;
699
699
  }
700
700
  this.oneToOneCentering(fNodesRect, RectExtensions.fromElement(this._fComponentsStore.fFlow.hostElement), this._fComponentsStore.fNodes.map((x) => x.position));
701
- this._fMediator.send(new RedrawCanvasWithAnimationRequest(request.animated));
701
+ this._fMediator.execute(new RedrawCanvasWithAnimationRequest(request.animated));
702
702
  }
703
703
  oneToOneCentering(rect, parentRect, points) {
704
704
  this.transform.scaledPosition = PointExtensions.initialize();
@@ -1042,10 +1042,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
1042
1042
 
1043
1043
  var EFResizeHandleType;
1044
1044
  (function (EFResizeHandleType) {
1045
+ EFResizeHandleType["LEFT"] = "left";
1045
1046
  EFResizeHandleType["LEFT_TOP"] = "left-top";
1047
+ EFResizeHandleType["TOP"] = "top";
1046
1048
  EFResizeHandleType["RIGHT_TOP"] = "right-top";
1047
- EFResizeHandleType["LEFT_BOTTOM"] = "left-bottom";
1049
+ EFResizeHandleType["RIGHT"] = "right";
1048
1050
  EFResizeHandleType["RIGHT_BOTTOM"] = "right-bottom";
1051
+ EFResizeHandleType["BOTTOM"] = "bottom";
1052
+ EFResizeHandleType["LEFT_BOTTOM"] = "left-bottom";
1049
1053
  })(EFResizeHandleType || (EFResizeHandleType = {}));
1050
1054
 
1051
1055
  const F_RESIZE_HANDLE = new InjectionToken('F_RESIZE_HANDLE');
@@ -1059,7 +1063,7 @@ class FResizeHandleDirective {
1059
1063
  return this._elementReference.nativeElement;
1060
1064
  }
1061
1065
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FResizeHandleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
1062
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: FResizeHandleDirective, selector: "[fResizeHandle]", inputs: { type: ["fResizeHandleType", "type", (x) => castToEnum(x, 'fResizeHandleType', EFResizeHandleType)] }, host: { properties: { "attr.data-f-resize-handle-type": "type", "class": "this.typeClass" }, classAttribute: "f-resize-handle f-component" }, providers: [{ provide: F_RESIZE_HANDLE, useExisting: FResizeHandleDirective }], ngImport: i0 });
1066
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: FResizeHandleDirective, selector: "[fResizeHandle]", inputs: { type: ["fResizeHandleType", "type", (x) => castToEnum(x, 'fResizeHandleType', EFResizeHandleType)] }, host: { properties: { "attr.data-f-resize-handle-type": "type.toUpperCase()", "class": "this.typeClass" }, classAttribute: "f-resize-handle f-component" }, providers: [{ provide: F_RESIZE_HANDLE, useExisting: FResizeHandleDirective }], ngImport: i0 });
1063
1067
  }
1064
1068
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FResizeHandleDirective, decorators: [{
1065
1069
  type: Directive,
@@ -1067,7 +1071,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
1067
1071
  selector: "[fResizeHandle]",
1068
1072
  host: {
1069
1073
  class: `f-resize-handle f-component`,
1070
- '[attr.data-f-resize-handle-type]': 'type',
1074
+ '[attr.data-f-resize-handle-type]': 'type.toUpperCase()',
1071
1075
  },
1072
1076
  providers: [{ provide: F_RESIZE_HANDLE, useExisting: FResizeHandleDirective }],
1073
1077
  }]
@@ -1135,12 +1139,12 @@ function mixinChangeSelection(base) {
1135
1139
  return class extends base {
1136
1140
  fId = '';
1137
1141
  fSelectionDisabled = false;
1138
- deselect() {
1139
- this.deselectChild?.();
1142
+ unmarkAsSelected() {
1143
+ this.unmarkChildrenAsSelected?.();
1140
1144
  this.hostElement.classList.remove(F_SELECTED_CLASS);
1141
1145
  }
1142
- select() {
1143
- this.selectChild?.();
1146
+ markAsSelected() {
1147
+ this.markChildrenAsSelected?.();
1144
1148
  if (!this.isSelected()) {
1145
1149
  this.hostElement.classList.add(F_SELECTED_CLASS);
1146
1150
  }
@@ -1148,9 +1152,9 @@ function mixinChangeSelection(base) {
1148
1152
  isSelected() {
1149
1153
  return this.hostElement.classList.contains(F_SELECTED_CLASS);
1150
1154
  }
1151
- selectChild() {
1155
+ markChildrenAsSelected() {
1152
1156
  }
1153
- deselectChild() {
1157
+ unmarkChildrenAsSelected() {
1154
1158
  }
1155
1159
  constructor(...args) {
1156
1160
  super(...args);
@@ -1227,16 +1231,22 @@ class FGroupDirective extends FNodeBase {
1227
1231
  fId = `f-group-${uniqueId$b++}`;
1228
1232
  fParentId = null;
1229
1233
  set position(value) {
1230
- this._position = PointExtensions.castToPoint(value);
1231
- this.refresh();
1234
+ if (!PointExtensions.isEqual(this._position, value)) {
1235
+ this._position = value;
1236
+ this.redraw();
1237
+ this.refresh();
1238
+ }
1232
1239
  }
1233
1240
  get position() {
1234
1241
  return this._position;
1235
1242
  }
1236
1243
  positionChange = new EventEmitter();
1237
1244
  set size(value) {
1238
- this._size = value;
1239
- this.refresh();
1245
+ if (!this.size || !SizeExtensions.isEqual(this._size, value)) {
1246
+ this._size = value;
1247
+ this.redraw();
1248
+ this.refresh();
1249
+ }
1240
1250
  }
1241
1251
  get size() {
1242
1252
  return this._size;
@@ -1261,14 +1271,14 @@ class FGroupDirective extends FNodeBase {
1261
1271
  this.setStyle('left', '0');
1262
1272
  this.setStyle('top', '0');
1263
1273
  super.redraw();
1264
- this._fMediator.send(new AddNodeToStoreRequest(this));
1274
+ this._fMediator.execute(new AddNodeToStoreRequest(this));
1265
1275
  }
1266
1276
  setStyle(styleName, value) {
1267
1277
  this.renderer.setStyle(this.hostElement, styleName, value);
1268
1278
  }
1269
1279
  redraw() {
1270
1280
  super.redraw();
1271
- this._fMediator.send(new NotifyTransformChangedRequest());
1281
+ this._fMediator.execute(new NotifyTransformChangedRequest());
1272
1282
  }
1273
1283
  ngAfterViewInit() {
1274
1284
  if (!this.fBrowser.isBrowser()) {
@@ -1277,13 +1287,13 @@ class FGroupDirective extends FNodeBase {
1277
1287
  this._listenStateSizeChanges();
1278
1288
  }
1279
1289
  _listenStateSizeChanges() {
1280
- this._fMediator.send(new UpdateNodeWhenStateOrSizeChangedRequest(this, this._destroyRef));
1290
+ this._fMediator.execute(new UpdateNodeWhenStateOrSizeChangedRequest(this, this._destroyRef));
1281
1291
  }
1282
1292
  refresh() {
1283
1293
  this.stateChanges.notify();
1284
1294
  }
1285
1295
  ngOnDestroy() {
1286
- this._fMediator.send(new RemoveNodeFromStoreRequest(this));
1296
+ this._fMediator.execute(new RemoveNodeFromStoreRequest(this));
1287
1297
  }
1288
1298
  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 });
1289
1299
  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: [
@@ -1344,16 +1354,22 @@ class FNodeDirective extends FNodeBase {
1344
1354
  fId = `f-node-${uniqueId$a++}`;
1345
1355
  fParentId = null;
1346
1356
  set position(value) {
1347
- this._position = PointExtensions.castToPoint(value);
1348
- this.refresh();
1357
+ if (!PointExtensions.isEqual(this._position, value)) {
1358
+ this._position = value;
1359
+ this.redraw();
1360
+ this.refresh();
1361
+ }
1349
1362
  }
1350
1363
  get position() {
1351
1364
  return this._position;
1352
1365
  }
1353
1366
  positionChange = new EventEmitter();
1354
1367
  set size(value) {
1355
- this._size = value;
1356
- this.refresh();
1368
+ if (!this.size || !SizeExtensions.isEqual(this._size, value)) {
1369
+ this._size = value;
1370
+ this.redraw();
1371
+ this.refresh();
1372
+ }
1357
1373
  }
1358
1374
  get size() {
1359
1375
  return this._size;
@@ -1379,14 +1395,14 @@ class FNodeDirective extends FNodeBase {
1379
1395
  this.setStyle('left', '0');
1380
1396
  this.setStyle('top', '0');
1381
1397
  super.redraw();
1382
- this._fMediator.send(new AddNodeToStoreRequest(this));
1398
+ this._fMediator.execute(new AddNodeToStoreRequest(this));
1383
1399
  }
1384
1400
  setStyle(styleName, value) {
1385
1401
  this.renderer.setStyle(this.hostElement, styleName, value);
1386
1402
  }
1387
1403
  redraw() {
1388
1404
  super.redraw();
1389
- this._fMediator.send(new NotifyTransformChangedRequest());
1405
+ this._fMediator.execute(new NotifyTransformChangedRequest());
1390
1406
  }
1391
1407
  ngAfterViewInit() {
1392
1408
  if (!this.fBrowser.isBrowser()) {
@@ -1395,13 +1411,13 @@ class FNodeDirective extends FNodeBase {
1395
1411
  this._listenStateSizeChanges();
1396
1412
  }
1397
1413
  _listenStateSizeChanges() {
1398
- this._fMediator.send(new UpdateNodeWhenStateOrSizeChangedRequest(this, this._destroyRef));
1414
+ this._fMediator.execute(new UpdateNodeWhenStateOrSizeChangedRequest(this, this._destroyRef));
1399
1415
  }
1400
1416
  refresh() {
1401
1417
  this.stateChanges.notify();
1402
1418
  }
1403
1419
  ngOnDestroy() {
1404
- this._fMediator.send(new RemoveNodeFromStoreRequest(this));
1420
+ this._fMediator.execute(new RemoveNodeFromStoreRequest(this));
1405
1421
  }
1406
1422
  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 });
1407
1423
  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: [
@@ -1482,7 +1498,7 @@ class FNodeInputDirective extends FNodeInputBase {
1482
1498
  return this._elementReference.nativeElement;
1483
1499
  }
1484
1500
  ngOnInit() {
1485
- this._fMediator.send(new AddInputToStoreRequest(this));
1501
+ this._fMediator.execute(new AddInputToStoreRequest(this));
1486
1502
  this._fNode.addConnector(this);
1487
1503
  }
1488
1504
  ngOnChanges(changes) {
@@ -1502,7 +1518,7 @@ class FNodeInputDirective extends FNodeInputBase {
1502
1518
  }
1503
1519
  ngOnDestroy() {
1504
1520
  this._fNode.removeConnector(this);
1505
- this._fMediator.send(new RemoveInputFromStoreRequest(this));
1521
+ this._fMediator.execute(new RemoveInputFromStoreRequest(this));
1506
1522
  }
1507
1523
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FNodeInputDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1508
1524
  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 });
@@ -1576,10 +1592,10 @@ class FNodeOutletDirective extends FNodeOutletBase {
1576
1592
  return this._elementReference.nativeElement;
1577
1593
  }
1578
1594
  ngOnInit() {
1579
- this._fMediator.send(new AddOutletToStoreRequest(this));
1595
+ this._fMediator.execute(new AddOutletToStoreRequest(this));
1580
1596
  }
1581
1597
  ngOnDestroy() {
1582
- this._fMediator.send(new RemoveOutletFromStoreRequest(this));
1598
+ this._fMediator.execute(new RemoveOutletFromStoreRequest(this));
1583
1599
  }
1584
1600
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FNodeOutletDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1585
1601
  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 });
@@ -1643,7 +1659,7 @@ class FNodeOutputDirective extends FNodeOutputBase {
1643
1659
  return this._elementReference.nativeElement;
1644
1660
  }
1645
1661
  ngOnInit() {
1646
- this._fMediator.send(new AddOutputToStoreRequest(this));
1662
+ this._fMediator.execute(new AddOutputToStoreRequest(this));
1647
1663
  this._fNode.addConnector(this);
1648
1664
  }
1649
1665
  ngOnChanges(changes) {
@@ -1663,7 +1679,7 @@ class FNodeOutputDirective extends FNodeOutputBase {
1663
1679
  }
1664
1680
  ngOnDestroy() {
1665
1681
  this._fNode.removeConnector(this);
1666
- this._fMediator.send(new RemoveOutputFromStoreRequest(this));
1682
+ this._fMediator.execute(new RemoveOutputFromStoreRequest(this));
1667
1683
  }
1668
1684
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FNodeOutputDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1669
1685
  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 });
@@ -1933,13 +1949,15 @@ class FConnectionTextPathDirective {
1933
1949
  this.fBrowser = fBrowser;
1934
1950
  }
1935
1951
  ngOnInit() {
1936
- this.hostElement.setAttribute('startOffset', this.base.fTextStartOffset || '50%');
1937
1952
  this.hostElement.setAttribute('text-anchor', `middle`);
1938
1953
  this.symbolWidth = this.getSymbolWidth(this.base.fText || '');
1939
1954
  }
1940
1955
  getBBox() {
1941
1956
  return this.hostElement.getBBox();
1942
1957
  }
1958
+ redraw() {
1959
+ this.hostElement.setAttribute('startOffset', this.base.fTextStartOffset || '50%');
1960
+ }
1943
1961
  getFontStyles(element) {
1944
1962
  const computedStyles = this.fBrowser.window.getComputedStyle(element);
1945
1963
  return {
@@ -2003,6 +2021,7 @@ class FConnectionTextComponent {
2003
2021
  this.base = base;
2004
2022
  }
2005
2023
  redraw(line) {
2024
+ this.textPathDirective.redraw();
2006
2025
  const isTextReverse = FConnectionTextComponent.isTextReverse(line);
2007
2026
  const dyValue = this.calculateDy(this.textPathDirective.fontSize, isTextReverse);
2008
2027
  this.hostElement.setAttribute('dy', dyValue);
@@ -2324,10 +2343,10 @@ class FConnectionBase extends MIXIN_BASE {
2324
2343
  getTransform(position) {
2325
2344
  return `position: absolute; pointerEvents: all; transform: translate(-50%, -50%); left: ${position.x}px; top: ${position.y}px`;
2326
2345
  }
2327
- selectChild() {
2346
+ markChildrenAsSelected() {
2328
2347
  this.fPath.select();
2329
2348
  }
2330
- deselectChild() {
2349
+ unmarkChildrenAsSelected() {
2331
2350
  this.fPath.deselect();
2332
2351
  }
2333
2352
  redraw() {
@@ -2400,16 +2419,16 @@ class FConnectionForCreateComponent extends FConnectionBase {
2400
2419
  super(elementReference, fConnectionFactory);
2401
2420
  }
2402
2421
  ngOnInit() {
2403
- this._fMediator.send(new AddConnectionForCreateToStoreRequest(this));
2422
+ this._fMediator.execute(new AddConnectionForCreateToStoreRequest(this));
2404
2423
  }
2405
2424
  ngAfterViewInit() {
2406
2425
  this.hide();
2407
2426
  }
2408
2427
  ngOnChanges() {
2409
- this._fMediator.send(new NotifyDataChangedRequest());
2428
+ this._fMediator.execute(new NotifyDataChangedRequest());
2410
2429
  }
2411
2430
  ngOnDestroy() {
2412
- this._fMediator.send(new RemoveConnectionForCreateFromStoreRequest());
2431
+ this._fMediator.execute(new RemoveConnectionForCreateFromStoreRequest());
2413
2432
  }
2414
2433
  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 });
2415
2434
  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 });
@@ -2491,13 +2510,13 @@ class FConnectionComponent extends FConnectionBase {
2491
2510
  super(elementReference, fConnectionFactory);
2492
2511
  }
2493
2512
  ngOnInit() {
2494
- this._fMediator.send(new AddConnectionToStoreRequest(this));
2513
+ this._fMediator.execute(new AddConnectionToStoreRequest(this));
2495
2514
  }
2496
2515
  ngOnChanges() {
2497
- this._fMediator.send(new NotifyDataChangedRequest());
2516
+ this._fMediator.execute(new NotifyDataChangedRequest());
2498
2517
  }
2499
2518
  ngOnDestroy() {
2500
- this._fMediator.send(new RemoveConnectionFromStoreRequest(this));
2519
+ this._fMediator.execute(new RemoveConnectionFromStoreRequest(this));
2501
2520
  }
2502
2521
  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 });
2503
2522
  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 });
@@ -2604,10 +2623,10 @@ class FMarkerDirective extends FMarkerBase {
2604
2623
  this.hostElement.style.display = 'none';
2605
2624
  }
2606
2625
  ngOnInit() {
2607
- this._fMediator.send(new AddConnectionMarkerToStoreRequest(this));
2626
+ this._fMediator.execute(new AddConnectionMarkerToStoreRequest(this));
2608
2627
  }
2609
2628
  ngOnDestroy() {
2610
- this._fMediator.send(new RemoveConnectionMarkerFromStoreRequest(this));
2629
+ this._fMediator.execute(new RemoveConnectionMarkerFromStoreRequest(this));
2611
2630
  }
2612
2631
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FMarkerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2613
2632
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: FMarkerDirective, selector: "svg[fMarker]", inputs: { hostElement: "hostElement", width: "width", height: "height", refX: "refX", refY: "refY", type: "type", orient: "orient", markerUnits: "markerUnits" }, host: { classAttribute: "f-component f-marker" }, providers: [{ provide: F_MARKER, useExisting: FMarkerDirective }], usesInheritance: true, ngImport: i0 });
@@ -2671,16 +2690,16 @@ class FSnapConnectionComponent extends FConnectionBase {
2671
2690
  super(elementReference, fConnectionFactory);
2672
2691
  }
2673
2692
  ngOnInit() {
2674
- this._fMediator.send(new AddSnapConnectionToStoreRequest(this));
2693
+ this._fMediator.execute(new AddSnapConnectionToStoreRequest(this));
2675
2694
  }
2676
2695
  ngAfterViewInit() {
2677
2696
  this.hide();
2678
2697
  }
2679
2698
  ngOnChanges() {
2680
- this._fMediator.send(new NotifyDataChangedRequest());
2699
+ this._fMediator.execute(new NotifyDataChangedRequest());
2681
2700
  }
2682
2701
  ngOnDestroy() {
2683
- this._fMediator.send(new RemoveSnapConnectionFromStoreRequest());
2702
+ this._fMediator.execute(new RemoveSnapConnectionFromStoreRequest());
2684
2703
  }
2685
2704
  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 });
2686
2705
  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 });
@@ -2836,7 +2855,7 @@ let GetNormalizedElementRectExecution = class GetNormalizedElementRectExecution
2836
2855
  return new RoundedRect(position.x, position.y, size.width, size.height, systemRect.radius1, systemRect.radius2, systemRect.radius3, systemRect.radius4);
2837
2856
  }
2838
2857
  _getElementRoundedRect(request) {
2839
- return request.isRoundedRect ? this._fMediator.send(new GetElementRoundedRectRequest(request.element)) : RoundedRect.fromRect(RectExtensions.fromElement(request.element));
2858
+ return request.isRoundedRect ? this._fMediator.execute(new GetElementRoundedRectRequest(request.element)) : RoundedRect.fromRect(RectExtensions.fromElement(request.element));
2840
2859
  }
2841
2860
  _normalizePosition(rect) {
2842
2861
  return Point.fromPoint(rect).elementTransform(this._fComponentsStore.flowHost).sub(this._transform.scaledPosition).sub(this._transform.position).div(this._transform.scale);
@@ -2888,13 +2907,13 @@ let RedrawConnectionsExecution = class RedrawConnectionsExecution {
2888
2907
  this.setMarkers(connection);
2889
2908
  connection.setLine(line.point1, output.fConnectableSide, line.point2, input.fConnectableSide);
2890
2909
  connection.initialize();
2891
- connection.isSelected() ? connection.select() : null;
2910
+ connection.isSelected() ? connection.markAsSelected() : null;
2892
2911
  }
2893
2912
  getLine(output, input, connection) {
2894
2913
  return this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this.fMediator.execute(new GetNormalizedElementRectRequest(output.hostElement, true)), this.fMediator.execute(new GetNormalizedElementRectRequest(input.hostElement, true)), connection.fBehavior, output.fConnectableSide, input.fConnectableSide));
2895
2914
  }
2896
2915
  setMarkers(connection) {
2897
- this.fMediator.send(new CreateConnectionMarkersRequest(connection));
2916
+ this.fMediator.execute(new CreateConnectionMarkersRequest(connection));
2898
2917
  }
2899
2918
  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 });
2900
2919
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: RedrawConnectionsExecution });
@@ -3297,39 +3316,43 @@ function RequiredOutput() {
3297
3316
  }
3298
3317
 
3299
3318
  class GetCanBeConnectedOutputByOutletRequest {
3300
- outlet;
3301
- constructor(outlet) {
3302
- this.outlet = outlet;
3319
+ fOutlet;
3320
+ constructor(fOutlet) {
3321
+ this.fOutlet = fOutlet;
3303
3322
  }
3304
3323
  }
3305
3324
 
3306
3325
  let GetCanBeConnectedOutputByOutletExecution = class GetCanBeConnectedOutputByOutletExecution {
3307
- fComponentsStore;
3308
- get fNodes() {
3309
- return this.fComponentsStore.fNodes;
3310
- }
3311
- get fOutputs() {
3312
- return this.fComponentsStore.fOutputs;
3326
+ _fComponentStore = inject(FComponentsStore);
3327
+ get _fNodes() {
3328
+ return this._fComponentStore.fNodes;
3313
3329
  }
3314
- constructor(fComponentsStore) {
3315
- this.fComponentsStore = fComponentsStore;
3330
+ get _fOutputs() {
3331
+ return this._fComponentStore.fOutputs;
3316
3332
  }
3333
+ _fNode;
3317
3334
  handle(request) {
3318
- const outputs = this.getConnectableOutputs(this.getNode(request.outlet));
3319
- if (!outputs.length) {
3320
- throw RequiredOutput();
3335
+ if (!this._isValid(request)) {
3336
+ return;
3321
3337
  }
3322
- return outputs.length > 0 ? outputs[0] : undefined;
3338
+ const fOutputs = this._getConnectableOutputs();
3339
+ if (!fOutputs.length) {
3340
+ throw new Error('The fNode must contain at least one fOutput if there is an fOutlet');
3341
+ }
3342
+ return fOutputs[0];
3323
3343
  }
3324
- getConnectableOutputs(node) {
3325
- return this.fOutputs.filter((x) => {
3326
- return node.isContains(x.hostElement) && x.canBeConnected;
3327
- });
3344
+ _isValid(request) {
3345
+ return !!this._getNode(request.fOutlet);
3346
+ }
3347
+ _getNode(fOutlet) {
3348
+ this._fNode = this._fNodes.find((x) => x.isContains(fOutlet.hostElement));
3349
+ return this._fNode;
3328
3350
  }
3329
- getNode(outlet) {
3330
- return this.fNodes.find((x) => x.isContains(outlet.hostElement));
3351
+ _getConnectableOutputs() {
3352
+ return this._fOutputs
3353
+ .filter((x) => this._fNode.isContains(x.hostElement) && x.canBeConnected);
3331
3354
  }
3332
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetCanBeConnectedOutputByOutletExecution, deps: [{ token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Injectable });
3355
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetCanBeConnectedOutputByOutletExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3333
3356
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetCanBeConnectedOutputByOutletExecution });
3334
3357
  };
3335
3358
  GetCanBeConnectedOutputByOutletExecution = __decorate([
@@ -3337,28 +3360,7 @@ GetCanBeConnectedOutputByOutletExecution = __decorate([
3337
3360
  ], GetCanBeConnectedOutputByOutletExecution);
3338
3361
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetCanBeConnectedOutputByOutletExecution, decorators: [{
3339
3362
  type: Injectable
3340
- }], ctorParameters: () => [{ type: FComponentsStore }] });
3341
-
3342
- let GetCanBeConnectedOutputByOutletValidator = class GetCanBeConnectedOutputByOutletValidator {
3343
- fComponentsStore;
3344
- get fNodes() {
3345
- return this.fComponentsStore.fNodes;
3346
- }
3347
- constructor(fComponentsStore) {
3348
- this.fComponentsStore = fComponentsStore;
3349
- }
3350
- handle(request) {
3351
- return !!this.fNodes.find((x) => x.isContains(request.outlet.hostElement));
3352
- }
3353
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetCanBeConnectedOutputByOutletValidator, deps: [{ token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Injectable });
3354
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetCanBeConnectedOutputByOutletValidator });
3355
- };
3356
- GetCanBeConnectedOutputByOutletValidator = __decorate([
3357
- FValidatorRegister(GetCanBeConnectedOutputByOutletRequest)
3358
- ], GetCanBeConnectedOutputByOutletValidator);
3359
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetCanBeConnectedOutputByOutletValidator, decorators: [{
3360
- type: Injectable
3361
- }], ctorParameters: () => [{ type: FComponentsStore }] });
3363
+ }] });
3362
3364
 
3363
3365
  class FCreateConnectionEvent {
3364
3366
  fOutputId;
@@ -3371,10 +3373,29 @@ class FCreateConnectionEvent {
3371
3373
  }
3372
3374
  }
3373
3375
 
3376
+ class FInjector {
3377
+ static _injector;
3378
+ static set(injector) {
3379
+ this._injector = injector;
3380
+ }
3381
+ static clear() {
3382
+ this._injector = undefined;
3383
+ }
3384
+ static get() {
3385
+ if (!this._injector) {
3386
+ throw new Error('No injector available');
3387
+ }
3388
+ return this._injector;
3389
+ }
3390
+ }
3391
+ function fInject(token) {
3392
+ return FInjector.get().get(token);
3393
+ }
3394
+
3374
3395
  class CreateConnectionDragHandler {
3375
- _fMediator;
3376
- _fComponentsStore;
3377
- _fOutput;
3396
+ _fOutputOrOutlet;
3397
+ _fMediator = fInject(FMediator);
3398
+ _fComponentsStore = fInject(FComponentsStore);
3378
3399
  _toConnectorRect = new RoundedRect();
3379
3400
  get _fConnection() {
3380
3401
  return this._fComponentsStore.fTempConnection;
@@ -3384,33 +3405,31 @@ class CreateConnectionDragHandler {
3384
3405
  }
3385
3406
  _fOutputWithRect;
3386
3407
  _canBeConnectedInputs = [];
3387
- constructor(_fMediator, _fComponentsStore, _fOutput, _onPointerDownPosition) {
3388
- this._fMediator = _fMediator;
3389
- this._fComponentsStore = _fComponentsStore;
3390
- this._fOutput = _fOutput;
3408
+ constructor(_fOutputOrOutlet, _onPointerDownPosition) {
3409
+ this._fOutputOrOutlet = _fOutputOrOutlet;
3391
3410
  this._toConnectorRect = RoundedRect.fromRect(RectExtensions.initialize(_onPointerDownPosition.x, _onPointerDownPosition.y));
3392
3411
  }
3393
3412
  prepareDragSequence() {
3394
3413
  this._getAndMarkCanBeConnectedInputs();
3395
3414
  this._initializeSnapConnection();
3396
3415
  this._initializeConnectionForCreate();
3397
- this._fOutputWithRect = this._fMediator.execute(new GetConnectorAndRectRequest(this._fOutput));
3416
+ this._fOutputWithRect = this._fMediator.execute(new GetConnectorAndRectRequest(this._fOutputOrOutlet));
3398
3417
  this._fConnection.show();
3399
3418
  this.onPointerMove(PointExtensions.initialize());
3400
3419
  }
3401
3420
  _getAndMarkCanBeConnectedInputs() {
3402
- this._canBeConnectedInputs = this._fMediator.execute(new GetAllCanBeConnectedInputsAndRectsRequest(this._fOutput));
3421
+ this._canBeConnectedInputs = this._fMediator.execute(new GetAllCanBeConnectedInputsAndRectsRequest(this._fOutputOrOutlet));
3403
3422
  this._fMediator.execute(new MarkAllCanBeConnectedInputsRequest(this._canBeConnectedInputs.map((x) => x.fConnector)));
3404
3423
  }
3405
3424
  _initializeSnapConnection() {
3406
3425
  if (!this._fSnapConnection) {
3407
3426
  return;
3408
3427
  }
3409
- this._fSnapConnection.fOutputId = this._fOutput.fId;
3428
+ this._fSnapConnection.fOutputId = this._fOutputOrOutlet.fId;
3410
3429
  this._fSnapConnection.initialize();
3411
3430
  }
3412
3431
  _initializeConnectionForCreate() {
3413
- this._fConnection.fOutputId = this._fOutput.fId;
3432
+ this._fConnection.fOutputId = this._fOutputOrOutlet.fId;
3414
3433
  this._fConnection.initialize();
3415
3434
  }
3416
3435
  onPointerMove(difference) {
@@ -3451,7 +3470,7 @@ class CreateConnectionDragHandler {
3451
3470
  getData() {
3452
3471
  return {
3453
3472
  toConnectorRect: this._toConnectorRect,
3454
- fOutputId: this._fOutput.fId,
3473
+ fOutputId: this._fOutputOrOutlet.fId,
3455
3474
  canBeConnectedInputs: this._canBeConnectedInputs
3456
3475
  };
3457
3476
  }
@@ -3483,7 +3502,7 @@ let CreateConnectionFinalizeExecution = class CreateConnectionFinalizeExecution
3483
3502
  if (!output) {
3484
3503
  throw OutputNotFound(this._getDragHandlerData().fOutputId);
3485
3504
  }
3486
- return isNodeOutlet(output.hostElement) ? this.fMediator.send(new GetCanBeConnectedOutputByOutletRequest(output)) : output;
3505
+ return isNodeOutlet(output.hostElement) ? this.fMediator.execute(new GetCanBeConnectedOutputByOutletRequest(output)) : output;
3487
3506
  }
3488
3507
  getOutput() {
3489
3508
  return this.fComponentsStore.fOutputs.find((x) => x.fId === this._getDragHandlerData().fOutputId);
@@ -3495,7 +3514,7 @@ let CreateConnectionFinalizeExecution = class CreateConnectionFinalizeExecution
3495
3514
  this.fComponentsStore.fDraggable?.fCreateConnection.emit(new FCreateConnectionEvent(this.getTargetOutput(this.getOutput() || this.getOutlet()).fId, this._getInputUnderPointer(event)?.fId, event.getPosition()));
3496
3515
  }
3497
3516
  _getInputUnderPointer(event) {
3498
- return this.fMediator.send(new FindInputAtPositionRequest(event.getPosition(), this._getDragHandlerData().toConnectorRect, this._getDragHandlerData().canBeConnectedInputs));
3517
+ return this.fMediator.execute(new FindInputAtPositionRequest(event.getPosition(), this._getDragHandlerData().toConnectorRect, this._getDragHandlerData().canBeConnectedInputs));
3499
3518
  }
3500
3519
  _getDragHandlerData() {
3501
3520
  return this._fDragHandler.getData();
@@ -3510,94 +3529,90 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
3510
3529
  type: Injectable
3511
3530
  }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2$1.FMediator }] });
3512
3531
 
3513
- class CreateConnectionDragHandlerRequest {
3532
+ class CreateConnectionDragHandlerPreparationRequest {
3514
3533
  onPointerDownPosition;
3515
- fOutput;
3516
- constructor(onPointerDownPosition, fOutput) {
3534
+ fOutputOrOutlet;
3535
+ constructor(onPointerDownPosition, fOutputOrOutlet) {
3517
3536
  this.onPointerDownPosition = onPointerDownPosition;
3518
- this.fOutput = fOutput;
3537
+ this.fOutputOrOutlet = fOutputOrOutlet;
3519
3538
  }
3520
3539
  }
3521
3540
 
3522
- let CreateConnectionDragHandlerExecution = class CreateConnectionDragHandlerExecution {
3523
- fComponentsStore;
3524
- fDraggableDataContext;
3525
- fMediator;
3526
- get flowHost() {
3527
- return this.fComponentsStore.flowHost;
3528
- }
3529
- get transform() {
3530
- return this.fComponentsStore.fCanvas.transform;
3541
+ let CreateConnectionDragHandlerPreparationExecution = class CreateConnectionDragHandlerPreparationExecution {
3542
+ _fComponentsStore = inject(FComponentsStore);
3543
+ _fDraggableDataContext = inject(FDraggableDataContext);
3544
+ get _fHost() {
3545
+ return this._fComponentsStore.fFlow.hostElement;
3531
3546
  }
3532
- constructor(fComponentsStore, fDraggableDataContext, fMediator) {
3533
- this.fComponentsStore = fComponentsStore;
3534
- this.fDraggableDataContext = fDraggableDataContext;
3535
- this.fMediator = fMediator;
3547
+ get _transform() {
3548
+ return this._fComponentsStore.fCanvas.transform;
3536
3549
  }
3537
3550
  handle(request) {
3538
- this.fDraggableDataContext.onPointerDownScale = this.transform.scale;
3551
+ this._fDraggableDataContext.onPointerDownScale = this._transform.scale;
3539
3552
  const positionRelativeToFlowComponent = Point.fromPoint(request.onPointerDownPosition)
3540
- .elementTransform(this.flowHost).div(this.transform.scale);
3541
- this.fDraggableDataContext.onPointerDownPosition = positionRelativeToFlowComponent;
3542
- const positionRelativeToCanvasComponent = Point.fromPoint(positionRelativeToFlowComponent).mult(this.transform.scale)
3543
- .sub(this.transform.position).sub(this.transform.scaledPosition).div(this.transform.scale);
3544
- this.fDraggableDataContext.draggableItems = [
3545
- new CreateConnectionDragHandler(this.fMediator, this.fComponentsStore, request.fOutput, positionRelativeToCanvasComponent)
3553
+ .elementTransform(this._fHost).div(this._transform.scale);
3554
+ this._fDraggableDataContext.onPointerDownPosition = positionRelativeToFlowComponent;
3555
+ const positionRelativeToCanvasComponent = Point.fromPoint(positionRelativeToFlowComponent).mult(this._transform.scale)
3556
+ .sub(this._transform.position).sub(this._transform.scaledPosition).div(this._transform.scale);
3557
+ this._fDraggableDataContext.draggableItems = [
3558
+ new CreateConnectionDragHandler(request.fOutputOrOutlet, positionRelativeToCanvasComponent)
3546
3559
  ];
3547
3560
  }
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 });
3549
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionDragHandlerExecution });
3561
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionDragHandlerPreparationExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3562
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionDragHandlerPreparationExecution });
3550
3563
  };
3551
- CreateConnectionDragHandlerExecution = __decorate([
3552
- FExecutionRegister(CreateConnectionDragHandlerRequest)
3553
- ], CreateConnectionDragHandlerExecution);
3554
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionDragHandlerExecution, decorators: [{
3564
+ CreateConnectionDragHandlerPreparationExecution = __decorate([
3565
+ FExecutionRegister(CreateConnectionDragHandlerPreparationRequest)
3566
+ ], CreateConnectionDragHandlerPreparationExecution);
3567
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionDragHandlerPreparationExecution, decorators: [{
3555
3568
  type: Injectable
3556
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2$1.FMediator }] });
3569
+ }] });
3557
3570
 
3558
3571
  class CreateConnectionFromOutletPreparationRequest {
3559
3572
  event;
3560
- constructor(event) {
3573
+ fNode;
3574
+ constructor(event, fNode) {
3561
3575
  this.event = event;
3576
+ this.fNode = fNode;
3562
3577
  }
3563
3578
  }
3564
3579
 
3565
3580
  let CreateConnectionFromOutletPreparationExecution = class CreateConnectionFromOutletPreparationExecution {
3566
- fComponentsStore;
3567
- fMediator;
3568
- constructor(fComponentsStore, fMediator) {
3569
- this.fComponentsStore = fComponentsStore;
3570
- this.fMediator = fMediator;
3571
- }
3581
+ _fMediator = inject(FMediator);
3582
+ _fComponentsStore = inject(FComponentsStore);
3572
3583
  handle(request) {
3573
- const { event } = request;
3574
- const node = this.fComponentsStore
3575
- .fNodes.find(n => n.isContains(event.targetElement));
3576
- const outlet = this.fComponentsStore.fOutlets.find((x) => {
3577
- return x.hostElement.contains(event.targetElement);
3578
- });
3579
- if (!outlet) {
3580
- throw new Error('Outlet not found');
3584
+ const fOutlet = this._getNodeOutlet(request.fNode);
3585
+ const fOutputs = this._getNodeOutputs(request.fNode);
3586
+ fOutlet.setOutputs(fOutputs);
3587
+ if (!fOutlet.canBeConnected) {
3588
+ return;
3581
3589
  }
3582
- const nodeOutputs = this.fComponentsStore.fOutputs.filter((x) => node.isContains(x.hostElement));
3583
- outlet.setOutputs(nodeOutputs);
3584
- if (outlet.canBeConnected) {
3585
- if (outlet.isConnectionFromOutlet) {
3586
- this.createDragHandler(event.getPosition(), outlet);
3587
- }
3588
- else {
3589
- const output = this.fMediator.send(new GetCanBeConnectedOutputByOutletRequest(outlet));
3590
- if (!output) {
3591
- throw RequiredOutput();
3592
- }
3593
- this.createDragHandler(event.getPosition(), output);
3594
- }
3590
+ if (fOutlet.isConnectionFromOutlet) {
3591
+ this._createDragHandler(request.event.getPosition(), fOutlet);
3592
+ }
3593
+ else {
3594
+ this._createDragHandler(request.event.getPosition(), this._getConnectableOutput(fOutlet));
3595
+ }
3596
+ }
3597
+ _getNodeOutlet(fNode) {
3598
+ const result = this._fComponentsStore.fOutlets
3599
+ .find((x) => fNode.isContains(x.hostElement));
3600
+ if (!result) {
3601
+ throw new Error('Outlet not found');
3595
3602
  }
3603
+ return result;
3604
+ }
3605
+ _getNodeOutputs(fNode) {
3606
+ return this._fComponentsStore.fOutputs
3607
+ .filter((x) => fNode.isContains(x.hostElement));
3608
+ }
3609
+ _createDragHandler(position, fOutputOrOutlet) {
3610
+ this._fMediator.execute(new CreateConnectionDragHandlerPreparationRequest(position, fOutputOrOutlet));
3596
3611
  }
3597
- createDragHandler(position, fOutput) {
3598
- this.fMediator.send(new CreateConnectionDragHandlerRequest(position, fOutput));
3612
+ _getConnectableOutput(fOutlet) {
3613
+ return this._fMediator.execute(new GetCanBeConnectedOutputByOutletRequest(fOutlet));
3599
3614
  }
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 });
3615
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutletPreparationExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3601
3616
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutletPreparationExecution });
3602
3617
  };
3603
3618
  CreateConnectionFromOutletPreparationExecution = __decorate([
@@ -3605,38 +3620,48 @@ CreateConnectionFromOutletPreparationExecution = __decorate([
3605
3620
  ], CreateConnectionFromOutletPreparationExecution);
3606
3621
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutletPreparationExecution, decorators: [{
3607
3622
  type: Injectable
3608
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2$1.FMediator }] });
3623
+ }] });
3609
3624
 
3610
3625
  class CreateConnectionFromOutputPreparationRequest {
3611
3626
  event;
3612
- constructor(event) {
3627
+ fNode;
3628
+ constructor(event, fNode) {
3613
3629
  this.event = event;
3630
+ this.fNode = fNode;
3614
3631
  }
3615
3632
  }
3616
3633
 
3617
3634
  let CreateConnectionFromOutputPreparationExecution = class CreateConnectionFromOutputPreparationExecution {
3618
- fComponentsStore;
3619
- fMediator;
3620
- constructor(fComponentsStore, fMediator) {
3621
- this.fComponentsStore = fComponentsStore;
3622
- this.fMediator = fMediator;
3623
- }
3635
+ _fMediator = inject(FMediator);
3636
+ _fComponentsStore = inject(FComponentsStore);
3624
3637
  handle(request) {
3625
- const { event } = request;
3626
- const fOutput = this.fComponentsStore.fOutputs.find((x) => {
3627
- return x.hostElement.contains(event.targetElement);
3628
- });
3629
- if (!fOutput) {
3630
- throw new Error('Output not found');
3638
+ if (!this._isValid(request)) {
3639
+ return;
3631
3640
  }
3641
+ const fOutput = this._getOutput(request.event.targetElement);
3632
3642
  if (fOutput.canBeConnected) {
3633
- this.createDragHandler(event.getPosition(), fOutput);
3643
+ this._fMediator.execute(new CreateConnectionDragHandlerPreparationRequest(request.event.getPosition(), fOutput));
3634
3644
  }
3635
3645
  }
3636
- createDragHandler(position, fOutput) {
3637
- this.fMediator.send(new CreateConnectionDragHandlerRequest(position, fOutput));
3646
+ _isValid(request) {
3647
+ return this._isNodeOutput(request.event.targetElement, request.fNode);
3648
+ }
3649
+ _isNodeOutput(element, fNode) {
3650
+ return isNodeOutput(element) && !this._getNodeOutlets(fNode).length;
3651
+ }
3652
+ _getNodeOutlets(node) {
3653
+ return this._fComponentsStore.fOutlets
3654
+ .filter((x) => node.isContains(x.hostElement));
3655
+ }
3656
+ _getOutput(element) {
3657
+ const result = this._fComponentsStore.fOutputs
3658
+ .find((x) => x.hostElement.contains(element));
3659
+ if (!result) {
3660
+ throw new Error('Output not found');
3661
+ }
3662
+ return result;
3638
3663
  }
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 });
3664
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutputPreparationExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3640
3665
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutputPreparationExecution });
3641
3666
  };
3642
3667
  CreateConnectionFromOutputPreparationExecution = __decorate([
@@ -3644,40 +3669,14 @@ CreateConnectionFromOutputPreparationExecution = __decorate([
3644
3669
  ], CreateConnectionFromOutputPreparationExecution);
3645
3670
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutputPreparationExecution, decorators: [{
3646
3671
  type: Injectable
3647
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2$1.FMediator }] });
3648
-
3649
- let CreateConnectionFromOutputPreparationValidator = class CreateConnectionFromOutputPreparationValidator {
3650
- fComponentsStore;
3651
- constructor(fComponentsStore) {
3652
- this.fComponentsStore = fComponentsStore;
3653
- }
3654
- handle(request) {
3655
- return this.isNodeOutput(request.event.targetElement, this.getNode(request.event));
3656
- }
3657
- getNode(event) {
3658
- return this.fComponentsStore
3659
- .fNodes.find(n => n.isContains(event.targetElement));
3660
- }
3661
- isNodeOutput(targetElement, node) {
3662
- return isNodeOutput(targetElement) && !this.getOutlets(node).length;
3663
- }
3664
- getOutlets(node) {
3665
- return this.fComponentsStore.fOutlets.filter((x) => node.isContains(x.hostElement));
3666
- }
3667
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutputPreparationValidator, deps: [{ token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Injectable });
3668
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutputPreparationValidator });
3669
- };
3670
- CreateConnectionFromOutputPreparationValidator = __decorate([
3671
- FValidatorRegister(CreateConnectionFromOutputPreparationRequest)
3672
- ], CreateConnectionFromOutputPreparationValidator);
3673
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionFromOutputPreparationValidator, decorators: [{
3674
- type: Injectable
3675
- }], ctorParameters: () => [{ type: FComponentsStore }] });
3672
+ }] });
3676
3673
 
3677
3674
  class CreateConnectionPreparationRequest {
3678
3675
  event;
3679
- constructor(event) {
3676
+ fTrigger;
3677
+ constructor(event, fTrigger) {
3680
3678
  this.event = event;
3679
+ this.fTrigger = fTrigger;
3681
3680
  }
3682
3681
  }
3683
3682
 
@@ -3685,32 +3684,28 @@ let CreateConnectionPreparationExecution = class CreateConnectionPreparationExec
3685
3684
  _fMediator = inject(FMediator);
3686
3685
  _fComponentsStore = inject(FComponentsStore);
3687
3686
  _fDraggableDataContext = inject(FDraggableDataContext);
3687
+ _fNode;
3688
3688
  handle(request) {
3689
3689
  if (!this._isValid(request)) {
3690
3690
  return;
3691
3691
  }
3692
3692
  if (isNodeOutlet(request.event.targetElement)) {
3693
- this._fMediator.send(new CreateConnectionFromOutletPreparationRequest(request.event));
3693
+ this._fMediator.execute(new CreateConnectionFromOutletPreparationRequest(request.event, this._fNode));
3694
3694
  }
3695
- else if (this._isNodeOutput(request.event.targetElement, this._getNode(request.event))) {
3696
- this._fMediator.send(new CreateConnectionFromOutputPreparationRequest(request.event));
3695
+ else if (isNodeOutput(request.event.targetElement)) {
3696
+ this._fMediator.execute(new CreateConnectionFromOutputPreparationRequest(request.event, this._fNode));
3697
3697
  }
3698
3698
  }
3699
3699
  _isValid(request) {
3700
3700
  return !!this._getNode(request.event) && this._isValidConditions();
3701
3701
  }
3702
3702
  _getNode(event) {
3703
- return this._fComponentsStore
3703
+ this._fNode = this._fComponentsStore
3704
3704
  .fNodes.find(n => n.isContains(event.targetElement));
3705
+ return this._fNode;
3705
3706
  }
3706
3707
  _isValidConditions() {
3707
- return !this._fDraggableDataContext.draggableItems.length && !!this._fComponentsStore.fTempConnection;
3708
- }
3709
- _isNodeOutput(targetElement, node) {
3710
- return isNodeOutput(targetElement) && !this._getOutlets(node).length;
3711
- }
3712
- _getOutlets(node) {
3713
- return this._fComponentsStore.fOutlets.filter((x) => node.isContains(x.hostElement));
3708
+ return this._fDraggableDataContext.isEmpty() && !!this._fComponentsStore.fTempConnection;
3714
3709
  }
3715
3710
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionPreparationExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3716
3711
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateConnectionPreparationExecution });
@@ -3730,9 +3725,9 @@ class ReassignConnectionFinalizeRequest {
3730
3725
  }
3731
3726
 
3732
3727
  class ReassignConnectionDragHandler {
3733
- _fMediator;
3734
- _fComponentsStore;
3735
3728
  _fConnection;
3729
+ _fMediator = fInject(FMediator);
3730
+ _fComponentsStore = fInject(FComponentsStore);
3736
3731
  _toConnectorRect = new RoundedRect();
3737
3732
  get _fSnapConnection() {
3738
3733
  return this._fComponentsStore.fSnapConnection;
@@ -3754,9 +3749,7 @@ class ReassignConnectionDragHandler {
3754
3749
  }
3755
3750
  return result;
3756
3751
  }
3757
- constructor(_fMediator, _fComponentsStore, _fConnection) {
3758
- this._fMediator = _fMediator;
3759
- this._fComponentsStore = _fComponentsStore;
3752
+ constructor(_fConnection) {
3760
3753
  this._fConnection = _fConnection;
3761
3754
  this._toConnectorRect = RoundedRect.fromRect(RectExtensions.initialize(this._fConnection.line.point2.x, this._fConnection.line.point2.y));
3762
3755
  }
@@ -3813,7 +3806,7 @@ class ReassignConnectionDragHandler {
3813
3806
  return fClosestInput && fClosestInput.distance < this._fSnapConnection.fSnapThreshold ? fClosestInput : undefined;
3814
3807
  }
3815
3808
  onPointerUp() {
3816
- this._drawConnection(this._fInputWithRect.fRect, this._fInputWithRect.fConnector.fConnectableSide);
3809
+ this._drawConnection(this._toConnectorRect, this._fInputWithRect.fConnector.fConnectableSide);
3817
3810
  this._fSnapConnection?.hide();
3818
3811
  this._fMediator.execute(new UnmarkAllCanBeConnectedInputsRequest(this._canBeConnectedInputs.map((x) => x.fConnector)));
3819
3812
  }
@@ -3872,7 +3865,7 @@ let ReassignConnectionFinalizeExecution = class ReassignConnectionFinalizeExecut
3872
3865
  this._emitReassignConnectionEvent(event, fInput);
3873
3866
  }
3874
3867
  _getInputUnderPointer(event) {
3875
- return this._fMediator.send(new FindInputAtPositionRequest(event.getPosition(), this._getDragHandlerData().toConnectorRect, this._getDragHandlerData().canBeConnectedInputs));
3868
+ return this._fMediator.execute(new FindInputAtPositionRequest(event.getPosition(), this._getDragHandlerData().toConnectorRect, this._getDragHandlerData().canBeConnectedInputs));
3876
3869
  }
3877
3870
  _isReassignToDifferentInput(fInput) {
3878
3871
  return this._fDragHandler.getConnection().fInputId !== fInput.fId;
@@ -3899,8 +3892,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
3899
3892
 
3900
3893
  class ReassignConnectionPreparationRequest {
3901
3894
  event;
3902
- constructor(event) {
3895
+ fTrigger;
3896
+ constructor(event, fTrigger) {
3903
3897
  this.event = event;
3898
+ this.fTrigger = fTrigger;
3904
3899
  }
3905
3900
  }
3906
3901
 
@@ -3926,7 +3921,7 @@ let ReassignConnectionPreparationExecution = class ReassignConnectionPreparation
3926
3921
  this._fDraggableDataContext.onPointerDownPosition = Point.fromPoint(request.event.getPosition())
3927
3922
  .elementTransform(this._fHost).div(this._transform.scale);
3928
3923
  this._fDraggableDataContext.draggableItems = [
3929
- new ReassignConnectionDragHandler(this._fMediator, this._fComponentsStore, this._fConnection)
3924
+ new ReassignConnectionDragHandler(this._fConnection)
3930
3925
  ];
3931
3926
  setTimeout(() => this._updateConnectionLayer());
3932
3927
  }
@@ -3967,12 +3962,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
3967
3962
 
3968
3963
  const CONNECTIONS_PROVIDERS = [
3969
3964
  CreateConnectionFinalizeExecution,
3970
- CreateConnectionDragHandlerExecution,
3965
+ CreateConnectionDragHandlerPreparationExecution,
3971
3966
  CreateConnectionFromOutletPreparationExecution,
3972
3967
  GetCanBeConnectedOutputByOutletExecution,
3973
- GetCanBeConnectedOutputByOutletValidator,
3974
3968
  CreateConnectionFromOutputPreparationExecution,
3975
- CreateConnectionFromOutputPreparationValidator,
3976
3969
  CreateConnectionPreparationExecution,
3977
3970
  ReassignConnectionFinalizeExecution,
3978
3971
  ReassignConnectionPreparationExecution,
@@ -4009,10 +4002,10 @@ let GetNormalizedParentNodeRectExecution = class GetNormalizedParentNodeRectExec
4009
4002
  return RectExtensions.initialize(rect.x + padding[0], rect.y + padding[1], rect.width - padding[0] - padding[2], rect.height - padding[1] - padding[3]);
4010
4003
  }
4011
4004
  _getNodeRect(fNode) {
4012
- return this.fMediator.send(new GetNormalizedElementRectRequest(fNode.hostElement, false));
4005
+ return this.fMediator.execute(new GetNormalizedElementRectRequest(fNode.hostElement, false));
4013
4006
  }
4014
4007
  getNodePadding(node, rect) {
4015
- return this.fMediator.send(new GetNodePaddingRequest(node, rect));
4008
+ return this.fMediator.execute(new GetNodePaddingRequest(node, rect));
4016
4009
  }
4017
4010
  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 });
4018
4011
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNormalizedParentNodeRectExecution });
@@ -4114,7 +4107,7 @@ let IsConnectionUnderNodeExecution = class IsConnectionUnderNodeExecution {
4114
4107
  return connectors.map((x) => x.fId);
4115
4108
  }
4116
4109
  _calculateConnectionsUnderNode(fNode) {
4117
- const fNodeRect = this._fMediator.send(new GetNormalizedElementRectRequest(fNode.hostElement, true));
4110
+ const fNodeRect = this._fMediator.execute(new GetNormalizedElementRectRequest(fNode.hostElement, true));
4118
4111
  return this._fComponentsStore.fConnections.filter((x) => this._isConnectionHasIntersectionsWithNode(x, fNodeRect));
4119
4112
  }
4120
4113
  _isConnectionHasIntersectionsWithNode(fConnection, fNodeRect) {
@@ -4157,19 +4150,122 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
4157
4150
  type: Injectable
4158
4151
  }] });
4159
4152
 
4160
- class CalculateCommonNodeMoveRestrictionsRequest {
4161
- restrictions;
4162
- constructor(restrictions) {
4163
- this.restrictions = restrictions;
4153
+ class BaseConnectionDragHandler {
4154
+ fConnection;
4155
+ _fMediator = fInject(FMediator);
4156
+ _fComponentStore = fInject(FComponentsStore);
4157
+ _fOutputWithRect;
4158
+ _fInputWithRect;
4159
+ get _fOutput() {
4160
+ const result = this._fComponentStore.fOutputs.find((x) => x.fId === this.fConnection.fOutputId);
4161
+ if (!result) {
4162
+ throw new Error(this._connectorNotFoundPrefix(`fOutput with id ${this.fConnection.fOutputId} not found`));
4163
+ }
4164
+ return result;
4165
+ }
4166
+ get _fInput() {
4167
+ const result = this._fComponentStore.fInputs.find((x) => x.fId === this.fConnection.fInputId);
4168
+ if (!result) {
4169
+ throw new Error(this._connectorNotFoundPrefix(`fInput with id ${this.fConnection.fInputId} not found`));
4170
+ }
4171
+ return result;
4172
+ }
4173
+ _sourceDifference = PointExtensions.initialize();
4174
+ _targetDifference = PointExtensions.initialize();
4175
+ constructor(fConnection) {
4176
+ this.fConnection = fConnection;
4177
+ this._initialize();
4178
+ }
4179
+ _initialize() {
4180
+ this._fOutputWithRect = this._fMediator.execute(new GetConnectorAndRectRequest(this._fOutput));
4181
+ this._fInputWithRect = this._fMediator.execute(new GetConnectorAndRectRequest(this._fInput));
4182
+ }
4183
+ setSourceDifference(difference) {
4184
+ this._sourceDifference = difference;
4185
+ }
4186
+ setTargetDifference(difference) {
4187
+ this._targetDifference = difference;
4188
+ }
4189
+ redraw() {
4190
+ this._redrawConnection(this._recalculateConnection());
4191
+ }
4192
+ _recalculateConnection() {
4193
+ return this._fMediator.execute(new CalculateConnectionLineByBehaviorRequest(RoundedRect.fromRoundedRect(this._fOutputWithRect.fRect).addPoint(this._sourceDifference), RoundedRect.fromRoundedRect(this._fInputWithRect.fRect).addPoint(this._targetDifference), this.fConnection.fBehavior, this._fOutputWithRect.fConnector.fConnectableSide, this._fInputWithRect.fConnector.fConnectableSide));
4194
+ }
4195
+ _redrawConnection(line) {
4196
+ this.fConnection.setLine(line.point1, this._fOutputWithRect.fConnector.fConnectableSide, line.point2, this._fInputWithRect.fConnector.fConnectableSide);
4197
+ this.fConnection.redraw();
4198
+ }
4199
+ _connectorNotFoundPrefix(message) {
4200
+ return `ConnectionDragHandler Error: Connection From (fOutput)${this.fConnection.fOutputId} To (fInput)${this.fConnection.fInputId}. ${message}. Please ensure that all f-connections are associated with existing connectors`;
4201
+ }
4202
+ }
4203
+
4204
+ class SourceConnectionDragHandler extends BaseConnectionDragHandler {
4205
+ constructor(fConnection) {
4206
+ super(fConnection);
4207
+ }
4208
+ setSourceDifference(difference) {
4209
+ super.setSourceDifference(difference);
4210
+ this.redraw();
4211
+ }
4212
+ }
4213
+
4214
+ class SourceTargetConnectionDragHandler extends BaseConnectionDragHandler {
4215
+ _callTracker = new Map();
4216
+ constructor(fConnection) {
4217
+ super(fConnection);
4218
+ }
4219
+ setSourceDifference(difference) {
4220
+ super.setSourceDifference(difference);
4221
+ this._checkAndTriggerAction();
4222
+ }
4223
+ setTargetDifference(difference) {
4224
+ super.setTargetDifference(difference);
4225
+ this._checkAndTriggerAction();
4226
+ }
4227
+ _checkAndTriggerAction() {
4228
+ if ([...this._callTracker.values()].every(Boolean)) {
4229
+ this._callTracker.clear();
4230
+ this.redraw();
4231
+ }
4232
+ }
4233
+ }
4234
+
4235
+ class TargetConnectionDragHandler extends BaseConnectionDragHandler {
4236
+ constructor(fConnection) {
4237
+ super(fConnection);
4238
+ }
4239
+ setTargetDifference(difference) {
4240
+ super.setTargetDifference(difference);
4241
+ this.redraw();
4242
+ }
4243
+ }
4244
+
4245
+ class CalculateCommonNodeMoveLimitsRequest {
4246
+ limits;
4247
+ constructor(limits) {
4248
+ this.limits = limits;
4164
4249
  }
4165
4250
  }
4166
4251
 
4167
- let CalculateCommonNodeMoveRestrictionsExecution = class CalculateCommonNodeMoveRestrictionsExecution {
4252
+ let CalculateCommonNodeMoveLimitsExecution = class CalculateCommonNodeMoveLimitsExecution {
4253
+ _fComponentsStore = inject(FComponentsStore);
4254
+ get _vCellSize() {
4255
+ return this._fComponentsStore.fDraggable.vCellSize;
4256
+ }
4257
+ get _hCellSize() {
4258
+ return this._fComponentsStore.fDraggable.hCellSize;
4259
+ }
4168
4260
  handle(request) {
4169
- return this._calculateCommonRestrictions(request.restrictions);
4261
+ return this._calculateCommonLimits(request.limits);
4170
4262
  }
4171
- _calculateCommonRestrictions(restrictions) {
4172
- return restrictions.reduce((result, x) => this._clampRestrictions(result, x), restrictions[0]);
4263
+ _calculateCommonLimits(limits) {
4264
+ this._snapLimitToGrid(limits[0]);
4265
+ return limits.reduce((result, x) => {
4266
+ this._snapLimitToGrid(x);
4267
+ return this._clampRestrictions(result, x);
4268
+ }, limits[0]);
4173
4269
  }
4174
4270
  _clampRestrictions(common, x) {
4175
4271
  common.min = this._clampMinRestrictions(common.min, x.min);
@@ -4188,246 +4284,146 @@ let CalculateCommonNodeMoveRestrictionsExecution = class CalculateCommonNodeMove
4188
4284
  y: Math.min(common.y, node.y),
4189
4285
  };
4190
4286
  }
4191
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateCommonNodeMoveRestrictionsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4192
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateCommonNodeMoveRestrictionsExecution });
4287
+ _snapLimitToGrid(restriction) {
4288
+ const { min, max, position } = restriction;
4289
+ restriction.min = {
4290
+ x: this._snapLimitToGridMinimum(position.x + min.x, this._hCellSize) - position.x,
4291
+ y: this._snapLimitToGridMinimum(position.y + min.y, this._vCellSize) - position.y,
4292
+ };
4293
+ restriction.max = {
4294
+ x: this._snapLimitToGridMaximum(position.x + max.x, this._hCellSize) - position.x,
4295
+ y: this._snapLimitToGridMaximum(position.y + max.y, this._vCellSize) - position.y,
4296
+ };
4297
+ }
4298
+ _snapLimitToGridMinimum(value, cellSize) {
4299
+ return Math.ceil(value / cellSize) * cellSize;
4300
+ }
4301
+ _snapLimitToGridMaximum(value, cellSize) {
4302
+ return Math.floor(value / cellSize) * cellSize;
4303
+ }
4304
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateCommonNodeMoveLimitsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4305
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateCommonNodeMoveLimitsExecution });
4193
4306
  };
4194
- CalculateCommonNodeMoveRestrictionsExecution = __decorate([
4195
- FExecutionRegister(CalculateCommonNodeMoveRestrictionsRequest)
4196
- ], CalculateCommonNodeMoveRestrictionsExecution);
4197
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateCommonNodeMoveRestrictionsExecution, decorators: [{
4307
+ CalculateCommonNodeMoveLimitsExecution = __decorate([
4308
+ FExecutionRegister(CalculateCommonNodeMoveLimitsRequest)
4309
+ ], CalculateCommonNodeMoveLimitsExecution);
4310
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateCommonNodeMoveLimitsExecution, decorators: [{
4198
4311
  type: Injectable
4199
4312
  }] });
4200
4313
 
4201
4314
  class PutInputConnectionHandlersToArrayRequest {
4202
- nodeDragHandler;
4315
+ fDragHandler;
4203
4316
  outputIds;
4204
4317
  result;
4205
- constructor(nodeDragHandler, outputIds, result) {
4206
- this.nodeDragHandler = nodeDragHandler;
4318
+ constructor(fDragHandler, outputIds, result) {
4319
+ this.fDragHandler = fDragHandler;
4207
4320
  this.outputIds = outputIds;
4208
4321
  this.result = result;
4209
4322
  }
4210
4323
  }
4211
4324
 
4212
- class ConnectionBaseDragHandler {
4213
- fMediator;
4214
- fComponentsStore;
4215
- connection;
4216
- fOutputWithRect;
4217
- fInputWithRect;
4218
- constructor(fMediator, fComponentsStore, connection) {
4219
- this.fMediator = fMediator;
4220
- this.fComponentsStore = fComponentsStore;
4221
- this.connection = connection;
4325
+ let PutInputConnectionHandlersToArrayExecution = class PutInputConnectionHandlersToArrayExecution {
4326
+ _fComponentsStore = inject(FComponentsStore);
4327
+ get _fConnections() {
4328
+ return this._fComponentsStore.fConnections;
4222
4329
  }
4223
- prepareDragSequence() {
4224
- this.fOutputWithRect = this.fMediator.send(new GetConnectorAndRectRequest(this.getOutput()));
4225
- this.fInputWithRect = this.fMediator.send(new GetConnectorAndRectRequest(this.getInput()));
4330
+ handle(request) {
4331
+ this._getInputConnections(request.fDragHandler.fNode).forEach((fConnection) => {
4332
+ this._createAndSetConnectionToNodeHandler(fConnection, request);
4333
+ });
4226
4334
  }
4227
- getOutput() {
4228
- const result = this.fComponentsStore.fOutputs.find((x) => x.fId === this.connection.fOutputId);
4229
- if (!result) {
4230
- throw new Error(this.connectorNotFoundPrefix(`fOutput with id ${this.connection.fOutputId} not found`));
4335
+ _getInputConnections(fNode) {
4336
+ const ids = new Set(this._getNodeInputIds(fNode));
4337
+ return this._fConnections.filter((x) => ids.has(x.fInputId));
4338
+ }
4339
+ _getNodeInputIds(fNode) {
4340
+ return this._fComponentsStore.fInputs
4341
+ .filter((x) => fNode.isContains(x.hostElement))
4342
+ .map((x) => x.fId);
4343
+ }
4344
+ _createAndSetConnectionToNodeHandler(fConnection, request) {
4345
+ let fHandler = this._getExistingConnectionHandler(request.result, fConnection);
4346
+ if (!fHandler) {
4347
+ fHandler = this._createConnectionHandler(request.outputIds, fConnection);
4348
+ request.result.push(fHandler);
4231
4349
  }
4232
- return result;
4350
+ request.fDragHandler.fTargetHandlers.push(fHandler);
4233
4351
  }
4234
- getInput() {
4235
- const result = this.fComponentsStore.fInputs.find((x) => x.fId === this.connection.fInputId);
4236
- if (!result) {
4237
- throw new Error(this.connectorNotFoundPrefix(`fInput with id ${this.connection.fInputId} not found`));
4352
+ _getExistingConnectionHandler(fHandlers, fConnection) {
4353
+ return fHandlers.find((x) => x.fConnection.fId === fConnection.fId);
4354
+ }
4355
+ _createConnectionHandler(outputIds, fConnection) {
4356
+ let result;
4357
+ if (outputIds.includes(fConnection.fOutputId)) {
4358
+ result = new SourceTargetConnectionDragHandler(fConnection);
4359
+ }
4360
+ else {
4361
+ result = new TargetConnectionDragHandler(fConnection);
4238
4362
  }
4239
4363
  return result;
4240
4364
  }
4241
- connectorNotFoundPrefix(message) {
4242
- return `ConnectionDragHandler Error: Connection From (fOutput)${this.connection.fOutputId} To (fInput)${this.connection.fInputId}. ${message}. Please ensure that all f-connections are associated with existing connectors`;
4365
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutInputConnectionHandlersToArrayExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4366
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutInputConnectionHandlersToArrayExecution });
4367
+ };
4368
+ PutInputConnectionHandlersToArrayExecution = __decorate([
4369
+ FExecutionRegister(PutInputConnectionHandlersToArrayRequest)
4370
+ ], PutInputConnectionHandlersToArrayExecution);
4371
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutInputConnectionHandlersToArrayExecution, decorators: [{
4372
+ type: Injectable
4373
+ }] });
4374
+
4375
+ class PutOutputConnectionHandlersToArrayRequest {
4376
+ fDragHandler;
4377
+ inputIds;
4378
+ result;
4379
+ constructor(fDragHandler, inputIds, result) {
4380
+ this.fDragHandler = fDragHandler;
4381
+ this.inputIds = inputIds;
4382
+ this.result = result;
4243
4383
  }
4244
- getRestrictedDifference(difference, restrictions) {
4245
- return {
4246
- x: Math.min(Math.max(difference.x, restrictions.min.x), restrictions.max.x),
4247
- y: Math.min(Math.max(difference.y, restrictions.min.y), restrictions.max.y)
4248
- };
4249
- }
4250
- redrawConnection(line) {
4251
- this.connection.setLine(line.point1, this.fOutputWithRect.fConnector.fConnectableSide, line.point2, this.fInputWithRect.fConnector.fConnectableSide);
4252
- this.connection.redraw();
4253
- }
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 });
4255
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: ConnectionBaseDragHandler, ngImport: i0 });
4256
4384
  }
4257
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ConnectionBaseDragHandler, decorators: [{
4258
- type: Directive
4259
- }], ctorParameters: () => [{ type: i2$1.FMediator }, { type: FComponentsStore }, { type: FConnectionBase }] });
4260
4385
 
4261
- class ConnectionDragHandler extends ConnectionBaseDragHandler {
4262
- sourceRestrictions;
4263
- targetRestrictions;
4264
- constructor(fMediator, fComponentsStore, connection) {
4265
- super(fMediator, fComponentsStore, connection);
4266
- }
4267
- setOutputRestrictions(restrictions) {
4268
- this.sourceRestrictions = restrictions;
4269
- }
4270
- setInputRestrictions(restrictions) {
4271
- this.targetRestrictions = restrictions;
4272
- }
4273
- onPointerMove(difference) {
4274
- this.redrawConnection(this.getNewLineValue(difference));
4275
- }
4276
- getNewLineValue(difference) {
4277
- return this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(RoundedRect.fromRoundedRect(this.fOutputWithRect.fRect).addPoint(this.getRestrictedDifference({ ...difference }, this.sourceRestrictions)), RoundedRect.fromRoundedRect(this.fInputWithRect.fRect).addPoint(this.getRestrictedDifference({ ...difference }, this.targetRestrictions)), this.connection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, this.fInputWithRect.fConnector.fConnectableSide));
4278
- }
4279
- }
4280
-
4281
- class ConnectionTargetDragHandler extends ConnectionBaseDragHandler {
4282
- restrictions;
4283
- constructor(fMediator, fComponentsStore, connection, restrictions) {
4284
- super(fMediator, fComponentsStore, connection);
4285
- this.restrictions = restrictions;
4286
- }
4287
- onPointerMove(difference) {
4288
- this.redrawConnection(this.getNewLineValue(difference));
4289
- }
4290
- getNewLineValue(difference) {
4291
- return this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(this.fOutputWithRect.fRect, RoundedRect.fromRoundedRect(this.fInputWithRect.fRect).addPoint(this.getRestrictedDifference({ ...difference }, this.restrictions)), this.connection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, this.fInputWithRect.fConnector.fConnectableSide));
4292
- }
4293
- }
4294
-
4295
- let PutInputConnectionHandlersToArrayExecution = class PutInputConnectionHandlersToArrayExecution {
4296
- _fMediator = inject(FMediator);
4386
+ let PutOutputConnectionHandlersToArrayExecution = class PutOutputConnectionHandlersToArrayExecution {
4297
4387
  _fComponentsStore = inject(FComponentsStore);
4298
4388
  get _fConnections() {
4299
4389
  return this._fComponentsStore.fConnections;
4300
4390
  }
4301
4391
  handle(request) {
4302
- this.getInputConnections(request.nodeDragHandler.fNode).forEach((connection) => {
4303
- const index = this.getExistingConnectionHandlerIndex(request.result, connection);
4304
- if (index !== -1) {
4305
- this.updateExistingConnectionHandler(request.result, index, request.nodeDragHandler);
4306
- }
4307
- else {
4308
- request.result.push(this.createNewConnectionHandler(request.nodeDragHandler, request.outputIds, connection));
4309
- }
4392
+ this._getOutputConnections(request.fDragHandler.fNode).forEach((fConnection) => {
4393
+ this._createAndSetConnectionToNodeHandler(fConnection, request);
4310
4394
  });
4311
4395
  }
4312
- getInputConnections(node) {
4313
- const inputIds = new Set(this.getInputsForNode(node).map((x) => x.fId));
4314
- return this._fConnections.filter((x) => inputIds.has(x.fInputId));
4396
+ _getOutputConnections(node) {
4397
+ const ids = new Set(this._getNodeOutputIds(node));
4398
+ return this._fConnections.filter((x) => ids.has(x.fOutputId));
4315
4399
  }
4316
- getInputsForNode(node) {
4317
- return this._fComponentsStore.fInputs.filter((x) => node.isContains(x.hostElement));
4318
- }
4319
- getExistingConnectionHandlerIndex(result, connection) {
4320
- return result.findIndex((x) => x instanceof ConnectionDragHandler && x.connection.fId === connection.fId);
4400
+ _getNodeOutputIds(node) {
4401
+ return this._fComponentsStore.fOutputs
4402
+ .filter((x) => node.isContains(x.hostElement))
4403
+ .map((x) => x.fId);
4321
4404
  }
4322
- createNewConnectionHandler(nodeDragHandler, outputIds, connection) {
4323
- let result;
4324
- if (outputIds.includes(connection.fOutputId)) {
4325
- result = this.getNewConnectionHandler(connection, nodeDragHandler);
4326
- }
4327
- else {
4328
- result = this.getNewSourceConnectionHandler(connection, nodeDragHandler);
4405
+ _createAndSetConnectionToNodeHandler(fConnection, request) {
4406
+ let fHandler = this._getExistingConnectionHandler(request.result, fConnection);
4407
+ if (!fHandler) {
4408
+ fHandler = this._createConnectionHandler(request.inputIds, fConnection);
4409
+ request.result.push(fHandler);
4329
4410
  }
4330
- return result;
4331
- }
4332
- getNewConnectionHandler(connection, nodeDragHandler) {
4333
- const handler = new ConnectionDragHandler(this._fMediator, this._fComponentsStore, connection);
4334
- handler.setInputRestrictions(nodeDragHandler.restrictions);
4335
- return handler;
4336
- }
4337
- updateExistingConnectionHandler(result, index, nodeDragHandler) {
4338
- result[index].setInputRestrictions(nodeDragHandler.restrictions);
4411
+ request.fDragHandler.fSourceHandlers.push(fHandler);
4339
4412
  }
4340
- getNewSourceConnectionHandler(connection, nodeDragHandler) {
4341
- return new ConnectionTargetDragHandler(this._fMediator, this._fComponentsStore, connection, nodeDragHandler.restrictions);
4342
- }
4343
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutInputConnectionHandlersToArrayExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4344
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutInputConnectionHandlersToArrayExecution });
4345
- };
4346
- PutInputConnectionHandlersToArrayExecution = __decorate([
4347
- FExecutionRegister(PutInputConnectionHandlersToArrayRequest)
4348
- ], PutInputConnectionHandlersToArrayExecution);
4349
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutInputConnectionHandlersToArrayExecution, decorators: [{
4350
- type: Injectable
4351
- }] });
4352
-
4353
- class PutOutputConnectionHandlersToArrayRequest {
4354
- nodeDragHandler;
4355
- inputIds;
4356
- result;
4357
- constructor(nodeDragHandler, inputIds, result) {
4358
- this.nodeDragHandler = nodeDragHandler;
4359
- this.inputIds = inputIds;
4360
- this.result = result;
4361
- }
4362
- }
4363
-
4364
- class ConnectionSourceDragHandler extends ConnectionBaseDragHandler {
4365
- restrictions;
4366
- constructor(fMediator, fComponentsStore, connection, restrictions) {
4367
- super(fMediator, fComponentsStore, connection);
4368
- this.restrictions = restrictions;
4369
- }
4370
- onPointerMove(difference) {
4371
- this.redrawConnection(this.getNewLineValue(difference));
4372
- }
4373
- getNewLineValue(difference) {
4374
- return this.fMediator.execute(new CalculateConnectionLineByBehaviorRequest(RoundedRect.fromRoundedRect(this.fOutputWithRect.fRect).addPoint(this.getRestrictedDifference({ ...difference }, this.restrictions)), this.fInputWithRect.fRect, this.connection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, this.fInputWithRect.fConnector.fConnectableSide));
4375
- }
4376
- }
4377
-
4378
- let PutOutputConnectionHandlersToArrayExecution = class PutOutputConnectionHandlersToArrayExecution {
4379
- fComponentsStore;
4380
- fMediator;
4381
- get fConnections() {
4382
- return this.fComponentsStore.fConnections;
4383
- }
4384
- constructor(fComponentsStore, fMediator) {
4385
- this.fComponentsStore = fComponentsStore;
4386
- this.fMediator = fMediator;
4413
+ _getExistingConnectionHandler(fHandlers, fConnection) {
4414
+ return fHandlers.find((x) => x.fConnection.fId === fConnection.fId);
4387
4415
  }
4388
- handle(request) {
4389
- this.getOutputConnections(request.nodeDragHandler.fNode).forEach((connection) => {
4390
- const index = this.getExistingConnectionHandlerIndex(request.result, connection);
4391
- if (index !== -1) {
4392
- this.updateExistingConnectionHandler(request.result, index, request.nodeDragHandler);
4393
- }
4394
- else {
4395
- request.result.push(this.createNewConnectionHandler(request.nodeDragHandler, request.inputIds, connection));
4396
- }
4397
- });
4398
- }
4399
- getOutputConnections(node) {
4400
- const outputsIds = new Set(this.getOutputsForNode(node).map((x) => x.fId));
4401
- return this.fConnections.filter((x) => outputsIds.has(x.fOutputId));
4402
- }
4403
- getOutputsForNode(node) {
4404
- return this.fComponentsStore.fOutputs.filter((x) => node.isContains(x.hostElement));
4405
- }
4406
- getExistingConnectionHandlerIndex(result, connection) {
4407
- return result.findIndex((x) => x instanceof ConnectionDragHandler && x.connection.fId === connection.fId);
4408
- }
4409
- createNewConnectionHandler(nodeDragHandler, inputIds, connection) {
4416
+ _createConnectionHandler(inputIds, fConnection) {
4410
4417
  let result;
4411
- if (inputIds.includes(connection.fInputId)) {
4412
- result = this.getNewConnectionHandler(connection, nodeDragHandler);
4418
+ if (inputIds.includes(fConnection.fInputId)) {
4419
+ result = new SourceTargetConnectionDragHandler(fConnection);
4413
4420
  }
4414
4421
  else {
4415
- result = this.getNewSourceConnectionHandler(connection, nodeDragHandler);
4422
+ result = new SourceConnectionDragHandler(fConnection);
4416
4423
  }
4417
4424
  return result;
4418
4425
  }
4419
- getNewConnectionHandler(connection, nodeDragHandler) {
4420
- const handler = new ConnectionDragHandler(this.fMediator, this.fComponentsStore, connection);
4421
- handler.setOutputRestrictions(nodeDragHandler.restrictions);
4422
- return handler;
4423
- }
4424
- updateExistingConnectionHandler(result, index, nodeDragHandler) {
4425
- result[index].setOutputRestrictions(nodeDragHandler.restrictions);
4426
- }
4427
- getNewSourceConnectionHandler(connection, nodeDragHandler) {
4428
- return new ConnectionSourceDragHandler(this.fMediator, this.fComponentsStore, connection, nodeDragHandler.restrictions);
4429
- }
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 });
4426
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutOutputConnectionHandlersToArrayExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4431
4427
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutOutputConnectionHandlersToArrayExecution });
4432
4428
  };
4433
4429
  PutOutputConnectionHandlersToArrayExecution = __decorate([
@@ -4435,9 +4431,9 @@ PutOutputConnectionHandlersToArrayExecution = __decorate([
4435
4431
  ], PutOutputConnectionHandlersToArrayExecution);
4436
4432
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: PutOutputConnectionHandlersToArrayExecution, decorators: [{
4437
4433
  type: Injectable
4438
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2$1.FMediator }] });
4434
+ }] });
4439
4435
 
4440
- class CalculateNodeMoveRestrictionsRequest {
4436
+ class CalculateNodeMoveLimitsRequest {
4441
4437
  fNode;
4442
4438
  hasParentNodeInSelected;
4443
4439
  constructor(fNode, hasParentNodeInSelected) {
@@ -4446,35 +4442,42 @@ class CalculateNodeMoveRestrictionsRequest {
4446
4442
  }
4447
4443
  }
4448
4444
 
4449
- let CalculateNodeMoveRestrictionsExecution = class CalculateNodeMoveRestrictionsExecution {
4445
+ let CalculateNodeMoveLimitsExecution = class CalculateNodeMoveLimitsExecution {
4450
4446
  _fMediator = inject(FMediator);
4451
4447
  handle(request) {
4452
4448
  if (!request.fNode.fParentId || request.hasParentNodeInSelected) {
4453
- return { ...DEFAULT_RESTRICTIONS };
4449
+ return { ...DEFAULT_LIMITS };
4454
4450
  }
4455
- const fParentNodeRect = this._getParentNodeRect(request.fNode);
4456
- const fCurrentNodeRect = this._getNodeRect(request.fNode);
4457
- return {
4458
- min: PointExtensions.initialize(fParentNodeRect.x - fCurrentNodeRect.x, fParentNodeRect.y - fCurrentNodeRect.y),
4459
- max: PointExtensions.initialize((fParentNodeRect.x + fParentNodeRect.width) - (fCurrentNodeRect.x + fCurrentNodeRect.width), (fParentNodeRect.y + fParentNodeRect.height) - (fCurrentNodeRect.y + fCurrentNodeRect.height))
4460
- };
4451
+ return this._calculateDifference(this._fParentRect(request.fNode), this._fNodeRect(request.fNode));
4461
4452
  }
4462
- _getNodeRect(fNode) {
4453
+ _fNodeRect(fNode) {
4463
4454
  return this._fMediator.execute(new GetNormalizedElementRectRequest(fNode.hostElement, false));
4464
4455
  }
4465
- _getParentNodeRect(fNode) {
4456
+ _fParentRect(fNode) {
4466
4457
  return this._fMediator.execute(new GetNormalizedParentNodeRectRequest(fNode));
4467
4458
  }
4468
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateNodeMoveRestrictionsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4469
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateNodeMoveRestrictionsExecution });
4459
+ _calculateDifference(fParentRect, fRect) {
4460
+ return {
4461
+ min: this._calculateMinimumDifference(fParentRect, fRect),
4462
+ max: this._calculateMaximumDifference(fParentRect, fRect)
4463
+ };
4464
+ }
4465
+ _calculateMinimumDifference(fParentRect, fRect) {
4466
+ return PointExtensions.initialize(fParentRect.x - fRect.x, fParentRect.y - fRect.y);
4467
+ }
4468
+ _calculateMaximumDifference(fParentRect, fRect) {
4469
+ return PointExtensions.initialize((fParentRect.x + fParentRect.width) - (fRect.x + fRect.width), (fParentRect.y + fParentRect.height) - (fRect.y + fRect.height));
4470
+ }
4471
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateNodeMoveLimitsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4472
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateNodeMoveLimitsExecution });
4470
4473
  };
4471
- CalculateNodeMoveRestrictionsExecution = __decorate([
4472
- FExecutionRegister(CalculateNodeMoveRestrictionsRequest)
4473
- ], CalculateNodeMoveRestrictionsExecution);
4474
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateNodeMoveRestrictionsExecution, decorators: [{
4474
+ CalculateNodeMoveLimitsExecution = __decorate([
4475
+ FExecutionRegister(CalculateNodeMoveLimitsRequest)
4476
+ ], CalculateNodeMoveLimitsExecution);
4477
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CalculateNodeMoveLimitsExecution, decorators: [{
4475
4478
  type: Injectable
4476
4479
  }] });
4477
- const DEFAULT_RESTRICTIONS = {
4480
+ const DEFAULT_LIMITS = {
4478
4481
  min: PointExtensions.initialize(-Infinity, -Infinity),
4479
4482
  max: PointExtensions.initialize(Infinity, Infinity)
4480
4483
  };
@@ -4487,28 +4490,23 @@ class CreateMoveNodesDragModelFromSelectionRequest {
4487
4490
  }
4488
4491
 
4489
4492
  class NodeDragHandler {
4490
- _fComponentsStore;
4491
4493
  fNode;
4492
- restrictions;
4494
+ fSourceHandlers;
4495
+ fTargetHandlers;
4493
4496
  _onPointerDownPosition = PointExtensions.initialize();
4494
- constructor(_fComponentsStore, fNode, restrictions) {
4495
- this._fComponentsStore = _fComponentsStore;
4497
+ constructor(fNode, fSourceHandlers = [], fTargetHandlers = []) {
4496
4498
  this.fNode = fNode;
4497
- this.restrictions = restrictions;
4499
+ this.fSourceHandlers = fSourceHandlers;
4500
+ this.fTargetHandlers = fTargetHandlers;
4498
4501
  this._onPointerDownPosition = { ...fNode.position };
4499
4502
  }
4500
4503
  onPointerMove(difference) {
4501
- const restrictedDifference = this._getDifference(difference);
4502
- this._redraw(this._getPosition(restrictedDifference));
4504
+ this._redraw(this._calculateNewPosition(difference));
4505
+ this.fSourceHandlers.forEach((x) => x.setSourceDifference(difference));
4506
+ this.fTargetHandlers.forEach((x) => x.setTargetDifference(difference));
4503
4507
  }
4504
- _getPosition(difference) {
4505
- return Point.fromPoint(this._onPointerDownPosition).add(difference);
4506
- }
4507
- _getDifference(difference) {
4508
- return {
4509
- x: Math.min(Math.max(difference.x, this.restrictions.min.x), this.restrictions.max.x),
4510
- y: Math.min(Math.max(difference.y, this.restrictions.min.y), this.restrictions.max.y)
4511
- };
4508
+ _calculateNewPosition(difference) {
4509
+ return PointExtensions.sum(this._onPointerDownPosition, difference);
4512
4510
  }
4513
4511
  _redraw(position) {
4514
4512
  this.fNode.updatePosition(position);
@@ -4517,32 +4515,77 @@ class NodeDragHandler {
4517
4515
  onPointerUp() {
4518
4516
  this.fNode.positionChange.emit(this.fNode.position);
4519
4517
  }
4520
- getDifferenceWithCellSize(difference) {
4521
- const position = this._getPosition(this._getDifference(difference));
4522
- return Point.fromPoint(this._applyCellSize(position)).sub(this._onPointerDownPosition);
4518
+ }
4519
+
4520
+ class PointBoundsLimiter {
4521
+ _onPointerDown;
4522
+ _limit;
4523
+ _fComponentsStore = fInject(FComponentsStore);
4524
+ _vCellSize = this._fComponentsStore.fDraggable.vCellSize;
4525
+ _hCellSize = this._fComponentsStore.fDraggable.hCellSize;
4526
+ constructor(_onPointerDown, _limit) {
4527
+ this._onPointerDown = _onPointerDown;
4528
+ this._limit = _limit;
4523
4529
  }
4524
- _applyCellSize(position) {
4525
- const hCellSize = this._fComponentsStore.fDraggable.hCellSize;
4526
- const vCellSize = this._fComponentsStore.fDraggable.vCellSize;
4530
+ limit(difference, adjustCellSize) {
4531
+ const { min, max } = this._limit;
4532
+ const { x, y } = this._cellSizeStrategies[+adjustCellSize](difference);
4527
4533
  return {
4528
- x: Math.round(position.x / hCellSize) * hCellSize,
4529
- y: Math.round(position.y / vCellSize) * vCellSize
4534
+ x: this._clamp(x, min.x, max.x),
4535
+ y: this._clamp(y, min.y, max.y),
4530
4536
  };
4531
4537
  }
4532
- }
4533
-
4534
- //TODO: Implement this class
4535
- class NodeResizeByChildDragHandler {
4536
- fDraggableDataContext;
4537
- onPointerDownPosition = PointExtensions.initialize();
4538
- constructor(fDraggableDataContext) {
4539
- this.fDraggableDataContext = fDraggableDataContext;
4538
+ _cellSizeStrategies = {
4539
+ 0: this._skipCellSize.bind(this),
4540
+ 1: this._applyCellSize.bind(this)
4541
+ };
4542
+ _applyCellSize(difference) {
4543
+ return {
4544
+ x: this._snapToGrid(this._onPointerDown.x + difference.x, this._hCellSize) - this._onPointerDown.x,
4545
+ y: this._snapToGrid(this._onPointerDown.y + difference.y, this._vCellSize) - this._onPointerDown.y
4546
+ };
4540
4547
  }
4541
- prepareDragSequence() {
4548
+ _skipCellSize(difference) {
4549
+ return difference;
4542
4550
  }
4551
+ _clamp(value, min, max) {
4552
+ return Math.min(Math.max(value, min), max);
4553
+ }
4554
+ _snapToGrid(value, cellSize) {
4555
+ return Math.round(value / cellSize) * cellSize;
4556
+ }
4557
+ }
4558
+
4559
+ // import { FMediator } from '@foblex/mediator';
4560
+ class SummaryNodeDragHandler {
4561
+ limits;
4562
+ fHandlers;
4563
+ commonRect;
4564
+ // private _fMediator = fInject(FMediator);
4565
+ _fComponentStore = fInject(FComponentsStore);
4566
+ _fBoundsLimiter;
4567
+ constructor(limits, fHandlers, commonRect) {
4568
+ this.limits = limits;
4569
+ this.fHandlers = fHandlers;
4570
+ this.commonRect = commonRect;
4571
+ //this._onPointerDownPosition = this._getDraggedNodesBoundingRect();
4572
+ this._fBoundsLimiter = new PointBoundsLimiter(this.commonRect, limits);
4573
+ }
4574
+ // private _getDraggedNodesBoundingRect(): IRect {
4575
+ // return RectExtensions.union(this.fHandlers.map((x) => {
4576
+ // return this._fMediator.execute<IRect>(new GetNormalizedElementRectRequest(x.fNode.hostElement, false));
4577
+ // })) || RectExtensions.initialize();
4578
+ // }
4543
4579
  onPointerMove(difference) {
4580
+ const adjustCellSize = this._fComponentStore.fDraggable.fCellSizeWhileDragging;
4581
+ const differenceWithRestrictions = this._fBoundsLimiter.limit(difference, adjustCellSize);
4582
+ this.fHandlers.forEach((x) => x.onPointerMove(differenceWithRestrictions));
4544
4583
  }
4545
4584
  onPointerUp() {
4585
+ this.fHandlers.forEach((x) => x.onPointerUp());
4586
+ }
4587
+ calculateRestrictedDifference(difference) {
4588
+ return this._fBoundsLimiter.limit(difference, true);
4546
4589
  }
4547
4590
  }
4548
4591
 
@@ -4551,8 +4594,12 @@ let CreateMoveNodesDragModelFromSelectionExecution = class CreateMoveNodesDragMo
4551
4594
  _fComponentsStore = inject(FComponentsStore);
4552
4595
  _fDraggableDataContext = inject(FDraggableDataContext);
4553
4596
  handle(request) {
4554
- const fItemsToDrag = this._getNodesWithRestrictions(this._getDraggedNodes(request.nodeWithDisabledSelection));
4555
- return this.getDragHandlersWithConnections(this.getDragHandlersFromNodes(fItemsToDrag), this.getAllOutputIds(fItemsToDrag), this.getAllInputIds(fItemsToDrag));
4597
+ const fDraggedNodes = this._getDraggedNodes(request.nodeWithDisabledSelection);
4598
+ const fNodesToDrag = this._getNodesToDragWithCommonLimits(fDraggedNodes);
4599
+ const fDragHandlers = this._mapToNodeDragHandlers(fNodesToDrag);
4600
+ this._setConnectionsHandlersToNodes(fDragHandlers, this._getAllOutputIds(fNodesToDrag), this._getAllInputIds(fNodesToDrag));
4601
+ const commonLimits = this._calculateCommonLimits(this._getNodesMoveLimits(fNodesToDrag, [], fDraggedNodes));
4602
+ return new SummaryNodeDragHandler(commonLimits, fDragHandlers, this._getDraggedNodesBoundingRect(fNodesToDrag));
4556
4603
  }
4557
4604
  _getDraggedNodes(nodeWithDisabledSelection) {
4558
4605
  const result = this._getNodesFromSelection();
@@ -4570,61 +4617,58 @@ let CreateMoveNodesDragModelFromSelectionExecution = class CreateMoveNodesDragMo
4570
4617
  return this._fComponentsStore.fNodes
4571
4618
  .find(n => n.isContains(hostElement));
4572
4619
  }
4573
- _getNodesWithRestrictions(fDraggedNodes) {
4574
- const result = [];
4575
- fDraggedNodes.forEach((x) => {
4620
+ _getNodesToDragWithCommonLimits(fDraggedNodes) {
4621
+ return fDraggedNodes.reduce((result, x) => {
4622
+ result.push(x);
4623
+ return result.concat(this._getChildrenNodes(x.fId));
4624
+ }, []);
4625
+ }
4626
+ _getNodesMoveLimits(fNodes, fParentNodes, fDraggedNodes) {
4627
+ return fDraggedNodes.map((x) => {
4576
4628
  const fParentNodes = this._fMediator.execute(new GetParentNodesRequest(x));
4577
- const restrictions = this._getNodeMoveRestrictions(x, fParentNodes, fDraggedNodes);
4578
- result.push({ fDraggedNode: x, fParentNodes, ...restrictions }, ...this._getChildrenItemsToDrag(x, restrictions));
4629
+ return { position: x.position, ...this._getNodeMoveLimits(x, fParentNodes, fDraggedNodes) };
4579
4630
  });
4580
- this._applyCommonRestrictions(result);
4581
- return result;
4582
4631
  }
4583
- _getNodeMoveRestrictions(fNode, fParentNodes, fDraggedNodes) {
4584
- return this._fMediator.execute(new CalculateNodeMoveRestrictionsRequest(fNode, this._isParentNodeInArray(fParentNodes, fDraggedNodes)));
4632
+ _getNodeMoveLimits(fNode, fParentNodes, fDraggedNodes) {
4633
+ return this._fMediator.execute(new CalculateNodeMoveLimitsRequest(fNode, this._isParentNodeInArray(fParentNodes, fDraggedNodes)));
4585
4634
  }
4586
4635
  _isParentNodeInArray(fParentNodes, fDraggedNodes) {
4587
4636
  return this._fMediator.execute(new IsArrayHasParentNodeRequest(fParentNodes, fDraggedNodes));
4588
4637
  }
4589
- _getChildrenItemsToDrag(node, restrictions) {
4590
- return this._getChildrenNodes(node.fId).map((x) => ({ fDraggedNode: x, ...restrictions }));
4591
- }
4592
4638
  _getChildrenNodes(fId) {
4593
4639
  return this._fMediator.execute(new GetDeepChildrenNodesAndGroupsRequest(fId));
4594
4640
  }
4595
- _applyCommonRestrictions(restrictions) {
4596
- const commonRestrictions = this._fMediator.execute(new CalculateCommonNodeMoveRestrictionsRequest(restrictions));
4597
- restrictions.forEach((x) => {
4598
- x.min = commonRestrictions.min;
4599
- x.max = commonRestrictions.max;
4600
- });
4641
+ _calculateCommonLimits(limits) {
4642
+ return this._fMediator.execute(new CalculateCommonNodeMoveLimitsRequest(limits));
4601
4643
  }
4602
- getAllOutputIds(items) {
4603
- return flatMap(items, (item) => this.getOutputsForNode(item.fDraggedNode).map((x) => x.fId));
4644
+ _getAllOutputIds(fNodes) {
4645
+ return flatMap(fNodes, (fNode) => this._getNodeOutputIds(fNode));
4646
+ }
4647
+ _getNodeOutputIds(fNode) {
4648
+ return this._fComponentsStore.fOutputs.filter((x) => fNode.fId === x.fNodeId)
4649
+ .map((x) => x.fId);
4604
4650
  }
4605
- getOutputsForNode(node) {
4606
- return this._fComponentsStore.fOutputs.filter((x) => node.isContains(x.hostElement));
4651
+ _getAllInputIds(fNodes) {
4652
+ return flatMap(fNodes, (fNode) => this._getNodeInputIds(fNode));
4607
4653
  }
4608
- getAllInputIds(items) {
4609
- return flatMap(items, (item) => this.getInputsForNode(item.fDraggedNode).map((x) => x.fId));
4654
+ _getNodeInputIds(fNode) {
4655
+ return this._fComponentsStore.fInputs.filter((x) => fNode.fId === x.fNodeId)
4656
+ .map((x) => x.fId);
4610
4657
  }
4611
- getInputsForNode(node) {
4612
- return this._fComponentsStore.fInputs.filter((x) => node.isContains(x.hostElement));
4658
+ _mapToNodeDragHandlers(items) {
4659
+ return items.map((x) => new NodeDragHandler(x));
4613
4660
  }
4614
- getDragHandlersFromNodes(items) {
4615
- let result = [];
4616
- items.forEach((node) => {
4617
- result.push(new NodeDragHandler(this._fComponentsStore, node.fDraggedNode, { min: node.min, max: node.max }), ...(node.fParentNodes || []).map(() => new NodeResizeByChildDragHandler(this._fDraggableDataContext)));
4661
+ _setConnectionsHandlersToNodes(handlers, outputIds, inputIds) {
4662
+ const fConnectionHandlers = [];
4663
+ handlers.forEach((fNodeHandler) => {
4664
+ this._fMediator.execute(new PutOutputConnectionHandlersToArrayRequest(fNodeHandler, inputIds, fConnectionHandlers));
4665
+ this._fMediator.execute(new PutInputConnectionHandlersToArrayRequest(fNodeHandler, outputIds, fConnectionHandlers));
4618
4666
  });
4619
- return result;
4620
4667
  }
4621
- getDragHandlersWithConnections(handlers, outputIds, inputIds) {
4622
- let result = handlers;
4623
- handlers.filter((x) => x instanceof NodeDragHandler).forEach((x) => {
4624
- this._fMediator.execute(new PutOutputConnectionHandlersToArrayRequest(x, inputIds, result));
4625
- this._fMediator.execute(new PutInputConnectionHandlersToArrayRequest(x, outputIds, result));
4626
- });
4627
- return result;
4668
+ _getDraggedNodesBoundingRect(fNodes) {
4669
+ return RectExtensions.union(fNodes.map((x) => {
4670
+ return this._fMediator.execute(new GetNormalizedElementRectRequest(x.hostElement, false));
4671
+ })) || RectExtensions.initialize();
4628
4672
  }
4629
4673
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateMoveNodesDragModelFromSelectionExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4630
4674
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: CreateMoveNodesDragModelFromSelectionExecution });
@@ -4637,27 +4681,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
4637
4681
  }] });
4638
4682
 
4639
4683
  const CREATE_MOVE_NODE_DRAG_MODEL_FROM_SELECTION_PROVIDERS = [
4640
- CalculateCommonNodeMoveRestrictionsExecution,
4641
- CalculateNodeMoveRestrictionsExecution,
4684
+ CalculateCommonNodeMoveLimitsExecution,
4685
+ CalculateNodeMoveLimitsExecution,
4642
4686
  PutInputConnectionHandlersToArrayExecution,
4643
4687
  PutOutputConnectionHandlersToArrayExecution,
4644
4688
  CreateMoveNodesDragModelFromSelectionExecution,
4645
4689
  ];
4646
4690
 
4647
4691
  class LineAlignmentPreparationRequest {
4692
+ fNodes;
4693
+ commonRect;
4694
+ constructor(fNodes, commonRect) {
4695
+ this.fNodes = fNodes;
4696
+ this.commonRect = commonRect;
4697
+ }
4648
4698
  }
4649
4699
 
4650
4700
  class LineAlignmentDragHandler {
4651
- _fComponentsStore;
4652
4701
  _lineService;
4653
4702
  _size;
4654
4703
  _draggedNodeRect;
4655
4704
  _rects;
4656
4705
  _restrictions;
4706
+ _fComponentsStore = fInject(FComponentsStore);
4657
4707
  _debounceTimer = null;
4658
4708
  _transform;
4659
- constructor(_fComponentsStore, _lineService, _size, _draggedNodeRect, _rects, _restrictions) {
4660
- this._fComponentsStore = _fComponentsStore;
4709
+ constructor(_lineService, _size, _draggedNodeRect, _rects, _restrictions) {
4661
4710
  this._lineService = _lineService;
4662
4711
  this._size = _size;
4663
4712
  this._draggedNodeRect = _draggedNodeRect;
@@ -4817,29 +4866,19 @@ let LineAlignmentPreparationExecution = class LineAlignmentPreparationExecution
4817
4866
  _fBrowser = inject(BrowserService);
4818
4867
  _lineService;
4819
4868
  handle(request) {
4820
- this._addLineAlignmentDragHandler(this._getDraggedNodes());
4821
- }
4822
- _getDraggedNodes() {
4823
- return this._fDraggableDataContext.draggableItems
4824
- .filter((x) => x instanceof NodeDragHandler)
4825
- .map((x) => x.fNode);
4869
+ this._addLineAlignmentDragHandler(request.fNodes, request.commonRect);
4826
4870
  }
4827
- _addLineAlignmentDragHandler(fNodes) {
4828
- this._fDraggableDataContext.draggableItems.push(new LineAlignmentDragHandler(this._fComponentsStore, this._lineService || this._createLineService(), this._getFlowHostSize(), this._getDraggedNodesBoundingRect(fNodes), this._getStaticNodeRects(fNodes), this._getCommonRestrictions()));
4871
+ _addLineAlignmentDragHandler(fNodes, commonRect) {
4872
+ this._fDraggableDataContext.draggableItems.push(new LineAlignmentDragHandler(this._lineService || this._createLineService(), this._getFlowHostSize(), commonRect, this._getStaticNodeRects(fNodes), this._getCommonRestrictions()));
4829
4873
  }
4830
4874
  _getFlowHostSize() {
4831
- return this._fMediator.send(new GetFlowHostElementRequest())
4875
+ return this._fMediator.execute(new GetFlowHostElementRequest())
4832
4876
  .getBoundingClientRect();
4833
4877
  }
4834
4878
  _createLineService() {
4835
4879
  this._lineService = new LineService(this._fBrowser, this._fComponentsStore.fLineAlignment.hostElement);
4836
4880
  return this._lineService;
4837
4881
  }
4838
- _getDraggedNodesBoundingRect(fNodes) {
4839
- return RectExtensions.union(fNodes.map((x) => {
4840
- return this._fMediator.execute(new GetNormalizedElementRectRequest(x.hostElement, false));
4841
- })) || RectExtensions.initialize();
4842
- }
4843
4882
  _getStaticNodeRects(fNodes) {
4844
4883
  return this._getStaticNodes(fNodes).map((x) => {
4845
4884
  return this._fMediator.execute(new GetNormalizedElementRectRequest(x.hostElement, false));
@@ -4851,7 +4890,7 @@ let LineAlignmentPreparationExecution = class LineAlignmentPreparationExecution
4851
4890
  }
4852
4891
  _getCommonRestrictions() {
4853
4892
  return this._fDraggableDataContext.draggableItems
4854
- .filter((x) => x instanceof NodeDragHandler)[0].restrictions;
4893
+ .filter((x) => x instanceof SummaryNodeDragHandler)[0].limits;
4855
4894
  }
4856
4895
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: LineAlignmentPreparationExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4857
4896
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: LineAlignmentPreparationExecution });
@@ -4979,7 +5018,7 @@ let NodeDragToParentFinalizeExecution = class NodeDragToParentFinalizeExecution
4979
5018
  }
4980
5019
  getDraggedNodeIds() {
4981
5020
  return this.fDraggableDataContext.draggableItems
4982
- .filter((x) => x instanceof NodeDragHandler)
5021
+ .find((x) => x instanceof SummaryNodeDragHandler).fHandlers
4983
5022
  .map((x) => x.fNode.fId);
4984
5023
  }
4985
5024
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeDragToParentFinalizeExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -5022,6 +5061,9 @@ let NodeDragToParentPreparationExecution = class NodeDragToParentPreparationExec
5022
5061
  this.fComponentsStore = fComponentsStore;
5023
5062
  }
5024
5063
  handle(request) {
5064
+ if (!this._isValid()) {
5065
+ return;
5066
+ }
5025
5067
  const fNode = this.fComponentsStore
5026
5068
  .fNodes.find(n => n.isContains(request.event.targetElement));
5027
5069
  if (!fNode) {
@@ -5029,10 +5071,14 @@ let NodeDragToParentPreparationExecution = class NodeDragToParentPreparationExec
5029
5071
  }
5030
5072
  this.fDraggableDataContext.draggableItems.push(new NodeDragToParentDragHandler(this.fComponentsStore, this.fDraggableDataContext, this._getNotDraggedNodesRects()));
5031
5073
  }
5074
+ _isValid() {
5075
+ return this.fDraggableDataContext.draggableItems
5076
+ .some((x) => x instanceof SummaryNodeDragHandler);
5077
+ }
5032
5078
  _getNotDraggedNodesRects() {
5033
5079
  const draggedNodes = this._addParentNodes(this._getNodesBeingDragged());
5034
5080
  return this._getNotDraggedNodes(draggedNodes).map((x) => {
5035
- const rect = this.fMediator.send(new GetNormalizedElementRectRequest(x.hostElement, false));
5081
+ const rect = this.fMediator.execute(new GetNormalizedElementRectRequest(x.hostElement, false));
5036
5082
  return {
5037
5083
  node: x,
5038
5084
  rect: RectExtensions.initialize(rect.x + this.fCanvasPosition.x, rect.y + this.fCanvasPosition.y, rect.width * this.transform.scale, rect.height * this.transform.scale)
@@ -5041,12 +5087,12 @@ let NodeDragToParentPreparationExecution = class NodeDragToParentPreparationExec
5041
5087
  }
5042
5088
  _getNodesBeingDragged() {
5043
5089
  return this.fDraggableDataContext.draggableItems
5044
- .filter((x) => x instanceof NodeDragHandler)
5045
- .map((x) => x.fNode);
5090
+ .find((x) => x instanceof SummaryNodeDragHandler)
5091
+ .fHandlers.map((x) => x.fNode);
5046
5092
  }
5047
5093
  _addParentNodes(fNodes) {
5048
5094
  return fNodes.reduce((result, x) => {
5049
- result.push(x, ...this.fMediator.send(new GetParentNodesRequest(x)));
5095
+ result.push(x, ...this.fMediator.execute(new GetParentNodesRequest(x)));
5050
5096
  return result;
5051
5097
  }, []);
5052
5098
  }
@@ -5063,29 +5109,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
5063
5109
  type: Injectable
5064
5110
  }], ctorParameters: () => [{ type: i2$1.FMediator }, { type: FDraggableDataContext }, { type: FComponentsStore }] });
5065
5111
 
5066
- let NodeDragToParentPreparationValidator = class NodeDragToParentPreparationValidator {
5067
- fDraggableDataContext;
5068
- constructor(fDraggableDataContext) {
5069
- this.fDraggableDataContext = fDraggableDataContext;
5070
- }
5071
- handle(request) {
5072
- return this.fDraggableDataContext.draggableItems.some((x) => x instanceof NodeDragHandler);
5073
- }
5074
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeDragToParentPreparationValidator, deps: [{ token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
5075
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeDragToParentPreparationValidator });
5076
- };
5077
- NodeDragToParentPreparationValidator = __decorate([
5078
- FValidatorRegister(NodeDragToParentPreparationRequest)
5079
- ], NodeDragToParentPreparationValidator);
5080
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeDragToParentPreparationValidator, decorators: [{
5081
- type: Injectable
5082
- }], ctorParameters: () => [{ type: FDraggableDataContext }] });
5083
-
5084
- const NODE_DRAG_TO_PARENT_PREPARATION_PROVIDERS = [
5085
- NodeDragToParentPreparationExecution,
5086
- NodeDragToParentPreparationValidator,
5087
- ];
5088
-
5089
5112
  class NodeMovePreparationRequest {
5090
5113
  event;
5091
5114
  constructor(event) {
@@ -5108,12 +5131,13 @@ let NodeMovePreparationExecution = class NodeMovePreparationExecution {
5108
5131
  if (!this._isValid(request)) {
5109
5132
  return;
5110
5133
  }
5134
+ const summaryDragHandler = this._calculateDraggedItems(this._fNode);
5111
5135
  this._fDraggableDataContext.onPointerDownScale = this._transform.scale;
5112
5136
  this._fDraggableDataContext.onPointerDownPosition = Point.fromPoint(request.event.getPosition())
5113
5137
  .elementTransform(this._fHost).div(this._transform.scale);
5114
- this._fDraggableDataContext.draggableItems = this._calculateDraggedItems(this._fNode);
5138
+ this._fDraggableDataContext.draggableItems = [summaryDragHandler];
5115
5139
  if (this._fComponentsStore.fLineAlignment) {
5116
- this._fMediator.execute(new LineAlignmentPreparationRequest());
5140
+ this._fMediator.execute(new LineAlignmentPreparationRequest(summaryDragHandler.fHandlers.map((x) => x.fNode), summaryDragHandler.commonRect));
5117
5141
  }
5118
5142
  }
5119
5143
  _isValid(request) {
@@ -5131,7 +5155,7 @@ let NodeMovePreparationExecution = class NodeMovePreparationExecution {
5131
5155
  }
5132
5156
  //We drag nodes from selection model
5133
5157
  _calculateDraggedItems(fNode) {
5134
- let result = [];
5158
+ let result;
5135
5159
  if (!fNode.fSelectionDisabled) {
5136
5160
  // Need to select node before drag
5137
5161
  this._fMediator.execute(new SelectAndUpdateNodeLayerRequest(fNode));
@@ -5180,13 +5204,12 @@ let NodeMoveFinalizeExecution = class NodeMoveFinalizeExecution {
5180
5204
  }
5181
5205
  const difference = this._getDifferenceWithLineAlignment(this._getDifferenceBetweenPreparationAndFinalize(request.event.getPosition()));
5182
5206
  const firstNodeOrGroup = this._fDraggableDataContext.draggableItems
5183
- .find((x) => x instanceof NodeDragHandler);
5184
- const differenceWithCellSize = firstNodeOrGroup.getDifferenceWithCellSize(difference);
5185
- this._finalizeMove(differenceWithCellSize);
5207
+ .find((x) => x instanceof SummaryNodeDragHandler);
5208
+ this._finalizeMove(firstNodeOrGroup.calculateRestrictedDifference(difference));
5186
5209
  this._applyConnectionUnderDroppedNode();
5187
5210
  }
5188
5211
  _isValid() {
5189
- return this._fDraggableDataContext.draggableItems.some((x) => x instanceof NodeDragHandler);
5212
+ return this._fDraggableDataContext.draggableItems.some((x) => x instanceof SummaryNodeDragHandler);
5190
5213
  }
5191
5214
  _finalizeMove(difference) {
5192
5215
  this._getItems().forEach((x) => {
@@ -5219,12 +5242,17 @@ let NodeMoveFinalizeExecution = class NodeMoveFinalizeExecution {
5219
5242
  return difference;
5220
5243
  }
5221
5244
  _applyConnectionUnderDroppedNode() {
5222
- const isDraggedJustOneNode = this._fDraggableDataContext.draggableItems[0] instanceof NodeDragHandler;
5223
- if (isDraggedJustOneNode && this._fComponentsStore.fDraggable?.emitWhenNodeIntersectedWithConnection) {
5224
- const fNode = this._fDraggableDataContext.draggableItems[0].fNode;
5245
+ if (this._isDraggedJustOneNode() && this._fComponentsStore.fDraggable?.fEmitOnNodeIntersect) {
5246
+ const fNode = this._getFirstNodeOrGroup();
5225
5247
  setTimeout(() => this._fMediator.execute(new IsConnectionUnderNodeRequest(fNode)));
5226
5248
  }
5227
5249
  }
5250
+ _isDraggedJustOneNode() {
5251
+ return this._fDraggableDataContext.draggableItems[0].fHandlers.length === 1;
5252
+ }
5253
+ _getFirstNodeOrGroup() {
5254
+ return this._fDraggableDataContext.draggableItems[0].fHandlers[0].fNode;
5255
+ }
5228
5256
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeMoveFinalizeExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5229
5257
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeMoveFinalizeExecution });
5230
5258
  };
@@ -5240,7 +5268,7 @@ const NODE_PROVIDERS = [
5240
5268
  LineAlignmentPreparationExecution,
5241
5269
  NodeMoveFinalizeExecution,
5242
5270
  ...NODE_MOVE_PREPARATION_PROVIDERS,
5243
- ...NODE_DRAG_TO_PARENT_PREPARATION_PROVIDERS,
5271
+ NodeDragToParentPreparationExecution,
5244
5272
  ...NODE_DRAG_TO_PARENT_FINALIZE_PROVIDERS
5245
5273
  ];
5246
5274
 
@@ -5253,37 +5281,41 @@ class ApplyChildResizeRestrictionsRequest {
5253
5281
  }
5254
5282
  }
5255
5283
 
5256
- const OFFSET$1 = 0;
5284
+ const CHILD_RESIZE_OFFSET = 0;
5257
5285
  let ApplyChildResizeRestrictionsExecution = class ApplyChildResizeRestrictionsExecution {
5258
5286
  handle(request) {
5259
- this.applyRestrictions(request.rect, request.restrictionsRect);
5287
+ this._apply(request.rect, request.restrictionsRect);
5260
5288
  }
5261
- applyRestrictions(rect, restrictionsRect) {
5262
- this.left(rect, restrictionsRect);
5263
- this.top(rect, restrictionsRect);
5264
- this.right(rect, restrictionsRect);
5265
- this.bottom(rect, restrictionsRect);
5289
+ _apply(rect, restrictionsRect) {
5290
+ this._restrictLeft(rect, restrictionsRect);
5291
+ this._restrictTop(rect, restrictionsRect);
5292
+ this._restrictRight(rect, restrictionsRect);
5293
+ this._restrictBottom(rect, restrictionsRect);
5266
5294
  }
5267
- left(rect, restrictionsRect) {
5268
- if (rect.x > restrictionsRect.x - OFFSET$1) {
5269
- rect.width += rect.x - restrictionsRect.x - OFFSET$1;
5270
- rect.x = restrictionsRect.x - OFFSET$1;
5295
+ _restrictLeft(rect, restrictions) {
5296
+ const delta = rect.x - (restrictions.x - CHILD_RESIZE_OFFSET);
5297
+ if (delta > 0) {
5298
+ rect.x -= delta;
5299
+ rect.width += delta;
5271
5300
  }
5272
5301
  }
5273
- top(rect, restrictionsRect) {
5274
- if (rect.y > restrictionsRect.y - OFFSET$1) {
5275
- rect.height += rect.y - restrictionsRect.y - OFFSET$1;
5276
- rect.y = restrictionsRect.y - OFFSET$1;
5302
+ _restrictTop(rect, restrictions) {
5303
+ const delta = rect.y - (restrictions.y - CHILD_RESIZE_OFFSET);
5304
+ if (delta > 0) {
5305
+ rect.y -= delta;
5306
+ rect.height += delta;
5277
5307
  }
5278
5308
  }
5279
- right(rect, restrictionsRect) {
5280
- if (rect.x + rect.width <= restrictionsRect.x + restrictionsRect.width + OFFSET$1) {
5281
- rect.width = restrictionsRect.x + restrictionsRect.width - rect.x + OFFSET$1;
5309
+ _restrictRight(rect, restrictions) {
5310
+ const maxRight = restrictions.x + restrictions.width + CHILD_RESIZE_OFFSET;
5311
+ if (rect.x + rect.width <= maxRight) {
5312
+ rect.width = maxRight - rect.x;
5282
5313
  }
5283
5314
  }
5284
- bottom(rect, restrictionsRect) {
5285
- if (rect.y + rect.height <= restrictionsRect.y + restrictionsRect.height + OFFSET$1) {
5286
- rect.height = restrictionsRect.y + restrictionsRect.height - rect.y + OFFSET$1;
5315
+ _restrictBottom(rect, restrictions) {
5316
+ const maxBottom = restrictions.y + restrictions.height + CHILD_RESIZE_OFFSET;
5317
+ if (rect.y + rect.height <= maxBottom) {
5318
+ rect.height = maxBottom - rect.y;
5287
5319
  }
5288
5320
  }
5289
5321
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ApplyChildResizeRestrictionsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
@@ -5362,9 +5394,13 @@ class CalculateChangedPositionRequest {
5362
5394
  }
5363
5395
 
5364
5396
  const RESIZE_DIRECTIONS = {
5397
+ [EFResizeHandleType.LEFT]: { x: -1, y: 0 },
5365
5398
  [EFResizeHandleType.LEFT_TOP]: { x: -1, y: -1 },
5399
+ [EFResizeHandleType.TOP]: { x: 0, y: -1 },
5366
5400
  [EFResizeHandleType.RIGHT_TOP]: { x: 1, y: -1 },
5401
+ [EFResizeHandleType.RIGHT]: { x: 1, y: 0 },
5367
5402
  [EFResizeHandleType.RIGHT_BOTTOM]: { x: 1, y: 1 },
5403
+ [EFResizeHandleType.BOTTOM]: { x: 0, y: 1 },
5368
5404
  [EFResizeHandleType.LEFT_BOTTOM]: { x: -1, y: 1 },
5369
5405
  };
5370
5406
 
@@ -5442,10 +5478,10 @@ let GetNormalizedChildrenNodesRectExecution = class GetNormalizedChildrenNodesRe
5442
5478
  this.concatRectWithParentPadding(childNodeRect, request.paddings) : null;
5443
5479
  }
5444
5480
  getChildrenNodes(fId) {
5445
- return this.fMediator.send(new GetDeepChildrenNodesAndGroupsRequest(fId));
5481
+ return this.fMediator.execute(new GetDeepChildrenNodesAndGroupsRequest(fId));
5446
5482
  }
5447
5483
  normalizeRect(fNode) {
5448
- return this.fMediator.send(new GetNormalizedElementRectRequest(fNode.hostElement, false));
5484
+ return this.fMediator.execute(new GetNormalizedElementRectRequest(fNode.hostElement, false));
5449
5485
  }
5450
5486
  concatRectWithParentPadding(rect, padding) {
5451
5487
  return RectExtensions.initialize(rect.x - padding[0], rect.y - padding[1], rect.width + padding[0] + padding[2], rect.height + +padding[1] + padding[3]);
@@ -5470,24 +5506,25 @@ class GetNodeResizeRestrictionsRequest {
5470
5506
  }
5471
5507
 
5472
5508
  let GetNodeResizeRestrictionsExecution = class GetNodeResizeRestrictionsExecution {
5473
- fMediator;
5474
- constructor(fMediator) {
5475
- this.fMediator = fMediator;
5476
- }
5509
+ _fMediator = inject(FMediator);
5477
5510
  handle(request) {
5478
- const fNodePaddings = this.getNodePaddings(request.fNode, request.rect);
5479
- const childRect = this.fMediator.send(new GetNormalizedChildrenNodesRectRequest(request.fNode, fNodePaddings));
5480
- const parentRect = this.fMediator.send(new GetNormalizedParentNodeRectRequest(request.fNode));
5511
+ const paddings = this._calculateNodePaddings(request.fNode, request.rect);
5481
5512
  return {
5482
- parentRect,
5483
- childRect,
5484
- minSize: SizeExtensions.initialize(fNodePaddings[0] + fNodePaddings[2], fNodePaddings[1] + fNodePaddings[3])
5513
+ parentBounds: this._getNormalizedParentBounds(request.fNode),
5514
+ childrenBounds: this._getNormalizedChildrenBounds(request.fNode, paddings),
5515
+ minimumSize: SizeExtensions.initialize(paddings[0] + paddings[2], paddings[1] + paddings[3])
5485
5516
  };
5486
5517
  }
5487
- getNodePaddings(node, rect) {
5488
- return this.fMediator.send(new GetNodePaddingRequest(node, rect));
5518
+ _calculateNodePaddings(node, rect) {
5519
+ return this._fMediator.execute(new GetNodePaddingRequest(node, rect));
5520
+ }
5521
+ _getNormalizedParentBounds(fNode) {
5522
+ return this._fMediator.execute(new GetNormalizedParentNodeRectRequest(fNode));
5523
+ }
5524
+ _getNormalizedChildrenBounds(fNode, fNodePaddings) {
5525
+ return this._fMediator.execute(new GetNormalizedChildrenNodesRectRequest(fNode, fNodePaddings));
5489
5526
  }
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 });
5527
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNodeResizeRestrictionsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5491
5528
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNodeResizeRestrictionsExecution });
5492
5529
  };
5493
5530
  GetNodeResizeRestrictionsExecution = __decorate([
@@ -5495,7 +5532,7 @@ GetNodeResizeRestrictionsExecution = __decorate([
5495
5532
  ], GetNodeResizeRestrictionsExecution);
5496
5533
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetNodeResizeRestrictionsExecution, decorators: [{
5497
5534
  type: Injectable
5498
- }], ctorParameters: () => [{ type: i2$1.FMediator }] });
5535
+ }] });
5499
5536
 
5500
5537
  class NodeResizeFinalizeRequest {
5501
5538
  event;
@@ -5505,69 +5542,77 @@ class NodeResizeFinalizeRequest {
5505
5542
  }
5506
5543
 
5507
5544
  class NodeResizeDragHandler {
5508
- fMediator;
5509
- fNode;
5510
- fResizeHandleType;
5511
- originalRect;
5512
- restrictions;
5513
- childRestrictions = () => {
5514
- };
5515
- constructor(fMediator, fNode, fResizeHandleType) {
5516
- this.fMediator = fMediator;
5517
- this.fNode = fNode;
5518
- this.fResizeHandleType = fResizeHandleType;
5545
+ _fNode;
5546
+ _fResizeHandleType;
5547
+ _fMediator = fInject(FMediator);
5548
+ _originalRect;
5549
+ _resizeRestrictions;
5550
+ constructor(_fNode, _fResizeHandleType) {
5551
+ this._fNode = _fNode;
5552
+ this._fResizeHandleType = _fResizeHandleType;
5519
5553
  }
5520
5554
  prepareDragSequence() {
5521
- this.originalRect = this.fMediator.send(new GetNormalizedElementRectRequest(this.fNode.hostElement, false));
5522
- this.restrictions = this.fMediator.send(new GetNodeResizeRestrictionsRequest(this.fNode, this.originalRect));
5523
- if (this.restrictions.childRect) {
5524
- this.childRestrictions = (rect, restrictionsRect) => {
5525
- this.applyChildRestrictions(rect, restrictionsRect);
5526
- };
5527
- }
5555
+ this._originalRect = this._getOriginalNodeRect();
5556
+ this._resizeRestrictions = this._getNodeResizeRestrictions();
5557
+ }
5558
+ _getOriginalNodeRect() {
5559
+ return this._fMediator.execute(new GetNormalizedElementRectRequest(this._fNode.hostElement, false));
5560
+ }
5561
+ _getNodeResizeRestrictions() {
5562
+ return this._fMediator.execute(new GetNodeResizeRestrictionsRequest(this._fNode, this._originalRect));
5528
5563
  }
5529
5564
  onPointerMove(difference) {
5530
- const changedRect = this.changePosition(difference, this.changeSize(difference, this.restrictions.minSize));
5531
- this.childRestrictions(changedRect, this.restrictions.childRect);
5532
- this.applyParentRestrictions(changedRect, this.restrictions.parentRect);
5533
- this.fNode.updatePosition(changedRect);
5534
- this.fNode.updateSize(changedRect);
5535
- this.fNode.redraw();
5565
+ this._applyResizeChanges(this._calculateChangedRect(difference));
5536
5566
  }
5537
- changeSize(difference, minSize) {
5538
- return this.fMediator.send(new CalculateChangedSizeRequest(this.originalRect, difference, this.fResizeHandleType));
5567
+ _calculateChangedRect(difference) {
5568
+ return this._calculatePosition(difference, this._calculateSize(difference, this._resizeRestrictions.minimumSize));
5539
5569
  }
5540
- changePosition(difference, changedRect) {
5541
- return this.fMediator.send(new CalculateChangedPositionRequest(this.originalRect, changedRect, difference, this.fResizeHandleType));
5570
+ _calculateSize(difference, minimumSize) {
5571
+ return this._fMediator.execute(new CalculateChangedSizeRequest(this._originalRect, difference, this._fResizeHandleType));
5542
5572
  }
5543
- applyChildRestrictions(rect, restrictionsRect) {
5544
- this.fMediator.send(new ApplyChildResizeRestrictionsRequest(rect, restrictionsRect));
5573
+ _calculatePosition(difference, changedSize) {
5574
+ return this._fMediator.execute(new CalculateChangedPositionRequest(this._originalRect, changedSize, difference, this._fResizeHandleType));
5545
5575
  }
5546
- applyParentRestrictions(rect, restrictionsRect) {
5547
- this.fMediator.send(new ApplyParentResizeRestrictionsRequest(rect, restrictionsRect));
5576
+ _applyResizeChanges(changedRect) {
5577
+ if (this._resizeRestrictions.childrenBounds) {
5578
+ this._applyChildRestrictions(changedRect, this._resizeRestrictions.childrenBounds);
5579
+ }
5580
+ this._applyParentRestrictions(changedRect, this._resizeRestrictions.parentBounds);
5581
+ this._updateNodeRendering(changedRect);
5582
+ }
5583
+ _updateNodeRendering(changedRect) {
5584
+ this._fNode.updatePosition(changedRect);
5585
+ this._fNode.updateSize(changedRect);
5586
+ this._fNode.redraw();
5587
+ }
5588
+ _applyChildRestrictions(changedRect, restrictions) {
5589
+ this._fMediator.execute(new ApplyChildResizeRestrictionsRequest(changedRect, restrictions));
5590
+ }
5591
+ _applyParentRestrictions(changedRect, restrictions) {
5592
+ this._fMediator.execute(new ApplyParentResizeRestrictionsRequest(changedRect, restrictions));
5548
5593
  }
5549
5594
  onPointerUp() {
5550
- this.fNode.sizeChange.emit(RectExtensions.initialize(this.fNode.position.x, this.fNode.position.y, this.fNode.size?.width, this.fNode.size?.height));
5595
+ this._fNode.sizeChange.emit(this._getNewRect());
5596
+ }
5597
+ _getNewRect() {
5598
+ return RectExtensions.initialize(this._fNode.position.x, this._fNode.position.y, this._fNode.size?.width, this._fNode.size?.height);
5551
5599
  }
5552
5600
  }
5553
5601
 
5554
5602
  let NodeResizeFinalizeExecution = class NodeResizeFinalizeExecution {
5555
- fDraggableDataContext;
5556
- constructor(fDraggableDataContext) {
5557
- this.fDraggableDataContext = fDraggableDataContext;
5558
- }
5603
+ _fDraggableDataContext = inject(FDraggableDataContext);
5559
5604
  handle(request) {
5560
5605
  if (!this._isValid()) {
5561
5606
  return;
5562
5607
  }
5563
- this.fDraggableDataContext.draggableItems.forEach((x) => {
5608
+ this._fDraggableDataContext.draggableItems.forEach((x) => {
5564
5609
  x.onPointerUp?.();
5565
5610
  });
5566
5611
  }
5567
5612
  _isValid() {
5568
- return this.fDraggableDataContext.draggableItems.some((x) => x instanceof NodeResizeDragHandler);
5613
+ return this._fDraggableDataContext.draggableItems.some((x) => x instanceof NodeResizeDragHandler);
5569
5614
  }
5570
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizeFinalizeExecution, deps: [{ token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
5615
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizeFinalizeExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5571
5616
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizeFinalizeExecution });
5572
5617
  };
5573
5618
  NodeResizeFinalizeExecution = __decorate([
@@ -5575,7 +5620,7 @@ NodeResizeFinalizeExecution = __decorate([
5575
5620
  ], NodeResizeFinalizeExecution);
5576
5621
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizeFinalizeExecution, decorators: [{
5577
5622
  type: Injectable
5578
- }], ctorParameters: () => [{ type: FDraggableDataContext }] });
5623
+ }] });
5579
5624
 
5580
5625
  const NODE_RESIZE_FINALIZE_PROVIDERS = [
5581
5626
  NodeResizeFinalizeExecution,
@@ -5589,87 +5634,60 @@ class NodeResizePreparationRequest {
5589
5634
  }
5590
5635
 
5591
5636
  let NodeResizePreparationExecution = class NodeResizePreparationExecution {
5592
- fComponentsStore;
5593
- fDraggableDataContext;
5594
- fMediator;
5595
- get transform() {
5596
- return this.fComponentsStore.fCanvas.transform;
5597
- }
5598
- get flowHost() {
5599
- return this.fComponentsStore.fFlow.hostElement;
5637
+ _fMediator = inject(FMediator);
5638
+ _fComponentsStore = inject(FComponentsStore);
5639
+ _fDraggableDataContext = inject(FDraggableDataContext);
5640
+ get _transform() {
5641
+ return this._fComponentsStore.fCanvas.transform;
5600
5642
  }
5601
- constructor(fComponentsStore, fDraggableDataContext, fMediator) {
5602
- this.fComponentsStore = fComponentsStore;
5603
- this.fDraggableDataContext = fDraggableDataContext;
5604
- this.fMediator = fMediator;
5643
+ get _fHost() {
5644
+ return this._fComponentsStore.fFlow.hostElement;
5605
5645
  }
5646
+ _fNode;
5606
5647
  handle(request) {
5607
- this.selectAndUpdateNodeLayer(request.event.targetElement);
5608
- const handleType = getDataAttrValueFromClosestElementWithClass(request.event.targetElement, 'fResizeHandleType', '.f-resize-handle');
5609
- const itemsToDrag = [
5610
- new NodeResizeDragHandler(this.fMediator, this.getNode(request.event.targetElement), EFResizeHandleType[handleType])
5648
+ if (!this._isValid(request)) {
5649
+ return;
5650
+ }
5651
+ this._selectAndUpdateNodeLayer();
5652
+ this._fDraggableDataContext.onPointerDownScale = this._transform.scale;
5653
+ this._fDraggableDataContext.onPointerDownPosition = Point.fromPoint(request.event.getPosition())
5654
+ .elementTransform(this._fHost).div(this._transform.scale);
5655
+ const resizeHandleType = EFResizeHandleType[this._getHandleType(request.event.targetElement)];
5656
+ this._fDraggableDataContext.draggableItems = [
5657
+ new NodeResizeDragHandler(this._fNode, resizeHandleType)
5611
5658
  ];
5612
- this.fDraggableDataContext.onPointerDownScale = this.transform.scale;
5613
- this.fDraggableDataContext.onPointerDownPosition = Point.fromPoint(request.event.getPosition())
5614
- .elementTransform(this.flowHost).div(this.transform.scale);
5615
- this.fDraggableDataContext.draggableItems = itemsToDrag;
5616
- }
5617
- selectAndUpdateNodeLayer(targetElement) {
5618
- this.fMediator.send(new SelectAndUpdateNodeLayerRequest(this.getNode(targetElement)));
5619
5659
  }
5620
- getNode(targetElement) {
5621
- return this.fComponentsStore
5622
- .fNodes.find(n => n.isContains(targetElement));
5623
- }
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 });
5625
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizePreparationExecution });
5626
- };
5627
- NodeResizePreparationExecution = __decorate([
5628
- FExecutionRegister(NodeResizePreparationRequest)
5629
- ], NodeResizePreparationExecution);
5630
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizePreparationExecution, decorators: [{
5631
- type: Injectable
5632
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2$1.FMediator }] });
5633
-
5634
- let NodeResizePreparationValidator = class NodeResizePreparationValidator {
5635
- fComponentsStore;
5636
- fDraggableDataContext;
5637
- constructor(fComponentsStore, fDraggableDataContext) {
5638
- this.fComponentsStore = fComponentsStore;
5639
- this.fDraggableDataContext = fDraggableDataContext;
5660
+ _isValid(request) {
5661
+ return this._fDraggableDataContext.isEmpty()
5662
+ && this._isDragHandleElement(request.event.targetElement)
5663
+ && this._isNodeCanBeDragged(this._getNode(request.event.targetElement));
5640
5664
  }
5641
- handle(request) {
5642
- return this.isDragHandlesEmpty()
5643
- && this.isDragHandleElement(request.event.targetElement)
5644
- && this.isNodeCanBeDragged(this.getNode(request.event.targetElement));
5665
+ _isDragHandleElement(element) {
5666
+ return isClosestElementHasClass(element, '.f-resize-handle');
5645
5667
  }
5646
- isDragHandlesEmpty() {
5647
- return !this.fDraggableDataContext.draggableItems.length;
5668
+ _isNodeCanBeDragged(fNode) {
5669
+ return !!fNode && !fNode.fDraggingDisabled;
5648
5670
  }
5649
- getNode(targetElement) {
5650
- return this.fComponentsStore
5651
- .fNodes.find(n => n.isContains(targetElement));
5671
+ _getNode(element) {
5672
+ this._fNode = this._fComponentsStore
5673
+ .fNodes.find(x => x.isContains(element));
5674
+ return this._fNode;
5652
5675
  }
5653
- isNodeCanBeDragged(node) {
5654
- return !!node && !node.fDraggingDisabled;
5676
+ _selectAndUpdateNodeLayer() {
5677
+ this._fMediator.execute(new SelectAndUpdateNodeLayerRequest(this._fNode));
5655
5678
  }
5656
- isDragHandleElement(targetElement) {
5657
- return isClosestElementHasClass(targetElement, '.f-resize-handle');
5679
+ _getHandleType(element) {
5680
+ return getDataAttrValueFromClosestElementWithClass(element, 'fResizeHandleType', '.f-resize-handle');
5658
5681
  }
5659
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizePreparationValidator, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
5660
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizePreparationValidator });
5682
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizePreparationExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5683
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizePreparationExecution });
5661
5684
  };
5662
- NodeResizePreparationValidator = __decorate([
5663
- FValidatorRegister(NodeResizePreparationRequest)
5664
- ], NodeResizePreparationValidator);
5665
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizePreparationValidator, decorators: [{
5685
+ NodeResizePreparationExecution = __decorate([
5686
+ FExecutionRegister(NodeResizePreparationRequest)
5687
+ ], NodeResizePreparationExecution);
5688
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: NodeResizePreparationExecution, decorators: [{
5666
5689
  type: Injectable
5667
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }] });
5668
-
5669
- const NODE_RESIZE_PREPARATION_PROVIDERS = [
5670
- NodeResizePreparationExecution,
5671
- NodeResizePreparationValidator,
5672
- ];
5690
+ }] });
5673
5691
 
5674
5692
  const NODE_RESIZE_PROVIDERS = [
5675
5693
  ApplyChildResizeRestrictionsExecution,
@@ -5679,101 +5697,137 @@ const NODE_RESIZE_PROVIDERS = [
5679
5697
  GetNormalizedChildrenNodesRectExecution,
5680
5698
  GetNodeResizeRestrictionsExecution,
5681
5699
  ...NODE_RESIZE_FINALIZE_PROVIDERS,
5682
- ...NODE_RESIZE_PREPARATION_PROVIDERS,
5700
+ NodeResizePreparationExecution,
5683
5701
  ];
5684
5702
 
5685
5703
  class SingleSelectRequest {
5686
5704
  event;
5687
- constructor(event) {
5705
+ fMultiSelectTrigger;
5706
+ constructor(event, fMultiSelectTrigger) {
5688
5707
  this.event = event;
5708
+ this.fMultiSelectTrigger = fMultiSelectTrigger;
5689
5709
  }
5690
5710
  }
5691
5711
 
5712
+ /**
5713
+ * Implements the functionality for selecting elements in a graphical interface.
5714
+ * This class handles both single and multi-selection, updating the selection state
5715
+ * of elements and managing related data.
5716
+ *
5717
+ * Logic flow:
5718
+ * 1. **Validate the selection event**:
5719
+ * - The event is considered valid if it occurs within the flow boundaries
5720
+ * and there are no active draggable data operations.
5721
+ *
5722
+ * 2. **Determine the target element to select**:
5723
+ * - The target element is determined based on the event’s target.
5724
+ * It can be a node, a group of nodes, or a connection.
5725
+ * - If no element is found, the current selection state is cleared.
5726
+ *
5727
+ * 3. **Update element layers**:
5728
+ * - If an element is found, its visual layer and the layers of its child elements are updated.
5729
+ *
5730
+ * 4. **Single or multi-selection**:
5731
+ * - If the event meets the criteria for multi-selection (e.g., a modifier key is pressed),
5732
+ * multi-selection logic is applied.
5733
+ * - Otherwise, single-selection logic is used.
5734
+ *
5735
+ * 5. **Single-selection logic**:
5736
+ * - If the element is not selected and can be selected:
5737
+ * - Clear the selection of all other elements.
5738
+ * - Mark the current element as selected.
5739
+ * - If the element cannot be selected, the current selection is cleared.
5740
+ *
5741
+ * 6. **Multi-selection logic**:
5742
+ * - If the element is already selected, it is removed from the selection.
5743
+ * - If the element is not selected and can be selected, it is added to the selection.
5744
+ *
5745
+ * 7. **Manage selection state**:
5746
+ * - Adding or removing an element from the selection triggers the corresponding methods.
5747
+ * - Selection state is tracked in the shared context for future use.
5748
+ */
5692
5749
  let SingleSelectExecution = class SingleSelectExecution {
5693
- fPlatform;
5694
- fComponentsStore;
5695
- fDraggableDataContext;
5696
- fMediator;
5697
- constructor(fPlatform, fComponentsStore, fDraggableDataContext, fMediator) {
5698
- this.fPlatform = fPlatform;
5699
- this.fComponentsStore = fComponentsStore;
5700
- this.fDraggableDataContext = fDraggableDataContext;
5701
- this.fMediator = fMediator;
5702
- }
5750
+ _fMediator = inject(FMediator);
5751
+ _fComponentsStore = inject(FComponentsStore);
5752
+ _fDraggableDataContext = inject(FDraggableDataContext);
5703
5753
  handle(request) {
5704
5754
  if (!this._isValid(request)) {
5705
5755
  return;
5706
5756
  }
5707
- const { event } = request;
5708
- const item = this.getSelectableItem(event);
5709
- if (item) {
5710
- this.fMediator.send(new UpdateItemAndChildrenLayersRequest(item, item.hostElement.parentElement));
5711
- }
5712
- this.isMultiselectEnabled(event) ? this.multiSelect(item) : this.singleSelect(item);
5757
+ const fItem = this._getItemToSelect(request.event);
5758
+ setTimeout(() => this._updateItemAndChildrenLayers(fItem));
5759
+ this._isMultiSelect(request) ? this._multiSelect(fItem) : this._singleSelect(fItem);
5713
5760
  }
5714
5761
  _isValid(request) {
5715
- return this.fComponentsStore.fFlow.hostElement.contains(request.event.targetElement)
5716
- && !this.fDraggableDataContext.draggableItems.length;
5762
+ return this._isEventInFlowBounds(request.event) && this._fDraggableDataContext.isEmpty();
5717
5763
  }
5718
- getSelectableItem(event) {
5719
- return this._findNode(event.targetElement) || this.getConnectionHandler(event.targetElement);
5764
+ _isEventInFlowBounds(event) {
5765
+ return this._fComponentsStore.fFlow.hostElement.contains(event.targetElement);
5720
5766
  }
5721
- _findNode(targetElement) {
5722
- return this.fComponentsStore.fNodes.find(n => n.isContains(targetElement));
5767
+ _getItemToSelect(event) {
5768
+ return this._getNodeOrGroup(event.targetElement) || this._getConnection(event.targetElement);
5723
5769
  }
5724
- getConnectionHandler(element) {
5725
- return this.fComponentsStore.fConnections.find(c => c.isContains(element) || c.fConnectionCenter?.nativeElement?.contains(element));
5770
+ _getNodeOrGroup(targetElement) {
5771
+ return this._fComponentsStore.fNodes.find((x) => (x).isContains(targetElement));
5726
5772
  }
5727
- isMultiselectEnabled(event) {
5728
- return this.isCommandButton(this.fPlatform.getOS(), event.originalEvent) ||
5729
- this.isShiftPressed(event.originalEvent);
5773
+ _getConnection(element) {
5774
+ return this._fComponentsStore.fConnections
5775
+ .find(c => c.isContains(element) || c.fConnectionCenter?.nativeElement?.contains(element));
5730
5776
  }
5731
- isShiftPressed(event) {
5732
- return event.shiftKey;
5777
+ _updateItemAndChildrenLayers(fItem) {
5778
+ if (fItem) {
5779
+ this._fMediator.execute(new UpdateItemAndChildrenLayersRequest(fItem, fItem.hostElement.parentElement));
5780
+ }
5733
5781
  }
5734
- isCommandButton(platform, event) {
5735
- return platform === EOperationSystem.MAC_OS ? event.metaKey : event.ctrlKey;
5782
+ _isMultiSelect(request) {
5783
+ return isValidEventTrigger(request.event.originalEvent, request.fMultiSelectTrigger);
5736
5784
  }
5737
- singleSelect(item) {
5738
- if (item) {
5739
- if (!item.isSelected() && !item.fSelectionDisabled) {
5740
- this.clearSelection();
5741
- this.selectItem(item);
5785
+ _singleSelect(fItem) {
5786
+ if (fItem) {
5787
+ if (this._isItemNotSelectedAndSelectable(fItem)) {
5788
+ this._clearSelection();
5789
+ this._selectItem(fItem);
5742
5790
  }
5743
- else if (item.fSelectionDisabled) {
5744
- this.clearSelection();
5791
+ else if (fItem.fSelectionDisabled) {
5792
+ this._clearSelection();
5745
5793
  }
5746
5794
  }
5747
5795
  else {
5748
- this.clearSelection();
5796
+ this._clearSelection();
5749
5797
  }
5750
5798
  }
5751
- multiSelect(item) {
5752
- if (item && !item.fSelectionDisabled) {
5753
- item.isSelected() ? this.deselectItem(item) : this.selectItem(item);
5754
- }
5799
+ _isItemNotSelectedAndSelectable(item) {
5800
+ return !item.isSelected() && !item.fSelectionDisabled;
5755
5801
  }
5756
- deselectItem(item) {
5757
- const index = this.fDraggableDataContext.selectedItems.indexOf(item);
5758
- if (index > -1) {
5759
- this.fDraggableDataContext.selectedItems.splice(index, 1);
5802
+ _clearSelection() {
5803
+ this._fDraggableDataContext.selectedItems.forEach((x) => {
5804
+ x.unmarkAsSelected();
5805
+ this._fDraggableDataContext.markSelectionAsChanged();
5806
+ });
5807
+ this._fDraggableDataContext.selectedItems = [];
5808
+ }
5809
+ _multiSelect(fItem) {
5810
+ if (fItem && !fItem.fSelectionDisabled) {
5811
+ fItem.isSelected() ? this._deselectItem(fItem) : this._selectItem(fItem);
5760
5812
  }
5761
- item.deselect();
5762
- this.fDraggableDataContext.markSelectionAsChanged();
5763
5813
  }
5764
- selectItem(item) {
5765
- this.fDraggableDataContext.selectedItems.push(item);
5766
- item.select();
5767
- this.fDraggableDataContext.markSelectionAsChanged();
5814
+ _deselectItem(fItem) {
5815
+ this._removeItemFromSelectedItems(fItem);
5816
+ fItem.unmarkAsSelected();
5817
+ this._fDraggableDataContext.markSelectionAsChanged();
5768
5818
  }
5769
- clearSelection() {
5770
- this.fDraggableDataContext.selectedItems.forEach((x) => {
5771
- x.deselect();
5772
- this.fDraggableDataContext.markSelectionAsChanged();
5773
- });
5774
- this.fDraggableDataContext.selectedItems = [];
5819
+ _removeItemFromSelectedItems(fItem) {
5820
+ const indexInSelection = this._fDraggableDataContext.selectedItems.indexOf(fItem);
5821
+ if (indexInSelection > -1) {
5822
+ this._fDraggableDataContext.selectedItems.splice(indexInSelection, 1);
5823
+ }
5824
+ }
5825
+ _selectItem(fItem) {
5826
+ this._fDraggableDataContext.selectedItems.push(fItem);
5827
+ fItem.markAsSelected();
5828
+ this._fDraggableDataContext.markSelectionAsChanged();
5775
5829
  }
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 });
5830
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SingleSelectExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5777
5831
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SingleSelectExecution });
5778
5832
  };
5779
5833
  SingleSelectExecution = __decorate([
@@ -5781,7 +5835,7 @@ SingleSelectExecution = __decorate([
5781
5835
  ], SingleSelectExecution);
5782
5836
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SingleSelectExecution, decorators: [{
5783
5837
  type: Injectable
5784
- }], ctorParameters: () => [{ type: i1.PlatformService }, { type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2$1.FMediator }] });
5838
+ }] });
5785
5839
 
5786
5840
  const SINGLE_SELECT_PROVIDERS = [
5787
5841
  SingleSelectExecution,
@@ -5807,13 +5861,12 @@ class ExternalItemFinalizeRequest {
5807
5861
 
5808
5862
  class ExternalItemDragHandler {
5809
5863
  externalItem;
5810
- fBrowser;
5864
+ _fBrowser = fInject(BrowserService);
5811
5865
  placeholder;
5812
5866
  onPointerDownRect = RectExtensions.initialize();
5813
5867
  difference = PointExtensions.initialize();
5814
- constructor(externalItem, fBrowser) {
5868
+ constructor(externalItem) {
5815
5869
  this.externalItem = externalItem;
5816
- this.fBrowser = fBrowser;
5817
5870
  }
5818
5871
  getStyle(position) {
5819
5872
  return `position: absolute; left: 0; top: 0; transform: translate(${position.x}px, ${position.y}px)`;
@@ -5822,12 +5875,12 @@ class ExternalItemDragHandler {
5822
5875
  this.onPointerDownRect = this.getExternalItemRect();
5823
5876
  this.placeholder = deepCloneNode(this.externalItem.hostElement);
5824
5877
  this.placeholder.setAttribute('style', this.getStyle(Point.fromPoint(this.onPointerDownRect)));
5825
- this.fBrowser.document.body.appendChild(this.placeholder);
5878
+ this._fBrowser.document.body.appendChild(this.placeholder);
5826
5879
  }
5827
5880
  getExternalItemRect() {
5828
5881
  const rect = this.externalItem.hostElement.getBoundingClientRect();
5829
- const scrollTop = this.fBrowser.window.pageYOffset || this.fBrowser.document.documentElement.scrollTop;
5830
- const scrollLeft = this.fBrowser.window.pageXOffset || this.fBrowser.document.documentElement.scrollLeft;
5882
+ const scrollTop = this._fBrowser.window.pageYOffset || this._fBrowser.document.documentElement.scrollTop;
5883
+ const scrollLeft = this._fBrowser.window.pageXOffset || this._fBrowser.document.documentElement.scrollLeft;
5831
5884
  const offsetTop = rect.top + scrollTop;
5832
5885
  const offsetLeft = rect.left + scrollLeft;
5833
5886
  return RectExtensions.initialize(offsetLeft, offsetTop, rect.width, rect.height);
@@ -5838,7 +5891,7 @@ class ExternalItemDragHandler {
5838
5891
  this.placeholder.setAttribute('style', this.getStyle(position));
5839
5892
  }
5840
5893
  onPointerUp() {
5841
- this.fBrowser.document.body.removeChild(this.placeholder);
5894
+ this._fBrowser.document.body.removeChild(this.placeholder);
5842
5895
  }
5843
5896
  }
5844
5897
 
@@ -5894,7 +5947,7 @@ let ExternalItemFinalizeExecution = class ExternalItemFinalizeExecution {
5894
5947
  return elements.length ? this.flowHost.contains(elements[0]) : false;
5895
5948
  }
5896
5949
  getRectInCanvas() {
5897
- return this.fMediator.send(new GetNormalizedElementRectRequest(this.dragHandler.placeholder, false));
5950
+ return this.fMediator.execute(new GetNormalizedElementRectRequest(this.dragHandler.placeholder, false));
5898
5951
  }
5899
5952
  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 });
5900
5953
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ExternalItemFinalizeExecution });
@@ -5918,30 +5971,32 @@ class ExternalItemPreparationRequest {
5918
5971
  }
5919
5972
 
5920
5973
  let ExternalItemPreparationExecution = class ExternalItemPreparationExecution {
5921
- fComponentsStore;
5922
- fDraggableDataContext;
5923
- fExternalItemService;
5924
- fBrowser;
5925
- get flowHost() {
5926
- return this.fComponentsStore.fFlow.hostElement;
5927
- }
5928
- constructor(fComponentsStore, fDraggableDataContext, fExternalItemService, fBrowser) {
5929
- this.fComponentsStore = fComponentsStore;
5930
- this.fDraggableDataContext = fDraggableDataContext;
5931
- this.fExternalItemService = fExternalItemService;
5932
- this.fBrowser = fBrowser;
5974
+ _fExternalItemService = inject(FExternalItemService);
5975
+ _fDraggableDataContext = inject(FDraggableDataContext);
5976
+ _fComponentsStore = inject(FComponentsStore);
5977
+ get _fHost() {
5978
+ return this._fComponentsStore.fFlow.hostElement;
5933
5979
  }
5934
5980
  handle(request) {
5935
- this.fDraggableDataContext.onPointerDownScale = 1;
5936
- this.fDraggableDataContext.onPointerDownPosition = Point.fromPoint(request.event.getPosition()).elementTransform(this.flowHost);
5937
- this.fDraggableDataContext.draggableItems = [
5938
- new ExternalItemDragHandler(this.getExternalItem(request.event.targetElement), this.fBrowser)
5981
+ if (!this._isValid(request)) {
5982
+ return;
5983
+ }
5984
+ this._fDraggableDataContext.onPointerDownScale = 1;
5985
+ this._fDraggableDataContext.onPointerDownPosition = Point.fromPoint(request.event.getPosition()).elementTransform(this._fHost);
5986
+ this._fDraggableDataContext.draggableItems = [
5987
+ new ExternalItemDragHandler(this._getExternalItem(request.event.targetElement))
5939
5988
  ];
5940
5989
  }
5941
- getExternalItem(targetElement) {
5942
- return this.fExternalItemService.getItem(getExternalItem(targetElement));
5990
+ _isValid(request) {
5991
+ return this._isValidExternalItem(request.event.targetElement, this._getExternalItem(request.event.targetElement));
5992
+ }
5993
+ _isValidExternalItem(element, fExternalItem) {
5994
+ return isExternalItem(element) && !!fExternalItem && !fExternalItem.fDisabled;
5995
+ }
5996
+ _getExternalItem(targetElement) {
5997
+ return this._fExternalItemService.getItem(getExternalItem(targetElement));
5943
5998
  }
5944
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ExternalItemPreparationExecution, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: FExternalItemService }, { token: i1.BrowserService }], target: i0.ɵɵFactoryTarget.Injectable });
5999
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ExternalItemPreparationExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5945
6000
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ExternalItemPreparationExecution });
5946
6001
  };
5947
6002
  ExternalItemPreparationExecution = __decorate([
@@ -5949,33 +6004,10 @@ ExternalItemPreparationExecution = __decorate([
5949
6004
  ], ExternalItemPreparationExecution);
5950
6005
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ExternalItemPreparationExecution, decorators: [{
5951
6006
  type: Injectable
5952
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: FExternalItemService }, { type: i1.BrowserService }] });
5953
-
5954
- let ExternalItemPreparationValidator = class ExternalItemPreparationValidator {
5955
- fExternalItemService;
5956
- constructor(fExternalItemService) {
5957
- this.fExternalItemService = fExternalItemService;
5958
- }
5959
- handle(request) {
5960
- const externalItem = this.getExternalItem(request.event.targetElement);
5961
- return isExternalItem(request.event.targetElement) && !!externalItem && !externalItem.fDisabled;
5962
- }
5963
- getExternalItem(targetElement) {
5964
- return this.fExternalItemService.getItem(getExternalItem(targetElement));
5965
- }
5966
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ExternalItemPreparationValidator, deps: [{ token: FExternalItemService }], target: i0.ɵɵFactoryTarget.Injectable });
5967
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ExternalItemPreparationValidator });
5968
- };
5969
- ExternalItemPreparationValidator = __decorate([
5970
- FValidatorRegister(ExternalItemPreparationRequest)
5971
- ], ExternalItemPreparationValidator);
5972
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ExternalItemPreparationValidator, decorators: [{
5973
- type: Injectable
5974
- }], ctorParameters: () => [{ type: FExternalItemService }] });
6007
+ }] });
5975
6008
 
5976
6009
  const EXTERNAL_ITEM_PREPARATION_PROVIDERS = [
5977
6010
  ExternalItemPreparationExecution,
5978
- ExternalItemPreparationValidator,
5979
6011
  ];
5980
6012
 
5981
6013
  class PreventDefaultIsExternalItemRequest {
@@ -6125,50 +6157,61 @@ class FDraggableDirective extends FDraggableBase {
6125
6157
  _fBrowser;
6126
6158
  _elementReference = inject(ElementRef);
6127
6159
  _fMediator = inject(FMediator);
6160
+ _fPlatform = inject(PlatformService);
6161
+ _injector = inject(Injector);
6128
6162
  disabled = false;
6129
6163
  get hostElement() {
6130
6164
  return this._elementReference.nativeElement;
6131
6165
  }
6166
+ fMultiSelectTrigger = (event) => {
6167
+ return (this._fPlatform.getOS() === EOperationSystem.MAC_OS) ? event.metaKey : event.ctrlKey;
6168
+ };
6169
+ fReassignConnectionTrigger = defaultEventTrigger;
6170
+ fCreateConnectionTrigger = defaultEventTrigger;
6132
6171
  fSelectionChange = new EventEmitter();
6133
6172
  fNodeIntersectedWithConnections = new EventEmitter();
6134
- emitWhenNodeIntersectedWithConnection = false;
6173
+ fEmitOnNodeIntersect = false;
6135
6174
  fCreateNode = new EventEmitter();
6136
6175
  fReassignConnection = new EventEmitter();
6137
6176
  fCreateConnection = new EventEmitter();
6138
6177
  fDropToGroup = new EventEmitter();
6139
6178
  vCellSize = 1;
6140
6179
  hCellSize = 1;
6180
+ fCellSizeWhileDragging = false;
6181
+ fDragStarted = new EventEmitter();
6182
+ fDragEnded = new EventEmitter();
6141
6183
  plugins;
6142
6184
  constructor(ngZone, _fBrowser) {
6143
6185
  super(ngZone);
6144
6186
  this._fBrowser = _fBrowser;
6145
6187
  }
6146
6188
  ngOnInit() {
6147
- this._fMediator.send(new AddDndToStoreRequest(this));
6189
+ this._fMediator.execute(new AddDndToStoreRequest(this));
6148
6190
  }
6149
6191
  ngAfterViewInit() {
6150
6192
  super.subscribe(this._fBrowser.document);
6151
6193
  }
6152
6194
  onPointerDown(event) {
6195
+ FInjector.set(this._injector);
6153
6196
  this._fMediator.execute(new InitializeDragSequenceRequest());
6154
6197
  this.plugins.forEach((p) => p.onPointerDown?.(event));
6155
- this._fMediator.execute(new SingleSelectRequest(event));
6156
- this._fMediator.execute(new ReassignConnectionPreparationRequest(event));
6157
- this._fMediator.execute(new CreateConnectionPreparationRequest(event));
6158
- const isMouseLeftButton = event.isMouseLeftButton();
6159
- if (!isMouseLeftButton) {
6198
+ this._fMediator.execute(new SingleSelectRequest(event, this.fMultiSelectTrigger));
6199
+ this._fMediator.execute(new ReassignConnectionPreparationRequest(event, this.fReassignConnectionTrigger));
6200
+ this._fMediator.execute(new CreateConnectionPreparationRequest(event, this.fCreateConnectionTrigger));
6201
+ const isMouseLeftOrTouch = event.isMouseLeftButton();
6202
+ if (!isMouseLeftOrTouch) {
6160
6203
  this.finalizeDragSequence();
6161
6204
  }
6162
- return isMouseLeftButton;
6205
+ return isMouseLeftOrTouch;
6163
6206
  }
6164
6207
  prepareDragSequence(event) {
6165
6208
  this.plugins.forEach((p) => p.prepareDragSequence?.(event));
6166
- this._fMediator.send(new NodeResizePreparationRequest(event));
6167
- this._fMediator.send(new NodeMovePreparationRequest(event));
6168
- this._fMediator.send(new NodeDragToParentPreparationRequest(event));
6169
- this._fMediator.send(new CanvasMovePreparationRequest(event));
6170
- this._fMediator.send(new ExternalItemPreparationRequest(event));
6171
- this._fMediator.send(new PrepareDragSequenceRequest());
6209
+ this._fMediator.execute(new NodeResizePreparationRequest(event));
6210
+ this._fMediator.execute(new NodeMovePreparationRequest(event));
6211
+ this._fMediator.execute(new NodeDragToParentPreparationRequest(event));
6212
+ this._fMediator.execute(new CanvasMovePreparationRequest(event));
6213
+ this._fMediator.execute(new ExternalItemPreparationRequest(event));
6214
+ this._fMediator.execute(new PrepareDragSequenceRequest());
6172
6215
  }
6173
6216
  onSelect(event) {
6174
6217
  this.plugins.forEach((x) => x.onSelect?.(event));
@@ -6184,19 +6227,22 @@ class FDraggableDirective extends FDraggableBase {
6184
6227
  this._fMediator.execute(new NodeResizeFinalizeRequest(event));
6185
6228
  this._fMediator.execute(new NodeMoveFinalizeRequest(event));
6186
6229
  this._fMediator.execute(new NodeDragToParentFinalizeRequest(event));
6187
- this._fMediator.send(new CanvasMoveFinalizeRequest(event));
6230
+ this._fMediator.execute(new CanvasMoveFinalizeRequest(event));
6188
6231
  this._fMediator.execute(new ExternalItemFinalizeRequest(event));
6189
6232
  this._fMediator.execute(new EndDragSequenceRequest());
6233
+ FInjector.clear();
6190
6234
  }
6191
6235
  finalizeDragSequence() {
6192
6236
  this._fMediator.execute(new EmitSelectionChangeEventRequest());
6237
+ FInjector.clear();
6193
6238
  }
6194
6239
  ngOnDestroy() {
6195
- this._fMediator.send(new RemoveDndFromStoreRequest());
6240
+ this._fMediator.execute(new RemoveDndFromStoreRequest());
6196
6241
  super.unsubscribe();
6242
+ FInjector.clear();
6197
6243
  }
6198
6244
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FDraggableDirective, deps: [{ token: NgZone, optional: true }, { token: i1.BrowserService }], target: i0.ɵɵFactoryTarget.Directive });
6199
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: FDraggableDirective, selector: "f-flow[fDraggable]", inputs: { disabled: ["fDraggableDisabled", "disabled"], emitWhenNodeIntersectedWithConnection: ["emitWhenNodeIntersectedWithConnection", "emitWhenNodeIntersectedWithConnection", booleanAttribute], vCellSize: "vCellSize", hCellSize: "hCellSize" }, outputs: { fSelectionChange: "fSelectionChange", fNodeIntersectedWithConnections: "fNodeIntersectedWithConnections", fCreateNode: "fCreateNode", fReassignConnection: "fReassignConnection", fCreateConnection: "fCreateConnection", fDropToGroup: "fDropToGroup" }, queries: [{ propertyName: "plugins", predicate: F_DRAG_AND_DROP_PLUGIN, descendants: true }], exportAs: ["fDraggable"], usesInheritance: true, ngImport: i0 });
6245
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.4", type: FDraggableDirective, selector: "f-flow[fDraggable]", inputs: { disabled: ["fDraggableDisabled", "disabled", booleanAttribute], fMultiSelectTrigger: "fMultiSelectTrigger", fReassignConnectionTrigger: "fReassignConnectionTrigger", fCreateConnectionTrigger: "fCreateConnectionTrigger", fEmitOnNodeIntersect: ["fEmitOnNodeIntersect", "fEmitOnNodeIntersect", booleanAttribute], vCellSize: ["vCellSize", "vCellSize", numberAttribute], hCellSize: ["hCellSize", "hCellSize", numberAttribute], fCellSizeWhileDragging: ["fCellSizeWhileDragging", "fCellSizeWhileDragging", booleanAttribute] }, outputs: { fSelectionChange: "fSelectionChange", fNodeIntersectedWithConnections: "fNodeIntersectedWithConnections", fCreateNode: "fCreateNode", fReassignConnection: "fReassignConnection", fCreateConnection: "fCreateConnection", fDropToGroup: "fDropToGroup", fDragStarted: "fDragStarted", fDragEnded: "fDragEnded" }, queries: [{ propertyName: "plugins", predicate: F_DRAG_AND_DROP_PLUGIN, descendants: true }], exportAs: ["fDraggable"], usesInheritance: true, ngImport: i0 });
6200
6246
  }
6201
6247
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FDraggableDirective, decorators: [{
6202
6248
  type: Directive,
@@ -6211,12 +6257,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
6211
6257
  type: Optional
6212
6258
  }] }, { type: i1.BrowserService }], propDecorators: { disabled: [{
6213
6259
  type: Input,
6214
- args: ['fDraggableDisabled']
6260
+ args: [{ transform: booleanAttribute, alias: 'fDraggableDisabled' }]
6261
+ }], fMultiSelectTrigger: [{
6262
+ type: Input
6263
+ }], fReassignConnectionTrigger: [{
6264
+ type: Input
6265
+ }], fCreateConnectionTrigger: [{
6266
+ type: Input
6215
6267
  }], fSelectionChange: [{
6216
6268
  type: Output
6217
6269
  }], fNodeIntersectedWithConnections: [{
6218
6270
  type: Output
6219
- }], emitWhenNodeIntersectedWithConnection: [{
6271
+ }], fEmitOnNodeIntersect: [{
6220
6272
  type: Input,
6221
6273
  args: [{ transform: booleanAttribute }]
6222
6274
  }], fCreateNode: [{
@@ -6228,9 +6280,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
6228
6280
  }], fDropToGroup: [{
6229
6281
  type: Output
6230
6282
  }], vCellSize: [{
6231
- type: Input
6283
+ type: Input,
6284
+ args: [{ transform: numberAttribute }]
6232
6285
  }], hCellSize: [{
6233
- type: Input
6286
+ type: Input,
6287
+ args: [{ transform: numberAttribute }]
6288
+ }], fCellSizeWhileDragging: [{
6289
+ type: Input,
6290
+ args: [{ transform: booleanAttribute }]
6291
+ }], fDragStarted: [{
6292
+ type: Output
6293
+ }], fDragEnded: [{
6294
+ type: Output
6234
6295
  }], plugins: [{
6235
6296
  type: ContentChildren,
6236
6297
  args: [F_DRAG_AND_DROP_PLUGIN, { descendants: true }]
@@ -6335,7 +6396,7 @@ class FMinimapDragHandler {
6335
6396
  return point1.x === point2.x && point1.y === point2.y;
6336
6397
  }
6337
6398
  getNewPosition(eventPoint) {
6338
- return this.fMediator.send(new CalculateFlowPointFromMinimapPointRequest(this.flowRect, this.canvasPosition, eventPoint, this.minimap));
6399
+ return this.fMediator.execute(new CalculateFlowPointFromMinimapPointRequest(this.flowRect, this.canvasPosition, eventPoint, this.minimap));
6339
6400
  }
6340
6401
  onPointerUp() {
6341
6402
  this.fComponentsStore.fCanvas?.hostElement.classList.remove('f-scaled-animate');
@@ -6356,6 +6417,9 @@ let MinimapDragPreparationExecution = class MinimapDragPreparationExecution {
6356
6417
  this.fDraggableDataContext = fDraggableDataContext;
6357
6418
  }
6358
6419
  handle(request) {
6420
+ if (!this._isValid(request)) {
6421
+ return;
6422
+ }
6359
6423
  const eventPoint = request.event.getPosition();
6360
6424
  const startCanvasPosition = Point.fromPoint(this.fComponentsStore.fCanvas.transform.position);
6361
6425
  this.fComponentsStore.fCanvas.setPosition(this.getNewPosition(eventPoint, request.minimap));
@@ -6367,8 +6431,13 @@ let MinimapDragPreparationExecution = class MinimapDragPreparationExecution {
6367
6431
  new FMinimapDragHandler(this.fComponentsStore, this.fMediator, this.getFlowRect(), startCanvasPosition, eventPoint, request.minimap)
6368
6432
  ];
6369
6433
  }
6434
+ _isValid(request) {
6435
+ return !this.fDraggableDataContext.draggableItems.length &&
6436
+ !!request.event.targetElement.closest('.f-minimap') &&
6437
+ this.fComponentsStore.flowHost.contains(request.event.targetElement);
6438
+ }
6370
6439
  getNewPosition(eventPoint, minimap) {
6371
- return this.fMediator.send(new CalculateFlowPointFromMinimapPointRequest(this.getFlowRect(), Point.fromPoint(this.fComponentsStore.fCanvas.transform.position), eventPoint, minimap));
6440
+ return this.fMediator.execute(new CalculateFlowPointFromMinimapPointRequest(this.getFlowRect(), Point.fromPoint(this.fComponentsStore.fCanvas.transform.position), eventPoint, minimap));
6372
6441
  }
6373
6442
  getFlowRect() {
6374
6443
  return RectExtensions.fromElement(this.flowHost);
@@ -6383,31 +6452,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
6383
6452
  type: Injectable
6384
6453
  }], ctorParameters: () => [{ type: FComponentsStore }, { type: i2$1.FMediator }, { type: FDraggableDataContext }] });
6385
6454
 
6386
- let MinimapDragPreparationValidator = class MinimapDragPreparationValidator {
6387
- fComponentsStore;
6388
- fDraggableDataContext;
6389
- constructor(fComponentsStore, fDraggableDataContext) {
6390
- this.fComponentsStore = fComponentsStore;
6391
- this.fDraggableDataContext = fDraggableDataContext;
6392
- }
6393
- handle(request) {
6394
- return !this.fDraggableDataContext.draggableItems.length &&
6395
- !!request.event.targetElement.closest('.f-minimap') &&
6396
- this.fComponentsStore.flowHost.contains(request.event.targetElement);
6397
- }
6398
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: MinimapDragPreparationValidator, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
6399
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: MinimapDragPreparationValidator });
6400
- };
6401
- MinimapDragPreparationValidator = __decorate([
6402
- FValidatorRegister(MinimapDragPreparationRequest)
6403
- ], MinimapDragPreparationValidator);
6404
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: MinimapDragPreparationValidator, decorators: [{
6405
- type: Injectable
6406
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }] });
6407
-
6408
6455
  const MINIMAP_DRAG_PREPARATION_PROVIDERS = [
6409
6456
  MinimapDragPreparationExecution,
6410
- MinimapDragPreparationValidator,
6411
6457
  ];
6412
6458
 
6413
6459
  class MinimapDragFinalizeRequest {
@@ -6423,10 +6469,16 @@ let MinimapDragFinalizeExecution = class MinimapDragFinalizeExecution {
6423
6469
  this.fDraggableDataContext = fDraggableDataContext;
6424
6470
  }
6425
6471
  handle(request) {
6472
+ if (!this._isValid()) {
6473
+ return;
6474
+ }
6426
6475
  this.fDraggableDataContext.draggableItems.forEach((x) => {
6427
6476
  x.onPointerUp?.();
6428
6477
  });
6429
6478
  }
6479
+ _isValid() {
6480
+ return this.fDraggableDataContext.draggableItems.some((x) => x instanceof FMinimapDragHandler);
6481
+ }
6430
6482
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: MinimapDragFinalizeExecution, deps: [{ token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
6431
6483
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: MinimapDragFinalizeExecution });
6432
6484
  };
@@ -6437,27 +6489,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
6437
6489
  type: Injectable
6438
6490
  }], ctorParameters: () => [{ type: FDraggableDataContext }] });
6439
6491
 
6440
- let MinimapDragFinalizeValidator = class MinimapDragFinalizeValidator {
6441
- fDraggableDataContext;
6442
- constructor(fDraggableDataContext) {
6443
- this.fDraggableDataContext = fDraggableDataContext;
6444
- }
6445
- handle(request) {
6446
- return this.fDraggableDataContext.draggableItems.some((x) => x instanceof FMinimapDragHandler);
6447
- }
6448
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: MinimapDragFinalizeValidator, deps: [{ token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
6449
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: MinimapDragFinalizeValidator });
6450
- };
6451
- MinimapDragFinalizeValidator = __decorate([
6452
- FValidatorRegister(MinimapDragFinalizeRequest)
6453
- ], MinimapDragFinalizeValidator);
6454
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: MinimapDragFinalizeValidator, decorators: [{
6455
- type: Injectable
6456
- }], ctorParameters: () => [{ type: FDraggableDataContext }] });
6457
-
6458
6492
  const MINIMAP_DRAG_FINALIZE_PROVIDERS = [
6459
6493
  MinimapDragFinalizeExecution,
6460
- MinimapDragFinalizeValidator,
6461
6494
  ];
6462
6495
 
6463
6496
  class MinimapDrawNodesRequest {
@@ -6584,7 +6617,7 @@ let MinimapCalculateSvgScaleAndViewBoxExecution = class MinimapCalculateSvgScale
6584
6617
  return adjustRectToMinSize(scaledRect, minSize);
6585
6618
  }
6586
6619
  _calculateNodesBoundingBox() {
6587
- return this._fMediator.send(new CalculateNodesBoundingBoxRequest())
6620
+ return this._fMediator.execute(new CalculateNodesBoundingBoxRequest())
6588
6621
  || RectExtensions.initialize(0, 0, 0, 0);
6589
6622
  }
6590
6623
  _convertFromGlobalToFlowRect(rect) {
@@ -6636,129 +6669,116 @@ class SelectionAreaFinalizeRequest {
6636
6669
  }
6637
6670
  }
6638
6671
 
6639
- let SelectionAreaFinalizeExecution = class SelectionAreaFinalizeExecution {
6640
- fDraggableDataContext;
6641
- constructor(fDraggableDataContext) {
6642
- this.fDraggableDataContext = fDraggableDataContext;
6643
- }
6644
- handle(request) {
6645
- this.fDraggableDataContext.draggableItems.forEach((x) => {
6646
- x.onPointerUp?.();
6647
- });
6648
- }
6649
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaFinalizeExecution, deps: [{ token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
6650
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaFinalizeExecution });
6651
- };
6652
- SelectionAreaFinalizeExecution = __decorate([
6653
- FExecutionRegister(SelectionAreaFinalizeRequest)
6654
- ], SelectionAreaFinalizeExecution);
6655
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaFinalizeExecution, decorators: [{
6656
- type: Injectable
6657
- }], ctorParameters: () => [{ type: FDraggableDataContext }] });
6658
-
6659
6672
  class SelectionAreaDragHandle {
6660
- fComponentsStore;
6661
- fSelectionArea;
6662
- fDraggableDataContext;
6663
- fMediator;
6673
+ _fComponentsStore;
6674
+ _fSelectionArea;
6675
+ _fDraggableDataContext;
6676
+ _fMediator;
6664
6677
  _canBeSelected = [];
6665
6678
  _selectedByMove = [];
6666
- get canvasPosition() {
6667
- return Point.fromPoint(this.fComponentsStore.fCanvas.transform.position)
6668
- .add(this.fComponentsStore.fCanvas.transform.scaledPosition);
6679
+ get _fCanvasPosition() {
6680
+ return Point.fromPoint(this._fComponentsStore.fCanvas.transform.position)
6681
+ .add(this._fComponentsStore.fCanvas.transform.scaledPosition);
6669
6682
  }
6670
- constructor(fComponentsStore, fSelectionArea, fDraggableDataContext, fMediator) {
6671
- this.fComponentsStore = fComponentsStore;
6672
- this.fSelectionArea = fSelectionArea;
6673
- this.fDraggableDataContext = fDraggableDataContext;
6674
- this.fMediator = fMediator;
6683
+ constructor(_fComponentsStore, _fSelectionArea, _fDraggableDataContext, _fMediator) {
6684
+ this._fComponentsStore = _fComponentsStore;
6685
+ this._fSelectionArea = _fSelectionArea;
6686
+ this._fDraggableDataContext = _fDraggableDataContext;
6687
+ this._fMediator = _fMediator;
6675
6688
  }
6676
6689
  prepareDragSequence() {
6677
- this._canBeSelected = this.fMediator.send(new GetCanBeSelectedItemsRequest());
6678
- this.fSelectionArea.show();
6679
- this.fSelectionArea.draw(RectExtensions.initialize(this.fDraggableDataContext.onPointerDownPosition.x, this.fDraggableDataContext.onPointerDownPosition.y));
6690
+ this._canBeSelected = this._fMediator.execute(new GetCanBeSelectedItemsRequest());
6691
+ this._fSelectionArea.show();
6692
+ this._fSelectionArea.draw(RectExtensions.initialize(this._fDraggableDataContext.onPointerDownPosition.x, this._fDraggableDataContext.onPointerDownPosition.y));
6680
6693
  }
6681
6694
  onPointerMove(difference) {
6682
- const currentPoint = Point.fromPoint(difference).add(this.fDraggableDataContext.onPointerDownPosition);
6683
- const x = Math.min(this.fDraggableDataContext.onPointerDownPosition.x, currentPoint.x);
6684
- const y = Math.min(this.fDraggableDataContext.onPointerDownPosition.y, currentPoint.y);
6695
+ const currentPoint = Point.fromPoint(difference).add(this._fDraggableDataContext.onPointerDownPosition);
6696
+ const point = this._getMinimumPoint(this._fDraggableDataContext.onPointerDownPosition, currentPoint);
6685
6697
  const width = Math.abs(difference.x);
6686
6698
  const height = Math.abs(difference.y);
6687
- this.fSelectionArea.draw(RectExtensions.initialize(x, y, width, height));
6699
+ const fSelectionAreaRect = RectExtensions.initialize(point.x, point.y, width, height);
6700
+ this._fSelectionArea.draw(fSelectionAreaRect);
6688
6701
  this._selectedByMove = [];
6689
6702
  this._canBeSelected.forEach((item) => {
6690
- item.element.deselect();
6691
- const itemRect = RectExtensions.addPoint(item.rect, this.canvasPosition);
6692
- const isIntersect = RectExtensions.intersectionWithRect(itemRect, RectExtensions.initialize(x, y, width, height));
6703
+ item.element.unmarkAsSelected();
6704
+ const fItemRect = RectExtensions.addPoint(item.fRect, this._fCanvasPosition);
6705
+ const isIntersect = RectExtensions.intersectionWithRect(fItemRect, fSelectionAreaRect);
6693
6706
  if (isIntersect) {
6694
- item.element.select();
6707
+ item.element.markAsSelected();
6695
6708
  this._selectedByMove.push(item.element);
6696
6709
  }
6697
6710
  });
6698
- this.fMediator.send(new NotifyTransformChangedRequest());
6711
+ this._fMediator.execute(new NotifyTransformChangedRequest());
6712
+ }
6713
+ _getMinimumPoint(point1, point2) {
6714
+ return PointExtensions.initialize(Math.min(point1.x, point2.x), Math.min(point1.y, point2.y));
6699
6715
  }
6700
6716
  onPointerUp() {
6701
- this.fSelectionArea.hide();
6702
- this.fDraggableDataContext.selectedItems.push(...this._selectedByMove);
6717
+ this._fSelectionArea.hide();
6718
+ this._fDraggableDataContext.selectedItems.push(...this._selectedByMove);
6703
6719
  if (this._selectedByMove.length > 0) {
6704
- this.fDraggableDataContext.isSelectedChanged = true;
6720
+ this._fDraggableDataContext.isSelectedChanged = true;
6705
6721
  }
6706
6722
  }
6707
6723
  }
6708
6724
 
6709
- let SelectionAreaFinalizeValidator = class SelectionAreaFinalizeValidator {
6710
- fDraggableDataContext;
6711
- constructor(fDraggableDataContext) {
6712
- this.fDraggableDataContext = fDraggableDataContext;
6713
- }
6725
+ let SelectionAreaFinalizeExecution = class SelectionAreaFinalizeExecution {
6726
+ _fDraggableDataContext = inject(FDraggableDataContext);
6714
6727
  handle(request) {
6715
- return this.fDraggableDataContext.draggableItems.some((x) => x instanceof SelectionAreaDragHandle);
6728
+ if (!this._isValid()) {
6729
+ return;
6730
+ }
6731
+ this._fDraggableDataContext.draggableItems.forEach((x) => {
6732
+ x.onPointerUp?.();
6733
+ });
6716
6734
  }
6717
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaFinalizeValidator, deps: [{ token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
6718
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaFinalizeValidator });
6735
+ _isValid() {
6736
+ return this._fDraggableDataContext.draggableItems.some((x) => x instanceof SelectionAreaDragHandle);
6737
+ }
6738
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaFinalizeExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6739
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaFinalizeExecution });
6719
6740
  };
6720
- SelectionAreaFinalizeValidator = __decorate([
6721
- FValidatorRegister(SelectionAreaFinalizeRequest)
6722
- ], SelectionAreaFinalizeValidator);
6723
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaFinalizeValidator, decorators: [{
6741
+ SelectionAreaFinalizeExecution = __decorate([
6742
+ FExecutionRegister(SelectionAreaFinalizeRequest)
6743
+ ], SelectionAreaFinalizeExecution);
6744
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaFinalizeExecution, decorators: [{
6724
6745
  type: Injectable
6725
- }], ctorParameters: () => [{ type: FDraggableDataContext }] });
6726
-
6727
- const SELECTION_AREA_FINALIZE_PROVIDERS = [
6728
- SelectionAreaFinalizeExecution,
6729
- SelectionAreaFinalizeValidator,
6730
- ];
6746
+ }] });
6731
6747
 
6732
6748
  class SelectionAreaPreparationRequest {
6733
6749
  event;
6734
6750
  fSelectionArea;
6735
- constructor(event, fSelectionArea) {
6751
+ fTrigger;
6752
+ constructor(event, fSelectionArea, fTrigger) {
6736
6753
  this.event = event;
6737
6754
  this.fSelectionArea = fSelectionArea;
6755
+ this.fTrigger = fTrigger;
6738
6756
  }
6739
6757
  }
6740
6758
 
6741
6759
  let SelectionAreaPreparationExecution = class SelectionAreaPreparationExecution {
6742
- fComponentsStore;
6743
- fDraggableDataContext;
6744
- fMediator;
6745
- get flowHost() {
6746
- return this.fComponentsStore.fFlow.hostElement;
6747
- }
6748
- constructor(fComponentsStore, fDraggableDataContext, fMediator) {
6749
- this.fComponentsStore = fComponentsStore;
6750
- this.fDraggableDataContext = fDraggableDataContext;
6751
- this.fMediator = fMediator;
6760
+ _fMediator = inject(FMediator);
6761
+ _fComponentsStore = inject(FComponentsStore);
6762
+ _fDraggableDataContext = inject(FDraggableDataContext);
6763
+ get _fHost() {
6764
+ return this._fComponentsStore.fFlow.hostElement;
6752
6765
  }
6753
6766
  handle(request) {
6754
- this.fDraggableDataContext.draggableItems = [
6755
- new SelectionAreaDragHandle(this.fComponentsStore, request.fSelectionArea, this.fDraggableDataContext, this.fMediator)
6767
+ if (!this._isValid(request)) {
6768
+ return;
6769
+ }
6770
+ this._fDraggableDataContext.draggableItems = [
6771
+ new SelectionAreaDragHandle(this._fComponentsStore, request.fSelectionArea, this._fDraggableDataContext, this._fMediator)
6756
6772
  ];
6757
- this.fDraggableDataContext.onPointerDownScale = 1;
6758
- this.fDraggableDataContext.onPointerDownPosition = Point.fromPoint(request.event.getPosition())
6759
- .elementTransform(this.flowHost);
6773
+ this._fDraggableDataContext.onPointerDownScale = 1;
6774
+ this._fDraggableDataContext.onPointerDownPosition = Point.fromPoint(request.event.getPosition())
6775
+ .elementTransform(this._fHost);
6776
+ }
6777
+ _isValid(request) {
6778
+ return this._fDraggableDataContext.isEmpty()
6779
+ && isValidEventTrigger(request.event.originalEvent, request.fTrigger);
6760
6780
  }
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 });
6781
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaPreparationExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6762
6782
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaPreparationExecution });
6763
6783
  };
6764
6784
  SelectionAreaPreparationExecution = __decorate([
@@ -6766,41 +6786,11 @@ SelectionAreaPreparationExecution = __decorate([
6766
6786
  ], SelectionAreaPreparationExecution);
6767
6787
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaPreparationExecution, decorators: [{
6768
6788
  type: Injectable
6769
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: i2$1.FMediator }] });
6770
-
6771
- let SelectionAreaPreparationValidator = class SelectionAreaPreparationValidator {
6772
- fDraggableDataContext;
6773
- constructor(fDraggableDataContext) {
6774
- this.fDraggableDataContext = fDraggableDataContext;
6775
- }
6776
- handle(request) {
6777
- return this.isDragHandlesEmpty()
6778
- && this.isShiftPressed(request.event.originalEvent);
6779
- }
6780
- isDragHandlesEmpty() {
6781
- return !this.fDraggableDataContext.draggableItems.length;
6782
- }
6783
- isShiftPressed(event) {
6784
- return event.shiftKey;
6785
- }
6786
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaPreparationValidator, deps: [{ token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
6787
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaPreparationValidator });
6788
- };
6789
- SelectionAreaPreparationValidator = __decorate([
6790
- FValidatorRegister(SelectionAreaPreparationRequest)
6791
- ], SelectionAreaPreparationValidator);
6792
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SelectionAreaPreparationValidator, decorators: [{
6793
- type: Injectable
6794
- }], ctorParameters: () => [{ type: FDraggableDataContext }] });
6795
-
6796
- const SELECTION_AREA_PREPARATION_PROVIDERS = [
6797
- SelectionAreaPreparationExecution,
6798
- SelectionAreaPreparationValidator,
6799
- ];
6789
+ }] });
6800
6790
 
6801
6791
  const F_SELECTION_AREA_DRAG_AND_DROP_PROVIDERS = [
6802
- ...SELECTION_AREA_FINALIZE_PROVIDERS,
6803
- ...SELECTION_AREA_PREPARATION_PROVIDERS
6792
+ SelectionAreaPreparationExecution,
6793
+ SelectionAreaFinalizeExecution
6804
6794
  ];
6805
6795
 
6806
6796
  class FSelectionAreaBase {
@@ -6814,6 +6804,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
6814
6804
  class FSelectionAreaComponent extends FSelectionAreaBase {
6815
6805
  _fMediator = inject(FMediator);
6816
6806
  _elementReference = inject(ElementRef);
6807
+ fTrigger = (event) => {
6808
+ return event.shiftKey;
6809
+ };
6817
6810
  get hostElement() {
6818
6811
  return this._elementReference.nativeElement;
6819
6812
  }
@@ -6834,13 +6827,13 @@ class FSelectionAreaComponent extends FSelectionAreaBase {
6834
6827
  style.height = object.height + 'px';
6835
6828
  }
6836
6829
  onPointerDown(event) {
6837
- this._fMediator.send(new SelectionAreaPreparationRequest(event, this));
6830
+ this._fMediator.execute(new SelectionAreaPreparationRequest(event, this, this.fTrigger));
6838
6831
  }
6839
6832
  onPointerUp(event) {
6840
- this._fMediator.send(new SelectionAreaFinalizeRequest(event));
6833
+ this._fMediator.execute(new SelectionAreaFinalizeRequest(event));
6841
6834
  }
6842
6835
  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: [
6836
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.4", type: FSelectionAreaComponent, selector: "f-selection-area", inputs: { fTrigger: "fTrigger" }, host: { classAttribute: "f-selection-area f-component" }, providers: [
6844
6837
  { provide: F_DRAG_AND_DROP_PLUGIN, useExisting: FSelectionAreaComponent },
6845
6838
  ], usesInheritance: true, ngImport: i0, template: ``, isInline: true, styles: [":host{position:absolute}\n"] });
6846
6839
  }
@@ -6851,7 +6844,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
6851
6844
  }, providers: [
6852
6845
  { provide: F_DRAG_AND_DROP_PLUGIN, useExisting: FSelectionAreaComponent },
6853
6846
  ], styles: [":host{position:absolute}\n"] }]
6854
- }] });
6847
+ }], propDecorators: { fTrigger: [{
6848
+ type: Input
6849
+ }] } });
6855
6850
 
6856
6851
  const F_SELECTION_AREA_PROVIDERS = [
6857
6852
  FSelectionAreaComponent
@@ -6914,7 +6909,7 @@ let FindInputAtPositionExecution = class FindInputAtPositionExecution {
6914
6909
  return undefined;
6915
6910
  }
6916
6911
  const position = Point.fromPoint(request.toConnectorRect).add(this._calculateDifference(request.pointerPosition));
6917
- const fClosestInput = this._fMediator.send(new CalculateClosestInputRequest(position, request.canBeConnectedInputs));
6912
+ const fClosestInput = this._fMediator.execute(new CalculateClosestInputRequest(position, request.canBeConnectedInputs));
6918
6913
  return this._isValidClosestInput(fClosestInput) ? fClosestInput : undefined;
6919
6914
  }
6920
6915
  _isValidClosestInput(fClosestInput) {
@@ -6948,9 +6943,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
6948
6943
  }] });
6949
6944
 
6950
6945
  class GetAllCanBeConnectedInputsAndRectsRequest {
6951
- fOutput;
6952
- constructor(fOutput) {
6953
- this.fOutput = fOutput;
6946
+ fOutputOrOutlet;
6947
+ constructor(fOutputOrOutlet) {
6948
+ this.fOutputOrOutlet = fOutputOrOutlet;
6954
6949
  }
6955
6950
  }
6956
6951
 
@@ -6970,7 +6965,7 @@ let GetConnectorAndRectExecution = class GetConnectorAndRectExecution {
6970
6965
  };
6971
6966
  }
6972
6967
  _getConnectorRect(fConnector) {
6973
- return this._fMediator.send(new GetNormalizedElementRectRequest(fConnector.hostElement, true));
6968
+ return this._fMediator.execute(new GetNormalizedElementRectRequest(fConnector.hostElement, true));
6974
6969
  }
6975
6970
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetConnectorAndRectExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
6976
6971
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetConnectorAndRectExecution });
@@ -6989,25 +6984,25 @@ let GetAllCanBeConnectedInputsAndRectsExecution = class GetAllCanBeConnectedInpu
6989
6984
  return this._fComponentsStore.fInputs;
6990
6985
  }
6991
6986
  handle(payload) {
6992
- return this._getCanBeConnectedInputs(payload.fOutput).map((x) => {
6987
+ return this._getCanBeConnectedInputs(payload.fOutputOrOutlet).map((x) => {
6993
6988
  return this._fMediator.execute(new GetConnectorAndRectRequest(x));
6994
6989
  });
6995
6990
  }
6996
- _getCanBeConnectedInputs(fOutput) {
6991
+ _getCanBeConnectedInputs(fOutputOrOutlet) {
6997
6992
  let fInputs = [];
6998
- if (fOutput.canBeConnectedInputs?.length) {
6999
- fInputs = this._fInputs.filter((x) => fOutput.canBeConnectedInputs.includes(x.fId));
6993
+ if (fOutputOrOutlet.canBeConnectedInputs?.length) {
6994
+ fInputs = this._fInputs.filter((x) => fOutputOrOutlet.canBeConnectedInputs.includes(x.fId));
7000
6995
  }
7001
6996
  else {
7002
6997
  fInputs = this._fInputs.filter((x) => x.canBeConnected);
7003
- if (!fOutput.isSelfConnectable) {
7004
- fInputs = this._filterSelfConnectable(fInputs, fOutput);
6998
+ if (!fOutputOrOutlet.isSelfConnectable) {
6999
+ fInputs = this._filterSelfConnectable(fInputs, fOutputOrOutlet);
7005
7000
  }
7006
7001
  }
7007
7002
  return fInputs;
7008
7003
  }
7009
- _filterSelfConnectable(fInputs, fOutput) {
7010
- return fInputs.filter((x) => fOutput.fNodeId !== x.fNodeId);
7004
+ _filterSelfConnectable(fInputs, fOutputOrOutlet) {
7005
+ return fInputs.filter((x) => fOutputOrOutlet.fNodeId !== x.fNodeId);
7011
7006
  }
7012
7007
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetAllCanBeConnectedInputsAndRectsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7013
7008
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetAllCanBeConnectedInputsAndRectsExecution });
@@ -7195,16 +7190,13 @@ class ClearSelectionRequest {
7195
7190
  }
7196
7191
 
7197
7192
  let ClearSelectionExecution = class ClearSelectionExecution {
7198
- fDraggableDataContext;
7199
- constructor(fDraggableDataContext) {
7200
- this.fDraggableDataContext = fDraggableDataContext;
7201
- }
7193
+ _fDraggableDataContext = inject(FDraggableDataContext);
7202
7194
  handle(request) {
7203
- this.fDraggableDataContext.selectedItems.forEach((x) => x.deselect());
7204
- this.fDraggableDataContext.selectedItems = [];
7205
- this.fDraggableDataContext.isSelectedChanged = true;
7195
+ this._fDraggableDataContext.selectedItems.forEach((x) => x.unmarkAsSelected());
7196
+ this._fDraggableDataContext.selectedItems = [];
7197
+ this._fDraggableDataContext.isSelectedChanged = true;
7206
7198
  }
7207
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ClearSelectionExecution, deps: [{ token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
7199
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ClearSelectionExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7208
7200
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ClearSelectionExecution });
7209
7201
  };
7210
7202
  ClearSelectionExecution = __decorate([
@@ -7212,15 +7204,15 @@ ClearSelectionExecution = __decorate([
7212
7204
  ], ClearSelectionExecution);
7213
7205
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: ClearSelectionExecution, decorators: [{
7214
7206
  type: Injectable
7215
- }], ctorParameters: () => [{ type: FDraggableDataContext }] });
7207
+ }] });
7216
7208
 
7217
7209
  class GetCanBeSelectedItemsRequest {
7218
7210
  }
7219
7211
 
7220
7212
  let GetCanBeSelectedItemsExecution = class GetCanBeSelectedItemsExecution {
7221
- fDraggableDataContext;
7222
7213
  _fMediator = inject(FMediator);
7223
7214
  _fComponentsStore = inject(FComponentsStore);
7215
+ _fDraggableDataContext = inject(FDraggableDataContext);
7224
7216
  get fNodes() {
7225
7217
  return this._fComponentsStore.fNodes;
7226
7218
  }
@@ -7230,19 +7222,16 @@ let GetCanBeSelectedItemsExecution = class GetCanBeSelectedItemsExecution {
7230
7222
  get transform() {
7231
7223
  return this._fComponentsStore.fCanvas.transform;
7232
7224
  }
7233
- constructor(fDraggableDataContext) {
7234
- this.fDraggableDataContext = fDraggableDataContext;
7235
- }
7236
7225
  handle() {
7237
7226
  return [...this.getNodesWithRects(), ...this.getConnectionsWithRects()].filter((x) => {
7238
- return !this.fDraggableDataContext.selectedItems.includes(x.element);
7227
+ return !this._fDraggableDataContext.selectedItems.includes(x.element);
7239
7228
  });
7240
7229
  }
7241
7230
  getNodesWithRects() {
7242
7231
  return this.fNodes.filter((x) => !x.fSelectionDisabled).map((x) => {
7243
7232
  return {
7244
7233
  element: x,
7245
- rect: RectExtensions.mult(this._fMediator.send(new GetNormalizedElementRectRequest(x.hostElement, false)), this.transform.scale)
7234
+ fRect: RectExtensions.mult(this._fMediator.execute(new GetNormalizedElementRectRequest(x.hostElement, false)), this.transform.scale)
7246
7235
  };
7247
7236
  });
7248
7237
  }
@@ -7250,11 +7239,11 @@ let GetCanBeSelectedItemsExecution = class GetCanBeSelectedItemsExecution {
7250
7239
  return this.fConnections.filter((x) => !x.fSelectionDisabled).map((x) => {
7251
7240
  return {
7252
7241
  element: x,
7253
- rect: RectExtensions.mult(this._fMediator.send(new GetNormalizedElementRectRequest(x.boundingElement, false)), this.transform.scale)
7242
+ fRect: RectExtensions.mult(this._fMediator.execute(new GetNormalizedElementRectRequest(x.boundingElement, false)), this.transform.scale)
7254
7243
  };
7255
7244
  });
7256
7245
  }
7257
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetCanBeSelectedItemsExecution, deps: [{ token: FDraggableDataContext }], target: i0.ɵɵFactoryTarget.Injectable });
7246
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetCanBeSelectedItemsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7258
7247
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetCanBeSelectedItemsExecution });
7259
7248
  };
7260
7249
  GetCanBeSelectedItemsExecution = __decorate([
@@ -7262,7 +7251,7 @@ GetCanBeSelectedItemsExecution = __decorate([
7262
7251
  ], GetCanBeSelectedItemsExecution);
7263
7252
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: GetCanBeSelectedItemsExecution, decorators: [{
7264
7253
  type: Injectable
7265
- }], ctorParameters: () => [{ type: FDraggableDataContext }] });
7254
+ }] });
7266
7255
 
7267
7256
  class GetCurrentSelectionRequest {
7268
7257
  }
@@ -7315,20 +7304,20 @@ let SelectExecution = class SelectExecution {
7315
7304
  _fComponentsStore = inject(FComponentsStore);
7316
7305
  handle(request) {
7317
7306
  this._fDraggableDataContext.selectedItems.forEach((x) => {
7318
- x.deselect();
7307
+ x.unmarkAsSelected();
7319
7308
  });
7320
7309
  this._fDraggableDataContext.selectedItems = [];
7321
7310
  request.nodes.forEach((key) => {
7322
7311
  const node = this._fComponentsStore.fNodes.find((x) => x.fId === key);
7323
7312
  if (node) {
7324
- node.select();
7313
+ node.markAsSelected();
7325
7314
  this._fDraggableDataContext.selectedItems.push(node);
7326
7315
  }
7327
7316
  });
7328
7317
  request.connections.forEach((key) => {
7329
7318
  const connection = this._fComponentsStore.fConnections.find((x) => x.fId === key);
7330
7319
  if (connection) {
7331
- connection.select();
7320
+ connection.markAsSelected();
7332
7321
  this._fDraggableDataContext.selectedItems.push(connection);
7333
7322
  }
7334
7323
  });
@@ -7352,15 +7341,15 @@ let SelectAllExecution = class SelectAllExecution {
7352
7341
  _fComponentsStore = inject(FComponentsStore);
7353
7342
  handle(request) {
7354
7343
  this._fDraggableDataContext.selectedItems.forEach((x) => {
7355
- x.deselect();
7344
+ x.unmarkAsSelected();
7356
7345
  });
7357
7346
  this._fDraggableDataContext.selectedItems = [];
7358
7347
  this._fComponentsStore.fNodes.forEach((x) => {
7359
- x.select();
7348
+ x.markAsSelected();
7360
7349
  this._fDraggableDataContext.selectedItems.push(x);
7361
7350
  });
7362
7351
  this._fComponentsStore.fConnections.forEach((x) => {
7363
- x.select();
7352
+ x.markAsSelected();
7364
7353
  this._fDraggableDataContext.selectedItems.push(x);
7365
7354
  });
7366
7355
  this._fDraggableDataContext.isSelectedChanged = true;
@@ -7517,7 +7506,7 @@ let UpdateItemAndChildrenLayersExecution = class UpdateItemAndChildrenLayersExec
7517
7506
  const allElements = Array.from(itemContainer.children);
7518
7507
  const targetIndex = allElements.findIndex((x) => x === item);
7519
7508
  if (this.isAnythingNeedToBeMoved(allElements, targetIndex, elementsThatShouldBeInFront)) {
7520
- this.fMediator.send(new MoveFrontElementsBeforeTargetElementRequest(itemContainer, allElements, elementsThatShouldBeInFront, targetIndex));
7509
+ this.fMediator.execute(new MoveFrontElementsBeforeTargetElementRequest(itemContainer, allElements, elementsThatShouldBeInFront, targetIndex));
7521
7510
  }
7522
7511
  }
7523
7512
  isAnythingNeedToBeMoved(allElements, targetIndex, elementsThatShouldBeInFront) {
@@ -7539,7 +7528,7 @@ let UpdateItemAndChildrenLayersExecution = class UpdateItemAndChildrenLayersExec
7539
7528
  .sort((a, b) => allElements.indexOf(a) - allElements.indexOf(b));
7540
7529
  }
7541
7530
  getChildrenNodesAndGroups(fId) {
7542
- return this.fMediator.send(new GetDeepChildrenNodesAndGroupsRequest(fId)).map((x) => x.hostElement);
7531
+ return this.fMediator.execute(new GetDeepChildrenNodesAndGroupsRequest(fId)).map((x) => x.hostElement);
7543
7532
  }
7544
7533
  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 });
7545
7534
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: UpdateItemAndChildrenLayersExecution });
@@ -7560,12 +7549,12 @@ let SelectAndUpdateNodeLayerExecution = class SelectAndUpdateNodeLayerExecution
7560
7549
  }
7561
7550
  handle(request) {
7562
7551
  this.selectNodeIfNotSelected(request.fNode);
7563
- this.fMediator.send(new UpdateItemAndChildrenLayersRequest(request.fNode, request.fNode.hostElement.parentElement));
7552
+ this.fMediator.execute(new UpdateItemAndChildrenLayersRequest(request.fNode, request.fNode.hostElement.parentElement));
7564
7553
  }
7565
7554
  selectNodeIfNotSelected(fNode) {
7566
7555
  if (!this.fDraggableDataContext.selectedItems.includes(fNode) && !fNode.fSelectionDisabled) {
7567
7556
  this.fDraggableDataContext.selectedItems.push(fNode);
7568
- fNode.select();
7557
+ fNode.markAsSelected();
7569
7558
  this.fDraggableDataContext.isSelectedChanged = true;
7570
7559
  }
7571
7560
  }
@@ -7601,10 +7590,10 @@ let EmitSelectionChangeEventExecution = class EmitSelectionChangeEventExecution
7601
7590
  }
7602
7591
  this._emitSelectionChange(this._getSelection());
7603
7592
  this._fDraggableDataContext.isSelectedChanged = false;
7604
- this._fMediator.send(new NotifyTransformChangedRequest());
7593
+ this._fMediator.execute(new NotifyTransformChangedRequest());
7605
7594
  }
7606
7595
  _getSelection() {
7607
- return this._fMediator.send(new GetCurrentSelectionRequest());
7596
+ return this._fMediator.execute(new GetCurrentSelectionRequest());
7608
7597
  }
7609
7598
  _emitSelectionChange(selection) {
7610
7599
  this._fSelectionChange.emit(new FSelectionChangeEvent(selection.nodes, selection.groups, selection.connections));
@@ -7631,6 +7620,10 @@ let EndDragSequenceExecution = class EndDragSequenceExecution {
7631
7620
  handle(request) {
7632
7621
  this._hostElement.classList.remove(F_CSS_CLASS.DRAG_AND_DROP.DRAGGING);
7633
7622
  this._fDraggableDataContext.reset();
7623
+ this._emitDragEnded();
7624
+ }
7625
+ _emitDragEnded() {
7626
+ this._fComponentsStore.fDraggable?.fDragEnded?.emit();
7634
7627
  }
7635
7628
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: EndDragSequenceExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7636
7629
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: EndDragSequenceExecution });
@@ -7715,9 +7708,13 @@ let StartDragSequenceExecution = class StartDragSequenceExecution {
7715
7708
  handle(request) {
7716
7709
  if (this._fDraggableDataContext.draggableItems.length > 0) {
7717
7710
  this._hostElement.classList.add(F_CSS_CLASS.DRAG_AND_DROP.DRAGGING);
7718
- this._fMediator.send(new EmitSelectionChangeEventRequest());
7711
+ this._fMediator.execute(new EmitSelectionChangeEventRequest());
7712
+ this._emitDragStarted();
7719
7713
  }
7720
7714
  }
7715
+ _emitDragStarted() {
7716
+ this._fComponentsStore.fDraggable?.fDragStarted?.emit();
7717
+ }
7721
7718
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: StartDragSequenceExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
7722
7719
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: StartDragSequenceExecution });
7723
7720
  };
@@ -7733,7 +7730,7 @@ let PrepareDragSequenceExecution = class PrepareDragSequenceExecution {
7733
7730
  _fDraggableDataContext = inject(FDraggableDataContext);
7734
7731
  handle(request) {
7735
7732
  this._callPrepareDragSequence();
7736
- this._fMediator.send(new StartDragSequenceRequest());
7733
+ this._fMediator.execute(new StartDragSequenceRequest());
7737
7734
  }
7738
7735
  _callPrepareDragSequence() {
7739
7736
  this._fDraggableDataContext.draggableItems.forEach((item) => {
@@ -7931,9 +7928,9 @@ let GetFlowStateExecution = class GetFlowStateExecution {
7931
7928
  return {
7932
7929
  position: this._getCanvasPosition(this._fComponentsStore.fCanvas.transform),
7933
7930
  scale: this._fComponentsStore.fCanvas.transform.scale,
7934
- nodes: this._fMediator.send(new GetFlowStateNodesRequest(FNodeDirective)),
7935
- groups: this._fMediator.send(new GetFlowStateNodesRequest(FGroupDirective)),
7936
- connections: this._fMediator.send(new GetFlowStateConnectionsRequest())
7931
+ nodes: this._fMediator.execute(new GetFlowStateNodesRequest(FNodeDirective)),
7932
+ groups: this._fMediator.execute(new GetFlowStateNodesRequest(FGroupDirective)),
7933
+ connections: this._fMediator.execute(new GetFlowStateConnectionsRequest())
7937
7934
  };
7938
7935
  }
7939
7936
  _getCanvasPosition(transform) {
@@ -8207,7 +8204,7 @@ let UpdateNodeWhenStateOrSizeChangedExecution = class UpdateNodeWhenStateOrSizeC
8207
8204
  const { hostElement, connectors, stateChanges } = request.fComponent;
8208
8205
  new FChannelHub(new FResizeChannel(hostElement), stateChanges).pipe(notifyOnStart(), debounceTime(10)).listen(request.destroyRef, () => {
8209
8206
  this._calculateConnectorsConnectableSide(connectors, hostElement);
8210
- this._fMediator.send(new NotifyDataChangedRequest());
8207
+ this._fMediator.execute(new NotifyDataChangedRequest());
8211
8208
  });
8212
8209
  }
8213
8210
  _calculateConnectorsConnectableSide(fConnectors, fNodeHost) {
@@ -8481,7 +8478,7 @@ let SortNodeLayersExecution = class SortNodeLayersExecution {
8481
8478
  .sort((a, b) => allElements.indexOf(a) - allElements.indexOf(b));
8482
8479
  }
8483
8480
  getChildrenNodes(fId) {
8484
- return this.fMediator.send(new GetDeepChildrenNodesAndGroupsRequest(fId))
8481
+ return this.fMediator.execute(new GetDeepChildrenNodesAndGroupsRequest(fId))
8485
8482
  .filter((x) => this.fNodesContainer.contains(x.hostElement)).map((x) => x.hostElement);
8486
8483
  }
8487
8484
  moveChildrenNodes(sortedChildrenGroups) {
@@ -8514,7 +8511,7 @@ let SortItemsByParentExecution = class SortItemsByParentExecution {
8514
8511
  fMediator;
8515
8512
  fBrowser;
8516
8513
  fItemsContainer;
8517
- get fItemsFromContainer() {
8514
+ get _fItemElements() {
8518
8515
  return Array.from(this.fItemsContainer.children);
8519
8516
  }
8520
8517
  constructor(fComponentsStore, fMediator, fBrowser) {
@@ -8524,22 +8521,22 @@ let SortItemsByParentExecution = class SortItemsByParentExecution {
8524
8521
  }
8525
8522
  handle(request) {
8526
8523
  this.fItemsContainer = request.fItemsContainer;
8527
- this.getItems().forEach((parent) => {
8528
- this.moveChildrenItems(this.getSortedChildrenItems(parent), parent);
8524
+ this._getItemsOfContainer().forEach((fItem) => {
8525
+ this.moveChildrenItems(this._getSortedChildrenItems(fItem), fItem);
8529
8526
  });
8530
8527
  }
8531
- getItems() {
8532
- return this.fComponentsStore.fNodes.filter((x) => this.fItemsContainer.contains(x.hostElement));
8528
+ _getItemsOfContainer() {
8529
+ return this.fComponentsStore.fNodes
8530
+ .filter((x) => this.fItemsContainer.contains(x.hostElement));
8533
8531
  }
8534
- getSortedChildrenItems(parent) {
8535
- const allElements = this.fItemsFromContainer;
8536
- const parentIndex = allElements.indexOf(parent.hostElement);
8537
- return this.getChildrenGroups(parent.fId)
8538
- .filter((child) => allElements.indexOf(child) < parentIndex)
8539
- .sort((a, b) => allElements.indexOf(a) - allElements.indexOf(b));
8532
+ _getSortedChildrenItems(fItem) {
8533
+ const indexInContainer = this._fItemElements.indexOf(fItem.hostElement);
8534
+ return this._getChildrenItems(fItem.fId)
8535
+ .filter((child) => this._fItemElements.indexOf(child) < indexInContainer)
8536
+ .sort((a, b) => this._fItemElements.indexOf(a) - this._fItemElements.indexOf(b));
8540
8537
  }
8541
- getChildrenGroups(fId) {
8542
- return this.fMediator.send(new GetDeepChildrenNodesAndGroupsRequest(fId))
8538
+ _getChildrenItems(fId) {
8539
+ return this.fMediator.execute(new GetDeepChildrenNodesAndGroupsRequest(fId))
8543
8540
  .filter((x) => this.fItemsContainer.contains(x.hostElement)).map((x) => x.hostElement);
8544
8541
  }
8545
8542
  moveChildrenItems(sortedChildrenItems, parent) {
@@ -8574,9 +8571,9 @@ let SortItemLayersExecution = class SortItemLayersExecution {
8574
8571
  if (!this.fComponentsStore.fCanvas) {
8575
8572
  return;
8576
8573
  }
8577
- this.fMediator.send(new SortItemsByParentRequest(this.fComponentsStore.fCanvas.fGroupsContainer.nativeElement));
8578
- this.fMediator.send(new SortNodeLayersRequest());
8579
- this.fMediator.send(new SortItemsByParentRequest(this.fComponentsStore.fCanvas.fNodesContainer.nativeElement));
8574
+ this.fMediator.execute(new SortItemsByParentRequest(this.fComponentsStore.fCanvas.fGroupsContainer.nativeElement));
8575
+ this.fMediator.execute(new SortNodeLayersRequest());
8576
+ this.fMediator.execute(new SortItemsByParentRequest(this.fComponentsStore.fCanvas.fNodesContainer.nativeElement));
8580
8577
  }
8581
8578
  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 });
8582
8579
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: SortItemLayersExecution });
@@ -8592,6 +8589,13 @@ function createSVGElement(tag, fBrowser) {
8592
8589
  return fBrowser.document.createElementNS('http://www.w3.org/2000/svg', tag);
8593
8590
  }
8594
8591
 
8592
+ function isValidEventTrigger(event, fTrigger) {
8593
+ return fTrigger(event);
8594
+ }
8595
+ function defaultEventTrigger(event) {
8596
+ return true;
8597
+ }
8598
+
8595
8599
  var EFTriggerEvent;
8596
8600
  (function (EFTriggerEvent) {
8597
8601
  EFTriggerEvent["WHEEL"] = "wheel";
@@ -8873,16 +8877,16 @@ class FBackgroundComponent extends FBackgroundBase {
8873
8877
  fBackgroundPattern;
8874
8878
  _fMediator = inject(FMediator);
8875
8879
  ngOnInit() {
8876
- this._fMediator.send(new AddBackgroundToStoreRequest(this));
8880
+ this._fMediator.execute(new AddBackgroundToStoreRequest(this));
8877
8881
  }
8878
8882
  ngAfterContentInit() {
8879
- this._fMediator.send(new AddPatternToBackgroundRequest(this.fBackgroundPattern));
8883
+ this._fMediator.execute(new AddPatternToBackgroundRequest(this.fBackgroundPattern));
8880
8884
  }
8881
8885
  setTransform(transform) {
8882
8886
  this.fBackgroundPattern?.setTransform(transform);
8883
8887
  }
8884
8888
  ngOnDestroy() {
8885
- this._fMediator.send(new RemoveBackgroundFromStoreRequest(this));
8889
+ this._fMediator.execute(new RemoveBackgroundFromStoreRequest(this));
8886
8890
  }
8887
8891
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FBackgroundComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
8888
8892
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.4", type: FBackgroundComponent, selector: "f-background", host: { classAttribute: "f-component f-background" }, providers: [{ provide: F_BACKGROUND, useExisting: FBackgroundComponent }], queries: [{ propertyName: "fBackgroundPattern", first: true, predicate: F_BACKGROUND_PATTERN, descendants: true }], usesInheritance: true, ngImport: i0, template: "<svg><ng-content></ng-content></svg>", isInline: true, styles: [":host{position:absolute;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}:host svg{width:100%;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
@@ -8935,10 +8939,10 @@ class FCanvasComponent extends FCanvasBase {
8935
8939
  _elementReference = inject(ElementRef);
8936
8940
  fCanvasChange = new EventEmitter();
8937
8941
  set position(value) {
8938
- this._fMediator.send(new InputCanvasPositionRequest(this.transform, value));
8942
+ this._fMediator.execute(new InputCanvasPositionRequest(this.transform, PointExtensions.castToPoint(value)));
8939
8943
  }
8940
8944
  set scale(value) {
8941
- this._fMediator.send(new InputCanvasScaleRequest(this.transform, value));
8945
+ this._fMediator.execute(new InputCanvasScaleRequest(this.transform, value));
8942
8946
  }
8943
8947
  get hostElement() {
8944
8948
  return this._elementReference.nativeElement;
@@ -8948,26 +8952,26 @@ class FCanvasComponent extends FCanvasBase {
8948
8952
  fConnectionsContainer;
8949
8953
  _fMediator = inject(FMediator);
8950
8954
  ngOnInit() {
8951
- this._fMediator.send(new AddCanvasToStoreRequest(this));
8955
+ this._fMediator.execute(new AddCanvasToStoreRequest(this));
8952
8956
  }
8953
8957
  redraw() {
8954
- this._fMediator.send(new SetBackgroundTransformRequest(this.transform));
8958
+ this._fMediator.execute(new SetBackgroundTransformRequest(this.transform));
8955
8959
  this.hostElement.setAttribute("style", `transform: ${TransformModelExtensions.toString(this.transform)}`);
8956
- this._fMediator.send(new NotifyTransformChangedRequest());
8960
+ this._fMediator.execute(new NotifyTransformChangedRequest());
8957
8961
  }
8958
8962
  redrawWithAnimation() {
8959
- this._fMediator.send(new SetBackgroundTransformRequest(this.transform));
8963
+ this._fMediator.execute(new SetBackgroundTransformRequest(this.transform));
8960
8964
  this.hostElement.setAttribute("style", `transition: transform ${isMobile() ? 80 : 150}ms ease-in-out; transform: ${TransformModelExtensions.toString(this.transform)}`);
8961
8965
  transitionEnd(this.hostElement, () => this.redraw());
8962
8966
  }
8963
8967
  centerGroupOrNode(id, animated = true) {
8964
- this._fMediator.send(new CenterGroupOrNodeRequest(id, animated));
8968
+ this._fMediator.execute(new CenterGroupOrNodeRequest(id, animated));
8965
8969
  }
8966
8970
  fitToScreen(toCenter = PointExtensions.initialize(), animated = true) {
8967
- this._fMediator.send(new FitToFlowRequest(toCenter, animated));
8971
+ this._fMediator.execute(new FitToFlowRequest(toCenter, animated));
8968
8972
  }
8969
8973
  resetScaleAndCenter(animated = true) {
8970
- this._fMediator.send(new ResetScaleAndCenterRequest(animated));
8974
+ this._fMediator.execute(new ResetScaleAndCenterRequest(animated));
8971
8975
  }
8972
8976
  getScale() {
8973
8977
  return this.transform.scale || 1;
@@ -8979,7 +8983,7 @@ class FCanvasComponent extends FCanvasBase {
8979
8983
  this.setScale(scale, toPosition);
8980
8984
  }
8981
8985
  setScale(scale, toPosition = PointExtensions.initialize()) {
8982
- this._fMediator.send(new UpdateScaleRequest(scale, toPosition));
8986
+ this._fMediator.execute(new UpdateScaleRequest(scale, toPosition));
8983
8987
  }
8984
8988
  /**
8985
8989
  * @deprecated Method "resetZoom" is deprecated. Use "resetScale" instead. This method will be removed in version 18.0.0.`,
@@ -8988,10 +8992,10 @@ class FCanvasComponent extends FCanvasBase {
8988
8992
  this.resetScale();
8989
8993
  }
8990
8994
  resetScale() {
8991
- this._fMediator.send(new ResetScaleRequest());
8995
+ this._fMediator.execute(new ResetScaleRequest());
8992
8996
  }
8993
8997
  ngOnDestroy() {
8994
- this._fMediator.send(new RemoveCanvasFromStoreRequest());
8998
+ this._fMediator.execute(new RemoveCanvasFromStoreRequest());
8995
8999
  }
8996
9000
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FCanvasComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
8997
9001
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.4", type: FCanvasComponent, selector: "f-canvas", inputs: { position: "position", scale: "scale" }, outputs: { fCanvasChange: "fCanvasChange" }, host: { classAttribute: "f-component f-canvas" }, providers: [
@@ -9052,7 +9056,7 @@ class FMinimapFlowDirective {
9052
9056
  }
9053
9057
  model = new FMinimapData(this.hostElement);
9054
9058
  redraw() {
9055
- const { scale, viewBox } = this._fMediator.send(new MinimapCalculateSvgScaleAndViewBoxRequest(this.hostElement, this.fMinSize));
9059
+ const { scale, viewBox } = this._fMediator.execute(new MinimapCalculateSvgScaleAndViewBoxRequest(this.hostElement, this.fMinSize));
9056
9060
  this.model = new FMinimapData(this.hostElement, scale, viewBox);
9057
9061
  setRectToViewBox(viewBox, this.hostElement);
9058
9062
  }
@@ -9076,7 +9080,7 @@ class FMinimapCanvasDirective {
9076
9080
  }
9077
9081
  redraw() {
9078
9082
  this._clearCanvas();
9079
- this._fMediator.send(new MinimapDrawNodesRequest())
9083
+ this._fMediator.execute(new MinimapDrawNodesRequest())
9080
9084
  .forEach((x) => {
9081
9085
  this.hostElement.appendChild(x);
9082
9086
  });
@@ -9101,7 +9105,7 @@ class FMinimapViewDirective {
9101
9105
  return this._elementReference.nativeElement;
9102
9106
  }
9103
9107
  redraw() {
9104
- setRectToElement(this._fMediator.send(new MinimapCalculateViewBoxRequest()), this.hostElement);
9108
+ setRectToElement(this._fMediator.execute(new MinimapCalculateViewBoxRequest()), this.hostElement);
9105
9109
  }
9106
9110
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FMinimapViewDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
9107
9111
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.4", type: FMinimapViewDirective, selector: "rect[fMinimapView]", host: { classAttribute: "f-component f-minimap-view" }, ngImport: i0 });
@@ -9128,7 +9132,7 @@ class FMinimapComponent {
9128
9132
  this._listenTransformChanges();
9129
9133
  }
9130
9134
  _listenTransformChanges() {
9131
- this._fMediator.send(new ListenTransformChangesRequest()).pipe(notifyOnStart(), debounceTime(5)).listen(this._destroyRef, () => this._redraw());
9135
+ this._fMediator.execute(new ListenTransformChangesRequest()).pipe(notifyOnStart(), debounceTime(5)).listen(this._destroyRef, () => this._redraw());
9132
9136
  }
9133
9137
  _redraw() {
9134
9138
  if (!this._fBrowser.isBrowser()) {
@@ -9139,10 +9143,10 @@ class FMinimapComponent {
9139
9143
  this.fMinimapCanvas.redraw();
9140
9144
  }
9141
9145
  onPointerDown(event) {
9142
- this._fMediator.send(new MinimapDragPreparationRequest(event, this.fMinimapFlow.model));
9146
+ this._fMediator.execute(new MinimapDragPreparationRequest(event, this.fMinimapFlow.model));
9143
9147
  }
9144
9148
  onPointerUp(event) {
9145
- this._fMediator.send(new MinimapDragFinalizeRequest(event));
9149
+ this._fMediator.execute(new MinimapDragFinalizeRequest(event));
9146
9150
  }
9147
9151
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FMinimapComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
9148
9152
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.4", type: FMinimapComponent, selector: "f-minimap", inputs: { fMinSize: "fMinSize" }, host: { classAttribute: "f-component f-minimap" }, providers: [
@@ -9197,7 +9201,7 @@ class FFlowComponent extends FFlowBase {
9197
9201
  this.fBrowser = fBrowser;
9198
9202
  }
9199
9203
  ngOnInit() {
9200
- this._fMediator.send(new AddFlowToStoreRequest(this));
9204
+ this._fMediator.execute(new AddFlowToStoreRequest(this));
9201
9205
  }
9202
9206
  ngAfterContentInit() {
9203
9207
  if (!this.fBrowser.isBrowser()) {
@@ -9207,13 +9211,13 @@ class FFlowComponent extends FFlowBase {
9207
9211
  this._listenDataChanges();
9208
9212
  }
9209
9213
  _listenCountChanges() {
9210
- this._fMediator.send(new ListenCountChangesRequest()).listen(this._destroyRef, () => {
9211
- this._fMediator.send(new SortItemLayersRequest());
9214
+ this._fMediator.execute(new ListenCountChangesRequest()).listen(this._destroyRef, () => {
9215
+ this._fMediator.execute(new SortItemLayersRequest());
9212
9216
  });
9213
9217
  }
9214
9218
  _listenDataChanges() {
9215
- this._fMediator.send(new ListenDataChangesRequest()).listen(this._destroyRef, () => {
9216
- this._fMediator.send(new RedrawConnectionsRequest());
9219
+ this._fMediator.execute(new ListenDataChangesRequest()).listen(this._destroyRef, () => {
9220
+ this._fMediator.execute(new RedrawConnectionsRequest());
9217
9221
  this._emitLoaded();
9218
9222
  });
9219
9223
  }
@@ -9224,34 +9228,34 @@ class FFlowComponent extends FFlowBase {
9224
9228
  }
9225
9229
  }
9226
9230
  redraw() {
9227
- this._fMediator.send(new NotifyDataChangedRequest());
9231
+ this._fMediator.execute(new NotifyDataChangedRequest());
9228
9232
  }
9229
9233
  reset() {
9230
9234
  this._isLoaded = false;
9231
9235
  }
9232
9236
  getNodesBoundingBox() {
9233
- return this._fMediator.send(new CalculateNodesBoundingBoxNormalizedPositionRequest());
9237
+ return this._fMediator.execute(new CalculateNodesBoundingBoxNormalizedPositionRequest());
9234
9238
  }
9235
9239
  getSelection() {
9236
- return this._fMediator.send(new GetCurrentSelectionRequest());
9240
+ return this._fMediator.execute(new GetCurrentSelectionRequest());
9237
9241
  }
9238
9242
  getPositionInFlow(position) {
9239
- return this._fMediator.send(new GetNormalizedPointRequest(position));
9243
+ return this._fMediator.execute(new GetNormalizedPointRequest(position));
9240
9244
  }
9241
9245
  getState() {
9242
- return this._fMediator.send(new GetFlowStateRequest());
9246
+ return this._fMediator.execute(new GetFlowStateRequest());
9243
9247
  }
9244
9248
  selectAll() {
9245
- this._fMediator.send(new SelectAllRequest());
9249
+ this._fMediator.execute(new SelectAllRequest());
9246
9250
  }
9247
9251
  select(nodes, connections) {
9248
- this._fMediator.send(new SelectRequest(nodes, connections));
9252
+ this._fMediator.execute(new SelectRequest(nodes, connections));
9249
9253
  }
9250
9254
  clearSelection() {
9251
- this._fMediator.send(new ClearSelectionRequest());
9255
+ this._fMediator.execute(new ClearSelectionRequest());
9252
9256
  }
9253
9257
  ngOnDestroy() {
9254
- this._fMediator.send(new RemoveFlowFromStoreRequest());
9258
+ this._fMediator.execute(new RemoveFlowFromStoreRequest());
9255
9259
  }
9256
9260
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.4", ngImport: i0, type: FFlowComponent, deps: [{ token: i1.BrowserService }], target: i0.ɵɵFactoryTarget.Component });
9257
9261
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.4", type: FFlowComponent, selector: "f-flow", inputs: { fId: ["fFlowId", "fId"] }, outputs: { fLoaded: "fLoaded" }, host: { properties: { "attr.id": "fId" }, classAttribute: "f-component f-flow" }, providers: [
@@ -9518,5 +9522,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.4", ngImpor
9518
9522
  * Generated bundle index. Do not edit.
9519
9523
  */
9520
9524
 
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 };
9525
+ 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, BaseConnectionDragHandler, 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, CalculateCommonNodeMoveLimitsExecution, CalculateCommonNodeMoveLimitsRequest, CalculateConnectionCenterHandler, CalculateConnectionCenterRequest, CalculateConnectionLineByBehaviorExecution, CalculateConnectionLineByBehaviorRequest, CalculateFlowPointFromMinimapPointExecution, CalculateFlowPointFromMinimapPointRequest, CalculateNodeMoveLimitsExecution, CalculateNodeMoveLimitsRequest, CalculateNodesBoundingBoxExecution, CalculateNodesBoundingBoxNormalizedPositionExecution, CalculateNodesBoundingBoxNormalizedPositionRequest, CalculateNodesBoundingBoxRequest, CanvasDragHandler, CanvasMoveFinalizeExecution, CanvasMoveFinalizeRequest, CanvasMovePreparationExecution, CanvasMovePreparationRequest, CenterGroupOrNodeExecution, CenterGroupOrNodeRequest, ClearSelectionExecution, ClearSelectionRequest, CreateConnectionDragHandler, CreateConnectionDragHandlerPreparationExecution, CreateConnectionDragHandlerPreparationRequest, CreateConnectionFinalizeExecution, CreateConnectionFinalizeRequest, CreateConnectionFromOutletPreparationExecution, CreateConnectionFromOutletPreparationRequest, CreateConnectionFromOutputPreparationExecution, CreateConnectionFromOutputPreparationRequest, 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, 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, FInjector, 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, 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, MinimapDragPreparationExecution, MinimapDragPreparationRequest, MinimapDrawNodesExecution, MinimapDrawNodesRequest, MoveFrontElementsBeforeTargetElementExecution, MoveFrontElementsBeforeTargetElementRequest, NODE_DRAG_TO_PARENT_FINALIZE_PROVIDERS, NODE_MOVE_PREPARATION_PROVIDERS, NODE_PROVIDERS, NODE_RESIZE_FINALIZE_PROVIDERS, NODE_RESIZE_PROVIDERS, NodeDragHandler, NodeDragToParentDragHandler, NodeDragToParentFinalizeExecution, NodeDragToParentFinalizeRequest, NodeDragToParentPreparationExecution, NodeDragToParentPreparationRequest, NodeMoveFinalizeExecution, NodeMoveFinalizeRequest, NodeMovePreparationExecution, NodeMovePreparationRequest, NodeResizeDragHandler, NodeResizeFinalizeExecution, NodeResizeFinalizeRequest, NodeResizePreparationExecution, NodeResizePreparationRequest, NotifyDataChangedExecution, NotifyDataChangedRequest, NotifyTransformChangedExecution, NotifyTransformChangedRequest, OnPointerMoveExecution, OnPointerMoveRequest, PointBoundsLimiter, 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, SINGLE_SELECT_PROVIDERS, SelectAllExecution, SelectAllRequest, SelectAndUpdateNodeLayerExecution, SelectAndUpdateNodeLayerRequest, SelectExecution, SelectRequest, SelectionAreaDragHandle, SelectionAreaFinalizeExecution, SelectionAreaFinalizeRequest, SelectionAreaPreparationExecution, SelectionAreaPreparationRequest, SetBackgroundTransformExecution, SetBackgroundTransformRequest, SetZoomExecution, SetZoomRequest, SingleSelectExecution, SingleSelectRequest, SortItemLayersExecution, SortItemLayersRequest, SortItemsByParentExecution, SortItemsByParentRequest, SortNodeLayersExecution, SortNodeLayersRequest, SourceConnectionDragHandler, SourceTargetConnectionDragHandler, StartDragSequenceExecution, StartDragSequenceRequest, SummaryNodeDragHandler, TargetConnectionDragHandler, UnmarkAllCanBeConnectedInputsExecution, UnmarkAllCanBeConnectedInputsRequest, UpdateItemAndChildrenLayersExecution, UpdateItemAndChildrenLayersRequest, UpdateNodeWhenStateOrSizeChangedExecution, UpdateNodeWhenStateOrSizeChangedRequest, UpdateScaleExecution, UpdateScaleRequest, createSVGElement, debounceTime, defaultEventTrigger, fInject, fixedCenterBehavior, fixedOutboundBehavior, floatingBehavior, getExternalItem, getMarkerEndId, getMarkerSelectedEndId, getMarkerSelectedStartId, getMarkerStartId, isExternalItem, isMobile, isNode, isNodeOutlet, isNodeOutput, isValidEventTrigger, mixinChangeSelection, mixinChangeVisibility, notifyOnStart, transitionEnd };
9522
9526
  //# sourceMappingURL=foblex-flow.mjs.map