@foblex/flow 12.2.0 → 12.2.2

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 (53) hide show
  1. package/domain/index.d.ts +1 -2
  2. package/domain/providers.d.ts +2 -3
  3. package/domain/update-item-layer/index.d.ts +2 -0
  4. package/domain/update-item-layer/update-item-layer.handler.d.ts +8 -0
  5. package/domain/update-item-layer/update-item-layer.request.d.ts +6 -0
  6. package/esm2022/domain/get-element-rect-in-flow/get-element-rect-in-flow.handler.mjs +1 -1
  7. package/esm2022/domain/index.mjs +2 -3
  8. package/esm2022/domain/providers.mjs +6 -5
  9. package/esm2022/domain/redraw-connections/redraw-connections.handler.mjs +2 -2
  10. package/esm2022/domain/update-item-layer/index.mjs +3 -0
  11. package/esm2022/domain/update-item-layer/update-item-layer.handler.mjs +29 -0
  12. package/esm2022/domain/update-item-layer/update-item-layer.request.mjs +7 -0
  13. package/esm2022/f-components-store.mjs +10 -1
  14. package/esm2022/f-connection/common/f-connection-base.mjs +1 -1
  15. package/esm2022/f-connection/common/mixins/change-connection-selection.mixin.mjs +2 -1
  16. package/esm2022/f-connection/f-connection/f-connection.component.mjs +3 -3
  17. package/esm2022/f-draggable/connections/create-connection/create-connection.on-pointer-up.mjs +13 -15
  18. package/esm2022/f-draggable/connections/create-connection/f-create-connection.event.mjs +3 -2
  19. package/esm2022/f-draggable/connections/reassign-connection/reassign-connection.prepare-drag-sequence.mjs +6 -6
  20. package/esm2022/f-draggable/f-draggable-data-context.mjs +4 -1
  21. package/esm2022/f-draggable/node/node.prepare-drag-sequence.mjs +6 -6
  22. package/esm2022/f-draggable/single-select/single-select.on-pointer-down.mjs +45 -55
  23. package/esm2022/f-flow.module.mjs +4 -1
  24. package/esm2022/f-group/f-group-base.mjs +13 -0
  25. package/esm2022/f-group/f-group.directive.mjs +57 -0
  26. package/esm2022/f-group/index.mjs +4 -0
  27. package/esm2022/f-group/is-group.mjs +4 -0
  28. package/esm2022/public-api.mjs +2 -1
  29. package/f-components-store.d.ts +4 -0
  30. package/f-connection/common/mixins/change-connection-selection.mixin.d.ts +1 -0
  31. package/f-draggable/canvas/providers.d.ts +1 -1
  32. package/f-draggable/connections/create-connection/f-create-connection.event.d.ts +4 -2
  33. package/f-draggable/connections/providers.d.ts +1 -1
  34. package/f-draggable/connections/reassign-connection/reassign-connection.prepare-drag-sequence.d.ts +2 -3
  35. package/f-draggable/external-item/providers.d.ts +1 -1
  36. package/f-draggable/f-draggable-data-context.d.ts +1 -0
  37. package/f-draggable/node/node.prepare-drag-sequence.d.ts +2 -3
  38. package/f-draggable/node/providers.d.ts +1 -1
  39. package/f-draggable/selection-area/providers.d.ts +1 -1
  40. package/f-draggable/single-select/single-select.on-pointer-down.d.ts +11 -6
  41. package/f-flow.module.d.ts +14 -13
  42. package/f-group/f-group-base.d.ts +12 -0
  43. package/f-group/f-group.directive.d.ts +21 -0
  44. package/f-group/index.d.ts +3 -0
  45. package/f-group/is-group.d.ts +1 -0
  46. package/fesm2022/foblex-flow.mjs +205 -156
  47. package/fesm2022/foblex-flow.mjs.map +1 -1
  48. package/package.json +1 -1
  49. package/public-api.d.ts +1 -0
  50. package/domain/update-connection-layer.handler.d.ts +0 -12
  51. package/domain/update-node-layer.handler.d.ts +0 -12
  52. package/esm2022/domain/update-connection-layer.handler.mjs +0 -29
  53. package/esm2022/domain/update-node-layer.handler.mjs +0 -29
@@ -8,7 +8,7 @@ import { __decorate } from 'tslib';
8
8
 
9
9
  const F_BACKGROUND_PATTERN = new InjectionToken('F_BACKGROUND_PATTERN');
10
10
 
