@foblex/flow 12.6.7 → 12.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/bundles/foblex-flow.umd.js +106 -28
  2. package/bundles/foblex-flow.umd.js.map +1 -1
  3. package/domain/f-connection/add-connection-to-store/add-connection-to-store-request.d.ts +5 -0
  4. package/domain/f-connection/add-connection-to-store/add-connection-to-store.execution.d.ts +11 -0
  5. package/domain/f-connection/add-connection-to-store/index.d.ts +2 -0
  6. package/domain/f-connection/index.d.ts +2 -0
  7. package/domain/f-connection/providers.d.ts +3 -1
  8. package/domain/f-connection/remove-connection-from-store/index.d.ts +2 -0
  9. package/domain/f-connection/remove-connection-from-store/remove-connection-from-store-request.d.ts +5 -0
  10. package/domain/f-connection/remove-connection-from-store/remove-connection-from-store.execution.d.ts +11 -0
  11. package/domain/providers.d.ts +1 -1
  12. package/esm2015/domain/f-connection/add-connection-to-store/add-connection-to-store-request.js +6 -0
  13. package/esm2015/domain/f-connection/add-connection-to-store/add-connection-to-store.execution.js +25 -0
  14. package/esm2015/domain/f-connection/add-connection-to-store/index.js +3 -0
  15. package/esm2015/domain/f-connection/index.js +3 -1
  16. package/esm2015/domain/f-connection/providers.js +5 -1
  17. package/esm2015/domain/f-connection/remove-connection-from-store/index.js +3 -0
  18. package/esm2015/domain/f-connection/remove-connection-from-store/remove-connection-from-store-request.js +6 -0
  19. package/esm2015/domain/f-connection/remove-connection-from-store/remove-connection-from-store.execution.js +29 -0
  20. package/esm2015/f-connection/f-connection/f-connection.component.js +16 -13
  21. package/esm2015/f-connectors/e-f-connectable-side.js +2 -2
  22. package/esm2015/f-connectors/f-node-input/f-node-input.directive.js +4 -4
  23. package/esm2015/f-connectors/f-node-output/f-node-output.directive.js +3 -3
  24. package/esm2015/f-draggable/connections/create-connection/create-connection.drag-handler.js +7 -2
  25. package/esm2015/f-draggable/connections/get-input-under-pointer/get-input-under-pointer.execution.js +1 -1
  26. package/esm2015/f-draggable/connections/reassign-connection/reassign-connection.drag-handler.js +11 -3
  27. package/esm2015/f-draggable/node/connection-source.drag-handler.js +2 -2
  28. package/esm2015/f-draggable/node/connection-target.drag-handler.js +2 -2
  29. package/esm2015/f-draggable/node/connection.drag-handler.js +2 -2
  30. package/esm2015/f-draggable/node-resize/apply-child-resize-restrictions/apply-child-resize-restrictions.request.js +1 -1
  31. package/esm2015/f-draggable/node-resize/calculate-changed-size/calculate-changed-size.execution.js +1 -1
  32. package/esm2015/f-draggable/node-resize/get-node-resize-restrictions/get-node-resize-restrictions.execution.js +9 -3
  33. package/esm2015/f-draggable/node-resize/get-node-resize-restrictions/i-node-resize-restrictions.js +1 -1
  34. package/esm2015/f-draggable/node-resize/get-normalized-children-nodes-rect/get-normalized-children-nodes-rect.execution.js +3 -6
  35. package/esm2015/f-draggable/node-resize/get-normalized-children-nodes-rect/get-normalized-children-nodes-rect.request.js +3 -3
  36. package/esm2015/f-draggable/node-resize/node-resize.drag-handler.js +7 -5
  37. package/esm2015/f-flow/f-flow.component.js +1 -1
  38. package/f-connection/f-connection/f-connection.component.d.ts +3 -1
  39. package/f-connectors/e-f-connectable-side.d.ts +1 -1
  40. package/f-draggable/node-resize/get-node-resize-restrictions/get-node-resize-restrictions.execution.d.ts +1 -0
  41. package/f-draggable/node-resize/get-node-resize-restrictions/i-node-resize-restrictions.d.ts +2 -1
  42. package/f-draggable/node-resize/get-normalized-children-nodes-rect/get-normalized-children-nodes-rect.execution.d.ts +0 -1
  43. package/f-draggable/node-resize/get-normalized-children-nodes-rect/get-normalized-children-nodes-rect.request.d.ts +2 -3
  44. package/fesm2015/foblex-flow.js +101 -29
  45. package/fesm2015/foblex-flow.js.map +1 -1
  46. package/package.json +1 -1
@@ -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 }],
@@ -2777,7 +2835,9 @@
2777
2835
  };
