@foblex/flow 1.1.7 → 1.1.9

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.
@@ -560,6 +560,8 @@ function isNodeInput(element) {
560
560
  return !!element.closest('[fNodeInput]');
561
561
  }
562
562
 
563
+ const F_FLOW_CONNECTOR_PARENT = new InjectionToken('F_FLOW_CONNECTOR_PARENT');
564
+
563
565
  let uniqueId$7 = 0;
564
566
  class FNodeInputDirective extends FNodeInputBase {
565
567
  get color() {
@@ -578,14 +580,19 @@ class FNodeInputDirective extends FNodeInputBase {
578
580
  get hostElement() {
579
581
  return this.elementReference.nativeElement;
580
582
  }
581
- constructor(elementReference) {
583
+ constructor(elementReference, _parentFlow) {
582
584
  super();
583
585
  this.elementReference = elementReference;
586
+ this._parentFlow = _parentFlow;
584
587
  this.id = `f-node-input-${uniqueId$7++}`;
585
588
  this.multiple = true;
586
589
  this.isDisabled = false;
590
+ this._parentFlow?.addConnector(this);
591
+ }
592
+ ngOnDestroy() {
593
+ this._parentFlow?.removeConnector(this);
587
594
  }
588
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: FNodeInputDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
595
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: FNodeInputDirective, deps: [{ token: i0.ElementRef }, { token: F_FLOW_CONNECTOR_PARENT, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive }); }
589
596
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.5", type: FNodeInputDirective, selector: "[fNodeInput]", inputs: { id: "id", fNodeInputColor: "fNodeInputColor", multiple: ["fNodeInputMultiple", "multiple"], disabled: ["fNodeInputDisabled", "disabled"] }, host: { properties: { "attr.id": "id", "class.f-node-input-multiple": "multiple", "class.f-node-input-disabled": "disabled", "class.f-node-input-not-connectable": "!canBeConnected" }, classAttribute: "f-component f-node-input" }, providers: [{ provide: F_NODE_INPUT_DIRECTIVE, useExisting: FNodeInputDirective }], usesInheritance: true, ngImport: i0 }); }
590
597
  }
591
598
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: FNodeInputDirective, decorators: [{
@@ -601,7 +608,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
601
608
  },
602
609
  providers: [{ provide: F_NODE_INPUT_DIRECTIVE, useExisting: FNodeInputDirective }],
603
610
  }]
604
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { id: [{
611
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
612
+ type: Inject,
613
+ args: [F_FLOW_CONNECTOR_PARENT]
614
+ }, {
615
+ type: Optional
616
+ }, {
617
+ type: SkipSelf
618
+ }] }]; }, propDecorators: { id: [{
605
619
  type: Input
606
620
  }], fNodeInputColor: [{
607
621
  type: Input,
@@ -655,16 +669,21 @@ class FNodeOutletDirective extends FNodeOutletBase {
655
669
  get hostElement() {
656
670
  return this.elementReference.nativeElement;
657
671
  }
658
- constructor(elementReference) {
672
+ constructor(elementReference, _parentFlow) {
659
673
  super();
660
674
  this.elementReference = elementReference;
675
+ this._parentFlow = _parentFlow;
661
676
  this.id = `f-node-outlet-${uniqueId$6++}`;
662
677
  this.color = 'black';
663
678
  this.name = '';
664
679
  this.isDisabled = false;
665
680
  this.isConnectionFromOutlet = false;
681
+ this._parentFlow?.addConnector(this);
666
682
  }
667
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: FNodeOutletDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
683
+ ngOnDestroy() {
684
+ this._parentFlow?.removeConnector(this);
685
+ }
686
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: FNodeOutletDirective, deps: [{ token: i0.ElementRef }, { token: F_FLOW_CONNECTOR_PARENT, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive }); }
668
687
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.5", type: FNodeOutletDirective, selector: "[fNodeOutlet]", inputs: { id: "id", color: ["fNodeOutletColor", "color"], name: "name", disabled: ["fNodeOutletDisabled", "disabled"], isConnectionFromOutlet: "isConnectionFromOutlet" }, host: { properties: { "attr.id": "id", "class.f-node-outlet-disabled": "disabled" }, classAttribute: "f-component f-node-outlet" }, providers: [{ provide: F_NODE_OUTLET_DIRECTIVE, useExisting: FNodeOutletDirective }], usesInheritance: true, ngImport: i0 }); }
669
688
  }
670
689
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: FNodeOutletDirective, decorators: [{
@@ -678,7 +697,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
678
697
  },
679
698
  providers: [{ provide: F_NODE_OUTLET_DIRECTIVE, useExisting: FNodeOutletDirective }],
680
699
  }]
681
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { id: [{
700
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
701
+ type: Inject,
702
+ args: [F_FLOW_CONNECTOR_PARENT]
703
+ }, {
704
+ type: Optional
705
+ }, {
706
+ type: SkipSelf
707
+ }] }]; }, propDecorators: { id: [{
682
708
  type: Input
683
709
  }], color: [{
684
710
  type: Input,
@@ -727,15 +753,20 @@ class FNodeOutputDirective extends FNodeOutputBase {
727
753
  get hostElement() {
728
754
  return this.elementReference.nativeElement;
729
755
  }
730
- constructor(elementReference) {
756
+ constructor(elementReference, _parentFlow) {
731
757
  super();
732
758
  this.elementReference = elementReference;
759
+ this._parentFlow = _parentFlow;
733
760
  this.id = `f-node-output-${uniqueId$5++}`;
734
761
  this.color = 'black';
735
762
  this.name = '';
736
763
  this.isDisabled = false;
764
+ this._parentFlow?.addConnector(this);
765
+ }
766
+ ngOnDestroy() {
767
+ this._parentFlow?.removeConnector(this);
737
768
  }
738
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: FNodeOutputDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
769
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: FNodeOutputDirective, deps: [{ token: i0.ElementRef }, { token: F_FLOW_CONNECTOR_PARENT, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.Directive }); }
739
770
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.5", type: FNodeOutputDirective, selector: "[fNodeOutput]", inputs: { id: "id", color: ["fNodeOutputColor", "color"], name: "name", disabled: ["fNodeOutputDisabled", "disabled"] }, host: { properties: { "attr.id": "id", "class.f-node-output-disabled": "disabled", "class.f-node-output-connected": "isConnected" }, classAttribute: "f-component f-node-output" }, providers: [{ provide: F_NODE_OUTPUT_DIRECTIVE, useExisting: FNodeOutputDirective }], usesInheritance: true, ngImport: i0 }); }
740
771
  }
741
772
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: FNodeOutputDirective, decorators: [{
@@ -750,7 +781,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
750
781
  },
751
782
  providers: [{ provide: F_NODE_OUTPUT_DIRECTIVE, useExisting: FNodeOutputDirective }],
752
783
  }]
753
- }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { id: [{
784
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: undefined, decorators: [{
785
+ type: Inject,
786
+ args: [F_FLOW_CONNECTOR_PARENT]
787
+ }, {
788
+ type: Optional
789
+ }, {
790
+ type: SkipSelf
791
+ }] }]; }, propDecorators: { id: [{
754
792
  type: Input
755
793
  }], color: [{
756
794
  type: Input,
@@ -2050,10 +2088,10 @@ class NodeOnPointerDown {
2050
2088
  return itemsToDrag;
2051
2089
  }
2052
2090
  getInputsForNode(node) {
2053
- return this.fFlow.inputs.toArray().filter((x) => node.isContains(x.hostElement));
2091
+ return this.fFlow.inputs.filter((x) => node.isContains(x.hostElement));
2054
2092
  }
2055
2093
  getOutputsForNode(node) {
2056
- return this.fFlow.outputs.toArray().filter((x) => node.isContains(x.hostElement));
2094
+ return this.fFlow.outputs.filter((x) => node.isContains(x.hostElement));
2057
2095
  }
2058
2096
  }
2059
2097
 
@@ -2103,13 +2141,13 @@ class SelectionOnPointerMove {
2103
2141
  const nodeRects = fFlow.fNodesContainer.fNodes.map((x) => {
2104
2142
  return {
2105
2143
  element: x,
2106
- rect: getElementRectInCanvas(x.hostElement, fFlow.transform, this.fFlow.hostElement)
2144
+ rect: RectExtensions.mult(getElementRectInCanvas(x.hostElement, fFlow.transform, this.fFlow.hostElement), fFlow.transform.scale)
2107
2145
  };
2108
2146
  });
2109
2147
  const lineRects = fFlow.fConnectionsContainer.fConnections.map((x) => {
2110
2148
  return {
2111
2149
  element: x,
2112
- rect: getElementRectInCanvas(x.fPath.hostElement, fFlow.transform, this.fFlow.hostElement)
2150
+ rect: RectExtensions.mult(getElementRectInCanvas(x.fPath.hostElement, fFlow.transform, this.fFlow.hostElement), fFlow.transform.scale)
2113
2151
  };
2114
2152
  });
2115
2153
  this.items = [...nodeRects, ...lineRects].filter((x) => {
@@ -2664,12 +2702,9 @@ class ConnectIfIntersectHandler {
2664
2702
  const incomingConnections = findIncomingConnections(this.connections, [input]);
2665
2703
  if (outgoingConnections.length === 0 && incomingConnections.length === 0) {
2666
2704
  const connections = this.findConnectionsUnderNode(fNode);
2667
- console.log('connections', connections);
2668
- // if (connections.length) {
2669
- // const connectedTo = (connections[ 0 ].fromTo?.output as FNodeOutputBase).connectedTo;
2670
- // (connections[ 0 ].fromTo?.output as FNodeOutputBase).connectTo(input.id);
2671
- // output.connectTo(connectedTo);
2672
- // }
2705
+ if (connections.length) {
2706
+ console.log('connections', connections);
2707
+ }
2673
2708
  }
2674
2709
  }
2675
2710
  }
@@ -2892,6 +2927,7 @@ class FFlowBase {
2892
2927
  this.changeDetectorRef = changeDetectorRef;
2893
2928
  this.ngZone = ngZone;
2894
2929
  this.onDestroy = new Subject();
2930
+ this.connectorChanges = new Subject();
2895
2931
  }
2896
2932
  ngAfterContentInit() {
2897
2933
  this.subscribeOnComponentsChanges();
@@ -2900,9 +2936,7 @@ class FFlowBase {
2900
2936
  const changes = [
2901
2937
  this.fNodesContainer.fNodes.changes,
2902
2938
  this.fConnectionsContainer.fConnections.changes,
2903
- this.outlets.changes,
2904
- this.outputs.changes,
2905
- this.inputs.changes
2939
+ this.connectorChanges
2906
2940
  ];
2907
2941
  merge(...changes).pipe(startWith(null), takeUntil(this.onDestroy)).subscribe(() => {
2908
2942
  const changedOrDestroyed = merge(...changes, this.onDestroy);
@@ -2944,9 +2978,39 @@ class FFlowComponent extends FFlowBase {
2944
2978
  this.CONNECTION_MARKER_START_SELECTED = CONNECTION_MARKER_START_SELECTED;
2945
2979
  this.CONNECTION_MARKER_END_SELECTED = CONNECTION_MARKER_END_SELECTED;
2946
2980
  this.id = `f-flow-${uniqueId$1++}`;
2981
+ this.outlets = [];
2982
+ this.outputs = [];
2983
+ this.inputs = [];
2984
+ }
2985
+ addConnector(connector) {
2986
+ if (connector instanceof FNodeOutletBase) {
2987
+ this.outlets.push(connector);
2988
+ }
2989
+ else if (connector instanceof FNodeInputBase) {
2990
+ this.inputs.push(connector);
2991
+ }
2992
+ else if (connector instanceof FNodeOutputBase) {
2993
+ this.outputs.push(connector);
2994
+ }
2995
+ this.connectorChanges.next();
2996
+ }
2997
+ removeConnector(connector) {
2998
+ if (connector instanceof FNodeOutletBase) {
2999
+ this.outlets = this.outlets.filter(x => x !== connector);
3000
+ }
3001
+ else if (connector instanceof FNodeInputBase) {
3002
+ this.inputs = this.inputs.filter(x => x !== connector);
3003
+ }
3004
+ else if (connector instanceof FNodeOutputBase) {
3005
+ this.outputs = this.outputs.filter(x => x !== connector);
3006
+ }
3007
+ this.connectorChanges.next();
2947
3008
  }
2948
3009
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: FFlowComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
2949
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.5", type: FFlowComponent, selector: "svg[fFlow]", inputs: { id: "id" }, host: { properties: { "attr.id": "id" }, classAttribute: "f-component f-flow" }, providers: [{ provide: F_FLOW_COMPONENT, useExisting: FFlowComponent }], queries: [{ propertyName: "fNodesContainer", first: true, predicate: F_NODES_CONTAINER, descendants: true, static: true }, { propertyName: "fConnectionsContainer", first: true, predicate: F_CONNECTIONS_CONTAINER, descendants: true }, { propertyName: "fItemsContainer", first: true, predicate: F_ITEMS_CONTAINER, descendants: true, static: true }, { propertyName: "outlets", predicate: F_NODE_OUTLET_DIRECTIVE, descendants: true }, { propertyName: "outputs", predicate: F_NODE_OUTPUT_DIRECTIVE, descendants: true }, { propertyName: "inputs", predicate: F_NODE_INPUT_DIRECTIVE, descendants: true }], viewQueries: [{ propertyName: "fBackground", first: true, predicate: F_BACKGROUND, descendants: true, static: true }], usesInheritance: true, hostDirectives: [{ directive: FCanvasDirective }], ngImport: i0, template: "<ng-container xmlns:svg=\"http://www.w3.org/2000/svg\">\n <svg:g fBackground>\n <rect width=\"100%\" height=\"100%\" fill=\"url(#background)\"></rect>\n </svg:g>\n <ng-content></ng-content>\n <svg:defs>\n <svg:marker [id]=\"CONNECTION_MARKER_START\" class=\"connection-marker-start\" markerHeight=\"10\" markerWidth=\"10\" refY=\"5\" refX=\"5\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"2\"></svg:circle>\n </svg:marker>\n <svg:marker [id]=\"CONNECTION_MARKER_END\" class=\"connection-marker-end\" markerHeight=\"10\" markerWidth=\"10\" orient=\"auto\" refX=\"5\" refY=\"3\">\n <svg:path d=\"M0,0 L6,3 0,6Z\"></svg:path>\n </svg:marker>\n <svg:marker [id]=\"CONNECTION_MARKER_START_SELECTED\" class=\"connection-marker-start f-selected\" markerHeight=\"10\" markerWidth=\"10\" refY=\"5\" refX=\"5\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"2\"></svg:circle>\n </svg:marker>\n <svg:marker [id]=\"CONNECTION_MARKER_END_SELECTED\" class=\"connection-marker-end f-selected\" markerHeight=\"10\" markerWidth=\"10\" orient=\"auto\" refX=\"5\" refY=\"3\">\n <svg:path d=\"M0,0 L6,3 0,6Z\"></svg:path>\n </svg:marker>\n <ng-container *ngIf=\"fConnectionsContainer\">\n <ng-container *ngFor=\"let connection of fConnectionsContainer.fConnections.toArray()\">\n <svg:marker [id]=\"'connection-marker-start-' + connection.fromTo?.output?.color\" markerHeight=\"10\" markerWidth=\"10\" refY=\"5\" refX=\"5\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"2\" [attr.stroke]=\"'none'\" [attr.fill]=\"connection.fromTo?.output?.color\"></svg:circle>\n </svg:marker>\n <svg:marker [id]=\"'connection-marker-end-' + connection.fromTo?.input?.color\" markerHeight=\"10\" markerWidth=\"10\" orient=\"auto\" refX=\"5\" refY=\"3\">\n <svg:path d=\"M0,0 L6,3 0,6Z\" [attr.stroke]=\"'none'\" [attr.fill]=\"connection.fromTo?.input?.color\"></svg:path>\n </svg:marker>\n </ng-container>\n\n </ng-container>\n <svg:pattern id=\"background\" height=\"10\" width=\"10\" class=\"fb-background-pattern\"\n patternUnits=\"userSpaceOnUse\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"0.5\"/>\n </svg:pattern>\n </svg:defs>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: FBackgroundDirective, selector: "g[fBackground]" }] }); }
3010
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.5", type: FFlowComponent, selector: "svg[fFlow]", inputs: { id: "id" }, host: { properties: { "attr.id": "id" }, classAttribute: "f-component f-flow" }, providers: [
3011
+ { provide: F_FLOW_COMPONENT, useExisting: FFlowComponent },
3012
+ { provide: F_FLOW_CONNECTOR_PARENT, useExisting: FFlowComponent }
3013
+ ], queries: [{ propertyName: "fNodesContainer", first: true, predicate: F_NODES_CONTAINER, descendants: true, static: true }, { propertyName: "fConnectionsContainer", first: true, predicate: F_CONNECTIONS_CONTAINER, descendants: true }, { propertyName: "fItemsContainer", first: true, predicate: F_ITEMS_CONTAINER, descendants: true, static: true }], viewQueries: [{ propertyName: "fBackground", first: true, predicate: F_BACKGROUND, descendants: true, static: true }], usesInheritance: true, hostDirectives: [{ directive: FCanvasDirective }], ngImport: i0, template: "<ng-container xmlns:svg=\"http://www.w3.org/2000/svg\">\n <svg:g fBackground>\n <rect width=\"100%\" height=\"100%\" fill=\"url(#background)\"></rect>\n </svg:g>\n <ng-content></ng-content>\n <svg:defs>\n <svg:marker [id]=\"CONNECTION_MARKER_START\" class=\"connection-marker-start\" markerHeight=\"10\" markerWidth=\"10\" refY=\"5\" refX=\"5\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"2\"></svg:circle>\n </svg:marker>\n <svg:marker [id]=\"CONNECTION_MARKER_END\" class=\"connection-marker-end\" markerHeight=\"10\" markerWidth=\"10\" orient=\"auto\" refX=\"5\" refY=\"3\">\n <svg:path d=\"M0,0 L6,3 0,6Z\"></svg:path>\n </svg:marker>\n <svg:marker [id]=\"CONNECTION_MARKER_START_SELECTED\" class=\"connection-marker-start f-selected\" markerHeight=\"10\" markerWidth=\"10\" refY=\"5\" refX=\"5\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"2\"></svg:circle>\n </svg:marker>\n <svg:marker [id]=\"CONNECTION_MARKER_END_SELECTED\" class=\"connection-marker-end f-selected\" markerHeight=\"10\" markerWidth=\"10\" orient=\"auto\" refX=\"5\" refY=\"3\">\n <svg:path d=\"M0,0 L6,3 0,6Z\"></svg:path>\n </svg:marker>\n <ng-container *ngIf=\"fConnectionsContainer\">\n <ng-container *ngFor=\"let connection of fConnectionsContainer.fConnections.toArray()\">\n <svg:marker [id]=\"'connection-marker-start-' + connection.fromTo?.output?.color\" markerHeight=\"10\" markerWidth=\"10\" refY=\"5\" refX=\"5\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"2\" [attr.stroke]=\"'none'\" [attr.fill]=\"connection.fromTo?.output?.color\"></svg:circle>\n </svg:marker>\n <svg:marker [id]=\"'connection-marker-end-' + connection.fromTo?.input?.color\" markerHeight=\"10\" markerWidth=\"10\" orient=\"auto\" refX=\"5\" refY=\"3\">\n <svg:path d=\"M0,0 L6,3 0,6Z\" [attr.stroke]=\"'none'\" [attr.fill]=\"connection.fromTo?.input?.color\"></svg:path>\n </svg:marker>\n </ng-container>\n\n </ng-container>\n <svg:pattern id=\"background\" height=\"10\" width=\"10\" class=\"fb-background-pattern\"\n patternUnits=\"userSpaceOnUse\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"0.5\"/>\n </svg:pattern>\n </svg:defs>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: FBackgroundDirective, selector: "g[fBackground]" }] }); }
2950
3014
  }
2951
3015
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImport: i0, type: FFlowComponent, decorators: [{
2952
3016
  type: Component,
@@ -2957,7 +3021,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
2957
3021
  ], host: {
2958
3022
  '[attr.id]': 'id',
2959
3023
  class: "f-component f-flow"
2960
- }, providers: [{ provide: F_FLOW_COMPONENT, useExisting: FFlowComponent }], template: "<ng-container xmlns:svg=\"http://www.w3.org/2000/svg\">\n <svg:g fBackground>\n <rect width=\"100%\" height=\"100%\" fill=\"url(#background)\"></rect>\n </svg:g>\n <ng-content></ng-content>\n <svg:defs>\n <svg:marker [id]=\"CONNECTION_MARKER_START\" class=\"connection-marker-start\" markerHeight=\"10\" markerWidth=\"10\" refY=\"5\" refX=\"5\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"2\"></svg:circle>\n </svg:marker>\n <svg:marker [id]=\"CONNECTION_MARKER_END\" class=\"connection-marker-end\" markerHeight=\"10\" markerWidth=\"10\" orient=\"auto\" refX=\"5\" refY=\"3\">\n <svg:path d=\"M0,0 L6,3 0,6Z\"></svg:path>\n </svg:marker>\n <svg:marker [id]=\"CONNECTION_MARKER_START_SELECTED\" class=\"connection-marker-start f-selected\" markerHeight=\"10\" markerWidth=\"10\" refY=\"5\" refX=\"5\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"2\"></svg:circle>\n </svg:marker>\n <svg:marker [id]=\"CONNECTION_MARKER_END_SELECTED\" class=\"connection-marker-end f-selected\" markerHeight=\"10\" markerWidth=\"10\" orient=\"auto\" refX=\"5\" refY=\"3\">\n <svg:path d=\"M0,0 L6,3 0,6Z\"></svg:path>\n </svg:marker>\n <ng-container *ngIf=\"fConnectionsContainer\">\n <ng-container *ngFor=\"let connection of fConnectionsContainer.fConnections.toArray()\">\n <svg:marker [id]=\"'connection-marker-start-' + connection.fromTo?.output?.color\" markerHeight=\"10\" markerWidth=\"10\" refY=\"5\" refX=\"5\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"2\" [attr.stroke]=\"'none'\" [attr.fill]=\"connection.fromTo?.output?.color\"></svg:circle>\n </svg:marker>\n <svg:marker [id]=\"'connection-marker-end-' + connection.fromTo?.input?.color\" markerHeight=\"10\" markerWidth=\"10\" orient=\"auto\" refX=\"5\" refY=\"3\">\n <svg:path d=\"M0,0 L6,3 0,6Z\" [attr.stroke]=\"'none'\" [attr.fill]=\"connection.fromTo?.input?.color\"></svg:path>\n </svg:marker>\n </ng-container>\n\n </ng-container>\n <svg:pattern id=\"background\" height=\"10\" width=\"10\" class=\"fb-background-pattern\"\n patternUnits=\"userSpaceOnUse\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"0.5\"/>\n </svg:pattern>\n </svg:defs>\n</ng-container>\n" }]
3024
+ }, providers: [
3025
+ { provide: F_FLOW_COMPONENT, useExisting: FFlowComponent },
3026
+ { provide: F_FLOW_CONNECTOR_PARENT, useExisting: FFlowComponent }
3027
+ ], template: "<ng-container xmlns:svg=\"http://www.w3.org/2000/svg\">\n <svg:g fBackground>\n <rect width=\"100%\" height=\"100%\" fill=\"url(#background)\"></rect>\n </svg:g>\n <ng-content></ng-content>\n <svg:defs>\n <svg:marker [id]=\"CONNECTION_MARKER_START\" class=\"connection-marker-start\" markerHeight=\"10\" markerWidth=\"10\" refY=\"5\" refX=\"5\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"2\"></svg:circle>\n </svg:marker>\n <svg:marker [id]=\"CONNECTION_MARKER_END\" class=\"connection-marker-end\" markerHeight=\"10\" markerWidth=\"10\" orient=\"auto\" refX=\"5\" refY=\"3\">\n <svg:path d=\"M0,0 L6,3 0,6Z\"></svg:path>\n </svg:marker>\n <svg:marker [id]=\"CONNECTION_MARKER_START_SELECTED\" class=\"connection-marker-start f-selected\" markerHeight=\"10\" markerWidth=\"10\" refY=\"5\" refX=\"5\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"2\"></svg:circle>\n </svg:marker>\n <svg:marker [id]=\"CONNECTION_MARKER_END_SELECTED\" class=\"connection-marker-end f-selected\" markerHeight=\"10\" markerWidth=\"10\" orient=\"auto\" refX=\"5\" refY=\"3\">\n <svg:path d=\"M0,0 L6,3 0,6Z\"></svg:path>\n </svg:marker>\n <ng-container *ngIf=\"fConnectionsContainer\">\n <ng-container *ngFor=\"let connection of fConnectionsContainer.fConnections.toArray()\">\n <svg:marker [id]=\"'connection-marker-start-' + connection.fromTo?.output?.color\" markerHeight=\"10\" markerWidth=\"10\" refY=\"5\" refX=\"5\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"2\" [attr.stroke]=\"'none'\" [attr.fill]=\"connection.fromTo?.output?.color\"></svg:circle>\n </svg:marker>\n <svg:marker [id]=\"'connection-marker-end-' + connection.fromTo?.input?.color\" markerHeight=\"10\" markerWidth=\"10\" orient=\"auto\" refX=\"5\" refY=\"3\">\n <svg:path d=\"M0,0 L6,3 0,6Z\" [attr.stroke]=\"'none'\" [attr.fill]=\"connection.fromTo?.input?.color\"></svg:path>\n </svg:marker>\n </ng-container>\n\n </ng-container>\n <svg:pattern id=\"background\" height=\"10\" width=\"10\" class=\"fb-background-pattern\"\n patternUnits=\"userSpaceOnUse\">\n <svg:circle cx=\"5\" cy=\"5\" r=\"0.5\"/>\n </svg:pattern>\n </svg:defs>\n</ng-container>\n" }]
2961
3028
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }]; }, propDecorators: { id: [{
2962
3029
  type: Input
2963
3030
  }], fNodesContainer: [{
@@ -2972,15 +3039,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.5", ngImpor
2972
3039
  }], fBackground: [{
2973
3040
  type: ViewChild,
2974
3041
  args: [F_BACKGROUND, { static: true }]
2975
- }], outlets: [{
2976
- type: ContentChildren,
2977
- args: [F_NODE_OUTLET_DIRECTIVE, { descendants: true }]
2978
- }], outputs: [{
2979
- type: ContentChildren,
2980
- args: [F_NODE_OUTPUT_DIRECTIVE, { descendants: true }]
2981
- }], inputs: [{
2982
- type: ContentChildren,
2983
- args: [F_NODE_INPUT_DIRECTIVE, { descendants: true }]
2984
3042
  }] } });
2985
3043
 
2986
3044
  let uniqueId = 0;