@foblex/flow 12.1.1 → 12.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/domain/providers.d.ts +1 -1
  2. package/domain/redraw-connections/redraw-connections-request.d.ts +0 -1
  3. package/esm2022/domain/redraw-connections/redraw-connections-request.mjs +1 -3
  4. package/esm2022/f-connection/common/domain/f-bezier.path-builder.mjs +28 -13
  5. package/esm2022/f-connection/common/domain/f-segment.path-builder.mjs +3 -4
  6. package/esm2022/f-connection/common/domain/f-straight.path-builder.mjs +4 -5
  7. package/esm2022/f-connection/common/domain/index.mjs +1 -5
  8. package/esm2022/f-connection/common/f-connection-base.mjs +21 -16
  9. package/esm2022/f-connection/common/f-path/f-connection-path.component.mjs +1 -1
  10. package/esm2022/f-connection/f-connection/f-connection.component.mjs +16 -15
  11. package/esm2022/f-connection/f-connection-builder/f-connection-builders.mjs +3 -0
  12. package/esm2022/f-connection/f-connection-builder/f-connection-factory.mjs +34 -0
  13. package/esm2022/f-connection/f-connection-builder/i-f-connection-builder-request.mjs +2 -0
  14. package/esm2022/f-connection/f-connection-builder/i-f-connection-builder-response.mjs +2 -0
  15. package/esm2022/f-connection/f-connection-builder/i-f-connection-builder.mjs +2 -0
  16. package/esm2022/f-connection/f-connection-builder/i-f-connection-factory-request.mjs +2 -0
  17. package/esm2022/f-connection/f-connection-builder/index.mjs +7 -0
  18. package/esm2022/f-connection/f-connection-for-create/f-connection-for-create.component.mjs +16 -15
  19. package/esm2022/f-connection/index.mjs +2 -1
  20. package/esm2022/f-draggable/connections/find-inputs-under-pointer/find-inputs-under-pointer.handler.mjs +16 -8
  21. package/esm2022/f-draggable/connections/find-inputs-under-pointer/index.mjs +1 -2
  22. package/esm2022/f-draggable/connections/providers.mjs +2 -3
  23. package/esm2022/f-flow/f-flow.component.mjs +4 -1
  24. package/f-connection/common/domain/f-bezier.path-builder.d.ts +4 -5
  25. package/f-connection/common/domain/f-segment.path-builder.d.ts +3 -5
  26. package/f-connection/common/domain/f-straight.path-builder.d.ts +3 -5
  27. package/f-connection/common/domain/index.d.ts +0 -4
  28. package/f-connection/common/f-connection-base.d.ts +4 -3
  29. package/f-connection/f-connection/f-connection.component.d.ts +2 -1
  30. package/f-connection/f-connection-builder/f-connection-builders.d.ts +6 -0
  31. package/f-connection/f-connection-builder/f-connection-factory.d.ts +11 -0
  32. package/f-connection/{common/domain/i-f-path-builder-request.d.ts → f-connection-builder/i-f-connection-builder-request.d.ts} +2 -4
  33. package/f-connection/f-connection-builder/i-f-connection-builder-response.d.ts +5 -0
  34. package/f-connection/f-connection-builder/i-f-connection-builder.d.ts +6 -0
  35. package/f-connection/f-connection-builder/i-f-connection-factory-request.d.ts +6 -0
  36. package/f-connection/f-connection-builder/index.d.ts +6 -0
  37. package/f-connection/f-connection-for-create/f-connection-for-create.component.d.ts +3 -2
  38. package/f-connection/index.d.ts +1 -0
  39. package/f-draggable/connections/find-inputs-under-pointer/find-inputs-under-pointer.handler.d.ts +3 -3
  40. package/f-draggable/connections/find-inputs-under-pointer/index.d.ts +0 -1
  41. package/f-draggable/connections/providers.d.ts +2 -2
  42. package/f-draggable/external-item/providers.d.ts +1 -1
  43. package/f-draggable/node/providers.d.ts +1 -1
  44. package/fesm2022/foblex-flow.mjs +121 -98
  45. package/fesm2022/foblex-flow.mjs.map +1 -1
  46. package/package.json +3 -4
  47. package/esm2022/f-connection/common/domain/f-path-builder-base.mjs +0 -3
  48. package/esm2022/f-connection/common/domain/f-path-builder-selector.mjs +0 -19
  49. package/esm2022/f-connection/common/domain/i-f-path-builder-request.mjs +0 -2
  50. package/esm2022/f-connection/common/domain/i-f-path-builder-response.mjs +0 -2
  51. package/esm2022/f-draggable/connections/find-inputs-under-pointer/inputs-under-pointer/index.mjs +0 -2
  52. package/esm2022/f-draggable/connections/find-inputs-under-pointer/inputs-under-pointer/inputs-under-pointer.handler.mjs +0 -25
  53. package/f-connection/common/domain/f-path-builder-base.d.ts +0 -6
  54. package/f-connection/common/domain/f-path-builder-selector.d.ts +0 -7
  55. package/f-connection/common/domain/i-f-path-builder-response.d.ts +0 -5
  56. package/f-draggable/connections/find-inputs-under-pointer/inputs-under-pointer/index.d.ts +0 -1
  57. package/f-draggable/connections/find-inputs-under-pointer/inputs-under-pointer/inputs-under-pointer.handler.d.ts +0 -12
@@ -1,5 +1,6 @@
1
1
  export * from './common';
2
2
  export * from './f-connection-for-create';
3
3
  export * from './f-connection';
4
+ export * from './f-connection-builder';
4
5
  export * from './f-connection-center';
5
6
  export * from './f-marker';
@@ -1,18 +1,18 @@
1
1
  import { IHandler } from '@foblex/core';
2
2
  import { FindInputsUnderPointerRequest } from './find-inputs-under-pointer.request';
3
3
  import { FComponentsStore } from '../../../f-components-store';
4
- import { InputsUnderPointerHandler } from './inputs-under-pointer';
5
4
  import { FirstNotConnectedInputOfNodeUnderPointerHandler } from './first-not-connected-input-of-node-under-pointer';
6
5
  import { FConnectorBase } from '../../../f-connectors';
7
6
  import * as i0 from "@angular/core";
