ngx-vflow 1.4.0 → 1.4.2

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 (31) hide show
  1. package/esm2022/lib/vflow/public-components/handle/handle.component.mjs +18 -21
  2. package/esm2022/lib/vflow/public-components/node-toolbar/node-toolbar.component.mjs +1 -1
  3. package/esm2022/lib/vflow/public-components/resizable/resizable.component.mjs +48 -68
  4. package/esm2022/lib/vflow/testing-utils/component-mocks/handle-mock.component.mjs +3 -1
  5. package/esm2022/lib/vflow/testing-utils/component-mocks/minimap-mock.component.mjs +3 -1
  6. package/esm2022/lib/vflow/testing-utils/component-mocks/node-toolbar-mock.component.mjs +5 -1
  7. package/esm2022/lib/vflow/testing-utils/component-mocks/resizable-mock.component.mjs +5 -1
  8. package/esm2022/lib/vflow/testing-utils/component-mocks/vflow-mock.component.mjs +48 -22
  9. package/esm2022/lib/vflow/testing-utils/directive-mocks/connection-controller-mock.directive.mjs +9 -1
  10. package/esm2022/lib/vflow/testing-utils/directive-mocks/drag-handle-mock.directive.mjs +1 -1
  11. package/esm2022/lib/vflow/testing-utils/directive-mocks/selectable-mock.directive.mjs +1 -1
  12. package/esm2022/lib/vflow/testing-utils/directive-mocks/template-mock.directive.mjs +1 -1
  13. package/esm2022/lib/vflow/testing-utils/types.mjs +2 -0
  14. package/fesm2022/ngx-vflow.mjs +128 -121
  15. package/fesm2022/ngx-vflow.mjs.map +1 -1
  16. package/lib/vflow/public-components/handle/handle.component.d.ts +3 -6
  17. package/lib/vflow/public-components/node-toolbar/node-toolbar.component.d.ts +1 -1
  18. package/lib/vflow/public-components/resizable/resizable.component.d.ts +1 -1
  19. package/lib/vflow/testing-utils/component-mocks/handle-mock.component.d.ts +5 -2
  20. package/lib/vflow/testing-utils/component-mocks/minimap-mock.component.d.ts +5 -2
  21. package/lib/vflow/testing-utils/component-mocks/node-toolbar-mock.component.d.ts +6 -1
  22. package/lib/vflow/testing-utils/component-mocks/resizable-mock.component.d.ts +6 -1
  23. package/lib/vflow/testing-utils/component-mocks/vflow-mock.component.d.ts +26 -13
  24. package/lib/vflow/testing-utils/directive-mocks/connection-controller-mock.directive.d.ts +8 -1
  25. package/lib/vflow/testing-utils/directive-mocks/drag-handle-mock.directive.d.ts +3 -1
  26. package/lib/vflow/testing-utils/directive-mocks/selectable-mock.directive.d.ts +3 -1
  27. package/lib/vflow/testing-utils/directive-mocks/template-mock.directive.d.ts +8 -6
  28. package/lib/vflow/testing-utils/types.d.ts +1 -0
  29. package/package.json +1 -1
  30. package/esm2022/lib/vflow/decorators/run-in-injection-context.decorator.mjs +0 -18
  31. package/lib/vflow/decorators/run-in-injection-context.decorator.d.ts +0 -5
