@foblex/flow 12.2.2 → 12.2.3

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 (157) hide show
  1. package/domain/create-connection-markers/create-connection-markers-request.d.ts +5 -0
  2. package/domain/create-connection-markers/create-connection-markers.handler.d.ts +10 -0
  3. package/domain/create-connection-markers/index.d.ts +2 -0
  4. package/domain/get-connection.handler.d.ts +1 -1
  5. package/domain/get-element-rect-in-flow/get-element-rect-in-flow.handler.d.ts +1 -1
  6. package/domain/get-incoming-connections.handler.d.ts +1 -1
  7. package/domain/get-input-rect-in-flow/get-input-rect-in-flow.handler.d.ts +1 -1
  8. package/domain/get-nodes-rect/get-nodes-rect.handler.d.ts +1 -1
  9. package/domain/get-outgoing-connections.handler.d.ts +1 -1
  10. package/domain/get-output-rect-in-flow/get-output-rect-in-flow.handler.d.ts +1 -1
  11. package/domain/get-position-in-flow/get-position-in-flow-request.d.ts +5 -0
  12. package/domain/get-position-in-flow/get-position-in-flow.handler.d.ts +13 -0
  13. package/domain/get-position-in-flow/index.d.ts +2 -0
  14. package/domain/index.d.ts +2 -0
  15. package/domain/providers.d.ts +3 -1
  16. package/domain/redraw-connections/redraw-connections.handler.d.ts +2 -1
  17. package/domain/select/select.handler.d.ts +1 -1
  18. package/domain/select-all/select-all.handler.d.ts +1 -1
  19. package/esm2022/domain/create-connection-markers/create-connection-markers-request.mjs +6 -0
  20. package/esm2022/domain/create-connection-markers/create-connection-markers.handler.mjs +49 -0
  21. package/esm2022/domain/create-connection-markers/index.mjs +3 -0
  22. package/esm2022/domain/get-connection.handler.mjs +3 -4
  23. package/esm2022/domain/get-element-rect-in-flow/get-element-rect-in-flow.handler.mjs +3 -4
  24. package/esm2022/domain/get-incoming-connections.handler.mjs +2 -2
  25. package/esm2022/domain/get-input-rect-in-flow/get-input-rect-in-flow.handler.mjs +2 -2
  26. package/esm2022/domain/get-nodes-rect/get-nodes-rect.handler.mjs +2 -2
  27. package/esm2022/domain/get-outgoing-connections.handler.mjs +2 -2
  28. package/esm2022/domain/get-output-rect-in-flow/get-output-rect-in-flow.handler.mjs +2 -2
  29. package/esm2022/domain/get-position-in-flow/get-position-in-flow-request.mjs +6 -0
  30. package/esm2022/domain/get-position-in-flow/get-position-in-flow.handler.mjs +32 -0
  31. package/esm2022/domain/get-position-in-flow/index.mjs +3 -0
  32. package/esm2022/domain/index.mjs +3 -1
  33. package/esm2022/domain/providers.mjs +5 -4
  34. package/esm2022/domain/redraw-connections/redraw-connections.handler.mjs +11 -4
  35. package/esm2022/domain/select/select.handler.mjs +3 -3
  36. package/esm2022/domain/select-all/select-all.handler.mjs +2 -2
  37. package/esm2022/f-backgroud/f-background.component.mjs +4 -4
  38. package/esm2022/f-backgroud/f-circle-pattern/f-circle-pattern.component.mjs +100 -0
  39. package/esm2022/f-backgroud/f-circle-pattern/index.mjs +2 -0
  40. package/esm2022/f-backgroud/f-rect-pattern/f-rect-pattern.component.mjs +118 -0
  41. package/esm2022/f-backgroud/{f-cell-pattern → f-rect-pattern}/index.mjs +2 -2
  42. package/esm2022/f-backgroud/index.mjs +3 -2
  43. package/esm2022/f-canvas/f-canvas.component.mjs +4 -4
  44. package/esm2022/f-canvas/f-zoom/f-zoom-base.mjs +1 -1
  45. package/esm2022/f-canvas/f-zoom/f-zoom.directive.mjs +2 -2
  46. package/esm2022/f-connection/common/domain/calculate-connection-center/calculate-connection-center.handler.mjs +2 -3
  47. package/esm2022/f-connection/common/domain/f-bezier.path-builder.mjs +2 -2
  48. package/esm2022/f-connection/common/domain/f-segment.path-builder.mjs +2 -2
  49. package/esm2022/f-connection/common/domain/f-straight.path-builder.mjs +2 -2
  50. package/esm2022/f-connection/common/f-connection-base.mjs +4 -36
  51. package/esm2022/f-connection/common/f-path/f-connection-path.component.mjs +11 -15
  52. package/esm2022/f-connection/common/f-path/get-path-marker-id.mjs +15 -0
  53. package/esm2022/f-connection/common/f-path/index.mjs +2 -1
  54. package/esm2022/f-connection/common/mixins/change-connection-selection.mixin.mjs +4 -2
  55. package/esm2022/f-connection/f-connection/f-connection.component.mjs +71 -13
  56. package/esm2022/f-connection/f-connection-for-create/f-connection-for-create.component.mjs +46 -9
  57. package/esm2022/f-connection/f-marker/f-marker-base.mjs +1 -1
  58. package/esm2022/f-connection/f-marker/f-marker.directive.mjs +19 -5
  59. package/esm2022/f-connectors/f-node-input/f-node-input.directive.mjs +5 -7
  60. package/esm2022/f-connectors/f-node-outlet/f-node-outlet.directive.mjs +4 -4
  61. package/esm2022/f-connectors/f-node-output/f-node-output.directive.mjs +5 -4
  62. package/esm2022/f-draggable/canvas/canvas.drag-handler.mjs +1 -1
  63. package/esm2022/f-draggable/canvas/canvas.prepare-drag-sequence.mjs +2 -2
  64. package/esm2022/f-draggable/connections/create-connection/create-connection.on-pointer-up.mjs +2 -2
  65. package/esm2022/f-draggable/connections/create-connection/create-connection.prepare-drag-sequence.mjs +3 -3
  66. package/esm2022/f-draggable/connections/create-connection/find-first-can-be-connected-output-by-outlet/find-first-can-be-connected-output-by-outlet.handler.mjs +2 -2
  67. package/esm2022/f-draggable/connections/find-inputs-under-pointer/find-inputs-under-pointer.handler.mjs +2 -2
  68. package/esm2022/f-draggable/connections/find-inputs-under-pointer/first-not-connected-input-of-node-under-pointer/first-not-connected-input-of-node-under-pointer.handler.mjs +2 -2
  69. package/esm2022/f-draggable/connections/reassign-connection/reassign-connection.on-pointer-up.mjs +2 -2
  70. package/esm2022/f-draggable/connections/reassign-connection/reassign-connection.prepare-drag-sequence.mjs +2 -2
  71. package/esm2022/f-draggable/external-item/external-item.drag-handler.mjs +2 -1
  72. package/esm2022/f-draggable/external-item/external-item.on-pointer-up.mjs +3 -3
  73. package/esm2022/f-draggable/external-item/external-item.prepare-drag-sequence.mjs +2 -2
  74. package/esm2022/f-draggable/f-draggable-base.mjs +8 -1
  75. package/esm2022/f-draggable/f-draggable-data-context.mjs +1 -2
  76. package/esm2022/f-draggable/f-draggable.directive.mjs +11 -2
  77. package/esm2022/f-draggable/node/domain/is-connection-under-node/is-connection-under-node.handler.mjs +2 -2
  78. package/esm2022/f-draggable/node/node.on-pointer-up.mjs +2 -2
  79. package/esm2022/f-draggable/node/node.prepare-drag-sequence.mjs +2 -2
  80. package/esm2022/f-draggable/selection-area/get-can-be-selected-items/get-can-be-selected-items.handler.mjs +2 -2
  81. package/esm2022/f-draggable/selection-area/selection-area.drag-handle.mjs +1 -1
  82. package/esm2022/f-draggable/selection-area/selection-area.prepare-drag-sequence.mjs +2 -2
  83. package/esm2022/f-draggable/single-select/single-select.on-pointer-down.mjs +2 -2
  84. package/esm2022/f-flow/f-flow.component.mjs +12 -10
  85. package/esm2022/f-flow.module.mjs +10 -6
  86. package/esm2022/f-group/f-group-base.mjs +3 -10
  87. package/esm2022/f-group/f-group.directive.mjs +64 -11
  88. package/esm2022/f-line-alignment/f-line-alignment.component.mjs +2 -2
  89. package/esm2022/f-node/f-node-base.mjs +1 -1
  90. package/esm2022/f-node/f-node.directive.mjs +14 -11
  91. package/esm2022/f-storage/f-components-store.mjs +41 -0
  92. package/esm2022/f-storage/index.mjs +2 -0
  93. package/esm2022/public-api.mjs +2 -3
  94. package/f-backgroud/f-background.component.d.ts +1 -1
  95. package/f-backgroud/f-circle-pattern/f-circle-pattern.component.d.ts +32 -0
  96. package/f-backgroud/f-circle-pattern/index.d.ts +1 -0
  97. package/f-backgroud/f-rect-pattern/f-rect-pattern.component.d.ts +37 -0
  98. package/f-backgroud/f-rect-pattern/index.d.ts +1 -0
  99. package/f-backgroud/index.d.ts +2 -1
  100. package/f-canvas/f-canvas.component.d.ts +2 -2
  101. package/f-canvas/f-zoom/f-zoom-base.d.ts +1 -1
  102. package/f-canvas/f-zoom/f-zoom.directive.d.ts +1 -1
  103. package/f-connection/common/f-connection-base.d.ts +4 -5
  104. package/f-connection/common/f-path/f-connection-path.component.d.ts +1 -2
  105. package/f-connection/common/f-path/get-path-marker-id.d.ts +4 -0
  106. package/f-connection/common/f-path/index.d.ts +1 -0
  107. package/f-connection/f-connection/f-connection.component.d.ts +27 -11
  108. package/f-connection/f-connection-for-create/f-connection-for-create.component.d.ts +17 -7
  109. package/f-connection/f-marker/f-marker-base.d.ts +2 -0
  110. package/f-connection/f-marker/f-marker.directive.d.ts +10 -4
  111. package/f-connectors/f-node-input/f-node-input.directive.d.ts +1 -1
  112. package/f-connectors/f-node-outlet/f-node-outlet.directive.d.ts +1 -1
  113. package/f-connectors/f-node-output/f-node-output.directive.d.ts +1 -1
  114. package/f-draggable/canvas/canvas.drag-handler.d.ts +1 -1
  115. package/f-draggable/canvas/canvas.prepare-drag-sequence.d.ts +1 -1
  116. package/f-draggable/canvas/providers.d.ts +1 -1
  117. package/f-draggable/connections/create-connection/create-connection.on-pointer-up.d.ts +1 -1
  118. package/f-draggable/connections/create-connection/create-connection.prepare-drag-sequence.d.ts +1 -1
  119. package/f-draggable/connections/create-connection/find-first-can-be-connected-output-by-outlet/find-first-can-be-connected-output-by-outlet.handler.d.ts +1 -1
  120. package/f-draggable/connections/find-inputs-under-pointer/find-inputs-under-pointer.handler.d.ts +1 -1
  121. package/f-draggable/connections/find-inputs-under-pointer/first-not-connected-input-of-node-under-pointer/first-not-connected-input-of-node-under-pointer.handler.d.ts +1 -1
  122. package/f-draggable/connections/providers.d.ts +1 -1
  123. package/f-draggable/connections/reassign-connection/reassign-connection.on-pointer-up.d.ts +1 -1
  124. package/f-draggable/connections/reassign-connection/reassign-connection.prepare-drag-sequence.d.ts +1 -1
  125. package/f-draggable/external-item/external-item.on-pointer-up.d.ts +1 -1
  126. package/f-draggable/external-item/external-item.prepare-drag-sequence.d.ts +1 -1
  127. package/f-draggable/f-draggable-base.d.ts +2 -0
  128. package/f-draggable/f-draggable.directive.d.ts +2 -1
  129. package/f-draggable/node/domain/is-connection-under-node/is-connection-under-node.handler.d.ts +1 -1
  130. package/f-draggable/node/node.on-pointer-up.d.ts +1 -1
  131. package/f-draggable/node/node.prepare-drag-sequence.d.ts +1 -1
  132. package/f-draggable/node/providers.d.ts +1 -1
  133. package/f-draggable/selection-area/get-can-be-selected-items/get-can-be-selected-items.handler.d.ts +1 -1
  134. package/f-draggable/selection-area/providers.d.ts +1 -1
  135. package/f-draggable/selection-area/selection-area.drag-handle.d.ts +1 -1
  136. package/f-draggable/selection-area/selection-area.prepare-drag-sequence.d.ts +1 -1
  137. package/f-draggable/single-select/single-select.on-pointer-down.d.ts +1 -1
  138. package/f-flow/f-flow.component.d.ts +4 -2
  139. package/f-flow.module.d.ts +18 -17
  140. package/f-group/f-group-base.d.ts +3 -9
  141. package/f-group/f-group.directive.d.ts +17 -7
  142. package/f-line-alignment/f-line-alignment.component.d.ts +1 -1
  143. package/f-node/f-node-base.d.ts +1 -1
  144. package/f-node/f-node.directive.d.ts +3 -3
  145. package/f-storage/f-components-store.d.ts +33 -0
  146. package/f-storage/index.d.ts +1 -0
  147. package/fesm2022/foblex-flow.mjs +599 -282
  148. package/fesm2022/foblex-flow.mjs.map +1 -1
  149. package/package.json +1 -1
  150. package/public-api.d.ts +1 -2
  151. package/esm2022/f-backgroud/f-cell-pattern/f-cell-pattern.component.mjs +0 -90
  152. package/esm2022/f-components-store.mjs +0 -77
  153. package/esm2022/get-flow-uid.mjs +0 -8
  154. package/f-backgroud/f-cell-pattern/f-cell-pattern.component.d.ts +0 -31
  155. package/f-backgroud/f-cell-pattern/index.d.ts +0 -1
  156. package/f-components-store.d.ts +0 -42
  157. package/get-flow-uid.d.ts +0 -4