8
7
  export declare class FindInputsUnderPointerHandler implements IHandler<FindInputsUnderPointerRequest, FConnectorBase[]> {
9
8
  private fComponentsStore;
10
- private inputsUnderPointerHandler;
11
9
  private firstNotConnectedInputOfNodeUnderPointerHandler;
12
10
  private get fNodes();
13
- constructor(fComponentsStore: FComponentsStore, inputsUnderPointerHandler: InputsUnderPointerHandler, firstNotConnectedInputOfNodeUnderPointerHandler: FirstNotConnectedInputOfNodeUnderPointerHandler);
11
+ private get fInputs();
12
+ constructor(fComponentsStore: FComponentsStore, firstNotConnectedInputOfNodeUnderPointerHandler: FirstNotConnectedInputOfNodeUnderPointerHandler);
14
13
  handle(payload: FindInputsUnderPointerRequest): FConnectorBase[];
15
14
  private getInputsUnderPointer;
15
+ private inputsUnderPointer;
16
16
  static ɵfac: i0.ɵɵFactoryDeclaration<FindInputsUnderPointerHandler, never>;
17
17
  static ɵprov: i0.ɵɵInjectableDeclaration<FindInputsUnderPointerHandler>;
18
18
  }
@@ -1,4 +1,3 @@
1
1
  export * from './first-not-connected-input-of-node-under-pointer';
2
- export * from './inputs-under-pointer';
3
2
  export * from './find-inputs-under-pointer.request';
4
3
  export * from './find-inputs-under-pointer.handler';
@@ -1,4 +1,4 @@
1
1
  import { CreateConnectionOnPointerUp, CreateConnectionPrepareDragSequence, FindFirstCanBeConnectedOutputByOutletHandler } from './create-connection';
2
- import { FindInputsUnderPointerHandler, FirstNotConnectedInputOfNodeUnderPointerHandler, InputsUnderPointerHandler } from './find-inputs-under-pointer';
2
+ import { FindInputsUnderPointerHandler, FirstNotConnectedInputOfNodeUnderPointerHandler } from './find-inputs-under-pointer';
3
3
  import { ReassignConnectionOnPointerUp, ReassignConnectionPrepareDragSequence } from './reassign-connection';
4
- export declare const CONNECTIONS_PROVIDERS: (typeof FindFirstCanBeConnectedOutputByOutletHandler | typeof FirstNotConnectedInputOfNodeUnderPointerHandler | typeof InputsUnderPointerHandler | typeof ReassignConnectionOnPointerUp | typeof ReassignConnectionPrepareDragSequence | typeof FindInputsUnderPointerHandler | typeof CreateConnectionOnPointerUp | typeof CreateConnectionPrepareDragSequence)[];
4
+ export declare const CONNECTIONS_PROVIDERS: (typeof FindFirstCanBeConnectedOutputByOutletHandler | typeof CreateConnectionOnPointerUp | typeof CreateConnectionPrepareDragSequence | typeof FirstNotConnectedInputOfNodeUnderPointerHandler | typeof FindInputsUnderPointerHandler | typeof ReassignConnectionOnPointerUp | typeof ReassignConnectionPrepareDragSequence)[];
@@ -1,3 +1,3 @@
1
1
  import { ExternalItemOnPointerUp } from './external-item.on-pointer-up';
2
2
  import { ExternalItemPrepareDragSequence } from './external-item.prepare-drag-sequence';
3
- export declare const EXTERNAL_ITEM_PROVIDERS: (typeof ExternalItemPrepareDragSequence | typeof ExternalItemOnPointerUp)[];
3
+ export declare const EXTERNAL_ITEM_PROVIDERS: (typeof ExternalItemOnPointerUp | typeof ExternalItemPrepareDragSequence)[];
@@ -1,4 +1,4 @@
1
1
  import { NodeOnPointerUp } from './node.on-pointer-up';
2
2
  import { NodePrepareDragSequence } from './node.prepare-drag-sequence';
3
3
  import { IsConnectionUnderNodeHandler } from './domain/is-connection-under-node';
4
- export declare const NODE_PROVIDERS: (typeof IsConnectionUnderNodeHandler | typeof NodeOnPointerUp | typeof NodePrepareDragSequence)[];
4
+ export declare const NODE_PROVIDERS: (typeof NodeOnPointerUp | typeof NodePrepareDragSequence | typeof IsConnectionUnderNodeHandler)[];
@@ -1,8 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Component, ChangeDetectionStrategy, Input, Directive, Injectable, ContentChild, Inject, ViewChild, ContentChildren, Optional, SkipSelf, EventEmitter, Output, NgModule } from '@angular/core';
2
+ import { InjectionToken, Component, ChangeDetectionStrategy, Input, Directive, Injectable, ContentChild, Inject, ViewChild, Optional, ContentChildren, SkipSelf, EventEmitter, Output, NgModule } from '@angular/core';
3
3
  import { TransformModelExtensions, DomElementExtensions, PointExtensions, RectExtensions, BooleanExtensions, sanitizeElementId, Point, GuidExtensions, VectorExtensions, EventExtensions, mixinChangePosition, mixinFitToParent, mixinOneToOneCentering, mixinChangeZoom, MouseEventExtensions, IMouseEvent, ITouchDownEvent, ITouchMoveEvent, ITouchUpEvent, SizeExtensions } from '@foblex/core';
4
4
  import { Subject, Observable, Subscription, startWith, debounceTime } from 'rxjs';
5
- import * as i2 from '@angular/common';
5
+ import * as i3 from '@angular/common';
6
6
  import { DOCUMENT, CommonModule } from '@angular/common';
7
7
  import { __decorate } from 'tslib';
8
8
 
@@ -288,9 +288,6 @@ class CalculateConnectionCenterRequest {
288
288
  }
289
289
  }
290
290
 
291
- class FPathBuilderBase {
292
- }
293
-
294
291
  var EFConnectableSide;
295
292
  (function (EFConnectableSide) {
296
293
  EFConnectableSide["LEFT"] = "left";
@@ -656,37 +653,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
656
653
  type: Input
657
654
  }] } });
658
655
 
