@foblex/flow 17.8.3 → 17.8.5

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 (172) hide show
  1. package/domain/f-connectors/calculate-source-connectors-to-connect/calculate-source-connectors-to-connect-request.d.ts +8 -0
  2. package/domain/f-connectors/calculate-source-connectors-to-connect/calculate-source-connectors-to-connect.d.ts +21 -0
  3. package/domain/f-connectors/calculate-source-connectors-to-connect/index.d.ts +2 -0
  4. package/domain/f-connectors/calculate-target-connectors-to-connect/calculate-target-connectors-to-connect-request.d.ts +8 -0
  5. package/domain/f-connectors/calculate-target-connectors-to-connect/calculate-target-connectors-to-connect.d.ts +20 -0
  6. package/domain/f-connectors/calculate-target-connectors-to-connect/index.d.ts +2 -0
  7. package/domain/f-connectors/index.d.ts +2 -2
  8. package/domain/f-connectors/providers.d.ts +3 -3
  9. package/domain/f-event-trigger.d.ts +1 -1
  10. package/domain/f-flow/providers.d.ts +1 -1
  11. package/domain/f-line-alignment/providers.d.ts +1 -1
  12. package/domain/f-node/add-node-to-store/add-node-to-store-request.d.ts +2 -2
  13. package/domain/f-node/{calculate-node-connectors-connectable-sides → calculate-connectors-connectable-sides}/calculate-connectable-side-by-connected-positions/calculate-connectable-side-by-connected-positions-request.d.ts +3 -1
  14. package/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/calculate-connectable-side-by-connected-positions.d.ts +22 -0
  15. package/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-internal-position/calculate-connectable-side-by-internal-position.d.ts +52 -0
  16. package/domain/f-node/calculate-connectors-connectable-sides/calculate-connectors-connectable-sides-request.d.ts +6 -0
  17. package/domain/f-node/calculate-connectors-connectable-sides/calculate-connectors-connectable-sides.d.ts +22 -0
  18. package/domain/f-node/calculate-connectors-connectable-sides/constants/calculatable-sides.d.ts +6 -0
  19. package/domain/f-node/calculate-connectors-connectable-sides/constants/index.d.ts +1 -0
  20. package/domain/f-node/calculate-connectors-connectable-sides/index.d.ts +7 -0
  21. package/domain/f-node/calculate-connectors-connectable-sides/models/index.d.ts +1 -0
  22. package/domain/f-node/calculate-connectors-connectable-sides/models/t-calculate-mode.d.ts +2 -0
  23. package/domain/f-node/calculate-connectors-connectable-sides/utils/determine-side.d.ts +10 -0
  24. package/domain/f-node/calculate-connectors-connectable-sides/utils/index.d.ts +2 -0
  25. package/domain/f-node/calculate-connectors-connectable-sides/utils/is-calculate-mode.d.ts +7 -0
  26. package/domain/f-node/calculate-input-connections/calculate-input-connections-request.d.ts +2 -2
  27. package/domain/f-node/calculate-input-connections/calculate-input-connections.d.ts +3 -3
  28. package/domain/f-node/calculate-nodes-bounding-box/calculate-nodes-bounding-box.d.ts +2 -3
  29. package/domain/f-node/calculate-output-connections/calculate-output-connections-request.d.ts +2 -2
  30. package/domain/f-node/calculate-output-connections/calculate-output-connections.d.ts +3 -3
  31. package/domain/f-node/index.d.ts +1 -2
  32. package/domain/f-node/providers.d.ts +2 -3
  33. package/domain/f-selection/select-and-update-node-layer/select-and-update-node-layer.execution.d.ts +2 -2
  34. package/domain/f-selection/select-and-update-node-layer/select-and-update-node-layer.request.d.ts +2 -2
  35. package/domain/f-zoom/providers.d.ts +1 -1
  36. package/domain/providers.d.ts +1 -1
  37. package/esm2022/domain/css-cls.mjs +2 -1
  38. package/esm2022/domain/f-connectors/calculate-source-connectors-to-connect/calculate-source-connectors-to-connect-request.mjs +10 -0
  39. package/esm2022/domain/f-connectors/calculate-source-connectors-to-connect/calculate-source-connectors-to-connect.mjs +59 -0
  40. package/esm2022/domain/f-connectors/calculate-source-connectors-to-connect/index.mjs +3 -0
  41. package/esm2022/domain/f-connectors/calculate-target-connectors-to-connect/calculate-target-connectors-to-connect-request.mjs +10 -0
  42. package/esm2022/domain/f-connectors/calculate-target-connectors-to-connect/calculate-target-connectors-to-connect.mjs +64 -0
  43. package/esm2022/domain/f-connectors/calculate-target-connectors-to-connect/index.mjs +3 -0
  44. package/esm2022/domain/f-connectors/index.mjs +3 -3
  45. package/esm2022/domain/f-connectors/providers.mjs +5 -5
  46. package/esm2022/domain/f-event-trigger.mjs +2 -2
  47. package/esm2022/domain/f-node/add-node-to-store/add-node-to-store-request.mjs +4 -4
  48. package/esm2022/domain/f-node/add-node-to-store/add-node-to-store.mjs +2 -2
  49. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/calculate-connectable-side-by-connected-positions-request.mjs +10 -0
  50. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/calculate-connectable-side-by-connected-positions.mjs +59 -0
  51. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/index.mjs +3 -0
  52. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-internal-position/calculate-connectable-side-by-internal-position-request.mjs +8 -0
  53. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-internal-position/calculate-connectable-side-by-internal-position.mjs +132 -0
  54. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectable-side-by-internal-position/index.mjs +3 -0
  55. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectors-connectable-sides-request.mjs +8 -0
  56. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/calculate-connectors-connectable-sides.mjs +73 -0
  57. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/constants/calculatable-sides.mjs +12 -0
  58. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/constants/index.mjs +2 -0
  59. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/index.mjs +8 -0
  60. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/models/index.mjs +2 -0
  61. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/models/t-calculate-mode.mjs +2 -0
  62. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/utils/determine-side.mjs +124 -0
  63. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/utils/index.mjs +3 -0
  64. package/esm2022/domain/f-node/calculate-connectors-connectable-sides/utils/is-calculate-mode.mjs +12 -0
  65. package/esm2022/domain/f-node/calculate-input-connections/calculate-input-connections-request.mjs +4 -4
  66. package/esm2022/domain/f-node/calculate-input-connections/calculate-input-connections.mjs +20 -7
  67. package/esm2022/domain/f-node/calculate-nodes-bounding-box/calculate-nodes-bounding-box.mjs +5 -8
  68. package/esm2022/domain/f-node/calculate-output-connections/calculate-output-connections-request.mjs +4 -4
  69. package/esm2022/domain/f-node/calculate-output-connections/calculate-output-connections.mjs +20 -7
  70. package/esm2022/domain/f-node/get-child-node-ids/get-child-node-ids.request.mjs +1 -1
  71. package/esm2022/domain/f-node/index.mjs +2 -3
  72. package/esm2022/domain/f-node/providers.mjs +3 -5
  73. package/esm2022/domain/f-node/update-node-when-state-or-size-changed/update-node-when-state-or-size-changed.mjs +3 -3
  74. package/esm2022/domain/f-selection/select-and-update-node-layer/select-and-update-node-layer.execution.mjs +5 -5
  75. package/esm2022/domain/f-selection/select-and-update-node-layer/select-and-update-node-layer.request.mjs +4 -4
  76. package/esm2022/domain/get-normalized-connector-rect/get-normalized-connector-rect-request.mjs +1 -1
  77. package/esm2022/domain/get-normalized-connector-rect/get-normalized-connector-rect.execution.mjs +2 -2
  78. package/esm2022/domain/get-normalized-element-rect/get-normalized-element-rect.execution.mjs +2 -14
  79. package/esm2022/domain/get-normalized-point/get-normalized-point.execution.mjs +4 -1
  80. package/esm2022/domain/index.mjs +1 -1
  81. package/esm2022/domain/is-mobile.mjs +5 -3
  82. package/esm2022/f-connectors/e-f-connectable-side.mjs +3 -1
  83. package/esm2022/f-connectors/f-node-output/f-node-output.directive.mjs +1 -1
  84. package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/create-connection-preparation-request.mjs +10 -0
  85. package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/create-connection-preparation.mjs +58 -0
  86. package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/create-connection-from-output-preparation-request.mjs +10 -0
  87. package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/create-connection-from-output-preparation.mjs +47 -0
  88. package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/index.mjs +3 -3
  89. package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/index.mjs +3 -3
  90. package/esm2022/f-draggable/f-connection/f-create-connection/f-create-connection.drag-handler.mjs +8 -8
  91. package/esm2022/f-draggable/f-connection/f-reassign-connection/f-reassign-source.drag-handler.mjs +3 -3
  92. package/esm2022/f-draggable/f-connection/f-reassign-connection/f-reassign-target.drag-handler.mjs +7 -7
  93. package/esm2022/f-draggable/f-connection/providers.mjs +4 -4
  94. package/esm2022/f-draggable/f-draggable.directive.mjs +3 -3
  95. package/esm2022/f-draggable/f-drop-to-group/drop-to-group-preparation/drop-to-group-preparation-request.mjs +1 -1
  96. package/esm2022/f-draggable/f-drop-to-group/drop-to-group-preparation/drop-to-group-preparation.mjs +11 -13
  97. package/esm2022/f-draggable/f-node-move/move-preparation/f-node-move-preparation.execution.mjs +14 -12
  98. package/esm2022/f-draggable/f-node-move/move-preparation/f-node-move-preparation.request.mjs +1 -1
  99. package/esm2022/f-node/f-group.directive.mjs +3 -3
  100. package/esm2022/f-node/f-node.directive.mjs +3 -3
  101. package/esm2022/f-storage/f-connectors-store.mjs +11 -0
  102. package/esm2022/f-storage/index.mjs +2 -1
  103. package/f-connection/providers.d.ts +1 -1
  104. package/f-connectors/e-f-connectable-side.d.ts +2 -0
  105. package/f-connectors/providers.d.ts +1 -1
  106. package/f-draggable/f-connection/f-create-connection/create-preparation/create-connection-preparation-request.d.ts +8 -0
  107. package/f-draggable/f-connection/f-create-connection/create-preparation/create-connection-preparation.d.ts +16 -0
  108. package/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/create-connection-from-output-preparation-request.d.ts +8 -0
  109. package/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/create-connection-from-output-preparation.d.ts +14 -0
  110. package/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/index.d.ts +2 -2
  111. package/f-draggable/f-connection/f-create-connection/create-preparation/index.d.ts +2 -2
  112. package/f-draggable/f-connection/providers.d.ts +2 -2
  113. package/f-draggable/f-drop-to-group/drop-to-group-preparation/drop-to-group-preparation-request.d.ts +2 -2
  114. package/f-draggable/f-drop-to-group/providers.d.ts +1 -1
  115. package/f-draggable/f-node-move/create-drag-model-from-selection/providers.d.ts +1 -1
  116. package/f-draggable/f-node-move/move-preparation/f-node-move-preparation.execution.d.ts +1 -1
  117. package/f-draggable/f-node-move/move-preparation/f-node-move-preparation.request.d.ts +1 -1
  118. package/f-draggable/f-node-move/providers.d.ts +1 -1
  119. package/f-draggable/providers.d.ts +1 -1
  120. package/f-minimap/domain/providers.d.ts +1 -1
  121. package/f-minimap/providers.d.ts +1 -1
  122. package/f-node/providers.d.ts +2 -2
  123. package/f-selection-area/domain/providers.d.ts +1 -1
  124. package/f-storage/f-connectors-store.d.ts +6 -0
  125. package/f-storage/index.d.ts +1 -0
  126. package/f-storage/providers.d.ts +1 -1
  127. package/fesm2022/foblex-flow.mjs +1281 -1075
  128. package/fesm2022/foblex-flow.mjs.map +1 -1
  129. package/package.json +1 -1
  130. package/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.execution.d.ts +0 -17
  131. package/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.request.d.ts +0 -6
  132. package/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/index.d.ts +0 -2
  133. package/domain/f-connectors/get-all-can-be-connected-source-connectors-and-rects/get-all-can-be-connected-source-connectors-and-rects.execution.d.ts +0 -18
  134. package/domain/f-connectors/get-all-can-be-connected-source-connectors-and-rects/get-all-can-be-connected-source-connectors-and-rects.request.d.ts +0 -6
  135. package/domain/f-connectors/get-all-can-be-connected-source-connectors-and-rects/index.d.ts +0 -2
  136. package/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/calculate-connectable-side-by-connected-positions.d.ts +0 -45
  137. package/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-internal-position/calculate-connectable-side-by-internal-position.d.ts +0 -20
  138. package/domain/f-node/calculate-node-connectors-connectable-sides/calculate-node-connectors-connectable-sides-request.d.ts +0 -6
  139. package/domain/f-node/calculate-node-connectors-connectable-sides/calculate-node-connectors-connectable-sides.d.ts +0 -59
  140. package/domain/f-node/calculate-node-connectors-connectable-sides/index.d.ts +0 -4
  141. package/domain/f-node/get-nodes/get-nodes-request.d.ts +0 -3
  142. package/domain/f-node/get-nodes/get-nodes.d.ts +0 -13
  143. package/domain/f-node/get-nodes/index.d.ts +0 -2
  144. package/esm2022/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.execution.mjs +0 -48
  145. package/esm2022/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/get-all-can-be-connected-inputs-and-rects.request.mjs +0 -8
  146. package/esm2022/domain/f-connectors/get-all-can-be-connected-inputs-and-rects/index.mjs +0 -3
  147. package/esm2022/domain/f-connectors/get-all-can-be-connected-source-connectors-and-rects/get-all-can-be-connected-source-connectors-and-rects.execution.mjs +0 -43
  148. package/esm2022/domain/f-connectors/get-all-can-be-connected-source-connectors-and-rects/get-all-can-be-connected-source-connectors-and-rects.request.mjs +0 -8
  149. package/esm2022/domain/f-connectors/get-all-can-be-connected-source-connectors-and-rects/index.mjs +0 -3
  150. package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/calculate-connectable-side-by-connected-positions-request.mjs +0 -8
  151. package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/calculate-connectable-side-by-connected-positions.mjs +0 -92
  152. package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-connected-positions/index.mjs +0 -3
  153. package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-internal-position/calculate-connectable-side-by-internal-position-request.mjs +0 -8
  154. package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-internal-position/calculate-connectable-side-by-internal-position.mjs +0 -55
  155. package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-connectable-side-by-internal-position/index.mjs +0 -3
  156. package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-node-connectors-connectable-sides-request.mjs +0 -8
  157. package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/calculate-node-connectors-connectable-sides.mjs +0 -99
  158. package/esm2022/domain/f-node/calculate-node-connectors-connectable-sides/index.mjs +0 -5
  159. package/esm2022/domain/f-node/get-nodes/get-nodes-request.mjs +0 -4
  160. package/esm2022/domain/f-node/get-nodes/get-nodes.mjs +0 -25
  161. package/esm2022/domain/f-node/get-nodes/index.mjs +0 -3
  162. package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/f-create-connection-preparation.execution.mjs +0 -52
  163. package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/f-create-connection-preparation.request.mjs +0 -10
  164. package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/f-create-connection-from-output-preparation.execution.mjs +0 -49
  165. package/esm2022/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/f-create-connection-from-output-preparation.request.mjs +0 -10
  166. package/f-draggable/f-connection/f-create-connection/create-preparation/f-create-connection-preparation.execution.d.ts +0 -16
  167. package/f-draggable/f-connection/f-create-connection/create-preparation/f-create-connection-preparation.request.d.ts +0 -8
  168. package/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/f-create-connection-from-output-preparation.execution.d.ts +0 -14
  169. package/f-draggable/f-connection/f-create-connection/create-preparation/from-output-preparation/f-create-connection-from-output-preparation.request.d.ts +0 -8
  170. /package/domain/f-node/{calculate-node-connectors-connectable-sides → calculate-connectors-connectable-sides}/calculate-connectable-side-by-connected-positions/index.d.ts +0 -0
  171. /package/domain/f-node/{calculate-node-connectors-connectable-sides → calculate-connectors-connectable-sides}/calculate-connectable-side-by-internal-position/calculate-connectable-side-by-internal-position-request.d.ts +0 -0
  172. /package/domain/f-node/{calculate-node-connectors-connectable-sides → calculate-connectors-connectable-sides}/calculate-connectable-side-by-internal-position/index.d.ts +0 -0
@@ -278,6 +278,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
278
278
  type: Injectable
279
279
  }] });
280
280
 
281
+ class FConnectorsStore {
282
+ _connectors = {};
283
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectorsStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
284
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectorsStore });
285
+ }
286
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FConnectorsStore, decorators: [{
287
+ type: Injectable
288
+ }] });
289
+
281
290
  const F_STORAGE_PROVIDERS = [
282
291
  NotifyDataChangedExecution,
283
292
  ListenCountChangesExecution,
@@ -1098,6 +1107,8 @@ var EFConnectableSide;
1098
1107
  EFConnectableSide["RIGHT"] = "right";
1099
1108
  EFConnectableSide["BOTTOM"] = "bottom";
1100
1109
  EFConnectableSide["CALCULATE"] = "calculate";
1110
+ EFConnectableSide["CALCULATE_HORIZONTAL"] = "calculate_horizontal";
1111
+ EFConnectableSide["CALCULATE_VERTICAL"] = "calculate_vertical";
1101
1112
  EFConnectableSide["AUTO"] = "auto";
1102
1113
  })(EFConnectableSide || (EFConnectableSide = {}));
1103
1114
 
@@ -1427,7 +1438,7 @@ class FGroupDirective extends FNodeBase {
1427
1438
  this._debounceTimer = setTimeout(() => this._calculateNodeConnectorsConnectableSides(), _DEBOUNCE_TIME$2);
1428
1439
  }
1429
1440
  _calculateNodeConnectorsConnectableSides() {
1430
- this._mediator.execute(new CalculateNodeConnectorsConnectableSidesRequest(this));
1441
+ this._mediator.execute(new CalculateConnectorsConnectableSidesRequest(this));
1431
1442
  }
1432
1443
  ngAfterViewInit() {
1433
1444
  if (!this.browser.isBrowser()) {
@@ -1554,7 +1565,7 @@ class FNodeDirective extends FNodeBase {
1554
1565
  this._debounceTimer = setTimeout(() => this._calculateNodeConnectorsConnectableSides(), _DEBOUNCE_TIME$1);
1555
1566
  }
1556
1567
  _calculateNodeConnectorsConnectableSides() {
1557
- this._mediator.execute(new CalculateNodeConnectorsConnectableSidesRequest(this));
1568
+ this._mediator.execute(new CalculateConnectorsConnectableSidesRequest(this));
1558
1569
  }
1559
1570
  ngAfterViewInit() {
1560
1571
  if (!this.browser.isBrowser()) {
@@ -2220,6 +2231,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2220
2231
  }, providers: [{ provide: CONNECTION_TEXT, useExisting: FConnectionTextComponent }], template: "<ng-container xmlns:svg=\"http://www.w3.org/2000/svg\">\n <svg:textPath f-connection-text-path>\n {{ text }}\n </svg:textPath>\n</ng-container>\n" }]
2221
2232
  }] });
2222
2233
 
2234
+ /* eslint-disable */
2223
2235
  const F_CSS_CLASS = {
2224
2236
  DRAG_AND_DROP: {
2225
2237
  DRAGGING: 'f-dragging',
@@ -3361,6 +3373,9 @@ let GetNormalizedPointExecution = class GetNormalizedPointExecution {
3361
3373
  // +------------------------------------------+
3362
3374
  // Transform from the browser window to the canvas coordinates:
3363
3375
  handle(request) {
3376
+ if (!this._store.flowHost) {
3377
+ return request.position;
3378
+ }
3364
3379
  return Point.fromPoint(request.position)
3365
3380
  .elementTransform(this._store.flowHost)
3366
3381
  .sub(this._transform.scaledPosition)
@@ -3837,11 +3852,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3837
3852
  type: Injectable
3838
3853
  }] });
3839
3854
 
3840
- class GetAllCanBeConnectedInputsAndRectsRequest {
3841
- outputOrOutlet;
3842
- static fToken = Symbol('GetAllCanBeConnectedInputsAndRectsRequest');
3843
- constructor(outputOrOutlet) {
3844
- this.outputOrOutlet = outputOrOutlet;
3855
+ class CalculateTargetConnectorsToConnectRequest {
3856
+ sourceConnector;
3857
+ pointerPosition;
3858
+ static fToken = Symbol('CalculateTargetConnectorsToConnectRequest');
3859
+ constructor(sourceConnector, pointerPosition) {
3860
+ this.sourceConnector = sourceConnector;
3861
+ this.pointerPosition = pointerPosition;
3845
3862
  }
3846
3863
  }
3847
3864
 
@@ -3877,245 +3894,341 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3877
3894
  type: Injectable
3878
3895
  }] });
3879
3896
 
3897
+ class AddNodeToStoreRequest {
3898
+ nodeOrGroup;
3899
+ static fToken = Symbol('AddNodeToStoreRequest');
3900
+ constructor(nodeOrGroup) {
3901
+ this.nodeOrGroup = nodeOrGroup;
3902
+ }
3903
+ }
3904
+
3880
3905
  /**
3881
- * Execution that retrieves all input connectors that can be connected to a given output or outlet connector,
3906
+ * Execution that adds a Node to the FComponentsStore.
3882
3907
  */
3883
- let GetAllCanBeConnectedInputsAndRectsExecution = class GetAllCanBeConnectedInputsAndRectsExecution {
3884
- _mediator = inject(FMediator);
3908
+ let AddNodeToStore = class AddNodeToStore {
3885
3909
  _store = inject(FComponentsStore);
3886
- get _targetConnectors() {
3887
- return this._store.fInputs;
3888
- }
3889
- handle({ outputOrOutlet, }) {
3890
- return this._getCanBeConnectedInputs(outputOrOutlet).map((x) => {
3891
- return this._mediator.execute(new GetConnectorAndRectRequest(x));
3892
- });
3893
- }
3894
- _getCanBeConnectedInputs(outputOrOutlet) {
3895
- let targetConnectors = [];
3896
- if (outputOrOutlet.hasConnectionLimits) {
3897
- targetConnectors = this._targetConnectors.filter((x) => outputOrOutlet.canConnectTo(x));
3898
- }
3899
- else {
3900
- targetConnectors = this._targetConnectors.filter((x) => x.canBeConnected);
3901
- if (!outputOrOutlet.isSelfConnectable) {
3902
- targetConnectors = this._filterSelfConnectable(targetConnectors, outputOrOutlet);
3903
- }
3904
- }
3905
- return targetConnectors;
3906
- }
3907
- _filterSelfConnectable(targetConnectors, outputOrOutlet) {
3908
- return targetConnectors.filter(({ fNodeId }) => outputOrOutlet.fNodeId !== fNodeId);
3910
+ handle(request) {
3911
+ this._store.addComponent(this._store.fNodes, request.nodeOrGroup);
3909
3912
  }
3910
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetAllCanBeConnectedInputsAndRectsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3911
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetAllCanBeConnectedInputsAndRectsExecution });
3913
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddNodeToStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3914
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddNodeToStore });
3912
3915
  };
3913
- GetAllCanBeConnectedInputsAndRectsExecution = __decorate([
3914
- FExecutionRegister(GetAllCanBeConnectedInputsAndRectsRequest)
3915
- ], GetAllCanBeConnectedInputsAndRectsExecution);
3916
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetAllCanBeConnectedInputsAndRectsExecution, decorators: [{
3916
+ AddNodeToStore = __decorate([
3917
+ FExecutionRegister(AddNodeToStoreRequest)
3918
+ ], AddNodeToStore);
3919
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddNodeToStore, decorators: [{
3917
3920
  type: Injectable
3918
3921
  }] });