@@ -1,96 +1,218 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, Component, ChangeDetectionStrategy, Input, Directive, Injectable, ContentChild, Inject, ViewChild, Optional, ContentChildren, SkipSelf, EventEmitter, Output, NgModule } from '@angular/core';
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
- import { Subject, Observable, Subscription, startWith, debounceTime } from 'rxjs';
3
+ import { TransformModelExtensions, PointExtensions, SizeExtensions, DomElementExtensions, RectExtensions, BooleanExtensions, sanitizeElementId, Point, VectorExtensions, EventExtensions, mixinChangePosition, mixinFitToParent, mixinOneToOneCentering, mixinChangeZoom, MouseEventExtensions, IMouseEvent, ITouchDownEvent, ITouchMoveEvent, ITouchUpEvent } from '@foblex/core';
4
+ import { Subscription, Subject, startWith, Observable, merge, debounceTime } from 'rxjs';
5
5
  import * as i3 from '@angular/common';
6
6
  import { DOCUMENT, CommonModule } from '@angular/common';
7
7
  import { __decorate } from 'tslib';
8
8
 
9
9
  const F_BACKGROUND_PATTERN = new InjectionToken('F_BACKGROUND_PATTERN');
10
10
 
11
+ let uniqueId$b = 0;
12
+ class FRectPatternComponent {
13
+ get hostElement() {
14
+ return this.elementReference.nativeElement;
15
+ }
16
+ set vColor(value) {
17
+ this._vColor = value;
18
+ this._stateChanges.next();
19
+ }
20
+ set hColor(value) {
21
+ this._vColor = value;
22
+ this._stateChanges.next();
23
+ }
24
+ set vSize(value) {
25
+ this._vSize = value;
26
+ this._stateChanges.next();
27
+ }
28
+ set hSize(value) {
29
+ this._hSize = value;
30
+ this._stateChanges.next();
31
+ }
32
+ constructor(elementReference) {
33
+ this.elementReference = elementReference;
34
+ this._subscription$ = new Subscription();
35
+ this._stateChanges = new Subject();
36
+ this.id = `f-pattern-${uniqueId$b++}`;
37
+ this._vColor = 'rgba(0,0,0,0.1)';
38
+ this._hColor = 'rgba(0,0,0,0.1)';
39
+ this._vSize = 20;
40
+ this._hSize = 20;
41
+ this._transform = TransformModelExtensions.default();
42
+ this._position = PointExtensions.initialize();
43
+ this._size = SizeExtensions.initialize(this._hSize, this._vSize);
44
+ this.createPattern();
45
+ }
46
+ createPattern() {
47
+ this._pattern = DomElementExtensions.createSvgElement('pattern');
48
+ this._pattern.setAttribute('patternUnits', 'userSpaceOnUse');
49
+ this.hostElement.appendChild(this._pattern);
50
+ this._vLine = DomElementExtensions.createSvgElement('line');
51
+ this._pattern.appendChild(this._vLine);
52
+ this._hLine = DomElementExtensions.createSvgElement('line');
53
+ this._pattern.appendChild(this._hLine);
54
+ }
55
+ ngOnInit() {
56
+ this._subscription$.add(this.subscribeToStateChanges());
57
+ }
58
+ subscribeToStateChanges() {
59
+ return this._stateChanges.pipe(startWith(null)).subscribe(() => {
60
+ this.redraw();
61
+ });
62
+ }
63
+ calculatePattern() {
64
+ this._position.x = this._transform.position.x + this._transform.scaledPosition.x;
65
+ this._position.y = this._transform.position.y + this._transform.scaledPosition.y;
66
+ this._size = SizeExtensions.initialize(this._hSize * this._transform.scale, this._vSize * this._transform.scale);
67
+ }
68
+ redraw() {
69
+ this.calculatePattern();
70
+ this.redrawPattern();
71
+ this.redrawLine(this._vLine, this._vColor, this._size.width, 0, this._size.width, this._size.height);
72
+ this.redrawLine(this._hLine, this._hColor, 0, this._size.height, this._size.width, this._size.height);
73
+ }
74
+ redrawPattern() {
75
+ this._pattern.setAttribute('x', `${this._position.x}`);
76
+ this._pattern.setAttribute('y', `${this._position.y}`);
77
+ this._pattern.setAttribute('width', `${this._size.width}`);
78
+ this._pattern.setAttribute('height', `${this._size.height}`);
79
+ }
80
+ redrawLine(line, color, x1, y1, x2, y2) {
81
+ line.setAttribute('stroke', `${color}`);
82
+ line.setAttribute('x1', `${x1}`);
83
+ line.setAttribute('x2', `${x2}`);
84
+ line.setAttribute('y1', `${y1}`);
85
+ line.setAttribute('y2', `${y2}`);
86
+ }
87
+ setTransform(transform) {
88
+ this._transform = transform;
89
+ this._stateChanges.next();
90
+ }
91
+ ngOnDestroy() {
92
+ this._subscription$.unsubscribe();
93
+ }
94
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FRectPatternComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
95
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FRectPatternComponent, selector: "f-rect-pattern", inputs: { id: "id", vColor: "vColor", hColor: "hColor", vSize: "vSize", hSize: "hSize" }, host: { properties: { "attr.id": "id" } }, providers: [
96
+ { provide: F_BACKGROUND_PATTERN, useExisting: FRectPatternComponent }
97
+ ], ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
98
+ }
99
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FRectPatternComponent, decorators: [{
100
+ type: Component,
101
+ args: [{
102
+ selector: "f-rect-pattern",
103
+ template: ``,
104
+ host: {
105
+ '[attr.id]': 'id'
106
+ },
107
+ providers: [
108
+ { provide: F_BACKGROUND_PATTERN, useExisting: FRectPatternComponent }
109
+ ],
110
+ changeDetection: ChangeDetectionStrategy.OnPush
111
+ }]
112
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { id: [{
113
+ type: Input
114
+ }], vColor: [{
115
+ type: Input
116
+ }], hColor: [{
117
+ type: Input
118
+ }], vSize: [{
119
+ type: Input
120
+ }], hSize: [{
121
+ type: Input
122
+ }] } });
123
+
11
124
  let uniqueId$a = 0;
