@foblex/flow 12.6.8 → 12.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +1 -1
  2. package/bundles/foblex-flow.umd.js +92 -22
  3. package/bundles/foblex-flow.umd.js.map +1 -1
  4. package/domain/f-connection/add-connection-to-store/add-connection-to-store-request.d.ts +5 -0
  5. package/domain/f-connection/add-connection-to-store/add-connection-to-store.execution.d.ts +11 -0
  6. package/domain/f-connection/add-connection-to-store/index.d.ts +2 -0
  7. package/domain/f-connection/index.d.ts +2 -0
  8. package/domain/f-connection/providers.d.ts +3 -1
  9. package/domain/f-connection/remove-connection-from-store/index.d.ts +2 -0
  10. package/domain/f-connection/remove-connection-from-store/remove-connection-from-store-request.d.ts +5 -0
  11. package/domain/f-connection/remove-connection-from-store/remove-connection-from-store.execution.d.ts +11 -0
  12. package/domain/providers.d.ts +1 -1
  13. package/esm2015/domain/f-background/add-pattern-to-background/add-pattern-to-background.execution.js +2 -2
  14. package/esm2015/domain/f-canvas/center-group-or-node/center-group-or-node.execution.js +2 -2
  15. package/esm2015/domain/f-canvas/fit-to-flow/fit-to-flow.execution.js +2 -2
  16. package/esm2015/domain/f-canvas/reset-scale-and-center/reset-scale-and-center.execution.js +2 -2
  17. package/esm2015/domain/f-connection/add-connection-to-store/add-connection-to-store-request.js +6 -0
  18. package/esm2015/domain/f-connection/add-connection-to-store/add-connection-to-store.execution.js +25 -0
  19. package/esm2015/domain/f-connection/add-connection-to-store/index.js +3 -0
  20. package/esm2015/domain/f-connection/index.js +3 -1
  21. package/esm2015/domain/f-connection/providers.js +5 -1
  22. package/esm2015/domain/f-connection/remove-connection-from-store/index.js +3 -0
  23. package/esm2015/domain/f-connection/remove-connection-from-store/remove-connection-from-store-request.js +6 -0
  24. package/esm2015/domain/f-connection/remove-connection-from-store/remove-connection-from-store.execution.js +29 -0
  25. package/esm2015/f-canvas/f-canvas.component.js +12 -5
  26. package/esm2015/f-connection/f-connection/f-connection.component.js +16 -13
  27. package/esm2015/f-connectors/e-f-connectable-side.js +2 -2
  28. package/esm2015/f-connectors/f-node-input/f-node-input.directive.js +4 -4
  29. package/esm2015/f-connectors/f-node-output/f-node-output.directive.js +3 -3
  30. package/esm2015/f-draggable/connections/reassign-connection/f-reassign-connection.event.js +3 -2
  31. package/esm2015/f-draggable/connections/reassign-connection/reassign-connection-finalize/reassign-connection-finalize.execution.js +3 -3
  32. package/esm2015/f-draggable/node/connection-source.drag-handler.js +2 -2
  33. package/esm2015/f-draggable/node/connection-target.drag-handler.js +2 -2
  34. package/esm2015/f-draggable/node/connection.drag-handler.js +2 -2
  35. package/esm2015/f-draggable/node-resize/node-resize.drag-handler.js +3 -2
  36. package/esm2015/f-external-item/domain/external-item-preparation/external-item-preparation.execution.js +3 -3
  37. package/esm2015/f-external-item/domain/external-item-preparation/external-item-preparation.validator.js +3 -3
  38. package/esm2015/f-external-item/domain/external-item.drag-handler.js +1 -1
  39. package/f-canvas/f-canvas.component.d.ts +1 -0
  40. package/f-connection/f-connection/f-connection.component.d.ts +3 -1
  41. package/f-connectors/e-f-connectable-side.d.ts +1 -1
  42. package/f-draggable/connections/reassign-connection/f-reassign-connection.event.d.ts +3 -1
  43. package/f-external-item/domain/external-item-preparation/external-item-preparation.execution.d.ts +1 -1
  44. package/f-external-item/domain/external-item-preparation/external-item-preparation.validator.d.ts +1 -1
  45. package/f-external-item/domain/external-item.drag-handler.d.ts +1 -1
  46. package/fesm2015/foblex-flow.js +87 -23
  47. package/fesm2015/foblex-flow.js.map +1 -1
  48. package/package.json +2 -2