3919
3922
 
3920
- class GetAllCanBeConnectedSourceConnectorsAndRectsRequest {
3921
- targetConnector;
3922
- static fToken = Symbol('GetAllCanBeConnectedSourceConnectorsAndRectsRequest');
3923
- constructor(targetConnector) {
3924
- this.targetConnector = targetConnector;
3923
+ class CalculateInputConnectionsRequest {
3924
+ nodeOrGroup;
3925
+ static fToken = Symbol('CalculateInputConnectionsRequest');
3926
+ constructor(nodeOrGroup) {
3927
+ this.nodeOrGroup = nodeOrGroup;
3925
3928
  }
3926
3929
  }
3927
3930
 
3928
3931
  /**
3929
- * Execution that retrieves all source connectors that can be connected to a given target connector,
3930
- * along with their rectangles.
3931
- * Source - Output or Outlet connectors.
3932
+ * Execution that calculates input connections for a given FNode.
3932
3933
  */
3933
- let GetAllCanBeConnectedSourceConnectorsAndRectsExecution = class GetAllCanBeConnectedSourceConnectorsAndRectsExecution {
3934
- _mediator = inject(FMediator);
3934
+ let CalculateInputConnections = class CalculateInputConnections {
3935
3935
  _store = inject(FComponentsStore);
3936
- get _sourceConnectors() {
3937
- return this._store.fOutputs;
3938
- }
3939
- handle({ targetConnector, }) {
3940
- return this._getCanBeConnectedSourceConnectors(targetConnector).map((x) => {
3941
- return this._mediator.execute(new GetConnectorAndRectRequest(x));
3942
- });
3936
+ handle({ nodeOrGroup }) {
3937
+ const ids = this._collectInputIds(nodeOrGroup);
3938
+ return this._collectConnections(ids);
3939
+ }
3940
+ _collectInputIds(nodeOrGroup) {
3941
+ const ids = new Set();
3942
+ for (const connector of this._store.fInputs) {
3943
+ if (nodeOrGroup.isContains(connector.hostElement)) {
3944
+ ids.add(connector.fId());
3945
+ }
3946
+ }
3947
+ return ids;
3943
3948
  }
3944
- _getCanBeConnectedSourceConnectors(targetConnector) {
3945
- return this._sourceConnectors.filter((x) => {
3946
- let result = x.canBeConnected;
3947
- if (result && x.hasConnectionLimits) {
3948
- result = x.canConnectTo(targetConnector);
3949
+ _collectConnections(ids) {
3950
+ const result = [];
3951
+ for (const conn of this._store.fConnections) {
3952
+ if (ids.has(conn.fInputId())) {
3953
+ result.push(conn);
3949
3954
  }
3950
- return result;
3951
- });
3955
+ }
3956
+ return result;
3952
3957
  }
3953
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetAllCanBeConnectedSourceConnectorsAndRectsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3954
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetAllCanBeConnectedSourceConnectorsAndRectsExecution });
3958
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateInputConnections, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3959
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateInputConnections });
3955
3960
  };
3956
- GetAllCanBeConnectedSourceConnectorsAndRectsExecution = __decorate([
3957
- FExecutionRegister(GetAllCanBeConnectedSourceConnectorsAndRectsRequest)
3958
- ], GetAllCanBeConnectedSourceConnectorsAndRectsExecution);
3959
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetAllCanBeConnectedSourceConnectorsAndRectsExecution, decorators: [{
3961
+ CalculateInputConnections = __decorate([
3962
+ FExecutionRegister(CalculateInputConnectionsRequest)
3963
+ ], CalculateInputConnections);
3964
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateInputConnections, decorators: [{
3960
3965
  type: Injectable
3961
3966
  }] });
3962
3967
 
3963
- class MarkConnectableConnectorsRequest {
3964
- connectors;
3965
- static fToken = Symbol('MarkConnectableConnectorsRequest');
3966
- constructor(connectors) {
3967
- this.connectors = connectors;
3968
+ class CalculateConnectableSideByConnectedPositionsRequest {
3969
+ connector;
3970
+ pointerPosition;
3971
+ static fToken = Symbol('CalculateConnectableSideByConnectedPositionsRequest');
3972
+ constructor(connector, pointerPosition) {
3973
+ this.connector = connector;
3974
+ this.pointerPosition = pointerPosition;
3968
3975
  }
3969
3976
  }
3970
3977
 
3971
3978
  /**
3972
- * Execution that marks connectors as connectable.
3979
+ * Converts allowed sides array to a compact bit mask.
3980
+ * If not provided or empty -> all sides allowed.
3973
3981
  */
3974
- let MarkConnectableConnectors = class MarkConnectableConnectors {
3975
- _store = inject(FComponentsStore);
3976
- handle({ connectors }) {
3977
- this._store.flowHost.classList.add(F_CSS_CLASS.DRAG_AND_DROP.CONNECTIONS_DRAGGING);
3978
- connectors.forEach((x) => this._markConnector(x));
3982
+ const SNAP_EPS = 2;
3983
+ var SideMask;
3984
+ (function (SideMask) {
3985
+ SideMask[SideMask["NONE"] = 0] = "NONE";
3986
+ SideMask[SideMask["LEFT"] = 1] = "LEFT";
3987
+ SideMask[SideMask["RIGHT"] = 2] = "RIGHT";
3988
+ SideMask[SideMask["TOP"] = 4] = "TOP";
3989
+ SideMask[SideMask["BOTTOM"] = 8] = "BOTTOM";
3990
+ SideMask[SideMask["ALL"] = 15] = "ALL";
3991
+ })(SideMask || (SideMask = {}));
3992
+ /**
3993
+ * Determines final side using ideal side first; if disallowed, picks best fallback.
3994
+ * Inputs are numbers to avoid object wrappers on hot path.
3995
+ */
3996
+ function determineSide(selfX, selfY, avgX, avgY, allowed) {
3997
+ const allowedMask = _toSideMask(allowed);
3998
+ const dx = avgX - selfX;
3999
+ const dy = avgY - selfY;
4000
+ const ideal = _pickIdealSide(dx, dy);
4001
+ if (_isAllowed(ideal, allowedMask)) {
4002
+ return ideal;
3979
4003
  }
3980
- _markConnector({ hostElement }) {
3981
- hostElement.classList.add(F_CSS_CLASS.CONNECTOR.CONNECTABLE);
4004
+ return _pickFallbackSide(dx, dy, allowedMask, ideal);
4005
+ }
4006
+ /**
4007
+ * Converts allowed sides array to a compact bit mask.
4008
+ * If not provided or empty -> all sides allowed.
4009
+ */
4010
+ function _toSideMask(allowed) {
4011
+ if (!allowed || allowed.length === 0)
4012
+ return SideMask.ALL;
4013
+ let mask = SideMask.NONE;
4014
+ for (let i = 0; i < allowed.length; i++) {
4015
+ switch (allowed[i]) {
4016
+ case EFConnectableSide.LEFT:
4017
+ mask |= SideMask.LEFT;
4018
+ break;
4019
+ case EFConnectableSide.RIGHT:
4020
+ mask |= SideMask.RIGHT;
4021
+ break;
4022
+ case EFConnectableSide.TOP:
4023
+ mask |= SideMask.TOP;
4024
+ break;
4025
+ case EFConnectableSide.BOTTOM:
4026
+ mask |= SideMask.BOTTOM;
4027
+ break;
4028
+ }
3982
4029
  }
3983
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MarkConnectableConnectors, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3984
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MarkConnectableConnectors });
3985
- };
3986
- MarkConnectableConnectors = __decorate([
3987
- FExecutionRegister(MarkConnectableConnectorsRequest)
3988
- ], MarkConnectableConnectors);
3989
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MarkConnectableConnectors, decorators: [{
3990
- type: Injectable
3991
- }] });
3992
-
3993
- class RemoveInputFromStoreRequest {
3994
- component;
3995
- static fToken = Symbol('RemoveInputFromStoreRequest');
3996
- constructor(component) {
3997
- this.component = component;
4030
+ return mask || SideMask.ALL;
4031
+ }
4032
+ /**
4033
+ * Picks the "ideal" side based on vector (dx, dy) with hysteresis.
4034
+ */
4035
+ function _pickIdealSide(dx, dy) {
4036
+ const ax = dx < 0 ? -dx : dx;
4037
+ const ay = dy < 0 ? -dy : dy;
4038
+ if (ax - ay > SNAP_EPS) {
4039
+ return dx < 0 ? EFConnectableSide.LEFT : EFConnectableSide.RIGHT;
4040
+ }
4041
+ if (ay - ax > SNAP_EPS) {
4042
+ return dy < 0 ? EFConnectableSide.TOP : EFConnectableSide.BOTTOM;
3998
4043
  }
4044
+ return dy < 0 ? EFConnectableSide.TOP : EFConnectableSide.BOTTOM;
3999
4045
  }
4000
-
4001
4046
  /**
4002
- * Execution that removes an inputConnector from the FComponentsStore.
4047
+ * Quick membership check via bit mask.
4003
4048
  */
4004
- let RemoveInputFromStore = class RemoveInputFromStore {
4005
- _store = inject(FComponentsStore);
4006
- handle({ component }) {
4007
- this._store.removeComponent(this._store.fInputs, component);
4049
+ function _isAllowed(side, mask) {
4050
+ switch (side) {
4051
+ case EFConnectableSide.LEFT:
4052
+ return (mask & SideMask.LEFT) !== 0;
4053
+ case EFConnectableSide.RIGHT:
4054
+ return (mask & SideMask.RIGHT) !== 0;
4055
+ case EFConnectableSide.TOP:
4056
+ return (mask & SideMask.TOP) !== 0;
4057
+ case EFConnectableSide.BOTTOM:
4058
+ return (mask & SideMask.BOTTOM) !== 0;
4059
+ default:
4060
+ return true;
4008
4061
  }
4009
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveInputFromStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4010
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveInputFromStore });
4011
- };
4012
- RemoveInputFromStore = __decorate([
4013
- FExecutionRegister(RemoveInputFromStoreRequest)
4014
- ], RemoveInputFromStore);
4015
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveInputFromStore, decorators: [{
4016
- type: Injectable
4017
- }] });
4018
-
4019
- class RemoveOutletFromStoreRequest {
4020
- fComponent;
4021
- static fToken = Symbol('RemoveOutletFromStoreRequest');
4022
- constructor(fComponent) {
4023
- this.fComponent = fComponent;
4062
+ }
4063
+ /**
4064
+ * Picks the best available side from allowed mask by maximizing directional score.
4065
+ * No intermediate objects, constant-time operations.
4066
+ */
4067
+ function _pickFallbackSide(dx, dy, allowedMask, ideal) {
4068
+ let bestSide = ideal;
4069
+ let bestScore = -Infinity;
4070
+ if (allowedMask & SideMask.RIGHT) {
4071
+ const s = dx;
4072
+ if (s > bestScore) {
4073
+ bestScore = s;
4074
+ bestSide = EFConnectableSide.RIGHT;
4075
+ }
4076
+ }
4077
+ if (allowedMask & SideMask.LEFT) {
4078
+ const s = -dx;
4079
+ if (s > bestScore) {
4080
+ bestScore = s;
4081
+ bestSide = EFConnectableSide.LEFT;
4082
+ }
4083
+ }
4084
+ if (allowedMask & SideMask.BOTTOM) {
4085
+ const s = dy;
4086
+ if (s > bestScore) {
4087
+ bestScore = s;
4088
+ bestSide = EFConnectableSide.BOTTOM;
4089
+ }
4090
+ }
4091
+ if (allowedMask & SideMask.TOP) {
4092
+ const s = -dy;
4093
+ if (s > bestScore) {
4094
+ bestScore = s;
4095
+ bestSide = EFConnectableSide.TOP;
4096
+ }
4024
4097
  }
4098
+ return bestSide;
4025
4099
  }
4026
4100
 
4027
4101
  /**
4028
- * Execution that removes an outlet connector from the FComponentsStore.
4102
+ * Checks if the given side is one of the calculate modes.
4103
+ * @param side The connectable side to check.
4104
+ * @returns True if the side is a calculate mode, false otherwise.
4029
4105
  */
4030
- let RemoveOutletFromStoreExecution = class RemoveOutletFromStoreExecution {
4031
- _store = inject(FComponentsStore);
4032
- handle(request) {
4033
- this._store.removeComponent(this._store.fOutlets, request.fComponent);
4034
- }
4035
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutletFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4036
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutletFromStoreExecution });
4106
+ function isCalculateMode(side) {
4107
+ return (side === EFConnectableSide.CALCULATE ||
4108
+ side === EFConnectableSide.CALCULATE_HORIZONTAL ||
4109
+ side === EFConnectableSide.CALCULATE_VERTICAL);
4110
+ }
4111
+
4112
+ const CALCULATABLE_SIDES = {
4113
+ [EFConnectableSide.CALCULATE]: [
4114
+ EFConnectableSide.TOP,
4115
+ EFConnectableSide.BOTTOM,
4116
+ EFConnectableSide.LEFT,
4117
+ EFConnectableSide.RIGHT,
4118
+ ],
4119
+ [EFConnectableSide.CALCULATE_HORIZONTAL]: [EFConnectableSide.LEFT, EFConnectableSide.RIGHT],
4120
+ [EFConnectableSide.CALCULATE_VERTICAL]: [EFConnectableSide.TOP, EFConnectableSide.BOTTOM],
4037
4121
  };
4038
- RemoveOutletFromStoreExecution = __decorate([
4039
- FExecutionRegister(RemoveOutletFromStoreRequest)
4040
- ], RemoveOutletFromStoreExecution);
4041
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutletFromStoreExecution, decorators: [{
4042
- type: Injectable
4043
- }] });
4044
4122
 
4045
- class RemoveOutputFromStoreRequest {
4046
- fComponent;
4047
- static fToken = Symbol('RemoveOutputFromStoreRequest');
4048
- constructor(fComponent) {
4049
- this.fComponent = fComponent;
4123
+ class GetNormalizedElementRectRequest {
4124
+ element;
4125
+ static fToken = Symbol('GetNormalizedElementRectRequest');
4126
+ constructor(element) {
4127
+ this.element = element;
4050
4128
  }
4051
4129
  }
4052
4130
 
4053
4131
  /**
4054
- * Execution that removes an outlet connector from the FComponentsStore.
4132
+ * Execution that retrieves the normalized rectangle of an element.
4133
+ * It calculates the rectangle based on the element's position and size,
4134
+ * adjusting for the canvas transformation and element offsets.
4055
4135
  */
4056
- let RemoveOutputFromStoreExecution = class RemoveOutputFromStoreExecution {
4136
+ let GetNormalizedElementRectExecution = class GetNormalizedElementRectExecution {
4057
4137
  _store = inject(FComponentsStore);
4138
+ _mediator = inject(FMediator);
4139
+ get _transform() {
4140
+ return this._store.fCanvas.transform;
4141
+ }
4058
4142
  handle(request) {
4059
- this._store.removeComponent(this._store.fOutputs, request.fComponent);
4143
+ const systemRect = this._getElementRoundedRect(request);
4144
+ const position = this._normalizePosition(systemRect);
4145
+ const unscaledSize = this._unscaleSize(systemRect);
4146
+ const unscaledRect = this._getUnscaledRect(position, unscaledSize, systemRect);
4147
+ const offsetSize = this._getOffsetSize(request.element, unscaledSize);
4148
+ return RoundedRect.fromCenter(unscaledRect, offsetSize.width, offsetSize.height);
4060
4149
  }
4061
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutputFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4062
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutputFromStoreExecution });
4150
+ _getElementRoundedRect(request) {
4151
+ return RoundedRect.fromRect(RectExtensions.fromElement(request.element));
4152
+ }
4153
+ _normalizePosition(rect) {
4154
+ return this._mediator.execute(new GetNormalizedPointRequest(rect));
4155
+ }
4156
+ _unscaleSize(rect) {
4157
+ return SizeExtensions.initialize(rect.width / this._transform.scale, rect.height / this._transform.scale);
4158
+ }
4159
+ _getUnscaledRect(position, size, rect) {
4160
+ return new RoundedRect(position.x, position.y, size.width, size.height, rect.radius1, rect.radius2, rect.radius3, rect.radius4);
4161
+ }
4162
+ _getOffsetSize(element, size) {
4163
+ return SizeExtensions.offsetFromElement(element) || size;
4164
+ }
4165
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedElementRectExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4166
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedElementRectExecution });
4063
4167
  };
4064
- RemoveOutputFromStoreExecution = __decorate([
4065
- FExecutionRegister(RemoveOutputFromStoreRequest)
4066
- ], RemoveOutputFromStoreExecution);
4067
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutputFromStoreExecution, decorators: [{
4168
+ GetNormalizedElementRectExecution = __decorate([
4169
+ FExecutionRegister(GetNormalizedElementRectRequest)
4170
+ ], GetNormalizedElementRectExecution);
4171
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedElementRectExecution, decorators: [{
4068
4172
  type: Injectable
4069
4173
  }] });
4070
4174
 
4071
- class UnmarkConnectableConnectorsRequest {
4072
- connectors;
4073
- static fToken = Symbol('UnmarkConnectableConnectorsRequest');
4074
- constructor(connectors) {
4075
- this.connectors = connectors;
4076
- }
4077
- }
4078
-
4079
4175
  /**
4080
- * Execution that unmarks connectors as connectable.
4176
+ * Execution that calculates the connectable side for a connector
4177
+ * based on positions of connected connectors and allowed sides.
4081
4178
  */
4082
- let UnmarkConnectableConnectors = class UnmarkConnectableConnectors {
4083
- _store = inject(FComponentsStore);
4084
- handle({ connectors }) {
4085
- this._store.flowHost.classList.remove(F_CSS_CLASS.DRAG_AND_DROP.CONNECTIONS_DRAGGING);
4086
- connectors.forEach((x) => this._unmarkConnector(x));
4179
+ let CalculateConnectableSideByConnectedPositions = class CalculateConnectableSideByConnectedPositions {
4180
+ _mediator = inject(FMediator);
4181
+ /**
4182
+ * Entry point (hot path). Avoids intermediate arrays and redundant allocations.
4183
+ *
4184
+ * @param request - Contains the connector and optionally allowed sides.
4185
+ * @returns {EFConnectableSide} - The chosen connectable side.
4186
+ */
4187
+ handle({ connector, pointerPosition, }) {
4188
+ const mode = connector.userFConnectableSide;
4189
+ const selfCenter = this._getConnectorRect(connector.hostElement).gravityCenter;
4190
+ const acc = this._accumulateConnectedCenters(connector.hostElement, connector.toConnector, pointerPosition);
4191
+ const avgX = acc.sumX / acc.count;
4192
+ const avgY = acc.sumY / acc.count;
4193
+ return determineSide(selfCenter.x, selfCenter.y, avgX, avgY, CALCULATABLE_SIDES[mode]);
4194
+ }
4195
+ _accumulateConnectedCenters(selfHost, connected, pointerPosition) {
4196
+ let sumX = pointerPosition?.x || 0;
4197
+ let sumY = pointerPosition?.y || 0;
4198
+ let count = pointerPosition ? 1 : 0;
4199
+ if (connected && connected.length) {
4200
+ for (let i = 0; i < connected.length; i++) {
4201
+ const el = connected[i].hostElement;
4202
+ if (el === selfHost)
4203
+ continue;
4204
+ const c = this._getConnectorRect(el).gravityCenter;
4205
+ sumX += c.x;
4206
+ sumY += c.y;
4207
+ count++;
4208
+ }
4209
+ }
4210
+ return { sumX, sumY, count };
4087
4211
  }
4088
- _unmarkConnector({ hostElement }) {
4089
- hostElement.classList.remove(F_CSS_CLASS.CONNECTOR.CONNECTABLE);
4212
+ _getConnectorRect(element) {
4213
+ return this._mediator.execute(new GetNormalizedElementRectRequest(element));
4090
4214
  }
4091
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UnmarkConnectableConnectors, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4092
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UnmarkConnectableConnectors });
4215
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByConnectedPositions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4216
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByConnectedPositions });
4093
4217
  };
4094
- UnmarkConnectableConnectors = __decorate([
4095
- FExecutionRegister(UnmarkConnectableConnectorsRequest)
4096
- ], UnmarkConnectableConnectors);
4097
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UnmarkConnectableConnectors, decorators: [{
4218
+ CalculateConnectableSideByConnectedPositions = __decorate([
4219
+ FExecutionRegister(CalculateConnectableSideByConnectedPositionsRequest)
4220
+ ], CalculateConnectableSideByConnectedPositions);
4221
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByConnectedPositions, decorators: [{
4098
4222
  type: Injectable
4099
4223
  }] });
4100
4224
 
4101
- /*
4102
- * This file exports all the connector-related executions that can be used in the FFlow domain.
4103
- */
4104
- const F_CONNECTORS_FEATURES = [
4105
- AddInputToStore,
4106
- AddOutletToStore,
4107
- AddOutputToStore,
4108
- CalculateClosestConnector,
4109
- FindConnectableConnectorUsingPriorityAndPositionExecution,
4110
- GetAllCanBeConnectedSourceConnectorsAndRectsExecution,
4111
- GetAllCanBeConnectedInputsAndRectsExecution,
4112
- GetConnectorAndRect,
4113
- MarkConnectableConnectors,
4114
- RemoveInputFromStore,
4115
- RemoveOutletFromStoreExecution,
4116
- RemoveOutputFromStoreExecution,
4117
- UnmarkConnectableConnectors,
4118
- ];
4225
+ class CalculateConnectableSideByInternalPositionRequest {
4226
+ connector;
4227
+ static fToken = Symbol('CalculateConnectableSideByInternalPositionRequest');
4228
+ constructor(connector) {
4229
+ this.connector = connector;
4230
+ }
4231
+ }
4119
4232
 
4120
4233
  class AddDndToStoreRequest {
4121
4234
  fComponent;
@@ -4583,14 +4696,14 @@ class FCreateConnectionDragHandler {
4583
4696
  this._store = _injector.get(FComponentsStore);
4584
4697
  this._toConnectorRect = RoundedRect.fromRect(RectExtensions.initialize(_onPointerDownPosition.x, _onPointerDownPosition.y));
4585
4698
  this.fData = {
4586
- fOutputOrOutletId: this._fOutputOrOutlet.fId,
4699
+ fOutputOrOutletId: this._fOutputOrOutlet.fId(),
4587
4700
  };
4588
4701
  }
4589
4702
  prepareDragSequence() {
4703
+ this._fOutputWithRect = this._mediator.execute(new GetConnectorAndRectRequest(this._fOutputOrOutlet));
4590
4704
  this._getAndMarkCanBeConnectedInputs();
4591
4705
  this._initializeSnapConnection();
4592
4706
  this._initializeConnectionForCreate();
4593
- this._fOutputWithRect = this._mediator.execute(new GetConnectorAndRectRequest(this._fOutputOrOutlet));
4594
4707
  this._connection.show();
4595
4708
  this.onPointerMove(PointExtensions.initialize());
4596
4709
  this._result.setData({
@@ -4600,7 +4713,7 @@ class FCreateConnectionDragHandler {
4600
4713
  });
4601
4714
  }
4602
4715
  _getAndMarkCanBeConnectedInputs() {
4603
- this._canBeConnectedInputs = this._mediator.execute(new GetAllCanBeConnectedInputsAndRectsRequest(this._fOutputOrOutlet));
4716
+ this._canBeConnectedInputs = this._mediator.execute(new CalculateTargetConnectorsToConnectRequest(this._fOutputOrOutlet, this._fOutputWithRect.fRect.gravityCenter));
4604
4717
  this._mediator.execute(new MarkConnectableConnectorsRequest(this._canBeConnectedInputs.map((x) => x.fConnector)));
4605
4718
  }
4606
4719
  _initializeSnapConnection() {
@@ -4615,10 +4728,10 @@ class FCreateConnectionDragHandler {
4615
4728
  this._connection.initialize();
4616
4729
  }
4617
4730
  onPointerMove(difference) {
4618
- const fClosestInput = this._findClosestInput(difference);
4619
- this._drawConnectionForCreate(this._toConnectorRect.addPoint(difference), fClosestInput?.fConnector.fConnectableSide || EFConnectableSide.TOP);
4731
+ const closestInput = this._findClosestInput(difference);
4732
+ this._drawConnectionForCreate(this._toConnectorRect.addPoint(difference), closestInput?.fConnector.fConnectableSide || EFConnectableSide.TOP);
4620
4733
  if (this._snapConnection) {
4621
- this._drawSnapConnection(this._getClosestInputForSnapConnection(fClosestInput));
4734
+ this._drawSnapConnection(this._getClosestInputForSnapConnection(closestInput));
4622
4735
  }
4623
4736
  }
4624
4737
  _drawConnectionForCreate(toConnectorRect, fSide) {
@@ -4797,18 +4910,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
4797
4910
  type: Injectable
4798
4911
  }] });