12
- class FCellPatternComponent {
125
+ class FCirclePatternComponent {
13
126
  get hostElement() {
14
127
  return this.elementReference.nativeElement;
15
128
  }
16
- constructor(elementReference, changeDetectorRef) {
129
+ set color(value) {
130
+ this._color = value;
131
+ this._stateChanges.next();
132
+ }
133
+ set radius(value) {
134
+ this._radius = value;
135
+ this._stateChanges.next();
136
+ }
137
+ constructor(elementReference) {
17
138
  this.elementReference = elementReference;
18
- this.changeDetectorRef = changeDetectorRef;
139
+ this._subscription$ = new Subscription();
140
+ this._stateChanges = new Subject();
19
141
  this.id = `f-pattern-${uniqueId$a++}`;
20
- this.verticalLineColor = 'rgba(0,0,0,0.1)';
21
- this.horizontalLineColor = 'rgba(0,0,0,0.1)';
22
- this.transform = TransformModelExtensions.default();
23
- this.x = 0;
24
- this.y = 0;
25
- this.defaultCellSize = 20;
26
- this.cellSize = this.defaultCellSize;
142
+ this._color = 'rgba(0,0,0,0.1)';
143
+ this._radius = 20;
144
+ this._scaledRadius = 20;
145
+ this._transform = TransformModelExtensions.default();
146
+ this._position = PointExtensions.initialize();
147
+ this.createPattern();
148
+ }
149
+ createPattern() {
150
+ this._pattern = DomElementExtensions.createSvgElement('pattern');
151
+ this._pattern.setAttribute('patternUnits', 'userSpaceOnUse');
152
+ this.hostElement.appendChild(this._pattern);
153
+ this._circle = DomElementExtensions.createSvgElement('circle');
154
+ this._pattern.appendChild(this._circle);
27
155
  }
28
156
  ngOnInit() {
29
- this.createPatternDom();
30
- this.redraw();
157
+ this._subscription$.add(this.subscribeToStateChanges());
31
158
  }
32
- createPatternDom() {
33
- this.pattern = DomElementExtensions.createSvgElement('pattern');
34
- this.pattern.setAttribute('patternUnits', 'userSpaceOnUse');
35
- this.hostElement.appendChild(this.pattern);
36
- this.horizontalLine = DomElementExtensions.createSvgElement('line');
37
- this.horizontalLine.setAttribute('stroke', this.horizontalLineColor);
38
- this.pattern.appendChild(this.horizontalLine);
39
- this.verticalLine = DomElementExtensions.createSvgElement('line');
40
- this.verticalLine.setAttribute('stroke', this.verticalLineColor);
41
- this.pattern.appendChild(this.verticalLine);
159
+ subscribeToStateChanges() {
160
+ return this._stateChanges.pipe(startWith(null)).subscribe(() => {
161
+ this.redraw();
162
+ });
42
163
  }
43
164
  calculatePattern() {
44
- this.x = this.transform.position.x + this.transform.scaledPosition.x;
45
- this.y = this.transform.position.y + this.transform.scaledPosition.y;
46
- this.cellSize = this.defaultCellSize * this.transform.scale;
165
+ this._position.x = this._transform.position.x + this._transform.scaledPosition.x;
166
+ this._position.y = this._transform.position.y + this._transform.scaledPosition.y;
167
+ this._scaledRadius = this._radius * this._transform.scale;
47
168
  }
48
169
  redraw() {
49
170
  this.calculatePattern();
50
171
  this.redrawPattern();
51
- this.redrawHorizontalLine();
52
- this.redrawVerticalLine();
53
- this.changeDetectorRef.detectChanges();
172
+ this.redrawElement();
54
173
  }
55
174
  redrawPattern() {
56
- this.pattern.setAttribute('x', `${this.x}`);
57
- this.pattern.setAttribute('y', `${this.y}`);
58
- this.pattern.setAttribute('width', `${this.cellSize}`);
59
- this.pattern.setAttribute('height', `${this.cellSize}`);
60
- }
61
- redrawHorizontalLine() {
62
- this.horizontalLine.setAttribute('x1', `0`);
63
- this.horizontalLine.setAttribute('x2', `${this.cellSize}`);
64
- this.horizontalLine.setAttribute('y1', `${this.cellSize}`);
65
- this.horizontalLine.setAttribute('y2', `${this.cellSize}`);
66
- }
67
- redrawVerticalLine() {
68
- this.verticalLine.setAttribute('x1', `${this.cellSize}`);
69
- this.verticalLine.setAttribute('x2', `${this.cellSize}`);
70
- this.verticalLine.setAttribute('y1', `0`);
71
- this.verticalLine.setAttribute('y2', `${this.cellSize}`);
175
+ this._pattern.setAttribute('x', `${this._position.x}`);
176
+ this._pattern.setAttribute('y', `${this._position.y}`);
177
+ this._pattern.setAttribute('width', `${this._scaledRadius}`);
178
+ this._pattern.setAttribute('height', `${this._scaledRadius}`);
179
+ }
180
+ redrawElement() {
181
+ this._circle.setAttribute('fill', this._color);
182
+ this._circle.setAttribute('cx', `${this._scaledRadius / 2}`);
183
+ this._circle.setAttribute('cy', `${this._scaledRadius / 2}`);
184
+ this._circle.setAttribute('r', `${this._scaledRadius / this._radius}`);
72
185
  }
73
186
  setTransform(transform) {
74
- this.transform = transform;
75
- this.redraw();
187
+ this._transform = transform;
188
+ this._stateChanges.next();
189
+ }
190
+ ngOnDestroy() {
191
+ this._subscription$.unsubscribe();
76
192
  }
77
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FCellPatternComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
78
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FCellPatternComponent, selector: "f-cell-pattern", inputs: { id: "id", verticalLineColor: "verticalLineColor", horizontalLineColor: "horizontalLineColor" }, host: { properties: { "attr.id": "id" } }, providers: [
79
- { provide: F_BACKGROUND_PATTERN, useExisting: FCellPatternComponent }
80
- ], ngImport: i0, template: "<ng-container></ng-container>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
193
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FCirclePatternComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
194
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FCirclePatternComponent, selector: "f-circle-pattern", inputs: { id: "id", color: "color", radius: "radius" }, host: { properties: { "attr.id": "id" } }, providers: [
195
+ { provide: F_BACKGROUND_PATTERN, useExisting: FCirclePatternComponent }
196
+ ], ngImport: i0, template: ``, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
81
197
  }
82
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FCellPatternComponent, decorators: [{
198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FCirclePatternComponent, decorators: [{
83
199
  type: Component,
84
- args: [{ selector: "f-cell-pattern", host: {
200
+ args: [{
201
+ selector: "f-circle-pattern",
202
+ template: ``,
203
+ host: {
85
204
  '[attr.id]': 'id'
86
- }, providers: [
87
- { provide: F_BACKGROUND_PATTERN, useExisting: FCellPatternComponent }
88
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container></ng-container>\n" }]
89
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { id: [{
205
+ },
206
+ providers: [
207
+ { provide: F_BACKGROUND_PATTERN, useExisting: FCirclePatternComponent }
208
+ ],
209
+ changeDetection: ChangeDetectionStrategy.OnPush
210
+ }]
211
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { id: [{
90
212
  type: Input
91
- }], verticalLineColor: [{
213
+ }], color: [{
92
214
  type: Input
93
- }], horizontalLineColor: [{
215
+ }], radius: [{
94
216
  type: Input
95
217
  }] } });
96
218
 
@@ -109,6 +231,7 @@ class FComponentsStore {
109
231
  this.fNodes = [];
110
232
  this.fGroups = [];
111
233
  this.fConnections = [];
234
+ this.fMarkers = [];
112
235
  this.fOutputs = [];
113
236
  this.fInputs = [];
114
237
  this.fOutlets = [];
@@ -119,56 +242,19 @@ class FComponentsStore {
119
242
  get transform() {
120
243
  return this.fCanvas?.transform;
121
244
  }
122
- addOutput(output) {
123
- this.fOutputs.push(output);
124
- this.changes.next();
125
- }
126
- removeOutput(output) {
127
- this.fOutputs = this.fOutputs.filter(o => o !== output);
128
- this.changes.next();
129
- }
130
- addInput(input) {
131
- this.fInputs.push(input);
132
- this.changes.next();
133
- }
134
- removeInput(input) {
135
- this.fInputs = this.fInputs.filter(i => i !== input);
136
- this.changes.next();
137
- }
138
- addOutlet(outlet) {
139
- this.fOutlets.push(outlet);
140
- this.changes.next();
141
- }
142
- removeOutlet(outlet) {
143
- this.fOutlets = this.fOutlets.filter(o => o !== outlet);
144
- this.changes.next();
145
- }
146
- addNode(node) {
147
- this.fNodes.push(node);
148
- this.changes.next();
149
- }
150
245
  findNode(element) {
151
246
  return this.fNodes.find(n => n.isContains(element));
152
247
  }
153
- removeNode(node) {
154
- this.fNodes = this.fNodes.filter(n => n !== node);
155
- this.changes.next();
156
- }
157
- addConnection(connection) {
158
- this.fConnections.push(connection);
159
- this.changes.next();
160
- }
161
- removeConnection(connection) {
162
- this.fConnections = this.fConnections.filter(c => c !== connection);
163
- this.changes.next();
164
- }
165
- addGroup(group) {
166
- this.fGroups.push(group);
248
+ addComponent(collection, component) {
249
+ collection.push(component);
167
250
  this.changes.next();
168
251
  }
169
- removeGroup(group) {
170
- this.fGroups = this.fGroups.filter(n => n !== group);
171
- this.changes.next();
252
+ removeComponent(collection, component) {
253
+ const index = collection.indexOf(component);
254
+ if (index > -1) {
255
+ collection.splice(index, 1);
256
+ this.changes.next();
257
+ }
172
258
  }
173
259
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FComponentsStore, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
174
260
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FComponentsStore }); }
@@ -218,13 +304,13 @@ class FBackgroundComponent extends FBackgroundBase {
218
304
  this.fComponentsStore.fBackground = undefined;
219
305
  }
220
306
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FBackgroundComponent, deps: [{ token: i0.ElementRef }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Component }); }
221
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FBackgroundComponent, selector: "f-background", host: { classAttribute: "f-component f-background" }, providers: [{ provide: F_BACKGROUND, useExisting: FBackgroundComponent }], queries: [{ propertyName: "fBackgroundPattern", first: true, predicate: F_BACKGROUND_PATTERN, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<svg>\n <ng-content></ng-content>\n\n<!-- <rect width=\"100%\" height=\"100%\" fill=\"url(#background-pattern)\"></rect>-->\n</svg>\n", styles: [":host{position:absolute;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}:host svg{width:100%;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
307
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FBackgroundComponent, selector: "f-background", host: { classAttribute: "f-component f-background" }, providers: [{ provide: F_BACKGROUND, useExisting: FBackgroundComponent }], queries: [{ propertyName: "fBackgroundPattern", first: true, predicate: F_BACKGROUND_PATTERN, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<svg><ng-content></ng-content></svg>\n", styles: [":host{position:absolute;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}:host svg{width:100%;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
222
308
  }
223
309
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FBackgroundComponent, decorators: [{
224
310
  type: Component,
225
311
  args: [{ selector: "f-background", host: {
226
312
  'class': 'f-component f-background'
227
- }, providers: [{ provide: F_BACKGROUND, useExisting: FBackgroundComponent }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg>\n <ng-content></ng-content>\n\n<!-- <rect width=\"100%\" height=\"100%\" fill=\"url(#background-pattern)\"></rect>-->\n</svg>\n", styles: [":host{position:absolute;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}:host svg{width:100%;height:100%}\n"] }]
313
+ }, providers: [{ provide: F_BACKGROUND, useExisting: FBackgroundComponent }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<svg><ng-content></ng-content></svg>\n", styles: [":host{position:absolute;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}:host svg{width:100%;height:100%}\n"] }]
228
314
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: FComponentsStore }], propDecorators: { fBackgroundPattern: [{
229
315
  type: ContentChild,
230
316
  args: [F_BACKGROUND_PATTERN, { static: true }]
@@ -276,8 +362,7 @@ class CalculateConnectionCenterHandler {
276
362
  }
277
363
  }
278
364
  const remainingDistanceToCenter = halfTotalDistance - (accumulatedDistance - distances[centerIndex]);
279
- const result = this.findPointAtDistance(points[centerIndex], points[centerIndex + 1], remainingDistanceToCenter);
280
- return result;
365
+ return this.findPointAtDistance(points[centerIndex], points[centerIndex + 1], remainingDistanceToCenter);
281
366
  }
282
367
  calculateDistance(pointA, pointB) {
283
368
  return Math.sqrt(Math.pow(pointB.x - pointA.x, 2) + Math.pow(pointB.y - pointA.y, 2));
@@ -406,6 +491,7 @@ class FNodeInputDirective extends FNodeInputBase {
406
491
  }
407
492
  set _fSide(value) {
408
493
  this._fConnectableSide = castToConnectableSide(value);
494
+ this.fNode.refresh();
409
495
  }
410
496
  get _fSide() {
411
497
  return this._fConnectableSide;
@@ -425,10 +511,7 @@ class FNodeInputDirective extends FNodeInputBase {
425
511
  this.isConnected = false;
426
512
  }
427
513
  ngOnInit() {
428
- if (!this.fNode) {
429
- throw new Error('fNodeInput must be inside f-node');
430
- }
431
- this.fComponentsStore.addInput(this);
514
+ this.fComponentsStore.addComponent(this.fComponentsStore.fInputs, this);
432
515
  this.fNode.addConnector(this);
433
516
  }
434
517
  setConnected(isConnected) {
@@ -437,7 +520,7 @@ class FNodeInputDirective extends FNodeInputBase {
437
520
  }
438
521
  ngOnDestroy() {
439
522
  this.fNode.removeConnector(this);
440
- this.fComponentsStore.removeInput(this);
523
+ this.fComponentsStore.removeComponent(this.fComponentsStore.fInputs, this);
441
524
  }
442
525
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FNodeInputDirective, deps: [{ token: i0.ElementRef }, { token: F_NODE }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Directive }); }
443
526
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: FNodeInputDirective, selector: "[fNodeInput]", inputs: { id: ["fInputId", "id"], multiple: ["fInputMultiple", "multiple"], disabled: ["fInputDisabled", "disabled"], _fSide: ["fInputConnectableSide", "_fSide"] }, host: { properties: { "attr.data-f-input-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, useExisting: FNodeInputDirective }], exportAs: ["fNodeInput"], usesInheritance: true, ngImport: i0 }); }
@@ -527,10 +610,10 @@ class FNodeOutletDirective extends FNodeOutletBase {
527
610
  if (!this.fNode) {
528
611
  throw new Error('fNodeOutlet must be inside fNode Directive');
529
612
  }
530
- this.fComponentsStore.addOutlet(this);
613
+ this.fComponentsStore.addComponent(this.fComponentsStore.fOutlets, this);
531
614
  }
532
615
  ngOnDestroy() {
533
- this.fComponentsStore.removeOutlet(this);
616
+ this.fComponentsStore.removeComponent(this.fComponentsStore.fOutlets, this);
534
617
  }
535
618
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FNodeOutletDirective, deps: [{ token: i0.ElementRef }, { token: F_NODE }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Directive }); }
536
619
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: FNodeOutletDirective, selector: "[fNodeOutlet]", inputs: { id: ["fOutletId", "id"], disabled: ["fOutletDisabled", "disabled"], isConnectionFromOutlet: "isConnectionFromOutlet" }, host: { properties: { "attr.data-f-outlet-id": "id", "class.f-node-outlet-disabled": "disabled" }, classAttribute: "f-component f-node-outlet" }, providers: [{ provide: F_NODE_OUTLET, useExisting: FNodeOutletDirective }], exportAs: ["fNodeOutlet"], usesInheritance: true, ngImport: i0 }); }
@@ -594,6 +677,7 @@ class FNodeOutputDirective extends FNodeOutputBase {
594
677
  }
595
678
  set _fSide(value) {
596
679
  this._fConnectableSide = castToConnectableSide(value);
680
+ this.fNode.refresh();
597
681
  }
598
682
  get _fSide() {
599
683
  return this._fConnectableSide;
@@ -617,7 +701,7 @@ class FNodeOutputDirective extends FNodeOutputBase {
617
701
  if (!this.fNode) {
618
702
  throw new Error('fNodeOutput must be inside fNode Directive');
619
703
  }
620
- this.fComponentsStore.addOutput(this);
704
+ this.fComponentsStore.addComponent(this.fComponentsStore.fOutputs, this);
621
705
  this.fNode.addConnector(this);
622
706
  }
623
707
  setConnected(isConnected) {
@@ -626,7 +710,7 @@ class FNodeOutputDirective extends FNodeOutputBase {
626
710
  }
627
711
  ngOnDestroy() {
628
712
  this.fNode.removeConnector(this);
629
- this.fComponentsStore.removeOutput(this);
713
+ this.fComponentsStore.removeComponent(this.fComponentsStore.fOutputs, this);
630
714
  }
631
715
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FNodeOutputDirective, deps: [{ token: i0.ElementRef }, { token: F_NODE }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Directive }); }
632
716
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: FNodeOutputDirective, selector: "[fNodeOutput]", inputs: { id: ["fOutputId", "id"], multiple: ["fOutputMultiple", "multiple"], disabled: ["fOutputDisabled", "disabled"], _fSide: ["fOutputConnectableSide", "_fSide"], isSelfConnectable: "isSelfConnectable" }, host: { properties: { "attr.data-f-output-id": "id", "class.f-node-output-disabled": "disabled" }, classAttribute: "f-component f-node-output" }, providers: [{ provide: F_NODE_OUTPUT, useExisting: FNodeOutputDirective }], exportAs: ["fNodeOutput"], usesInheritance: true, ngImport: i0 }); }
@@ -691,7 +775,7 @@ class FBezierPathBuilder {
691
775
  const { source, sourceSide, target, targetSide, offset } = request;
692
776
  const sourceAnglePoint = FBezierPathBuilder.getAnglePoint(sourceSide, source, target, offset);
693
777
  const targetAnglePoint = FBezierPathBuilder.getAnglePoint(targetSide, target, source, offset);
694
- const path = `M ${source.x} ${source.y} C ${sourceAnglePoint.x} ${sourceAnglePoint.y}, ${targetAnglePoint.x} ${targetAnglePoint.y}, ${target.x + 0.0001} ${target.y + 0.0001}`;
778
+ const path = `M ${source.x} ${source.y} C ${sourceAnglePoint.x} ${sourceAnglePoint.y}, ${targetAnglePoint.x} ${targetAnglePoint.y}, ${target.x + 0.0002} ${target.y + 0.0002}`;
695
779
  const connectionCenter = new CalculateConnectionCenterHandler().handle(new CalculateConnectionCenterRequest([source, sourceAnglePoint, targetAnglePoint, target]));
696
780
  return { path, connectionCenter };
697
781
  }
@@ -830,14 +914,14 @@ class FSegmentPathBuilder {
830
914
  return `${index === 0 ? 'M' : 'L'}${point.x} ${point.y}`;
831
915
  }
832
916
  buildLastLineSegment(index, point) {
833
- return `L${point.x + 0.0001} ${point.y + 0.0001}`;
917
+ return `L${point.x + 0.0002} ${point.y + 0.0002}`;
834
918
  }
835
919
  }
836
920
 
837
921
  class FStraightPathBuilder {
838
922
  handle(request) {
839
923
  const { source, target } = request;
840
- const path = `M ${source.x} ${source.y} L ${target.x + 0.0001} ${target.y + 0.0001}`;
924
+ const path = `M ${source.x} ${source.y} L ${target.x + 0.0002} ${target.y + 0.0002}`;
841
925
  const connectionCenter = new CalculateConnectionCenterHandler().handle(new CalculateConnectionCenterRequest([source, target]));
842
926
  return { path, connectionCenter };
843
927
  }
@@ -1073,13 +1157,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1073
1157
 
1074
1158
  const CONNECTION_PATH = new InjectionToken('CONNECTION_PATH');
1075
1159
 
1076
- const FLOW = {
1077
- UID: GuidExtensions.generate(),
1078
- };
1079
- function getFlowUid() {
1080
- return FLOW.UID;
1081
- }
1082
-
1083
1160
  var EFMarkerType;
1084
1161
  (function (EFMarkerType) {
1085
1162
  EFMarkerType["START"] = "f-connection-marker-start";
@@ -1088,56 +1165,23 @@ var EFMarkerType;
1088
1165
  EFMarkerType["SELECTED_END"] = "f-connection-selected-marker-end";
1089
1166
  })(EFMarkerType || (EFMarkerType = {}));
1090
1167
 
1091
- const F_MARKER = new InjectionToken('F_MARKER');
1092
- class FMarkerBase {
1093
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FMarkerBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1094
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: FMarkerBase, ngImport: i0 }); }
1168
+ function getMarkerStartId(fConnectionId) {
1169
+ return sanitizeElementId(`${EFMarkerType.START}-${fConnectionId}`);
1095
1170
  }
1096
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FMarkerBase, decorators: [{
1097
- type: Directive
1098
- }] });
1099
-
1100
- class FMarkerDirective extends FMarkerBase {
1101
- get hostElement() {
1102
- return this.elementReference.nativeElement;
1103
- }
1104
- constructor(elementReference) {
1105
- super();
1106
- this.elementReference = elementReference;
1107
- this.width = 0;
1108
- this.height = 0;
1109
- this.refX = 0;
1110
- this.refY = 0;
1111
- this.type = EFMarkerType.START;
1112
- this.hostElement.style.display = 'none';
1113
- }
1114
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FMarkerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1115
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: FMarkerDirective, selector: "svg[fMarker]", inputs: { hostElement: "hostElement", width: "width", height: "height", refX: "refX", refY: "refY", type: "type" }, host: { classAttribute: "f-component f-marker" }, providers: [{ provide: F_MARKER, useExisting: FMarkerDirective }], usesInheritance: true, ngImport: i0 }); }
1171
+ function getMarkerEndId(fConnectionId) {
1172
+ return sanitizeElementId(`${EFMarkerType.END}-${fConnectionId}`);
1173
+ }
1174
+ function getMarkerSelectedStartId(fConnectionId) {
1175
+ return sanitizeElementId(`${EFMarkerType.SELECTED_START}-${fConnectionId}`);
1176
+ }
1177
+ function getMarkerSelectedEndId(fConnectionId) {
1178
+ return sanitizeElementId(`${EFMarkerType.SELECTED_END}-${fConnectionId}`);
1116
1179
  }
1117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FMarkerDirective, decorators: [{
1118
- type: Directive,
1119
- args: [{
1120
- selector: "svg[fMarker]",
1121
- host: {
1122
- class: "f-component f-marker"
1123
- },
1124
- providers: [{ provide: F_MARKER, useExisting: FMarkerDirective }],
1125
- }]
1126
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { hostElement: [{
1127
- type: Input
1128
- }], width: [{
1129
- type: Input
1130
- }], height: [{
1131
- type: Input
1132
- }], refX: [{
1133
- type: Input
1134
- }], refY: [{
1135
- type: Input
1136
- }], type: [{
1137
- type: Input
1138
- }] } });
1139
1180
 
1140
1181
  class FConnectionPathComponent {
1182
+ get fPathId() {
1183
+ return this.base.fConnectionId;
1184
+ }
1141
1185
  get linkToGradient() {
1142
1186
  return F_CONNECTION_IDENTIFIERS.linkToGradient(this.base.fConnectionId + this.base.fOutputId + this.base.fInputId);
1143
1187
  }
@@ -1158,21 +1202,15 @@ class FConnectionPathComponent {
1158
1202
  this.hostElement.setAttribute("d", `${path}`);
1159
1203
  }
1160
1204
  select() {
1161
- this.hostElement.setAttribute('marker-start', `url(#${this.getMarkerId(EFMarkerType.SELECTED_START)})`);
1162
- this.hostElement.setAttribute('marker-end', `url(#${this.getMarkerId(EFMarkerType.SELECTED_END)})`);
1205
+ this.hostElement.setAttribute('marker-start', `url(#${getMarkerSelectedStartId(this.base.fConnectionId)})`);
1206
+ this.hostElement.setAttribute('marker-end', `url(#${getMarkerSelectedEndId(this.base.fConnectionId)})`);
1163
1207
  }
1164
1208
  deselect() {
1165
- this.hostElement.setAttribute('marker-start', `url(#${this.getMarkerId(EFMarkerType.START)})`);
1166
- this.hostElement.setAttribute('marker-end', `url(#${this.getMarkerId(EFMarkerType.END)})`);
1167
- }
1168
- getMarkerId(type) {
1169
- return sanitizeElementId(`${getFlowUid()}-${type}-${this.base.fConnectionId}`);
1170
- }
1171
- isSelected() {
1172
- return this.hostElement.getAttribute('marker-start') === `url(#${this.getMarkerId(EFMarkerType.SELECTED_START)})`;
1209
+ this.hostElement.setAttribute('marker-start', `url(#${getMarkerStartId(this.base.fConnectionId)})`);
1210
+ this.hostElement.setAttribute('marker-end', `url(#${getMarkerEndId(this.base.fConnectionId)})`);
1173
1211
  }
1174
1212
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionPathComponent, deps: [{ token: i0.ElementRef }, { token: F_CONNECTION }], target: i0.ɵɵFactoryTarget.Component }); }
1175
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FConnectionPathComponent, selector: "path[f-connection-path]", host: { properties: { "attr.id": "attrConnectionId", "attr.stroke": "linkToGradient" }, classAttribute: "f-component f-connection-path" }, providers: [{ provide: CONNECTION_PATH, useExisting: FConnectionPathComponent }], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1213
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FConnectionPathComponent, selector: "path[f-connection-path]", host: { properties: { "attr.id": "attrConnectionId", "attr.data-f-path-id": "fPathId", "attr.stroke": "linkToGradient" }, classAttribute: "f-component f-connection-path" }, providers: [{ provide: CONNECTION_PATH, useExisting: FConnectionPathComponent }], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1176
1214
  }
1177
1215
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionPathComponent, decorators: [{
1178
1216
  type: Component,
@@ -1183,6 +1221,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1183
1221
  host: {
1184
1222
  class: "f-component f-connection-path",
1185
1223
  '[attr.id]': 'attrConnectionId',
1224
+ '[attr.data-f-path-id]': 'fPathId',
1186
1225
  '[attr.stroke]': 'linkToGradient',
1187
1226
  },
1188
1227
  providers: [{ provide: CONNECTION_PATH, useExisting: FConnectionPathComponent }],
@@ -1234,7 +1273,9 @@ function mixinChangeConnectionSelection(base) {
1234
1273
  }
1235
1274
  select() {
1236
1275
  this.fPath?.select();
1237
- this.hostElement.classList.add(F_SELECTED_CLASS);
1276
+ if (!this.hostElement.classList.contains(F_SELECTED_CLASS)) {
1277
+ this.hostElement.classList.add(F_SELECTED_CLASS);
1278
+ }
1238
1279
  }
1239
1280
  isSelected() {
1240
1281
  return this.hostElement.classList.contains(F_SELECTED_CLASS);
@@ -1310,12 +1351,6 @@ class FConnectionBase extends MIXIN_BASE$1 {
1310
1351
  this.fGradient.initialize();
1311
1352
  this.redraw();
1312
1353
  }
1313
- reset() {
1314
- this.path = '';
1315
- this.fPath.initialize();
1316
- this.fGradient.initialize();
1317
- this.redraw();
1318
- }
1319
1354
  isContains(element) {
1320
1355
  return (this.hostElement.firstChild?.lastChild).contains(element);
1321
1356
  }
@@ -1328,39 +1363,14 @@ class FConnectionBase extends MIXIN_BASE$1 {
1328
1363
  sourceSide: fromSide,
1329
1364
  target: to,
1330
1365
  targetSide: toSide,
1331
- radius: 8,
1332
- offset: 32
1366
+ radius: this.fRadius,
1367
+ offset: this.fOffset
1333
1368
  }
1334
1369
  });
1335
1370
  this.path = pathResult.path;
1336
1371
  const transform = `position: absolute; pointerEvents: all; transform: translate(-50%, -50%); left: ${pathResult.connectionCenter.x}px; top: ${pathResult.connectionCenter.y}px`;
1337
1372
  this.fConnectionCenter?.nativeElement?.setAttribute('style', transform);
1338
1373
  }
1339
- setMarkers() {
1340
- this.fDefs.nativeElement.innerHTML = '';
1341
- this.fMarkers.forEach((marker) => {
1342
- const markerElement = DomElementExtensions.createSvgElement('marker');
1343
- markerElement.setAttribute('id', this.getMarkerId(getFlowUid() + '-' + marker.type + '-' + this.fConnectionId));
1344
- markerElement.setAttribute('markerHeight', `${marker.height}`);
1345
- markerElement.setAttribute('markerWidth', `${marker.width}`);
1346
- markerElement.setAttribute('orient', 'auto');
1347
- markerElement.setAttribute('refX', `${marker.refX}`);
1348
- markerElement.setAttribute('refY', `${marker.refY}`);
1349
- markerElement.setAttribute('markerUnits', 'strokeWidth');
1350
- marker.hostElement.setAttribute('height', `${marker.height}`);
1351
- marker.hostElement.setAttribute('width', `${marker.width}`);
1352
- const clone = marker.hostElement.cloneNode(true);
1353
- clone.style.display = 'unset';
1354
- markerElement.append(clone);
1355
- this.fDefs.nativeElement.append(markerElement);
1356
- });
1357
- this.fMarkers.forEach((marker) => {
1358
- marker.hostElement.remove();
1359
- });
1360
- }
1361
- getMarkerId(id) {
1362
- return sanitizeElementId(id);
1363
- }
1364
1374
  redraw() {
1365
1375
  this.fPath.setPath(this.path);
1366
1376
  this.fSelection.setPath(this.path);
@@ -1418,18 +1428,53 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1418
1428
 
1419
1429
  let uniqueId$5 = 0;
1420
1430
  class FConnectionForCreateComponent extends FConnectionBase {
1431
+ set fStartColor(value) {
1432
+ this._fStartColor = value;
1433
+ this.fComponentsStore.changes.next();
1434
+ }
1435
+ get fStartColor() {
1436
+ return this._fStartColor;
1437
+ }
1438
+ set fEndColor(value) {
1439
+ this._fEndColor = value;
1440
+ this.fComponentsStore.changes.next();
1441
+ }
1442
+ get fEndColor() {
1443
+ return this._fEndColor;
1444
+ }
1445
+ set fRadius(value) {
1446
+ this._fRadius = value;
1447
+ this.fComponentsStore.changes.next();
1448
+ }
1449
+ get fRadius() {
1450
+ return this._fRadius;
1451
+ }
1452
+ set fOffset(value) {
1453
+ this._fOffset = value;
1454
+ this.fComponentsStore.changes.next();
1455
+ }
1456
+ get fOffset() {
1457
+ return this._fOffset;
1458
+ }
1421
1459
  set fBehavior(value) {
1422
1460
  this._behavior = castToConnectionBehavior(value);
1461
+ this.fComponentsStore.changes.next();
1423
1462
  }
1424
1463
  get fBehavior() {
1425
1464
  return this._behavior;
1426
1465
  }
1427
1466
  set fType(value) {
1428
1467
  this._type = value;
1468
+ this.fComponentsStore.changes.next();
1429
1469
  }
1430
1470
  get fType() {
1431
1471
  return this._type;
1432
1472
  }
1473
+ get fMarkers() {
1474
+ return this.fComponentsStore.fMarkers.filter((x) => {
1475
+ return this.hostElement.contains(x.hostElement);
1476
+ });
1477
+ }
1433
1478
  get boundingElement() {
1434
1479
  return this.fPath.hostElement;
1435
1480
  }
@@ -1438,8 +1483,10 @@ class FConnectionForCreateComponent extends FConnectionBase {
1438
1483
  this.fComponentsStore = fComponentsStore;
1439
1484
  this.fConnectionId = `f-connection-for-create-${uniqueId$5++}`;
1440
1485
  this.fText = '';
1441
- this.fStartColor = 'black';
1442
- this.fEndColor = 'black';
1486
+ this._fStartColor = 'black';
1487
+ this._fEndColor = 'black';
1488
+ this._fRadius = 8;
1489
+ this._fOffset = 32;
1443
1490
  this._behavior = EFConnectionBehavior.FIXED;
1444
1491
  this._type = EFConnectionType.STRAIGHT;
1445
1492
  this.fDraggingDisabled = false;
@@ -1455,7 +1502,7 @@ class FConnectionForCreateComponent extends FConnectionBase {
1455
1502
  this.fComponentsStore.fTempConnection = undefined;
1456
1503
  }
1457
1504
  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 }); }
1458
- 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 }); }
1505
+ 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", fRadius: "fRadius", fOffset: "fOffset", fBehavior: "fBehavior", fType: "fType" }, host: { classAttribute: "f-component f-connection f-connection-for-create" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionForCreateComponent }], queries: [{ propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, descendants: true }], viewQueries: [{ propertyName: "fDefs", first: true, predicate: ["defs"], descendants: true, static: true }, { propertyName: "fPath", first: true, predicate: CONNECTION_PATH, descendants: true, static: true }, { propertyName: "fGradient", first: true, predicate: CONNECTION_GRADIENT, descendants: true, static: true }, { propertyName: "fDragHandle", first: true, predicate: FConnectionDragHandleComponent, descendants: true, static: true }, { propertyName: "fSelection", first: true, predicate: FConnectionSelectionComponent, descendants: true, static: true }, { propertyName: "fTextComponent", first: true, predicate: CONNECTION_TEXT, descendants: true, static: true }, { propertyName: "fConnectionCenter", first: true, predicate: ["fConnectionCenter"], descendants: true }], usesInheritance: true, 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 }); }
1459
1506
  }