package/README.md CHANGED
@@ -68,7 +68,7 @@ You can also report [issues](https://github.com/Foblex/flow/issues) and request
68
68
 
69
69
  ### License
70
70
 
71
- This library is available for use under the [MIT License](LICENSE).
71
+ This library is available for use under the [MIT License](./LICENSE).
72
72
 
73
73
  For more information please contact our [support](mailto:support@foblex.com).
74
74
 
@@ -1085,6 +1085,32 @@
1085
1085
  exports.UpdateScaleExecution
1086
1086
  ];
1087
1087
 
1088
+ var AddConnectionToStoreRequest = /** @class */ (function () {
1089
+ function AddConnectionToStoreRequest(fConnection) {
1090
+ this.fConnection = fConnection;
1091
+ }
1092
+ return AddConnectionToStoreRequest;
1093
+ }());
1094
+
1095
+ exports.AddConnectionToStoreExecution = /** @class */ (function () {
1096
+ function AddConnectionToStoreExecution(fComponentsStore) {
1097
+ this.fComponentsStore = fComponentsStore;
1098
+ }
1099
+ AddConnectionToStoreExecution.prototype.handle = function (request) {
1100
+ this.fComponentsStore.fConnections.push(request.fConnection);
1101
+ this.fComponentsStore.componentDataChanged();
1102
+ };
1103
+ return AddConnectionToStoreExecution;
1104
+ }());
1105
+ exports.AddConnectionToStoreExecution.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: exports.AddConnectionToStoreExecution, deps: [{ token: FComponentsStore }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1106
+ exports.AddConnectionToStoreExecution.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: exports.AddConnectionToStoreExecution });
1107
+ exports.AddConnectionToStoreExecution = __decorate([
1108
+ i2.FExecutionRegister(AddConnectionToStoreRequest)
1109
+ ], exports.AddConnectionToStoreExecution);
1110
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: exports.AddConnectionToStoreExecution, decorators: [{
1111
+ type: i0.Injectable
1112
+ }], ctorParameters: function () { return [{ type: FComponentsStore }]; } });
1113
+
1088
1114
  var FindClosestInputUsingSnapThresholdRequest = /** @class */ (function () {
1089
1115
  function FindClosestInputUsingSnapThresholdRequest(position, canBeConnectedInputs, snapThreshold) {
1090
1116
  this.position = position;
@@ -1282,10 +1308,42 @@
1282
1308
  type: i0.Injectable
1283
1309
  }], ctorParameters: function () { return [{ type: FComponentsStore }, { type: i2__namespace.FMediator }]; } });
1284
1310
 