11
- let uniqueId$9 = 0;
11
+ let uniqueId$a = 0;
12
12
  class FCellPatternComponent {
13
13
  get hostElement() {
14
14
  return this.elementReference.nativeElement;
@@ -16,7 +16,7 @@ class FCellPatternComponent {
16
16
  constructor(elementReference, changeDetectorRef) {
17
17
  this.elementReference = elementReference;
18
18
  this.changeDetectorRef = changeDetectorRef;
19
- this.id = `f-pattern-${uniqueId$9++}`;
19
+ this.id = `f-pattern-${uniqueId$a++}`;
20
20
  this.verticalLineColor = 'rgba(0,0,0,0.1)';
21
21
  this.horizontalLineColor = 'rgba(0,0,0,0.1)';
22
22
  this.transform = TransformModelExtensions.default();
@@ -107,6 +107,7 @@ class FComponentsStore {
107
107
  constructor() {
108
108
  this.changes = new Subject();
109
109
  this.fNodes = [];
110
+ this.fGroups = [];
110
111
  this.fConnections = [];
111
112
  this.fOutputs = [];
112
113
  this.fInputs = [];
@@ -161,6 +162,14 @@ class FComponentsStore {
161
162
  this.fConnections = this.fConnections.filter(c => c !== connection);
162
163
  this.changes.next();
163
164
  }
165
+ addGroup(group) {
166
+ this.fGroups.push(group);
167
+ this.changes.next();
168
+ }
169
+ removeGroup(group) {
170
+ this.fGroups = this.fGroups.filter(n => n !== group);
171
+ this.changes.next();
172
+ }
164
173
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FComponentsStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
165
174
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FComponentsStore }); }
166
175
  }
@@ -168,7 +177,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
168
177
  type: Injectable
169
178
  }] });
170
179
 