1460
1507
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionForCreateComponent, decorators: [{
1461
1508
  type: Component,
@@ -1466,6 +1513,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1466
1513
  type: Input
1467
1514
  }], fEndColor: [{
1468
1515
  type: Input
1516
+ }], fRadius: [{
1517
+ type: Input
1518
+ }], fOffset: [{
1519
+ type: Input
1469
1520
  }], fBehavior: [{
1470
1521
  type: Input
1471
1522
  }], fType: [{
@@ -1473,9 +1524,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1473
1524
  }], fDefs: [{
1474
1525
  type: ViewChild,
1475
1526
  args: ['defs', { static: true }]
1476
- }], fMarkers: [{
1477
- type: ContentChildren,
1478
- args: [F_MARKER, { descendants: true }]
1479
1527
  }], fPath: [{
1480
1528
  type: ViewChild,
1481
1529
  args: [CONNECTION_PATH, { static: true }]
@@ -1501,18 +1549,74 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1501
1549
 
1502
1550
  let uniqueId$4 = 0;
1503
1551
  class FConnectionComponent extends FConnectionBase {
1552
+ set fText(value) {
1553
+ this._fText = value;
1554
+ this.fComponentsStore.changes.next();
1555
+ }
1556
+ get fText() {
1557
+ return this._fText;
1558
+ }
1559
+ set fStartColor(value) {
1560
+ this._fStartColor = value;
1561
+ this.fComponentsStore.changes.next();
1562
+ }
1563
+ get fStartColor() {
1564
+ return this._fStartColor;
1565
+ }
1566
+ set fEndColor(value) {
1567
+ this._fEndColor = value;
1568
+ this.fComponentsStore.changes.next();
1569
+ }
1570
+ get fEndColor() {
1571
+ return this._fEndColor;
1572
+ }
1573
+ set fOutputId(value) {
1574
+ this._fOutputId = value;
1575
+ this.fComponentsStore.changes.next();
1576
+ }
1577
+ get fOutputId() {
1578
+ return this._fOutputId;
1579
+ }
1580
+ set fInputId(value) {
1581
+ this._fInputId = value;
1582
+ this.fComponentsStore.changes.next();
1583
+ }
1584
+ get fInputId() {
1585
+ return this._fInputId;
1586
+ }
1587
+ set fRadius(value) {
1588
+ this._fRadius = value;
1589
+ this.fComponentsStore.changes.next();
1590
+ }
1591
+ get fRadius() {
1592
+ return this._fRadius;
1593
+ }
1594
+ set fOffset(value) {
1595
+ this._fOffset = value;
1596
+ this.fComponentsStore.changes.next();
1597
+ }
1598
+ get fOffset() {
1599
+ return this._fOffset;
1600
+ }
1504
1601
  set fBehavior(value) {
1505
1602
  this._behavior = castToConnectionBehavior(value);
1603
+ this.fComponentsStore.changes.next();
1506
1604
  }
1507
1605
  get fBehavior() {
1508
1606
  return this._behavior;
1509
1607
  }
1510
1608
  set fType(value) {
1511
1609
  this._type = value;
1610
+ this.fComponentsStore.changes.next();
1512
1611
  }
1513
1612
  get fType() {
1514
1613
  return this._type;
1515
1614
  }
1615
+ get fMarkers() {
1616
+ return this.fComponentsStore.fMarkers.filter((x) => {
1617
+ return this.hostElement.contains(x.hostElement);
1618
+ });
1619
+ }
1516
1620
  get boundingElement() {
1517
1621
  return this.fPath.hostElement;
1518
1622
  }
@@ -1520,22 +1624,24 @@ class FConnectionComponent extends FConnectionBase {
1520
1624
  super(elementReference, fConnectionFactory);
1521
1625
  this.fComponentsStore = fComponentsStore;
1522
1626
  this.fConnectionId = `f-connection-${uniqueId$4++}`;
1523
- this.fText = '';
1524
- this.fStartColor = 'black';
1525
- this.fEndColor = 'black';
1627
+ this._fText = '';
1628
+ this._fStartColor = 'black';
1629
+ this._fEndColor = 'black';
1630
+ this._fRadius = 8;
1631
+ this._fOffset = 32;
1526
1632
  this._behavior = EFConnectionBehavior.FIXED;
1527
1633
  this._type = EFConnectionType.STRAIGHT;
1528
1634
  this.fDraggingDisabled = false;
1529
1635
  this.fSelectionDisabled = false;
1530
1636
  }
1531
1637
  ngOnInit() {
1532
- this.fComponentsStore.addConnection(this);
1638
+ this.fComponentsStore.addComponent(this.fComponentsStore.fConnections, this);
1533
1639
  }
1534
1640
  ngOnDestroy() {
1535
- this.fComponentsStore.removeConnection(this);
1641
+ this.fComponentsStore.removeComponent(this.fComponentsStore.fConnections, this);
1536
1642
  }
1537
1643
  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 }); }
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 }); }
1644
+ 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", fRadius: "fRadius", fOffset: "fOffset", 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: "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 <ng-content></ng-content>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}\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 }); }
1539
1645
  }