4799
4912
 
4800
- class FCreateConnectionFromOutputPreparationRequest {
4913
+ class CreateConnectionFromOutputPreparationRequest {
4801
4914
  event;
4802
- fNode;
4803
- static fToken = Symbol('FCreateConnectionFromOutputPreparationRequest');
4804
- constructor(event, fNode) {
4915
+ node;
4916
+ static fToken = Symbol('CreateConnectionFromOutputPreparationRequest');
4917
+ constructor(event, node) {
4805
4918
  this.event = event;
4806
- this.fNode = fNode;
4919
+ this.node = node;
4807
4920
  }
4808
4921
  }
4809
4922
 
4810
- let FCreateConnectionFromOutputPreparationExecution = class FCreateConnectionFromOutputPreparationExecution {
4811
- _fMediator = inject(FMediator);
4923
+ let CreateConnectionFromOutputPreparation = class CreateConnectionFromOutputPreparation {
4924
+ _mediator = inject(FMediator);
4812
4925
  _store = inject(FComponentsStore);
4813
4926
  handle(request) {
4814
4927
  if (!this._isValid(request)) {
@@ -4816,70 +4929,74 @@ let FCreateConnectionFromOutputPreparationExecution = class FCreateConnectionFro
4816
4929
  }
4817
4930
  const fOutput = this._getOutput(request.event.targetElement);
4818
4931
  if (fOutput.canBeConnected) {
4819
- this._fMediator.execute(new FCreateConnectionDragHandlerPreparationRequest(request.event.getPosition(), fOutput));
4932
+ this._mediator.execute(new FCreateConnectionDragHandlerPreparationRequest(request.event.getPosition(), fOutput));
4820
4933
  }
4821
4934
  }
4822
4935
  _isValid(request) {
4823
- return this._isNodeOutput(request.event.targetElement, request.fNode);
4936
+ return this._isNodeOutput(request.event.targetElement, request.node);
4824
4937
  }
4825
4938
  _isNodeOutput(element, fNode) {
4826
4939
  return isNodeOutput(element) && !this._getNodeOutlets(fNode).length;
4827
4940
  }
4828
4941
  _getNodeOutlets(node) {
4829
- return this._store.fOutlets
4830
- .filter((x) => node.isContains(x.hostElement));
4942
+ return this._store.fOutlets.filter((x) => node.isContains(x.hostElement));
4831
4943
  }
4832
4944
  _getOutput(element) {
4833
- const result = this._store.fOutputs
4834
- .find((x) => x.hostElement.contains(element));
4945
+ const result = this._store.fOutputs.find((x) => x.hostElement.contains(element));
4835
4946
  if (!result) {
4836
4947
  throw new Error('Output not found');
4837
4948
  }
4838
4949
  return result;
4839
4950
  }
4840
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FCreateConnectionFromOutputPreparationExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4841
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FCreateConnectionFromOutputPreparationExecution });
4951
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionFromOutputPreparation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4952
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionFromOutputPreparation });
4842
4953
  };
4843
- FCreateConnectionFromOutputPreparationExecution = __decorate([
4844
- FExecutionRegister(FCreateConnectionFromOutputPreparationRequest)
4845
- ], FCreateConnectionFromOutputPreparationExecution);
4846
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FCreateConnectionFromOutputPreparationExecution, decorators: [{
4954
+ CreateConnectionFromOutputPreparation = __decorate([
4955
+ FExecutionRegister(CreateConnectionFromOutputPreparationRequest)
4956
+ ], CreateConnectionFromOutputPreparation);
4957
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionFromOutputPreparation, decorators: [{
4847
4958
  type: Injectable
4848
4959
  }] });
4849
4960
 
4850
- class FCreateConnectionPreparationRequest {
4961
+ class CreateConnectionPreparationRequest {
4851
4962
  event;
4852
4963
  fTrigger;
4853
- static fToken = Symbol('FCreateConnectionPreparationRequest');
4964
+ static fToken = Symbol('CreateConnectionPreparationRequest');
4854
4965
  constructor(event, fTrigger) {
4855
4966
  this.event = event;
4856
4967
  this.fTrigger = fTrigger;
4857
4968
  }
4858
4969
  }
4859
4970
 
4860
- let FCreateConnectionPreparationExecution = class FCreateConnectionPreparationExecution {
4861
- _fMediator = inject(FMediator);
4971
+ // import { IPoint } from '@foblex/2d';
4972
+ // import { BrowserService } from '@foblex/platform';
4973
+ let CreateConnectionPreparation = class CreateConnectionPreparation {
4974
+ _mediator = inject(FMediator);
4862
4975
  _store = inject(FComponentsStore);
4863
4976
  _dragContext = inject(FDraggableDataContext);
4864
- _fNode;
4977
+ // private readonly _browser = inject(BrowserService);
4978
+ _node;
4865
4979
  handle(request) {
4866
4980
  if (!this._isValid(request) || !this._isValidTrigger(request)) {
4867
4981
  return;
4868
4982
  }
4983
+ // const elements = this._elementsFromPoint(request.event.getPosition());
4984
+ //
4985
+ // const outlet = this._findOutlet(elements);
4986
+ // const output = this._findOutput(elements);
4869
4987
  if (isNodeOutlet(request.event.targetElement)) {
4870
- this._fMediator.execute(new FCreateConnectionFromOutletPreparationRequest(request.event, this._fNode));
4988
+ this._mediator.execute(new FCreateConnectionFromOutletPreparationRequest(request.event, this._node));
4871
4989
  }
4872
4990
  else if (isNodeOutput(request.event.targetElement)) {
4873
- this._fMediator.execute(new FCreateConnectionFromOutputPreparationRequest(request.event, this._fNode));
4991
+ this._mediator.execute(new CreateConnectionFromOutputPreparationRequest(request.event, this._node));
4874
4992
  }
4875
4993
  }
4876
4994
  _isValid(request) {
4877
4995
  return !!this._getNode(request.event) && this._isValidConditions();
4878
4996
  }
4879
4997
  _getNode(event) {
4880
- this._fNode = this._store
4881
- .fNodes.find(n => n.isContains(event.targetElement));
4882
- return this._fNode;
4998
+ this._node = this._store.fNodes.find((n) => n.isContains(event.targetElement));
4999
+ return this._node;
4883
5000
  }
4884
5001
  _isValidConditions() {
4885
5002
  return this._dragContext.isEmpty() && !!this._store.fTempConnection;
@@ -4887,13 +5004,13 @@ let FCreateConnectionPreparationExecution = class FCreateConnectionPreparationEx
4887
5004
  _isValidTrigger(request) {
4888
5005
  return isValidEventTrigger(request.event.originalEvent, request.fTrigger);
4889
5006
  }
4890
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FCreateConnectionPreparationExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
4891
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FCreateConnectionPreparationExecution });
5007
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionPreparation, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
5008
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionPreparation });
4892
5009
  };
4893
- FCreateConnectionPreparationExecution = __decorate([
4894
- FExecutionRegister(FCreateConnectionPreparationRequest)
4895
- ], FCreateConnectionPreparationExecution);
4896
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FCreateConnectionPreparationExecution, decorators: [{
5010
+ CreateConnectionPreparation = __decorate([
5011
+ FExecutionRegister(CreateConnectionPreparationRequest)
5012
+ ], CreateConnectionPreparation);
5013
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CreateConnectionPreparation, decorators: [{
4897
5014
  type: Injectable
4898
5015
  }] });
4899
5016
 
@@ -4940,7 +5057,7 @@ class FReassignTargetDragHandler {
4940
5057
  return this._connectableConnectors;
4941
5058
  }
4942
5059
  markConnectableConnector() {
4943
- this._connectableConnectors = this._mediator.execute(new GetAllCanBeConnectedInputsAndRectsRequest(this._sourceConnector));
5060
+ this._connectableConnectors = this._mediator.execute(new CalculateTargetConnectorsToConnectRequest(this._sourceConnector, this._sourceConnectorRect.gravityCenter));
4944
5061
  this._mediator.execute(new MarkConnectableConnectorsRequest(this._connectableConnectors.map((x) => x.fConnector)));
4945
5062
  }