171
- let uniqueId$8 = 0;
180
+ let uniqueId$9 = 0;
172
181
  class FBackgroundComponent extends FBackgroundBase {
173
182
  get hostElement() {
174
183
  return this.elementReference.nativeElement;
@@ -186,7 +195,7 @@ class FBackgroundComponent extends FBackgroundBase {
186
195
  const pattern = children.length ? children[0] : undefined;
187
196
  if (pattern) {
188
197
  const defs = DomElementExtensions.createSvgElement('defs');
189
- pattern.id = 'f-background-marker-' + uniqueId$8++;
198
+ pattern.id = 'f-background-marker-' + uniqueId$9++;
190
199
  this.fBackgroundPattern?.hostElement.remove();
191
200
  defs.appendChild(pattern);
192
201
  this.hostElement?.firstChild?.appendChild(defs);
@@ -383,7 +392,7 @@ function castToConnectableSide(type) {
383
392
  return result;
384
393
  }
385
394
 
386
- let uniqueId$7 = 0;
395
+ let uniqueId$8 = 0;
387
396
  class FNodeInputDirective extends FNodeInputBase {
388
397
  get disabled() {
389
398
  return this.isDisabled;
@@ -409,7 +418,7 @@ class FNodeInputDirective extends FNodeInputBase {
409
418
  this.elementReference = elementReference;
410
419
  this.fNode = fNode;
411
420
  this.fComponentsStore = fComponentsStore;
412
- this.id = `f-node-input-${uniqueId$7++}`;
421
+ this.id = `f-node-input-${uniqueId$8++}`;
413
422
  this.multiple = true;
414
423
  this.isDisabled = false;
415
424
  this._fConnectableSide = EFConnectableSide.AUTO;
@@ -488,7 +497,7 @@ function isNodeOutlet(element) {
488
497
  return !!element.closest('[fNodeOutlet]');
489
498
  }
490
499
 
491
- let uniqueId$6 = 0;
500
+ let uniqueId$7 = 0;
492
501
  class FNodeOutletDirective extends FNodeOutletBase {
493
502
  get disabled() {
494
503
  return this.isDisabled;
@@ -508,7 +517,7 @@ class FNodeOutletDirective extends FNodeOutletBase {
508
517
  this.elementReference = elementReference;
509
518
  this.fNode = fNode;
510
519
  this.fComponentsStore = fComponentsStore;
511
- this.id = `f-node-outlet-${uniqueId$6++}`;
520
+ this.id = `f-node-outlet-${uniqueId$7++}`;
512
521
  this.isDisabled = false;
513
522
  this.fConnectableSide = EFConnectableSide.AUTO;
514
523
  this._fConnectableSide = EFConnectableSide.AUTO;
@@ -571,7 +580,7 @@ function isNodeOutput(element) {
571
580
  return !!element.closest('[fNodeOutput]');
572
581
  }
573
582
 
574
- let uniqueId$5 = 0;
583
+ let uniqueId$6 = 0;
575
584
  class FNodeOutputDirective extends FNodeOutputBase {
576
585
  get disabled() {
577
586
  return this.isDisabled;
@@ -597,7 +606,7 @@ class FNodeOutputDirective extends FNodeOutputBase {
597
606
  this.elementReference = elementReference;
598
607
  this.fNode = fNode;
599
608
  this.fComponentsStore = fComponentsStore;
600
- this.id = `f-node-output-${uniqueId$5++}`;
609
+ this.id = `f-node-output-${uniqueId$6++}`;
601
610
  this.multiple = false;
602
611
  this.isDisabled = false;
603
612
  this._fConnectableSide = EFConnectableSide.AUTO;
@@ -1232,6 +1241,7 @@ function mixinChangeConnectionSelection(base) {
1232
1241
  }
1233
1242
  constructor(...args) {
1234
1243
  super(...args);
1244
+ this.fSelectionDisabled = false;
1235
1245
  }
1236
1246
  };
1237
1247
  }
@@ -1406,7 +1416,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1406
1416
  }]
1407
1417
  }] });
1408
1418
 
1409
- let uniqueId$4 = 0;
1419
+ let uniqueId$5 = 0;
1410
1420
  class FConnectionForCreateComponent extends FConnectionBase {
1411
1421
  set fBehavior(value) {
1412
1422
  this._behavior = castToConnectionBehavior(value);
@@ -1426,7 +1436,7 @@ class FConnectionForCreateComponent extends FConnectionBase {
1426
1436
  constructor(elementReference, fConnectionFactory, fComponentsStore) {
1427
1437
  super(elementReference, fConnectionFactory);
1428
1438
  this.fComponentsStore = fComponentsStore;
1429
- this.fConnectionId = `f-connection-for-create-${uniqueId$4++}`;
1439
+ this.fConnectionId = `f-connection-for-create-${uniqueId$5++}`;
1430
1440
  this.fText = '';
1431
1441
  this.fStartColor = 'black';
1432
1442
  this.fEndColor = 'black';
@@ -1489,7 +1499,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1489
1499
  args: [FConnectionCenterDirective, { descendants: true }]
1490
1500
  }] } });
1491
1501
 
1492
- let uniqueId$3 = 0;
1502
+ let uniqueId$4 = 0;
1493
1503
  class FConnectionComponent extends FConnectionBase {
1494
1504
  set fBehavior(value) {
1495
1505
  this._behavior = castToConnectionBehavior(value);
@@ -1509,7 +1519,7 @@ class FConnectionComponent extends FConnectionBase {
1509
1519
  constructor(elementReference, fConnectionFactory, fComponentsStore) {
1510
1520
  super(elementReference, fConnectionFactory);
1511
1521
  this.fComponentsStore = fComponentsStore;
1512
- this.fConnectionId = `f-connection-${uniqueId$3++}`;
1522
+ this.fConnectionId = `f-connection-${uniqueId$4++}`;
1513
1523
  this.fText = '';
1514
1524
  this.fStartColor = 'black';
1515
1525
  this.fEndColor = 'black';
@@ -1525,7 +1535,7 @@ class FConnectionComponent extends FConnectionBase {
1525
1535
  this.fComponentsStore.removeConnection(this);
1526
1536
  }
1527
1537
  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 }); }
1538
+ 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 [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 }); }
1529
1539
  }
1530
1540
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionComponent, decorators: [{
1531
1541
  type: Component,
@@ -1534,7 +1544,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1534
1544
  class: "f-component f-connection",
1535
1545
  '[class.f-connection-selection-disabled]': 'fSelectionDisabled',
1536
1546
  '[class.f-connection-reassign-disabled]': 'fDraggingDisabled',
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"] }]
1547
+ }, 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 [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"] }]
1538
1548
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: FConnectionFactory }, { type: FComponentsStore }], propDecorators: { fConnectionId: [{
1539
1549
  type: Input
1540
1550
  }], fText: [{
@@ -1698,7 +1708,7 @@ class FResizeObserver extends Observable {
1698
1708
  }
1699
1709
  }
1700
1710
 
1701
- let uniqueId$2 = 0;
1711
+ let uniqueId$3 = 0;
1702
1712
  class FNodeDirective extends FNodeBase {
1703
1713
  set position(value) {
1704
1714
  this._position = PointExtensions.castToPoint(value);
@@ -1716,7 +1726,7 @@ class FNodeDirective extends FNodeBase {
1716
1726
  this.renderer = renderer;
1717
1727
  this.fComponentsStore = fComponentsStore;
1718
1728
  this.subscriptions$ = new Subscription();
1719
- this.fNodeId = `f-node-${uniqueId$2++}`;
1729
+ this.fNodeId = `f-node-${uniqueId$3++}`;
1720
1730
  this.positionChange = new EventEmitter();
1721
1731
  this.fDraggingDisabled = false;
1722
1732
  this.fSelectionDisabled = false;
@@ -2043,6 +2053,9 @@ class FDraggableDataContext {
2043
2053
  this.onPointerDownPosition = new Point(0, 0);
2044
2054
  this.isSelectedChanged = false;
2045
2055
  }
2056
+ markSelectionAsChanged() {
2057
+ this.isSelectedChanged = true;
2058
+ }
2046
2059
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FDraggableDataContext, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2047
2060
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FDraggableDataContext }); }
2048
2061
  }
@@ -2167,9 +2180,10 @@ class CreateConnectionDragHandler {
2167
2180
  }
2168
2181
 
2169
2182
  class FCreateConnectionEvent {
2170
- constructor(fOutputId, fInputId) {
2183
+ constructor(fOutputId, fInputId, fDropPosition) {
2171
2184
  this.fOutputId = fOutputId;
2172
2185
  this.fInputId = fInputId;
2186
+ this.fDropPosition = fDropPosition;
2173
2187
  }
2174
2188
  }
2175
2189
 
@@ -2304,23 +2318,21 @@ class CreateConnectionOnPointerUp {
2304
2318
  if (isCreateConnection) {
2305
2319
  const handler = this.fDraggableDataContext.draggableItems[0];
2306
2320
  const inputsUnderPointer = this.findInputsUnderPointerHandler.handle(new FindInputsUnderPointerRequest(event, handler));
2307
- if (inputsUnderPointer.length > 0) {
2308
- let output = this.fComponentsStore.fOutputs.find((x) => x.id === handler.connection.fOutputId);
2309
- if (!output) {
2310
- output = this.fComponentsStore.fOutlets.find((x) => x.id === handler.connection.fOutputId);
2311
- }
2321
+ let output = this.fComponentsStore.fOutputs.find((x) => x.id === handler.connection.fOutputId);
2322
+ if (!output) {
2323
+ output = this.fComponentsStore.fOutlets.find((x) => x.id === handler.connection.fOutputId);
2324
+ }
2325
+ if (!output) {
2326
+ throw OutputNotFound(handler.connection.fOutputId);
2327
+ }
2328
+ const isOutlet = isNodeOutlet(output.hostElement);
2329
+ if (isOutlet) {
2330
+ output = this.findFirstCanBeConnectedOutputByOutletHandler.handle(output);
2312
2331
  if (!output) {
2313
- throw OutputNotFound(handler.connection.fOutputId);
2314
- }
2315
- const isOutlet = isNodeOutlet(output.hostElement);
2316
- if (isOutlet) {
2317
- output = this.findFirstCanBeConnectedOutputByOutletHandler.handle(output);
2318
- if (!output) {
2319
- throw RequiredOutput();
2320
- }
2332
+ throw RequiredOutput();
2321
2333
  }
2322
- this.fComponentsStore.fDraggable?.fCreateConnection.emit(new FCreateConnectionEvent(output.id, inputsUnderPointer[0]?.id));
2323
2334
  }
2335
+ this.fComponentsStore.fDraggable?.fCreateConnection.emit(new FCreateConnectionEvent(output.id, inputsUnderPointer[0]?.id, event.getPosition()));
2324
2336
  handler.complete();
2325
2337
  }
2326
2338
  }
@@ -2483,12 +2495,11 @@ class ReassignConnectionPrepareDragSequence {
2483
2495
  get flowHost() {
2484
2496
  return this.fComponentsStore.fFlow.hostElement;
2485
2497
  }
2486
- constructor(fComponentsStore, fDraggableDataContext, getConnectionHandler, fMediator, updateConnectionLayerHandler) {
2498
+ constructor(fComponentsStore, fDraggableDataContext, getConnectionHandler, fMediator) {
2487
2499
  this.fComponentsStore = fComponentsStore;
2488
2500
  this.fDraggableDataContext = fDraggableDataContext;
2489
2501
  this.getConnectionHandler = getConnectionHandler;
2490
2502
  this.fMediator = fMediator;
2491
- this.updateConnectionLayerHandler = updateConnectionLayerHandler;
2492
2503
  }
2493
2504
  handle(event) {
2494
2505
  const pointerPositionInFlow = Point.fromPoint(event.getPosition()).elementTransform(this.flowHost);
@@ -2505,7 +2516,7 @@ class ReassignConnectionPrepareDragSequence {
2505
2516
  }
2506
2517
  }
2507
2518
  if (connectionToReassign && !this.fDraggableDataContext.draggableItems.length) {
2508
- this.updateConnectionLayerHandler.handle(connectionToReassign);
2519
+ this.fMediator.send(new UpdateItemLayerRequest(connectionToReassign, this.fComponentsStore.fCanvas.fConnectionsContainer.nativeElement));
2509
2520
  this.fDraggableDataContext.onPointerDownScale = this.transform.scale;
2510
2521
  this.fDraggableDataContext.onPointerDownPosition = pointerPositionInFlow.div(this.transform.scale);
2511
2522
  this.fDraggableDataContext.draggableItems = [
@@ -2513,12 +2524,12 @@ class ReassignConnectionPrepareDragSequence {
2513
2524
  ];
2514
2525
  }
2515
2526
  }
2516
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ReassignConnectionPrepareDragSequence, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: GetConnectionHandler }, { token: FFlowMediator }, { token: UpdateConnectionLayerHandler }], target: i0.ɵɵFactoryTarget.Injectable }); }
2527
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ReassignConnectionPrepareDragSequence, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: GetConnectionHandler }, { token: FFlowMediator }], target: i0.ɵɵFactoryTarget.Injectable }); }
2517
2528
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ReassignConnectionPrepareDragSequence }); }
2518
2529
  }