1540
1646
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionComponent, decorators: [{
1541
1647
  type: Component,
@@ -1544,7 +1650,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1544
1650
  class: "f-component f-connection",
1545
1651
  '[class.f-connection-selection-disabled]': 'fSelectionDisabled',
1546
1652
  '[class.f-connection-reassign-disabled]': 'fDraggingDisabled',
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"] }]
1653
+ }, 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 <ng-content></ng-content>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}\n"] }]
1548
1654
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: FConnectionFactory }, { type: FComponentsStore }], propDecorators: { fConnectionId: [{
1549
1655
  type: Input
1550
1656
  }], fText: [{
@@ -1557,6 +1663,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1557
1663
  type: Input
1558
1664
  }], fInputId: [{
1559
1665
  type: Input
1666
+ }], fRadius: [{
1667
+ type: Input
1668
+ }], fOffset: [{
1669
+ type: Input
1560
1670
  }], fBehavior: [{
1561
1671
  type: Input
1562
1672
  }], fType: [{
@@ -1569,9 +1679,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1569
1679
  }], fDefs: [{
1570
1680
  type: ViewChild,
1571
1681
  args: ['defs', { static: true }]
1572
- }], fMarkers: [{
1573
- type: ContentChildren,
1574
- args: [F_MARKER, { descendants: true }]
1575
1682
  }], fPath: [{
1576
1683
  type: ViewChild,
1577
1684
  args: [CONNECTION_PATH, { static: true }]
@@ -1595,6 +1702,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1595
1702
  args: [FConnectionCenterDirective, { descendants: true }]
1596
1703
  }] } });