659
- class FBezierPathBuilder extends FPathBuilderBase {
660
- static getAnglePoint(side, source, target) {
661
- let result = PointExtensions.initialize(source.x, 0.5 * (source.y + target.y));
662
- if (side === EFConnectableSide.LEFT || side === EFConnectableSide.RIGHT) {
663
- result = PointExtensions.initialize(0.5 * (source.x + target.x), source.y);
656
+ class FBezierPathBuilder {
657
+ static getConnectorOffset(distance, offset) {
658
+ if (distance >= offset) {
659
+ return distance;
660
+ }
661
+ return offset * Math.sqrt(offset - distance);
662
+ }
663
+ static getAnglePoint(side, source, target, offset) {
664
+ let result = { x: source.x, y: source.y };
665
+ switch (side) {
666
+ case EFConnectableSide.LEFT:
667
+ result.x -= FBezierPathBuilder.getConnectorOffset(source.x - target.x, offset);
668
+ break;
669
+ case EFConnectableSide.RIGHT:
670
+ result.x += FBezierPathBuilder.getConnectorOffset(target.x - source.x, offset);
671
+ break;
672
+ case EFConnectableSide.TOP:
673
+ result.y -= FBezierPathBuilder.getConnectorOffset(source.y - target.y, offset);
674
+ break;
675
+ case EFConnectableSide.BOTTOM:
676
+ result.y += FBezierPathBuilder.getConnectorOffset(target.y - source.y, offset);
677
+ break;
664
678
  }
665
679
  return result;
666
680
  }
667
681
  handle(request) {
668
- const { source, sourceSide, target, targetSide } = request;
669
- const sourceAnglePoint = FBezierPathBuilder.getAnglePoint(sourceSide, source, target);
670
- const targetAnglePoint = FBezierPathBuilder.getAnglePoint(targetSide, source, target);
682
+ const { source, sourceSide, target, targetSide, offset } = request;
683
+ const sourceAnglePoint = FBezierPathBuilder.getAnglePoint(sourceSide, source, target, offset);
684
+ const targetAnglePoint = FBezierPathBuilder.getAnglePoint(targetSide, target, source, offset);
671
685
  const path = `M ${source.x} ${source.y} C ${sourceAnglePoint.x} ${sourceAnglePoint.y}, ${targetAnglePoint.x} ${targetAnglePoint.y}, ${target.x + 0.0001} ${target.y + 0.0001}`;
672
- const center = new CalculateConnectionCenterHandler().handle(new CalculateConnectionCenterRequest([source, sourceAnglePoint, targetAnglePoint, target]));
673
- return { path, center };
674
- }
675
- }
676
-
677
- var EFConnectionType;
678
- (function (EFConnectionType) {
679
- EFConnectionType["SEGMENT"] = "segment";
680
- EFConnectionType["STRAIGHT"] = "straight";
681
- EFConnectionType["BEZIER"] = "bezier";
682
- })(EFConnectionType || (EFConnectionType = {}));
683
-
684
- class FStraightPathBuilder extends FPathBuilderBase {
685
- handle(request) {
686
- const { source, target } = request;
687
- const path = `M ${source.x} ${source.y} L ${target.x + 0.0001} ${target.y + 0.0001}`;
688
- const center = new CalculateConnectionCenterHandler().handle(new CalculateConnectionCenterRequest([source, target]));
689
- return { path, center };
686
+ const connectionCenter = new CalculateConnectionCenterHandler().handle(new CalculateConnectionCenterRequest([source, sourceAnglePoint, targetAnglePoint, target]));
687
+ return { path, connectionCenter };
690
688
  }
691
689
  }
692
690
 
@@ -697,12 +695,12 @@ const CONNECTOR_SIDE_POINT = {
697
695
  [EFConnectableSide.BOTTOM]: PointExtensions.initialize(0, 1),
698
696
  [EFConnectableSide.AUTO]: PointExtensions.initialize(0, 0),
699
697
  };
700
- class FSegmentPathBuilder extends FPathBuilderBase {
698
+ class FSegmentPathBuilder {
701
699
  handle(request) {
702
700
  const { source, sourceSide, target, targetSide } = request;
703
701
  const { points, center } = this.getPathPoints(source, sourceSide, target, targetSide, request.offset);
704
702
  const path = this.buildPath(points, request.radius);
705
- return { path, center };
703
+ return { path, connectionCenter: center };
706
704
  }
707
705
  getPathPoints(source, sourceSide, target, targetSide, offset) {
708
706
  const sourceDirection = CONNECTOR_SIDE_POINT[sourceSide];
@@ -827,17 +825,12 @@ class FSegmentPathBuilder extends FPathBuilderBase {
827
825
  }
828
826
  }
829
827
 
830
- class FPathBuilderSelector extends FPathBuilderBase {
831
- constructor() {
832
- super(...arguments);
833
- this.builders = {
834
- [EFConnectionType.STRAIGHT]: new FStraightPathBuilder(),
835
- [EFConnectionType.BEZIER]: new FBezierPathBuilder(),
836
- [EFConnectionType.SEGMENT]: new FSegmentPathBuilder(),
837
- };
838
- }
828
+ class FStraightPathBuilder {
839
829
  handle(request) {
840
- return this.builders[request.type].handle(request);
830
+ const { source, target } = request;
831
+ const path = `M ${source.x} ${source.y} L ${target.x + 0.0001} ${target.y + 0.0001}`;
832
+ const connectionCenter = new CalculateConnectionCenterHandler().handle(new CalculateConnectionCenterRequest([source, target]));
833
+ return { path, connectionCenter };
841
834
  }
842
835
  }
843
836
 
@@ -1257,18 +1250,50 @@ function mixinChangeConnectionVisibility(base) {
1257
1250
  };
1258
1251
  }
1259
1252
 
1253
+ const F_CONNECTION_BUILDERS = new InjectionToken('F_CONNECTION_BUILDERS');
1254
+
1255
+ class FConnectionFactory {
1256
+ constructor(builders) {
1257
+ this.builders = {
1258
+ [EFConnectionType.STRAIGHT]: new FStraightPathBuilder(),
1259
+ [EFConnectionType.BEZIER]: new FBezierPathBuilder(),
1260
+ [EFConnectionType.SEGMENT]: new FSegmentPathBuilder(),
1261
+ };
1262
+ if (builders) {
1263
+ this.builders = { ...this.builders, ...builders };
1264
+ }
1265
+ }
1266
+ handle(request) {
1267
+ const builder = this.builders[request.type];
1268
+ if (!builder) {
1269
+ throw new Error(`FConnectionBuilder not found for type ${request.type}`);
1270
+ }
1271
+ return builder.handle(request.payload);
1272
+ }
1273
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionFactory, deps: [{ token: F_CONNECTION_BUILDERS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
1274
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionFactory }); }
1275
+ }
1276
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionFactory, decorators: [{
1277
+ type: Injectable
1278
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
1279
+ type: Optional
1280
+ }, {
1281
+ type: Inject,
1282
+ args: [F_CONNECTION_BUILDERS]
1283
+ }] }] });
1284
+
1260
1285
  const MIXIN_BASE$1 = mixinChangeConnectionSelection(mixinChangeConnectionVisibility(class {
1261
1286
  constructor(hostElement) {
1262
1287
  this.hostElement = hostElement;
1263
1288
  }
1264
1289
  }));
