@foblex/flow 12.1.2 → 12.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/domain/providers.d.ts +1 -1
- package/domain/redraw-connections/redraw-connections-request.d.ts +0 -1
- package/esm2022/domain/redraw-connections/redraw-connections-request.mjs +1 -3
- package/esm2022/f-connection/common/domain/f-bezier.path-builder.mjs +4 -5
- package/esm2022/f-connection/common/domain/f-segment.path-builder.mjs +3 -4
- package/esm2022/f-connection/common/domain/f-straight.path-builder.mjs +4 -5
- package/esm2022/f-connection/common/domain/index.mjs +1 -5
- package/esm2022/f-connection/common/f-connection-base.mjs +16 -14
- package/esm2022/f-connection/f-connection/f-connection.component.mjs +16 -15
- package/esm2022/f-connection/f-connection-builder/f-connection-builders.mjs +3 -0
- package/esm2022/f-connection/f-connection-builder/f-connection-factory.mjs +34 -0
- package/esm2022/f-connection/f-connection-builder/i-f-connection-builder-request.mjs +2 -0
- package/esm2022/f-connection/f-connection-builder/i-f-connection-builder-response.mjs +2 -0
- package/esm2022/f-connection/f-connection-builder/i-f-connection-builder.mjs +2 -0
- package/esm2022/f-connection/f-connection-builder/i-f-connection-factory-request.mjs +2 -0
- package/esm2022/f-connection/f-connection-builder/index.mjs +7 -0
- package/esm2022/f-connection/f-connection-for-create/f-connection-for-create.component.mjs +16 -15
- package/esm2022/f-connection/index.mjs +2 -1
- package/esm2022/f-flow/f-flow.component.mjs +4 -1
- package/f-connection/common/domain/f-bezier.path-builder.d.ts +3 -5
- package/f-connection/common/domain/f-segment.path-builder.d.ts +3 -5
- package/f-connection/common/domain/f-straight.path-builder.d.ts +3 -5
- package/f-connection/common/domain/index.d.ts +0 -4
- package/f-connection/common/f-connection-base.d.ts +3 -3
- package/f-connection/f-connection/f-connection.component.d.ts +2 -1
- package/f-connection/f-connection-builder/f-connection-builders.d.ts +6 -0
- package/f-connection/f-connection-builder/f-connection-factory.d.ts +11 -0
- package/f-connection/{common/domain/i-f-path-builder-request.d.ts → f-connection-builder/i-f-connection-builder-request.d.ts} +2 -4
- package/f-connection/f-connection-builder/i-f-connection-builder-response.d.ts +5 -0
- package/f-connection/f-connection-builder/i-f-connection-builder.d.ts +6 -0
- package/f-connection/f-connection-builder/i-f-connection-factory-request.d.ts +6 -0
- package/f-connection/f-connection-builder/index.d.ts +6 -0
- package/f-connection/f-connection-for-create/f-connection-for-create.component.d.ts +3 -2
- package/f-connection/index.d.ts +1 -0
- package/f-draggable/connections/providers.d.ts +1 -1
- package/f-draggable/external-item/providers.d.ts +1 -1
- package/f-draggable/node/providers.d.ts +1 -1
- package/fesm2022/foblex-flow.mjs +80 -63
- package/fesm2022/foblex-flow.mjs.map +1 -1
- package/package.json +1 -1
- package/esm2022/f-connection/common/domain/f-path-builder-base.mjs +0 -3
- package/esm2022/f-connection/common/domain/f-path-builder-selector.mjs +0 -19
- package/esm2022/f-connection/common/domain/i-f-path-builder-request.mjs +0 -2
- package/esm2022/f-connection/common/domain/i-f-path-builder-response.mjs +0 -2
- package/f-connection/common/domain/f-path-builder-base.d.ts +0 -6
- package/f-connection/common/domain/f-path-builder-selector.d.ts +0 -7
- package/f-connection/common/domain/i-f-path-builder-response.d.ts +0 -5
package/fesm2022/foblex-flow.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Component, ChangeDetectionStrategy, Input, Directive, Injectable, ContentChild, Inject, ViewChild,
|
|
2
|
+
import { InjectionToken, Component, ChangeDetectionStrategy, Input, Directive, Injectable, ContentChild, Inject, ViewChild, Optional, ContentChildren, SkipSelf, EventEmitter, Output, NgModule } from '@angular/core';
|
|
3
3
|
import { TransformModelExtensions, DomElementExtensions, PointExtensions, RectExtensions, BooleanExtensions, sanitizeElementId, Point, GuidExtensions, VectorExtensions, EventExtensions, mixinChangePosition, mixinFitToParent, mixinOneToOneCentering, mixinChangeZoom, MouseEventExtensions, IMouseEvent, ITouchDownEvent, ITouchMoveEvent, ITouchUpEvent, SizeExtensions } from '@foblex/core';
|
|
4
4
|
import { Subject, Observable, Subscription, startWith, debounceTime } from 'rxjs';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i3 from '@angular/common';
|
|
6
6
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
7
7
|
import { __decorate } from 'tslib';
|
|
8
8
|
|
|
@@ -288,9 +288,6 @@ class CalculateConnectionCenterRequest {
|
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
290
|
|
|
291
|
-
class FPathBuilderBase {
|
|
292
|
-
}
|
|
293
|
-
|
|
294
291
|
var EFConnectableSide;
|
|
295
292
|
(function (EFConnectableSide) {
|
|
296
293
|
EFConnectableSide["LEFT"] = "left";
|
|
@@ -656,7 +653,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
|
|
|
656
653
|
type: Input
|
|
657
654
|
}] } });
|
|
658
655
|
|
|
659
|
-
class FBezierPathBuilder
|
|
656
|
+
class FBezierPathBuilder {
|
|
660
657
|
static getConnectorOffset(distance, offset) {
|
|
661
658
|
if (distance >= offset) {
|
|
662
659
|
return distance;
|
|
@@ -686,24 +683,8 @@ class FBezierPathBuilder extends FPathBuilderBase {
|
|
|
686
683
|
const sourceAnglePoint = FBezierPathBuilder.getAnglePoint(sourceSide, source, target, offset);
|
|
687
684
|
const targetAnglePoint = FBezierPathBuilder.getAnglePoint(targetSide, target, source, offset);
|
|
688
685
|
const path = `M ${source.x} ${source.y} C ${sourceAnglePoint.x} ${sourceAnglePoint.y}, ${targetAnglePoint.x} ${targetAnglePoint.y}, ${target.x + 0.0001} ${target.y + 0.0001}`;
|
|
689
|
-
const
|
|
690
|
-
return { path,
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
var EFConnectionType;
|
|
695
|
-
(function (EFConnectionType) {
|
|
696
|
-
EFConnectionType["SEGMENT"] = "segment";
|
|
697
|
-
EFConnectionType["STRAIGHT"] = "straight";
|
|
698
|
-
EFConnectionType["BEZIER"] = "bezier";
|
|
699
|
-
})(EFConnectionType || (EFConnectionType = {}));
|
|
700
|
-
|
|
701
|
-
class FStraightPathBuilder extends FPathBuilderBase {
|
|
702
|
-
handle(request) {
|
|
703
|
-
const { source, target } = request;
|
|
704
|
-
const path = `M ${source.x} ${source.y} L ${target.x + 0.0001} ${target.y + 0.0001}`;
|
|
705
|
-
const center = new CalculateConnectionCenterHandler().handle(new CalculateConnectionCenterRequest([source, target]));
|
|
706
|
-
return { path, center };
|
|
686
|
+
const connectionCenter = new CalculateConnectionCenterHandler().handle(new CalculateConnectionCenterRequest([source, sourceAnglePoint, targetAnglePoint, target]));
|
|
687
|
+
return { path, connectionCenter };
|
|
707
688
|
}
|
|
708
689
|
}
|
|
709
690
|
|
|
@@ -714,12 +695,12 @@ const CONNECTOR_SIDE_POINT = {
|
|
|
714
695
|
[EFConnectableSide.BOTTOM]: PointExtensions.initialize(0, 1),
|
|
715
696
|
[EFConnectableSide.AUTO]: PointExtensions.initialize(0, 0),
|
|
716
697
|
};
|
|
717
|
-
class FSegmentPathBuilder
|
|
698
|
+
class FSegmentPathBuilder {
|
|
718
699
|
handle(request) {
|
|
719
700
|
const { source, sourceSide, target, targetSide } = request;
|
|
720
701
|
const { points, center } = this.getPathPoints(source, sourceSide, target, targetSide, request.offset);
|
|
721
702
|
const path = this.buildPath(points, request.radius);
|
|
722
|
-
return { path, center };
|
|
703
|
+
return { path, connectionCenter: center };
|
|
723
704
|
}
|
|
724
705
|
getPathPoints(source, sourceSide, target, targetSide, offset) {
|
|
725
706
|
const sourceDirection = CONNECTOR_SIDE_POINT[sourceSide];
|
|
@@ -844,17 +825,12 @@ class FSegmentPathBuilder extends FPathBuilderBase {
|
|
|
844
825
|
}
|
|
845
826
|
}
|
|
846
827
|
|
|
847
|
-
class
|
|
848
|
-
constructor() {
|
|
849
|
-
super(...arguments);
|
|
850
|
-
this.builders = {
|
|
851
|
-
[EFConnectionType.STRAIGHT]: new FStraightPathBuilder(),
|
|
852
|
-
[EFConnectionType.BEZIER]: new FBezierPathBuilder(),
|
|
853
|
-
[EFConnectionType.SEGMENT]: new FSegmentPathBuilder(),
|
|
854
|
-
};
|
|
855
|
-
}
|
|
828
|
+
class FStraightPathBuilder {
|
|
856
829
|
handle(request) {
|
|
857
|
-
|
|
830
|
+
const { source, target } = request;
|
|
831
|
+
const path = `M ${source.x} ${source.y} L ${target.x + 0.0001} ${target.y + 0.0001}`;
|
|
832
|
+
const connectionCenter = new CalculateConnectionCenterHandler().handle(new CalculateConnectionCenterRequest([source, target]));
|
|
833
|
+
return { path, connectionCenter };
|
|
858
834
|
}
|
|
859
835
|
}
|
|
860
836
|
|
|
@@ -1274,18 +1250,50 @@ function mixinChangeConnectionVisibility(base) {
|
|
|
1274
1250
|
};
|
|
1275
1251
|
}
|
|
1276
1252
|
|
|
1253
|
+
const F_CONNECTION_BUILDERS = new InjectionToken('F_CONNECTION_BUILDERS');
|
|
1254
|
+
|
|
1255
|
+
class FConnectionFactory {
|
|
1256
|
+
constructor(builders) {
|
|
1257
|
+
this.builders = {
|
|
1258
|
+
[EFConnectionType.STRAIGHT]: new FStraightPathBuilder(),
|
|
1259
|
+
[EFConnectionType.BEZIER]: new FBezierPathBuilder(),
|
|
1260
|
+
[EFConnectionType.SEGMENT]: new FSegmentPathBuilder(),
|
|
1261
|
+
};
|
|
1262
|
+
if (builders) {
|
|
1263
|
+
this.builders = { ...this.builders, ...builders };
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
handle(request) {
|
|
1267
|
+
const builder = this.builders[request.type];
|
|
1268
|
+
if (!builder) {
|
|
1269
|
+
throw new Error(`FConnectionBuilder not found for type ${request.type}`);
|
|
1270
|
+
}
|
|
1271
|
+
return builder.handle(request.payload);
|
|
1272
|
+
}
|
|
1273
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionFactory, deps: [{ token: F_CONNECTION_BUILDERS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1274
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionFactory }); }
|
|
1275
|
+
}
|
|
1276
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionFactory, decorators: [{
|
|
1277
|
+
type: Injectable
|
|
1278
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1279
|
+
type: Optional
|
|
1280
|
+
}, {
|
|
1281
|
+
type: Inject,
|
|
1282
|
+
args: [F_CONNECTION_BUILDERS]
|
|
1283
|
+
}] }] });
|
|
1284
|
+
|
|
1277
1285
|
const MIXIN_BASE$1 = mixinChangeConnectionSelection(mixinChangeConnectionVisibility(class {
|
|
1278
1286
|
constructor(hostElement) {
|
|
1279
1287
|
this.hostElement = hostElement;
|
|
1280
1288
|
}
|
|
1281
1289
|
}));
|
|
1282
1290
|
class FConnectionBase extends MIXIN_BASE$1 {
|
|
1283
|
-
constructor(elementReference) {
|
|
1291
|
+
constructor(elementReference, connectionFactory) {
|
|
1284
1292
|
super(elementReference.nativeElement);
|
|
1293
|
+
this.connectionFactory = connectionFactory;
|
|
1285
1294
|
this.path = '';
|
|
1286
1295
|
this.vector = VectorExtensions.initialize();
|
|
1287
1296
|
this.stateChanges = new Subject();
|
|
1288
|
-
this.fPathBuilder = new FPathBuilderSelector();
|
|
1289
1297
|
}
|
|
1290
1298
|
initialize() {
|
|
1291
1299
|
this.fPath.initialize();
|
|
@@ -1303,17 +1311,19 @@ class FConnectionBase extends MIXIN_BASE$1 {
|
|
|
1303
1311
|
}
|
|
1304
1312
|
setVector(from, fromSide, to, toSide) {
|
|
1305
1313
|
this.vector = { point1: from, point2: to };
|
|
1306
|
-
const pathResult = this.
|
|
1314
|
+
const pathResult = this.connectionFactory.handle({
|
|
1307
1315
|
type: this.fType,
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1316
|
+
payload: {
|
|
1317
|
+
source: from,
|
|
1318
|
+
sourceSide: fromSide,
|
|
1319
|
+
target: to,
|
|
1320
|
+
targetSide: toSide,
|
|
1321
|
+
radius: 8,
|
|
1322
|
+
offset: 32
|
|
1323
|
+
}
|
|
1314
1324
|
});
|
|
1315
1325
|
this.path = pathResult.path;
|
|
1316
|
-
const transform = `position: absolute; pointerEvents: all; transform: translate(-50%, -50%); left: ${pathResult.
|
|
1326
|
+
const transform = `position: absolute; pointerEvents: all; transform: translate(-50%, -50%); left: ${pathResult.connectionCenter.x}px; top: ${pathResult.connectionCenter.y}px`;
|
|
1317
1327
|
this.fConnectionCenter?.nativeElement?.setAttribute('style', transform);
|
|
1318
1328
|
}
|
|
1319
1329
|
setMarkers() {
|
|
@@ -1348,12 +1358,12 @@ class FConnectionBase extends MIXIN_BASE$1 {
|
|
|
1348
1358
|
this.fDragHandle.redraw(this.vector.point2);
|
|
1349
1359
|
this.fTextComponent.redraw(this.vector);
|
|
1350
1360
|
}
|
|
1351
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionBase, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1361
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionBase, deps: [{ token: i0.ElementRef }, { token: FConnectionFactory }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1352
1362
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.1", type: FConnectionBase, usesInheritance: true, ngImport: i0 }); }
|
|
1353
1363
|
}
|
|
1354
1364
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionBase, decorators: [{
|
|
1355
1365
|
type: Directive
|
|
1356
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
1366
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: FConnectionFactory }] });
|
|
1357
1367
|
|
|
1358
1368
|
var EFConnectionBehavior;
|
|
1359
1369
|
(function (EFConnectionBehavior) {
|
|
@@ -1370,6 +1380,13 @@ function castToConnectionBehavior(behavior) {
|
|
|
1370
1380
|
return result;
|
|
1371
1381
|
}
|
|
1372
1382
|
|
|
1383
|
+
var EFConnectionType;
|
|
1384
|
+
(function (EFConnectionType) {
|
|
1385
|
+
EFConnectionType["SEGMENT"] = "segment";
|
|
1386
|
+
EFConnectionType["STRAIGHT"] = "straight";
|
|
1387
|
+
EFConnectionType["BEZIER"] = "bezier";
|
|
1388
|
+
})(EFConnectionType || (EFConnectionType = {}));
|
|
1389
|
+
|
|
1373
1390
|
function castToConnectionType(type) {
|
|
1374
1391
|
const result = EFConnectionType[type.toUpperCase()];
|
|
1375
1392
|
if (result === undefined) {
|
|
@@ -1398,7 +1415,7 @@ class FConnectionForCreateComponent extends FConnectionBase {
|
|
|
1398
1415
|
return this._behavior;
|
|
1399
1416
|
}
|
|
1400
1417
|
set fType(value) {
|
|
1401
|
-
this._type =
|
|
1418
|
+
this._type = value;
|
|
1402
1419
|
}
|
|
1403
1420
|
get fType() {
|
|
1404
1421
|
return this._type;
|
|
@@ -1406,8 +1423,8 @@ class FConnectionForCreateComponent extends FConnectionBase {
|
|
|
1406
1423
|
get boundingElement() {
|
|
1407
1424
|
return this.fPath.hostElement;
|
|
1408
1425
|
}
|
|
1409
|
-
constructor(elementReference, fComponentsStore) {
|
|
1410
|
-
super(elementReference);
|
|
1426
|
+
constructor(elementReference, fConnectionFactory, fComponentsStore) {
|
|
1427
|
+
super(elementReference, fConnectionFactory);
|
|
1411
1428
|
this.fComponentsStore = fComponentsStore;
|
|
1412
1429
|
this.fConnectionId = `f-connection-for-create-${uniqueId$4++}`;
|
|
1413
1430
|
this.fText = '';
|
|
@@ -1427,15 +1444,15 @@ class FConnectionForCreateComponent extends FConnectionBase {
|
|
|
1427
1444
|
ngOnDestroy() {
|
|
1428
1445
|
this.fComponentsStore.fTempConnection = undefined;
|
|
1429
1446
|
}
|
|
1430
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionForCreateComponent, deps: [{ token: i0.ElementRef }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1431
|
-
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:
|
|
1447
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionForCreateComponent, deps: [{ token: i0.ElementRef }, { token: FConnectionFactory }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1448
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FConnectionForCreateComponent, selector: "f-connection-for-create", inputs: { fStartColor: "fStartColor", fEndColor: "fEndColor", fBehavior: "fBehavior", fType: "fType" }, host: { classAttribute: "f-component f-connection f-connection-for-create" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionForCreateComponent }], queries: [{ propertyName: "fMarkers", predicate: F_MARKER, descendants: true }, { propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, descendants: true }], viewQueries: [{ propertyName: "fDefs", first: true, predicate: ["defs"], descendants: true, static: true }, { propertyName: "fPath", first: true, predicate: CONNECTION_PATH, descendants: true, static: true }, { propertyName: "fGradient", first: true, predicate: CONNECTION_GRADIENT, descendants: true, static: true }, { propertyName: "fDragHandle", first: true, predicate: FConnectionDragHandleComponent, descendants: true, static: true }, { propertyName: "fSelection", first: true, predicate: FConnectionSelectionComponent, descendants: true, static: true }, { propertyName: "fTextComponent", first: true, predicate: CONNECTION_TEXT, descendants: true, static: true }, { propertyName: "fConnectionCenter", first: true, predicate: ["fConnectionCenter"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FConnectionDragHandleComponent, selector: "circle[f-connection-drag-handle]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1432
1449
|
}
|
|
1433
1450
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionForCreateComponent, decorators: [{
|
|
1434
1451
|
type: Component,
|
|
1435
1452
|
args: [{ selector: "f-connection-for-create", changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
1436
1453
|
class: "f-component f-connection f-connection-for-create"
|
|
1437
1454
|
}, providers: [{ provide: F_CONNECTION, useExisting: FConnectionForCreateComponent }], template: "<svg xmlns=\"http://www.w3.org/2000/svg\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}\n"] }]
|
|
1438
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: FComponentsStore }], propDecorators: { fStartColor: [{
|
|
1455
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: FConnectionFactory }, { type: FComponentsStore }], propDecorators: { fStartColor: [{
|
|
1439
1456
|
type: Input
|
|
1440
1457
|
}], fEndColor: [{
|
|
1441
1458
|
type: Input
|
|
@@ -1481,7 +1498,7 @@ class FConnectionComponent extends FConnectionBase {
|
|
|
1481
1498
|
return this._behavior;
|
|
1482
1499
|
}
|
|
1483
1500
|
set fType(value) {
|
|
1484
|
-
this._type =
|
|
1501
|
+
this._type = value;
|
|
1485
1502
|
}
|
|
1486
1503
|
get fType() {
|
|
1487
1504
|
return this._type;
|
|
@@ -1489,8 +1506,8 @@ class FConnectionComponent extends FConnectionBase {
|
|
|
1489
1506
|
get boundingElement() {
|
|
1490
1507
|
return this.fPath.hostElement;
|
|
1491
1508
|
}
|
|
1492
|
-
constructor(elementReference, fComponentsStore) {
|
|
1493
|
-
super(elementReference);
|
|
1509
|
+
constructor(elementReference, fConnectionFactory, fComponentsStore) {
|
|
1510
|
+
super(elementReference, fConnectionFactory);
|
|
1494
1511
|
this.fComponentsStore = fComponentsStore;
|
|
1495
1512
|
this.fConnectionId = `f-connection-${uniqueId$3++}`;
|
|
1496
1513
|
this.fText = '';
|
|
@@ -1507,8 +1524,8 @@ class FConnectionComponent extends FConnectionBase {
|
|
|
1507
1524
|
ngOnDestroy() {
|
|
1508
1525
|
this.fComponentsStore.removeConnection(this);
|
|
1509
1526
|
}
|
|
1510
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionComponent, deps: [{ token: i0.ElementRef }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1511
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FConnectionComponent, selector: "f-connection", inputs: { fConnectionId: "fConnectionId", fText: "fText", fStartColor: "fStartColor", fEndColor: "fEndColor", fOutputId: "fOutputId", fInputId: "fInputId", fBehavior: "fBehavior", fType: "fType", fDraggingDisabled: ["fReassignDisabled", "fDraggingDisabled"], fSelectionDisabled: "fSelectionDisabled" }, host: { properties: { "attr.id": "fConnectionId", "class.f-connection-selection-disabled": "fSelectionDisabled", "class.f-connection-reassign-disabled": "fDraggingDisabled" }, classAttribute: "f-component f-connection" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionComponent }], queries: [{ propertyName: "fMarkers", predicate: F_MARKER, descendants: true }, { propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, descendants: true }], viewQueries: [{ propertyName: "fDefs", first: true, predicate: ["defs"], descendants: true, static: true }, { propertyName: "fPath", first: true, predicate: CONNECTION_PATH, descendants: true, static: true }, { propertyName: "fGradient", first: true, predicate: CONNECTION_GRADIENT, descendants: true, static: true }, { propertyName: "fDragHandle", first: true, predicate: FConnectionDragHandleComponent, descendants: true, static: true }, { propertyName: "fSelection", first: true, predicate: FConnectionSelectionComponent, descendants: true, static: true }, { propertyName: "fTextComponent", first: true, predicate: CONNECTION_TEXT, descendants: true, static: true }, { propertyName: "fConnectionCenter", first: true, predicate: ["fConnectionCenter"], descendants: true }], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"overflow: visible; display: block; vertical-align: middle;\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}\n"], dependencies: [{ kind: "directive", type:
|
|
1527
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionComponent, deps: [{ token: i0.ElementRef }, { token: FConnectionFactory }, { token: FComponentsStore }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1528
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.1", type: FConnectionComponent, selector: "f-connection", inputs: { fConnectionId: "fConnectionId", fText: "fText", fStartColor: "fStartColor", fEndColor: "fEndColor", fOutputId: "fOutputId", fInputId: "fInputId", fBehavior: "fBehavior", fType: "fType", fDraggingDisabled: ["fReassignDisabled", "fDraggingDisabled"], fSelectionDisabled: "fSelectionDisabled" }, host: { properties: { "attr.id": "fConnectionId", "class.f-connection-selection-disabled": "fSelectionDisabled", "class.f-connection-reassign-disabled": "fDraggingDisabled" }, classAttribute: "f-component f-connection" }, providers: [{ provide: F_CONNECTION, useExisting: FConnectionComponent }], queries: [{ propertyName: "fMarkers", predicate: F_MARKER, descendants: true }, { propertyName: "fConnectionCenters", predicate: FConnectionCenterDirective, descendants: true }], viewQueries: [{ propertyName: "fDefs", first: true, predicate: ["defs"], descendants: true, static: true }, { propertyName: "fPath", first: true, predicate: CONNECTION_PATH, descendants: true, static: true }, { propertyName: "fGradient", first: true, predicate: CONNECTION_GRADIENT, descendants: true, static: true }, { propertyName: "fDragHandle", first: true, predicate: FConnectionDragHandleComponent, descendants: true, static: true }, { propertyName: "fSelection", first: true, predicate: FConnectionSelectionComponent, descendants: true, static: true }, { propertyName: "fTextComponent", first: true, predicate: CONNECTION_TEXT, descendants: true, static: true }, { propertyName: "fConnectionCenter", first: true, predicate: ["fConnectionCenter"], descendants: true }], exportAs: ["fComponent"], usesInheritance: true, ngImport: i0, template: "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"overflow: visible; display: block; vertical-align: middle;\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}\n"], dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: FConnectionDragHandleComponent, selector: "circle[f-connection-drag-handle]" }, { kind: "component", type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { kind: "component", type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { kind: "component", type: FConnectionTextComponent, selector: "text[f-connection-text]" }, { kind: "component", type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1512
1529
|
}
|
|
1513
1530
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImport: i0, type: FConnectionComponent, decorators: [{
|
|
1514
1531
|
type: Component,
|
|
@@ -1518,7 +1535,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
|
|
|
1518
1535
|
'[class.f-connection-selection-disabled]': 'fSelectionDisabled',
|
|
1519
1536
|
'[class.f-connection-reassign-disabled]': 'fDraggingDisabled',
|
|
1520
1537
|
}, providers: [{ provide: F_CONNECTION, useExisting: FConnectionComponent }], template: "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"overflow: visible; display: block; vertical-align: middle;\">\n <defs #defs></defs>\n <g class=\"f-connection-group\">\n <linearGradient fConnectionGradient></linearGradient>\n <path fConnectionSelection [attr.d]=\"path\"></path>\n <g>\n <path f-connection-path\n [attr.d]=\"path\">\n </path>\n <circle f-connection-drag-handle r=\"8\"></circle>\n </g>\n <text f-connection-text></text>\n </g>\n <ng-content></ng-content>\n</svg>\n<div #fConnectionCenter class=\"f-connection-center\" *ngIf=\"fConnectionCenters.length\">\n <ng-content select=\"[fConnectionCenter]\"></ng-content>\n</div>\n", styles: [":host{pointer-events:none;position:absolute}:host svg{overflow:visible}:host svg .f-connection-group{pointer-events:all}\n"] }]
|
|
1521
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: FComponentsStore }], propDecorators: { fConnectionId: [{
|
|
1538
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: FConnectionFactory }, { type: FComponentsStore }], propDecorators: { fConnectionId: [{
|
|
1522
1539
|
type: Input
|
|
1523
1540
|
}], fText: [{
|
|
1524
1541
|
type: Input
|
|
@@ -3769,8 +3786,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
|
|
|
3769
3786
|
}], ctorParameters: () => [{ type: FDraggableDataContext }] });
|
|
3770
3787
|
|
|
3771
3788
|
class RedrawConnectionsRequest {
|
|
3772
|
-
constructor() {
|
|
3773
|
-
}
|
|
3774
3789
|
}
|
|
3775
3790
|
|
|
3776
3791
|
let RedrawConnectionsHandler = class RedrawConnectionsHandler {
|
|
@@ -4467,6 +4482,7 @@ class FFlowComponent extends FFlowBase {
|
|
|
4467
4482
|
FFlowMediator,
|
|
4468
4483
|
FComponentsStore,
|
|
4469
4484
|
FDraggableDataContext,
|
|
4485
|
+
FConnectionFactory,
|
|
4470
4486
|
...SINGLE_SELECT_PROVIDERS,
|
|
4471
4487
|
...SELECTION_AREA_PROVIDERS,
|
|
4472
4488
|
...NODE_PROVIDERS,
|
|
@@ -4486,6 +4502,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
|
|
|
4486
4502
|
FFlowMediator,
|
|
4487
4503
|
FComponentsStore,
|
|
4488
4504
|
FDraggableDataContext,
|
|
4505
|
+
FConnectionFactory,
|
|
4489
4506
|
...SINGLE_SELECT_PROVIDERS,
|
|
4490
4507
|
...SELECTION_AREA_PROVIDERS,
|
|
4491
4508
|
...NODE_PROVIDERS,
|
|
@@ -4610,5 +4627,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.1", ngImpor
|
|
|
4610
4627
|
* Generated bundle index. Do not edit.
|
|
4611
4628
|
*/
|
|
4612
4629
|
|
|
4613
|
-
export { CANVAS_PROVIDERS, COMMON_PROVIDERS, CONNECTIONS_PROVIDERS, CONNECTION_GRADIENT, CONNECTION_PATH, CONNECTION_TEXT, CalculateCenterBetweenPointsHandler, CalculateCenterBetweenPointsRequest, CalculateConnectionCenterHandler, CalculateConnectionCenterRequest, CalculateConnectorConnectableSideHandler, CalculateConnectorConnectableSideRequest, CanvasDragHandler, CanvasOnPointerUp, CanvasPrepareDragSequence, ClearSelectionHandler, ClearSelectionRequest, ConnectionDragHandler, ConnectionSourceDragHandler, ConnectionTargetDragHandler, CreateConnectionDragHandler, CreateConnectionOnPointerUp, CreateConnectionPrepareDragSequence, EFConnectableSide, EFConnectionBehavior, EFConnectionType, EFDraggableType, EFMarkerType, EXTERNAL_ITEM_PROVIDERS, ExternalItemDragHandler, ExternalItemOnPointerUp, ExternalItemPrepareDragSequence, FBackgroundBase, FBackgroundComponent, FBezierPathBuilder, FCanvasBase, FCanvasChangeEvent, FCanvasComponent, FCellPatternComponent, FComponentsStore, FConnectionBase, FConnectionCenterDirective, FConnectionComponent, FConnectionDragHandleComponent, FConnectionForCreateComponent, FConnectionGradientComponent, FConnectionPathComponent, FConnectionSelectionComponent, FConnectionTextComponent, FConnectionTextPathDirective, FConnectorBase, FCreateConnectionEvent, FCreateNodeEvent, FDragHandleDirective, FDraggableBase, FDraggableDataContext, FDraggableDirective, FExternalItemBase, FExternalItemDirective, FExternalItemService, FFlowBase, FFlowComponent, FFlowMediator, FFlowModule, FHandlerRegister, FLOW, FLineAlignmentBase, FLineAlignmentComponent, FMarkerBase, FMarkerDirective, FNodeBase, FNodeDirective, FNodeInputBase, FNodeInputDirective, FNodeOutletBase, FNodeOutletDirective, FNodeOutputBase, FNodeOutputDirective,
|
|
4630
|
+
export { CANVAS_PROVIDERS, COMMON_PROVIDERS, CONNECTIONS_PROVIDERS, CONNECTION_GRADIENT, CONNECTION_PATH, CONNECTION_TEXT, CalculateCenterBetweenPointsHandler, CalculateCenterBetweenPointsRequest, CalculateConnectionCenterHandler, CalculateConnectionCenterRequest, CalculateConnectorConnectableSideHandler, CalculateConnectorConnectableSideRequest, CanvasDragHandler, CanvasOnPointerUp, CanvasPrepareDragSequence, ClearSelectionHandler, ClearSelectionRequest, ConnectionDragHandler, ConnectionSourceDragHandler, ConnectionTargetDragHandler, CreateConnectionDragHandler, CreateConnectionOnPointerUp, CreateConnectionPrepareDragSequence, EFConnectableSide, EFConnectionBehavior, EFConnectionType, EFDraggableType, EFMarkerType, EXTERNAL_ITEM_PROVIDERS, ExternalItemDragHandler, ExternalItemOnPointerUp, ExternalItemPrepareDragSequence, FBackgroundBase, FBackgroundComponent, FBezierPathBuilder, FCanvasBase, FCanvasChangeEvent, FCanvasComponent, FCellPatternComponent, FComponentsStore, FConnectionBase, FConnectionCenterDirective, FConnectionComponent, FConnectionDragHandleComponent, FConnectionFactory, FConnectionForCreateComponent, FConnectionGradientComponent, FConnectionPathComponent, FConnectionSelectionComponent, FConnectionTextComponent, FConnectionTextPathDirective, FConnectorBase, FCreateConnectionEvent, FCreateNodeEvent, FDragHandleDirective, FDraggableBase, FDraggableDataContext, FDraggableDirective, FExternalItemBase, FExternalItemDirective, FExternalItemService, FFlowBase, FFlowComponent, FFlowMediator, FFlowModule, FHandlerRegister, FLOW, FLineAlignmentBase, FLineAlignmentComponent, FMarkerBase, FMarkerDirective, FNodeBase, FNodeDirective, FNodeInputBase, FNodeInputDirective, FNodeOutletBase, FNodeOutletDirective, FNodeOutputBase, FNodeOutputDirective, FReassignConnectionEvent, FResizeObserver, FSegmentPathBuilder, FSelectionAreaBase, FSelectionAreaComponent, FSelectionChangeEvent, FStraightPathBuilder, FZoomBase, FZoomDirective, F_BACKGROUND, F_BACKGROUND_PATTERN, F_CANVAS, F_CONNECTION_BUILDERS, F_CONNECTION_DRAG_HANDLE_CLASS, F_CONNECTION_IDENTIFIERS, F_DRAGGABLE, F_DRAG_HANDLE, F_EXTERNAL_ITEM, F_FLOW, F_LINE_ALIGNMENT, F_MARKER, F_NODE, F_NODE_INPUT, F_NODE_OUTLET, F_NODE_OUTPUT, F_SELECTED_CLASS, F_SELECTION_AREA, F_ZOOM, FindFirstCanBeConnectedOutputByOutletHandler, FindInputsUnderPointerHandler, FindInputsUnderPointerRequest, FirstNotConnectedInputOfNodeUnderPointerHandler, GetCanBeSelectedItemsHandler, GetConnectionHandler, GetConnectionVectorHandler, GetConnectionVectorRequest, GetElementRectInFlowHandler, GetElementRectInFlowRequest, GetIncomingConnectionsHandler, GetInputRectInFlowHandler, GetInputRectInFlowRequest, GetInputRectInFlowResponse, GetNodesRectHandler, GetNodesRectRequest, GetOutgoingConnectionsHandler, GetOutputRectInFlowHandler, GetOutputRectInFlowRequest, GetOutputRectInFlowResponse, GetSelectionHandler, GetSelectionRequest, IsConnectionUnderNodeHandler, LineElement, LineService, MOUSE_EVENT_IGNORE_TIME, NODE_PROVIDERS, NearestCoordinateFinder, NodeDragHandler, NodeOnPointerUp, NodePrepareDragSequence, ReassignConnectionDragHandler, ReassignConnectionOnPointerUp, ReassignConnectionPrepareDragSequence, RedrawConnectionsHandler, RedrawConnectionsRequest, SELECTION_AREA_PROVIDERS, SINGLE_SELECT_PROVIDERS, SelectAllHandler, SelectAllRequest, SelectHandler, SelectRequest, SelectionAreaDragHandle, SelectionAreaOnPointerUp, SelectionAreaPrepareDragSequence, SingleSelectOnPointerDown, UpdateConnectionLayerHandler, UpdateNodeLayerHandler, castToConnectableSide, castToConnectionBehavior, castToConnectionType, getExternalItem, getFlowUid, isExternalItem, isNode, isNodeDragHandle, isNodeInput, isNodeOutlet, isNodeOutput, mixinChangeConnectionSelection, mixinChangeConnectionVisibility };
|
|
4614
4631
|
//# sourceMappingURL=foblex-flow.mjs.map
|