ngx-vflow 1.12.1 → 1.13.1

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.
@@ -6,11 +6,13 @@ export class HandleMockComponent {
6
6
  this.type = input.required();
7
7
  this.id = input();
8
8
  this.template = input();
9
+ this.offsetX = input(0);
10
+ this.offsetY = input(0);
9
11
  }
10
12
  // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
11
13
  ngOnInit() { }
12
14
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
13
- 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 }); }
15
+ 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 }, offsetX: { classPropertyName: "offsetX", publicName: "offsetX", isSignal: true, isRequired: false, transformFunction: null }, offsetY: { classPropertyName: "offsetY", publicName: "offsetY", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
14
16
  }
15
17
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleMockComponent, decorators: [{
16
18
  type: Component,
@@ -21,4 +23,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
21
23
  standalone: true,
22
24
  }]
23
25
  }] });
24
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGFuZGxlLW1vY2suY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXZmbG93LWxpYi90ZXN0aW5nL3NyYy9jb21wb25lbnQtbW9ja3MvaGFuZGxlLW1vY2suY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUF1QixNQUFNLGVBQWUsQ0FBQzs7QUFVL0YsTUFBTSxPQUFPLG1CQUFtQjtJQU5oQztRQU9TLGFBQVEsR0FBRyxLQUFLLENBQUMsUUFBUSxFQUFZLENBQUM7UUFDdEMsU0FBSSxHQUFHLEtBQUssQ0FBQyxRQUFRLEVBQXVCLENBQUM7UUFDN0MsT0FBRSxHQUFHLEtBQUssRUFBVSxDQUFDO1FBQ3JCLGFBQVEsR0FBRyxLQUFLLEVBQW9CLENBQUM7S0FJN0M7SUFGQyxxRUFBcUU7SUFDOUQsUUFBUSxLQUFVLENBQUM7K0dBUGYsbUJBQW1CO21HQUFuQixtQkFBbUIsa2pCQUpwQixFQUFFOzs0RkFJRCxtQkFBbUI7a0JBTi9CLFNBQVM7bUJBQUM7b0JBQ1QsUUFBUSxFQUFFLFFBQVE7b0JBQ2xCLFFBQVEsRUFBRSxFQUFFO29CQUNaLGVBQWUsRUFBRS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5wdXQsIFRlbXBsYXRlUmVmLCBPbkluaXQgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB0eXBlIHsgSGFuZGxlQ29tcG9uZW50LCBQb3NpdGlvbiB9IGZyb20gJ25neC12Zmxvdyc7XG5pbXBvcnQgeyBBc0ludGVyZmFjZSB9IGZyb20gJy4uL3R5cGVzJztcblxuQENvbXBvbmVudCh7XG4gIHNlbGVjdG9yOiAnaGFuZGxlJyxcbiAgdGVtcGxhdGU6ICcnLFxuICBjaGFuZ2VEZXRlY3Rpb246IENoYW5nZURldGVjdGlvblN0cmF0ZWd5Lk9uUHVzaCxcbiAgc3RhbmRhbG9uZTogdHJ1ZSxcbn0pXG5leHBvcnQgY2xhc3MgSGFuZGxlTW9ja0NvbXBvbmVudCBpbXBsZW1lbnRzIEFzSW50ZXJmYWNlPEhhbmRsZUNvbXBvbmVudD4sIE9uSW5pdCB7XG4gIHB1YmxpYyBwb3NpdGlvbiA9IGlucHV0LnJlcXVpcmVkPFBvc2l0aW9uPigpO1xuICBwdWJsaWMgdHlwZSA9IGlucHV0LnJlcXVpcmVkPCdzb3VyY2UnIHwgJ3RhcmdldCc+KCk7XG4gIHB1YmxpYyBpZCA9IGlucHV0PHN0cmluZz4oKTtcbiAgcHVibGljIHRlbXBsYXRlID0gaW5wdXQ8VGVtcGxhdGVSZWY8YW55PiB8IG51bGw+KCk7XG4gIHB1YmxpYyBvZmZzZXRYID0gaW5wdXQ8bnVtYmVyPigwKTtcbiAgcHVibGljIG9mZnNldFkgPSBpbnB1dDxudW1iZXI+KDApO1xuXG4gIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAYW5ndWxhci1lc2xpbnQvbm8tZW1wdHktbGlmZWN5Y2xlLW1ldGhvZFxuICBwdWJsaWMgbmdPbkluaXQoKTogdm9pZCB7fVxufVxuIl19
@@ -456,11 +456,13 @@ class HandleMockComponent {
456
456
  this.type = input.required();
457
457
  this.id = input();
458
458
  this.template = input();
459
+ this.offsetX = input(0);
460
+ this.offsetY = input(0);
459
461
  }
460
462
  // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
461
463
  ngOnInit() { }
462
464
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
463
- 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 }); }
465
+ 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 }, offsetX: { classPropertyName: "offsetX", publicName: "offsetX", isSignal: true, isRequired: false, transformFunction: null }, offsetY: { classPropertyName: "offsetY", publicName: "offsetY", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
464
466
  }