1265
1290
  class FConnectionBase extends MIXIN_BASE$1 {
1266
- constructor(elementReference) {
1291
+ constructor(elementReference, connectionFactory) {
1267
1292
  super(elementReference.nativeElement);
1293
+ this.connectionFactory = connectionFactory;
1268
1294
  this.path = '';
1269
1295
  this.vector = VectorExtensions.initialize();
1270
1296
  this.stateChanges = new Subject();
1271
- this.fPathBuilder = new FPathBuilderSelector();
1272
1297
  }
1273
1298
  initialize() {
1274
1299
  this.fPath.initialize();
@@ -1286,24 +1311,26 @@ class FConnectionBase extends MIXIN_BASE$1 {
1286
1311
  }
1287
1312
  setVector(from, fromSide, to, toSide) {
1288
1313
  this.vector = { point1: from, point2: to };
1289
- const pathResult = this.fPathBuilder.handle({
1314
+ const pathResult = this.connectionFactory.handle({
1290
1315
  type: this.fType,
1291
- source: from,
1292
- sourceSide: fromSide,
1293
- target: to,
1294
- targetSide: toSide,
1295
- radius: 8,
1296
- offset: 32
1316
+ payload: {
1317
+ source: from,
1318
+ sourceSide: fromSide,
1319
+ target: to,
1320
+ targetSide: toSide,
1321
+ radius: 8,
1322
+ offset: 32
1323
+ }
1297
1324
  });
1298
1325
  this.path = pathResult.path;
1299
- const transform = `position: absolute; pointerEvents: all; transform: translate(-50%, -50%); left: ${pathResult.center.x}px; top: ${pathResult.center.y}px`;
1326
+ const transform = `position: absolute; pointerEvents: all; transform: translate(-50%, -50%); left: ${pathResult.connectionCenter.x}px; top: ${pathResult.connectionCenter.y}px`;
1300
1327
  this.fConnectionCenter?.nativeElement?.setAttribute('style', transform);
1301
1328
  }
1302
1329
  setMarkers() {
1303
1330
  this.fDefs.nativeElement.innerHTML = '';
1304
1331
  this.fMarkers.forEach((marker) => {
1305
1332
  const markerElement = DomElementExtensions.createSvgElement('marker');
1306
- markerElement.setAttribute('id', getFlowUid() + '-' + marker.type + '-' + this.fConnectionId);
1333
+ markerElement.setAttribute('id', this.getMarkerId(getFlowUid() + '-' + marker.type + '-' + this.fConnectionId));
1307
1334
  markerElement.setAttribute('markerHeight', `${marker.height}`);
1308
1335
  markerElement.setAttribute('markerWidth', `${marker.width}`);
1309
1336
  markerElement.setAttribute('orient', 'auto');
@@ -1321,6 +1348,9 @@ class FConnectionBase extends MIXIN_BASE$1 {
1321
1348
  marker.hostElement.remove();
1322
1349
  });
1323
1350
  }
1351
+ getMarkerId(id) {
1352
+ return sanitizeElementId(id);
1353
+ }
1324
1354
  redraw() {
1325
1355
  this.fPath.setPath(this.path);
1326
1356
  this.fSelection.setPath(this.path);
@@ -1328,12 +1358,12 @@ class FConnectionBase extends MIXIN_BASE$1 {
1328
1358
  this.fDragHandle.redraw(this.vector.point2);
1329
1359
  this.fTextComponent.redraw(this.vector);
1330
1360
  }
1331
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionBase, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1361
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionBase, deps: [{ token: i0.ElementRef }, { token: FConnectionFactory }], target: i0.ɵɵFactoryTarget.Directive }); }
1332
1362
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: FConnectionBase, usesInheritance: true, ngImport: i0 }); }
1333
1363
  }
1334
1364
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionBase, decorators: [{
1335
1365
  type: Directive
1336
- }], ctorParameters: () => [{ type: i0.ElementRef }] });
1366
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: FConnectionFactory }] });
1337
1367
 
1338
1368
  var EFConnectionBehavior;