2519
2530
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: ReassignConnectionPrepareDragSequence, decorators: [{
2520
2531
  type: Injectable
2521
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: GetConnectionHandler }, { type: FFlowMediator }, { type: UpdateConnectionLayerHandler }] });
2532
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: GetConnectionHandler }, { type: FFlowMediator }] });
2522
2533
 
2523
2534
  const CONNECTIONS_PROVIDERS = [
2524
2535
  FindFirstCanBeConnectedOutputByOutletHandler,
@@ -2612,7 +2623,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
2612
2623
  }]
2613
2624
  }] });
2614
2625
 
2615
- let uniqueId$1 = 0;
2626
+ let uniqueId$2 = 0;
2616
2627
  class FExternalItemDirective extends FExternalItemBase {
2617
2628
  get hostElement() {
2618
2629
  return this.elementReference.nativeElement;
@@ -2621,7 +2632,7 @@ class FExternalItemDirective extends FExternalItemBase {
2621
2632
  super();
2622
2633
  this.elementReference = elementReference;
2623
2634
  this.fExternalItemService = fExternalItemService;
2624
- this.fExternalItemId = `f-external-item-${uniqueId$1++}`;
2635
+ this.fExternalItemId = `f-external-item-${uniqueId$2++}`;
2625
2636
  this.fDisabled = false;
2626
2637
  }
2627
2638
  ngOnInit() {
@@ -2933,10 +2944,9 @@ class NodePrepareDragSequence {
2933
2944
  get flowHost() {
2934
2945
  return this.fComponentsStore.fFlow.hostElement;
2935
2946
  }
2936
- constructor(fComponentsStore, fDraggableDataContext, updateNodeLayerHandler, getOutgoingConnectionsHandler, getIncomingConnectionsHandler, fMediator) {
2947
+ constructor(fComponentsStore, fDraggableDataContext, getOutgoingConnectionsHandler, getIncomingConnectionsHandler, fMediator) {
2937
2948
  this.fComponentsStore = fComponentsStore;
2938
2949
  this.fDraggableDataContext = fDraggableDataContext;
2939
- this.updateNodeLayerHandler = updateNodeLayerHandler;
2940
2950
  this.getOutgoingConnectionsHandler = getOutgoingConnectionsHandler;
2941
2951
  this.getIncomingConnectionsHandler = getIncomingConnectionsHandler;
2942
2952
  this.fMediator = fMediator;
@@ -2951,7 +2961,7 @@ class NodePrepareDragSequence {
2951
2961
  node.select();
2952
2962
  this.fDraggableDataContext.isSelectedChanged = true;
2953
2963
  }
2954
- this.updateNodeLayerHandler.handle(node);
2964
+ this.fMediator.send(new UpdateItemLayerRequest(node, this.fComponentsStore.fCanvas.fNodesContainer.nativeElement));
2955
2965
  const itemsToDrag = this.calculateDraggableConnectionsAndNodes();
2956
2966
  const draggedNodes = itemsToDrag.filter((x) => {
2957
2967
  return x.type === EFDraggableType.NODE;
@@ -3007,12 +3017,12 @@ class NodePrepareDragSequence {
3007
3017
  getOutputsForNode(node) {
3008
3018
  return this.fComponentsStore.fOutputs.filter((x) => node.isContains(x.hostElement));
3009
3019
  }
3010
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: NodePrepareDragSequence, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: UpdateNodeLayerHandler }, { token: GetOutgoingConnectionsHandler }, { token: GetIncomingConnectionsHandler }, { token: FFlowMediator }], target: i0.ɵɵFactoryTarget.Injectable }); }
3020
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: NodePrepareDragSequence, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: GetOutgoingConnectionsHandler }, { token: GetIncomingConnectionsHandler }, { token: FFlowMediator }], target: i0.ɵɵFactoryTarget.Injectable }); }
3011
3021
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: NodePrepareDragSequence }); }
3012
3022
  }