465
467
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleMockComponent, decorators: [{
466
468
  type: Component,
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-vflow-testing.mjs","sources":["../../../projects/ngx-vflow-lib/testing/src/provide-custom-node-mocks.ts","../../../projects/ngx-vflow-lib/testing/src/directive-mocks/template-mock.directive.ts","../../../projects/ngx-vflow-lib/testing/src/component-mocks/vflow-mock.component.ts","../../../projects/ngx-vflow-lib/testing/src/component-mocks/handle-mock.component.ts","../../../projects/ngx-vflow-lib/testing/src/component-mocks/resizable-mock.component.ts","../../../projects/ngx-vflow-lib/testing/src/component-mocks/minimap-mock.component.ts","../../../projects/ngx-vflow-lib/testing/src/component-mocks/node-toolbar-mock.component.ts","../../../projects/ngx-vflow-lib/testing/src/directive-mocks/connection-controller-mock.directive.ts","../../../projects/ngx-vflow-lib/testing/src/directive-mocks/drag-handle-mock.directive.ts","../../../projects/ngx-vflow-lib/testing/src/directive-mocks/selectable-mock.directive.ts","../../../projects/ngx-vflow-lib/testing/src/component-mocks/custom-template-edge-mock.component.ts","../../../projects/ngx-vflow-lib/testing/src/vflow-mocks.ts","../../../projects/ngx-vflow-lib/testing/src/public-api.ts","../../../projects/ngx-vflow-lib/testing/src/ngx-vflow-testing.ts"],"sourcesContent":["import { Provider, signal } from '@angular/core';\nimport {\n ɵNodeModel as NodeModel,\n ɵComponentEventBusService as ComponentEventBusService,\n ɵHandleService as HandleService,\n ɵFlowSettingsService as FlowSettingsService,\n ɵFlowEntitiesService as FlowEntitiesService,\n ɵNodeAccessorService as NodeAccessorService,\n ɵRootPointerDirective as RootPointerDirective,\n ɵSpacePointContextDirective as SpacePointContextDirective,\n ɵViewportService as ViewportService,\n ɵSelectionService as SelectionService,\n Point,\n} from 'ngx-vflow';\nimport { of } from 'rxjs';\n\nconst mockModel = () => new NodeModel({ id: 'mock', type: 'default', point: { x: 0, y: 0 } });\n\nexport function provideCustomNodeMocks(): Provider[] {\n return [\n {\n provide: ComponentEventBusService,\n useValue: {\n pushEvent: () => {},\n },\n },\n {\n provide: NodeAccessorService,\n useFactory: () => ({\n model: signal(mockModel()),\n }),\n },\n FlowEntitiesService,\n\n // TODO: mocks below should be removed after the major release\n {\n provide: HandleService,\n useFactory: () => ({\n node: signal(mockModel()),\n createHandle: () => {},\n destroyHandle: () => {},\n }),\n },\n {\n provide: RootPointerDirective,\n useValue: {\n pointerMovement$: of({\n x: 0,\n y: 0,\n movementX: 0,\n movementY: 0,\n target: null,\n originalEvent: null,\n }),\n documentPointerEnd$: of(null),\n },\n },\n {\n provide: SpacePointContextDirective,\n useValue: {\n documentPointToFlowPoint: (point: Point) => point,\n },\n },\n {\n provide: SelectionService,\n useValue: {\n select: () => {},\n },\n },\n FlowSettingsService,\n ViewportService,\n ];\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\nimport type {\n ConnectionTemplateDirective,\n EdgeLabelHtmlTemplateDirective,\n EdgeTemplateDirective,\n GroupNodeTemplateDirective,\n HandleTemplateDirective,\n NodeHtmlTemplateDirective,\n} from 'ngx-vflow';\nimport { AsInterface } from '../types';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[edge]',\n})\nexport class EdgeTemplateMockDirective implements AsInterface<EdgeTemplateDirective> {\n public templateRef = inject(TemplateRef);\n}\n\n@Directive({\n standalone: true,\n selector: 'ng-template[connection]',\n})\nexport class ConnectionTemplateMockDirective implements AsInterface<ConnectionTemplateDirective> {\n public templateRef = inject(TemplateRef);\n}\n\n@Directive({\n standalone: true,\n selector: 'ng-template[edgeLabelHtml]',\n})\nexport class EdgeLabelHtmlTemplateMockDirective implements AsInterface<EdgeLabelHtmlTemplateDirective> {\n public templateRef = inject(TemplateRef);\n}\n\n@Directive({\n standalone: true,\n selector: 'ng-template[nodeHtml]',\n})\nexport class NodeHtmlTemplateMockDirective implements AsInterface<NodeHtmlTemplateDirective> {\n public templateRef = inject(TemplateRef);\n}\n\n@Directive({\n standalone: true,\n selector: 'ng-template[nodeSvg]',\n})\nexport class NodeSvgTemplateMockDirective implements AsInterface<NodeSvgTemplateMockDirective> {\n public templateRef = inject(TemplateRef);\n}\n\n@Directive({\n standalone: true,\n selector: 'ng-template[groupNode]',\n})\nexport class GroupNodeTemplateMockDirective implements AsInterface<GroupNodeTemplateDirective> {\n public templateRef = inject(TemplateRef);\n}\n\n@Directive({\n standalone: true,\n selector: 'ng-template[handle]',\n})\nexport class HandleTemplateMockDirective implements AsInterface<HandleTemplateDirective> {\n public templateRef = inject(TemplateRef);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n contentChild,\n Input,\n output,\n signal,\n WritableSignal,\n OnInit,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Node,\n DynamicNode,\n Edge,\n SpacePoint,\n Point,\n Background,\n KeyboardShortcuts,\n ConnectionSettings,\n ViewportState,\n NodeChange,\n EdgeChange,\n FitViewOptions,\n VflowComponent,\n IntersectingNodesOptions,\n ɵConnectionModel as ConnectionModel,\n DEFAULT_OPTIMIZATION,\n} from 'ngx-vflow';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport {\n ConnectionTemplateMockDirective,\n EdgeLabelHtmlTemplateMockDirective,\n EdgeTemplateMockDirective,\n GroupNodeTemplateMockDirective,\n NodeHtmlTemplateMockDirective,\n} from '../directive-mocks/template-mock.directive';\nimport { AsInterface } from '../types';\n\n@Component({\n selector: 'vflow',\n template: `\n <ng-content />\n\n @for (node of nodes; track $index) {\n @if (node.type === 'html-template') {\n <ng-component\n [ngTemplateOutlet]=\"nodeTemplateDirective()?.templateRef ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n node: node,\n selected: createSignal(false),\n },\n }\" />\n }\n\n @if (node.type === 'template-group') {\n <ng-component\n [ngTemplateOutlet]=\"groupNodeTemplateDirective()?.templateRef ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n node: node,\n selected: createSignal(false),\n width: createSignal(node.width),\n height: createSignal(node.height),\n },\n }\" />\n }\n }\n\n @for (edge of edges; track $index) {\n @if (edge.type === 'template') {\n <ng-component\n [ngTemplateOutlet]=\"edgeTemplateDirective()?.templateRef ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n edge: edge,\n selected: createSignal(false),\n path: createSignal(''),\n markerStart: createSignal(''),\n markerEnd: createSignal(''),\n },\n }\" />\n\n @if (edge.edgeLabels?.start) {\n <ng-component\n [ngTemplateOutlet]=\"edgeLabelHtmlDirective()?.templateRef ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n edge: edge,\n },\n }\" />\n }\n\n @if (edge.edgeLabels?.center) {\n <ng-component\n [ngTemplateOutlet]=\"edgeLabelHtmlDirective()?.templateRef ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n edge: edge,\n label: edge.edgeLabels?.center,\n },\n }\" />\n }\n\n @if (edge.edgeLabels?.end) {\n <ng-component\n [ngTemplateOutlet]=\"edgeLabelHtmlDirective()?.templateRef ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n edge: edge,\n label: edge.edgeLabels?.end,\n },\n }\" />\n }\n }\n }\n\n @if (connection.type === 'template') {\n <ng-component\n [ngTemplateOutlet]=\"connectionTemplateDirective()?.templateRef ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n path: createSignal(''),\n marker: createSignal(''),\n },\n }\" />\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [NgTemplateOutlet],\n})\nexport class VflowMockComponent implements AsInterface<VflowComponent>, OnInit {\n @Input({ required: true })\n public readonly nodes!: Node[] | DynamicNode[];\n\n @Input()\n public readonly edges!: Edge[];\n\n @Input()\n public readonly view: [number, number] | 'auto' = [400, 400];\n\n @Input()\n public readonly minZoom = 0.5;\n\n @Input()\n public readonly maxZoom = 3;\n\n @Input()\n public readonly background: Background | string = '#fff';\n\n @Input()\n public readonly optimization = DEFAULT_OPTIMIZATION;\n\n @Input()\n public readonly entitiesSelectable = true;\n\n @Input()\n public readonly keyboardShortcuts: KeyboardShortcuts = {\n multiSelection: null,\n };\n\n @Input({\n transform: (settings: ConnectionSettings) => new ConnectionModel(settings),\n })\n public readonly connection: ConnectionModel = new ConnectionModel({});\n\n @Input()\n public readonly snapGrid!: [number, number];\n\n @Input()\n public elevateNodesOnSelect!: boolean;\n\n @Input()\n public elevateEdgesOnSelect!: boolean;\n\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n public readonly onComponentNodeEvent = output<any>();\n\n protected nodeTemplateDirective = contentChild(NodeHtmlTemplateMockDirective);\n\n protected groupNodeTemplateDirective = contentChild(GroupNodeTemplateMockDirective);\n\n protected edgeTemplateDirective = contentChild(EdgeTemplateMockDirective);\n\n protected edgeLabelHtmlDirective = contentChild(EdgeLabelHtmlTemplateMockDirective);\n\n protected connectionTemplateDirective = contentChild(ConnectionTemplateMockDirective);\n\n public viewport = signal<ViewportState>({\n x: 0,\n y: 0,\n zoom: 1,\n });\n\n public nodesChange = signal<NodeChange[]>([]);\n public edgesChange = signal<EdgeChange[]>([]);\n\n public viewportChange$ = toObservable(this.viewport);\n\n public nodesChange$ = toObservable(this.nodesChange);\n public edgesChange$ = toObservable(this.edgesChange);\n\n // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method\n public ngOnInit() {}\n\n public viewportTo(viewport: ViewportState): void {\n this.viewport.set(viewport);\n }\n\n public zoomTo(zoom: number): void {\n this.viewport.update((prev) => ({ ...prev, zoom }));\n }\n\n public panTo(point: Point): void {\n this.viewport.update((prev) => ({ ...prev, x: point.x, y: point.y }));\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public fitView(options?: FitViewOptions): void {}\n\n public documentPointToFlowPoint(point: Point, options?: { spaces: false }): Point;\n public documentPointToFlowPoint(point: Point, options: { spaces: true }): SpacePoint[];\n public documentPointToFlowPoint(point: Point, options?: { spaces: boolean }): unknown {\n if (options?.spaces) {\n return [\n {\n nodeId: null,\n x: point.x,\n y: point.y,\n },\n ];\n }\n\n return point;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public getIntesectingNodes(nodeId: string, options?: IntersectingNodesOptions): Node[] | DynamicNode[] {\n return [];\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public toNodeSpace(nodeId: string, spaceNodeId: string): Point {\n return { x: 0, y: 0 };\n }\n\n public getNode<T = unknown>(id: string): Node<T> | DynamicNode<T> | undefined {\n return this.nodes.find((node) => node.id === id);\n }\n\n public getDetachedEdges(): Edge[] {\n return [];\n }\n\n protected createSignal<T>(value: T): WritableSignal<T> {\n return signal(value);\n }\n}\n","import { ChangeDetectionStrategy, Component, input, TemplateRef, OnInit } from '@angular/core';\nimport type { HandleComponent, Position } from 'ngx-vflow';\nimport { AsInterface } from '../types';\n\n@Component({\n selector: 'handle',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class HandleMockComponent implements AsInterface<HandleComponent>, OnInit {\n public position = input.required<Position>();\n public type = input.required<'source' | 'target'>();\n public id = input<string>();\n public template = input<TemplateRef<any>>();\n\n // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method\n public ngOnInit(): void {}\n}\n","import { ChangeDetectionStrategy, Component, input, OnInit, AfterViewInit } from '@angular/core';\nimport type { ResizableComponent } from 'ngx-vflow';\nimport { AsInterface } from '../types';\n\n@Component({\n selector: '[resizable]',\n template: '<ng-content />',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ResizableMockComponent implements AsInterface<ResizableComponent>, OnInit, AfterViewInit {\n public resizable = input<boolean | ''>();\n public resizerColor = input('#2e414c');\n public gap = input(1.5);\n\n // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method\n public ngOnInit() {}\n\n // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method\n public ngAfterViewInit() {}\n}\n","import { ChangeDetectionStrategy, Component, input, OnInit } from '@angular/core';\nimport type { MiniMapComponent, MiniMapPosition } from 'ngx-vflow';\nimport { AsInterface } from '../types';\n\n@Component({\n selector: 'mini-map',\n template: '',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MiniMapMockComponent implements AsInterface<MiniMapComponent>, OnInit {\n public maskColor = input(`rgba(215, 215, 215, 0.6)`);\n\n public strokeColor = input(`rgb(200, 200, 200)`);\n\n public position = input<MiniMapPosition>('bottom-right');\n\n public scaleOnHover = input(false);\n\n // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method\n public ngOnInit() {}\n}\n","import { ChangeDetectionStrategy, Component, input, OnInit, OnDestroy } from '@angular/core';\nimport type { Position, NodeToolbarComponent } from 'ngx-vflow';\nimport { AsInterface } from '../types';\n\n@Component({\n selector: 'node-toolbar',\n template: '<ng-content />',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NodeToolbarMockComponent implements AsInterface<NodeToolbarComponent>, OnInit, OnDestroy {\n public position = input<Position>('top');\n\n // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method\n public ngOnInit() {}\n\n // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method\n public ngOnDestroy() {}\n}\n","import { Directive, output } from '@angular/core';\nimport { Connection, ReconnectionEvent } from 'ngx-vflow';\nimport { AsInterface } from '../types';\nimport type { ConnectionControllerDirective, ɵHandleModel as HandleModel } from 'ngx-vflow';\n\n@Directive({ selector: '[onConnect]', standalone: true })\nexport class ConnectionControllerMockDirective implements AsInterface<ConnectionControllerDirective> {\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n public readonly onConnect = output<Connection>();\n\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n public readonly onReconnect = output<ReconnectionEvent>();\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public startConnection(handle: HandleModel): void {}\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public startReconnection(handle: HandleModel): void {}\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public validateConnection(handle: HandleModel): void {}\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public resetValidateConnection(targetHandle: HandleModel): void {}\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public endConnection(): void {}\n}\n","import { Directive } from '@angular/core';\nimport { AsInterface } from '../types';\nimport type { DragHandleDirective } from 'ngx-vflow';\n\n@Directive({ selector: '[dragHandle]', standalone: true })\nexport class DragHandleMockDirective implements AsInterface<DragHandleDirective> {}\n","import { Directive } from '@angular/core';\nimport { AsInterface } from '../types';\nimport type { SelectableDirective } from 'ngx-vflow';\n\n@Directive({\n selector: '[selectable]',\n standalone: true,\n})\nexport class SelectableMockDirective implements AsInterface<SelectableDirective> {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { AsInterface } from '../types';\nimport type { CustomTemplateEdgeComponent } from 'ngx-vflow';\n\n@Component({\n selector: 'g[customTemplateEdge]',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class CustomTemplateEdgeMockComponent implements AsInterface<CustomTemplateEdgeComponent> {}\n","import { CustomTemplateEdgeMockComponent } from './component-mocks/custom-template-edge-mock.component';\nimport { HandleMockComponent } from './component-mocks/handle-mock.component';\nimport { MiniMapMockComponent } from './component-mocks/minimap-mock.component';\nimport { NodeToolbarMockComponent } from './component-mocks/node-toolbar-mock.component';\nimport { ResizableMockComponent } from './component-mocks/resizable-mock.component';\nimport { VflowMockComponent } from './component-mocks/vflow-mock.component';\nimport { ConnectionControllerMockDirective } from './directive-mocks/connection-controller-mock.directive';\nimport { DragHandleMockDirective } from './directive-mocks/drag-handle-mock.directive';\nimport { SelectableMockDirective } from './directive-mocks/selectable-mock.directive';\nimport {\n ConnectionTemplateMockDirective,\n EdgeLabelHtmlTemplateMockDirective,\n EdgeTemplateMockDirective,\n GroupNodeTemplateMockDirective,\n HandleTemplateMockDirective,\n NodeHtmlTemplateMockDirective,\n} from './directive-mocks/template-mock.directive';\n\nexport const VflowMocks = [\n VflowMockComponent,\n HandleMockComponent,\n ResizableMockComponent,\n SelectableMockDirective,\n MiniMapMockComponent,\n NodeToolbarMockComponent,\n DragHandleMockDirective,\n ConnectionControllerMockDirective,\n CustomTemplateEdgeMockComponent,\n\n NodeHtmlTemplateMockDirective,\n GroupNodeTemplateMockDirective,\n EdgeLabelHtmlTemplateMockDirective,\n EdgeTemplateMockDirective,\n ConnectionTemplateMockDirective,\n HandleTemplateMockDirective,\n] as const;\n","// Testing\nexport * from './provide-custom-node-mocks';\nexport * from './component-mocks/vflow-mock.component';\nexport * from './component-mocks/handle-mock.component';\nexport * from './component-mocks/resizable-mock.component';\nexport * from './component-mocks/minimap-mock.component';\nexport * from './component-mocks/node-toolbar-mock.component';\nexport * from './directive-mocks/connection-controller-mock.directive';\nexport * from './directive-mocks/drag-handle-mock.directive';\nexport * from './directive-mocks/selectable-mock.directive';\nexport * from './directive-mocks/template-mock.directive';\nexport * from './vflow-mocks';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["NodeModel","ComponentEventBusService","NodeAccessorService","FlowEntitiesService","HandleService","RootPointerDirective","SpacePointContextDirective","SelectionService","FlowSettingsService","ViewportService","ConnectionModel"],"mappings":";;;;;;;AAgBA,MAAM,SAAS,GAAG,MAAM,IAAIA,UAAS,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;SAE7E,sBAAsB,GAAA;IACpC,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAEC,yBAAwB;AACjC,YAAA,QAAQ,EAAE;AACR,gBAAA,SAAS,EAAE,MAAK,GAAG;AACpB,aAAA;AACF,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAEC,oBAAmB;AAC5B,YAAA,UAAU,EAAE,OAAO;AACjB,gBAAA,KAAK,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC;aAC3B,CAAC;AACH,SAAA;QACDC,oBAAmB;;AAGnB,QAAA;AACE,YAAA,OAAO,EAAEC,cAAa;AACtB,YAAA,UAAU,EAAE,OAAO;AACjB,gBAAA,IAAI,EAAE,MAA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AAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAID,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAN3C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,QAAQ,EAAE,EAAE;oBACZ,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACSY,MAAA,UAAU,GAAG;IACxB,kBAAkB;IAClB,mBAAmB;IACnB,sBAAsB;IACtB,uBAAuB;IACvB,oBAAoB;IACpB,wBAAwB;IACxB,uBAAuB;IACvB,iCAAiC;IACjC,+BAA+B;IAE/B,6BAA6B;IAC7B,8BAA8B;IAC9B,kCAAkC;IAClC,yBAAyB;IACzB,+BAA+B;IAC/B,2BAA2B;;;AClC7B;;ACAA;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-vflow-testing.mjs","sources":["../../../projects/ngx-vflow-lib/testing/src/provide-custom-node-mocks.ts","../../../projects/ngx-vflow-lib/testing/src/directive-mocks/template-mock.directive.ts","../../../projects/ngx-vflow-lib/testing/src/component-mocks/vflow-mock.component.ts","../../../projects/ngx-vflow-lib/testing/src/component-mocks/handle-mock.component.ts","../../../projects/ngx-vflow-lib/testing/src/component-mocks/resizable-mock.component.ts","../../../projects/ngx-vflow-lib/testing/src/component-mocks/minimap-mock.component.ts","../../../projects/ngx-vflow-lib/testing/src/component-mocks/node-toolbar-mock.component.ts","../../../projects/ngx-vflow-lib/testing/src/directive-mocks/connection-controller-mock.directive.ts","../../../projects/ngx-vflow-lib/testing/src/directive-mocks/drag-handle-mock.directive.ts","../../../projects/ngx-vflow-lib/testing/src/directive-mocks/selectable-mock.directive.ts","../../../projects/ngx-vflow-lib/testing/src/component-mocks/custom-template-edge-mock.component.ts","../../../projects/ngx-vflow-lib/testing/src/vflow-mocks.ts","../../../projects/ngx-vflow-lib/testing/src/public-api.ts","../../../projects/ngx-vflow-lib/testing/src/ngx-vflow-testing.ts"],"sourcesContent":["import { Provider, signal } from '@angular/core';\nimport {\n ɵNodeModel as NodeModel,\n ɵComponentEventBusService as ComponentEventBusService,\n ɵHandleService as HandleService,\n ɵFlowSettingsService as FlowSettingsService,\n ɵFlowEntitiesService as FlowEntitiesService,\n ɵNodeAccessorService as NodeAccessorService,\n ɵRootPointerDirective as RootPointerDirective,\n ɵSpacePointContextDirective as SpacePointContextDirective,\n ɵViewportService as ViewportService,\n ɵSelectionService as SelectionService,\n Point,\n} from 'ngx-vflow';\nimport { of } from 'rxjs';\n\nconst mockModel = () => new NodeModel({ id: 'mock', type: 'default', point: { x: 0, y: 0 } });\n\nexport function provideCustomNodeMocks(): Provider[] {\n return [\n {\n provide: ComponentEventBusService,\n useValue: {\n pushEvent: () => {},\n },\n },\n {\n provide: NodeAccessorService,\n useFactory: () => ({\n model: signal(mockModel()),\n }),\n },\n FlowEntitiesService,\n\n // TODO: mocks below should be removed after the major release\n {\n provide: HandleService,\n useFactory: () => ({\n node: signal(mockModel()),\n createHandle: () => {},\n destroyHandle: () => {},\n }),\n },\n {\n provide: RootPointerDirective,\n useValue: {\n pointerMovement$: of({\n x: 0,\n y: 0,\n movementX: 0,\n movementY: 0,\n target: null,\n originalEvent: null,\n }),\n documentPointerEnd$: of(null),\n },\n },\n {\n provide: SpacePointContextDirective,\n useValue: {\n documentPointToFlowPoint: (point: Point) => point,\n },\n },\n {\n provide: SelectionService,\n useValue: {\n select: () => {},\n },\n },\n FlowSettingsService,\n ViewportService,\n ];\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\nimport type {\n ConnectionTemplateDirective,\n EdgeLabelHtmlTemplateDirective,\n EdgeTemplateDirective,\n GroupNodeTemplateDirective,\n HandleTemplateDirective,\n NodeHtmlTemplateDirective,\n} from 'ngx-vflow';\nimport { AsInterface } from '../types';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[edge]',\n})\nexport class EdgeTemplateMockDirective implements AsInterface<EdgeTemplateDirective> {\n public templateRef = inject(TemplateRef);\n}\n\n@Directive({\n standalone: true,\n selector: 'ng-template[connection]',\n})\nexport class ConnectionTemplateMockDirective implements AsInterface<ConnectionTemplateDirective> {\n public templateRef = inject(TemplateRef);\n}\n\n@Directive({\n standalone: true,\n selector: 'ng-template[edgeLabelHtml]',\n})\nexport class EdgeLabelHtmlTemplateMockDirective implements AsInterface<EdgeLabelHtmlTemplateDirective> {\n public templateRef = inject(TemplateRef);\n}\n\n@Directive({\n standalone: true,\n selector: 'ng-template[nodeHtml]',\n})\nexport class NodeHtmlTemplateMockDirective implements AsInterface<NodeHtmlTemplateDirective> {\n public templateRef = inject(TemplateRef);\n}\n\n@Directive({\n standalone: true,\n selector: 'ng-template[nodeSvg]',\n})\nexport class NodeSvgTemplateMockDirective implements AsInterface<NodeSvgTemplateMockDirective> {\n public templateRef = inject(TemplateRef);\n}\n\n@Directive({\n standalone: true,\n selector: 'ng-template[groupNode]',\n})\nexport class GroupNodeTemplateMockDirective implements AsInterface<GroupNodeTemplateDirective> {\n public templateRef = inject(TemplateRef);\n}\n\n@Directive({\n standalone: true,\n selector: 'ng-template[handle]',\n})\nexport class HandleTemplateMockDirective implements AsInterface<HandleTemplateDirective> {\n public templateRef = inject(TemplateRef);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n contentChild,\n Input,\n output,\n signal,\n WritableSignal,\n OnInit,\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport {\n Node,\n DynamicNode,\n Edge,\n SpacePoint,\n Point,\n Background,\n KeyboardShortcuts,\n ConnectionSettings,\n ViewportState,\n NodeChange,\n EdgeChange,\n FitViewOptions,\n VflowComponent,\n IntersectingNodesOptions,\n ɵConnectionModel as ConnectionModel,\n DEFAULT_OPTIMIZATION,\n} from 'ngx-vflow';\nimport { toObservable } from '@angular/core/rxjs-interop';\nimport {\n ConnectionTemplateMockDirective,\n EdgeLabelHtmlTemplateMockDirective,\n EdgeTemplateMockDirective,\n GroupNodeTemplateMockDirective,\n NodeHtmlTemplateMockDirective,\n} from '../directive-mocks/template-mock.directive';\nimport { AsInterface } from '../types';\n\n@Component({\n selector: 'vflow',\n template: `\n <ng-content />\n\n @for (node of nodes; track $index) {\n @if (node.type === 'html-template') {\n <ng-component\n [ngTemplateOutlet]=\"nodeTemplateDirective()?.templateRef ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n node: node,\n selected: createSignal(false),\n },\n }\" />\n }\n\n @if (node.type === 'template-group') {\n <ng-component\n [ngTemplateOutlet]=\"groupNodeTemplateDirective()?.templateRef ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n node: node,\n selected: createSignal(false),\n width: createSignal(node.width),\n height: createSignal(node.height),\n },\n }\" />\n }\n }\n\n @for (edge of edges; track $index) {\n @if (edge.type === 'template') {\n <ng-component\n [ngTemplateOutlet]=\"edgeTemplateDirective()?.templateRef ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n edge: edge,\n selected: createSignal(false),\n path: createSignal(''),\n markerStart: createSignal(''),\n markerEnd: createSignal(''),\n },\n }\" />\n\n @if (edge.edgeLabels?.start) {\n <ng-component\n [ngTemplateOutlet]=\"edgeLabelHtmlDirective()?.templateRef ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n edge: edge,\n },\n }\" />\n }\n\n @if (edge.edgeLabels?.center) {\n <ng-component\n [ngTemplateOutlet]=\"edgeLabelHtmlDirective()?.templateRef ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n edge: edge,\n label: edge.edgeLabels?.center,\n },\n }\" />\n }\n\n @if (edge.edgeLabels?.end) {\n <ng-component\n [ngTemplateOutlet]=\"edgeLabelHtmlDirective()?.templateRef ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n edge: edge,\n label: edge.edgeLabels?.end,\n },\n }\" />\n }\n }\n }\n\n @if (connection.type === 'template') {\n <ng-component\n [ngTemplateOutlet]=\"connectionTemplateDirective()?.templateRef ?? null\"\n [ngTemplateOutletContext]=\"{\n $implicit: {\n path: createSignal(''),\n marker: createSignal(''),\n },\n }\" />\n }\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [NgTemplateOutlet],\n})\nexport class VflowMockComponent implements AsInterface<VflowComponent>, OnInit {\n @Input({ required: true })\n public readonly nodes!: Node[] | DynamicNode[];\n\n @Input()\n public readonly edges!: Edge[];\n\n @Input()\n public readonly view: [number, number] | 'auto' = [400, 400];\n\n @Input()\n public readonly minZoom = 0.5;\n\n @Input()\n public readonly maxZoom = 3;\n\n @Input()\n public readonly background: Background | string = '#fff';\n\n @Input()\n public readonly optimization = DEFAULT_OPTIMIZATION;\n\n @Input()\n public readonly entitiesSelectable = true;\n\n @Input()\n public readonly keyboardShortcuts: KeyboardShortcuts = {\n multiSelection: null,\n };\n\n @Input({\n transform: (settings: ConnectionSettings) => new ConnectionModel(settings),\n })\n public readonly connection: ConnectionModel = new ConnectionModel({});\n\n @Input()\n public readonly snapGrid!: [number, number];\n\n @Input()\n public elevateNodesOnSelect!: boolean;\n\n @Input()\n public elevateEdgesOnSelect!: boolean;\n\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n public readonly onComponentNodeEvent = output<any>();\n\n protected nodeTemplateDirective = contentChild(NodeHtmlTemplateMockDirective);\n\n protected groupNodeTemplateDirective = contentChild(GroupNodeTemplateMockDirective);\n\n protected edgeTemplateDirective = contentChild(EdgeTemplateMockDirective);\n\n protected edgeLabelHtmlDirective = contentChild(EdgeLabelHtmlTemplateMockDirective);\n\n protected connectionTemplateDirective = contentChild(ConnectionTemplateMockDirective);\n\n public viewport = signal<ViewportState>({\n x: 0,\n y: 0,\n zoom: 1,\n });\n\n public nodesChange = signal<NodeChange[]>([]);\n public edgesChange = signal<EdgeChange[]>([]);\n\n public viewportChange$ = toObservable(this.viewport);\n\n public nodesChange$ = toObservable(this.nodesChange);\n public edgesChange$ = toObservable(this.edgesChange);\n\n // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method\n public ngOnInit() {}\n\n public viewportTo(viewport: ViewportState): void {\n this.viewport.set(viewport);\n }\n\n public zoomTo(zoom: number): void {\n this.viewport.update((prev) => ({ ...prev, zoom }));\n }\n\n public panTo(point: Point): void {\n this.viewport.update((prev) => ({ ...prev, x: point.x, y: point.y }));\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public fitView(options?: FitViewOptions): void {}\n\n public documentPointToFlowPoint(point: Point, options?: { spaces: false }): Point;\n public documentPointToFlowPoint(point: Point, options: { spaces: true }): SpacePoint[];\n public documentPointToFlowPoint(point: Point, options?: { spaces: boolean }): unknown {\n if (options?.spaces) {\n return [\n {\n nodeId: null,\n x: point.x,\n y: point.y,\n },\n ];\n }\n\n return point;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public getIntesectingNodes(nodeId: string, options?: IntersectingNodesOptions): Node[] | DynamicNode[] {\n return [];\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public toNodeSpace(nodeId: string, spaceNodeId: string): Point {\n return { x: 0, y: 0 };\n }\n\n public getNode<T = unknown>(id: string): Node<T> | DynamicNode<T> | undefined {\n return this.nodes.find((node) => node.id === id);\n }\n\n public getDetachedEdges(): Edge[] {\n return [];\n }\n\n protected createSignal<T>(value: T): WritableSignal<T> {\n return signal(value);\n }\n}\n","import { ChangeDetectionStrategy, Component, input, TemplateRef, OnInit } from '@angular/core';\nimport type { HandleComponent, Position } from 'ngx-vflow';\nimport { AsInterface } from '../types';\n\n@Component({\n selector: 'handle',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class HandleMockComponent implements AsInterface<HandleComponent>, OnInit {\n public position = input.required<Position>();\n public type = input.required<'source' | 'target'>();\n public id = input<string>();\n public template = input<TemplateRef<any> | null>();\n public offsetX = input<number>(0);\n public offsetY = input<number>(0);\n\n // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method\n public ngOnInit(): void {}\n}\n","import { ChangeDetectionStrategy, Component, input, OnInit, AfterViewInit } from '@angular/core';\nimport type { ResizableComponent } from 'ngx-vflow';\nimport { AsInterface } from '../types';\n\n@Component({\n selector: '[resizable]',\n template: '<ng-content />',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ResizableMockComponent implements AsInterface<ResizableComponent>, OnInit, AfterViewInit {\n public resizable = input<boolean | ''>();\n public resizerColor = input('#2e414c');\n public gap = input(1.5);\n\n // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method\n public ngOnInit() {}\n\n // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method\n public ngAfterViewInit() {}\n}\n","import { ChangeDetectionStrategy, Component, input, OnInit } from '@angular/core';\nimport type { MiniMapComponent, MiniMapPosition } from 'ngx-vflow';\nimport { AsInterface } from '../types';\n\n@Component({\n selector: 'mini-map',\n template: '',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MiniMapMockComponent implements AsInterface<MiniMapComponent>, OnInit {\n public maskColor = input(`rgba(215, 215, 215, 0.6)`);\n\n public strokeColor = input(`rgb(200, 200, 200)`);\n\n public position = input<MiniMapPosition>('bottom-right');\n\n public scaleOnHover = input(false);\n\n // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method\n public ngOnInit() {}\n}\n","import { ChangeDetectionStrategy, Component, input, OnInit, OnDestroy } from '@angular/core';\nimport type { Position, NodeToolbarComponent } from 'ngx-vflow';\nimport { AsInterface } from '../types';\n\n@Component({\n selector: 'node-toolbar',\n template: '<ng-content />',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class NodeToolbarMockComponent implements AsInterface<NodeToolbarComponent>, OnInit, OnDestroy {\n public position = input<Position>('top');\n\n // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method\n public ngOnInit() {}\n\n // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method\n public ngOnDestroy() {}\n}\n","import { Directive, output } from '@angular/core';\nimport { Connection, ReconnectionEvent } from 'ngx-vflow';\nimport { AsInterface } from '../types';\nimport type { ConnectionControllerDirective, ɵHandleModel as HandleModel } from 'ngx-vflow';\n\n@Directive({ selector: '[onConnect]', standalone: true })\nexport class ConnectionControllerMockDirective implements AsInterface<ConnectionControllerDirective> {\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n public readonly onConnect = output<Connection>();\n\n // eslint-disable-next-line @angular-eslint/no-output-on-prefix\n public readonly onReconnect = output<ReconnectionEvent>();\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public startConnection(handle: HandleModel): void {}\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public startReconnection(handle: HandleModel): void {}\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public validateConnection(handle: HandleModel): void {}\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public resetValidateConnection(targetHandle: HandleModel): void {}\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n public endConnection(): void {}\n}\n","import { Directive } from '@angular/core';\nimport { AsInterface } from '../types';\nimport type { DragHandleDirective } from 'ngx-vflow';\n\n@Directive({ selector: '[dragHandle]', standalone: true })\nexport class DragHandleMockDirective implements AsInterface<DragHandleDirective> {}\n","import { Directive } from '@angular/core';\nimport { AsInterface } from '../types';\nimport type { SelectableDirective } from 'ngx-vflow';\n\n@Directive({\n selector: '[selectable]',\n standalone: true,\n})\nexport class SelectableMockDirective implements AsInterface<SelectableDirective> {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { AsInterface } from '../types';\nimport type { CustomTemplateEdgeComponent } from 'ngx-vflow';\n\n@Component({\n selector: 'g[customTemplateEdge]',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class CustomTemplateEdgeMockComponent implements AsInterface<CustomTemplateEdgeComponent> {}\n","import { CustomTemplateEdgeMockComponent } from './component-mocks/custom-template-edge-mock.component';\nimport { HandleMockComponent } from './component-mocks/handle-mock.component';\nimport { MiniMapMockComponent } from './component-mocks/minimap-mock.component';\nimport { NodeToolbarMockComponent } from './component-mocks/node-toolbar-mock.component';\nimport { ResizableMockComponent } from './component-mocks/resizable-mock.component';\nimport { VflowMockComponent } from './component-mocks/vflow-mock.component';\nimport { ConnectionControllerMockDirective } from './directive-mocks/connection-controller-mock.directive';\nimport { DragHandleMockDirective } from './directive-mocks/drag-handle-mock.directive';\nimport { SelectableMockDirective } from './directive-mocks/selectable-mock.directive';\nimport {\n ConnectionTemplateMockDirective,\n EdgeLabelHtmlTemplateMockDirective,\n EdgeTemplateMockDirective,\n GroupNodeTemplateMockDirective,\n HandleTemplateMockDirective,\n NodeHtmlTemplateMockDirective,\n} from './directive-mocks/template-mock.directive';\n\nexport const VflowMocks = [\n VflowMockComponent,\n HandleMockComponent,\n ResizableMockComponent,\n SelectableMockDirective,\n MiniMapMockComponent,\n NodeToolbarMockComponent,\n DragHandleMockDirective,\n ConnectionControllerMockDirective,\n CustomTemplateEdgeMockComponent,\n\n NodeHtmlTemplateMockDirective,\n GroupNodeTemplateMockDirective,\n EdgeLabelHtmlTemplateMockDirective,\n EdgeTemplateMockDirective,\n ConnectionTemplateMockDirective,\n HandleTemplateMockDirective,\n] as const;\n","// Testing\nexport * from './provide-custom-node-mocks';\nexport * from './component-mocks/vflow-mock.component';\nexport * from './component-mocks/handle-mock.component';\nexport * from './component-mocks/resizable-mock.component';\nexport * from './component-mocks/minimap-mock.component';\nexport * from './component-mocks/node-toolbar-mock.component';\nexport * from './directive-mocks/connection-controller-mock.directive';\nexport * from './directive-mocks/drag-handle-mock.directive';\nexport * from './directive-mocks/selectable-mock.directive';\nexport * from './directive-mocks/template-mock.directive';\nexport * from './vflow-mocks';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["NodeModel","ComponentEventBusService","NodeAccessorService","FlowEntitiesService","HandleService","RootPointerDirective","SpacePointContextDirective","SelectionService","FlowSettingsService","ViewportService","ConnectionModel"],"mappings":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;IAClC,yBAAyB;IACzB,+BAA+B;IAC/B,2BAA2B;;;AClC7B;;ACAA;;AAEG;;;;"}
@@ -1541,17 +1541,22 @@ class EdgeModel {
1541
1541
  });
1542
1542
  this.sourceHandle = extendedComputed((previousHandle) => {
1543
1543
  let handle = null;
1544
- if (this.edge.sourceHandle) {
1545
- handle =
1546
- this.source()
1547
- ?.handles()
1548
- .find((handle) => handle.rawHandle.id === this.edge.sourceHandle) ?? null;
1544
+ if (this.floating) {
1545
+ handle = this.closestHandles().sourceHandle;
1549
1546
  }
1550
1547
  else {
1551
- handle =
1552
- this.source()
1553
- ?.handles()
1554
- .find((handle) => handle.rawHandle.type === 'source') ?? null;
1548
+ if (this.edge.sourceHandle) {
1549
+ handle =
1550
+ this.source()
1551
+ ?.handles()
1552
+ .find((handle) => handle.rawHandle.id === this.edge.sourceHandle) ?? null;
1553
+ }
1554
+ else {
1555
+ handle =
1556
+ this.source()
1557
+ ?.handles()
1558
+ .find((handle) => handle.rawHandle.type === 'source') ?? null;
1559
+ }
1555
1560
  }
1556
1561
  // In case of virtual scrolling, if the node is scrolled out of view the handle may disappear
1557
1562
  // which could lead to the edge not being rendered
@@ -1564,17 +1569,22 @@ class EdgeModel {
1564
1569
  });
1565
1570
  this.targetHandle = extendedComputed((previousHandle) => {
1566
1571
  let handle = null;
1567
- if (this.edge.targetHandle) {
1568
- handle =
1569
- this.target()
1570
- ?.handles()
1571
- .find((handle) => handle.rawHandle.id === this.edge.targetHandle) ?? null;
1572
+ if (this.floating) {
1573
+ handle = this.closestHandles().targetHandle;
1572
1574
  }
1573
1575
  else {
1574
- handle =
1575
- this.target()
1576
- ?.handles()
1577
- .find((handle) => handle.rawHandle.type === 'target') ?? null;
1576
+ if (this.edge.targetHandle) {
1577
+ handle =
1578
+ this.target()
1579
+ ?.handles()
1580
+ .find((handle) => handle.rawHandle.id === this.edge.targetHandle) ?? null;
1581
+ }
1582
+ else {
1583
+ handle =
1584
+ this.target()
1585
+ ?.handles()
1586
+ .find((handle) => handle.rawHandle.type === 'target') ?? null;
1587
+ }
1578
1588
  }
1579
1589
  // In case of virtual scrolling, if the node is scrolled out of view the handle may disappear
1580
1590
  // which could lead to the edge not being rendered
@@ -1585,6 +1595,44 @@ class EdgeModel {
1585
1595
  }
1586
1596
  return handle;
1587
1597
  });
1598
+ this.closestHandles = computed(() => {
1599
+ const source = this.source();
1600
+ const target = this.target();
1601
+ if (!source || !target) {
1602
+ return { sourceHandle: null, targetHandle: null };
1603
+ }
1604
+ // Get all source handles from source node
1605
+ const sourceHandles = this.flowEntitiesService.connection().mode === 'strict'
1606
+ ? source.handles().filter((h) => h.rawHandle.type === 'source')
1607
+ : source.handles();
1608
+ // Get all target handles from target node
1609
+ const targetHandles = this.flowEntitiesService.connection().mode === 'strict'
1610
+ ? target.handles().filter((h) => h.rawHandle.type === 'target')
1611
+ : target.handles();
1612
+ if (sourceHandles.length === 0 || targetHandles.length === 0) {
1613
+ return { sourceHandle: null, targetHandle: null };
1614
+ }
1615
+ let minDistance = Infinity;
1616
+ let closestSourceHandle = null;
1617
+ let closestTargetHandle = null;
1618
+ // Check all combinations of source and target handles
1619
+ for (const sourceHandle of sourceHandles) {
1620
+ for (const targetHandle of targetHandles) {
1621
+ const sourcePoint = sourceHandle.pointAbsolute();
1622
+ const targetPoint = targetHandle.pointAbsolute();
1623
+ const distance = Math.sqrt(Math.pow(sourcePoint.x - targetPoint.x, 2) + Math.pow(sourcePoint.y - targetPoint.y, 2));
1624
+ if (distance < minDistance) {
1625
+ minDistance = distance;
1626
+ closestSourceHandle = sourceHandle;
1627
+ closestTargetHandle = targetHandle;
1628
+ }
1629
+ }
1630
+ }
1631
+ return {
1632
+ sourceHandle: closestSourceHandle,
1633
+ targetHandle: closestTargetHandle,
1634
+ };
1635
+ });
1588
1636
  /**
1589
1637
  * TODO: not reactive
1590
1638
  */
@@ -1613,6 +1661,7 @@ class EdgeModel {
1613
1661
  this.type = edge.type ?? 'default';
1614
1662
  this.curve = edge.curve ?? 'bezier';
1615
1663
  this.reconnectable = edge.reconnectable ?? false;
1664
+ this.floating = edge.floating ?? false;
1616
1665
  if (edge.edgeLabels?.start)
1617
1666
  this.edgeLabels.start = new EdgeLabelModel(edge.edgeLabels.start);
1618
1667
  if (edge.edgeLabels?.center)
@@ -2084,7 +2133,7 @@ class SpacePointContextDirective {
2084
2133
  y: movement.y,
2085
2134
  });
2086
2135
  });
2087
- this.pointerMovement = toLazySignal(this.pointerMovementDirective.pointerMovement$);
2136
+ this.pointerMovement = toSignal(this.pointerMovementDirective.pointerMovement$);
2088
2137
  }
2089
2138
  documentPointToFlowPoint(documentPoint) {
2090
2139
  const point = this.rootSvg.createSVGPoint();
@@ -2916,23 +2965,23 @@ class HandleModel {
2916
2965
  switch (this.rawHandle.position) {
2917
2966
  case 'left':
2918
2967
  return {
2919
- x: 0,
2920
- y: this.hostPosition().y + this.hostSize().height / 2,
2968
+ x: -this.rawHandle.userOffsetX,
2969
+ y: -this.rawHandle.userOffsetY + this.hostPosition().y + this.hostSize().height / 2,
2921
2970
  };
2922
2971
  case 'right':
2923
2972
  return {
2924
- x: this.parentNode.size().width,
2925
- y: this.hostPosition().y + this.hostSize().height / 2,
2973
+ x: -this.rawHandle.userOffsetX + this.parentNode.size().width,
2974
+ y: -this.rawHandle.userOffsetY + this.hostPosition().y + this.hostSize().height / 2,
2926
2975
  };
2927
2976
  case 'top':
2928
2977
  return {
2929
- x: this.hostPosition().x + this.hostSize().width / 2,
2930
- y: 0,
2978
+ x: -this.rawHandle.userOffsetX + this.hostPosition().x + this.hostSize().width / 2,
2979
+ y: -this.rawHandle.userOffsetY,
2931
2980
  };
2932
2981
  case 'bottom':
2933
2982
  return {
2934
- x: this.hostPosition().x + this.hostSize().width / 2,
2935
- y: this.parentNode.size().height,
2983
+ x: -this.rawHandle.userOffsetX + this.hostPosition().x + this.hostSize().width / 2,
2984
+ y: -this.rawHandle.userOffsetY + this.parentNode.size().height,
2936
2985
  };
2937
2986
  }
2938
2987
  });
@@ -2994,6 +3043,8 @@ class HandleComponent {
2994
3043
  */
2995
3044
  this.id = input();
2996
3045
  this.template = input();
3046
+ this.offsetX = input(0);
3047
+ this.offsetY = input(0);
2997
3048
  }
2998
3049
  ngOnInit() {
2999
3050
  runInInjectionContext(this.injector, () => {
@@ -3005,6 +3056,8 @@ class HandleComponent {
3005
3056
  id: this.id(),
3006
3057
  hostReference: this.element.parentElement,
3007
3058
  template: this.template(),
3059
+ userOffsetX: this.offsetX(),
3060
+ userOffsetY: this.offsetY(),
3008
3061
  }, node);
3009
3062
  this.handleService.createHandle(model);
3010
3063
  requestAnimationFrame(() => model.updateHost());
@@ -3013,7 +3066,7 @@ class HandleComponent {
3013
3066
  });
3014
3067
  }
3015
3068
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3016
- 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 }); }
3069
+ 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 }, offsetX: { classPropertyName: "offsetX", publicName: "offsetX", isSignal: true, isRequired: false, transformFunction: null }, offsetY: { classPropertyName: "offsetY", publicName: "offsetY", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3017
3070
  }