1339
1369
  (function (EFConnectionBehavior) {
@@ -1350,6 +1380,13 @@ function castToConnectionBehavior(behavior) {
1350
1380
  return result;
1351
1381
  }
1352
1382
 
1383
+ var EFConnectionType;
1384
+ (function (EFConnectionType) {
1385
+ EFConnectionType["SEGMENT"] = "segment";
1386
+ EFConnectionType["STRAIGHT"] = "straight";
1387
+ EFConnectionType["BEZIER"] = "bezier";
1388
+ })(EFConnectionType || (EFConnectionType = {}));
1389
+
1353
1390
  function castToConnectionType(type) {
1354
1391
  const result = EFConnectionType[type.toUpperCase()];
1355
1392
  if (result === undefined) {
@@ -1378,7 +1415,7 @@ class FConnectionForCreateComponent extends FConnectionBase {
1378
1415
  return this._behavior;
1379
1416
  }
1380
1417
  set fType(value) {
1381
- this._type = castToConnectionType(value);
1418
+ this._type = value;
1382
1419
  }
1383
1420
  get fType() {
1384
1421
  return this._type;
@@ -1386,8 +1423,8 @@ class FConnectionForCreateComponent extends FConnectionBase {
1386
1423
  get boundingElement() {
1387
1424
  return this.fPath.hostElement;
1388
1425
  }
1389
- constructor(elementReference, fComponentsStore) {
1390
- super(elementReference);
1426
+ constructor(elementReference, fConnectionFactory, fComponentsStore) {
1427
+ super(elementReference, fConnectionFactory);
1391
1428
  this.fComponentsStore = fComponentsStore;
1392
1429
  this.fConnectionId = `f-connection-for-create-${uniqueId$4++}`;
1393
1430
  this.fText = '';
@@ -1407,15 +1444,15 @@ class FConnectionForCreateComponent extends FConnectionBase {
1407
1444
  ngOnDestroy() {
1408
1445
  this.fComponentsStore.fTempConnection = undefined;
1409
1446
  }
1410
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionForCreateComponent, deps: [{ token: i0.ElementRef }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Component }); }
1411
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FConnectionForCreateComponent, selector: "f-connection-for-create", inputs: { fStartColor: "fStartColor", fEndColor: "fEndColor", fBehavior: "fBehavior", fType: "fType" }, host: { classAttribute: "f-component f-connection f-connection-for-create" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionForCreateComponent }], queries: [{ propertyName: "fMarkers", predicate: F_MARKER, descendants: true }, { propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, descendants: true }], viewQueries: [{ propertyName: "fDefs", first: true, predicate: ["defs"], descendants: true, static: true }, { propertyName: "fPath", first: true, predicate: CONNECTION_PATH, descendants: true, static: true }, { propertyName: "fGradient", first: true, predicate: CONNECTION_GRADIENT, descendants: true, static: true }, { propertyName: "fDragHandle", first: true, predicate: FConnectionDragHandleComponent, descendants: true, static: true }, { propertyName: "fSelection", first: true, predicate: FConnectionSelectionComponent, descendants: true, static: true }, { propertyName: "fTextComponent", first: true, predicate: CONNECTION_TEXT, descendants: true, static: true }, { propertyName: "fConnectionCenter", first: true, predicate: ["fConnectionCenter"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FConnectionDragHandleComponent, selector: "circle[f-connection-drag-handle]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1447
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionForCreateComponent, deps: [{ token: i0.ElementRef }, { token: FConnectionFactory }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Component }); }
1448
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FConnectionForCreateComponent, selector: "f-connection-for-create", inputs: { fStartColor: "fStartColor", fEndColor: "fEndColor", fBehavior: "fBehavior", fType: "fType" }, host: { classAttribute: "f-component f-connection f-connection-for-create" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionForCreateComponent }], queries: [{ propertyName: "fMarkers", predicate: F_MARKER, descendants: true }, { propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, descendants: true }], viewQueries: [{ propertyName: "fDefs", first: true, predicate: ["defs"], descendants: true, static: true }, { propertyName: "fPath", first: true, predicate: CONNECTION_PATH, descendants: true, static: true }, { propertyName: "fGradient", first: true, predicate: CONNECTION_GRADIENT, descendants: true, static: true }, { propertyName: "fDragHandle", first: true, predicate: FConnectionDragHandleComponent, descendants: true, static: true }, { propertyName: "fSelection", first: true, predicate: FConnectionSelectionComponent, descendants: true, static: true }, { propertyName: "fTextComponent", first: true, predicate: CONNECTION_TEXT, descendants: true, static: true }, { propertyName: "fConnectionCenter", first: true, predicate: ["fConnectionCenter"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FConnectionDragHandleComponent, selector: "circle[f-connection-drag-handle]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1412
1449
  }
1413
1450
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionForCreateComponent, decorators: [{
1414
1451
  type: Component,
1415
1452
  args: [{ selector: "f-connection-for-create", changeDetection: ChangeDetectionStrategy.OnPush, host: {
1416
1453
  class: "f-component f-connection f-connection-for-create"
1417
1454
  }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionForCreateComponent }], template: "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}\n"] }]
1418
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: FComponentsStore }], propDecorators: { fStartColor: [{
1455
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: FConnectionFactory }, { type: FComponentsStore }], propDecorators: { fStartColor: [{
1419
1456
  type: Input
1420
1457
  }], fEndColor: [{
1421
1458
  type: Input
@@ -1461,7 +1498,7 @@ class FConnectionComponent extends FConnectionBase {
1461
1498
  return this._behavior;
1462
1499
  }
1463
1500
  set fType(value) {
1464
- this._type = castToConnectionType(value);
1501
+ this._type = value;
1465
1502
  }
1466
1503
  get fType() {
1467
1504
  return this._type;
@@ -1469,8 +1506,8 @@ class FConnectionComponent extends FConnectionBase {
1469
1506
  get boundingElement() {
1470
1507
  return this.fPath.hostElement;
1471
1508
  }
1472
- constructor(elementReference, fComponentsStore) {
1473
- super(elementReference);
1509
+ constructor(elementReference, fConnectionFactory, fComponentsStore) {
1510
+ super(elementReference, fConnectionFactory);
1474
1511
  this.fComponentsStore = fComponentsStore;
1475
1512
  this.fConnectionId = `f-connection-${uniqueId$3++}`;
1476
1513
  this.fText = '';
@@ -1487,8 +1524,8 @@ class FConnectionComponent extends FConnectionBase {
1487
1524
  ngOnDestroy() {
1488
1525
  this.fComponentsStore.removeConnection(this);
1489
1526
  }
1490
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionComponent, deps: [{ token: i0.ElementRef }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Component }); }
1491
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FConnectionComponent, selector: "f-connection", inputs: { fConnectionId: "fConnectionId", fText: "fText", fStartColor: "fStartColor", fEndColor: "fEndColor", fOutputId: "fOutputId", fInputId: "fInputId", fBehavior: "fBehavior", fType: "fType", fDraggingDisabled: ["fReassignDisabled", "fDraggingDisabled"], fSelectionDisabled: "fSelectionDisabled" }, host: { properties: { "attr.id": "fConnectionId", "class.f-connection-selection-disabled": "fSelectionDisabled", "class.f-connection-reassign-disabled": "fDraggingDisabled" }, classAttribute: "f-component f-connection" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionComponent }], queries: [{ propertyName: "fMarkers", predicate: F_MARKER, descendants: true }, { propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, descendants: true }], viewQueries: [{ propertyName: "fDefs", first: true, predicate: ["defs"], descendants: true, static: true }, { propertyName: "fPath", first: true, predicate: CONNECTION_PATH, descendants: true, static: true }, { propertyName: "fGradient", first: true, predicate: CONNECTION_GRADIENT, descendants: true, static: true }, { propertyName: "fDragHandle", first: true, predicate: FConnectionDragHandleComponent, descendants: true, static: true }, { propertyName: "fSelection", first: true, predicate: FConnectionSelectionComponent, descendants: true, static: true }, { propertyName: "fTextComponent", first: true, predicate: CONNECTION_TEXT, descendants: true, static: true }, { propertyName: "fConnectionCenter", first: true, predicate: ["fConnectionCenter"], descendants: true }], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"overflow: visible; display: block; vertical-align: middle;\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FConnectionDragHandleComponent, selector: "circle[f-connection-drag-handle]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1527
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionComponent, deps: [{ token: i0.ElementRef }, { token: FConnectionFactory }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Component }); }
1528
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FConnectionComponent, selector: "f-connection", inputs: { fConnectionId: "fConnectionId", fText: "fText", fStartColor: "fStartColor", fEndColor: "fEndColor", fOutputId: "fOutputId", fInputId: "fInputId", fBehavior: "fBehavior", fType: "fType", fDraggingDisabled: ["fReassignDisabled", "fDraggingDisabled"], fSelectionDisabled: "fSelectionDisabled" }, host: { properties: { "attr.id": "fConnectionId", "class.f-connection-selection-disabled": "fSelectionDisabled", "class.f-connection-reassign-disabled": "fDraggingDisabled" }, classAttribute: "f-component f-connection" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionComponent }], queries: [{ propertyName: "fMarkers", predicate: F_MARKER, descendants: true }, { propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, descendants: true }], viewQueries: [{ propertyName: "fDefs", first: true, predicate: ["defs"], descendants: true, static: true }, { propertyName: "fPath", first: true, predicate: CONNECTION_PATH, descendants: true, static: true }, { propertyName: "fGradient", first: true, predicate: CONNECTION_GRADIENT, descendants: true, static: true }, { propertyName: "fDragHandle", first: true, predicate: FConnectionDragHandleComponent, descendants: true, static: true }, { propertyName: "fSelection", first: true, predicate: FConnectionSelectionComponent, descendants: true, static: true }, { propertyName: "fTextComponent", first: true, predicate: CONNECTION_TEXT, descendants: true, static: true }, { propertyName: "fConnectionCenter", first: true, predicate: ["fConnectionCenter"], descendants: true }], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"overflow: visible; display: block; vertical-align: middle;\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FConnectionDragHandleComponent, selector: "circle[f-connection-drag-handle]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1492
1529
  }
1493
1530
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionComponent, decorators: [{
1494
1531
  type: Component,
@@ -1498,7 +1535,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1498
1535
  '[class.f-connection-selection-disabled]': 'fSelectionDisabled',
1499
1536
  '[class.f-connection-reassign-disabled]': 'fDraggingDisabled',
1500
1537
  }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionComponent }], template: "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"overflow: visible; display: block; vertical-align: middle;\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}\n"] }]
1501
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: FComponentsStore }], propDecorators: { fConnectionId: [{
1538
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: FConnectionFactory }, { type: FComponentsStore }], propDecorators: { fConnectionId: [{
1502
1539
  type: Input
1503
1540
  }], fText: [{
1504
1541
  type: Input
@@ -2167,27 +2204,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
2167
2204
  type: Injectable
2168
2205
  }], ctorParameters: () => [{ type: FComponentsStore }] });
2169
2206
 
2170
- class InputsUnderPointerHandler {
2171
- get fInputs() {
2172
- return this.fComponentsStore.fInputs;
2173
- }
2174
- constructor(fComponentsStore) {
2175
- this.fComponentsStore = fComponentsStore;
2176
- }
2177
- handle(event) {
2178
- const position = event.getPosition();
2179
- const elementsFromPoint = document.elementsFromPoint(position.x, position.y);
2180
- return elementsFromPoint.filter((x) => isNodeInput(x)).map((element) => {
2181
- return this.fInputs.find((x) => x.isContains(element));
2182
- }).filter((x) => !!x);
2183
- }
2184
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: InputsUnderPointerHandler, deps: [{ token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Injectable }); }
2185
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: InputsUnderPointerHandler }); }
2186
- }
2187
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: InputsUnderPointerHandler, decorators: [{
2188
- type: Injectable
2189
- }], ctorParameters: () => [{ type: FComponentsStore }] });
2190
-
2191
2207
  class FindInputsUnderPointerRequest {
2192
2208
  constructor(event, dragHandler) {
2193
2209
  this.event = event;
@@ -2232,9 +2248,11 @@ class FindInputsUnderPointerHandler {
2232
2248
  get fNodes() {
2233
2249
  return this.fComponentsStore.fNodes;
2234
2250
  }
2235
- constructor(fComponentsStore, inputsUnderPointerHandler, firstNotConnectedInputOfNodeUnderPointerHandler) {
2251
+ get fInputs() {
2252
+ return this.fComponentsStore.fInputs;
2253
+ }
2254
+ constructor(fComponentsStore, firstNotConnectedInputOfNodeUnderPointerHandler) {
2236
2255
  this.fComponentsStore = fComponentsStore;
2237
- this.inputsUnderPointerHandler = inputsUnderPointerHandler;
2238
2256
  this.firstNotConnectedInputOfNodeUnderPointerHandler = firstNotConnectedInputOfNodeUnderPointerHandler;
2239
2257
  }
2240
2258
  handle(payload) {
@@ -2253,7 +2271,7 @@ class FindInputsUnderPointerHandler {
2253
2271
  });
2254
2272
  }
2255
2273
  getInputsUnderPointer(payload) {
2256
- let inputs = this.inputsUnderPointerHandler.handle(payload.event);
2274
+ let inputs = this.inputsUnderPointer(payload.event.getPosition());
2257
2275
  const input = this.firstNotConnectedInputOfNodeUnderPointerHandler.handle(payload.event);
2258
2276
  if (input) {
2259
2277
  inputs.push(input);
@@ -2261,12 +2279,18 @@ class FindInputsUnderPointerHandler {
2261
2279
  inputs = inputs.filter((x) => x.canBeConnected);
2262
2280
  return inputs;
2263
2281
  }
2264
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FindInputsUnderPointerHandler, deps: [{ token: FComponentsStore }, { token: InputsUnderPointerHandler }, { token: FirstNotConnectedInputOfNodeUnderPointerHandler }], target: i0.ɵɵFactoryTarget.Injectable }); }
2282
+ inputsUnderPointer(position) {
2283
+ const elementsFromPoint = document.elementsFromPoint(position.x, position.y);
2284
+ return elementsFromPoint.filter((x) => isNodeInput(x)).map((element) => {
2285
+ return this.fInputs.find((x) => x.isContains(element));
2286
+ }).filter((x) => !!x);
2287
+ }
2288
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FindInputsUnderPointerHandler, deps: [{ token: FComponentsStore }, { token: FirstNotConnectedInputOfNodeUnderPointerHandler }], target: i0.ɵɵFactoryTarget.Injectable }); }
2265
2289
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FindInputsUnderPointerHandler }); }
2266
2290
  }