4946
5063
  initializeSnapConnection(snapConnection) {
@@ -4970,12 +5087,12 @@ class FReassignTargetDragHandler {
4970
5087
  _calculateNewLine(targetPoint, fSide) {
4971
5088
  return this._mediator.execute(new CalculateConnectionLineByBehaviorRequest(this._sourceConnectorRect, roundedRectFromPoint(targetPoint), this._connection.fBehavior, this._sourceConnector.fConnectableSide, fSide));
4972
5089
  }
4973
- _drawSnapConnection(fClosestConnector) {
5090
+ _drawSnapConnection(closestConnector) {
4974
5091
  const snapConnection = this._snapConnection;
4975
- if (fClosestConnector) {
4976
- const line = this._getLineToClosestTargetConnector(fClosestConnector, snapConnection);
5092
+ if (closestConnector) {
5093
+ const line = this._getLineToClosestTargetConnector(closestConnector, snapConnection);
4977
5094
  snapConnection.show();
4978
- snapConnection.setLine(line, this._sourceConnector.fConnectableSide, fClosestConnector.fConnector.fConnectableSide);
5095
+ snapConnection.setLine(line, this._sourceConnector.fConnectableSide, closestConnector.fConnector.fConnectableSide);
4979
5096
  snapConnection.redraw();
4980
5097
  }
4981
5098
  else {
@@ -5017,7 +5134,7 @@ class FReassignSourceDragHandler {
5017
5134
  return this._connectableConnectors;
5018
5135
  }
5019
5136
  markConnectableConnector() {
5020
- this._connectableConnectors = this._mediator.execute(new GetAllCanBeConnectedSourceConnectorsAndRectsRequest(this._targetConnector));
5137
+ this._connectableConnectors = this._mediator.execute(new CalculateSourceConnectorsToConnectRequest(this._targetConnector, this._targetConnectorAndRect.fRect.gravityCenter));
5021
5138
  const isExistCurrentSourceConnector = this._connectableConnectors.some((x) => x.fConnector.fId() === this._sourceConnector.fId());
5022
5139
  if (!isExistCurrentSourceConnector) {
5023
5140
  this._connectableConnectors.push(this._sourceConnectorAndRect);
@@ -5314,8 +5431,8 @@ const CONNECTIONS_PROVIDERS = [
5314
5431
  FCreateConnectionDragHandlerPreparationExecution,
5315
5432
  FCreateConnectionFromOutletPreparationExecution,
5316
5433
  GetFirstConnectableOutputExecution,
5317
- FCreateConnectionFromOutputPreparationExecution,
5318
- FCreateConnectionPreparationExecution,
5434
+ CreateConnectionFromOutputPreparation,
5435
+ CreateConnectionPreparation,
5319
5436
  FReassignConnectionFinalizeExecution,
5320
5437
  FReassignConnectionPreparationExecution,
5321
5438
  ];
@@ -6380,8 +6497,8 @@ let FNodeMovePreparationExecution = class FNodeMovePreparationExecution {
6380
6497
  _mediator = inject(FMediator);
6381
6498
  _store = inject(FComponentsStore);
6382
6499
  _dragContext = inject(FDraggableDataContext);
6383
- get _transform() {
6384
- return this._store.fCanvas.transform;
6500
+ get _scale() {
6501
+ return this._store.fCanvas?.transform.scale || 1;
6385
6502
  }
6386
6503
  get _fHost() {
6387
6504
  return this._store.fFlow.hostElement;
@@ -6392,25 +6509,25 @@ let FNodeMovePreparationExecution = class FNodeMovePreparationExecution {
6392
6509
  return;
6393
6510
  }
6394
6511
  const summaryDragHandler = this._calculateDraggedItems(this._fNode);
6395
- this._dragContext.onPointerDownScale = this._transform.scale;
6512
+ this._dragContext.onPointerDownScale = this._scale;
6396
6513
  this._dragContext.onPointerDownPosition = Point.fromPoint(event.getPosition())
6397
- .elementTransform(this._fHost).div(this._transform.scale);
6514
+ .elementTransform(this._fHost)
6515
+ .div(this._scale);
6398
6516
  this._dragContext.draggableItems = [summaryDragHandler];
6399
6517
  if (this._store.fLineAlignment) {
6400
6518
  this._mediator.execute(new CreateSnapLinesRequest(summaryDragHandler));
6401
6519
  }
6402
6520
  }
6403
6521
  _isValid(event) {
6404
- return this._dragContext.isEmpty()
6405
- && this._isDragHandleElement(event.targetElement)
6406
- && !!this._getNode(event.targetElement);
6522
+ return (this._dragContext.isEmpty() &&
6523
+ this._isDragHandleElement(event.targetElement) &&
6524
+ !!this._getNode(event.targetElement));
6407
6525
  }
6408
6526
  _isDragHandleElement(element) {
6409
6527
  return isClosestElementHasClass(element, '.f-drag-handle');
6410
6528
  }
6411
6529
  _getNode(element) {
6412
- this._fNode = this._store.fNodes
6413
- .find(x => x.isContains(element) && !x.fDraggingDisabled());
6530
+ this._fNode = this._store.fNodes.find((x) => x.isContains(element) && !x.fDraggingDisabled());
6414
6531
  return this._fNode;
6415
6532
  }
6416
6533
  _isValidTrigger(event, fTrigger) {
@@ -6421,7 +6538,9 @@ let FNodeMovePreparationExecution = class FNodeMovePreparationExecution {
6421
6538
  let result;
6422
6539
  if (!fNode.fSelectionDisabled()) {
6423
6540
  // Need to select node before drag
6424
- this._mediator.execute(new SelectAndUpdateNodeLayerRequest(fNode));
6541
+ setTimeout(() => {
6542
+ this._mediator.execute(new SelectAndUpdateNodeLayerRequest(fNode));
6543
+ });
6425
6544
  result = this._dragModelFromSelection();
6426
6545
  }
6427
6546
  else {
@@ -7268,7 +7387,7 @@ let DropToGroupPreparation = class DropToGroupPreparation {
7268
7387
  // We can drop items only to children of direct parent
7269
7388
  const childIds = this._mediator.execute(new GetChildNodeIdsRequest(_dragTarget.fParentId()));
7270
7389
  if (childIds.length) {
7271
- targetRects = targetRects.filter(t => childIds.includes(t.node.fId()));
7390
+ targetRects = targetRects.filter((t) => childIds.includes(t.node.fId()));
7272
7391
  }
7273
7392
  }
7274
7393
  this._dragContext.draggableItems.push(new FNodeDropToGroupDragHandler(this._injector, targetRects));
@@ -7277,12 +7396,10 @@ let DropToGroupPreparation = class DropToGroupPreparation {
7277
7396
  return this._isNodeDragHandler() || this._isExternalItemDragHandler();
7278
7397
  }
7279
7398
  _isNodeDragHandler() {
7280
- return this._dragContext.draggableItems
7281
- .some((x) => x instanceof MoveSummaryDragHandler);
7399
+ return this._dragContext.draggableItems.some((x) => x instanceof MoveSummaryDragHandler);
7282
7400
  }
7283
7401
  _isExternalItemDragHandler() {
7284
- return this._dragContext.draggableItems
7285
- .some((x) => x instanceof FExternalItemDragHandler);
7402
+ return this._dragContext.draggableItems.some((x) => x instanceof FExternalItemDragHandler);
7286
7403
  }
7287
7404
  _collectGroupingTargetRects() {
7288
7405
  const dragged = this._draggedNodes();
@@ -7294,9 +7411,9 @@ let DropToGroupPreparation = class DropToGroupPreparation {
7294
7411
  });
7295
7412
  }
7296
7413
  _draggedNodes() {
7297
- return this._dragContext.draggableItems
7414
+ return (this._dragContext.draggableItems
7298
7415
  .find((x) => x instanceof MoveSummaryDragHandler)
7299
- ?.allDraggedNodeHandlers.map((x) => x.nodeOrGroup) || [];
7416
+ ?.allDraggedNodeHandlers.map((x) => x.nodeOrGroup) || []);
7300
7417
  }
7301
7418
  /**
7302
7419
  * Returns the list of dragged nodes extended with all of their parent nodes.
@@ -7311,8 +7428,8 @@ let DropToGroupPreparation = class DropToGroupPreparation {
7311
7428
  }, []);
7312
7429
  }
7313
7430
  _eligibleTargets(dragged, draggingGroup) {
7314
- const nonDragged = this._allNodesAndGroups.filter(x => !dragged.includes(x));
7315
- return draggingGroup ? nonDragged.filter(x => x instanceof FGroupDirective) : nonDragged;
7431
+ const nonDragged = this._allNodesAndGroups.filter((x) => !dragged.includes(x));
7432
+ return draggingGroup ? nonDragged.filter((x) => x instanceof FGroupDirective) : nonDragged;
7316
7433
  }
7317
7434
  _toCanvasRect(rect) {
7318
7435
  return RectExtensions.initialize(rect.x * this._canvasTransform.scale + this._canvasPosition.x, rect.y * this._canvasTransform.scale + this._canvasPosition.y, rect.width * this._canvasTransform.scale, rect.height * this._canvasTransform.scale);
@@ -8744,7 +8861,7 @@ class FDraggableDirective extends FDraggableBase {
8744
8861
  this._beforePlugins.forEach((p) => p.onPointerDown?.(event));
8745
8862
  this._mediator.execute(new FSingleSelectRequest(event, this.fMultiSelectTrigger));
8746
8863
  this._mediator.execute(new FReassignConnectionPreparationRequest(event, this.fReassignConnectionTrigger));
8747
- this._mediator.execute(new FCreateConnectionPreparationRequest(event, this.fCreateConnectionTrigger));
8864
+ this._mediator.execute(new CreateConnectionPreparationRequest(event, this.fCreateConnectionTrigger));
8748
8865
  this._afterPlugins.forEach((p) => p.onPointerDown?.(event));
8749
8866
  const isMouseLeftOrTouch = event.isMouseLeftButton();
8750
8867
  if (!isMouseLeftOrTouch) {
@@ -9456,70 +9573,6 @@ class GetCanBeSelectedItemsRequest {
9456
9573
  static fToken = Symbol('GetCanBeSelectedItemsRequest');
9457
9574
  }
9458
9575
 
9459
- class GetNormalizedElementRectRequest {
9460
- element;
9461
- static fToken = Symbol('GetNormalizedElementRectRequest');
9462
- constructor(element) {
9463
- this.element = element;
9464
- }
9465
- }
9466
-
9467
- /**
9468
- * Execution that retrieves the normalized rectangle of an element.
9469
- * It calculates the rectangle based on the element's position and size,
9470
- * adjusting for the canvas transformation and element offsets.
9471
- */
9472
- let GetNormalizedElementRectExecution = class GetNormalizedElementRectExecution {
9473
- _store = inject(FComponentsStore);
9474
- _mediator = inject(FMediator);
9475
- get _transform() {
9476
- return this._store.fCanvas.transform;
9477
- }
9478
- handle(request) {
9479
- const systemRect = this._getElementRoundedRect(request);
9480
- const position = this._normalizePosition(systemRect);
9481
- const unscaledSize = this._unscaleSize(systemRect);
9482
- const unscaledRect = this._getUnscaledRect(position, unscaledSize, systemRect);
9483
- const offsetSize = this._getOffsetSize(request.element, unscaledSize);
9484
- return RoundedRect.fromCenter(unscaledRect, offsetSize.width, offsetSize.height);
9485
- }
9486
- // BrowserWindow
9487
- // +--------------------------------+
9488
- // | |
9489
- // | Element |
9490
- // | (x: 100, y: 50) |
9491
- // | +--------+ |
9492
- // | | | |
9493
- // | | | |
9494
- // | +--------+ |
9495
- // | |
9496
- // +--------------------------------+
9497
- // This data of the element is relative to the browser window, not the canvas, with all transformations applied.
9498
- _getElementRoundedRect(request) {
9499
- return RoundedRect.fromRect(RectExtensions.fromElement(request.element));
9500
- }
9501
- _normalizePosition(rect) {
9502
- return this._mediator.execute(new GetNormalizedPointRequest(rect));
9503
- }
9504
- _unscaleSize(rect) {
9505
- return SizeExtensions.initialize(rect.width / this._transform.scale, rect.height / this._transform.scale);
9506
- }
9507
- _getUnscaledRect(position, size, rect) {
9508
- return new RoundedRect(position.x, position.y, size.width, size.height, rect.radius1, rect.radius2, rect.radius3, rect.radius4);
9509
- }
9510
- _getOffsetSize(element, size) {
9511
- return SizeExtensions.offsetFromElement(element) || size;
9512
- }
9513
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedElementRectExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
9514
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedElementRectExecution });
9515
- };
9516
- GetNormalizedElementRectExecution = __decorate([
9517
- FExecutionRegister(GetNormalizedElementRectRequest)
9518
- ], GetNormalizedElementRectExecution);
9519
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNormalizedElementRectExecution, decorators: [{
9520
- type: Injectable
9521
- }] });
9522
-
9523
9576
  /**
9524
9577
  * Execution that retrieves elements that can be selected in the Flow, along with their bounding rectangles.
9525
9578
  * It filters out elements that are already selected in the FDraggableDataContext.
@@ -9703,10 +9756,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
9703
9756
  }] });
9704
9757
 
9705
9758
  class SelectAndUpdateNodeLayerRequest {
9706
- fNode;
9759
+ nodeOrGroup;
9707
9760
  static fToken = Symbol('SelectAndUpdateNodeLayerRequest');
9708
- constructor(fNode) {
9709
- this.fNode = fNode;
9761
+ constructor(nodeOrGroup) {
9762
+ this.nodeOrGroup = nodeOrGroup;
9710
9763
  }
9711
9764
  }
9712
9765
 
@@ -9897,11 +9950,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
9897
9950
  let SelectAndUpdateNodeLayerExecution = class SelectAndUpdateNodeLayerExecution {
9898
9951
  _dragContext = inject(FDraggableDataContext);
9899
9952
  _mediator = inject(FMediator);
9900
- handle(request) {
9901
- this.selectNodeIfNotSelected(request.fNode);
9902
- this._mediator.execute(new UpdateItemAndChildrenLayersRequest(request.fNode, request.fNode.hostElement.parentElement));
9953
+ handle({ nodeOrGroup }) {
9954
+ this._selectNodeIfNotSelected(nodeOrGroup);
9955
+ this._mediator.execute(new UpdateItemAndChildrenLayersRequest(nodeOrGroup, nodeOrGroup.hostElement.parentElement));
9903
9956
  }
9904
- selectNodeIfNotSelected(fNode) {
9957
+ _selectNodeIfNotSelected(fNode) {
9905
9958
  if (!this._dragContext.selectedItems.includes(fNode) && !fNode.fSelectionDisabled()) {
9906
9959
  this._dragContext.selectedItems.push(fNode);
9907
9960
  fNode.markAsSelected();
@@ -10188,1000 +10241,1151 @@ const F_DRAGGABLE_FEATURES = [
10188
10241
  RemoveDndFromStoreExecution,
10189
10242
  ];
10190
10243
 
10191
- class AddFlowToStoreRequest {
10192
- fComponent;
10193
- static fToken = Symbol('AddFlowToStoreRequest');
10194
- constructor(fComponent) {
10195
- this.fComponent = fComponent;
10196
- }
10197
- }
10198
-
10199
10244
  /**
10200
- * Execution that adds a Flow to the FComponentsStore.
10245
+ * Injection token for configuring the side detection tolerance (in pixels).
10246
+ * A new side must beat the previous side by more than this value to switch.
10201
10247
  */
10202
- let AddFlowToStoreExecution = class AddFlowToStoreExecution {
10203
- _store = inject(FComponentsStore);
10204
- handle(request) {
10205
- this._store.fFlow = request.fComponent;
10248
+ const CONNECTABLE_SIDE_EPSILON = new InjectionToken('CONNECTABLE_SIDE_EPSILON');
10249
+ /**
10250
+ * Calculates the connectable side of a connector relative to its node host.
10251
+ *
10252
+ * Optimizations & behavior:
10253
+ * - Hysteresis via epsilon to avoid jitter near boundaries.
10254
+ * - Per-connector memoization using WeakMap (no leaks).
10255
+ * - During drag (isDragging === true) the last memorized side is returned immediately
10256
+ * for maximum stability and performance; a safe fallback computes it if missing.
10257
+ */
10258
+ let CalculateConnectableSideByInternalPosition = class CalculateConnectableSideByInternalPosition {
10259
+ _mediator = inject(FMediator);
10260
+ /**
10261
+ * Stores the last computed side per connector.
10262
+ * WeakMap ensures entries are garbage-collected with the connector objects.
10263
+ */
10264
+ _lastSide = new WeakMap();
10265
+ /** Pixel threshold to prevent side switching unless the new side is sufficiently better. */
10266
+ _epsilon = Math.max(0, inject(CONNECTABLE_SIDE_EPSILON, { optional: true }) ?? 2);
10267
+ /**
10268
+ * Entry point: returns the connectable side for a given connector.
10269
+ * If a drag is in progress, returns the last memorized side for stability.
10270
+ */
10271
+ handle({ connector, }) {
10272
+ // Fast path during drag: use memorized side (guaranteed to be present by caller’s contract).
10273
+ if (this._isDragging()) {
10274
+ const cached = this._lastSide.get(connector);
10275
+ if (cached !== undefined)
10276
+ return cached;
10277
+ // Safe fallback: compute once and cache.
10278
+ const computed = this._getSideByDelta(connector.hostElement, connector.fNodeHost, connector);
10279
+ this._lastSide.set(connector, computed);
10280
+ return computed;
10281
+ }
10282
+ // Normal path: compute with hysteresis, then remember.
10283
+ const side = this._getSideByDelta(connector.hostElement, connector.fNodeHost, connector);
10284
+ this._lastSide.set(connector, side);
10285
+ return side;
10206
10286
  }
10207
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddFlowToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10208
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddFlowToStoreExecution });
10287
+ /**
10288
+ * Determines the side of the connector relative to the node host by
10289
+ * comparing distances from the connector's gravity center to each host edge.
10290
+ *
10291
+ * Hysteresis rule:
10292
+ * If the previously chosen side is within `epsilon` pixels of the new best side,
10293
+ * keep the previous side to avoid flicker.
10294
+ *
10295
+ * @param connectorHost - The connector element (HTML or SVG).
10296
+ * @param nodeHost - The parent node element (HTML or SVG).
10297
+ * @param connectorKey - The connector object, used as WeakMap key.
10298
+ * @returns The most stable connectable side.
10299
+ */
10300
+ _getSideByDelta(connectorHost, nodeHost, connectorKey) {
10301
+ const childRect = RectExtensions.fromElement(connectorHost);
10302
+ const parentRect = nodeHost.getBoundingClientRect();
10303
+ const cx = childRect.gravityCenter.x;
10304
+ const cy = childRect.gravityCenter.y;
10305
+ const deltaLeft = cx - parentRect.left;
10306
+ const deltaRight = parentRect.right - cx;
10307
+ const deltaTop = cy - parentRect.top;
10308
+ const deltaBottom = parentRect.bottom - cy;
10309
+ // Determine best side (min delta) in one pass
10310
+ let minIdx = 0;
10311
+ let minVal = deltaLeft;
10312
+ // i=1..3 correspond to Right, Top, Bottom respectively
10313
+ const candidates = [deltaLeft, deltaRight, deltaTop, deltaBottom];
10314
+ for (let i = 1; i < 4; i++) {
10315
+ const v = candidates[i];
10316
+ if (v < minVal) {
10317
+ minVal = v;
10318
+ minIdx = i;
10319
+ }
10320
+ }
10321
+ let candidate = minIdx === 0
10322
+ ? EFConnectableSide.LEFT
10323
+ : minIdx === 1
10324
+ ? EFConnectableSide.RIGHT
10325
+ : minIdx === 2
10326
+ ? EFConnectableSide.TOP
10327
+ : EFConnectableSide.BOTTOM;
10328
+ // Hysteresis: prefer previously chosen side if it's almost as good
10329
+ const prev = this._lastSide.get(connectorKey);
10330
+ if (prev !== undefined && prev !== candidate) {
10331
+ const prevIdx = prev === EFConnectableSide.LEFT
10332
+ ? 0
10333
+ : prev === EFConnectableSide.RIGHT
10334
+ ? 1
10335
+ : prev === EFConnectableSide.TOP
10336
+ ? 2
10337
+ : 3;
10338
+ const prevDelta = prevIdx === 0
10339
+ ? deltaLeft
10340
+ : prevIdx === 1
10341
+ ? deltaRight
10342
+ : prevIdx === 2
10343
+ ? deltaTop
10344
+ : deltaBottom;
10345
+ // How much better the new side is (smaller is better)
10346
+ const advantage = prevDelta - minVal;
10347
+ if (advantage <= this._epsilon) {
10348
+ candidate = prev;
10349
+ }
10350
+ }
10351
+ return candidate;
10352
+ }
10353
+ /** Returns true if a drag operation is currently active. */
10354
+ _isDragging() {
10355
+ return this._mediator.execute(new IsDragStartedRequest());
10356
+ }
10357
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByInternalPosition, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10358
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByInternalPosition });
10209
10359
  };
10210
- AddFlowToStoreExecution = __decorate([
10211
- FExecutionRegister(AddFlowToStoreRequest)
10212
- ], AddFlowToStoreExecution);
10213
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddFlowToStoreExecution, decorators: [{
10360
+ CalculateConnectableSideByInternalPosition = __decorate([
10361
+ FExecutionRegister(CalculateConnectableSideByInternalPositionRequest)
10362
+ ], CalculateConnectableSideByInternalPosition);
10363
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByInternalPosition, decorators: [{
10214
10364
  type: Injectable
10215
10365
  }] });
10216
10366
 
10217
- class GetFlowRequest {
10218
- static fToken = Symbol('GetFlowRequest');
10367
+ class CalculateConnectorsConnectableSidesRequest {
10368
+ nodeOrGroup;
10369
+ static fToken = Symbol('CalculateConnectorsConnectableSidesRequest');
10370
+ constructor(nodeOrGroup) {
10371
+ this.nodeOrGroup = nodeOrGroup;
10372
+ }
10219
10373
  }
10220
10374
 
10221
10375
  /**
10222
- * Execution that retrieves the current Flow from the FComponentsStore.
10376
+ * Execution that calculates connectable sides for all connectors of a node.
10223
10377
  */
10224
- let GetFlowExecution = class GetFlowExecution {
10225
- _store = inject(FComponentsStore);
10226
- handle(request) {
10227
- const result = this._store.fFlow;
10228
- if (!result) {
10229
- throw new Error(`Flow not found in store`);
10378
+ let CalculateConnectorsConnectableSides = class CalculateConnectorsConnectableSides {
10379
+ _mediator = inject(FMediator);
10380
+ /**
10381
+ * Orchestrates side calculation for all connectors of the given node.
10382
+ */
10383
+ handle({ nodeOrGroup }) {
10384
+ const connectors = nodeOrGroup.connectors;
10385
+ const len = connectors.length;
10386
+ for (let i = 0; i < len; i++) {
10387
+ const connection = connectors[i];
10388
+ connection.fConnectableSide = this._resolveSideForConnectorFast(connection);
10389
+ }
10390
+ const toRecalc = new Set();
10391
+ for (let i = 0; i < len; i++) {
10392
+ const source = connectors[i];
10393
+ const outs = source.toConnector;
10394
+ if (outs && outs.length) {
10395
+ for (let j = 0, m = outs.length; j < m; j++) {
10396
+ const target = outs[j];
10397
+ const userSide = target.userFConnectableSide;
10398
+ if (isCalculateMode(userSide)) {
10399
+ toRecalc.add(target);
10400
+ }
10401
+ }
10402
+ }
10403
+ }
10404
+ if (toRecalc.size > 0) {
10405
+ toRecalc.forEach((target) => {
10406
+ target.fConnectableSide = this._calculateByConnectedPositions(target);
10407
+ });
10230
10408
  }
10231
- return result;
10232
10409
  }
10233
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10234
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowExecution });
10410
+ /**
10411
+ * Resolves the connectable side for a connector quickly.
10412
+ * Avoids intermediate arrays and redundant allocations.
10413
+ */
10414
+ _resolveSideForConnectorFast(connector) {
10415
+ const mode = connector.userFConnectableSide;
10416
+ if (mode === EFConnectableSide.AUTO) {
10417
+ return this._mediator.execute(new CalculateConnectableSideByInternalPositionRequest(connector));
10418
+ }
10419
+ if (isCalculateMode(mode)) {
10420
+ return this._calculateByConnectedPositions(connector);
10421
+ }
10422
+ return mode;
10423
+ }
10424
+ /** Delegates to the connected-positions calculation execution. */
10425
+ _calculateByConnectedPositions(connector) {
10426
+ return this._mediator.execute(new CalculateConnectableSideByConnectedPositionsRequest(connector));
10427
+ }
10428
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectorsConnectableSides, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10429
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectorsConnectableSides });
10235
10430
  };
10236
- GetFlowExecution = __decorate([
10237
- FExecutionRegister(GetFlowRequest)
10238
- ], GetFlowExecution);
10239
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowExecution, decorators: [{
10431
+ CalculateConnectorsConnectableSides = __decorate([
10432
+ FExecutionRegister(CalculateConnectorsConnectableSidesRequest)
10433
+ ], CalculateConnectorsConnectableSides);
10434
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectorsConnectableSides, decorators: [{
10240
10435
  type: Injectable
10241
10436
  }] });
10242
10437
 
10243
- class GetFlowHostElementRequest {
10244
- static fToken = Symbol('GetFlowHostElementRequest');
10438
+ class CalculateNodesBoundingBoxRequest {
10439
+ static fToken = Symbol('CalculateNodesBoundingBoxRequest');
10245
10440
  }
10246
10441
 
10247
10442
  /**
10248
- * Execution that retrieves the Flow host element from the FComponentsStore.
10443
+ * Execution that calculates the bounding box of all nodes in the FComponentsStore.
10444
+ * It retrieves the rectangles of each node's host element and computes their union.
10249
10445
  */
10250
- let GetFlowHostElementExecution = class GetFlowHostElementExecution {
10446
+ let CalculateNodesBoundingBox = class CalculateNodesBoundingBox {
10251
10447
  _store = inject(FComponentsStore);
10252
- handle() {
10253
- return this._store.flowHost;
10448
+ handle(_request) {
10449
+ return RectExtensions.union(this._nodesRects());
10254
10450
  }
10255
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowHostElementExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10256
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowHostElementExecution });
10451
+ _nodesRects() {
10452
+ return this._store.fNodes.map((x) => RectExtensions.fromElement(x.hostElement));
10453
+ }
10454
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBox, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10455
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBox });
10257
10456
  };
10258
- GetFlowHostElementExecution = __decorate([
10259
- FExecutionRegister(GetFlowHostElementRequest)
10260
- ], GetFlowHostElementExecution);
10261
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowHostElementExecution, decorators: [{
10457
+ CalculateNodesBoundingBox = __decorate([
10458
+ FExecutionRegister(CalculateNodesBoundingBoxRequest)
10459
+ ], CalculateNodesBoundingBox);
10460
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBox, decorators: [{
10262
10461
  type: Injectable
10263
10462
  }] });
10264
10463
 
10265
- class GetFlowStateConnectionsRequest {
10266
- static fToken = Symbol('GetFlowStateConnectionsRequest');
10267
- }
10268
-
10269
- /**
10270
- * Execution that retrieves the current Flow state connections from the FComponentsStore.
10464
+ class CalculateNodesBoundingBoxNormalizedPositionRequest {
10465
+ fNodes;
10466
+ static fToken = Symbol('CalculateNodesBoundingBoxNormalizedPositionRequest');
10467
+ constructor(fNodes) {
10468
+ this.fNodes = fNodes;
10469
+ }
10470
+ }
10471
+
10472
+ /**
10473
+ * Execution that calculates the bounding box of all nodes in the FComponentsStore
10474
+ * and returns their normalized positions.
10475
+ * It retrieves the rectangles of each node's host element and computes their union.
10271
10476
  */
10272
- let GetFlowStateConnectionsExecution = class GetFlowStateConnectionsExecution {
10477
+ let CalculateNodesBoundingBoxNormalizedPosition = class CalculateNodesBoundingBoxNormalizedPosition {
10273
10478
  _store = inject(FComponentsStore);
10274
- handle(_request) {
10275
- return this._store.fConnections.map(this._mapToConnectionState);
10479
+ handle(request) {
10480
+ return RectExtensions.union(this._getNodesRects(request.fNodes || this._store.fNodes));
10276
10481
  }
10277
- _mapToConnectionState(x) {
10278
- return {
10279
- id: x.fId(),
10280
- fOutputId: x.fOutputId(),
10281
- fInputId: x.fInputId(),
10282
- fType: x.fType,
10283
- fBehavior: x.fBehavior,
10284
- isSelected: x.isSelected(),
10285
- };
10482
+ _getNodesRects(fNodes) {
10483
+ return fNodes.map((x) => {
10484
+ return this._getElementRect(x, RectExtensions.fromElement(x.hostElement));
10485
+ });
10286
10486
  }
10287
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateConnectionsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10288
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateConnectionsExecution });
10487
+ _getElementRect(fNode, rect) {
10488
+ return RectExtensions.initialize(fNode._position.x, fNode._position.y, rect.width, rect.height);
10489
+ }
10490
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBoxNormalizedPosition, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10491
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBoxNormalizedPosition });
10289
10492
  };
10290
- GetFlowStateConnectionsExecution = __decorate([
10291
- FExecutionRegister(GetFlowStateConnectionsRequest)
10292
- ], GetFlowStateConnectionsExecution);
10293
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateConnectionsExecution, decorators: [{
10493
+ CalculateNodesBoundingBoxNormalizedPosition = __decorate([
10494
+ FExecutionRegister(CalculateNodesBoundingBoxNormalizedPositionRequest)
10495
+ ], CalculateNodesBoundingBoxNormalizedPosition);
10496
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBoxNormalizedPosition, decorators: [{
10294
10497
  type: Injectable
10295
10498
  }] });
10296
10499
 
10297
- class GetFlowStateNodesRequest {
10298
- type;
10299
- static fToken = Symbol('GetFlowStateNodesRequest');
10300
- constructor(type) {
10301
- this.type = type;
10500
+ class CalculateOutputConnectionsRequest {
10501
+ nodeOrGroup;
10502
+ static fToken = Symbol('CalculateOutputConnectionsRequest');
10503
+ constructor(nodeOrGroup) {
10504
+ this.nodeOrGroup = nodeOrGroup;
10302
10505
  }
10303
10506
  }
10304
10507
 
10305
10508
  /**
10306
- * Execution that retrieves the state of Flow nodes, including their position, size, inputs, outputs, and selection status.
10509
+ * Execution that calculates output connections for a given FNode.
10307
10510
  */
10308
- let GetFlowStateNodesExecution = class GetFlowStateNodesExecution {
10511
+ let CalculateOutputConnections = class CalculateOutputConnections {
10309
10512
  _store = inject(FComponentsStore);
10310
- handle(request) {
10311
- return this._store.fNodes
10312
- .filter((x) => x instanceof request.type)
10313
- .map((x) => {
10314
- return {
10315
- id: x.fId(),
10316
- parent: x.fParentId(),
10317
- position: x._position,
10318
- size: x._size,
10319
- rotate: x._rotate,
10320
- fOutputs: this._getOutputs(x.hostElement),
10321
- fInputs: this._getInputs(x.hostElement),
10322
- isSelected: x.isSelected(),
10323
- };
10324
- });
10325
- }
10326
- _getOutputs(hostElement) {
10327
- return this._store.fOutputs
10328
- .filter((x) => hostElement.contains(x.hostElement))
10329
- .map((x) => {
10330
- return {
10331
- id: x.fId(),
10332
- fConnectableSide: x.fConnectableSide,
10333
- };
10334
- });
10513
+ handle({ nodeOrGroup }) {
10514
+ const ids = this._collectOutputIds(nodeOrGroup);
10515
+ return this._collectConnections(ids);
10516
+ }
10517
+ _collectOutputIds(nodeOrGroup) {
10518
+ const ids = new Set();
10519
+ for (const connector of this._store.fOutputs) {
10520
+ if (nodeOrGroup.isContains(connector.hostElement)) {
10521
+ ids.add(connector.fId());
10522
+ }
10523
+ }
10524
+ return ids;
10335
10525
  }
10336
- _getInputs(hostElement) {
10337
- return this._store.fInputs
10338
- .filter((x) => hostElement.contains(x.hostElement))
10339
- .map((x) => {
10340
- return {
10341
- id: x.fId(),
10342
- fConnectableSide: x.fConnectableSide,
10343
- };
10344
- });
10526
+ _collectConnections(ids) {
10527
+ const result = [];
10528
+ for (const conn of this._store.fConnections) {
10529
+ if (ids.has(conn.fOutputId())) {
10530
+ result.push(conn);
10531
+ }
10532
+ }
10533
+ return result;
10345
10534
  }
10346
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateNodesExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10347
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateNodesExecution });
10535
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateOutputConnections, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10536
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateOutputConnections });
10348
10537
  };
10349
- GetFlowStateNodesExecution = __decorate([
10350
- FExecutionRegister(GetFlowStateNodesRequest)
10351
- ], GetFlowStateNodesExecution);
10352
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateNodesExecution, decorators: [{
10538
+ CalculateOutputConnections = __decorate([
10539
+ FExecutionRegister(CalculateOutputConnectionsRequest)
10540
+ ], CalculateOutputConnections);
10541
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateOutputConnections, decorators: [{
10353
10542
  type: Injectable
10354
10543
  }] });
10355
10544
 
10356
- class GetFlowStateRequest {
10357
- static fToken = Symbol('GetFlowStateRequest');
10545
+ class FitToChildNodesAndGroupsRequest {
10546
+ nodeOrGroup;
10547
+ static fToken = Symbol('FitToChildNodesAndGroupsRequest');
10548
+ constructor(nodeOrGroup) {
10549
+ this.nodeOrGroup = nodeOrGroup;
10550
+ }
10551
+ }
10552
+
10553
+ class GetNodePaddingRequest {
10554
+ fNode;
10555
+ rect;
10556
+ static fToken = Symbol('GetNodePaddingRequest');
10557
+ constructor(fNode, rect) {
10558
+ this.fNode = fNode;
10559
+ this.rect = rect;
10560
+ }
10358
10561
  }
10359
10562
 
10360
10563
  /**
10361
- * Execution that retrieves the current state of the Flow, including its position, scale, nodes, groups, and connections.
10564
+ * Execution that retrieves the padding data of a Node.
10565
+ * If the Node does not include padding, it returns [0, 0, 0, 0].
10362
10566
  */
10363
- let GetFlowStateExecution = class GetFlowStateExecution {
10567
+ let GetNodePadding = class GetNodePadding {
10568
+ _browser = inject(BrowserService);
10569
+ handle(request) {
10570
+ return request.fNode.fIncludePadding() ? this.getPaddingData(request.fNode, request.rect) : [0, 0, 0, 0];
10571
+ }
10572
+ getPaddingData(node, rect) {
10573
+ const style = this._browser.window.getComputedStyle(node.hostElement);
10574
+ return [
10575
+ this._browser.toPixels(style.paddingLeft, rect.width, rect.height, style.fontSize),
10576
+ this._browser.toPixels(style.paddingTop, rect.width, rect.height, style.fontSize),
10577
+ this._browser.toPixels(style.paddingRight, rect.width, rect.height, style.fontSize),
10578
+ this._browser.toPixels(style.paddingBottom, rect.width, rect.height, style.fontSize),
10579
+ ];
10580
+ }
10581
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNodePadding, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10582
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNodePadding });
10583
+ };
10584
+ GetNodePadding = __decorate([
10585
+ FExecutionRegister(GetNodePaddingRequest)
10586
+ ], GetNodePadding);
10587
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNodePadding, decorators: [{
10588
+ type: Injectable
10589
+ }] });
10590
+
10591
+ let FitToChildNodesAndGroups = class FitToChildNodesAndGroups {
10364
10592
  _mediator = inject(FMediator);
10365
10593
  _store = inject(FComponentsStore);
10366
- handle(payload) {
10367
- return {
10368
- position: this._getCanvasPosition(this._store.fCanvas.transform),
10369
- scale: this._store.fCanvas.transform.scale,
10370
- nodes: this._mediator.execute(new GetFlowStateNodesRequest(FNodeDirective)),
10371
- groups: this._mediator.execute(new GetFlowStateNodesRequest(FGroupDirective)),
10372
- connections: this._mediator.execute(new GetFlowStateConnectionsRequest()),
10373
- };
10594
+ get _nodes() {
10595
+ return this._store.fNodes;
10374
10596
  }
10375
- _getCanvasPosition(transform) {
10376
- return PointExtensions.sum(transform.position, transform.scaledPosition);
10597
+ handle({ nodeOrGroup }) {
10598
+ if (nodeOrGroup.fAutoSizeToFitChildren()) {
10599
+ const directChildren = this._calculateDirectChildren(nodeOrGroup);
10600
+ if (directChildren.length) {
10601
+ const currentBounding = this._boundingRect(nodeOrGroup);
10602
+ const childrenBounding = this._calculateChildrenBounding(directChildren, this._paddings(nodeOrGroup, currentBounding));
10603
+ nodeOrGroup.updatePosition(childrenBounding);
10604
+ nodeOrGroup.updateSize(childrenBounding);
10605
+ nodeOrGroup.redraw();
10606
+ }
10607
+ }
10608
+ const parent = nodeOrGroup.fParentId();
10609
+ if (!parent) {
10610
+ return;
10611
+ }
10612
+ const parentNode = this._nodes.find(x => x.fId() === parent);
10613
+ if (!parentNode) {
10614
+ return;
10615
+ }
10616
+ this._mediator.execute(new FitToChildNodesAndGroupsRequest(parentNode));
10377
10617
  }
10378
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10379
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateExecution });
10618
+ _calculateDirectChildren(nodeOrGroup) {
10619
+ return this._nodes.filter(x => x.fParentId() === nodeOrGroup.fId());
10620
+ }
10621
+ _unionRect(nodeOrGroups) {
10622
+ return RectExtensions.union(nodeOrGroups.map((x) => this._boundingRect(x))) || RectExtensions.initialize();
10623
+ }
10624
+ _boundingRect(nodeOrGroup) {
10625
+ return this._mediator.execute(new GetNormalizedElementRectRequest(nodeOrGroup.hostElement));
10626
+ }
10627
+ _paddings(nodeOrGroup, rect) {
10628
+ return this._mediator.execute(new GetNodePaddingRequest(nodeOrGroup, rect));
10629
+ }
10630
+ _calculateChildrenBounding(directChildren, [top, right, bottom, left]) {
10631
+ let childrenBounding = this._unionRect(directChildren);
10632
+ childrenBounding = RectExtensions.initialize(childrenBounding.x - left, childrenBounding.y - top, childrenBounding.width + left + right, childrenBounding.height + top + bottom);
10633
+ return childrenBounding;
10634
+ }
10635
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FitToChildNodesAndGroups, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10636
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FitToChildNodesAndGroups });
10380
10637
  };
10381
- GetFlowStateExecution = __decorate([
10382
- FExecutionRegister(GetFlowStateRequest)
10383
- ], GetFlowStateExecution);
10384
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateExecution, decorators: [{
10638
+ FitToChildNodesAndGroups = __decorate([
10639
+ FExecutionRegister(FitToChildNodesAndGroupsRequest)
10640
+ ], FitToChildNodesAndGroups);
10641
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FitToChildNodesAndGroups, decorators: [{
10385
10642
  type: Injectable
10386
10643
  }] });
10387
10644
 
10645
+ class GetChildNodeIdsRequest {
10646
+ id;
10647
+ static fToken = Symbol('GetChildNodeIdsRequest');
10648
+ constructor(id) {
10649
+ this.id = id;
10650
+ }
10651
+ }
10652
+
10388
10653
  /**
10389
- * Providers for retrieving the current Flow state, including nodes, groups, and connections.
10654
+ * Execution that retrieves all child nodes of a given node in the Flow.
10390
10655
  */
10391
- const GET_FLOW_STATE_PROVIDERS = [
10392
- GetFlowStateExecution,
10393
- GetFlowStateNodesExecution,
10394
- GetFlowStateConnectionsExecution,
10395
- ];
10656
+ let GetChildNodeIds = class GetChildNodeIds {
10657
+ _store = inject(FComponentsStore);
10658
+ get _allNodesAndGroups() {
10659
+ return this._store.fNodes;
10660
+ }
10661
+ handle(request) {
10662
+ if (!request.id) {
10663
+ return [];
10664
+ }
10665
+ const visited = new Set();
10666
+ const result = [];
10667
+ this._collectDescendants(request.id, result, visited);
10668
+ return result;
10669
+ }
10670
+ _collectDescendants(nodeId, result, visited) {
10671
+ if (visited.has(nodeId)) {
10672
+ throw new Error(`Circular reference detected in the node hierarchy. Node id: ${nodeId}`);
10673
+ }
10674
+ visited.add(nodeId);
10675
+ const children = this._allNodesAndGroups.filter(n => n.fParentId() === nodeId).map((x) => x.fId());
10676
+ result.push(...children);
10677
+ for (const id of children) {
10678
+ this._collectDescendants(id, result, visited);
10679
+ }
10680
+ }
10681
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetChildNodeIds, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10682
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetChildNodeIds });
10683
+ };
10684
+ GetChildNodeIds = __decorate([
10685
+ FExecutionRegister(GetChildNodeIdsRequest)
10686
+ ], GetChildNodeIds);
10687
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetChildNodeIds, decorators: [{
10688
+ type: Injectable
10689
+ }] });
10396
10690
 