2778
2836
  CreateConnectionDragHandler.prototype.move = function (difference) {
2779
2837
  this.drawTempConnection(this.toConnectorRect.addPoint(difference));
2780
- this.drawSnapConnection(this.getClosetInput(difference));
2838
+ if (this.fSnapConnection) {
2839
+ this.drawSnapConnection(this.getClosetInput(difference));
2840
+ }
2781
2841
  };
2782
2842
  CreateConnectionDragHandler.prototype.drawTempConnection = function (fInputRect) {
2783
2843
  var line = this.fMediator.send(new GetConnectionLineRequest(this.fOutputWithRect.fRect, fInputRect, this.fConnection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, exports.EFConnectableSide.TOP));
@@ -2797,6 +2857,9 @@
2797
2857
  }
2798
2858
  };
2799
2859
  CreateConnectionDragHandler.prototype.getClosetInput = function (difference) {
2860
+ if (!this.fSnapConnection) {
2861
+ return undefined;
2862
+ }
2800
2863
  return this.fMediator.send(new FindClosestInputUsingSnapThresholdRequest(_2d.Point.fromPoint(this.toConnectorRect).add(difference), this.canBeConnectedInputs, this.fSnapConnection.fSnapThreshold));
2801
2864
  };
2802
2865
  CreateConnectionDragHandler.prototype.complete = function () {
@@ -3155,8 +3218,13 @@
3155
3218
  return this.fComponentsStore.fInputs.find(function (x) { return x.id === _this.fConnection.fInputId; });
3156
3219
  };
3157
3220
  ReassignConnectionDragHandler.prototype.move = function (difference) {
3158
- this.drawConnection({ fRect: this.toConnectorRect.addPoint(difference), fConnector: this.fInputWithRect.fConnector });
3159
- this.drawSnapConnection(this.getClosetInput(difference));
3221
+ this.drawConnection({
3222
+ fRect: this.toConnectorRect.addPoint(difference),
3223
+ fConnector: this.fInputWithRect.fConnector
3224
+ });
3225
+ if (this.fSnapConnection) {
3226
+ this.drawSnapConnection(this.getClosetInput(difference));
3227
+ }
3160
3228
  };
3161
3229
  ReassignConnectionDragHandler.prototype.drawConnection = function (fInputWithRect) {
3162
3230
  var line = this.fMediator.send(new GetConnectionLineRequest(this.fOutputWithRect.fRect, fInputWithRect.fRect, this.fConnection.fBehavior, this.fOutputWithRect.fConnector.fConnectableSide, fInputWithRect.fConnector.fConnectableSide));
@@ -3176,6 +3244,9 @@
3176
3244
  }
3177
3245
  };
3178
3246
  ReassignConnectionDragHandler.prototype.getClosetInput = function (difference) {
3247
+ if (!this.fSnapConnection) {
3248
+ return undefined;
3249
+ }
3179
3250
  return this.fMediator.send(new FindClosestInputUsingSnapThresholdRequest(_2d.Point.fromPoint(this.toConnectorRect).add(difference), this.canBeConnectedInputs, this.fSnapConnection.fSnapThreshold));
3180
3251
  };
3181
3252
  ReassignConnectionDragHandler.prototype.complete = function () {
@@ -4193,9 +4264,10 @@
4193
4264
  var uniqueId$5 = 0;
4194
4265
  var FConnectionComponent = /** @class */ (function (_super) {
4195
4266
  __extends(FConnectionComponent, _super);
4196
- function FConnectionComponent(elementReference, fConnectionFactory, fComponentsStore) {
4267
+ function FConnectionComponent(elementReference, fConnectionFactory, fComponentsStore, fMediator) {
4197
4268
  var _this = _super.call(this, elementReference, fConnectionFactory) || this;
4198
4269
  _this.fComponentsStore = fComponentsStore;
4270
+ _this.fMediator = fMediator;
4199
4271
  _this.fId = "f-connection-" + uniqueId$5++;
4200
4272
  _this._fText = '';
4201
4273
  _this._fStartColor = 'black';
@@ -4315,14 +4387,14 @@
4315
4387
  configurable: true
4316
4388
  });
4317
4389
  FConnectionComponent.prototype.ngOnInit = function () {
4318
- this.fComponentsStore.addComponent(this.fComponentsStore.fConnections, this);
4390
+ this.fMediator.send(new AddConnectionToStoreRequest(this));
4319
4391
  };
4320
4392
  FConnectionComponent.prototype.ngOnDestroy = function () {
4321
- this.fComponentsStore.removeComponent(this.fComponentsStore.fConnections, this);
4393
+ this.fMediator.send(new RemoveConnectionFromStoreRequest(this));
4322
4394
  };
4323
4395
  return FConnectionComponent;
4324
4396
  }(FConnectionBase));
4325
- 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 });
4397
+ 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 });
4326
4398
  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 });