2267
2291
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FindInputsUnderPointerHandler, decorators: [{
2268
2292
  type: Injectable
2269
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: InputsUnderPointerHandler }, { type: FirstNotConnectedInputOfNodeUnderPointerHandler }] });
2293
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: FirstNotConnectedInputOfNodeUnderPointerHandler }] });
2270
2294
 
2271
2295
  class CreateConnectionOnPointerUp {
2272
2296
  constructor(fComponentsStore, fDraggableDataContext, findInputsUnderPointerHandler, findFirstCanBeConnectedOutputByOutletHandler) {
@@ -2501,7 +2525,6 @@ const CONNECTIONS_PROVIDERS = [
2501
2525
  CreateConnectionOnPointerUp,
2502
2526
  CreateConnectionPrepareDragSequence,
2503
2527
  FirstNotConnectedInputOfNodeUnderPointerHandler,
2504
- InputsUnderPointerHandler,
2505
2528
  FindInputsUnderPointerHandler,
2506
2529
  ReassignConnectionOnPointerUp,
2507
2530
  ReassignConnectionPrepareDragSequence
@@ -3763,8 +3786,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
3763
3786
  }], ctorParameters: () => [{ type: FDraggableDataContext }] });
3764
3787
 
3765
3788
  class RedrawConnectionsRequest {
3766
- constructor() {
3767
- }
3768
3789
  }