1311
+ var RemoveConnectionFromStoreRequest = /** @class */ (function () {
1312
+ function RemoveConnectionFromStoreRequest(fConnection) {
1313
+ this.fConnection = fConnection;
1314
+ }
1315
+ return RemoveConnectionFromStoreRequest;
1316
+ }());
1317
+
1318
+ exports.RemoveConnectionFromStoreExecution = /** @class */ (function () {
1319
+ function RemoveConnectionFromStoreExecution(fComponentsStore) {
1320
+ this.fComponentsStore = fComponentsStore;
1321
+ }
1322
+ RemoveConnectionFromStoreExecution.prototype.handle = function (request) {
1323
+ var index = this.fComponentsStore.fConnections.indexOf(request.fConnection);
1324
+ if (index === -1) {
1325
+ throw new Error("Connection not found in store");
1326
+ }
1327
+ this.fComponentsStore.fConnections.splice(index, 1);
1328
+ this.fComponentsStore.componentDataChanged();
1329
+ };
1330
+ return RemoveConnectionFromStoreExecution;
1331
+ }());
1332
+ exports.RemoveConnectionFromStoreExecution.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: exports.RemoveConnectionFromStoreExecution, deps: [{ token: FComponentsStore }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1333
+ exports.RemoveConnectionFromStoreExecution.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: exports.RemoveConnectionFromStoreExecution });
1334
+ exports.RemoveConnectionFromStoreExecution = __decorate([
1335
+ i2.FExecutionRegister(RemoveConnectionFromStoreRequest)
1336
+ ], exports.RemoveConnectionFromStoreExecution);
1337
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: exports.RemoveConnectionFromStoreExecution, decorators: [{
1338
+ type: i0.Injectable
1339
+ }], ctorParameters: function () { return [{ type: FComponentsStore }]; } });
1340
+
1285
1341
  var F_CONNECTION_FEATURES = [
1342
+ exports.AddConnectionToStoreExecution,
1286
1343
  exports.FindClosestInputUsingSnapThresholdExecution,
1287
1344
  exports.GetAllCanBeConnectedInputPositionsExecution,
1288
1345
  exports.GetConnectorWithRectExecution,
1346
+ exports.RemoveConnectionFromStoreExecution
1289
1347
  ];
1290
1348
 
1291
1349
  var ClearSelectionRequest = /** @class */ (function () {
@@ -1473,8 +1531,8 @@
1473
1531
  exports.EFConnectableSide = void 0;
1474
1532
  (function (EFConnectableSide) {
1475
1533
  EFConnectableSide["LEFT"] = "left";
1476
- EFConnectableSide["RIGHT"] = "right";
1477
1534
  EFConnectableSide["TOP"] = "top";
1535
+ EFConnectableSide["RIGHT"] = "right";
1478
1536
  EFConnectableSide["BOTTOM"] = "bottom";
1479
1537
  EFConnectableSide["AUTO"] = "auto";
1480
1538
  })(exports.EFConnectableSide || (exports.EFConnectableSide = {}));
@@ -2157,6 +2215,7 @@
2157
2215
  FNodeInputDirective.prototype.setConnected = function (isConnected) {
2158
2216
  this.isConnected = isConnected;
2159
2217
  this.hostElement.classList.toggle('f-node-input-connected', isConnected);
2218
+ this.hostElement.classList.toggle('f-node-input-not-connectable', !this.canBeConnected);
2160
2219
  };
2161
2220
  FNodeInputDirective.prototype.ngOnDestroy = function () {
2162
2221
  this.fNode.removeConnector(this);
@@ -2165,7 +2224,7 @@
2165
2224
  return FNodeInputDirective;
2166
2225
  }(FNodeInputBase));
2167
2226
  FNodeInputDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FNodeInputDirective, deps: [{ token: i0__namespace.ElementRef }, { token: F_NODE }, { token: FComponentsStore }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2168
- FNodeInputDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", 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__namespace });
2227
+ FNodeInputDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", 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" }, classAttribute: "f-component f-node-input" }, providers: [{ provide: F_NODE_INPUT, useExisting: FNodeInputDirective }], exportAs: ["fNodeInput"], usesInheritance: true, ngImport: i0__namespace });
2169
2228
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FNodeInputDirective, decorators: [{
2170
2229
  type: i0.Directive,
2171
2230
  args: [{
@@ -2175,8 +2234,7 @@
2175
2234
  '[attr.data-f-input-id]': 'id',
2176
2235
  class: "f-component f-node-input",
2177
2236
  '[class.f-node-input-multiple]': 'multiple',
2178
- '[class.f-node-input-disabled]': 'disabled',
2179
- '[class.f-node-input-not-connectable]': '!canBeConnected',
2237
+ '[class.f-node-input-disabled]': 'disabled'
2180
2238
  },
2181
2239
  providers: [{ provide: F_NODE_INPUT, useExisting: FNodeInputDirective }],
2182
2240
  }]
@@ -2391,6 +2449,7 @@
2391
2449
  FNodeOutputDirective.prototype.setConnected = function (isConnected) {
2392
2450
  this.isConnected = isConnected;
2393
2451
  this.hostElement.classList.toggle('f-node-output-connected', isConnected);
2452
+ this.hostElement.classList.toggle('f-node-output-not-connectable', !this.canBeConnected);
2394
2453
  };
2395
2454
  FNodeOutputDirective.prototype.ngOnDestroy = function () {
2396
2455
  this.fNode.removeConnector(this);
@@ -2399,7 +2458,7 @@
2399
2458
  return FNodeOutputDirective;
2400
2459
  }(FNodeOutputBase));