10397
- class RemoveFlowFromStoreRequest {
10398
- static fToken = Symbol('RemoveFlowFromStoreRequest');
10691
+ class GetParentNodesRequest {
10692
+ fNode;
10693
+ static fToken = Symbol('GetParentNodesRequest');
10694
+ constructor(fNode) {
10695
+ this.fNode = fNode;
10696
+ }
10399
10697
  }
10400
10698
 
10401
10699
  /**
10402
- * Execution that removes a Flow from the FComponentsStore.
10700
+ * Execution that retrieves all parent nodes of a given node from the FComponentsStore.
10403
10701
  */
10404
- let RemoveFlowFromStoreExecution = class RemoveFlowFromStoreExecution {
10702
+ let GetParentNodes = class GetParentNodes {
10405
10703
  _store = inject(FComponentsStore);
10406
10704
  handle(request) {
10407
- this._store.fFlow = undefined;
10705
+ return this._getParentNodes(request.fNode, new Set(), []);
10408
10706
  }
10409
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveFlowFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10410
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveFlowFromStoreExecution });
10707
+ _getParentNodes(fNode, visited, result) {
10708
+ if (visited.has(fNode.fId())) {
10709
+ throw new Error('Circular reference detected in the node hierarchy. Node id: ' + fNode.fId());
10710
+ }
10711
+ visited.add(fNode.fId());
10712
+ const parent = this._store.fNodes.find((x) => x.fId() === fNode.fParentId());
10713
+ if (!parent) {
10714
+ return result;
10715
+ }
10716
+ result.push(parent);
10717
+ return this._getParentNodes(parent, visited, result);
10718
+ }
10719
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetParentNodes, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10720
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetParentNodes });
10411
10721
  };
10412
- RemoveFlowFromStoreExecution = __decorate([
10413
- FExecutionRegister(RemoveFlowFromStoreRequest)
10414
- ], RemoveFlowFromStoreExecution);
10415
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveFlowFromStoreExecution, decorators: [{
10722
+ GetParentNodes = __decorate([
10723
+ FExecutionRegister(GetParentNodesRequest)
10724
+ ], GetParentNodes);
10725
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetParentNodes, decorators: [{
10416
10726
  type: Injectable
10417
10727
  }] });
10418
10728
 
10729
+ class UpdateNodeWhenStateOrSizeChangedRequest {
10730
+ nodeOrGroup;
10731
+ destroyRef;
10732
+ static fToken = Symbol('UpdateNodeWhenStateOrSizeChangedRequest');
10733
+ constructor(nodeOrGroup, destroyRef) {
10734
+ this.nodeOrGroup = nodeOrGroup;
10735
+ this.destroyRef = destroyRef;
10736
+ }
10737
+ }
10738
+
10419
10739
  /**
10420
- * Providers for managing the Flow in the FComponentsStore.
10421
- * This includes adding, retrieving, and removing the Flow,
10422
- * as well as getting the Flow host element and its state.
10740
+ * Execution that updates a node's connectors when its state or size changes.
10423
10741
  */
10424
- const F_FLOW_FEATURES = [
10425
- AddFlowToStoreExecution,
10426
- GetFlowExecution,
10427
- GetFlowHostElementExecution,
10428
- ...GET_FLOW_STATE_PROVIDERS,
10429
- RemoveFlowFromStoreExecution,
10430
- ];
10742
+ let UpdateNodeWhenStateOrSizeChanged = class UpdateNodeWhenStateOrSizeChanged {
10743
+ _mediator = inject(FMediator);
10744
+ /**
10745
+ * Handles the request to update the node's connectors based on state or size changes.
10746
+ * It listens for resize events and recalculates the connectable sides of the connectors.
10747
+ * @param request
10748
+ */
10749
+ handle({ nodeOrGroup, destroyRef }) {
10750
+ const { hostElement, stateChanges } = nodeOrGroup;
10751
+ new FChannelHub(new FResizeChannel(hostElement), stateChanges)
10752
+ .pipe(notifyOnStart(), debounceTime(10))
10753
+ .listen(destroyRef, () => {
10754
+ this._mediator.execute(new NotifyDataChangedRequest());
10755
+ if (!this._isDragging()) {
10756
+ this._mediator.execute(new CalculateConnectorsConnectableSidesRequest(nodeOrGroup));
10757
+ this._mediator.execute(new FitToChildNodesAndGroupsRequest(nodeOrGroup));
10758
+ }
10759
+ });
10760
+ }
10761
+ _isDragging() {
10762
+ return this._mediator.execute(new IsDragStartedRequest());
10763
+ }
10764
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UpdateNodeWhenStateOrSizeChanged, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10765
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UpdateNodeWhenStateOrSizeChanged });
10766
+ };
10767
+ UpdateNodeWhenStateOrSizeChanged = __decorate([
10768
+ FExecutionRegister(UpdateNodeWhenStateOrSizeChangedRequest)
10769
+ ], UpdateNodeWhenStateOrSizeChanged);
10770
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UpdateNodeWhenStateOrSizeChanged, decorators: [{
10771
+ type: Injectable
10772
+ }] });
10431
10773
 
10432
- class AddLineAlignmentToStoreRequest {
10774
+ class RemoveNodeFromStoreRequest {
10433
10775
  fComponent;
10434
- static fToken = Symbol('AddLineAlignmentToStoreRequest');
10776
+ static fToken = Symbol('RemoveNodeFromStoreRequest');
10435
10777
  constructor(fComponent) {
10436
10778
  this.fComponent = fComponent;
10437
10779
  }
10438
10780
  }
10439
10781
 
10440
10782
  /**
10441
- * Execution that adds a line alignment to the FComponentsStore.
10783
+ * Execution that removes a node from the FComponentsStore.
10442
10784
  */
10443
- let AddLineAlignmentToStoreExecution = class AddLineAlignmentToStoreExecution {
10785
+ let RemoveNodeFromStore = class RemoveNodeFromStore {
10444
10786
  _store = inject(FComponentsStore);
10445
10787
  handle(request) {
10446
- this._store.fLineAlignment = request.fComponent;
10788
+ this._store.removeComponent(this._store.fNodes, request.fComponent);
10789
+ }
10790
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveNodeFromStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10791
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveNodeFromStore });
10792
+ };
10793
+ RemoveNodeFromStore = __decorate([
10794
+ FExecutionRegister(RemoveNodeFromStoreRequest)
10795
+ ], RemoveNodeFromStore);
10796
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveNodeFromStore, decorators: [{
10797
+ type: Injectable
10798
+ }] });
10799
+
10800
+ /**
10801
+ * This file exports all the node-related executions that can be used in the F-Flow domain.
10802
+ */
10803
+ const F_NODE_FEATURES = [
10804
+ AddNodeToStore,
10805
+ CalculateConnectableSideByConnectedPositions,
10806
+ CalculateConnectableSideByInternalPosition,
10807
+ CalculateInputConnections,
10808
+ CalculateConnectorsConnectableSides,
10809
+ CalculateNodesBoundingBox,
10810
+ CalculateNodesBoundingBoxNormalizedPosition,
10811
+ CalculateOutputConnections,
10812
+ FitToChildNodesAndGroups,
10813
+ GetChildNodeIds,
10814
+ GetNodePadding,
10815
+ GetParentNodes,
10816
+ UpdateNodeWhenStateOrSizeChanged,
10817
+ RemoveNodeFromStore,
10818
+ ];
10819
+
10820
+ /**
10821
+ * Execution that retrieves all input connectors that can be connected to a given output or outlet connector,
10822
+ */
10823
+ let CalculateTargetConnectorsToConnect = class CalculateTargetConnectorsToConnect {
10824
+ _mediator = inject(FMediator);
10825
+ _store = inject(FComponentsStore);
10826
+ get _targetConnectors() {
10827
+ return this._store.fInputs;
10828
+ }
10829
+ handle({ sourceConnector, pointerPosition, }) {
10830
+ const result = this._getCanBeConnectedInputs(sourceConnector).map((x) => {
10831
+ return this._mediator.execute(new GetConnectorAndRectRequest(x));
10832
+ });
10833
+ setTimeout(() => {
10834
+ this._calculateConnectableSides(result, pointerPosition);
10835
+ });
10836
+ return result;
10837
+ }
10838
+ _getCanBeConnectedInputs(outputOrOutlet) {
10839
+ let targetConnectors = [];
10840
+ if (outputOrOutlet.hasConnectionLimits) {
10841
+ targetConnectors = this._targetConnectors.filter((x) => outputOrOutlet.canConnectTo(x));
10842
+ }
10843
+ else {
10844
+ targetConnectors = this._targetConnectors.filter((x) => x.canBeConnected);
10845
+ if (!outputOrOutlet.isSelfConnectable) {
10846
+ targetConnectors = this._filterSelfConnectable(targetConnectors, outputOrOutlet);
10847
+ }
10848
+ }
10849
+ return targetConnectors;
10850
+ }
10851
+ _filterSelfConnectable(targetConnectors, outputOrOutlet) {
10852
+ return targetConnectors.filter(({ fNodeId }) => outputOrOutlet.fNodeId !== fNodeId);
10853
+ }
10854
+ _calculateConnectableSides(connectors, pointerPosition) {
10855
+ connectors.forEach((x) => {
10856
+ if (isCalculateMode(x.fConnector.userFConnectableSide)) {
10857
+ x.fConnector.fConnectableSide = this._calculateByConnectedPositions(x.fConnector, pointerPosition);
10858
+ }
10859
+ });
10447
10860
  }
10448
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddLineAlignmentToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10449
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddLineAlignmentToStoreExecution });
10861
+ /** Delegates to the connected-positions calculation execution. */
10862
+ _calculateByConnectedPositions(connector, pointerPosition) {
10863
+ return this._mediator.execute(new CalculateConnectableSideByConnectedPositionsRequest(connector, pointerPosition));
10864
+ }
10865
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateTargetConnectorsToConnect, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10866
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateTargetConnectorsToConnect });
10450
10867
  };
10451
- AddLineAlignmentToStoreExecution = __decorate([
10452
- FExecutionRegister(AddLineAlignmentToStoreRequest)
10453
- ], AddLineAlignmentToStoreExecution);
10454
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddLineAlignmentToStoreExecution, decorators: [{
10868
+ CalculateTargetConnectorsToConnect = __decorate([
10869
+ FExecutionRegister(CalculateTargetConnectorsToConnectRequest)
10870
+ ], CalculateTargetConnectorsToConnect);
10871
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateTargetConnectorsToConnect, decorators: [{
10455
10872
  type: Injectable
10456
10873
  }] });
10457
10874
 
10458
- class RemoveLineAlignmentFromStoreRequest {
10459
- static fToken = Symbol('RemoveLineAlignmentFromStoreRequest');
10875
+ class CalculateSourceConnectorsToConnectRequest {
10876
+ targetConnector;
10877
+ pointerPosition;
10878
+ static fToken = Symbol('CalculateSourceConnectorsToConnectRequest');
10879
+ constructor(targetConnector, pointerPosition) {
10880
+ this.targetConnector = targetConnector;
10881
+ this.pointerPosition = pointerPosition;
10882
+ }
10460
10883
  }
10461
10884
 
10462
10885
  /**
10463
- * Execution that removes a line alignment from the FComponentsStore.
10886
+ * Execution that retrieves all source connectors that can be connected to a given target connector,
10887
+ * along with their rectangles.
10888
+ * Source - Output or Outlet connectors.
10464
10889
  */
10465
- let RemoveLineAlignmentFromStoreExecution = class RemoveLineAlignmentFromStoreExecution {
10890
+ let CalculateSourceConnectorsToConnect = class CalculateSourceConnectorsToConnect {
10891
+ _mediator = inject(FMediator);
10466
10892
  _store = inject(FComponentsStore);
10467
- handle(request) {
10468
- this._store.fLineAlignment = undefined;
10893
+ get _sourceConnectors() {
10894
+ return this._store.fOutputs;
10469
10895
  }
10470
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveLineAlignmentFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10471
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveLineAlignmentFromStoreExecution });
10896
+ handle({ targetConnector, pointerPosition, }) {
10897
+ const result = this._getConnectableSources(targetConnector).map((x) => {
10898
+ return this._mediator.execute(new GetConnectorAndRectRequest(x));
10899
+ });
10900
+ setTimeout(() => {
10901
+ this._calculateConnectableSides(result, pointerPosition);
10902
+ });
10903
+ return result;
10904
+ }
10905
+ _getConnectableSources(targetConnector) {
10906
+ return this._sourceConnectors.filter((x) => {
10907
+ let result = x.canBeConnected;
10908
+ if (result && x.hasConnectionLimits) {
10909
+ result = x.canConnectTo(targetConnector);
10910
+ }
10911
+ return result;
10912
+ });
10913
+ }
10914
+ _calculateConnectableSides(connectors, pointerPosition) {
10915
+ connectors.forEach((x) => {
10916
+ if (isCalculateMode(x.fConnector.userFConnectableSide)) {
10917
+ x.fConnector.fConnectableSide = this._calculateByConnectedPositions(x.fConnector, pointerPosition);
10918
+ }
10919
+ });
10920
+ }
10921
+ /** Delegates to the connected-positions calculation execution. */
10922
+ _calculateByConnectedPositions(connector, pointerPosition) {
10923
+ return this._mediator.execute(new CalculateConnectableSideByConnectedPositionsRequest(connector, pointerPosition));
10924
+ }
10925
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateSourceConnectorsToConnect, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10926
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateSourceConnectorsToConnect });
10472
10927
  };
10473
- RemoveLineAlignmentFromStoreExecution = __decorate([
10474
- FExecutionRegister(RemoveLineAlignmentFromStoreRequest)
10475
- ], RemoveLineAlignmentFromStoreExecution);
10476
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveLineAlignmentFromStoreExecution, decorators: [{
10928
+ CalculateSourceConnectorsToConnect = __decorate([
10929
+ FExecutionRegister(CalculateSourceConnectorsToConnectRequest)
10930
+ ], CalculateSourceConnectorsToConnect);
10931
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateSourceConnectorsToConnect, decorators: [{
10477
10932
  type: Injectable
10478
10933
  }] });
10479
10934
 
10480
- /**
10481
- * Collection of all FLineAlignment feature executions.
10482
- * These executions handle the addition and removal of line alignments
10483
- * in the FComponentsStore.
10484
- */
10485
- const F_LINE_ALIGNMENT_FEATURES = [
10486
- AddLineAlignmentToStoreExecution,
10487
- RemoveLineAlignmentFromStoreExecution,
10488
- ];
10489
-
10490
- class AddNodeToStoreRequest {
10491
- fComponent;
10492
- static fToken = Symbol('AddNodeToStoreRequest');
10493
- constructor(fComponent) {
10494
- this.fComponent = fComponent;
10935
+ class MarkConnectableConnectorsRequest {
10936
+ connectors;
10937
+ static fToken = Symbol('MarkConnectableConnectorsRequest');
10938
+ constructor(connectors) {
10939
+ this.connectors = connectors;
10495
10940
  }
10496
10941
  }
10497
10942
 
10498
10943
  /**
10499
- * Execution that adds a Node to the FComponentsStore.
10944
+ * Execution that marks connectors as connectable.
10500
10945
  */
10501
- let AddNodeToStore = class AddNodeToStore {
10946
+ let MarkConnectableConnectors = class MarkConnectableConnectors {
10502
10947
  _store = inject(FComponentsStore);
10503
- handle(request) {
10504
- this._store.addComponent(this._store.fNodes, request.fComponent);
10948
+ handle({ connectors }) {
10949
+ this._store.flowHost.classList.add(F_CSS_CLASS.DRAG_AND_DROP.CONNECTIONS_DRAGGING);
10950
+ connectors.forEach((x) => this._markConnector(x));
10505
10951
  }
10506
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddNodeToStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10507
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddNodeToStore });
10952
+ _markConnector({ hostElement }) {
10953
+ hostElement.classList.add(F_CSS_CLASS.CONNECTOR.CONNECTABLE);
10954
+ }
10955
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MarkConnectableConnectors, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10956
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MarkConnectableConnectors });
10508
10957
  };
10509
- AddNodeToStore = __decorate([
10510
- FExecutionRegister(AddNodeToStoreRequest)
10511
- ], AddNodeToStore);
10512
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddNodeToStore, decorators: [{
10958
+ MarkConnectableConnectors = __decorate([
10959
+ FExecutionRegister(MarkConnectableConnectorsRequest)
10960
+ ], MarkConnectableConnectors);
10961
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MarkConnectableConnectors, decorators: [{
10513
10962
  type: Injectable
10514
10963
  }] });
10515
10964
 
10516
- class CalculateInputConnectionsRequest {
10517
- fNode;
10518
- static fToken = Symbol('CalculateInputConnectionsRequest');
10519
- constructor(fNode) {
10520
- this.fNode = fNode;
10965
+ class RemoveInputFromStoreRequest {
10966
+ component;
10967
+ static fToken = Symbol('RemoveInputFromStoreRequest');
10968
+ constructor(component) {
10969
+ this.component = component;
10521
10970
  }
10522
10971
  }
10523
10972
 
10524
10973
  /**
10525
- * Execution that calculates input connections for a given FNode.
10974
+ * Execution that removes an inputConnector from the FComponentsStore.
10526
10975
  */
10527
- let CalculateInputConnections = class CalculateInputConnections {
10976
+ let RemoveInputFromStore = class RemoveInputFromStore {
10528
10977
  _store = inject(FComponentsStore);
10529
- handle(request) {
10530
- return this._calculateConnections(new Set(this._calculateConnectors(request.fNode)));
10531
- }
10532
- _calculateConnectors(fNode) {
10533
- return this._store.fInputs.filter((x) => fNode.isContains(x.hostElement)).map((x) => x.fId());
10534
- }
10535
- _calculateConnections(ids) {
10536
- return this._store.fConnections.filter((x) => ids.has(x.fInputId()));
10978
+ handle({ component }) {
10979
+ this._store.removeComponent(this._store.fInputs, component);
10537
10980
  }
10538
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateInputConnections, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10539
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateInputConnections });
10981
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveInputFromStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10982
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveInputFromStore });
10540
10983
  };
10541
- CalculateInputConnections = __decorate([
10542
- FExecutionRegister(CalculateInputConnectionsRequest)
10543
- ], CalculateInputConnections);
10544
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateInputConnections, decorators: [{
10984
+ RemoveInputFromStore = __decorate([
10985
+ FExecutionRegister(RemoveInputFromStoreRequest)
10986
+ ], RemoveInputFromStore);
10987
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveInputFromStore, decorators: [{
10545
10988
  type: Injectable
10546
10989
  }] });
10547
10990
 
10548
- class CalculateConnectableSideByConnectedPositionsRequest {
10549
- connector;
10550
- static fToken = Symbol('CalculateConnectableSideByConnectedPositionsRequest');
10551
- constructor(connector) {
10552
- this.connector = connector;
10553
- }
10554
- }
10555
-
10556
- class CalculateConnectableSideByInternalPositionRequest {
10557
- connector;
10558
- static fToken = Symbol('CalculateConnectableSideByInternalPositionRequest');
10559
- constructor(connector) {
10560
- this.connector = connector;
10991
+ class RemoveOutletFromStoreRequest {
10992
+ fComponent;
10993
+ static fToken = Symbol('RemoveOutletFromStoreRequest');
10994
+ constructor(fComponent) {
10995
+ this.fComponent = fComponent;
10561
10996
  }
10562
10997
  }
10563
10998
 
10564
10999
  /**
10565
- * Execution that calculates the connectable side for a connector
10566
- * based on the internal position of the connector relative to its node host.
10567
- */
10568
- let CalculateConnectableSideByInternalPosition = class CalculateConnectableSideByInternalPosition {
10569
- handle({ connector, }) {
10570
- return this._getSideByDelta(connector.hostElement, connector.fNodeHost);
10571
- }
10572
- /**
10573
- * Determines the side of the connector relative to the node host based on the minimum distance.
10574
- * @param connectorHost
10575
- * @param nodeHost
10576
- * @private
10577
- */
10578
- _getSideByDelta(connectorHost, nodeHost) {
10579
- let result;
10580
- const childRect = RectExtensions.fromElement(connectorHost);
10581
- const parentRect = nodeHost.getBoundingClientRect();
10582
- const deltaLeft = childRect.gravityCenter.x - parentRect.left;
10583
- const deltaRight = parentRect.right - childRect.gravityCenter.x;
10584
- const deltaTop = childRect.gravityCenter.y - parentRect.top;
10585
- const deltaBottom = parentRect.bottom - childRect.gravityCenter.y;
10586
- const minDelta = Math.min(deltaLeft, deltaRight, deltaTop, deltaBottom);
10587
- if (minDelta === deltaLeft) {
10588
- result = EFConnectableSide.LEFT;
10589
- }
10590
- else if (minDelta === deltaRight) {
10591
- result = EFConnectableSide.RIGHT;
10592
- }
10593
- else if (minDelta === deltaTop) {
10594
- result = EFConnectableSide.TOP;
10595
- }
10596
- else {
10597
- result = EFConnectableSide.BOTTOM;
10598
- }
10599
- return result;
10600
- }
10601
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByInternalPosition, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10602
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByInternalPosition });
10603
- };
10604
- CalculateConnectableSideByInternalPosition = __decorate([
10605
- FExecutionRegister(CalculateConnectableSideByInternalPositionRequest)
10606
- ], CalculateConnectableSideByInternalPosition);
10607
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByInternalPosition, decorators: [{
10608
- type: Injectable
10609
- }] });
10610
-
10611
- /**
10612
- * Execution that calculates the connectable side for a connector
10613
- * based on the positions of its connected connectors.
11000
+ * Execution that removes an outlet connector from the FComponentsStore.
10614
11001
  */