1597
1704
 
1705
+ const F_MARKER = new InjectionToken('F_MARKER');
1706
+ class FMarkerBase {
1707
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FMarkerBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1708
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: FMarkerBase, ngImport: i0 }); }
1709
+ }
1710
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FMarkerBase, decorators: [{
1711
+ type: Directive
1712
+ }] });
1713
+
1714
+ class FMarkerDirective extends FMarkerBase {
1715
+ get hostElement() {
1716
+ return this.elementReference.nativeElement;
1717
+ }
1718
+ constructor(fComponentsStore, elementReference) {
1719
+ super();
1720
+ this.fComponentsStore = fComponentsStore;
1721
+ this.elementReference = elementReference;
1722
+ this.width = 0;
1723
+ this.height = 0;
1724
+ this.refX = 0;
1725
+ this.refY = 0;
1726
+ this.type = EFMarkerType.START;
1727
+ this.orient = 'auto';
1728
+ this.markerUnits = 'strokeWidth';
1729
+ this.hostElement.style.display = 'none';
1730
+ }
1731
+ ngOnInit() {
1732
+ this.fComponentsStore.addComponent(this.fComponentsStore.fMarkers, this);
1733
+ }
1734
+ ngOnDestroy() {
1735
+ this.fComponentsStore.removeComponent(this.fComponentsStore.fMarkers, this);
1736
+ }
1737
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FMarkerDirective, deps: [{ token: FComponentsStore }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1738
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: FMarkerDirective, selector: "svg[fMarker]", inputs: { hostElement: "hostElement", width: "width", height: "height", refX: "refX", refY: "refY", type: "type", orient: "orient", markerUnits: "markerUnits" }, host: { classAttribute: "f-component f-marker" }, providers: [{ provide: F_MARKER, useExisting: FMarkerDirective }], usesInheritance: true, ngImport: i0 }); }
1739
+ }
1740
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FMarkerDirective, decorators: [{
1741
+ type: Directive,
1742
+ args: [{
1743
+ selector: "svg[fMarker]",
1744
+ host: {
1745
+ class: "f-component f-marker"
1746
+ },
1747
+ providers: [{ provide: F_MARKER, useExisting: FMarkerDirective }],
1748
+ }]
1749
+ }], ctorParameters: () => [{ type: FComponentsStore }, { type: i0.ElementRef }], propDecorators: { hostElement: [{
1750
+ type: Input
1751
+ }], width: [{
1752
+ type: Input
1753
+ }], height: [{
1754
+ type: Input
1755
+ }], refX: [{
1756
+ type: Input
1757
+ }], refY: [{
1758
+ type: Input
1759
+ }], type: [{
1760
+ type: Input
1761
+ }], orient: [{
1762
+ type: Input
1763
+ }], markerUnits: [{
1764
+ type: Input
1765
+ }] } });
1766
+
1598
1767
  const F_NODE = new InjectionToken('F_NODE');
1599
1768
  class FNodeBase {
1600
1769
  constructor() {
@@ -1726,7 +1895,7 @@ class FNodeDirective extends FNodeBase {
1726
1895
  this.renderer = renderer;
1727
1896
  this.fComponentsStore = fComponentsStore;
1728
1897
  this.subscriptions$ = new Subscription();
1729
- this.fNodeId = `f-node-${uniqueId$3++}`;
1898
+ this.fId = `f-node-${uniqueId$3++}`;
1730
1899
  this.positionChange = new EventEmitter();
1731
1900
  this.fDraggingDisabled = false;
1732
1901
  this.fSelectionDisabled = false;
@@ -1740,7 +1909,7 @@ class FNodeDirective extends FNodeBase {
1740
1909
  this.setStyle('left', '0');
1741
1910
  this.setStyle('top', '0');
1742
1911
  super.redraw();
1743
- this.fComponentsStore.addNode(this);
1912
+ this.fComponentsStore.addComponent(this.fComponentsStore.fNodes, this);
1744
1913
  }
1745
1914
  setStyle(styleName, value) {
1746
1915
  this.renderer.setStyle(this.hostElement, styleName, value);
@@ -1749,7 +1918,7 @@ class FNodeDirective extends FNodeBase {
1749
1918
  this.subscriptions$.add(this.subscribeOnResizeChanges());
1750
1919
  }
1751
1920
  subscribeOnResizeChanges() {
1752
- return new FResizeObserver(this.hostElement).pipe(startWith(null)).subscribe(() => {
1921
+ return merge(new FResizeObserver(this.hostElement), this.stateChanges).pipe(debounceTime(5), startWith(null)).subscribe(() => {
1753
1922
  this.connectors.forEach((fConnector) => {
1754
1923
  fConnector.fConnectableSide = new CalculateConnectorConnectableSideHandler().handle(new CalculateConnectorConnectableSideRequest(fConnector, this.hostElement));
1755
1924
  });
@@ -1758,23 +1927,25 @@ class FNodeDirective extends FNodeBase {
1758
1927
  }
1759
1928
  addConnector(connector) {
1760
1929
  this.connectors.push(connector);
1930
+ this.stateChanges.next();
1761
1931
  }
1762
1932
  removeConnector(connector) {
1763
1933
  const index = this.connectors.indexOf(connector);
1764
1934
  if (index !== -1) {
1765
1935
  this.connectors.splice(index, 1);
1766
1936
  }
1937
+ this.stateChanges.next();
1767
1938
  }
1768
1939
  refresh() {
1769
1940
  this.stateChanges.next();
1770
1941
  }
1771
1942
  ngOnDestroy() {
1772
- this.fComponentsStore.removeNode(this);
1943
+ this.fComponentsStore.removeComponent(this.fComponentsStore.fNodes, this);
1773
1944
  this.stateChanges.complete();
1774
1945
  this.subscriptions$.unsubscribe();
1775
1946
  }
1776
1947
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FNodeDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Directive }); }
1777
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: FNodeDirective, selector: "[fNode]", inputs: { fNodeId: "fNodeId", position: ["fNodePosition", "position"], fDraggingDisabled: ["fNodeDraggingDisabled", "fDraggingDisabled"], fSelectionDisabled: ["fNodeSelectionDisabled", "fSelectionDisabled"] }, outputs: { positionChange: "fNodePositionChange" }, host: { properties: { "attr.data-f-node-id": "fNodeId", "class.f-node-dragging-disabled": "fDraggingDisabled", "class.f-node-selection-disabled": "fSelectionDisabled" }, classAttribute: "f-node f-component" }, providers: [
1948
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: FNodeDirective, selector: "[fNode]", inputs: { fId: ["fNodeId", "fId"], position: ["fNodePosition", "position"], fDraggingDisabled: ["fNodeDraggingDisabled", "fDraggingDisabled"], fSelectionDisabled: ["fNodeSelectionDisabled", "fSelectionDisabled"] }, outputs: { positionChange: "fNodePositionChange" }, host: { properties: { "attr.data-f-node-id": "fId", "class.f-node-dragging-disabled": "fDraggingDisabled", "class.f-node-selection-disabled": "fSelectionDisabled" }, classAttribute: "f-node f-component" }, providers: [
1778
1949
  { provide: F_NODE, useExisting: FNodeDirective }
1779
1950
  ], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0 }); }
1780
1951
  }
@@ -1784,7 +1955,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1784
1955
  selector: "[fNode]",
1785
1956
  exportAs: "fComponent",
1786
1957
  host: {
1787
- '[attr.data-f-node-id]': 'fNodeId',
1958
+ '[attr.data-f-node-id]': 'fId',
1788
1959
  class: "f-node f-component",
1789
1960
  '[class.f-node-dragging-disabled]': 'fDraggingDisabled',
1790
1961
  '[class.f-node-selection-disabled]': 'fSelectionDisabled'
@@ -1793,8 +1964,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
1793
1964
  { provide: F_NODE, useExisting: FNodeDirective }
1794
1965
  ],
1795
1966
  }]
1796
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: FComponentsStore }], propDecorators: { fNodeId: [{
1797
- type: Input
1967
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: FComponentsStore }], propDecorators: { fId: [{
1968
+ type: Input,
1969
+ args: ['fNodeId']
1798
1970
  }], position: [{
1799
1971
  type: Input,
1800
1972
  args: ['fNodePosition']
@@ -2051,7 +2223,6 @@ class FDraggableDataContext {
2051
2223
  this.draggableItems = [];
2052
2224
  this.onPointerDownScale = 1;
2053
2225
  this.onPointerDownPosition = new Point(0, 0);
2054
- this.isSelectedChanged = false;
2055
2226
  }
2056
2227
  markSelectionAsChanged() {
2057
2228
  this.isSelectedChanged = true;
@@ -2561,6 +2732,7 @@ class ExternalItemDragHandler {
2561
2732
  initialize() {
2562
2733
  this.onPointerDownRect = this.getExternalItemRect();
2563
2734
  this.placeholder = DomElementExtensions.deepCloneNode(this.externalItem.hostElement);
2735
+ this.placeholder.setAttribute('style', this.getStyle(Point.fromPoint(this.onPointerDownRect)));
2564
2736
  document.body.appendChild(this.placeholder);
2565
2737
  }
2566
2738
  getExternalItemRect() {
@@ -3281,10 +3453,12 @@ class FDraggableBase {
3281
3453
  this.dragStartTime = Date.now();
3282
3454
  this.dragStartPosition = mouseEvent.getPosition();
3283
3455
  this.ngZone.runOutsideAngular(() => {
3456
+ this.document?.addEventListener('selectstart', this.onSelectStart, EventExtensions.activeListener());
3284
3457
  this.document?.addEventListener('mousemove', this.onMouseMove);
3285
3458
  this.document?.addEventListener('mouseup', this.onMouseUp);
3286
3459
  });
3287
3460
  this.mouseListeners = () => {
3461
+ this.document?.removeEventListener('selectstart', this.onSelectStart, EventExtensions.activeListener());
3288
3462
  this.document?.removeEventListener('mousemove', this.onMouseMove);
3289
3463
  this.document?.removeEventListener('mouseup', this.onMouseUp);
3290
3464
  };
@@ -3301,15 +3475,20 @@ class FDraggableBase {
3301
3475
  this.dragStartTime = Date.now();
3302
3476
  this.dragStartPosition = touchEvent.getPosition();
3303
3477
  this.ngZone.runOutsideAngular(() => {
3478
+ this.document?.addEventListener('selectstart', this.onSelectStart, EventExtensions.activeListener());
3304
3479
  this.document?.addEventListener('touchmove', this.onTouchMove);
3305
3480
  this.document?.addEventListener('touchend', this.onTouchUp);
3306
3481
  });
3307
3482
  this.touchListeners = () => {
3483
+ this.document?.removeEventListener('selectstart', this.onSelectStart, EventExtensions.activeListener());
3308
3484
  this.document?.removeEventListener('touchmove', this.onTouchMove);
3309
3485
  this.document?.removeEventListener('touchend', this.onTouchUp);
3310
3486
  };
3311
3487
  }
3312
3488
  };
3489
+ this.onSelectStart = (event) => {
3490
+ this.onSelect(event);
3491
+ };
3313
3492
  this.onMouseMove = (event) => {
3314
3493
  this.moveHandler(new IMouseEvent(event));
3315
3494
  };
@@ -3452,6 +3631,13 @@ class FDraggableDirective extends FDraggableBase {
3452
3631
  this.hostElement.classList.add('f-dragging');
3453
3632
  }
3454
3633
  }
3634
+ onSelect(event) {
3635
+ const isTargetNotHtml = event.constructor.name === 'Event';
3636
+ const target = isTargetNotHtml ? event.target.parentNode : event.target;
3637
+ if (target && isExternalItem(target)) {
3638
+ event.preventDefault();
3639
+ }
3640
+ }
3455
3641
  onPointerMove(event) {
3456
3642
  const pointerPositionInCanvas = Point.fromPoint(event.getPosition()).elementTransform(this.hostElement);
3457
3643
  const difference = pointerPositionInCanvas.div(this.fDraggableDataContext.onPointerDownScale).sub(this.fDraggableDataContext.onPointerDownPosition);
@@ -3478,6 +3664,7 @@ class FDraggableDirective extends FDraggableBase {
3478
3664
  }
3479
3665
  const result = this.fMediator.send(new GetSelectionRequest());
3480
3666
  this.fSelectionChange.emit(result);
3667
+ this.fDraggableDataContext.isSelectedChanged = false;
3481
3668
  }
3482
3669
  ngOnDestroy() {
3483
3670
  super.unsubscribe();
@@ -3541,6 +3728,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
3541
3728
  type: Injectable
3542
3729
  }], ctorParameters: () => [{ type: FDraggableDataContext }] });
3543
3730
 
3731
+ class CreateConnectionMarkersRequest {
3732
+ constructor(fConnection) {
3733
+ this.fConnection = fConnection;
3734
+ }
3735
+ }
3736
+
3737
+ let CreateConnectionMarkersHandler = class CreateConnectionMarkersHandler {
3738
+ handle(request) {
3739
+ const element = DomElementExtensions.createSvgElement('defs');
3740
+ const fConnection = request.fConnection;
3741
+ fConnection.fMarkers.forEach((marker) => {
3742
+ const markerElement = this.createMarkerElement(marker, fConnection.fConnectionId);
3743
+ const clone = marker.hostElement.cloneNode(true);
3744
+ clone.setAttribute('height', `${marker.height}`);
3745
+ clone.setAttribute('width', `${marker.width}`);
3746
+ clone.removeAttribute('markerUnits');
3747
+ clone.style.display = 'unset';
3748
+ markerElement.append(clone);
3749
+ element.append(markerElement);
3750
+ });
3751
+ fConnection.fDefs.nativeElement.innerHTML = element.innerHTML;
3752
+ this.makeSafariCompatible(fConnection);
3753
+ }
3754
+ // Safari does not support markers on path elements if markers are defined after the path element
3755
+ makeSafariCompatible(fConnection) {
3756
+ fConnection.fPath.hostElement.replaceWith(fConnection.fPath.hostElement);
3757
+ }
3758
+ createMarkerElement(marker, fConnectionId) {
3759
+ const markerElement = DomElementExtensions.createSvgElement('marker');
3760
+ markerElement.setAttribute('id', sanitizeElementId(marker.type + '-' + fConnectionId));
3761
+ markerElement.setAttribute('markerHeight', `${marker.height}`);
3762
+ markerElement.setAttribute('markerWidth', `${marker.width}`);
3763
+ markerElement.setAttribute('orient', `${marker.orient}`);
3764
+ markerElement.setAttribute('refX', `${marker.refX}`);
3765
+ markerElement.setAttribute('refY', `${marker.refY}`);
3766
+ markerElement.setAttribute('markerUnits', `${marker.markerUnits}`);
3767
+ return markerElement;
3768
+ }
3769
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: CreateConnectionMarkersHandler, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
3770
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: CreateConnectionMarkersHandler }); }
3771
+ };
3772
+ CreateConnectionMarkersHandler = __decorate([
3773
+ FHandlerRegister(CreateConnectionMarkersRequest)
3774
+ ], CreateConnectionMarkersHandler);
3775
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: CreateConnectionMarkersHandler, decorators: [{
3776
+ type: Injectable
3777
+ }] });
3778
+
3544
3779
  class GetConnectionVectorRequest {
3545
3780
  constructor(outputRect, inputRect, behavior, outputSide, inputSide) {
3546
3781
  this.outputRect = outputRect;
@@ -3641,8 +3876,7 @@ let GetElementRectInFlowHandler = class GetElementRectInFlowHandler {
3641
3876
  const systemRect = RectExtensions.fromElement(request.element);
3642
3877
  const position = Point.fromPoint(systemRect).elementTransform(this.flowHost).sub(this.transform.scaledPosition).sub(this.transform.position).div(this.transform.scale);
3643
3878
  const size = SizeExtensions.initialize(systemRect.width / this.transform.scale, systemRect.height / this.transform.scale);
3644
- const result = RectExtensions.initialize(position.x, position.y, size.width, size.height);
3645
- return result;
3879
+ return RectExtensions.initialize(position.x, position.y, size.width, size.height);
3646
3880
  }
3647
3881
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GetElementRectInFlowHandler, deps: [{ token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Injectable }); }
3648
3882
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GetElementRectInFlowHandler }); }
@@ -3754,6 +3988,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
3754
3988
  type: Injectable