2401
2460
  FNodeOutputDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FNodeOutputDirective, deps: [{ token: i0__namespace.ElementRef }, { token: F_NODE }, { token: FComponentsStore }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2402
- FNodeOutputDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", 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-multiple": "multiple", "class.f-node-output-disabled": "disabled", "class.f-node-output-not-connectable": "!canBeConnected", "class.f-node-output-self-connectable": "isSelfConnectable" }, classAttribute: "f-component f-node-output" }, providers: [{ provide: F_NODE_OUTPUT, useExisting: FNodeOutputDirective }], exportAs: ["fNodeOutput"], usesInheritance: true, ngImport: i0__namespace });
2461
+ FNodeOutputDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", 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-multiple": "multiple", "class.f-node-output-disabled": "disabled", "class.f-node-output-self-connectable": "isSelfConnectable" }, classAttribute: "f-component f-node-output" }, providers: [{ provide: F_NODE_OUTPUT, useExisting: FNodeOutputDirective }], exportAs: ["fNodeOutput"], usesInheritance: true, ngImport: i0__namespace });
2403
2462
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FNodeOutputDirective, decorators: [{
2404
2463
  type: i0.Directive,
2405
2464
  args: [{
@@ -2410,7 +2469,6 @@
2410
2469
  class: "f-component f-node-output",
2411
2470
  '[class.f-node-output-multiple]': 'multiple',
2412
2471
  '[class.f-node-output-disabled]': 'disabled',
2413
- '[class.f-node-output-not-connectable]': '!canBeConnected',
2414
2472
  '[class.f-node-output-self-connectable]': 'isSelfConnectable',
2415
2473
  },
2416
2474
  providers: [{ provide: F_NODE_OUTPUT, useExisting: FNodeOutputDirective }],
@@ -3069,11 +3127,12 @@
3069
3127
  }());
3070
3128
 
3071
3129
  var FReassignConnectionEvent = /** @class */ (function () {
3072
- function FReassignConnectionEvent(fConnectionId, fOutputId, oldFInputId, newFInputId) {
3130
+ function FReassignConnectionEvent(fConnectionId, fOutputId, oldFInputId, newFInputId, fDropPosition) {
3073
3131
  this.fConnectionId = fConnectionId;
3074
3132
  this.fOutputId = fOutputId;
3075
3133
  this.oldFInputId = oldFInputId;
3076
3134
  this.newFInputId = newFInputId;
3135
+ this.fDropPosition = fDropPosition;
3077
3136
  }
3078
3137
  return FReassignConnectionEvent;
3079
3138
  }());
@@ -3104,10 +3163,10 @@
3104
3163
  };
3105
3164
  ReassignConnectionFinalizeExecution.prototype.emitEvent = function (event) {
3106
3165
  var input = this.getInputUnderPointer(event);
3107
- if (!input || !this.isReassignToDifferentInput(input)) {
3166
+ if (!!input && !this.isReassignToDifferentInput(input)) {
3108
3167
  return;
3109
3168
  }
3110
- this.fDraggable.fReassignConnection.emit(new FReassignConnectionEvent(this.dragHandler.fConnection.fId, this.dragHandler.fConnection.fOutputId, this.dragHandler.fConnection.fInputId, input.id));
3169
+ this.fDraggable.fReassignConnection.emit(new FReassignConnectionEvent(this.dragHandler.fConnection.fId, this.dragHandler.fConnection.fOutputId, this.dragHandler.fConnection.fInputId, input === null || input === void 0 ? void 0 : input.id, event.getPosition()));
3111
3170
  };
3112
3171
  ReassignConnectionFinalizeExecution.prototype.getInputUnderPointer = function (event) {
3113
3172
  return this.fMediator.send(new GetInputUnderPointerRequest(event, this.dragHandler));
@@ -4206,9 +4265,10 @@
4206
4265
  var uniqueId$5 = 0;
4207
4266
  var FConnectionComponent = /** @class */ (function (_super) {
4208
4267
  __extends(FConnectionComponent, _super);
4209
- function FConnectionComponent(elementReference, fConnectionFactory, fComponentsStore) {
4268
+ function FConnectionComponent(elementReference, fConnectionFactory, fComponentsStore, fMediator) {
4210
4269
  var _this = _super.call(this, elementReference, fConnectionFactory) || this;
4211
4270
  _this.fComponentsStore = fComponentsStore;
4271
+ _this.fMediator = fMediator;
4212
4272
  _this.fId = "f-connection-" + uniqueId$5++;
4213
4273
  _this._fText = '';
4214
4274
  _this._fStartColor = 'black';
@@ -4328,14 +4388,14 @@
4328
4388
  configurable: true
4329
4389
  });
4330
4390
  FConnectionComponent.prototype.ngOnInit = function () {
4331
- this.fComponentsStore.addComponent(this.fComponentsStore.fConnections, this);
4391
+ this.fMediator.send(new AddConnectionToStoreRequest(this));
4332
4392
  };
4333
4393
  FConnectionComponent.prototype.ngOnDestroy = function () {
4334
- this.fComponentsStore.removeComponent(this.fComponentsStore.fConnections, this);
4394
+ this.fMediator.send(new RemoveConnectionFromStoreRequest(this));
4335
4395
  };
4336
4396
  return FConnectionComponent;
4337
4397
  }(FConnectionBase));
4338
- FConnectionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FConnectionComponent, deps: [{ token: i0__namespace.ElementRef }, { token: FConnectionFactory }, { token: FComponentsStore }], target: i0__namespace.ɵɵFactoryTarget.Component });
4398
+ FConnectionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FConnectionComponent, deps: [{ token: i0__namespace.ElementRef }, { token: FConnectionFactory }, { token: FComponentsStore }, { token: i2__namespace.FMediator }], target: i0__namespace.ɵɵFactoryTarget.Component });
4339
4399
  FConnectionComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: FConnectionComponent, selector: "f-connection", inputs: { fId: ["fConnectionId", "fId"], 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": "fId", "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__namespace, 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\"></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}:host .f-connection-center{pointer-events:all}\n"], components: [{ type: FConnectionGradientComponent, selector: "linearGradient[fConnectionGradient]" }, { type: FConnectionSelectionComponent, selector: "path[fConnectionSelection]" }, { type: FConnectionPathComponent, selector: "path[f-connection-path]" }, { type: FConnectionDragHandleComponent, selector: "circle[f-connection-drag-handle]" }, { type: FConnectionTextComponent, selector: "text[f-connection-text]" }], directives: [{ type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
4340
4400
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FConnectionComponent, decorators: [{
4341
4401
  type: i0.Component,
@@ -4353,7 +4413,7 @@
4353
4413
  },
4354
4414
  providers: [{ provide: F_CONNECTION, useExisting: FConnectionComponent }],
4355
4415
  }]
4356
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: FConnectionFactory }, { type: FComponentsStore }]; }, propDecorators: { fId: [{
4416
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: FConnectionFactory }, { type: FComponentsStore }, { type: i2__namespace.FMediator }]; }, propDecorators: { fId: [{
4357
4417
  type: i0.Input,
4358
4418
  args: ['fConnectionId']
4359
4419
  }], fText: [{
@@ -5028,7 +5088,7 @@
5028
5088
  this.redrawConnection(this.getNewLineValue(difference));
5029
5089
  };
5030
5090
  ConnectionDragHandler.prototype.getNewLineValue = function (difference) {
5031
- return this.fMediator.send(new GetConnectionLineRequest(_2d.RoundedRect.fromRect(this.fOutputWithRect.fRect).addPoint(this.getDifference(Object.assign({}, difference), this.sourceRestrictions)), _2d.RoundedRect.fromRect(this.fInputWithRect.fRect).addPoint(this.getDifference(Object.assign({}, difference), this.targetRestrictions)), this.connection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, this.fInputWithRect.fConnector.fConnectableSide));
5091
+ return this.fMediator.send(new GetConnectionLineRequest(_2d.RoundedRect.fromRoundedRect(this.fOutputWithRect.fRect).addPoint(this.getDifference(Object.assign({}, difference), this.sourceRestrictions)), _2d.RoundedRect.fromRoundedRect(this.fInputWithRect.fRect).addPoint(this.getDifference(Object.assign({}, difference), this.targetRestrictions)), this.connection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, this.fInputWithRect.fConnector.fConnectableSide));
5032
5092
  };
5033
5093
  return ConnectionDragHandler;
5034
5094
  }(ConnectionBaseDragHandler));