@@ -2243,10 +2243,9 @@ class ResizableComponent {
2243
2243
  resize(event) {
2244
2244
  if (!this.resizeSide)
2245
2245
  return;
2246
- if (this.isResizeConstrained(event))
2247
- return;
2248
2246
  const offset = calcOffset(event.movementX, event.movementY, this.zoom());
2249
- const { x, y, width, height } = constrainRect(applyResize(this.resizeSide, this.model, offset), this.model, this.resizeSide, this.minWidth, this.minHeight);
2247
+ const resized = applyResize(this.resizeSide, this.model, offset, this.getDistanceToEdge(event));
2248
+ const { x, y, width, height } = constrainRect(resized, this.model, this.resizeSide, this.minWidth, this.minHeight);
2250
2249
  this.model.setPoint({ x, y });
2251
2250
  this.model.width.set(width);
2252
2251
  this.model.height.set(height);
@@ -2255,41 +2254,15 @@ class ResizableComponent {
2255
2254
  this.resizeSide = null;
2256
2255
  this.model.resizing.set(false);
2257
2256
  }
2258
- isResizeConstrained({ x, y, movementX, movementY }) {
2259
- const flowPoint = this.spacePointContext.documentPointToFlowPoint({ x, y });
2260
- if (this.resizeSide?.includes('right')) {
2261
- if (movementX > 0 && flowPoint.x < this.model.point().x + this.model.size().width) {
2262
- return true;
2263
- }
2264
- if (movementX < 0 && flowPoint.x > this.model.point().x + this.model.size().width) {
2265
- return true;
2266
- }
2267
- }
2268
- if (this.resizeSide?.includes('left')) {
2269
- if (movementX < 0 && flowPoint.x > this.model.point().x) {
2270
- return true;
2271
- }
2272
- if (movementX > 0 && flowPoint.x < this.model.point().x) {
2273
- return true;
2274
- }
2275
- }
2276
- if (this.resizeSide?.includes('bottom')) {
2277
- if (movementY > 0 && flowPoint.y < this.model.point().y + this.model.size().height) {
2278
- return true;
2279
- }
2280
- if (movementY < 0 && flowPoint.y > this.model.point().y + this.model.size().height) {
2281
- return true;
2282
- }
2283
- }
2284
- if (this.resizeSide?.includes('top')) {
2285
- if (movementY < 0 && flowPoint.y > this.model.point().y) {
2286
- return true;
2287
- }
2288
- if (movementY > 0 && flowPoint.y < this.model.point().y) {
2289
- return true;
2290
- }
2291
- }
2292
- return false;
2257
+ getDistanceToEdge(event) {
2258
+ const flowPoint = this.spacePointContext.documentPointToFlowPoint({ x: event.x, y: event.y });
2259
+ const { x, y } = this.model.globalPoint();
2260
+ return {
2261
+ left: flowPoint.x - x,
2262
+ right: flowPoint.x - (x + this.model.width()),
2263
+ top: flowPoint.y - y,
2264
+ bottom: flowPoint.y - (y + this.model.height()),
2265
+ };
2293
2266
  }
2294
2267
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ResizableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2295
2268
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "17.3.12", type: ResizableComponent, isStandalone: true, selector: "[resizable]", inputs: { resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, resizerColor: { classPropertyName: "resizerColor", publicName: "resizerColor", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "resizer", first: true, predicate: ["resizer"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-template #resizer>\n <svg:g>\n <!-- top line -->\n <svg:line\n class=\"top\"\n stroke-width=\"2\"\n [attr.x1]=\"lineGap\"\n [attr.y1]=\"-gap()\"\n [attr.x2]=\"model.size().width - lineGap\"\n [attr.y2]=\"-gap()\"\n [attr.stroke]=\"resizerColor()\"\n (pointerStart)=\"startResize('top', $event)\" />\n <!-- Left line -->\n <svg:line\n class=\"left\"\n stroke-width=\"2\"\n [attr.x1]=\"-gap()\"\n [attr.y1]=\"lineGap\"\n [attr.x2]=\"-gap()\"\n [attr.y2]=\"model.size().height - lineGap\"\n [attr.stroke]=\"resizerColor()\"\n (pointerStart)=\"startResize('left', $event)\" />\n <!-- Bottom line -->\n <svg:line\n class=\"bottom\"\n stroke-width=\"2\"\n [attr.x1]=\"lineGap\"\n [attr.y1]=\"model.size().height + gap()\"\n [attr.x2]=\"model.size().width - lineGap\"\n [attr.y2]=\"model.size().height + gap()\"\n [attr.stroke]=\"resizerColor()\"\n (pointerStart)=\"startResize('bottom', $event)\" />\n <!-- Right line -->\n <svg:line\n class=\"right\"\n stroke-width=\"2\"\n [attr.x1]=\"model.size().width + gap()\"\n [attr.y1]=\"lineGap\"\n [attr.x2]=\"model.size().width + gap()\"\n [attr.y2]=\"model.size().height - lineGap\"\n [attr.stroke]=\"resizerColor()\"\n (pointerStart)=\"startResize('right', $event)\" />\n\n <!-- Top Left -->\n <svg:rect\n class=\"top-left\"\n [attr.x]=\"-(handleSize / 2) - gap()\"\n [attr.y]=\"-(handleSize / 2) - gap()\"\n [attr.width]=\"handleSize\"\n [attr.height]=\"handleSize\"\n [attr.fill]=\"resizerColor()\"\n (pointerStart)=\"startResize('top-left', $event)\" />\n\n <!-- Top right -->\n <svg:rect\n class=\"top-right\"\n [attr.x]=\"model.size().width - handleSize / 2 + gap()\"\n [attr.y]=\"-(handleSize / 2) - gap()\"\n [attr.width]=\"handleSize\"\n [attr.height]=\"handleSize\"\n [attr.fill]=\"resizerColor()\"\n (pointerStart)=\"startResize('top-right', $event)\" />\n\n <!-- Bottom left -->\n <svg:rect\n class=\"bottom-left\"\n [attr.x]=\"-(handleSize / 2) - gap()\"\n [attr.y]=\"model.size().height - handleSize / 2 + gap()\"\n [attr.width]=\"handleSize\"\n [attr.height]=\"handleSize\"\n [attr.fill]=\"resizerColor()\"\n (pointerStart)=\"startResize('bottom-left', $event)\" />\n\n <!-- Bottom right -->\n <svg:rect\n class=\"bottom-right\"\n [attr.x]=\"model.size().width - handleSize / 2 + gap()\"\n [attr.y]=\"model.size().height - handleSize / 2 + gap()\"\n [attr.width]=\"handleSize\"\n [attr.height]=\"handleSize\"\n [attr.fill]=\"resizerColor()\"\n (pointerStart)=\"startResize('bottom-right', $event)\" />\n </svg:g>\n</ng-template>\n\n<ng-content />\n", styles: [".top{cursor:n-resize}.left{cursor:w-resize}.right{cursor:e-resize}.bottom{cursor:s-resize}.top-left{cursor:nw-resize}.top-right{cursor:ne-resize}.bottom-left{cursor:sw-resize}.bottom-right{cursor:se-resize}\n"], dependencies: [{ kind: "directive", type: PointerDirective, selector: "[pointerStart], [pointerEnd], [pointerOver], [pointerOut]", outputs: ["pointerOver", "pointerOut", "pointerStart", "pointerEnd"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -2307,43 +2280,44 @@ function calcOffset(movementX, movementY, zoom) {
2307
2280
  offsetY: round(movementY / zoom),
2308
2281
  };
2309
2282
  }
2310
- function applyResize(side, model, offset) {
2283
+ function applyResize(side, model, offset, distanceToEdge) {
2311
2284
  const { offsetX, offsetY } = offset;
2312
2285
  const { x, y } = model.point();
2313
- const { width, height } = model.size();
2286
+ const width = model.width();
2287
+ const height = model.height();
2314
2288
  // Handle each case of resizing (top, bottom, left, right, corners)
2315
2289
  switch (side) {
2316
2290
  case 'left':
2317
- return { x: x + offsetX, y, width: width - offsetX, height };
2291
+ return { x: x + offsetX + distanceToEdge.left, y, width: width - offsetX - distanceToEdge.left, height };
2318
2292
  case 'right':
2319
- return { x, y, width: width + offsetX, height };
2293
+ return { x, y, width: width + offsetX + distanceToEdge.right, height };
2320
2294
  case 'top':
2321
- return { x, y: y + offsetY, width, height: height - offsetY };
2295
+ return { x, y: y + offsetY + distanceToEdge.top, width, height: height - offsetY - distanceToEdge.top };
2322
2296
  case 'bottom':
2323
- return { x, y, width, height: height + offsetY };
2297
+ return { x, y, width, height: height + offsetY + distanceToEdge.bottom };
2324
2298
  case 'top-left':
2325
2299
  return {
2326
- x: x + offsetX,
2327
- y: y + offsetY,
2328
- width: width - offsetX,
2329
- height: height - offsetY,
2300
+ x: x + offsetX + distanceToEdge.left,
2301
+ y: y + offsetY + distanceToEdge.top,
2302
+ width: width - offsetX - distanceToEdge.left,
2303
+ height: height - offsetY - distanceToEdge.top,
2330
2304
  };
2331
2305
  case 'top-right':
2332
2306
  return {
2333
2307
  x,
2334
- y: y + offsetY,
2335
- width: width + offsetX,
2336
- height: height - offsetY,
2308
+ y: y + offsetY + distanceToEdge.top,
2309
+ width: width + offsetX + distanceToEdge.right,
2310
+ height: height - offsetY - distanceToEdge.top,
2337
2311
  };
2338
2312
  case 'bottom-left':
2339
2313
  return {
2340
- x: x + offsetX,
2314
+ x: x + offsetX + distanceToEdge.left,
2341
2315
  y,
2342
- width: width - offsetX,
2343
- height: height + offsetY,
2316
+ width: width - offsetX - distanceToEdge.left,
2317
+ height: height + offsetY + distanceToEdge.bottom,
2344
2318
  };
2345
2319
  case 'bottom-right':
2346
- return { x, y, width: width + offsetX, height: height + offsetY };
2320
+ return { x, y, width: width + offsetX + distanceToEdge.right, height: height + offsetY + distanceToEdge.bottom };
2347
2321
  }
2348
2322
  }
2349
2323
  function constrainRect(rect, model, side, minWidth, minHeight) {
@@ -2355,27 +2329,33 @@ function constrainRect(rect, model, side, minWidth, minHeight) {
2355
2329
  width = Math.max(minWidth, width);
2356
2330
  height = Math.max(minHeight, height);
2357
2331
  // Apply left/top constraints based on minimum size
2358
- x = Math.min(x, model.point().x + model.size().width - minWidth);
2359
- y = Math.min(y, model.point().y + model.size().height - minHeight);
2332
+ x = Math.min(x, model.point().x + model.width() - minWidth);
2333
+ y = Math.min(y, model.point().y + model.height() - minHeight);
2360
2334
  const parent = model.parent();
2361
2335
  // 3. Apply maximum size constraints based on parent size (if exists)
2362
2336
  if (parent) {
2363
- x = Math.max(x, 0); // Left boundary of the parent
2364
- y = Math.max(y, 0); // Top boundary of the parent
2365
- if (x === 0) {
2366
- width = model.point().x + model.size().width;
2337
+ const parentWidth = parent.width();
2338
+ const parentHeight = parent.height();
2339
+ const modelX = model.point().x;
2340
+ const modelY = model.point().y;
2341
+ x = Math.max(x, 0);
2342
+ y = Math.max(y, 0);
2343
+ // Stop resizing when hitting left or top boundary
2344
+ if (side.includes('left') && x === 0) {
2345
+ width = Math.min(width, modelX + model.width());
2367
2346
  }
2368
- if (y === 0) {
2369
- height = model.point().y + model.size().height;
2347
+ if (side.includes('top') && y === 0) {
2348
+ height = Math.min(height, modelY + model.height());
2370
2349
  }
2371
- width = Math.min(width, parent.size().width - model.point().x);
2372
- height = Math.min(height, parent.size().height - model.point().y);
2350
+ // Allow right/bottom resizing without being blocked
2351
+ width = Math.min(width, parentWidth - x);
2352
+ height = Math.min(height, parentHeight - y);
2373
2353
  }
2374
2354
  const bounds = getNodesBounds(model.children());
2375
2355
  // 4. Apply child node constraints (if children exist)
2376
2356
  if (bounds) {
2377
2357
  if (side.includes('left')) {
2378
- x = Math.min(x, model.point().x + model.size().width - (bounds.x + bounds.width));
2358
+ x = Math.min(x, model.point().x + model.width() - (bounds.x + bounds.width));
2379
2359
  width = Math.max(width, bounds.x + bounds.width);
2380
2360
  }
2381
2361
  if (side.includes('right')) {
@@ -2385,7 +2365,7 @@ function constrainRect(rect, model, side, minWidth, minHeight) {
2385
2365
  height = Math.max(height, bounds.y + bounds.height);
2386
2366
  }
2387
2367
  if (side.includes('top')) {
2388
- y = Math.min(y, model.point().y + model.size().height - (bounds.y + bounds.height));
2368
+ y = Math.min(y, model.point().y + model.height() - (bounds.y + bounds.height));
2389
2369
  height = Math.max(height, bounds.y + bounds.height);
2390
2370
  }
2391
2371
  }
@@ -2490,23 +2470,6 @@ class HandleModel {
2490
2470
  }
2491
2471
  }
2492
2472
 
2493
- function InjectionContext(target, key, descriptor) {
2494
- const originalMethod = descriptor.value;
2495
- descriptor.value = function (...args) {
2496
- if (implementsWithInjector(this)) {
2497
- return runInInjectionContext(this.injector, () => originalMethod.apply(this, args));
2498
- }
2499
- else {
2500
- throw new Error('Class that contains decorated method must extends WithInjectorDirective class');
2501
- }
2502
- };
2503
- // Return the modified descriptor
2504
- return descriptor;
2505
- }
2506
- const implementsWithInjector = (instance) => {
2507
- return 'injector' in instance && 'get' in instance.injector;
2508
- };
2509
-
2510
2473
  class HandleComponent {
2511
2474
  constructor() {
2512
2475
  this.injector = inject(Injector);
@@ -2528,30 +2491,29 @@ class HandleComponent {
2528
2491
  this.template = input();
2529
2492
  }
2530
2493
  ngOnInit() {
2531
- const node = this.handleService.node();
2532
- if (node) {
2533
- this.model = new HandleModel({
2534
- position: this.position(),
2535
- type: this.type(),
2536
- id: this.id(),
2537
- hostReference: this.element.parentElement,
2538
- template: this.template(),
2539
- }, node);
2540
- this.handleService.createHandle(this.model);
2541
- requestAnimationFrame(() => this.model.updateHost());
2542
- this.destroyRef.onDestroy(() => this.handleService.destroyHandle(this.model));
2543
- }
2494
+ runInInjectionContext(this.injector, () => {
2495
+ const node = this.handleService.node();
2496
+ if (node) {
2497
+ const model = new HandleModel({
2498
+ position: this.position(),
2499
+ type: this.type(),
2500
+ id: this.id(),
2501
+ hostReference: this.element.parentElement,
2502
+ template: this.template(),
2503
+ }, node);
2504
+ this.handleService.createHandle(model);
2505
+ requestAnimationFrame(() => model.updateHost());
2506
+ this.destroyRef.onDestroy(() => this.handleService.destroyHandle(model));
2507
+ }
2508
+ });
2544
2509
  }
2545
2510
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2546
2511
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: HandleComponent, isStandalone: true, selector: "handle", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2547
2512
  }
2548
- __decorate([
2549
- InjectionContext
2550
- ], HandleComponent.prototype, "ngOnInit", null);
2551
2513
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleComponent, decorators: [{
2552
2514
  type: Component,
2553
2515
  args: [{ standalone: true, selector: 'handle', changeDetection: ChangeDetectionStrategy.OnPush, template: "" }]
2554
- }], propDecorators: { ngOnInit: [] } });
2516
+ }] });
2555
2517
 
2556
2518
  class NodeHandlesControllerDirective {
2557
2519
  constructor() {
@@ -3776,20 +3738,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3776
3738
 
3777
3739
  class VflowMockComponent {
3778
3740
  constructor() {
3779
- this.nodes = input.required();
3780
- this.edges = input.required();
3781
- this.view = input([400, 400]);
3782
- this.minZoom = input(0.5);
3783
- this.maxZoom = input(3);
3784
- this.background = input('#fff');
3741
+ this.view = [400, 400];
3742
+ this.minZoom = 0.5;
3743
+ this.maxZoom = 3;
3744
+ this.background = '#fff';
3785
3745
  this.optimization = input({
3786
3746
  detachedGroupsLayer: false,
3787
3747
  });
3788
- this.entitiesSelectable = input(true);
3789
- this.keyboardShortcuts = input({
3748
+ this.entitiesSelectable = true;
3749
+ this.keyboardShortcuts = {
3790
3750
  multiSelection: null,
3791
- });
3792
- this.connection = input();
3751
+ };
3752
+ this.connection = new ConnectionModel({});
3793
3753
  // eslint-disable-next-line @angular-eslint/no-output-on-prefix
3794
3754
  this.onComponentNodeEvent = output();
3795
3755
  this.nodeTemplateDirective = contentChild(NodeHtmlTemplateMockDirective);
@@ -3808,6 +3768,8 @@ class VflowMockComponent {
3808
3768
  this.nodesChange$ = toObservable(this.nodesChange);
3809
3769
  this.edgesChange$ = toObservable(this.edgesChange);
3810
3770
  }
3771
+ // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
3772
+ ngOnInit() { }
3811
3773
  viewportTo(viewport) {
3812
3774
  this.viewport.set(viewport);
3813
3775
  }
@@ -3822,9 +3784,8 @@ class VflowMockComponent {
3822
3784
  documentPointToFlowPoint(point) {
3823
3785
  return point;
3824
3786
  }
3825
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
3826
3787
  getNode(id) {
3827
- return this.nodes().find((node) => node.id === id);
3788
+ return this.nodes.find((node) => node.id === id);
3828
3789
  }
3829
3790
  getDetachedEdges() {
3830
3791
  return [];
@@ -3833,10 +3794,10 @@ class VflowMockComponent {
3833
3794
  return signal(value);
3834
3795
  }
3835
3796
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VflowMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3836
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: VflowMockComponent, isStandalone: true, selector: "vflow", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: true, transformFunction: null }, edges: { classPropertyName: "edges", publicName: "edges", isSignal: true, isRequired: true, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: true, isRequired: false, transformFunction: null }, minZoom: { classPropertyName: "minZoom", publicName: "minZoom", isSignal: true, isRequired: false, transformFunction: null }, maxZoom: { classPropertyName: "maxZoom", publicName: "maxZoom", isSignal: true, isRequired: false, transformFunction: null }, background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null }, optimization: { classPropertyName: "optimization", publicName: "optimization", isSignal: true, isRequired: false, transformFunction: null }, entitiesSelectable: { classPropertyName: "entitiesSelectable", publicName: "entitiesSelectable", isSignal: true, isRequired: false, transformFunction: null }, keyboardShortcuts: { classPropertyName: "keyboardShortcuts", publicName: "keyboardShortcuts", isSignal: true, isRequired: false, transformFunction: null }, connection: { classPropertyName: "connection", publicName: "connection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onComponentNodeEvent: "onComponentNodeEvent" }, queries: [{ propertyName: "nodeTemplateDirective", first: true, predicate: NodeHtmlTemplateMockDirective, descendants: true, isSignal: true }, { propertyName: "groupNodeTemplateDirective", first: true, predicate: GroupNodeTemplateMockDirective, descendants: true, isSignal: true }, { propertyName: "edgeTemplateDirective", first: true, predicate: EdgeTemplateMockDirective, descendants: true, isSignal: true }, { propertyName: "edgeLabelHtmlDirective", first: true, predicate: EdgeLabelHtmlTemplateMockDirective, descendants: true, isSignal: true }, { propertyName: "connectionTemplateDirective", first: true, predicate: ConnectionTemplateMockDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
3797
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: VflowMockComponent, isStandalone: true, selector: "vflow", inputs: { nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: false, isRequired: true, transformFunction: null }, edges: { classPropertyName: "edges", publicName: "edges", isSignal: false, isRequired: false, transformFunction: null }, view: { classPropertyName: "view", publicName: "view", isSignal: false, isRequired: false, transformFunction: null }, minZoom: { classPropertyName: "minZoom", publicName: "minZoom", isSignal: false, isRequired: false, transformFunction: null }, maxZoom: { classPropertyName: "maxZoom", publicName: "maxZoom", isSignal: false, isRequired: false, transformFunction: null }, background: { classPropertyName: "background", publicName: "background", isSignal: false, isRequired: false, transformFunction: null }, optimization: { classPropertyName: "optimization", publicName: "optimization", isSignal: true, isRequired: false, transformFunction: null }, entitiesSelectable: { classPropertyName: "entitiesSelectable", publicName: "entitiesSelectable", isSignal: false, isRequired: false, transformFunction: null }, keyboardShortcuts: { classPropertyName: "keyboardShortcuts", publicName: "keyboardShortcuts", isSignal: false, isRequired: false, transformFunction: null }, connection: { classPropertyName: "connection", publicName: "connection", isSignal: false, isRequired: false, transformFunction: (settings) => new ConnectionModel(settings) }, snapGrid: { classPropertyName: "snapGrid", publicName: "snapGrid", isSignal: false, isRequired: false, transformFunction: null }, elevateNodesOnSelect: { classPropertyName: "elevateNodesOnSelect", publicName: "elevateNodesOnSelect", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { onComponentNodeEvent: "onComponentNodeEvent" }, queries: [{ propertyName: "nodeTemplateDirective", first: true, predicate: NodeHtmlTemplateMockDirective, descendants: true, isSignal: true }, { propertyName: "groupNodeTemplateDirective", first: true, predicate: GroupNodeTemplateMockDirective, descendants: true, isSignal: true }, { propertyName: "edgeTemplateDirective", first: true, predicate: EdgeTemplateMockDirective, descendants: true, isSignal: true }, { propertyName: "edgeLabelHtmlDirective", first: true, predicate: EdgeLabelHtmlTemplateMockDirective, descendants: true, isSignal: true }, { propertyName: "connectionTemplateDirective", first: true, predicate: ConnectionTemplateMockDirective, descendants: true, isSignal: true }], ngImport: i0, template: `
3837
3798
  <ng-content />
3838
3799
 
3839
- @for (node of nodes(); track $index) {
3800
+ @for (node of nodes; track $index) {
3840
3801
  @if (node.type === 'html-template') {
3841
3802
  <ng-component
3842
3803
  [ngTemplateOutlet]="nodeTemplateDirective()?.templateRef ?? null"
@@ -3862,7 +3823,7 @@ class VflowMockComponent {
3862
3823
  }
3863
3824
  }
3864
3825
 
3865
- @for (edge of edges(); track $index) {
3826
+ @for (edge of edges; track $index) {
3866
3827
  @if (edge.type === 'template') {
3867
3828
  <ng-component
3868
3829
  [ngTemplateOutlet]="edgeTemplateDirective()?.templateRef ?? null"
@@ -3910,7 +3871,7 @@ class VflowMockComponent {
3910
3871
  }
3911
3872
  }
3912
3873
 
3913
- @if (connection()?.type === 'template') {
3874
+ @if (connection.type === 'template') {
3914
3875
  <ng-component
3915
3876
  [ngTemplateOutlet]="connectionTemplateDirective()?.templateRef ?? null"
3916
3877
  [ngTemplateOutletContext]="{
@@ -3929,7 +3890,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3929
3890
  template: `
3930
3891
  <ng-content />
3931
3892
 
3932
- @for (node of nodes(); track $index) {
3893
+ @for (node of nodes; track $index) {
3933
3894
  @if (node.type === 'html-template') {
3934
3895
  <ng-component
3935
3896
  [ngTemplateOutlet]="nodeTemplateDirective()?.templateRef ?? null"
@@ -3955,7 +3916,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3955
3916
  }
3956
3917
  }
3957
3918
 
3958
- @for (edge of edges(); track $index) {
3919
+ @for (edge of edges; track $index) {
3959
3920
  @if (edge.type === 'template') {
3960
3921
  <ng-component
3961
3922
  [ngTemplateOutlet]="edgeTemplateDirective()?.templateRef ?? null"
@@ -4003,7 +3964,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
4003
3964
  }
4004
3965
  }
4005
3966
 
4006
- @if (connection()?.type === 'template') {
3967
+ @if (connection.type === 'template') {
4007
3968
  <ng-component
4008
3969
  [ngTemplateOutlet]="connectionTemplateDirective()?.templateRef ?? null"
4009
3970
  [ngTemplateOutletContext]="{
@@ -4018,7 +3979,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
4018
3979
  standalone: true,
4019
3980
  imports: [NgTemplateOutlet],
4020
3981
  }]
4021
- }] });
3982
+ }], propDecorators: { nodes: [{
3983
+ type: Input,
3984
+ args: [{ required: true }]
3985
+ }], edges: [{
3986
+ type: Input
3987
+ }], view: [{
3988
+ type: Input
3989
+ }], minZoom: [{
3990
+ type: Input
3991
+ }], maxZoom: [{
3992
+ type: Input
3993
+ }], background: [{
3994
+ type: Input
3995
+ }], entitiesSelectable: [{
3996
+ type: Input
3997
+ }], keyboardShortcuts: [{
3998
+ type: Input
3999
+ }], connection: [{
4000
+ type: Input,
4001
+ args: [{
4002
+ transform: (settings) => new ConnectionModel(settings),
4003
+ }]
4004
+ }], snapGrid: [{
4005
+ type: Input
4006
+ }], elevateNodesOnSelect: [{
4007
+ type: Input
4008
+ }] } });
4022
4009
 
4023
4010
  class HandleMockComponent {
4024
4011
  constructor() {
@@ -4027,6 +4014,8 @@ class HandleMockComponent {
4027
4014
  this.id = input();
4028
4015
  this.template = input();
4029
4016
  }
4017
+ // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
4018
+ ngOnInit() { }
4030
4019
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4031
4020
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: HandleMockComponent, isStandalone: true, selector: "handle", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: true, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, template: { classPropertyName: "template", publicName: "template", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4032
4021
  }
@@ -4046,6 +4035,10 @@ class ResizableMockComponent {
4046
4035
  this.resizerColor = input('#2e414c');
4047
4036
  this.gap = input(1.5);
4048
4037
  }
4038
+ // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
4039
+ ngOnInit() { }
4040
+ // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
4041
+ ngAfterViewInit() { }
4049
4042
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ResizableMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4050
4043
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: ResizableMockComponent, isStandalone: true, selector: "[resizable]", inputs: { resizable: { classPropertyName: "resizable", publicName: "resizable", isSignal: true, isRequired: false, transformFunction: null }, resizerColor: { classPropertyName: "resizerColor", publicName: "resizerColor", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4051
4044
  }
@@ -4066,6 +4059,8 @@ class MiniMapMockComponent {
4066
4059
  this.position = input('bottom-right');
4067
4060
  this.scaleOnHover = input(false);
4068
4061
  }
4062
+ // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
4063
+ ngOnInit() { }
4069
4064
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MiniMapMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4070
4065
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: MiniMapMockComponent, isStandalone: true, selector: "mini-map", inputs: { maskColor: { classPropertyName: "maskColor", publicName: "maskColor", isSignal: true, isRequired: false, transformFunction: null }, strokeColor: { classPropertyName: "strokeColor", publicName: "strokeColor", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, scaleOnHover: { classPropertyName: "scaleOnHover", publicName: "scaleOnHover", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4071
4066
  }
@@ -4083,6 +4078,10 @@ class NodeToolbarMockComponent {
4083
4078
  constructor() {
4084
4079
  this.position = input('top');
4085
4080
  }
4081
+ // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
4082
+ ngOnInit() { }
4083
+ // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
4084
+ ngOnDestroy() { }
4086
4085
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeToolbarMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4087
4086
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "17.3.12", type: NodeToolbarMockComponent, isStandalone: true, selector: "node-toolbar", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '<ng-content />', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4088
4087
  }
@@ -4101,6 +4100,14 @@ class ConnectionControllerMockDirective {
4101
4100
  // eslint-disable-next-line @angular-eslint/no-output-on-prefix
4102
4101
  this.onConnect = output();
4103
4102
  }
4103
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4104
+ startConnection(handle) { }
4105
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4106
+ validateConnection(handle) { }
4107
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4108
+ resetValidateConnection(targetHandle) { }
4109
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
4110
+ endConnection() { }
4104
4111
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConnectionControllerMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4105
4112
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: ConnectionControllerMockDirective, isStandalone: true, selector: "[onConnect]", outputs: { onConnect: "onConnect" }, ngImport: i0 }); }
4106
4113
  }