3013
3023
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: NodePrepareDragSequence, decorators: [{
3014
3024
  type: Injectable
3015
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: UpdateNodeLayerHandler }, { type: GetOutgoingConnectionsHandler }, { type: GetIncomingConnectionsHandler }, { type: FFlowMediator }] });
3025
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: GetOutgoingConnectionsHandler }, { type: GetIncomingConnectionsHandler }, { type: FFlowMediator }] });
3016
3026
 
3017
3027
  const NODE_PROVIDERS = [
3018
3028
  NodeOnPointerUp,
@@ -3169,82 +3179,71 @@ const SELECTION_AREA_PROVIDERS = [
3169
3179
  ];
3170
3180
 
3171
3181
  class SingleSelectOnPointerDown {
3172
- constructor(fComponentsStore, fDraggableDataContext, getConnectionHandler, updateConnectionLayerHandler) {
3182
+ constructor(fComponentsStore, fDraggableDataContext, getConnectionHandler, fMediator) {
3173
3183
  this.fComponentsStore = fComponentsStore;
3174
3184
  this.fDraggableDataContext = fDraggableDataContext;
3175
3185
  this.getConnectionHandler = getConnectionHandler;
3176
- this.updateConnectionLayerHandler = updateConnectionLayerHandler;
3186
+ this.fMediator = fMediator;
3177
3187
  }
3178
3188
  handle(event) {
3179
3189
  if (!this.fComponentsStore.fFlow?.hostElement.contains(event.targetElement)) {
3180
3190
  return;
3181
3191
  }
3182
- const node = this.fComponentsStore.findNode(event.targetElement);
3183
- const connection = this.getConnectionHandler.handle(event.targetElement);
3184
- this.deselectAll(node, event);
3185
- let element;
3186
- if (this.fDraggableDataContext.selectedItems.length) {
3187
- element = this.fDraggableDataContext.selectedItems[0];
3192
+ const item = this.getSelectableItem(event);
3193
+ if (item) {
3194
+ this.fMediator.send(new UpdateItemLayerRequest(item, item.hostElement.parentElement));
3188
3195
  }
3189
- this.resetSelectionIfNotMultiselect(event);
3190
- if (node) {
3191
- if (!this.fDraggableDataContext.selectedItems.includes(node) && !node.fSelectionDisabled) {
3192
- this.fDraggableDataContext.selectedItems.push(node);
3193
- if (element?.hostElement.dataset['fNodeId'] !== node.hostElement.dataset['fNodeId']) {
3194
- this.fDraggableDataContext.isSelectedChanged = true;
3195
- }
3196
- }
3197
- else {
3198
- const index = this.fDraggableDataContext.selectedItems.indexOf(node);
3199
- if (index > -1) {
3200
- this.fDraggableDataContext.selectedItems.splice(index, 1);
3201
- }
3196
+ this.isMultiselectEnabled(event) ? this.multiSelect(item) : this.singleSelect(item);
3197
+ }
3198
+ getSelectableItem(event) {
3199
+ return this.fComponentsStore.findNode(event.targetElement) || this.getConnectionHandler.handle(event.targetElement);
3200
+ }
3201
+ isMultiselectEnabled(event) {
3202
+ return MouseEventExtensions.isCommandButton(event.originalEvent) ||
3203
+ MouseEventExtensions.isShiftPressed(event.originalEvent);
3204
+ }
3205
+ singleSelect(item) {
3206
+ if (item) {
3207
+ if (!item.isSelected() && !item.fSelectionDisabled) {
3208
+ this.clearSelection();
3209
+ this.selectItem(item);
3202
3210
  }
3203
3211
  }
3204
- else if (connection) {
3205
- this.updateConnectionLayerHandler.handle(connection);
3206
- if (!this.fDraggableDataContext.selectedItems.includes(connection) && !connection.fSelectionDisabled) {
3207
- this.fDraggableDataContext.selectedItems.push(connection);
3208
- if (element?.hostElement.id !== connection.hostElement.id) {
3209
- this.fDraggableDataContext.isSelectedChanged = true;
3210
- }
3211
- }
3212
- else {
3213
- const index = this.fDraggableDataContext.selectedItems.indexOf(connection);
3214
- if (index > -1) {
3215
- this.fDraggableDataContext.selectedItems.splice(index, 1);
3216
- }
3217
- }
3212
+ else {
3213
+ this.clearSelection();
3218
3214
  }
3219
- this.selectIfNotSelected();
3220
3215
  }
3221
- deselectAll(node, event) {
3222
- this.fDraggableDataContext.selectedItems.forEach((x) => {
3223
- if (x !== node || (!isNodeOutlet(event.targetElement) && !isNodeOutput(event.targetElement))) {
3224
- x.deselect();
3225
- }
3226
- });
3216
+ multiSelect(item) {
3217
+ if (item && !item.fSelectionDisabled) {
3218
+ item.isSelected() ? this.deselectItem(item) : this.selectItem(item);
3219
+ }
3227
3220
  }
3228
- resetSelectionIfNotMultiselect(event) {
3229
- const isMultiselect = MouseEventExtensions.isCommandButton(event.originalEvent) ||
3230
- MouseEventExtensions.isShiftPressed(event.originalEvent);
3231
- if (!isMultiselect) {
3232
- this.fDraggableDataContext.selectedItems = [];
3221
+ deselectItem(item) {
3222
+ const index = this.fDraggableDataContext.selectedItems.indexOf(item);
3223
+ if (index > -1) {
3224
+ this.fDraggableDataContext.selectedItems.splice(index, 1);
3233
3225
  }
3226
+ item.deselect();
3227
+ this.fDraggableDataContext.markSelectionAsChanged();
3228
+ }
3229
+ selectItem(item) {
3230
+ this.fDraggableDataContext.selectedItems.push(item);
3231
+ item.select();
3232
+ this.fDraggableDataContext.markSelectionAsChanged();
3234
3233
  }
3235
- selectIfNotSelected() {
3234
+ clearSelection() {
3236
3235
  this.fDraggableDataContext.selectedItems.forEach((x) => {
3237
- if (!x.isSelected()) {
3238
- x.select();
3239
- }
3236
+ x.deselect();
3237
+ this.fDraggableDataContext.markSelectionAsChanged();
3240
3238
  });
3239
+ this.fDraggableDataContext.selectedItems = [];
3241
3240
  }
3242
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: SingleSelectOnPointerDown, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: GetConnectionHandler }, { token: UpdateConnectionLayerHandler }], target: i0.ɵɵFactoryTarget.Injectable }); }
3241
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: SingleSelectOnPointerDown, deps: [{ token: FComponentsStore }, { token: FDraggableDataContext }, { token: GetConnectionHandler }, { token: FFlowMediator }], target: i0.ɵɵFactoryTarget.Injectable }); }
3243
3242
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: SingleSelectOnPointerDown }); }
3244
3243
  }