3755
3989
  }], ctorParameters: () => [{ type: FComponentsStore }, { type: FFlowMediator }] });
3756
3990
 
3991
+ class GetPositionInFlowRequest {
3992
+ constructor(position) {
3993
+ this.position = position;
3994
+ }
3995
+ }
3996
+
3997
+ let GetPositionInFlowHandler = class GetPositionInFlowHandler {
3998
+ get transform() {
3999
+ return this.fComponentsStore.transform;
4000
+ }
4001
+ get flowHost() {
4002
+ return this.fComponentsStore.flowHost;
4003
+ }
4004
+ constructor(fComponentsStore) {
4005
+ this.fComponentsStore = fComponentsStore;
4006
+ }
4007
+ handle(request) {
4008
+ return Point.fromPoint(request.position).elementTransform(this.flowHost)
4009
+ .sub(this.transform.scaledPosition).sub(this.transform.position).div(this.transform.scale);
4010
+ }
4011
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GetPositionInFlowHandler, deps: [{ token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Injectable }); }
4012
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GetPositionInFlowHandler }); }
4013
+ };
4014
+ GetPositionInFlowHandler = __decorate([
4015
+ FHandlerRegister(GetPositionInFlowRequest)
4016
+ ], GetPositionInFlowHandler);
4017
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GetPositionInFlowHandler, decorators: [{
4018
+ type: Injectable
4019
+ }], ctorParameters: () => [{ type: FComponentsStore }] });
4020
+
3757
4021
  class GetSelectionRequest {
3758
4022
  }
3759
4023
 
@@ -3794,7 +4058,9 @@ let RedrawConnectionsHandler = class RedrawConnectionsHandler {
3794
4058
  }
3795
4059
  handle(request) {
3796
4060
  this.resetConnectors();
3797
- this.fComponentsStore.fTempConnection?.setMarkers();
4061
+ if (this.fComponentsStore.fTempConnection) {
4062
+ this.setMarkers(this.fComponentsStore.fTempConnection);
4063
+ }
3798
4064
  this.fComponentsStore.fConnections.forEach((connection) => {
3799
4065
  const output = this.fComponentsStore.fOutputs.find((x) => x.id === connection.fOutputId);
3800
4066
  const input = this.fComponentsStore.fInputs.find((x) => x.id === connection.fInputId);
@@ -3811,15 +4077,19 @@ let RedrawConnectionsHandler = class RedrawConnectionsHandler {
3811
4077
  output.setConnected(true);
3812
4078
  input.setConnected(true);
3813
4079
  const vector = this.getVector(output, input, connection);
3814
- connection.setMarkers();
4080
+ this.setMarkers(connection);
3815
4081
  connection.setVector(vector.point1, output.fConnectableSide, vector.point2, input.fConnectableSide);
3816
4082
  connection.initialize();
4083
+ connection.isSelected() ? connection.select() : null;
3817
4084
  }
3818
4085
  getVector(output, input, connection) {
3819
4086
  const outputRect = this.fMediator.send(new GetElementRectInFlowRequest(output.hostElement));
3820
4087
  const inputRect = this.fMediator.send(new GetElementRectInFlowRequest(input.hostElement));
3821
4088
  return this.fMediator.send(new GetConnectionVectorRequest(outputRect, inputRect, connection.fBehavior, output.fConnectableSide, input.fConnectableSide));
3822
4089
  }
4090
+ setMarkers(connection) {
4091
+ this.fMediator.send(new CreateConnectionMarkersRequest(connection));
4092
+ }
3823
4093
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RedrawConnectionsHandler, deps: [{ token: FComponentsStore }, { token: FFlowMediator }], target: i0.ɵɵFactoryTarget.Injectable }); }
3824
4094
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: RedrawConnectionsHandler }); }
3825
4095
  };
@@ -3848,7 +4118,7 @@ let SelectHandler = class SelectHandler {
3848
4118
  });
3849
4119
  this.fDraggableDataContext.selectedItems = [];
3850
4120
  request.nodes.forEach((key) => {
3851
- const node = this.fDataContext.fNodes.find((x) => x.fNodeId === key);
4121
+ const node = this.fDataContext.fNodes.find((x) => x.fId === key);
3852
4122
  if (node) {
3853
4123
  node.select();
3854
4124
  this.fDraggableDataContext.selectedItems.push(node);
@@ -3944,8 +4214,7 @@ class GetConnectionHandler {
3944
4214
  this.fComponentsStore = fComponentsStore;
3945
4215
  }
3946
4216
  handle(element) {
3947
- const result = this.fConnections.find(c => c.isContains(element));
3948
- return result;
4217
+ return this.fConnections.find(c => c.isContains(element));
3949
4218
  }
3950
4219
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GetConnectionHandler, deps: [{ token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Injectable }); }
3951
4220
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: GetConnectionHandler }); }
@@ -3996,10 +4265,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
3996
4265
 