3018
3071
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleComponent, decorators: [{
3019
3072
  type: Component,
@@ -3145,7 +3198,7 @@ class NodeComponent {
3145
3198
  }
3146
3199
  }
3147
3200
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3148
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: NodeComponent, isStandalone: true, selector: "g[node]", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: true, transformFunction: null }, nodeTemplate: { classPropertyName: "nodeTemplate", publicName: "nodeTemplate", isSignal: true, isRequired: false, transformFunction: null }, nodeSvgTemplate: { classPropertyName: "nodeSvgTemplate", publicName: "nodeSvgTemplate", isSignal: true, isRequired: false, transformFunction: null }, groupNodeTemplate: { classPropertyName: "groupNodeTemplate", publicName: "groupNodeTemplate", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "vflow-node" }, providers: [HandleService, NodeAccessorService], ngImport: i0, template: "<!-- Default node -->\n@if (model().rawNode.type === 'default') {\n <svg:foreignObject\n class=\"selectable\"\n [attr.width]=\"model().foWidth()\"\n [attr.height]=\"model().foHeight()\"\n (click)=\"pullNode(); selectNode()\">\n <default-node\n nodeHandlesController\n [selected]=\"model().selected()\"\n [style.width]=\"model().styleWidth()\"\n [style.height]=\"model().styleHeight()\"\n [style.max-width]=\"model().styleWidth()\"\n [style.max-height]=\"model().styleHeight()\">\n <div [outerHTML]=\"model().text()\"></div>\n\n <handle type=\"source\" position=\"right\" />\n <handle type=\"target\" position=\"left\" />\n </default-node>\n </svg:foreignObject>\n}\n\n<!-- HTML Template node -->\n@if (model().rawNode.type === 'html-template' && nodeTemplate()) {\n <svg:foreignObject\n class=\"selectable\"\n [attr.width]=\"model().foWidth()\"\n [attr.height]=\"model().foHeight()\"\n (click)=\"pullNode()\">\n <div\n nodeHandlesController\n nodeResizeController\n class=\"wrapper\"\n [style.width]=\"model().styleWidth()\"\n [style.height]=\"model().styleHeight()\">\n <ng-container\n [ngTemplateOutlet]=\"nodeTemplate() ?? null\"\n [ngTemplateOutletContext]=\"model().context\"\n [ngTemplateOutletInjector]=\"injector\" />\n </div>\n </svg:foreignObject>\n}\n\n<!-- SVG Template node -->\n@if (model().rawNode.type === 'svg-template' && nodeSvgTemplate()) {\n <svg:g class=\"selectable\" nodeHandlesController (click)=\"pullNode()\">\n <ng-container\n [ngTemplateOutlet]=\"nodeSvgTemplate() ?? null\"\n [ngTemplateOutletContext]=\"model().context\"\n [ngTemplateOutletInjector]=\"injector\" />\n </svg:g>\n}\n\n<!-- Component node -->\n@if (model().isComponentType) {\n <svg:foreignObject\n class=\"selectable\"\n [attr.width]=\"model().foWidth()\"\n [attr.height]=\"model().foHeight()\"\n (click)=\"pullNode()\">\n <div\n nodeHandlesController\n nodeResizeController\n class=\"wrapper\"\n [style.width]=\"model().styleWidth()\"\n [style.height]=\"model().styleHeight()\">\n <ng-container\n [ngComponentOutlet]=\"$any(model().rawNode.type)\"\n [ngComponentOutletInputs]=\"model().componentTypeInputs\"\n [ngComponentOutletInjector]=\"injector\" />\n </div>\n </svg:foreignObject>\n}\n\n<!-- Default group node -->\n@if (model().rawNode.type === 'default-group') {\n <svg:rect\n class=\"default-group-node\"\n rx=\"5\"\n ry=\"5\"\n [resizable]=\"model().resizable()\"\n [gap]=\"3\"\n [resizerColor]=\"model().color()\"\n [class.default-group-node_selected]=\"model().selected()\"\n [attr.width]=\"model().size().width\"\n [attr.height]=\"model().size().height\"\n [style.stroke]=\"model().color()\"\n [style.fill]=\"model().color()\"\n (click)=\"pullNode(); selectNode()\" />\n}\n\n<!-- Template group node -->\n@if (model().rawNode.type === 'template-group' && groupNodeTemplate()) {\n <svg:g class=\"selectable\" nodeHandlesController (click)=\"pullNode()\">\n <ng-container\n [ngTemplateOutlet]=\"groupNodeTemplate() ?? null\"\n [ngTemplateOutletContext]=\"model().context\"\n [ngTemplateOutletInjector]=\"injector\" />\n </svg:g>\n}\n\n<!-- Resizer -->\n@if (model().resizerTemplate(); as template) {\n @if (model().resizable()) {\n <ng-template [ngTemplateOutlet]=\"template\" />\n }\n}\n\n<!-- Handles -->\n@for (handle of model().handles(); track handle) {\n @if (!handle.template) {\n <svg:circle\n class=\"default-handle\"\n r=\"5\"\n [attr.cx]=\"handle.hostOffset().x\"\n [attr.cy]=\"handle.hostOffset().y\"\n [attr.stroke-width]=\"handle.strokeWidth\"\n (pointerStart)=\"startConnection($event, handle)\"\n (pointerEnd)=\"endConnection()\" />\n }\n\n @if (handle.template) {\n <svg:g\n [handleSizeController]=\"handle\"\n (pointerStart)=\"startConnection($event, handle)\"\n (pointerEnd)=\"endConnection()\">\n <ng-container *ngTemplateOutlet=\"handle.template; context: handle.templateContext\" />\n </svg:g>\n }\n\n @if (showMagnet()) {\n <svg:circle\n class=\"magnet\"\n [attr.r]=\"model().magnetRadius\"\n [attr.cx]=\"handle.hostOffset().x\"\n [attr.cy]=\"handle.hostOffset().y\"\n (pointerEnd)=\"endConnection(); resetValidateConnection(handle)\"\n (pointerOver)=\"validateConnection(handle)\"\n (pointerOut)=\"resetValidateConnection(handle)\" />\n }\n}\n\n<!-- Toolbar -->\n@for (toolbar of toolbars(); track toolbar) {\n <svg:foreignObject\n [attr.width]=\"toolbar.size().width\"\n [attr.height]=\"toolbar.size().height\"\n [attr.transform]=\"toolbar.transform()\">\n <ng-container [ngTemplateOutlet]=\"toolbar.template()\" />\n </svg:foreignObject>\n}\n", styles: [".magnet{opacity:0}.wrapper{display:table-cell}.default-group-node{stroke-width:1.5px;fill-opacity:.05}.default-group-node_selected{stroke-width:2px}.default-handle{stroke:#fff;fill:#1b262c}\n"], dependencies: [{ kind: "directive", type: PointerDirective, selector: "[pointerStart], [pointerEnd], [pointerOver], [pointerOut]", outputs: ["pointerOver", "pointerOut", "pointerStart", "pointerEnd"] }, { kind: "component", type: DefaultNodeComponent, selector: "default-node", inputs: ["selected"] }, { kind: "component", type: HandleComponent, selector: "handle", inputs: ["position", "type", "id", "template"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "component", type: ResizableComponent, selector: "[resizable]", inputs: ["resizable", "resizerColor", "gap"] }, { kind: "directive", type: HandleSizeControllerDirective, selector: "[handleSizeController]", inputs: ["handleSizeController"] }, { kind: "directive", type: NodeHandlesControllerDirective, selector: "[nodeHandlesController]" }, { kind: "directive", type: NodeResizeControllerDirective, selector: "[nodeResizeController]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3201
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: NodeComponent, isStandalone: true, selector: "g[node]", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: true, transformFunction: null }, nodeTemplate: { classPropertyName: "nodeTemplate", publicName: "nodeTemplate", isSignal: true, isRequired: false, transformFunction: null }, nodeSvgTemplate: { classPropertyName: "nodeSvgTemplate", publicName: "nodeSvgTemplate", isSignal: true, isRequired: false, transformFunction: null }, groupNodeTemplate: { classPropertyName: "groupNodeTemplate", publicName: "groupNodeTemplate", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "vflow-node" }, providers: [HandleService, NodeAccessorService], ngImport: i0, template: "<!-- Default node -->\n@if (model().rawNode.type === 'default') {\n <svg:foreignObject\n class=\"selectable\"\n [attr.width]=\"model().foWidth()\"\n [attr.height]=\"model().foHeight()\"\n (click)=\"pullNode(); selectNode()\">\n <default-node\n nodeHandlesController\n [selected]=\"model().selected()\"\n [style.width]=\"model().styleWidth()\"\n [style.height]=\"model().styleHeight()\"\n [style.max-width]=\"model().styleWidth()\"\n [style.max-height]=\"model().styleHeight()\">\n <div [outerHTML]=\"model().text()\"></div>\n\n <handle type=\"source\" position=\"right\" />\n <handle type=\"target\" position=\"left\" />\n </default-node>\n </svg:foreignObject>\n}\n\n<!-- HTML Template node -->\n@if (model().rawNode.type === 'html-template' && nodeTemplate()) {\n <svg:foreignObject\n class=\"selectable\"\n [attr.width]=\"model().foWidth()\"\n [attr.height]=\"model().foHeight()\"\n (click)=\"pullNode()\">\n <div nodeHandlesController nodeResizeController class=\"wrapper\" [style.width]=\"model().styleWidth()\">\n <ng-container\n [ngTemplateOutlet]=\"nodeTemplate() ?? null\"\n [ngTemplateOutletContext]=\"model().context\"\n [ngTemplateOutletInjector]=\"injector\" />\n </div>\n </svg:foreignObject>\n}\n\n<!-- SVG Template node -->\n@if (model().rawNode.type === 'svg-template' && nodeSvgTemplate()) {\n <svg:g class=\"selectable\" nodeHandlesController (click)=\"pullNode()\">\n <ng-container\n [ngTemplateOutlet]=\"nodeSvgTemplate() ?? null\"\n [ngTemplateOutletContext]=\"model().context\"\n [ngTemplateOutletInjector]=\"injector\" />\n </svg:g>\n}\n\n<!-- Component node -->\n@if (model().isComponentType) {\n <svg:foreignObject\n class=\"selectable\"\n [attr.width]=\"model().foWidth()\"\n [attr.height]=\"model().foHeight()\"\n (click)=\"pullNode()\">\n <div nodeHandlesController nodeResizeController class=\"wrapper\" [style.width]=\"model().styleWidth()\">\n <ng-container\n [ngComponentOutlet]=\"$any(model().rawNode.type)\"\n [ngComponentOutletInputs]=\"model().componentTypeInputs\"\n [ngComponentOutletInjector]=\"injector\" />\n </div>\n </svg:foreignObject>\n}\n\n<!-- Default group node -->\n@if (model().rawNode.type === 'default-group') {\n <svg:rect\n class=\"default-group-node\"\n rx=\"5\"\n ry=\"5\"\n [resizable]=\"model().resizable()\"\n [gap]=\"3\"\n [resizerColor]=\"model().color()\"\n [class.default-group-node_selected]=\"model().selected()\"\n [attr.width]=\"model().size().width\"\n [attr.height]=\"model().size().height\"\n [style.stroke]=\"model().color()\"\n [style.fill]=\"model().color()\"\n (click)=\"pullNode(); selectNode()\" />\n}\n\n<!-- Template group node -->\n@if (model().rawNode.type === 'template-group' && groupNodeTemplate()) {\n <svg:g class=\"selectable\" nodeHandlesController (click)=\"pullNode()\">\n <ng-container\n [ngTemplateOutlet]=\"groupNodeTemplate() ?? null\"\n [ngTemplateOutletContext]=\"model().context\"\n [ngTemplateOutletInjector]=\"injector\" />\n </svg:g>\n}\n\n<!-- Resizer -->\n@if (model().resizerTemplate(); as template) {\n @if (model().resizable()) {\n <ng-template [ngTemplateOutlet]=\"template\" />\n }\n}\n\n<!-- Handles -->\n@for (handle of model().handles(); track handle) {\n @if (handle.template === undefined) {\n <svg:circle\n class=\"default-handle\"\n r=\"5\"\n [attr.cx]=\"handle.hostOffset().x\"\n [attr.cy]=\"handle.hostOffset().y\"\n [attr.stroke-width]=\"handle.strokeWidth\"\n (pointerStart)=\"startConnection($event, handle)\"\n (pointerEnd)=\"endConnection()\" />\n }\n\n @if (handle.template === null) {\n <svg:g\n [handleSizeController]=\"handle\"\n (pointerStart)=\"startConnection($event, handle)\"\n (pointerEnd)=\"endConnection()\" />\n }\n\n @if (handle.template) {\n <svg:g\n [handleSizeController]=\"handle\"\n (pointerStart)=\"startConnection($event, handle)\"\n (pointerEnd)=\"endConnection()\">\n <ng-container *ngTemplateOutlet=\"handle.template; context: handle.templateContext\" />\n </svg:g>\n }\n\n @if (showMagnet()) {\n <svg:circle\n class=\"magnet\"\n [attr.r]=\"model().magnetRadius\"\n [attr.cx]=\"handle.hostOffset().x\"\n [attr.cy]=\"handle.hostOffset().y\"\n (pointerEnd)=\"endConnection(); resetValidateConnection(handle)\"\n (pointerOver)=\"validateConnection(handle)\"\n (pointerOut)=\"resetValidateConnection(handle)\" />\n }\n}\n\n<!-- Toolbar -->\n@for (toolbar of toolbars(); track toolbar) {\n <svg:foreignObject\n [attr.width]=\"toolbar.size().width\"\n [attr.height]=\"toolbar.size().height\"\n [attr.transform]=\"toolbar.transform()\">\n <ng-container [ngTemplateOutlet]=\"toolbar.template()\" />\n </svg:foreignObject>\n}\n", styles: [".magnet{opacity:0}.wrapper{display:table-cell}.default-group-node{stroke-width:1.5px;fill-opacity:.05}.default-group-node_selected{stroke-width:2px}.default-handle{stroke:#fff;fill:#1b262c}\n"], dependencies: [{ kind: "directive", type: PointerDirective, selector: "[pointerStart], [pointerEnd], [pointerOver], [pointerOut]", outputs: ["pointerOver", "pointerOut", "pointerStart", "pointerEnd"] }, { kind: "component", type: DefaultNodeComponent, selector: "default-node", inputs: ["selected"] }, { kind: "component", type: HandleComponent, selector: "handle", inputs: ["position", "type", "id", "template", "offsetX", "offsetY"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"] }, { kind: "component", type: ResizableComponent, selector: "[resizable]", inputs: ["resizable", "resizerColor", "gap"] }, { kind: "directive", type: HandleSizeControllerDirective, selector: "[handleSizeController]", inputs: ["handleSizeController"] }, { kind: "directive", type: NodeHandlesControllerDirective, selector: "[nodeHandlesController]" }, { kind: "directive", type: NodeResizeControllerDirective, selector: "[nodeResizeController]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
3149
3202
  }
3150
3203
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeComponent, decorators: [{
3151
3204
  type: Component,
@@ -3161,7 +3214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
3161
3214
  HandleSizeControllerDirective,
3162
3215
  NodeHandlesControllerDirective,
3163
3216
  NodeResizeControllerDirective,
3164
- ], template: "<!-- Default node -->\n@if (model().rawNode.type === 'default') {\n <svg:foreignObject\n class=\"selectable\"\n [attr.width]=\"model().foWidth()\"\n [attr.height]=\"model().foHeight()\"\n (click)=\"pullNode(); selectNode()\">\n <default-node\n nodeHandlesController\n [selected]=\"model().selected()\"\n [style.width]=\"model().styleWidth()\"\n [style.height]=\"model().styleHeight()\"\n [style.max-width]=\"model().styleWidth()\"\n [style.max-height]=\"model().styleHeight()\">\n <div [outerHTML]=\"model().text()\"></div>\n\n <handle type=\"source\" position=\"right\" />\n <handle type=\"target\" position=\"left\" />\n </default-node>\n </svg:foreignObject>\n}\n\n<!-- HTML Template node -->\n@if (model().rawNode.type === 'html-template' && nodeTemplate()) {\n <svg:foreignObject\n class=\"selectable\"\n [attr.width]=\"model().foWidth()\"\n [attr.height]=\"model().foHeight()\"\n (click)=\"pullNode()\">\n <div\n nodeHandlesController\n nodeResizeController\n class=\"wrapper\"\n [style.width]=\"model().styleWidth()\"\n [style.height]=\"model().styleHeight()\">\n <ng-container\n [ngTemplateOutlet]=\"nodeTemplate() ?? null\"\n [ngTemplateOutletContext]=\"model().context\"\n [ngTemplateOutletInjector]=\"injector\" />\n </div>\n </svg:foreignObject>\n}\n\n<!-- SVG Template node -->\n@if (model().rawNode.type === 'svg-template' && nodeSvgTemplate()) {\n <svg:g class=\"selectable\" nodeHandlesController (click)=\"pullNode()\">\n <ng-container\n [ngTemplateOutlet]=\"nodeSvgTemplate() ?? null\"\n [ngTemplateOutletContext]=\"model().context\"\n [ngTemplateOutletInjector]=\"injector\" />\n </svg:g>\n}\n\n<!-- Component node -->\n@if (model().isComponentType) {\n <svg:foreignObject\n class=\"selectable\"\n [attr.width]=\"model().foWidth()\"\n [attr.height]=\"model().foHeight()\"\n (click)=\"pullNode()\">\n <div\n nodeHandlesController\n nodeResizeController\n class=\"wrapper\"\n [style.width]=\"model().styleWidth()\"\n [style.height]=\"model().styleHeight()\">\n <ng-container\n [ngComponentOutlet]=\"$any(model().rawNode.type)\"\n [ngComponentOutletInputs]=\"model().componentTypeInputs\"\n [ngComponentOutletInjector]=\"injector\" />\n </div>\n </svg:foreignObject>\n}\n\n<!-- Default group node -->\n@if (model().rawNode.type === 'default-group') {\n <svg:rect\n class=\"default-group-node\"\n rx=\"5\"\n ry=\"5\"\n [resizable]=\"model().resizable()\"\n [gap]=\"3\"\n [resizerColor]=\"model().color()\"\n [class.default-group-node_selected]=\"model().selected()\"\n [attr.width]=\"model().size().width\"\n [attr.height]=\"model().size().height\"\n [style.stroke]=\"model().color()\"\n [style.fill]=\"model().color()\"\n (click)=\"pullNode(); selectNode()\" />\n}\n\n<!-- Template group node -->\n@if (model().rawNode.type === 'template-group' && groupNodeTemplate()) {\n <svg:g class=\"selectable\" nodeHandlesController (click)=\"pullNode()\">\n <ng-container\n [ngTemplateOutlet]=\"groupNodeTemplate() ?? null\"\n [ngTemplateOutletContext]=\"model().context\"\n [ngTemplateOutletInjector]=\"injector\" />\n </svg:g>\n}\n\n<!-- Resizer -->\n@if (model().resizerTemplate(); as template) {\n @if (model().resizable()) {\n <ng-template [ngTemplateOutlet]=\"template\" />\n }\n}\n\n<!-- Handles -->\n@for (handle of model().handles(); track handle) {\n @if (!handle.template) {\n <svg:circle\n class=\"default-handle\"\n r=\"5\"\n [attr.cx]=\"handle.hostOffset().x\"\n [attr.cy]=\"handle.hostOffset().y\"\n [attr.stroke-width]=\"handle.strokeWidth\"\n (pointerStart)=\"startConnection($event, handle)\"\n (pointerEnd)=\"endConnection()\" />\n }\n\n @if (handle.template) {\n <svg:g\n [handleSizeController]=\"handle\"\n (pointerStart)=\"startConnection($event, handle)\"\n (pointerEnd)=\"endConnection()\">\n <ng-container *ngTemplateOutlet=\"handle.template; context: handle.templateContext\" />\n </svg:g>\n }\n\n @if (showMagnet()) {\n <svg:circle\n class=\"magnet\"\n [attr.r]=\"model().magnetRadius\"\n [attr.cx]=\"handle.hostOffset().x\"\n [attr.cy]=\"handle.hostOffset().y\"\n (pointerEnd)=\"endConnection(); resetValidateConnection(handle)\"\n (pointerOver)=\"validateConnection(handle)\"\n (pointerOut)=\"resetValidateConnection(handle)\" />\n }\n}\n\n<!-- Toolbar -->\n@for (toolbar of toolbars(); track toolbar) {\n <svg:foreignObject\n [attr.width]=\"toolbar.size().width\"\n [attr.height]=\"toolbar.size().height\"\n [attr.transform]=\"toolbar.transform()\">\n <ng-container [ngTemplateOutlet]=\"toolbar.template()\" />\n </svg:foreignObject>\n}\n", styles: [".magnet{opacity:0}.wrapper{display:table-cell}.default-group-node{stroke-width:1.5px;fill-opacity:.05}.default-group-node_selected{stroke-width:2px}.default-handle{stroke:#fff;fill:#1b262c}\n"] }]
3217
+ ], template: "<!-- Default node -->\n@if (model().rawNode.type === 'default') {\n <svg:foreignObject\n class=\"selectable\"\n [attr.width]=\"model().foWidth()\"\n [attr.height]=\"model().foHeight()\"\n (click)=\"pullNode(); selectNode()\">\n <default-node\n nodeHandlesController\n [selected]=\"model().selected()\"\n [style.width]=\"model().styleWidth()\"\n [style.height]=\"model().styleHeight()\"\n [style.max-width]=\"model().styleWidth()\"\n [style.max-height]=\"model().styleHeight()\">\n <div [outerHTML]=\"model().text()\"></div>\n\n <handle type=\"source\" position=\"right\" />\n <handle type=\"target\" position=\"left\" />\n </default-node>\n </svg:foreignObject>\n}\n\n<!-- HTML Template node -->\n@if (model().rawNode.type === 'html-template' && nodeTemplate()) {\n <svg:foreignObject\n class=\"selectable\"\n [attr.width]=\"model().foWidth()\"\n [attr.height]=\"model().foHeight()\"\n (click)=\"pullNode()\">\n <div nodeHandlesController nodeResizeController class=\"wrapper\" [style.width]=\"model().styleWidth()\">\n <ng-container\n [ngTemplateOutlet]=\"nodeTemplate() ?? null\"\n [ngTemplateOutletContext]=\"model().context\"\n [ngTemplateOutletInjector]=\"injector\" />\n </div>\n </svg:foreignObject>\n}\n\n<!-- SVG Template node -->\n@if (model().rawNode.type === 'svg-template' && nodeSvgTemplate()) {\n <svg:g class=\"selectable\" nodeHandlesController (click)=\"pullNode()\">\n <ng-container\n [ngTemplateOutlet]=\"nodeSvgTemplate() ?? null\"\n [ngTemplateOutletContext]=\"model().context\"\n [ngTemplateOutletInjector]=\"injector\" />\n </svg:g>\n}\n\n<!-- Component node -->\n@if (model().isComponentType) {\n <svg:foreignObject\n class=\"selectable\"\n [attr.width]=\"model().foWidth()\"\n [attr.height]=\"model().foHeight()\"\n (click)=\"pullNode()\">\n <div nodeHandlesController nodeResizeController class=\"wrapper\" [style.width]=\"model().styleWidth()\">\n <ng-container\n [ngComponentOutlet]=\"$any(model().rawNode.type)\"\n [ngComponentOutletInputs]=\"model().componentTypeInputs\"\n [ngComponentOutletInjector]=\"injector\" />\n </div>\n </svg:foreignObject>\n}\n\n<!-- Default group node -->\n@if (model().rawNode.type === 'default-group') {\n <svg:rect\n class=\"default-group-node\"\n rx=\"5\"\n ry=\"5\"\n [resizable]=\"model().resizable()\"\n [gap]=\"3\"\n [resizerColor]=\"model().color()\"\n [class.default-group-node_selected]=\"model().selected()\"\n [attr.width]=\"model().size().width\"\n [attr.height]=\"model().size().height\"\n [style.stroke]=\"model().color()\"\n [style.fill]=\"model().color()\"\n (click)=\"pullNode(); selectNode()\" />\n}\n\n<!-- Template group node -->\n@if (model().rawNode.type === 'template-group' && groupNodeTemplate()) {\n <svg:g class=\"selectable\" nodeHandlesController (click)=\"pullNode()\">\n <ng-container\n [ngTemplateOutlet]=\"groupNodeTemplate() ?? null\"\n [ngTemplateOutletContext]=\"model().context\"\n [ngTemplateOutletInjector]=\"injector\" />\n </svg:g>\n}\n\n<!-- Resizer -->\n@if (model().resizerTemplate(); as template) {\n @if (model().resizable()) {\n <ng-template [ngTemplateOutlet]=\"template\" />\n }\n}\n\n<!-- Handles -->\n@for (handle of model().handles(); track handle) {\n @if (handle.template === undefined) {\n <svg:circle\n class=\"default-handle\"\n r=\"5\"\n [attr.cx]=\"handle.hostOffset().x\"\n [attr.cy]=\"handle.hostOffset().y\"\n [attr.stroke-width]=\"handle.strokeWidth\"\n (pointerStart)=\"startConnection($event, handle)\"\n (pointerEnd)=\"endConnection()\" />\n }\n\n @if (handle.template === null) {\n <svg:g\n [handleSizeController]=\"handle\"\n (pointerStart)=\"startConnection($event, handle)\"\n (pointerEnd)=\"endConnection()\" />\n }\n\n @if (handle.template) {\n <svg:g\n [handleSizeController]=\"handle\"\n (pointerStart)=\"startConnection($event, handle)\"\n (pointerEnd)=\"endConnection()\">\n <ng-container *ngTemplateOutlet=\"handle.template; context: handle.templateContext\" />\n </svg:g>\n }\n\n @if (showMagnet()) {\n <svg:circle\n class=\"magnet\"\n [attr.r]=\"model().magnetRadius\"\n [attr.cx]=\"handle.hostOffset().x\"\n [attr.cy]=\"handle.hostOffset().y\"\n (pointerEnd)=\"endConnection(); resetValidateConnection(handle)\"\n (pointerOver)=\"validateConnection(handle)\"\n (pointerOut)=\"resetValidateConnection(handle)\" />\n }\n}\n\n<!-- Toolbar -->\n@for (toolbar of toolbars(); track toolbar) {\n <svg:foreignObject\n [attr.width]=\"toolbar.size().width\"\n [attr.height]=\"toolbar.size().height\"\n [attr.transform]=\"toolbar.transform()\">\n <ng-container [ngTemplateOutlet]=\"toolbar.template()\" />\n </svg:foreignObject>\n}\n", styles: [".magnet{opacity:0}.wrapper{display:table-cell}.default-group-node{stroke-width:1.5px;fill-opacity:.05}.default-group-node_selected{stroke-width:2px}.default-handle{stroke:#fff;fill:#1b262c}\n"] }]
3165
3218
  }] });
3166
3219
 
3167
3220
  class ConnectionComponent {