3245
3244
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: SingleSelectOnPointerDown, decorators: [{
3246
3245
  type: Injectable
3247
- }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: GetConnectionHandler }, { type: UpdateConnectionLayerHandler }] });
3246
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }, { type: GetConnectionHandler }, { type: FFlowMediator }] });
3248
3247
 
3249
3248
  const SINGLE_SELECT_PROVIDERS = [
3250
3249
  SingleSelectOnPointerDown
@@ -3812,8 +3811,8 @@ let RedrawConnectionsHandler = class RedrawConnectionsHandler {
3812
3811
  output.setConnected(true);
3813
3812
  input.setConnected(true);
3814
3813
  const vector = this.getVector(output, input, connection);
3815
- connection.setVector(vector.point1, output.fConnectableSide, vector.point2, input.fConnectableSide);
3816
3814
  connection.setMarkers();
3815
+ connection.setVector(vector.point1, output.fConnectableSide, vector.point2, input.fConnectableSide);
3817
3816
  connection.initialize();
3818
3817
  }
3819
3818
  getVector(output, input, connection) {
@@ -3907,6 +3906,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
3907
3906
  type: Injectable
3908
3907
  }], ctorParameters: () => [{ type: FComponentsStore }, { type: FDraggableDataContext }] });
3909
3908
 