@@ -5045,7 +5105,7 @@
5045
5105
  this.redrawConnection(this.getNewLineValue(difference));
5046
5106
  };
5047
5107
  ConnectionTargetDragHandler.prototype.getNewLineValue = function (difference) {
5048
- return this.fMediator.send(new GetConnectionLineRequest(_2d.RoundedRect.fromRect(this.fOutputWithRect.fRect), _2d.RoundedRect.fromRect(this.fInputWithRect.fRect).addPoint(this.getDifference(Object.assign({}, difference), { min: this.minDistance, max: this.maxDistance })), this.connection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, this.fInputWithRect.fConnector.fConnectableSide));
5108
+ return this.fMediator.send(new GetConnectionLineRequest(_2d.RoundedRect.fromRoundedRect(this.fOutputWithRect.fRect), _2d.RoundedRect.fromRoundedRect(this.fInputWithRect.fRect).addPoint(this.getDifference(Object.assign({}, difference), { min: this.minDistance, max: this.maxDistance })), this.connection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, this.fInputWithRect.fConnector.fConnectableSide));
5049
5109
  };
5050
5110
  return ConnectionTargetDragHandler;
5051
5111
  }(ConnectionBaseDragHandler));
@@ -5137,7 +5197,7 @@
5137
5197
  this.redrawConnection(this.getNewLineValue(difference));