10615
- let CalculateConnectableSideByConnectedPositions = class CalculateConnectableSideByConnectedPositions {
10616
- _mediator = inject(FMediator);
10617
- /**
10618
- * Handles the request to calculate the connectable side for a connector
10619
- * based on the positions of its connected connectors.
10620
- *
10621
- * @param request - Contains the connector host element and its connected connectors.
10622
- * @returns {EFConnectableSide} - The calculated connectable side.
10623
- */
10624
- handle({ connector, }) {
10625
- const selfCenter = RectExtensions.fromElement(connector.hostElement).gravityCenter;
10626
- const targetCenters = this._getConnectedCenters(connector.hostElement, connector.toConnector);
10627
- if (!targetCenters.length) {
10628
- return this._mediator.execute(new CalculateConnectableSideByInternalPositionRequest(connector));
10629
- }
10630
- const avg = this._calculateAveragePoint(targetCenters);
10631
- return this._determineSide(selfCenter, avg);
10632
- }
10633
- /**
10634
- * Extracts the gravity centers of connected connectors, excluding the current connector.
10635
- *
10636
- * @param selfHost - The host element of the current connector.
10637
- * @param connected - The list of connected connectors.
10638
- * @returns {Array<{x: number, y: number}>} - An array of gravity center coordinates.
10639
- */
10640
- _getConnectedCenters(selfHost, connected) {
10641
- return (connected ?? [])
10642
- .map((c) => c?.hostElement)
10643
- .filter((el) => !!el && el !== selfHost)
10644
- .map((el) => RectExtensions.fromElement(el).gravityCenter);
10645
- }
10646
- /**
10647
- * Calculates the average point (center of mass) from a set of points.
10648
- *
10649
- * @param points - An array of point objects with x and y coordinates.
10650
- * @returns {{x: number, y: number}} - The average x and y coordinate.
10651
- */
10652
- _calculateAveragePoint(points) {
10653
- const sum = points.reduce((result, p) => {
10654
- result.x += p.x;
10655
- result.y += p.y;
10656
- return result;
10657
- }, PointExtensions.initialize());
10658
- return {
10659
- x: sum.x / points.length,
10660
- y: sum.y / points.length,
10661
- };
10662
- }
10663
- /**
10664
- * Determines the connectable side of the current connector relative to the
10665
- * average position of its connected connectors.
10666
- *
10667
- * @param self - The gravity center of the current connector.
10668
- * @param avg - The average gravity center of connected connectors.
10669
- * @returns {EFConnectableSide} - The chosen side (LEFT, RIGHT, TOP, BOTTOM).
10670
- */
10671
- _determineSide(self, avg) {
10672
- const dx = avg.x - self.x;
10673
- const dy = avg.y - self.y;
10674
- const snapEps = 2; // px — hysteresis threshold to avoid side-flipping near diagonals
10675
- if (Math.abs(dx) - Math.abs(dy) > snapEps) {
10676
- return dx < 0 ? EFConnectableSide.LEFT : EFConnectableSide.RIGHT;
10677
- }
10678
- if (Math.abs(dy) - Math.abs(dx) > snapEps) {
10679
- return dy < 0 ? EFConnectableSide.TOP : EFConnectableSide.BOTTOM;
10680
- }
10681
- // When differences are nearly equal, prefer vertical orientation for stability
10682
- return dy < 0 ? EFConnectableSide.TOP : EFConnectableSide.BOTTOM;
11002
+ let RemoveOutletFromStoreExecution = class RemoveOutletFromStoreExecution {
11003
+ _store = inject(FComponentsStore);
11004
+ handle(request) {
11005
+ this._store.removeComponent(this._store.fOutlets, request.fComponent);
10683
11006
  }
10684
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByConnectedPositions, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10685
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByConnectedPositions });
11007
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutletFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11008
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutletFromStoreExecution });
10686
11009
  };
10687
- CalculateConnectableSideByConnectedPositions = __decorate([
10688
- FExecutionRegister(CalculateConnectableSideByConnectedPositionsRequest)
10689
- ], CalculateConnectableSideByConnectedPositions);
10690
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateConnectableSideByConnectedPositions, decorators: [{
11010
+ RemoveOutletFromStoreExecution = __decorate([
11011
+ FExecutionRegister(RemoveOutletFromStoreRequest)
11012
+ ], RemoveOutletFromStoreExecution);
11013
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutletFromStoreExecution, decorators: [{
10691
11014
  type: Injectable
10692
11015
  }] });
10693
11016
 
10694
- class CalculateNodeConnectorsConnectableSidesRequest {
10695
- node;
10696
- static fToken = Symbol('CalculateNodeConnectorsConnectableSidesRequest');
10697
- constructor(node) {
10698
- this.node = node;
11017
+ class RemoveOutputFromStoreRequest {
11018
+ fComponent;
11019
+ static fToken = Symbol('RemoveOutputFromStoreRequest');
11020
+ constructor(fComponent) {
11021
+ this.fComponent = fComponent;
10699
11022
  }
10700
11023
  }
10701
11024
 
10702
11025
  /**
10703
- * Execution that calculates connectable sides for all connectors of a node.
10704
- *
10705
- * Responsibility:
10706
- * - For each connector, decide the effective connectable side according to:
10707
- * - AUTO -> by internal position relative to node host
10708
- * - CALCULATE -> by positions of connected connectors
10709
- * - explicit -> use the user-defined side as-is
10710
- * - For each `toConnector` whose user side is CALCULATE, recalculate it as well.
11026
+ * Execution that removes an outlet connector from the FComponentsStore.
10711
11027
  */
10712
- let CalculateNodeConnectorsConnectableSides = class CalculateNodeConnectorsConnectableSides {
10713
- _mediator = inject(FMediator);
10714
- /**
10715
- * Orchestrates side calculation for all connectors of the given node.
10716
- *
10717
- * @param request.node - Node whose connectors should be recalculated.
10718
- */
10719
- handle({ node }) {
10720
- node.connectors.forEach((connector) => {
10721
- this._updateConnectorSide(connector);
10722
- this._updateConnectedTargets(connector);
10723
- });
10724
- }
10725
- /**
10726
- * Calculates and assigns the connectable side for a single connector.
10727
- *
10728
- * @param connector - The connector being updated.
10729
- */
10730
- _updateConnectorSide(connector) {
10731
- connector.fConnectableSide = this._resolveSideForConnector(connector);
10732
- }
10733
- /**
10734
- * Recalculates connectable sides for all `toConnector` items that are marked as CALCULATE.
10735
- *
10736
- * @param source - The source connector whose outgoing connections should be processed.
10737
- */
10738
- _updateConnectedTargets(source) {
10739
- source.toConnector.forEach((target) => {
10740
- if (target.userFConnectableSide === EFConnectableSide.CALCULATE) {
10741
- target.fConnectableSide = this._resolveSideByConnectedPositions(target);
10742
- }
10743
- });
10744
- }
10745
- /**
10746
- * Resolves the effective side for a connector according to its user preference.
10747
- *
10748
- * @param connector - The connector to resolve side for.
10749
- * @returns {EFConnectableSide} - The resolved side.
10750
- */
10751
- _resolveSideForConnector(connector) {
10752
- const preference = connector.userFConnectableSide;
10753
- if (preference === EFConnectableSide.AUTO) {
10754
- return this._resolveSideByInternalPosition(connector);
10755
- }
10756
- if (preference === EFConnectableSide.CALCULATE) {
10757
- return this._resolveSideByConnectedPositions(connector);
10758
- }
10759
- // Explicit side set by the user
10760
- return preference;
10761
- }
10762
- /**
10763
- * Calculates side using the connector's internal position relative to the node host.
10764
- * Delegates to `CalculateConnectableSideByInternalPositionRequest`.
10765
- *
10766
- * @param connector - Current connector.
10767
- * @returns {EFConnectableSide}
10768
- */
10769
- _resolveSideByInternalPosition(connector) {
10770
- return this._mediator.execute(new CalculateConnectableSideByInternalPositionRequest(connector));
10771
- }
10772
- /**
10773
- * Calculates side using average positions of connectors connected to the given connector.
10774
- * Delegates to `CalculateConnectableSideByConnectedPositionsRequest`.
10775
- *
10776
- * @param connector - Current connector.
10777
- * @returns {EFConnectableSide}
10778
- */
10779
- _resolveSideByConnectedPositions(connector) {
10780
- return this._mediator.execute(new CalculateConnectableSideByConnectedPositionsRequest(connector));
11028
+ let RemoveOutputFromStoreExecution = class RemoveOutputFromStoreExecution {
11029
+ _store = inject(FComponentsStore);
11030
+ handle(request) {
11031
+ this._store.removeComponent(this._store.fOutputs, request.fComponent);
10781
11032
  }
10782
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodeConnectorsConnectableSides, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10783
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodeConnectorsConnectableSides });
11033
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutputFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11034
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutputFromStoreExecution });
10784
11035
  };
10785
- CalculateNodeConnectorsConnectableSides = __decorate([
10786
- FExecutionRegister(CalculateNodeConnectorsConnectableSidesRequest)
10787
- ], CalculateNodeConnectorsConnectableSides);
10788
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodeConnectorsConnectableSides, decorators: [{
11036
+ RemoveOutputFromStoreExecution = __decorate([
11037
+ FExecutionRegister(RemoveOutputFromStoreRequest)
11038
+ ], RemoveOutputFromStoreExecution);
11039
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveOutputFromStoreExecution, decorators: [{
10789
11040
  type: Injectable
10790
11041
  }] });
10791
11042
 
10792
- class CalculateNodesBoundingBoxRequest {
10793
- static fToken = Symbol('CalculateNodesBoundingBoxRequest');
11043
+ class UnmarkConnectableConnectorsRequest {
11044
+ connectors;
11045
+ static fToken = Symbol('UnmarkConnectableConnectorsRequest');
11046
+ constructor(connectors) {
11047
+ this.connectors = connectors;
11048
+ }
10794
11049
  }
10795
11050
 
10796
11051
  /**
10797
- * Execution that calculates the bounding box of all nodes in the FComponentsStore.
10798
- * It retrieves the rectangles of each node's host element and computes their union.
11052
+ * Execution that unmarks connectors as connectable.
10799
11053
  */
10800
- let CalculateNodesBoundingBox = class CalculateNodesBoundingBox {
11054
+ let UnmarkConnectableConnectors = class UnmarkConnectableConnectors {
10801
11055
  _store = inject(FComponentsStore);
10802
- handle(request) {
10803
- return RectExtensions.union(this._getNodesRects());
10804
- }
10805
- _getNodesRects() {
10806
- return this._store.fNodes.map((x) => this._getElementRect(x.hostElement));
11056
+ handle({ connectors }) {
11057
+ this._store.flowHost.classList.remove(F_CSS_CLASS.DRAG_AND_DROP.CONNECTIONS_DRAGGING);
11058
+ connectors.forEach((x) => this._unmarkConnector(x));
10807
11059
  }
10808
- _getElementRect(element) {
10809
- return RectExtensions.fromElement(element);
11060
+ _unmarkConnector({ hostElement }) {
11061
+ hostElement.classList.remove(F_CSS_CLASS.CONNECTOR.CONNECTABLE);
10810
11062
  }
10811
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBox, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10812
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBox });
11063
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UnmarkConnectableConnectors, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11064
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UnmarkConnectableConnectors });
10813
11065
  };
10814
- CalculateNodesBoundingBox = __decorate([
10815
- FExecutionRegister(CalculateNodesBoundingBoxRequest)
10816
- ], CalculateNodesBoundingBox);
10817
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBox, decorators: [{
11066
+ UnmarkConnectableConnectors = __decorate([
11067
+ FExecutionRegister(UnmarkConnectableConnectorsRequest)
11068
+ ], UnmarkConnectableConnectors);
11069
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UnmarkConnectableConnectors, decorators: [{
10818
11070
  type: Injectable
10819
11071
  }] });
10820
11072
 
10821
- class CalculateNodesBoundingBoxNormalizedPositionRequest {
10822
- fNodes;
10823
- static fToken = Symbol('CalculateNodesBoundingBoxNormalizedPositionRequest');
10824
- constructor(fNodes) {
10825
- this.fNodes = fNodes;
11073
+ /*
11074
+ * This file exports all the connector-related executions that can be used in the FFlow domain.
11075
+ */
11076
+ const F_CONNECTORS_FEATURES = [
11077
+ AddInputToStore,
11078
+ AddOutletToStore,
11079
+ AddOutputToStore,
11080
+ CalculateClosestConnector,
11081
+ FindConnectableConnectorUsingPriorityAndPositionExecution,
11082
+ CalculateSourceConnectorsToConnect,
11083
+ CalculateTargetConnectorsToConnect,
11084
+ GetConnectorAndRect,
11085
+ MarkConnectableConnectors,
11086
+ RemoveInputFromStore,
11087
+ RemoveOutletFromStoreExecution,
11088
+ RemoveOutputFromStoreExecution,
11089
+ UnmarkConnectableConnectors,
11090
+ ];
11091
+
11092
+ class AddFlowToStoreRequest {
11093
+ fComponent;
11094
+ static fToken = Symbol('AddFlowToStoreRequest');
11095
+ constructor(fComponent) {
11096
+ this.fComponent = fComponent;
10826
11097
  }
10827
11098
  }
10828
11099
 
10829
11100
  /**
10830
- * Execution that calculates the bounding box of all nodes in the FComponentsStore
10831
- * and returns their normalized positions.
10832
- * It retrieves the rectangles of each node's host element and computes their union.
11101
+ * Execution that adds a Flow to the FComponentsStore.
10833
11102
  */
10834
- let CalculateNodesBoundingBoxNormalizedPosition = class CalculateNodesBoundingBoxNormalizedPosition {
11103
+ let AddFlowToStoreExecution = class AddFlowToStoreExecution {
10835
11104
  _store = inject(FComponentsStore);
10836
11105
  handle(request) {
10837
- return RectExtensions.union(this._getNodesRects(request.fNodes || this._store.fNodes));
10838
- }
10839
- _getNodesRects(fNodes) {
10840
- return fNodes.map((x) => {
10841
- return this._getElementRect(x, RectExtensions.fromElement(x.hostElement));
10842
- });
10843
- }
10844
- _getElementRect(fNode, rect) {
10845
- return RectExtensions.initialize(fNode._position.x, fNode._position.y, rect.width, rect.height);
11106
+ this._store.fFlow = request.fComponent;
10846
11107
  }
10847
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBoxNormalizedPosition, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10848
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBoxNormalizedPosition });
11108
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddFlowToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11109
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddFlowToStoreExecution });
10849
11110
  };
10850
- CalculateNodesBoundingBoxNormalizedPosition = __decorate([
10851
- FExecutionRegister(CalculateNodesBoundingBoxNormalizedPositionRequest)
10852
- ], CalculateNodesBoundingBoxNormalizedPosition);
10853
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateNodesBoundingBoxNormalizedPosition, decorators: [{
11111
+ AddFlowToStoreExecution = __decorate([
11112
+ FExecutionRegister(AddFlowToStoreRequest)
11113
+ ], AddFlowToStoreExecution);
11114
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddFlowToStoreExecution, decorators: [{
10854
11115
  type: Injectable
10855
11116
  }] });
10856
11117
 
10857
- class CalculateOutputConnectionsRequest {
10858
- fNode;
10859
- static fToken = Symbol('CalculateOutputConnectionsRequest');
10860
- constructor(fNode) {
10861
- this.fNode = fNode;
10862
- }
11118
+ class GetFlowRequest {
11119
+ static fToken = Symbol('GetFlowRequest');
10863
11120
  }
10864
11121
 
10865
11122
  /**
10866
- * Execution that calculates output connections for a given FNode.
11123
+ * Execution that retrieves the current Flow from the FComponentsStore.
10867
11124
  */
10868
- let CalculateOutputConnections = class CalculateOutputConnections {
11125
+ let GetFlowExecution = class GetFlowExecution {
10869
11126
  _store = inject(FComponentsStore);
10870
11127
  handle(request) {
10871
- return this._calculateConnections(new Set(this._calculateConnectors(request.fNode)));
10872
- }
10873
- _calculateConnectors(fNode) {
10874
- return this._store.fOutputs.filter((x) => fNode.isContains(x.hostElement)).map((x) => x.fId());
10875
- }
10876
- _calculateConnections(ids) {
10877
- return this._store.fConnections.filter((x) => ids.has(x.fOutputId()));
11128
+ const result = this._store.fFlow;
11129
+ if (!result) {
11130
+ throw new Error(`Flow not found in store`);
11131
+ }
11132
+ return result;
10878
11133
  }
10879
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateOutputConnections, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10880
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateOutputConnections });
11134
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11135
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowExecution });
10881
11136
  };
10882
- CalculateOutputConnections = __decorate([
10883
- FExecutionRegister(CalculateOutputConnectionsRequest)
10884
- ], CalculateOutputConnections);
10885
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: CalculateOutputConnections, decorators: [{
11137
+ GetFlowExecution = __decorate([
11138
+ FExecutionRegister(GetFlowRequest)
11139
+ ], GetFlowExecution);
11140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowExecution, decorators: [{
10886
11141
  type: Injectable
10887
11142
  }] });
10888
11143
 
10889
- class FitToChildNodesAndGroupsRequest {
10890
- nodeOrGroup;
10891
- static fToken = Symbol('FitToChildNodesAndGroupsRequest');
10892
- constructor(nodeOrGroup) {
10893
- this.nodeOrGroup = nodeOrGroup;
10894
- }
10895
- }
10896
-
10897
- class GetNodePaddingRequest {
10898
- fNode;
10899
- rect;
10900
- static fToken = Symbol('GetNodePaddingRequest');
10901
- constructor(fNode, rect) {
10902
- this.fNode = fNode;
10903
- this.rect = rect;
10904
- }
11144
+ class GetFlowHostElementRequest {
11145
+ static fToken = Symbol('GetFlowHostElementRequest');
10905
11146
  }
10906
11147
 
10907
11148
  /**
10908
- * Execution that retrieves the padding data of a Node.
10909
- * If the Node does not include padding, it returns [0, 0, 0, 0].
11149
+ * Execution that retrieves the Flow host element from the FComponentsStore.
10910
11150
  */
10911
- let GetNodePadding = class GetNodePadding {
10912
- _browser = inject(BrowserService);
10913
- handle(request) {
10914
- return request.fNode.fIncludePadding() ? this.getPaddingData(request.fNode, request.rect) : [0, 0, 0, 0];
10915
- }
10916
- getPaddingData(node, rect) {
10917
- const style = this._browser.window.getComputedStyle(node.hostElement);
10918
- return [
10919
- this._browser.toPixels(style.paddingLeft, rect.width, rect.height, style.fontSize),
10920
- this._browser.toPixels(style.paddingTop, rect.width, rect.height, style.fontSize),
10921
- this._browser.toPixels(style.paddingRight, rect.width, rect.height, style.fontSize),
10922
- this._browser.toPixels(style.paddingBottom, rect.width, rect.height, style.fontSize),
10923
- ];
11151
+ let GetFlowHostElementExecution = class GetFlowHostElementExecution {
11152
+ _store = inject(FComponentsStore);
11153
+ handle() {
11154
+ return this._store.flowHost;
10924
11155
  }
10925
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNodePadding, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10926
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNodePadding });
11156
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowHostElementExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11157
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowHostElementExecution });
10927
11158
  };
10928
- GetNodePadding = __decorate([
10929
- FExecutionRegister(GetNodePaddingRequest)
10930
- ], GetNodePadding);
10931
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNodePadding, decorators: [{
11159
+ GetFlowHostElementExecution = __decorate([
11160
+ FExecutionRegister(GetFlowHostElementRequest)
11161
+ ], GetFlowHostElementExecution);
11162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowHostElementExecution, decorators: [{
10932
11163
  type: Injectable
10933
11164
  }] });
10934
11165
 
10935
- let FitToChildNodesAndGroups = class FitToChildNodesAndGroups {
10936
- _mediator = inject(FMediator);
11166
+ class GetFlowStateConnectionsRequest {
11167
+ static fToken = Symbol('GetFlowStateConnectionsRequest');
11168
+ }
11169
+
11170
+ /**
11171
+ * Execution that retrieves the current Flow state connections from the FComponentsStore.
11172
+ */
11173
+ let GetFlowStateConnectionsExecution = class GetFlowStateConnectionsExecution {
10937
11174
  _store = inject(FComponentsStore);
10938
- get _nodes() {
10939
- return this._store.fNodes;
10940
- }
10941
- handle({ nodeOrGroup }) {
10942
- if (nodeOrGroup.fAutoSizeToFitChildren()) {
10943
- const directChildren = this._calculateDirectChildren(nodeOrGroup);
10944
- if (directChildren.length) {
10945
- const currentBounding = this._boundingRect(nodeOrGroup);
10946
- const childrenBounding = this._calculateChildrenBounding(directChildren, this._paddings(nodeOrGroup, currentBounding));
10947
- nodeOrGroup.updatePosition(childrenBounding);
10948
- nodeOrGroup.updateSize(childrenBounding);
10949
- nodeOrGroup.redraw();
10950
- }
10951
- }
10952
- const parent = nodeOrGroup.fParentId();
10953
- if (!parent) {
10954
- return;
10955
- }
10956
- const parentNode = this._nodes.find(x => x.fId() === parent);
10957
- if (!parentNode) {
10958
- return;
10959
- }
10960
- this._mediator.execute(new FitToChildNodesAndGroupsRequest(parentNode));
10961
- }
10962
- _calculateDirectChildren(nodeOrGroup) {
10963
- return this._nodes.filter(x => x.fParentId() === nodeOrGroup.fId());
10964
- }
10965
- _unionRect(nodeOrGroups) {
10966
- return RectExtensions.union(nodeOrGroups.map((x) => this._boundingRect(x))) || RectExtensions.initialize();
10967
- }
10968
- _boundingRect(nodeOrGroup) {
10969
- return this._mediator.execute(new GetNormalizedElementRectRequest(nodeOrGroup.hostElement));
10970
- }
10971
- _paddings(nodeOrGroup, rect) {
10972
- return this._mediator.execute(new GetNodePaddingRequest(nodeOrGroup, rect));
11175
+ handle(_request) {
11176
+ return this._store.fConnections.map(this._mapToConnectionState);
10973
11177
  }
10974
- _calculateChildrenBounding(directChildren, [top, right, bottom, left]) {
10975
- let childrenBounding = this._unionRect(directChildren);
10976
- childrenBounding = RectExtensions.initialize(childrenBounding.x - left, childrenBounding.y - top, childrenBounding.width + left + right, childrenBounding.height + top + bottom);
10977
- return childrenBounding;
11178
+ _mapToConnectionState(x) {
11179
+ return {
11180
+ id: x.fId(),
11181
+ fOutputId: x.fOutputId(),
11182
+ fInputId: x.fInputId(),
11183
+ fType: x.fType,
11184
+ fBehavior: x.fBehavior,
11185
+ isSelected: x.isSelected(),
11186
+ };
10978
11187
  }
10979
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FitToChildNodesAndGroups, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
10980
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FitToChildNodesAndGroups });
11188
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateConnectionsExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11189
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateConnectionsExecution });
10981
11190
  };