3909
+ class UpdateItemLayerRequest {
3910
+ constructor(item, itemContainer) {
3911
+ this.item = item;
3912
+ this.itemContainer = itemContainer;
3913
+ }
3914
+ }
3915
+
3916
+ let UpdateItemLayerHandler = class UpdateItemLayerHandler {
3917
+ handle(request) {
3918
+ const elements = Array.from(request.itemContainer.children);
3919
+ const elementsCount = elements.length;
3920
+ const targetIndex = elements.findIndex((x) => x === request.item.hostElement);
3921
+ if (targetIndex !== elementsCount - 1) {
3922
+ const afterElements = elements.splice(targetIndex + 1);
3923
+ afterElements.forEach((x) => {
3924
+ request.itemContainer.removeChild(x);
3925
+ request.itemContainer.insertBefore(x, request.item.hostElement);
3926
+ });
3927
+ }
3928
+ }
3929
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: UpdateItemLayerHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3930
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: UpdateItemLayerHandler }); }
3931
+ };
3932
+ UpdateItemLayerHandler = __decorate([
3933
+ FHandlerRegister(UpdateItemLayerRequest)
3934
+ ], UpdateItemLayerHandler);
3935
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: UpdateItemLayerHandler, decorators: [{
3936
+ type: Injectable
3937
+ }] });
3938
+
3910
3939
  class GetConnectionHandler {
3911
3940
  get fConnections() {
3912
3941
  return this.fComponentsStore.fConnections;
@@ -3965,58 +3994,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
3965
3994
  type: Injectable
3966
3995
  }], ctorParameters: () => [{ type: FComponentsStore }] });
3967
3996
 
3968
- class UpdateNodeLayerHandler {
3969
- get fNodesContainer() {
3970
- return this.fComponentsStore.fCanvas?.fNodesContainer?.nativeElement;
3971
- }
3972
- constructor(fComponentsStore) {
3973
- this.fComponentsStore = fComponentsStore;
3974
- }
3975
- handle(node) {
3976
- const elements = Array.from(this.fNodesContainer.children);
3977
- const elementsCount = elements.length;
3978
- const targetIndex = elements.findIndex((x) => x === node.hostElement);
3979
- if (targetIndex !== elementsCount - 1) {
3980
- const afterElements = elements.splice(targetIndex + 1);
3981
- afterElements.forEach((x) => {
3982
- this.fNodesContainer.removeChild(x);
3983
- this.fNodesContainer.insertBefore(x, node.hostElement);
3984
- });
3985
- }
3986
- }
3987
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: UpdateNodeLayerHandler, deps: [{ token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Injectable }); }
3988
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: UpdateNodeLayerHandler }); }
3989
- }
3990
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: UpdateNodeLayerHandler, decorators: [{
3991
- type: Injectable
3992
- }], ctorParameters: () => [{ type: FComponentsStore }] });
3993
-
3994
- class UpdateConnectionLayerHandler {
3995
- get fConnectionsContainer() {
3996
- return this.fComponentsStore.fCanvas?.fConnectionsContainer?.nativeElement;
3997
- }
3998
- constructor(fComponentsStore) {
3999
- this.fComponentsStore = fComponentsStore;
4000
- }
4001
- handle(connection) {
4002
- const elements = Array.from(this.fConnectionsContainer.children);
4003
- const elementsCount = elements.length;
4004
- const targetIndex = elements.findIndex((x) => x === connection.hostElement);
4005
- if (targetIndex !== elementsCount - 1) {
4006
- const afterElements = elements.splice(targetIndex + 1);
4007
- afterElements.forEach((x) => {
4008
- this.fConnectionsContainer.removeChild(x);
4009
- this.fConnectionsContainer.insertBefore(x, connection.hostElement);
4010
- });
4011
- }
4012
- }
4013
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: UpdateConnectionLayerHandler, deps: [{ token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Injectable }); }
4014
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: UpdateConnectionLayerHandler }); }
4015
- }
4016
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: UpdateConnectionLayerHandler, decorators: [{
4017
- type: Injectable
4018
- }], ctorParameters: () => [{ type: FComponentsStore }] });
4019
-
4020
3997
  const COMMON_PROVIDERS = [
4021
3998
  ClearSelectionHandler,
4022
3999
  GetConnectionVectorHandler,
@@ -4027,12 +4004,14 @@ const COMMON_PROVIDERS = [
4027
4004
  RedrawConnectionsHandler,
4028
4005
  SelectHandler,
4029
4006
  SelectAllHandler,
4007
+ UpdateItemLayerHandler,
4030
4008
  GetConnectionHandler,
4031
4009
  GetInputRectInFlowHandler,
4032
4010
  GetIncomingConnectionsHandler,
4033
4011
  GetOutgoingConnectionsHandler,
4034
- UpdateConnectionLayerHandler,
4035
- UpdateNodeLayerHandler,
4012
+ // UpdateConnectionLayerHandler,
4013
+ //
4014
+ // UpdateNodeLayerHandler,
4036
4015
  ];
4037
4016
 
4038
4017
  class FCanvasComponent extends FCanvasBase {
@@ -4423,7 +4402,7 @@ const F_FLOW = new InjectionToken('F_FLOW');
4423
4402
  class FFlowBase {
4424
4403
  }
4425
4404
 
4426
- let uniqueId = 0;
4405
+ let uniqueId$1 = 0;
4427
4406
  class FFlowComponent extends FFlowBase {
4428
4407
  get hostElement() {
4429
4408
  return this.elementReference.nativeElement;
@@ -4434,7 +4413,7 @@ class FFlowComponent extends FFlowBase {
4434
4413
  this.fComponentsStore = fComponentsStore;
4435
4414
  this.fMediator = fMediator;
4436
4415
  this.subscription$ = new Subscription();
4437
- this.fFlowId = `f-flow-${uniqueId++}`;
4416
+ this.fFlowId = `f-flow-${uniqueId$1++}`;
4438
4417
  this.fLoaded = new EventEmitter();
4439
4418
  this.isLoaded = false;
4440
4419
  }
@@ -4518,6 +4497,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
4518
4497
  type: Output
4519
4498
  }] } });