5138
5198
  };
5139
5199
  ConnectionSourceDragHandler.prototype.getNewLineValue = function (difference) {
5140
- return this.fMediator.send(new GetConnectionLineRequest(_2d.RoundedRect.fromRect(this.fOutputWithRect.fRect).addPoint(this.getDifference(Object.assign({}, difference), { min: this.minDistance, max: this.maxDistance })), _2d.RoundedRect.fromRect(this.fInputWithRect.fRect), this.connection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, this.fInputWithRect.fConnector.fConnectableSide));
5200
+ return this.fMediator.send(new GetConnectionLineRequest(_2d.RoundedRect.fromRoundedRect(this.fOutputWithRect.fRect).addPoint(this.getDifference(Object.assign({}, difference), { min: this.minDistance, max: this.maxDistance })), _2d.RoundedRect.fromRoundedRect(this.fInputWithRect.fRect), this.connection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, this.fInputWithRect.fConnector.fConnectableSide));
5141
5201
  };
5142
5202
  return ConnectionSourceDragHandler;
5143
5203
  }(ConnectionBaseDragHandler));
@@ -5899,7 +5959,8 @@
5899
5959
  this.fMediator.send(new ApplyParentResizeRestrictionsRequest(rect, restrictionsRect));
5900
5960
  };