10982
- FitToChildNodesAndGroups = __decorate([
10983
- FExecutionRegister(FitToChildNodesAndGroupsRequest)
10984
- ], FitToChildNodesAndGroups);
10985
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FitToChildNodesAndGroups, decorators: [{
11191
+ GetFlowStateConnectionsExecution = __decorate([
11192
+ FExecutionRegister(GetFlowStateConnectionsRequest)
11193
+ ], GetFlowStateConnectionsExecution);
11194
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateConnectionsExecution, decorators: [{
10986
11195
  type: Injectable
10987
11196
  }] });
10988
-
10989
- class GetChildNodeIdsRequest {
10990
- id;
10991
- static fToken = Symbol('GetChildNodeIdsRequest');
10992
- constructor(id) {
10993
- this.id = id;
11197
+
11198
+ class GetFlowStateNodesRequest {
11199
+ type;
11200
+ static fToken = Symbol('GetFlowStateNodesRequest');
11201
+ constructor(type) {
11202
+ this.type = type;
10994
11203
  }
10995
11204
  }
10996
11205
 
10997
11206
  /**
10998
- * Execution that retrieves all child nodes of a given node in the Flow.
11207
+ * Execution that retrieves the state of Flow nodes, including their position, size, inputs, outputs, and selection status.
10999
11208
  */
11000
- let GetChildNodeIds = class GetChildNodeIds {
11209
+ let GetFlowStateNodesExecution = class GetFlowStateNodesExecution {
11001
11210
  _store = inject(FComponentsStore);
11002
- get _allNodesAndGroups() {
11003
- return this._store.fNodes;
11004
- }
11005
11211
  handle(request) {
11006
- if (!request.id) {
11007
- return [];
11008
- }
11009
- const visited = new Set();
11010
- const result = [];
11011
- this._collectDescendants(request.id, result, visited);
11012
- return result;
11212
+ return this._store.fNodes
11213
+ .filter((x) => x instanceof request.type)
11214
+ .map((x) => {
11215
+ return {
11216
+ id: x.fId(),
11217
+ parent: x.fParentId(),
11218
+ position: x._position,
11219
+ size: x._size,
11220
+ rotate: x._rotate,
11221
+ fOutputs: this._getOutputs(x.hostElement),
11222
+ fInputs: this._getInputs(x.hostElement),
11223
+ isSelected: x.isSelected(),
11224
+ };
11225
+ });
11013
11226
  }
11014
- _collectDescendants(nodeId, result, visited) {
11015
- if (visited.has(nodeId)) {
11016
- throw new Error(`Circular reference detected in the node hierarchy. Node id: ${nodeId}`);
11017
- }
11018
- visited.add(nodeId);
11019
- const children = this._allNodesAndGroups.filter(n => n.fParentId() === nodeId).map((x) => x.fId());
11020
- result.push(...children);
11021
- for (const id of children) {
11022
- this._collectDescendants(id, result, visited);
11023
- }
11227
+ _getOutputs(hostElement) {
11228
+ return this._store.fOutputs
11229
+ .filter((x) => hostElement.contains(x.hostElement))
11230
+ .map((x) => {
11231
+ return {
11232
+ id: x.fId(),
11233
+ fConnectableSide: x.fConnectableSide,
11234
+ };
11235
+ });
11024
11236
  }
11025
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetChildNodeIds, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11026
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetChildNodeIds });
11237
+ _getInputs(hostElement) {
11238
+ return this._store.fInputs
11239
+ .filter((x) => hostElement.contains(x.hostElement))
11240
+ .map((x) => {
11241
+ return {
11242
+ id: x.fId(),
11243
+ fConnectableSide: x.fConnectableSide,
11244
+ };
11245
+ });
11246
+ }
11247
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateNodesExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11248
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateNodesExecution });
11027
11249
  };
11028
- GetChildNodeIds = __decorate([
11029
- FExecutionRegister(GetChildNodeIdsRequest)
11030
- ], GetChildNodeIds);
11031
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetChildNodeIds, decorators: [{
11250
+ GetFlowStateNodesExecution = __decorate([
11251
+ FExecutionRegister(GetFlowStateNodesRequest)
11252
+ ], GetFlowStateNodesExecution);
11253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateNodesExecution, decorators: [{
11032
11254
  type: Injectable
11033
11255
  }] });
11034
11256
 
11035
- class GetNodesRequest {
11036
- static fToken = Symbol('GetNodesRequest');
11257
+ class GetFlowStateRequest {
11258
+ static fToken = Symbol('GetFlowStateRequest');
11037
11259
  }
11038
11260
 
11039
11261
  /**
11040
- * Execution that retrieves all nodes from the FComponentsStore.
11262
+ * Execution that retrieves the current state of the Flow, including its position, scale, nodes, groups, and connections.
11041
11263
  */
11042
- let GetNodes = class GetNodes {
11264
+ let GetFlowStateExecution = class GetFlowStateExecution {
11265
+ _mediator = inject(FMediator);
11043
11266
  _store = inject(FComponentsStore);
11044
- handle(request) {
11045
- return this._store.fNodes;
11267
+ handle(payload) {
11268
+ return {
11269
+ position: this._getCanvasPosition(this._store.fCanvas.transform),
11270
+ scale: this._store.fCanvas.transform.scale,
11271
+ nodes: this._mediator.execute(new GetFlowStateNodesRequest(FNodeDirective)),
11272
+ groups: this._mediator.execute(new GetFlowStateNodesRequest(FGroupDirective)),
11273
+ connections: this._mediator.execute(new GetFlowStateConnectionsRequest()),
11274
+ };
11275
+ }
11276
+ _getCanvasPosition(transform) {
11277
+ return PointExtensions.sum(transform.position, transform.scaledPosition);
11046
11278
  }
11047
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNodes, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11048
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNodes });
11279
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11280
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateExecution });
11049
11281
  };
11050
- GetNodes = __decorate([
11051
- FExecutionRegister(GetNodesRequest)
11052
- ], GetNodes);
11053
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetNodes, decorators: [{
11282
+ GetFlowStateExecution = __decorate([
11283
+ FExecutionRegister(GetFlowStateRequest)
11284
+ ], GetFlowStateExecution);
11285
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetFlowStateExecution, decorators: [{
11054
11286
  type: Injectable
11055
11287
  }] });
11056
11288
 
11057
- class GetParentNodesRequest {
11058
- fNode;
11059
- static fToken = Symbol('GetParentNodesRequest');
11060
- constructor(fNode) {
11061
- this.fNode = fNode;
11062
- }
11289
+ /**
11290
+ * Providers for retrieving the current Flow state, including nodes, groups, and connections.
11291
+ */
11292
+ const GET_FLOW_STATE_PROVIDERS = [
11293
+ GetFlowStateExecution,
11294
+ GetFlowStateNodesExecution,
11295
+ GetFlowStateConnectionsExecution,
11296
+ ];
11297
+
11298
+ class RemoveFlowFromStoreRequest {
11299
+ static fToken = Symbol('RemoveFlowFromStoreRequest');
11063
11300
  }
11064
11301
 
11065
11302
  /**
11066
- * Execution that retrieves all parent nodes of a given node from the FComponentsStore.
11303
+ * Execution that removes a Flow from the FComponentsStore.
11067
11304
  */
11068
- let GetParentNodes = class GetParentNodes {
11305
+ let RemoveFlowFromStoreExecution = class RemoveFlowFromStoreExecution {
11069
11306
  _store = inject(FComponentsStore);
11070
11307
  handle(request) {
11071
- return this._getParentNodes(request.fNode, new Set(), []);
11072
- }
11073
- _getParentNodes(fNode, visited, result) {
11074
- if (visited.has(fNode.fId())) {
11075
- throw new Error('Circular reference detected in the node hierarchy. Node id: ' + fNode.fId());
11076
- }
11077
- visited.add(fNode.fId());
11078
- const parent = this._store.fNodes.find((x) => x.fId() === fNode.fParentId());
11079
- if (!parent) {
11080
- return result;
11081
- }
11082
- result.push(parent);
11083
- return this._getParentNodes(parent, visited, result);
11308
+ this._store.fFlow = undefined;
11084
11309
  }
11085
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetParentNodes, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11086
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetParentNodes });
11310
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveFlowFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11311
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveFlowFromStoreExecution });
11087
11312
  };
11088
- GetParentNodes = __decorate([
11089
- FExecutionRegister(GetParentNodesRequest)
11090
- ], GetParentNodes);
11091
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: GetParentNodes, decorators: [{
11313
+ RemoveFlowFromStoreExecution = __decorate([
11314
+ FExecutionRegister(RemoveFlowFromStoreRequest)
11315
+ ], RemoveFlowFromStoreExecution);
11316
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveFlowFromStoreExecution, decorators: [{
11092
11317
  type: Injectable
11093
11318
  }] });
11094
11319
 
11095
- class UpdateNodeWhenStateOrSizeChangedRequest {
11096
- nodeOrGroup;
11097
- destroyRef;
11098
- static fToken = Symbol('UpdateNodeWhenStateOrSizeChangedRequest');
11099
- constructor(nodeOrGroup, destroyRef) {
11100
- this.nodeOrGroup = nodeOrGroup;
11101
- this.destroyRef = destroyRef;
11320
+ /**
11321
+ * Providers for managing the Flow in the FComponentsStore.
11322
+ * This includes adding, retrieving, and removing the Flow,
11323
+ * as well as getting the Flow host element and its state.
11324
+ */
11325
+ const F_FLOW_FEATURES = [
11326
+ AddFlowToStoreExecution,
11327
+ GetFlowExecution,
11328
+ GetFlowHostElementExecution,
11329
+ ...GET_FLOW_STATE_PROVIDERS,
11330
+ RemoveFlowFromStoreExecution,
11331
+ ];
11332
+
11333
+ class AddLineAlignmentToStoreRequest {
11334
+ fComponent;
11335
+ static fToken = Symbol('AddLineAlignmentToStoreRequest');
11336
+ constructor(fComponent) {
11337
+ this.fComponent = fComponent;
11102
11338
  }
11103
11339
  }
11104
11340
 
11105
11341
  /**
11106
- * Execution that updates a node's connectors when its state or size changes.
11342
+ * Execution that adds a line alignment to the FComponentsStore.
11107
11343
  */
11108
- let UpdateNodeWhenStateOrSizeChanged = class UpdateNodeWhenStateOrSizeChanged {
11109
- _mediator = inject(FMediator);
11110
- /**
11111
- * Handles the request to update the node's connectors based on state or size changes.
11112
- * It listens for resize events and recalculates the connectable sides of the connectors.
11113
- * @param request
11114
- */
11115
- handle({ nodeOrGroup, destroyRef }) {
11116
- const { hostElement, stateChanges } = nodeOrGroup;
11117
- new FChannelHub(new FResizeChannel(hostElement), stateChanges)
11118
- .pipe(notifyOnStart(), debounceTime(10))
11119
- .listen(destroyRef, () => {
11120
- this._mediator.execute(new NotifyDataChangedRequest());
11121
- if (!this._isDragging()) {
11122
- this._mediator.execute(new CalculateNodeConnectorsConnectableSidesRequest(nodeOrGroup));
11123
- this._mediator.execute(new FitToChildNodesAndGroupsRequest(nodeOrGroup));
11124
- }
11125
- });
11126
- }
11127
- _isDragging() {
11128
- return this._mediator.execute(new IsDragStartedRequest());
11344
+ let AddLineAlignmentToStoreExecution = class AddLineAlignmentToStoreExecution {
11345
+ _store = inject(FComponentsStore);
11346
+ handle(request) {
11347
+ this._store.fLineAlignment = request.fComponent;
11129
11348
  }
11130
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UpdateNodeWhenStateOrSizeChanged, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11131
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UpdateNodeWhenStateOrSizeChanged });
11349
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddLineAlignmentToStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11350
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddLineAlignmentToStoreExecution });
11132
11351
  };
11133
- UpdateNodeWhenStateOrSizeChanged = __decorate([
11134
- FExecutionRegister(UpdateNodeWhenStateOrSizeChangedRequest)
11135
- ], UpdateNodeWhenStateOrSizeChanged);
11136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UpdateNodeWhenStateOrSizeChanged, decorators: [{
11352
+ AddLineAlignmentToStoreExecution = __decorate([
11353
+ FExecutionRegister(AddLineAlignmentToStoreRequest)
11354
+ ], AddLineAlignmentToStoreExecution);
11355
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AddLineAlignmentToStoreExecution, decorators: [{
11137
11356
  type: Injectable
11138
11357
  }] });
11139
11358
 
11140
- class RemoveNodeFromStoreRequest {
11141
- fComponent;
11142
- static fToken = Symbol('RemoveNodeFromStoreRequest');
11143
- constructor(fComponent) {
11144
- this.fComponent = fComponent;
11145
- }
11359
+ class RemoveLineAlignmentFromStoreRequest {
11360
+ static fToken = Symbol('RemoveLineAlignmentFromStoreRequest');
11146
11361
  }
11147
11362
 
11148
11363
  /**
11149
- * Execution that removes a node from the FComponentsStore.
11364
+ * Execution that removes a line alignment from the FComponentsStore.
11150
11365
  */
11151
- let RemoveNodeFromStore = class RemoveNodeFromStore {
11366
+ let RemoveLineAlignmentFromStoreExecution = class RemoveLineAlignmentFromStoreExecution {
11152
11367
  _store = inject(FComponentsStore);
11153
11368
  handle(request) {
11154
- this._store.removeComponent(this._store.fNodes, request.fComponent);
11369
+ this._store.fLineAlignment = undefined;
11155
11370
  }
11156
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveNodeFromStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11157
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveNodeFromStore });
11371
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveLineAlignmentFromStoreExecution, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
11372
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveLineAlignmentFromStoreExecution });
11158
11373
  };
11159
- RemoveNodeFromStore = __decorate([
11160
- FExecutionRegister(RemoveNodeFromStoreRequest)
11161
- ], RemoveNodeFromStore);
11162
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveNodeFromStore, decorators: [{
11374
+ RemoveLineAlignmentFromStoreExecution = __decorate([
11375
+ FExecutionRegister(RemoveLineAlignmentFromStoreRequest)
11376
+ ], RemoveLineAlignmentFromStoreExecution);
11377
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: RemoveLineAlignmentFromStoreExecution, decorators: [{
11163
11378
  type: Injectable
11164
11379
  }] });
11165
11380
 
11166
11381
  /**
11167
- * This file exports all the node-related executions that can be used in the F-Flow domain.
11382
+ * Collection of all FLineAlignment feature executions.
11383
+ * These executions handle the addition and removal of line alignments
11384
+ * in the FComponentsStore.
11168
11385
  */