4520
4499
 
4500
+ const F_GROUP = new InjectionToken('F_GROUP');
4501
+ class FGroupBase {
4502
+ isContains(element) {
4503
+ return this.hostElement.contains(element);
4504
+ }
4505
+ redraw() {
4506
+ this.setStyle('transform', 'translate(' + this.position.x + 'px,' + this.position.y + 'px)');
4507
+ this.setStyle('width', `${this.size.width}px`);
4508
+ this.setStyle('height', `${this.size.height}px`);
4509
+ }
4510
+ }
4511
+
4512
+ let uniqueId = 0;
4513
+ class FGroupDirective extends FGroupBase {
4514
+ get hostElement() {
4515
+ return this.elementReference.nativeElement;
4516
+ }
4517
+ constructor(elementReference, renderer, fComponentsStore) {
4518
+ super();
4519
+ this.elementReference = elementReference;
4520
+ this.renderer = renderer;
4521
+ this.fComponentsStore = fComponentsStore;
4522
+ this.subscriptions$ = new Subscription();
4523
+ this.fGroupId = `f-group-${uniqueId++}`;
4524
+ }
4525
+ ngOnInit() {
4526
+ this.setStyle('position', 'absolute');
4527
+ this.setStyle('transform-origin', '0 0');
4528
+ this.setStyle('user-select', 'none');
4529
+ this.setStyle('pointer-events', 'all');
4530
+ this.setStyle('left', '0');
4531
+ this.setStyle('top', '0');
4532
+ super.redraw();
4533
+ this.fComponentsStore.addGroup(this);
4534
+ }
4535
+ setStyle(styleName, value) {
4536
+ this.renderer.setStyle(this.hostElement, styleName, value);
4537
+ }
4538
+ ngOnDestroy() {
4539
+ this.fComponentsStore.removeGroup(this);
4540
+ this.subscriptions$.unsubscribe();
4541
+ }
4542
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FGroupDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Directive }); }
4543
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: FGroupDirective, selector: "[fGroup]", inputs: { fGroupId: "fGroupId" }, host: { properties: { "attr.data-f-group-id": "fGroupId" }, classAttribute: "f-group f-component" }, providers: [
4544
+ { provide: F_GROUP, useExisting: FGroupDirective }
4545
+ ], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0 }); }
4546
+ }
4547
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FGroupDirective, decorators: [{
4548
+ type: Directive,
4549
+ args: [{
4550
+ selector: "[fGroup]",
4551
+ exportAs: "fComponent",
4552
+ host: {
4553
+ '[attr.data-f-group-id]': 'fGroupId',
4554
+ class: "f-group f-component",
4555
+ },
4556
+ providers: [
4557
+ { provide: F_GROUP, useExisting: FGroupDirective }
4558
+ ],
4559
+ }]
4560
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: FComponentsStore }], propDecorators: { fGroupId: [{
4561
+ type: Input
4562
+ }] } });
4563
+
4564
+ function isGroup(element) {
4565
+ return !!element.closest('[f-group]');
4566
+ }
4567
+
4521
4568
  class FFlowModule {
4522
4569
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FFlowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4523
4570
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.1", ngImport: i0, type: FFlowModule, declarations: [FConnectionDragHandleComponent,
@@ -4533,6 +4580,7 @@ class FFlowModule {
4533
4580
  FCellPatternComponent,
4534
4581
  FCanvasComponent,
4535
4582
  FNodeDirective,
4583
+ FGroupDirective,
4536
4584
  FDragHandleDirective,
4537
4585
  FConnectionComponent,
4538
4586
  FConnectionForCreateComponent,
@@ -4582,6 +4630,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
4582
4630
  FCellPatternComponent,
4583
4631
  FCanvasComponent,
4584
4632
  FNodeDirective,
4633
+ FGroupDirective,
4585
4634
  FDragHandleDirective,
4586
4635
  FConnectionComponent,
4587
4636
  FConnectionForCreateComponent,
@@ -4627,5 +4676,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
4627
4676
  * Generated bundle index. Do not edit.
4628
4677
  */
4629
4678
 
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 };
4679
+ 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, FGroupBase, FGroupDirective, 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_GROUP, 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, UpdateItemLayerHandler, UpdateItemLayerRequest, castToConnectableSide, castToConnectionBehavior, castToConnectionType, getExternalItem, getFlowUid, isExternalItem, isGroup, isNode, isNodeDragHandle, isNodeInput, isNodeOutlet, isNodeOutput, mixinChangeConnectionSelection, mixinChangeConnectionVisibility };
4631
4680
  //# sourceMappingURL=foblex-flow.mjs.map