5901
5961
  NodeResizeDragHandler.prototype.complete = function () {
5902
- this.fNode.sizeChange.emit(_2d.RectExtensions.initialize(this.fNode.position.x, this.fNode.position.y, this.fNode.size.width, this.fNode.size.height));
5962
+ var _a, _b;
5963
+ this.fNode.sizeChange.emit(_2d.RectExtensions.initialize(this.fNode.position.x, this.fNode.position.y, (_a = this.fNode.size) === null || _a === void 0 ? void 0 : _a.width, (_b = this.fNode.size) === null || _b === void 0 ? void 0 : _b.height));
5903
5964
  };
5904
5965
  return NodeResizeDragHandler;
5905
5966
  }());
@@ -8619,11 +8680,18 @@
8619
8680
  FCanvasComponent.prototype.redrawWithAnimation = function () {
8620
8681
  var _this = this;
8621
8682
  var _a;
8683
+ var duration = F_CANVAS_ANIMATION_DURATION;
8684
+ if (this.isMobile()) {
8685
+ duration = 80;
8686
+ }
8622
8687
  (_a = this.fComponentsStore.fBackground) === null || _a === void 0 ? void 0 : _a.setTransform(this.transform);
8623
- this.hostElement.setAttribute("style", "transition: transform " + F_CANVAS_ANIMATION_DURATION + "ms ease-in-out; transform: " + _2d.TransformModelExtensions.toString(this.transform));
8624
- setTimeout(function () {
8625
- _this.redraw();
8626
- }, F_CANVAS_ANIMATION_DURATION);
8688
+ this.hostElement.setAttribute("style", "transition: transform " + duration + "ms ease-in-out; transform: " + _2d.TransformModelExtensions.toString(this.transform));
8689
+ setTimeout(function () { return _this.redraw(); }, F_CANVAS_ANIMATION_DURATION);
8690
+ };
8691
+ FCanvasComponent.prototype.isMobile = function () {
8692
+ // @ts-ignore
8693
+ var userAgent = navigator.userAgent || navigator.vendor || window['opera'];
8694
+ return /android|iPad|iPhone|iPod/i.test(userAgent);
8627
8695
  };
8628
8696
  FCanvasComponent.prototype.centerGroupOrNode = function (id, animated) {
8629
8697
  if (animated === void 0) { animated = true; }
@@ -9586,6 +9654,7 @@
9586
9654
  * Generated bundle index. Do not edit.
9587
9655
  */
9588
9656
 
9657
+ exports.AddConnectionToStoreRequest = AddConnectionToStoreRequest;
9589
9658
  exports.AddPatternToBackgroundRequest = AddPatternToBackgroundRequest;
9590
9659
  exports.ApplyChildResizeRestrictionsRequest = ApplyChildResizeRestrictionsRequest;
9591
9660
  exports.ApplyParentResizeRestrictionsRequest = ApplyParentResizeRestrictionsRequest;
@@ -9791,6 +9860,7 @@
9791
9860
  exports.ReassignConnectionFinalizeRequest = ReassignConnectionFinalizeRequest;
9792
9861
  exports.ReassignConnectionPreparationRequest = ReassignConnectionPreparationRequest;
9793
9862
  exports.RedrawConnectionsRequest = RedrawConnectionsRequest;
9863
+ exports.RemoveConnectionFromStoreRequest = RemoveConnectionFromStoreRequest;
9794
9864
  exports.ResetScaleAndCenterRequest = ResetScaleAndCenterRequest;
9795
9865
  exports.ResetScaleRequest = ResetScaleRequest;
9796
9866
  exports.SELECTION_AREA_FINALIZE_PROVIDERS = SELECTION_AREA_FINALIZE_PROVIDERS;