4327
4399
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FConnectionComponent, decorators: [{
4328
4400
  type: i0.Component,
@@ -4340,7 +4412,7 @@
4340
4412
  },
4341
4413
  providers: [{ provide: F_CONNECTION, useExisting: FConnectionComponent }],
4342
4414
  }]
4343
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: FConnectionFactory }, { type: FComponentsStore }]; }, propDecorators: { fId: [{
4415
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: FConnectionFactory }, { type: FComponentsStore }, { type: i2__namespace.FMediator }]; }, propDecorators: { fId: [{
4344
4416
  type: i0.Input,
4345
4417
  args: ['fConnectionId']
4346
4418
  }], fText: [{
@@ -5015,7 +5087,7 @@
5015
5087
  this.redrawConnection(this.getNewLineValue(difference));
5016
5088
  };
5017
5089
  ConnectionDragHandler.prototype.getNewLineValue = function (difference) {
5018
- 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));
5090
+ 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));
5019
5091
  };
5020
5092
  return ConnectionDragHandler;
5021
5093
  }(ConnectionBaseDragHandler));
@@ -5032,7 +5104,7 @@
5032
5104
  this.redrawConnection(this.getNewLineValue(difference));
5033
5105
  };
5034
5106
  ConnectionTargetDragHandler.prototype.getNewLineValue = function (difference) {
5035
- 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));
5107
+ 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));
5036
5108
  };
5037
5109
  return ConnectionTargetDragHandler;
5038
5110
  }(ConnectionBaseDragHandler));
@@ -5124,7 +5196,7 @@
5124
5196
  this.redrawConnection(this.getNewLineValue(difference));
5125
5197
  };
5126
5198
  ConnectionSourceDragHandler.prototype.getNewLineValue = function (difference) {
5127
- 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));
5199
+ 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));
5128
5200
  };
5129
5201
  return ConnectionSourceDragHandler;
5130
5202
  }(ConnectionBaseDragHandler));
@@ -5746,9 +5818,9 @@
5746
5818
  }] });
5747
5819
 
5748
5820
  var GetNormalizedChildrenNodesRectRequest = /** @class */ (function () {
5749
- function GetNormalizedChildrenNodesRectRequest(fNode, rect) {
5821
+ function GetNormalizedChildrenNodesRectRequest(fNode, paddings) {
5750
5822
  this.fNode = fNode;
5751
- this.rect = rect;
5823
+ this.paddings = paddings;
5752
5824
  }
5753
5825
  return GetNormalizedChildrenNodesRectRequest;
5754
5826
  }());
@@ -5761,7 +5833,7 @@
5761
5833
  var _this = this;
5762
5834
  var childNodeRect = _2d.RectExtensions.union(this.getChildrenNodes(request.fNode.fId).map(function (x) { return _this.normalizeRect(x); }));
5763
5835
  return childNodeRect ?
5764
- this.concatRectWithParentPadding(childNodeRect, this.getNodePadding(request.fNode, request.rect)) : null;
5836
+ this.concatRectWithParentPadding(childNodeRect, request.paddings) : null;
5765
5837
  };
5766
5838
  GetNormalizedChildrenNodesRectExecution.prototype.getChildrenNodes = function (fId) {
5767
5839
  return this.fMediator.send(new GetDeepChildrenNodesAndGroupsRequest(fId));
@@ -5769,9 +5841,6 @@
5769
5841
  GetNormalizedChildrenNodesRectExecution.prototype.normalizeRect = function (node) {
5770
5842
  return this.fMediator.send(new GetNormalizedNodeRectRequest(node));
5771
5843
  };
5772
- GetNormalizedChildrenNodesRectExecution.prototype.getNodePadding = function (node, rect) {
5773
- return this.fMediator.send(new GetNodePaddingRequest(node, rect));
5774
- };
5775
5844
  GetNormalizedChildrenNodesRectExecution.prototype.concatRectWithParentPadding = function (rect, padding) {
5776
5845
  return _2d.RectExtensions.initialize(rect.x - padding[0], rect.y - padding[1], rect.width + padding[0] + padding[2], rect.height + +padding[1] + padding[3]);
5777
5846
  };
@@ -5799,13 +5868,18 @@
5799
5868
  this.fMediator = fMediator;
5800
5869
  }