11169
- const F_NODE_FEATURES = [
11170
- AddNodeToStore,
11171
- CalculateConnectableSideByConnectedPositions,
11172
- CalculateConnectableSideByInternalPosition,
11173
- CalculateInputConnections,
11174
- CalculateNodeConnectorsConnectableSides,
11175
- CalculateNodesBoundingBox,
11176
- CalculateNodesBoundingBoxNormalizedPosition,
11177
- CalculateOutputConnections,
11178
- FitToChildNodesAndGroups,
11179
- GetChildNodeIds,
11180
- GetNodePadding,
11181
- GetNodes,
11182
- GetParentNodes,
11183
- UpdateNodeWhenStateOrSizeChanged,
11184
- RemoveNodeFromStore,
11386
+ const F_LINE_ALIGNMENT_FEATURES = [
11387
+ AddLineAlignmentToStoreExecution,
11388
+ RemoveLineAlignmentFromStoreExecution,
11185
11389
  ];
11186
11390
 
11187
11391
  class AddZoomToStoreRequest {
@@ -11496,13 +11700,15 @@ function createSVGElement(tag, fBrowser) {
11496
11700
  function isValidEventTrigger(event, fTrigger) {
11497
11701
  return fTrigger(event);
11498
11702
  }
11499
- function defaultEventTrigger(event) {
11703
+ function defaultEventTrigger(_event) {
11500
11704
  return true;
11501
11705
  }
11502
11706
 
11503
11707
  function isMobile() {
11504
- // @ts-ignore
11505
- return /android|iPad|iPhone|iPod/i.test(navigator.userAgent || navigator.vendor || window['opera']);
11708
+ return /android|iPad|iPhone|iPod/i.test(
11709
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
11710
+ // @ts-expect-error
11711
+ navigator.userAgent || navigator.vendor || window['opera']);
11506
11712
  }
11507
11713
 
11508
11714
  function Deprecated(newMethodName, removalVersion = '18.0.0') {
@@ -12433,5 +12639,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
12433
12639
  * Generated bundle index. Do not edit.
12434
12640
  */
12435
12641
 
12436
- export { AddBackgroundToStoreExecution, AddBackgroundToStoreRequest, AddCanvasToStoreExecution, AddCanvasToStoreRequest, AddConnectionForCreateToStoreExecution, AddConnectionForCreateToStoreRequest, AddConnectionMarkerToStoreExecution, AddConnectionMarkerToStoreRequest, AddConnectionToStoreExecution, AddConnectionToStoreRequest, AddDndToStoreExecution, AddDndToStoreRequest, AddFlowToStoreExecution, AddFlowToStoreRequest, AddInputToStore, AddInputToStoreRequest, AddLineAlignmentToStoreExecution, AddLineAlignmentToStoreRequest, AddNodeToStore, AddNodeToStoreRequest, AddOutletToStore, AddOutletToStoreRequest, AddOutputToStore, AddOutputToStoreRequest, AddPatternToBackgroundExecution, AddPatternToBackgroundRequest, AddSnapConnectionToStoreExecution, AddSnapConnectionToStoreRequest, AddZoomToStoreExecution, AddZoomToStoreRequest, ApplyChildResizeConstraints, ApplyChildResizeConstraintsRequest, ApplyParentResizeConstraints, ApplyParentResizeConstraintsRequest, BaseConnectionDragHandler, BuildDragHierarchy, BuildDragHierarchyRequest, BuildDragHierarchyResponse, CANVAS_PROVIDERS, COMMON_PROVIDERS, CONNECTIONS_PROVIDERS, CONNECTION_GRADIENT, CONNECTION_PATH, CONNECTION_TEXT, CREATE_MOVE_NODE_DRAG_MODEL_FROM_SELECTION_PROVIDERS, CalculateCenterBetweenPointsHandler, CalculateCenterBetweenPointsRequest, CalculateChangedRectFromDifference, CalculateChangedRectFromDifferenceRequest, CalculateClosestConnector, CalculateClosestConnectorRequest, CalculateConnectableSideByConnectedPositions, CalculateConnectableSideByConnectedPositionsRequest, CalculateConnectableSideByInternalPosition, CalculateConnectableSideByInternalPositionRequest, CalculateConnectionCenterHandler, CalculateConnectionCenterRequest, CalculateConnectionLineByBehavior, CalculateConnectionLineByBehaviorRequest, CalculateDirectChildrenUnionRect, CalculateDirectChildrenUnionRectRequest, CalculateDragLimits, CalculateDragLimitsRequest, CalculateFlowPointFromMinimapPointExecution, CalculateFlowPointFromMinimapPointRequest, CalculateInputConnections, CalculateInputConnectionsRequest, CalculateNodeConnectorsConnectableSides, CalculateNodeConnectorsConnectableSidesRequest, CalculateNodesBoundingBox, CalculateNodesBoundingBoxNormalizedPosition, CalculateNodesBoundingBoxNormalizedPositionRequest, CalculateNodesBoundingBoxRequest, CalculateOutputConnections, CalculateOutputConnectionsRequest, CalculateResizeLimits, CalculateResizeLimitsRequest, CenterGroupOrNodeExecution, CenterGroupOrNodeRequest, ClearSelectionExecution, ClearSelectionRequest, ConnectionContentLayoutEngine, CreateConnectionMarkersExecution, CreateConnectionMarkersRequest, CreateDragModelFromSelection, CreateDragModelFromSelectionRequest, CreateInputConnectionHandlerAndSetToNodeHandler, CreateInputConnectionHandlerAndSetToNodeHandlerRequest, CreateOutputConnectionHandlerAndSetToNodeHandler, CreateOutputConnectionHandlerAndSetToNodeHandlerRequest, CreateSnapLines, CreateSnapLinesRequest, CreateSummaryDragHandler, CreateSummaryDragHandlerRequest, DRAG_AND_DROP_COMMON_PROVIDERS, Deprecated, DragAndDropBase, DragConstraintPipeline, DropToGroupFinalize, DropToGroupFinalizeRequest, DropToGroupPreparation, DropToGroupPreparationRequest, EFConnectableSide, EFConnectionBehavior, EFConnectionType, EFMarkerType, EFResizeHandleType, EFZoomDirection, EmitSelectionChangeEventExecution, EmitSelectionChangeEventRequest, EndDragSequenceExecution, EndDragSequenceRequest, EventExtensions, ExternalRectConstraint, FBackgroundBase, FBackgroundComponent, FBezierPathBuilder, FCanvasBase, FCanvasChangeEvent, FCanvasComponent, FCanvasDragHandler, FCanvasMoveFinalizeExecution, FCanvasMoveFinalizeRequest, FCanvasMovePreparationExecution, FCanvasMovePreparationRequest, FChannel, FChannelHub, FCirclePatternComponent, FComponentsStore, FConnectionBase, FConnectionCenterDirective, FConnectionComponent, FConnectionContent, FConnectionDragHandleEndComponent, FConnectionDragHandleStartComponent, FConnectionFactory, FConnectionForCreateComponent, FConnectionGradientComponent, FConnectionPathComponent, FConnectionSelectionComponent, FConnectionTextComponent, FConnectionTextPathDirective, FConnectorBase, FCreateConnectionDragHandler, FCreateConnectionDragHandlerPreparationExecution, FCreateConnectionDragHandlerPreparationRequest, FCreateConnectionEvent, FCreateConnectionFinalizeExecution, FCreateConnectionFinalizeRequest, FCreateConnectionFromOutletPreparationExecution, FCreateConnectionFromOutletPreparationRequest, FCreateConnectionFromOutputPreparationExecution, FCreateConnectionFromOutputPreparationRequest, FCreateConnectionPreparationExecution, FCreateConnectionPreparationRequest, FCreateNodeEvent, FDragBlockerDirective, FDragHandleDirective, FDragHandlerResult, FDragStartedEvent, FDraggableBase, FDraggableDataContext, FDraggableDirective, FDropToGroupEvent, FExternalItemBase, FExternalItemCreatePlaceholderExecution, FExternalItemCreatePlaceholderRequest, FExternalItemCreatePreviewExecution, FExternalItemCreatePreviewRequest, FExternalItemDirective, FExternalItemDragHandler, FExternalItemFinalizeExecution, FExternalItemFinalizeRequest, FExternalItemPlaceholderDirective, FExternalItemPreparationExecution, FExternalItemPreparationRequest, FExternalItemPreviewDirective, FExternalItemService, FFlowBase, FFlowComponent, FFlowModule, FGroupDirective, FLineAlignmentBase, FLineAlignmentComponent, FMarkerBase, FMarkerDirective, FMinimapCanvasDirective, FMinimapComponent, FMinimapData, FMinimapDragHandler, FMinimapFlowDirective, FMinimapViewDirective, FMoveNodesEvent, FNodeBase, FNodeDirective, FNodeDropToGroupDragHandler, FNodeInputBase, FNodeInputDirective, FNodeIntersectedWithConnections, FNodeMoveFinalizeExecution, FNodeMoveFinalizeRequest, FNodeMovePreparationExecution, FNodeMovePreparationRequest, FNodeOutletBase, FNodeOutletDirective, FNodeOutputBase, FNodeOutputDirective, FNodeRotateDragHandler, FNodeRotateFinalizeExecution, FNodeRotateFinalizeRequest, FNodeRotatePreparationExecution, FNodeRotatePreparationRequest, FReassignConnectionDragHandler, FReassignConnectionEvent, FReassignConnectionFinalizeExecution, FReassignConnectionFinalizeRequest, FReassignConnectionPreparationExecution, FReassignConnectionPreparationRequest, FReassignSourceDragHandler, FReassignTargetDragHandler, FRectPatternComponent, FResizeChannel, FResizeHandleDirective, FRotateHandleDirective, FSegmentPathBuilder, FSelectionAreaBase, FSelectionAreaComponent, FSelectionChangeEvent, FSingleSelectExecution, FSingleSelectRequest, FSnapConnectionComponent, FSourceConnectorBase, FStraightPathBuilder, FZoomBase, FZoomDirective, F_AFTER_MAIN_PLUGIN, F_BACKGROUND, F_BACKGROUND_FEATURES, F_BACKGROUND_PATTERN, F_BACKGROUND_PROVIDERS, F_BEFORE_MAIN_PLUGIN, F_CANVAS, F_CANVAS_FEATURES, F_CANVAS_PROVIDERS, F_CONNECTION_BUILDERS, 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_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_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, FindConnectableConnectorUsingPriorityAndPositionExecution, FindConnectableConnectorUsingPriorityAndPositionRequest, FitToChildNodesAndGroups, FitToChildNodesAndGroupsRequest, FitToFlowExecution, FitToFlowRequest, GET_FLOW_STATE_PROVIDERS, GetAllCanBeConnectedInputsAndRectsExecution, GetAllCanBeConnectedInputsAndRectsRequest, GetAllCanBeConnectedSourceConnectorsAndRectsExecution, GetAllCanBeConnectedSourceConnectorsAndRectsRequest, GetCanBeSelectedItemsExecution, GetCanBeSelectedItemsRequest, GetCanvasExecution, GetCanvasRequest, GetChildNodeIds, GetChildNodeIdsRequest, GetConnectorAndRect, GetConnectorAndRectRequest, GetCurrentSelectionExecution, GetCurrentSelectionRequest, GetDeepChildrenNodesAndGroupsExecution, GetDeepChildrenNodesAndGroupsRequest, GetElementRoundedRectExecution, GetElementRoundedRectRequest, GetFirstConnectableOutputExecution, GetFirstConnectableOutputRequest, GetFlowExecution, GetFlowHostElementExecution, GetFlowHostElementRequest, GetFlowRequest, GetFlowStateConnectionsExecution, GetFlowStateConnectionsRequest, GetFlowStateExecution, GetFlowStateNodesExecution, GetFlowStateNodesRequest, GetFlowStateRequest, GetNodeBoundingIncludePaddings, GetNodeBoundingIncludePaddingsRequest, GetNodeBoundingIncludePaddingsResponse, GetNodePadding, GetNodePaddingRequest, GetNodes, GetNodesRequest, GetNormalizedConnectorRectExecution, GetNormalizedConnectorRectRequest, GetNormalizedElementRectExecution, GetNormalizedElementRectRequest, GetNormalizedParentNodeRectExecution, GetNormalizedParentNodeRectRequest, GetNormalizedPointExecution, GetNormalizedPointRequest, GetParentNodes, GetParentNodesRequest, IMouseEvent, IPointerEvent, IPointerUpEvent, ITouchDownEvent, ITouchMoveEvent, InitializeDragSequenceExecution, InitializeDragSequenceRequest, InputCanvasPositionExecution, InputCanvasPositionRequest, InputCanvasScaleExecution, InputCanvasScaleRequest, IsArrayHasParentNodeExecution, IsArrayHasParentNodeRequest, IsConnectionUnderNodeExecution, IsConnectionUnderNodeRequest, IsDragStarted, IsDragStartedRequest, ListenCountChangesExecution, ListenCountChangesRequest, ListenDataChangesExecution, ListenDataChangesRequest, ListenTransformChangesExecution, ListenTransformChangesRequest, LogExecutionTime, MINIMAP_DRAG_FINALIZE_PROVIDERS, MINIMAP_DRAG_PREPARATION_PROVIDERS, MOUSE_EVENT_IGNORE_TIME, MarkConnectableConnectors, MarkConnectableConnectorsRequest, MinimapCalculateSvgScaleAndViewBoxExecution, MinimapCalculateSvgScaleAndViewBoxRequest, MinimapCalculateViewBoxExecution, MinimapCalculateViewBoxRequest, MinimapDragFinalizeExecution, MinimapDragFinalizeRequest, MinimapDragPreparationExecution, MinimapDragPreparationRequest, MinimapDrawNodesExecution, MinimapDrawNodesRequest, MoveDragHandler, MoveFrontElementsBeforeTargetElementExecution, MoveFrontElementsBeforeTargetElementRequest, MoveSummaryDragHandler, NODE_DROP_TO_GROUP_PROVIDERS, NODE_PROVIDERS, NODE_RESIZE_PROVIDERS, NODE_ROTATE_PROVIDERS, NodeResizeDragHandler, NodeResizeFinalize, NodeResizeFinalizeRequest, NodeResizePreparation, NodeResizePreparationRequest, NotifyDataChangedExecution, NotifyDataChangedRequest, NotifyTransformChangedExecution, NotifyTransformChangedRequest, OnPointerMoveExecution, OnPointerMoveRequest, Polyline, PolylineContentAlign, PolylineContentPlace, PolylineSampler, PrepareDragSequenceExecution, PrepareDragSequenceRequest, PreventDefaultIsExternalItemExecution, PreventDefaultIsExternalItemRequest, RESIZE_DIRECTIONS, RectConstraint, RedrawCanvasWithAnimationExecution, RedrawCanvasWithAnimationRequest, RedrawConnectionsExecution, RedrawConnectionsRequest, RemoveBackgroundFromStoreExecution, RemoveBackgroundFromStoreRequest, RemoveCanvasFromStoreExecution, RemoveCanvasFromStoreRequest, RemoveConnectionForCreateFromStoreExecution, RemoveConnectionForCreateFromStoreRequest, RemoveConnectionFromStoreExecution, RemoveConnectionFromStoreRequest, RemoveConnectionMarkerFromStoreExecution, RemoveConnectionMarkerFromStoreRequest, RemoveDndFromStoreExecution, RemoveDndFromStoreRequest, RemoveFlowFromStoreExecution, RemoveFlowFromStoreRequest, RemoveInputFromStore, RemoveInputFromStoreRequest, RemoveLineAlignmentFromStoreExecution, RemoveLineAlignmentFromStoreRequest, RemoveNodeFromStore, 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, SnapLineElement, SnapLineService, SnapLinesDragHandler, SnapToGrid, SortContainersForDropByLayer, SortContainersForDropByLayerRequest, SortItemLayersExecution, SortItemLayersRequest, SortItemsByParentExecution, SortItemsByParentRequest, SortNodeLayersExecution, SortNodeLayersRequest, SourceConnectionDragHandler, SourceTargetConnectionDragHandler, StartDragSequenceExecution, StartDragSequenceRequest, TargetConnectionDragHandler, UnmarkConnectableConnectors, UnmarkConnectableConnectorsRequest, UpdateItemAndChildrenLayersExecution, UpdateItemAndChildrenLayersRequest, UpdateNodeWhenStateOrSizeChanged, UpdateNodeWhenStateOrSizeChangedRequest, UpdateScaleExecution, UpdateScaleRequest, createSVGElement, debounceTime, defaultEventTrigger, expandRectFromBaseline, fixedCenterBehavior, fixedOutboundBehavior, floatingBehavior, getExternalItem, getMarkerEndId, getMarkerSelectedEndId, getMarkerSelectedStartId, getMarkerStartId, infinityMinMax, isClosestConnectorInsideSnapThreshold, isDragBlocker, isDragHandleEnd, isDragHandleStart, isExternalItem, isMobile, isNode, isNodeOutlet, isNodeOutput, isPointerInsideStartOrEndDragHandles, isRotateHandle, isValidEventTrigger, mixinChangeSelection, mixinChangeVisibility, notifyOnStart, roundedRectFromPoint, stringAttribute, transitionEnd };
12642
+ export { AddBackgroundToStoreExecution, AddBackgroundToStoreRequest, AddCanvasToStoreExecution, AddCanvasToStoreRequest, AddConnectionForCreateToStoreExecution, AddConnectionForCreateToStoreRequest, AddConnectionMarkerToStoreExecution, AddConnectionMarkerToStoreRequest, AddConnectionToStoreExecution, AddConnectionToStoreRequest, AddDndToStoreExecution, AddDndToStoreRequest, AddFlowToStoreExecution, AddFlowToStoreRequest, AddInputToStore, AddInputToStoreRequest, AddLineAlignmentToStoreExecution, AddLineAlignmentToStoreRequest, AddNodeToStore, AddNodeToStoreRequest, AddOutletToStore, AddOutletToStoreRequest, AddOutputToStore, AddOutputToStoreRequest, AddPatternToBackgroundExecution, AddPatternToBackgroundRequest, AddSnapConnectionToStoreExecution, AddSnapConnectionToStoreRequest, AddZoomToStoreExecution, AddZoomToStoreRequest, ApplyChildResizeConstraints, ApplyChildResizeConstraintsRequest, ApplyParentResizeConstraints, ApplyParentResizeConstraintsRequest, BaseConnectionDragHandler, BuildDragHierarchy, BuildDragHierarchyRequest, BuildDragHierarchyResponse, CALCULATABLE_SIDES, CANVAS_PROVIDERS, COMMON_PROVIDERS, CONNECTABLE_SIDE_EPSILON, CONNECTIONS_PROVIDERS, CONNECTION_GRADIENT, CONNECTION_PATH, CONNECTION_TEXT, CREATE_MOVE_NODE_DRAG_MODEL_FROM_SELECTION_PROVIDERS, CalculateCenterBetweenPointsHandler, CalculateCenterBetweenPointsRequest, CalculateChangedRectFromDifference, CalculateChangedRectFromDifferenceRequest, CalculateClosestConnector, CalculateClosestConnectorRequest, CalculateConnectableSideByConnectedPositions, CalculateConnectableSideByConnectedPositionsRequest, CalculateConnectableSideByInternalPosition, CalculateConnectableSideByInternalPositionRequest, CalculateConnectionCenterHandler, CalculateConnectionCenterRequest, CalculateConnectionLineByBehavior, CalculateConnectionLineByBehaviorRequest, CalculateConnectorsConnectableSides, CalculateConnectorsConnectableSidesRequest, CalculateDirectChildrenUnionRect, CalculateDirectChildrenUnionRectRequest, CalculateDragLimits, CalculateDragLimitsRequest, CalculateFlowPointFromMinimapPointExecution, CalculateFlowPointFromMinimapPointRequest, CalculateInputConnections, CalculateInputConnectionsRequest, CalculateNodesBoundingBox, CalculateNodesBoundingBoxNormalizedPosition, CalculateNodesBoundingBoxNormalizedPositionRequest, CalculateNodesBoundingBoxRequest, CalculateOutputConnections, CalculateOutputConnectionsRequest, CalculateResizeLimits, CalculateResizeLimitsRequest, CalculateSourceConnectorsToConnect, CalculateSourceConnectorsToConnectRequest, CalculateTargetConnectorsToConnect, CalculateTargetConnectorsToConnectRequest, CenterGroupOrNodeExecution, CenterGroupOrNodeRequest, ClearSelectionExecution, ClearSelectionRequest, ConnectionContentLayoutEngine, CreateConnectionFromOutputPreparation, CreateConnectionFromOutputPreparationRequest, CreateConnectionMarkersExecution, CreateConnectionMarkersRequest, CreateConnectionPreparation, CreateConnectionPreparationRequest, CreateDragModelFromSelection, CreateDragModelFromSelectionRequest, CreateInputConnectionHandlerAndSetToNodeHandler, CreateInputConnectionHandlerAndSetToNodeHandlerRequest, CreateOutputConnectionHandlerAndSetToNodeHandler, CreateOutputConnectionHandlerAndSetToNodeHandlerRequest, CreateSnapLines, CreateSnapLinesRequest, CreateSummaryDragHandler, CreateSummaryDragHandlerRequest, DRAG_AND_DROP_COMMON_PROVIDERS, Deprecated, DragAndDropBase, DragConstraintPipeline, DropToGroupFinalize, DropToGroupFinalizeRequest, DropToGroupPreparation, DropToGroupPreparationRequest, EFConnectableSide, EFConnectionBehavior, EFConnectionType, EFMarkerType, EFResizeHandleType, EFZoomDirection, EmitSelectionChangeEventExecution, EmitSelectionChangeEventRequest, EndDragSequenceExecution, EndDragSequenceRequest, EventExtensions, ExternalRectConstraint, FBackgroundBase, FBackgroundComponent, FBezierPathBuilder, FCanvasBase, FCanvasChangeEvent, FCanvasComponent, FCanvasDragHandler, FCanvasMoveFinalizeExecution, FCanvasMoveFinalizeRequest, FCanvasMovePreparationExecution, FCanvasMovePreparationRequest, FChannel, FChannelHub, FCirclePatternComponent, FComponentsStore, FConnectionBase, FConnectionCenterDirective, FConnectionComponent, FConnectionContent, FConnectionDragHandleEndComponent, FConnectionDragHandleStartComponent, FConnectionFactory, FConnectionForCreateComponent, FConnectionGradientComponent, FConnectionPathComponent, FConnectionSelectionComponent, FConnectionTextComponent, FConnectionTextPathDirective, FConnectorBase, FConnectorsStore, FCreateConnectionDragHandler, FCreateConnectionDragHandlerPreparationExecution, FCreateConnectionDragHandlerPreparationRequest, FCreateConnectionEvent, FCreateConnectionFinalizeExecution, FCreateConnectionFinalizeRequest, FCreateConnectionFromOutletPreparationExecution, FCreateConnectionFromOutletPreparationRequest, FCreateNodeEvent, FDragBlockerDirective, FDragHandleDirective, FDragHandlerResult, FDragStartedEvent, FDraggableBase, FDraggableDataContext, FDraggableDirective, FDropToGroupEvent, FExternalItemBase, FExternalItemCreatePlaceholderExecution, FExternalItemCreatePlaceholderRequest, FExternalItemCreatePreviewExecution, FExternalItemCreatePreviewRequest, FExternalItemDirective, FExternalItemDragHandler, FExternalItemFinalizeExecution, FExternalItemFinalizeRequest, FExternalItemPlaceholderDirective, FExternalItemPreparationExecution, FExternalItemPreparationRequest, FExternalItemPreviewDirective, FExternalItemService, FFlowBase, FFlowComponent, FFlowModule, FGroupDirective, FLineAlignmentBase, FLineAlignmentComponent, FMarkerBase, FMarkerDirective, FMinimapCanvasDirective, FMinimapComponent, FMinimapData, FMinimapDragHandler, FMinimapFlowDirective, FMinimapViewDirective, FMoveNodesEvent, FNodeBase, FNodeDirective, FNodeDropToGroupDragHandler, FNodeInputBase, FNodeInputDirective, FNodeIntersectedWithConnections, FNodeMoveFinalizeExecution, FNodeMoveFinalizeRequest, FNodeMovePreparationExecution, FNodeMovePreparationRequest, FNodeOutletBase, FNodeOutletDirective, FNodeOutputBase, FNodeOutputDirective, FNodeRotateDragHandler, FNodeRotateFinalizeExecution, FNodeRotateFinalizeRequest, FNodeRotatePreparationExecution, FNodeRotatePreparationRequest, FReassignConnectionDragHandler, FReassignConnectionEvent, FReassignConnectionFinalizeExecution, FReassignConnectionFinalizeRequest, FReassignConnectionPreparationExecution, FReassignConnectionPreparationRequest, FReassignSourceDragHandler, FReassignTargetDragHandler, FRectPatternComponent, FResizeChannel, FResizeHandleDirective, FRotateHandleDirective, FSegmentPathBuilder, FSelectionAreaBase, FSelectionAreaComponent, FSelectionChangeEvent, FSingleSelectExecution, FSingleSelectRequest, FSnapConnectionComponent, FSourceConnectorBase, FStraightPathBuilder, FZoomBase, FZoomDirective, F_AFTER_MAIN_PLUGIN, F_BACKGROUND, F_BACKGROUND_FEATURES, F_BACKGROUND_PATTERN, F_BACKGROUND_PROVIDERS, F_BEFORE_MAIN_PLUGIN, F_CANVAS, F_CANVAS_FEATURES, F_CANVAS_PROVIDERS, F_CONNECTION_BUILDERS, 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_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_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, FindConnectableConnectorUsingPriorityAndPositionExecution, FindConnectableConnectorUsingPriorityAndPositionRequest, FitToChildNodesAndGroups, FitToChildNodesAndGroupsRequest, FitToFlowExecution, FitToFlowRequest, GET_FLOW_STATE_PROVIDERS, GetCanBeSelectedItemsExecution, GetCanBeSelectedItemsRequest, GetCanvasExecution, GetCanvasRequest, GetChildNodeIds, GetChildNodeIdsRequest, GetConnectorAndRect, GetConnectorAndRectRequest, GetCurrentSelectionExecution, GetCurrentSelectionRequest, GetDeepChildrenNodesAndGroupsExecution, GetDeepChildrenNodesAndGroupsRequest, GetElementRoundedRectExecution, GetElementRoundedRectRequest, GetFirstConnectableOutputExecution, GetFirstConnectableOutputRequest, GetFlowExecution, GetFlowHostElementExecution, GetFlowHostElementRequest, GetFlowRequest, GetFlowStateConnectionsExecution, GetFlowStateConnectionsRequest, GetFlowStateExecution, GetFlowStateNodesExecution, GetFlowStateNodesRequest, GetFlowStateRequest, GetNodeBoundingIncludePaddings, GetNodeBoundingIncludePaddingsRequest, GetNodeBoundingIncludePaddingsResponse, GetNodePadding, GetNodePaddingRequest, GetNormalizedConnectorRectExecution, GetNormalizedConnectorRectRequest, GetNormalizedElementRectExecution, GetNormalizedElementRectRequest, GetNormalizedParentNodeRectExecution, GetNormalizedParentNodeRectRequest, GetNormalizedPointExecution, GetNormalizedPointRequest, GetParentNodes, GetParentNodesRequest, IMouseEvent, IPointerEvent, IPointerUpEvent, ITouchDownEvent, ITouchMoveEvent, InitializeDragSequenceExecution, InitializeDragSequenceRequest, InputCanvasPositionExecution, InputCanvasPositionRequest, InputCanvasScaleExecution, InputCanvasScaleRequest, IsArrayHasParentNodeExecution, IsArrayHasParentNodeRequest, IsConnectionUnderNodeExecution, IsConnectionUnderNodeRequest, IsDragStarted, IsDragStartedRequest, ListenCountChangesExecution, ListenCountChangesRequest, ListenDataChangesExecution, ListenDataChangesRequest, ListenTransformChangesExecution, ListenTransformChangesRequest, LogExecutionTime, MINIMAP_DRAG_FINALIZE_PROVIDERS, MINIMAP_DRAG_PREPARATION_PROVIDERS, MOUSE_EVENT_IGNORE_TIME, MarkConnectableConnectors, MarkConnectableConnectorsRequest, MinimapCalculateSvgScaleAndViewBoxExecution, MinimapCalculateSvgScaleAndViewBoxRequest, MinimapCalculateViewBoxExecution, MinimapCalculateViewBoxRequest, MinimapDragFinalizeExecution, MinimapDragFinalizeRequest, MinimapDragPreparationExecution, MinimapDragPreparationRequest, MinimapDrawNodesExecution, MinimapDrawNodesRequest, MoveDragHandler, MoveFrontElementsBeforeTargetElementExecution, MoveFrontElementsBeforeTargetElementRequest, MoveSummaryDragHandler, NODE_DROP_TO_GROUP_PROVIDERS, NODE_PROVIDERS, NODE_RESIZE_PROVIDERS, NODE_ROTATE_PROVIDERS, NodeResizeDragHandler, NodeResizeFinalize, NodeResizeFinalizeRequest, NodeResizePreparation, NodeResizePreparationRequest, NotifyDataChangedExecution, NotifyDataChangedRequest, NotifyTransformChangedExecution, NotifyTransformChangedRequest, OnPointerMoveExecution, OnPointerMoveRequest, Polyline, PolylineContentAlign, PolylineContentPlace, PolylineSampler, PrepareDragSequenceExecution, PrepareDragSequenceRequest, PreventDefaultIsExternalItemExecution, PreventDefaultIsExternalItemRequest, RESIZE_DIRECTIONS, RectConstraint, RedrawCanvasWithAnimationExecution, RedrawCanvasWithAnimationRequest, RedrawConnectionsExecution, RedrawConnectionsRequest, RemoveBackgroundFromStoreExecution, RemoveBackgroundFromStoreRequest, RemoveCanvasFromStoreExecution, RemoveCanvasFromStoreRequest, RemoveConnectionForCreateFromStoreExecution, RemoveConnectionForCreateFromStoreRequest, RemoveConnectionFromStoreExecution, RemoveConnectionFromStoreRequest, RemoveConnectionMarkerFromStoreExecution, RemoveConnectionMarkerFromStoreRequest, RemoveDndFromStoreExecution, RemoveDndFromStoreRequest, RemoveFlowFromStoreExecution, RemoveFlowFromStoreRequest, RemoveInputFromStore, RemoveInputFromStoreRequest, RemoveLineAlignmentFromStoreExecution, RemoveLineAlignmentFromStoreRequest, RemoveNodeFromStore, 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, SnapLineElement, SnapLineService, SnapLinesDragHandler, SnapToGrid, SortContainersForDropByLayer, SortContainersForDropByLayerRequest, SortItemLayersExecution, SortItemLayersRequest, SortItemsByParentExecution, SortItemsByParentRequest, SortNodeLayersExecution, SortNodeLayersRequest, SourceConnectionDragHandler, SourceTargetConnectionDragHandler, StartDragSequenceExecution, StartDragSequenceRequest, TargetConnectionDragHandler, UnmarkConnectableConnectors, UnmarkConnectableConnectorsRequest, UpdateItemAndChildrenLayersExecution, UpdateItemAndChildrenLayersRequest, UpdateNodeWhenStateOrSizeChanged, UpdateNodeWhenStateOrSizeChangedRequest, UpdateScaleExecution, UpdateScaleRequest, createSVGElement, debounceTime, defaultEventTrigger, determineSide, expandRectFromBaseline, fixedCenterBehavior, fixedOutboundBehavior, floatingBehavior, getExternalItem, getMarkerEndId, getMarkerSelectedEndId, getMarkerSelectedStartId, getMarkerStartId, infinityMinMax, isCalculateMode, isClosestConnectorInsideSnapThreshold, isDragBlocker, isDragHandleEnd, isDragHandleStart, isExternalItem, isMobile, isNode, isNodeOutlet, isNodeOutput, isPointerInsideStartOrEndDragHandles, isRotateHandle, isValidEventTrigger, mixinChangeSelection, mixinChangeVisibility, notifyOnStart, roundedRectFromPoint, stringAttribute, transitionEnd };
12437
12643
  //# sourceMappingURL=foblex-flow.mjs.map