3769
3790
 
3770
3791
  let RedrawConnectionsHandler = class RedrawConnectionsHandler {
@@ -4461,6 +4482,7 @@ class FFlowComponent extends FFlowBase {
4461
4482
  FFlowMediator,
4462
4483
  FComponentsStore,
4463
4484
  FDraggableDataContext,
4485
+ FConnectionFactory,
4464
4486
  ...SINGLE_SELECT_PROVIDERS,
4465
4487
  ...SELECTION_AREA_PROVIDERS,
4466
4488
  ...NODE_PROVIDERS,
@@ -4480,6 +4502,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
4480
4502
  FFlowMediator,
4481
4503
  FComponentsStore,
4482
4504
  FDraggableDataContext,
4505
+ FConnectionFactory,
4483
4506
  ...SINGLE_SELECT_PROVIDERS,
4484
4507
  ...SELECTION_AREA_PROVIDERS,
4485
4508
  ...NODE_PROVIDERS,
@@ -4604,5 +4627,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
4604
4627
  * Generated bundle index. Do not edit.
4605
4628
  */
4606
4629
 
4607
- export { CANVAS_PROVIDERS, COMMON_PROVIDERS, CONNECTIONS_PROVIDERS, CONNECTION_GRADIENT, CONNECTION_PATH, CONNECTION_TEXT, CalculateCenterBetweenPointsHandler, CalculateCenterBetweenPointsRequest, CalculateConnectionCenterHandler, CalculateConnectionCenterRequest, CalculateConnectorConnectableSideHandler, CalculateConnectorConnectableSideRequest, CanvasDragHandler, CanvasOnPointerUp, CanvasPrepareDragSequence, ClearSelectionHandler, ClearSelectionRequest, ConnectionDragHandler, ConnectionSourceDragHandler, ConnectionTargetDragHandler, CreateConnectionDragHandler, CreateConnectionOnPointerUp, CreateConnectionPrepareDragSequence, EFConnectableSide, EFConnectionBehavior, EFConnectionType, EFDraggableType, EFMarkerType, EXTERNAL_ITEM_PROVIDERS, ExternalItemDragHandler, ExternalItemOnPointerUp, ExternalItemPrepareDragSequence, FBackgroundBase, FBackgroundComponent, FBezierPathBuilder, FCanvasBase, FCanvasChangeEvent, FCanvasComponent, FCellPatternComponent, FComponentsStore, FConnectionBase, FConnectionCenterDirective, FConnectionComponent, FConnectionDragHandleComponent, FConnectionForCreateComponent, FConnectionGradientComponent, FConnectionPathComponent, FConnectionSelectionComponent, FConnectionTextComponent, FConnectionTextPathDirective, FConnectorBase, FCreateConnectionEvent, FCreateNodeEvent, FDragHandleDirective, FDraggableBase, FDraggableDataContext, FDraggableDirective, FExternalItemBase, FExternalItemDirective, FExternalItemService, FFlowBase, FFlowComponent, FFlowMediator, FFlowModule, FHandlerRegister, FLOW, FLineAlignmentBase, FLineAlignmentComponent, FMarkerBase, FMarkerDirective, FNodeBase, FNodeDirective, FNodeInputBase, FNodeInputDirective, FNodeOutletBase, FNodeOutletDirective, FNodeOutputBase, FNodeOutputDirective, FPathBuilderBase, FPathBuilderSelector, FReassignConnectionEvent, FResizeObserver, FSegmentPathBuilder, FSelectionAreaBase, FSelectionAreaComponent, FSelectionChangeEvent, FStraightPathBuilder, FZoomBase, FZoomDirective, F_BACKGROUND, F_BACKGROUND_PATTERN, F_CANVAS, F_CONNECTION_DRAG_HANDLE_CLASS, F_CONNECTION_IDENTIFIERS, F_DRAGGABLE, F_DRAG_HANDLE, F_EXTERNAL_ITEM, F_FLOW, F_LINE_ALIGNMENT, F_MARKER, F_NODE, F_NODE_INPUT, F_NODE_OUTLET, F_NODE_OUTPUT, F_SELECTED_CLASS, F_SELECTION_AREA, F_ZOOM, FindFirstCanBeConnectedOutputByOutletHandler, FindInputsUnderPointerHandler, FindInputsUnderPointerRequest, FirstNotConnectedInputOfNodeUnderPointerHandler, GetCanBeSelectedItemsHandler, GetConnectionHandler, GetConnectionVectorHandler, GetConnectionVectorRequest, GetElementRectInFlowHandler, GetElementRectInFlowRequest, GetIncomingConnectionsHandler, GetInputRectInFlowHandler, GetInputRectInFlowRequest, GetInputRectInFlowResponse, GetNodesRectHandler, GetNodesRectRequest, GetOutgoingConnectionsHandler, GetOutputRectInFlowHandler, GetOutputRectInFlowRequest, GetOutputRectInFlowResponse, GetSelectionHandler, GetSelectionRequest, InputsUnderPointerHandler, IsConnectionUnderNodeHandler, LineElement, LineService, MOUSE_EVENT_IGNORE_TIME, NODE_PROVIDERS, NearestCoordinateFinder, NodeDragHandler, NodeOnPointerUp, NodePrepareDragSequence, ReassignConnectionDragHandler, ReassignConnectionOnPointerUp, ReassignConnectionPrepareDragSequence, RedrawConnectionsHandler, RedrawConnectionsRequest, SELECTION_AREA_PROVIDERS, SINGLE_SELECT_PROVIDERS, SelectAllHandler, SelectAllRequest, SelectHandler, SelectRequest, SelectionAreaDragHandle, SelectionAreaOnPointerUp, SelectionAreaPrepareDragSequence, SingleSelectOnPointerDown, UpdateConnectionLayerHandler, UpdateNodeLayerHandler, castToConnectableSide, castToConnectionBehavior, castToConnectionType, getExternalItem, getFlowUid, isExternalItem, isNode, isNodeDragHandle, isNodeInput, isNodeOutlet, isNodeOutput, mixinChangeConnectionSelection, mixinChangeConnectionVisibility };
4630
+ export { CANVAS_PROVIDERS, COMMON_PROVIDERS, CONNECTIONS_PROVIDERS, CONNECTION_GRADIENT, CONNECTION_PATH, CONNECTION_TEXT, CalculateCenterBetweenPointsHandler, CalculateCenterBetweenPointsRequest, CalculateConnectionCenterHandler, CalculateConnectionCenterRequest, CalculateConnectorConnectableSideHandler, CalculateConnectorConnectableSideRequest, CanvasDragHandler, CanvasOnPointerUp, CanvasPrepareDragSequence, ClearSelectionHandler, ClearSelectionRequest, ConnectionDragHandler, ConnectionSourceDragHandler, ConnectionTargetDragHandler, CreateConnectionDragHandler, CreateConnectionOnPointerUp, CreateConnectionPrepareDragSequence, EFConnectableSide, EFConnectionBehavior, EFConnectionType, EFDraggableType, EFMarkerType, EXTERNAL_ITEM_PROVIDERS, ExternalItemDragHandler, ExternalItemOnPointerUp, ExternalItemPrepareDragSequence, FBackgroundBase, FBackgroundComponent, FBezierPathBuilder, FCanvasBase, FCanvasChangeEvent, FCanvasComponent, FCellPatternComponent, FComponentsStore, FConnectionBase, FConnectionCenterDirective, FConnectionComponent, FConnectionDragHandleComponent, FConnectionFactory, FConnectionForCreateComponent, FConnectionGradientComponent, FConnectionPathComponent, FConnectionSelectionComponent, FConnectionTextComponent, FConnectionTextPathDirective, FConnectorBase, FCreateConnectionEvent, FCreateNodeEvent, FDragHandleDirective, FDraggableBase, FDraggableDataContext, FDraggableDirective, FExternalItemBase, FExternalItemDirective, FExternalItemService, FFlowBase, FFlowComponent, FFlowMediator, FFlowModule, FHandlerRegister, FLOW, FLineAlignmentBase, FLineAlignmentComponent, FMarkerBase, FMarkerDirective, FNodeBase, FNodeDirective, FNodeInputBase, FNodeInputDirective, FNodeOutletBase, FNodeOutletDirective, FNodeOutputBase, FNodeOutputDirective, FReassignConnectionEvent, FResizeObserver, FSegmentPathBuilder, FSelectionAreaBase, FSelectionAreaComponent, FSelectionChangeEvent, FStraightPathBuilder, FZoomBase, FZoomDirective, F_BACKGROUND, F_BACKGROUND_PATTERN, F_CANVAS, F_CONNECTION_BUILDERS, F_CONNECTION_DRAG_HANDLE_CLASS, F_CONNECTION_IDENTIFIERS, F_DRAGGABLE, F_DRAG_HANDLE, F_EXTERNAL_ITEM, F_FLOW, F_LINE_ALIGNMENT, F_MARKER, F_NODE, F_NODE_INPUT, F_NODE_OUTLET, F_NODE_OUTPUT, F_SELECTED_CLASS, F_SELECTION_AREA, F_ZOOM, FindFirstCanBeConnectedOutputByOutletHandler, FindInputsUnderPointerHandler, FindInputsUnderPointerRequest, FirstNotConnectedInputOfNodeUnderPointerHandler, GetCanBeSelectedItemsHandler, GetConnectionHandler, GetConnectionVectorHandler, GetConnectionVectorRequest, GetElementRectInFlowHandler, GetElementRectInFlowRequest, GetIncomingConnectionsHandler, GetInputRectInFlowHandler, GetInputRectInFlowRequest, GetInputRectInFlowResponse, GetNodesRectHandler, GetNodesRectRequest, GetOutgoingConnectionsHandler, GetOutputRectInFlowHandler, GetOutputRectInFlowRequest, GetOutputRectInFlowResponse, GetSelectionHandler, GetSelectionRequest, IsConnectionUnderNodeHandler, LineElement, LineService, MOUSE_EVENT_IGNORE_TIME, NODE_PROVIDERS, NearestCoordinateFinder, NodeDragHandler, NodeOnPointerUp, NodePrepareDragSequence, ReassignConnectionDragHandler, ReassignConnectionOnPointerUp, ReassignConnectionPrepareDragSequence, RedrawConnectionsHandler, RedrawConnectionsRequest, SELECTION_AREA_PROVIDERS, SINGLE_SELECT_PROVIDERS, SelectAllHandler, SelectAllRequest, SelectHandler, SelectRequest, SelectionAreaDragHandle, SelectionAreaOnPointerUp, SelectionAreaPrepareDragSequence, SingleSelectOnPointerDown, UpdateConnectionLayerHandler, UpdateNodeLayerHandler, castToConnectableSide, castToConnectionBehavior, castToConnectionType, getExternalItem, getFlowUid, isExternalItem, isNode, isNodeDragHandle, isNodeInput, isNodeOutlet, isNodeOutput, mixinChangeConnectionSelection, mixinChangeConnectionVisibility };
4608
4631
  //# sourceMappingURL=foblex-flow.mjs.map