5801
5870
  GetNodeResizeRestrictionsExecution.prototype.handle = function (request) {
5802
- var childRect = this.fMediator.send(new GetNormalizedChildrenNodesRectRequest(request.fNode, request.rect));
5871
+ var fNodePaddings = this.getNodePaddings(request.fNode, request.rect);
5872
+ var childRect = this.fMediator.send(new GetNormalizedChildrenNodesRectRequest(request.fNode, fNodePaddings));
5803
5873
  var parentRect = this.fMediator.send(new GetNormalizedParentNodeRectRequest(request.fNode));
5804
5874
  return {
5805
5875
  parentRect: parentRect,
5806
5876
  childRect: childRect,
5877
+ minSize: _2d.SizeExtensions.initialize(fNodePaddings[0] + fNodePaddings[2], fNodePaddings[1] + fNodePaddings[3])
5807
5878
  };
5808
5879
  };
5880
+ GetNodeResizeRestrictionsExecution.prototype.getNodePaddings = function (node, rect) {
5881
+ return this.fMediator.send(new GetNodePaddingRequest(node, rect));
5882
+ };
5809
5883
  return GetNodeResizeRestrictionsExecution;
5810
5884
  }());
5811
5885
  exports.GetNodeResizeRestrictionsExecution.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: exports.GetNodeResizeRestrictionsExecution, deps: [{ token: i2__namespace.FMediator }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
@@ -5850,7 +5924,8 @@
5850
5924
  this.fMediator = fMediator;
5851
5925
  this.fNode = fNode;
5852
5926
  this.fResizeHandleType = fResizeHandleType;
5853
- this.childRestrictions = function () { };
5927
+ this.childRestrictions = function () {
5928
+ };
5854
5929
  }
5855
5930
  NodeResizeDragHandler.prototype.initialize = function () {
5856
5931
  var _this = this;
@@ -5863,14 +5938,14 @@
5863
5938
  }
5864
5939
  };
5865
5940
  NodeResizeDragHandler.prototype.move = function (difference) {
5866
- var changedRect = this.changePosition(difference, this.changeSize(difference));
5941
+ var changedRect = this.changePosition(difference, this.changeSize(difference, this.restrictions.minSize));
5867
5942
  this.childRestrictions(changedRect, this.restrictions.childRect);
5868
5943
  this.applyParentRestrictions(changedRect, this.restrictions.parentRect);
5869
5944
  this.fNode.updatePosition(changedRect);
5870
5945
  this.fNode.updateSize(changedRect);
5871
5946
  this.fNode.redraw();
5872
5947
  };
5873
- NodeResizeDragHandler.prototype.changeSize = function (difference) {
5948
+ NodeResizeDragHandler.prototype.changeSize = function (difference, minSize) {
5874
5949
  return this.fMediator.send(new CalculateChangedSizeRequest(this.originalRect, difference, this.fResizeHandleType));
5875
5950
  };
5876
5951
  NodeResizeDragHandler.prototype.changePosition = function (difference, changedRect) {
@@ -5883,7 +5958,8 @@
5883
5958
  this.fMediator.send(new ApplyParentResizeRestrictionsRequest(rect, restrictionsRect));
5884
5959
  };
5885
5960
  NodeResizeDragHandler.prototype.complete = function () {
5886
- this.fNode.sizeChange.emit(_2d.RectExtensions.initialize(this.fNode.position.x, this.fNode.position.y, this.fNode.size.width, this.fNode.size.height));
5961
+ var _a, _b;
5962
+ 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));
5887
5963
  };
5888
5964
  return NodeResizeDragHandler;
5889
5965
  }());
@@ -9570,6 +9646,7 @@
9570
9646
  * Generated bundle index. Do not edit.
9571
9647
  */
9572
9648
 
9649
+ exports.AddConnectionToStoreRequest = AddConnectionToStoreRequest;
9573
9650
  exports.AddPatternToBackgroundRequest = AddPatternToBackgroundRequest;
9574
9651
  exports.ApplyChildResizeRestrictionsRequest = ApplyChildResizeRestrictionsRequest;
9575
9652
  exports.ApplyParentResizeRestrictionsRequest = ApplyParentResizeRestrictionsRequest;
@@ -9775,6 +9852,7 @@
9775
9852
  exports.ReassignConnectionFinalizeRequest = ReassignConnectionFinalizeRequest;
9776
9853
  exports.ReassignConnectionPreparationRequest = ReassignConnectionPreparationRequest;
9777
9854
  exports.RedrawConnectionsRequest = RedrawConnectionsRequest;
9855
+ exports.RemoveConnectionFromStoreRequest = RemoveConnectionFromStoreRequest;
9778
9856
  exports.ResetScaleAndCenterRequest = ResetScaleAndCenterRequest;
9779
9857
  exports.ResetScaleRequest = ResetScaleRequest;
9780
9858
  exports.SELECTION_AREA_FINALIZE_PROVIDERS = SELECTION_AREA_FINALIZE_PROVIDERS;