3997
4266
  const COMMON_PROVIDERS = [
3998
4267
  ClearSelectionHandler,
4268
+ CreateConnectionMarkersHandler,
3999
4269
  GetConnectionVectorHandler,
4000
4270
  GetElementRectInFlowHandler,
4001
4271
  GetNodesRectHandler,
4002
4272
  GetOutputRectInFlowHandler,
4273
+ GetPositionInFlowHandler,
4003
4274
  GetSelectionHandler,
4004
4275
  RedrawConnectionsHandler,
4005
4276
  SelectHandler,
@@ -4009,9 +4280,6 @@ const COMMON_PROVIDERS = [
4009
4280
  GetInputRectInFlowHandler,
4010
4281
  GetIncomingConnectionsHandler,
4011
4282
  GetOutgoingConnectionsHandler,
4012
- // UpdateConnectionLayerHandler,
4013
- //
4014
- // UpdateNodeLayerHandler,
4015
4283
  ];
4016
4284
 
4017
4285
  class FCanvasComponent extends FCanvasBase {
@@ -4083,13 +4351,13 @@ class FCanvasComponent extends FCanvasBase {
4083
4351
  this.completeDrag();
4084
4352
  }
4085
4353
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FCanvasComponent, deps: [{ token: i0.ElementRef }, { token: FFlowMediator }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Component }); }
4086
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FCanvasComponent, selector: "f-canvas", inputs: { position: "position", scale: "scale" }, outputs: { fCanvasChange: "fCanvasChange" }, host: { classAttribute: "f-component f-canvas" }, providers: [{ provide: F_CANVAS, useExisting: FCanvasComponent }], viewQueries: [{ propertyName: "fNodesContainer", first: true, predicate: ["fNodesContainer"], descendants: true, static: true }, { propertyName: "fConnectionsContainer", first: true, predicate: ["fConnectionsContainer"], descendants: true, static: true }], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0, template: "<ng-container>\n <div #fConnectionsContainer>\n <ng-content select=\"f-connection\"></ng-content>\n <ng-content select=\"f-connection-for-create\"></ng-content>\n </div>\n <div #fNodesContainer>\n <ng-content select=\"[fNode]\"></ng-content>\n </div>\n</ng-container>\n", styles: [":host{position:absolute;overflow:visible;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4354
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FCanvasComponent, selector: "f-canvas", inputs: { position: "position", scale: "scale" }, outputs: { fCanvasChange: "fCanvasChange" }, host: { classAttribute: "f-component f-canvas" }, providers: [{ provide: F_CANVAS, useExisting: FCanvasComponent }], viewQueries: [{ propertyName: "fNodesContainer", first: true, predicate: ["fNodesContainer"], descendants: true, static: true }, { propertyName: "fConnectionsContainer", first: true, predicate: ["fConnectionsContainer"], descendants: true, static: true }], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0, template: "<ng-container>\n <div #fConnectionsContainer>\n <ng-content select=\"f-connection\"></ng-content>\n <ng-content select=\"f-connection-for-create\"></ng-content>\n </div>\n <div #fNodesContainer>\n <ng-content select=\"[fGroup]\"></ng-content>\n <ng-content select=\"[fNode]\"></ng-content>\n </div>\n</ng-container>\n", styles: [":host{position:absolute;overflow:visible;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4087
4355
  }
4088
4356
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FCanvasComponent, decorators: [{
4089
4357
  type: Component,
4090
4358
  args: [{ selector: 'f-canvas', exportAs: 'fComponent', host: {
4091
4359
  'class': 'f-component f-canvas',
4092
- }, providers: [{ provide: F_CANVAS, useExisting: FCanvasComponent }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container>\n <div #fConnectionsContainer>\n <ng-content select=\"f-connection\"></ng-content>\n <ng-content select=\"f-connection-for-create\"></ng-content>\n </div>\n <div #fNodesContainer>\n <ng-content select=\"[fNode]\"></ng-content>\n </div>\n</ng-container>\n", styles: [":host{position:absolute;overflow:visible;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}\n"] }]
4360
+ }, providers: [{ provide: F_CANVAS, useExisting: FCanvasComponent }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container>\n <div #fConnectionsContainer>\n <ng-content select=\"f-connection\"></ng-content>\n <ng-content select=\"f-connection-for-create\"></ng-content>\n </div>\n <div #fNodesContainer>\n <ng-content select=\"[fGroup]\"></ng-content>\n <ng-content select=\"[fNode]\"></ng-content>\n </div>\n</ng-container>\n", styles: [":host{position:absolute;overflow:visible;width:100%;height:100%;left:0;top:0;transform-origin:0 0;pointer-events:none}\n"] }]
4093
4361
  }], ctorParameters: () => [{ type: i0.ElementRef }, { type: FFlowMediator }, { type: FComponentsStore }], propDecorators: { fCanvasChange: [{
4094
4362
  type: Output
4095
4363
  }], position: [{
@@ -4419,7 +4687,6 @@ class FFlowComponent extends FFlowBase {
4419
4687
  }
4420
4688
  ngOnInit() {
4421
4689
  this.fComponentsStore.fFlow = this;
4422
- FLOW.UID = this.fFlowId;
4423
4690
  }
4424
4691
  ngAfterContentInit() {
4425
4692
  this.subscription$.add(this.subscribeOnElementsChanges());
@@ -4433,16 +4700,20 @@ class FFlowComponent extends FFlowBase {
4433
4700
  }
4434
4701
  });
4435
4702
  }
4703
+ redraw() {
4704
+ this.fComponentsStore.changes.next();
4705
+ }
4436
4706
  reset() {
4437
4707
  this.isLoaded = false;
4438
4708
  }
4439
4709
  getNodesRect() {
4440
- const result = this.fMediator.send(new GetNodesRectRequest());
4441
- return result;
4710
+ return this.fMediator.send(new GetNodesRectRequest());
4442
4711
  }
4443
4712
  getSelection() {
4444
- const result = this.fMediator.send(new GetSelectionRequest());
4445
- return result;
4713
+ return this.fMediator.send(new GetSelectionRequest());
4714
+ }
4715
+ getPositionInFlow(position) {
4716
+ return this.fMediator.send(new GetPositionInFlowRequest(position));
4446
4717
  }
4447
4718
  selectAll() {
4448
4719
  this.fMediator.send(new SelectAllRequest());
@@ -4498,19 +4769,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
4498
4769
  }] } });
4499
4770
 
4500
4771
  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
- }
4772
+ class FGroupBase extends FNodeBase {
4510
4773
  }
4511
4774
 
4512
4775
  let uniqueId = 0;
4513
4776
  class FGroupDirective extends FGroupBase {
4777
+ set position(value) {
4778
+ this._position = PointExtensions.castToPoint(value);
4779
+ this.refresh();
4780
+ }
4781
+ get position() {
4782
+ return this._position;
4783
+ }
4514
4784
  get hostElement() {
4515
4785
  return this.elementReference.nativeElement;
4516
4786
  }
@@ -4520,7 +4790,11 @@ class FGroupDirective extends FGroupBase {
4520
4790
  this.renderer = renderer;
4521
4791
  this.fComponentsStore = fComponentsStore;
4522
4792
  this.subscriptions$ = new Subscription();
4523
- this.fGroupId = `f-group-${uniqueId++}`;
4793
+ this.fId = `f-group-${uniqueId++}`;
4794
+ this.positionChange = new EventEmitter();
4795
+ this.fDraggingDisabled = false;
4796
+ this.fSelectionDisabled = false;
4797
+ this.connectors = [];
4524
4798
  }
4525
4799
  ngOnInit() {
4526
4800
  this.setStyle('position', 'absolute');
@@ -4530,17 +4804,43 @@ class FGroupDirective extends FGroupBase {
4530
4804
  this.setStyle('left', '0');
4531
4805
  this.setStyle('top', '0');
4532
4806
  super.redraw();
4533
- this.fComponentsStore.addGroup(this);
4807
+ this.fComponentsStore.addComponent(this.fComponentsStore.fGroups, this);
4534
4808
  }
4535
4809
  setStyle(styleName, value) {
4536
4810
  this.renderer.setStyle(this.hostElement, styleName, value);
4537
4811
  }
4812
+ ngAfterViewInit() {
4813
+ this.subscriptions$.add(this.subscribeOnResizeChanges());
4814
+ }
4815
+ subscribeOnResizeChanges() {
4816
+ return merge(new FResizeObserver(this.hostElement), this.stateChanges).pipe(debounceTime(5), startWith(null)).subscribe(() => {
4817
+ this.connectors.forEach((fConnector) => {
4818
+ fConnector.fConnectableSide = new CalculateConnectorConnectableSideHandler().handle(new CalculateConnectorConnectableSideRequest(fConnector, this.hostElement));
4819
+ });
4820
+ this.fComponentsStore.changes.next();
4821
+ });
4822
+ }
4823
+ addConnector(connector) {
4824
+ this.connectors.push(connector);
4825
+ this.stateChanges.next();
4826
+ }
4827
+ removeConnector(connector) {
4828
+ const index = this.connectors.indexOf(connector);
4829
+ if (index !== -1) {
4830
+ this.connectors.splice(index, 1);
4831
+ }
4832
+ this.stateChanges.next();
4833
+ }
4834
+ refresh() {
4835
+ this.stateChanges.next();
4836
+ }
4538
4837
  ngOnDestroy() {
4539
- this.fComponentsStore.removeGroup(this);
4838
+ this.fComponentsStore.removeComponent(this.fComponentsStore.fGroups, this);
4839
+ this.stateChanges.complete();
4540
4840
  this.subscriptions$.unsubscribe();
4541
4841
  }
4542
4842
  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: [
4843
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: FGroupDirective, selector: "[fGroup]", inputs: { fId: ["fGroupId", "fId"], position: ["fGroupPosition", "position"], fDraggingDisabled: ["fGroupDraggingDisabled", "fDraggingDisabled"], fSelectionDisabled: ["fGroupSelectionDisabled", "fSelectionDisabled"] }, outputs: { positionChange: "fGroupPositionChange" }, host: { properties: { "attr.data-f-group-id": "fId" }, classAttribute: "f-group f-component" }, providers: [
4544
4844
  { provide: F_GROUP, useExisting: FGroupDirective }
4545
4845
  ], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0 }); }
4546
4846
  }
@@ -4550,15 +4850,28 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
4550
4850
  selector: "[fGroup]",
4551
4851
  exportAs: "fComponent",
4552
4852
  host: {
4553
- '[attr.data-f-group-id]': 'fGroupId',
4853
+ '[attr.data-f-group-id]': 'fId',
4554
4854
  class: "f-group f-component",
4555
4855
  },
4556
4856
  providers: [
4557
4857
  { provide: F_GROUP, useExisting: FGroupDirective }
4558
4858
  ],
4559
4859
  }]
4560
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: FComponentsStore }], propDecorators: { fGroupId: [{
4561
- type: Input
4860
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: FComponentsStore }], propDecorators: { fId: [{
4861
+ type: Input,
4862
+ args: ['fGroupId']
4863
+ }], position: [{
4864
+ type: Input,
4865
+ args: ['fGroupPosition']
4866
+ }], positionChange: [{
4867
+ type: Output,
4868
+ args: ['fGroupPositionChange']
4869
+ }], fDraggingDisabled: [{
4870
+ type: Input,
4871
+ args: ['fGroupDraggingDisabled']
4872
+ }], fSelectionDisabled: [{
4873
+ type: Input,
4874
+ args: ['fGroupSelectionDisabled']
4562
4875
  }] } });
4563
4876
 
4564
4877
  function isGroup(element) {
@@ -4577,7 +4890,8 @@ class FFlowModule {
4577
4890
  FMarkerDirective,
4578
4891
  FFlowComponent,
4579
4892
  FBackgroundComponent,
4580
- FCellPatternComponent,
4893
+ FRectPatternComponent,
4894
+ FCirclePatternComponent,
4581
4895
  FCanvasComponent,
4582
4896
  FNodeDirective,
4583
4897
  FGroupDirective,
@@ -4593,7 +4907,8 @@ class FFlowModule {
4593
4907
  FSelectionAreaComponent,
4594
4908
  FLineAlignmentComponent], imports: [CommonModule], exports: [FFlowComponent,
4595
4909
  FBackgroundComponent,
4596
- FCellPatternComponent,
4910
+ FRectPatternComponent,
4911
+ FCirclePatternComponent,
4597
4912
  FCanvasComponent,
4598
4913
  FNodeDirective,
4599
4914
  FDragHandleDirective,
@@ -4627,7 +4942,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
4627
4942
  FMarkerDirective,
4628
4943
  FFlowComponent,
4629
4944
  FBackgroundComponent,
4630
- FCellPatternComponent,
4945
+ FRectPatternComponent,
4946
+ FCirclePatternComponent,
4631
4947
  FCanvasComponent,
4632
4948
  FNodeDirective,
4633
4949
  FGroupDirective,
@@ -4652,7 +4968,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
4652
4968
  exports: [
4653
4969
  FFlowComponent,
4654
4970
  FBackgroundComponent,
4655
- FCellPatternComponent,
4971
+ FRectPatternComponent,
4972
+ FCirclePatternComponent,
4656
4973
  FCanvasComponent,
4657
4974
  FNodeDirective,
4658
4975
  FDragHandleDirective,
@@ -4676,5 +4993,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
4676
4993
  * Generated bundle index. Do not edit.
4677
4994
  */
4678
4995
 
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 };
4996
+ 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, CreateConnectionMarkersHandler, CreateConnectionMarkersRequest, CreateConnectionOnPointerUp, CreateConnectionPrepareDragSequence, EFConnectableSide, EFConnectionBehavior, EFConnectionType, EFDraggableType, EFMarkerType, EXTERNAL_ITEM_PROVIDERS, ExternalItemDragHandler, ExternalItemOnPointerUp, ExternalItemPrepareDragSequence, FBackgroundBase, FBackgroundComponent, FBezierPathBuilder, FCanvasBase, FCanvasChangeEvent, FCanvasComponent, FCirclePatternComponent, 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, FLineAlignmentBase, FLineAlignmentComponent, FMarkerBase, FMarkerDirective, FNodeBase, FNodeDirective, FNodeInputBase, FNodeInputDirective, FNodeOutletBase, FNodeOutletDirective, FNodeOutputBase, FNodeOutputDirective, FReassignConnectionEvent, FRectPatternComponent, 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, GetPositionInFlowHandler, GetPositionInFlowRequest, 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, getMarkerEndId, getMarkerSelectedEndId, getMarkerSelectedStartId, getMarkerStartId, isExternalItem, isGroup, isNode, isNodeDragHandle, isNodeInput, isNodeOutlet, isNodeOutput, mixinChangeConnectionSelection, mixinChangeConnectionVisibility };
4680
4997
  //# sourceMappingURL=foblex-flow.mjs.map