ngx-vflow 1.8.2 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/vflow/components/connection/connection.component.mjs +33 -13
- package/esm2022/lib/vflow/components/edge/edge.component.mjs +3 -3
- package/esm2022/lib/vflow/components/vflow/vflow.component.mjs +12 -8
- package/esm2022/lib/vflow/interfaces/curve-factory.interface.mjs +2 -0
- package/esm2022/lib/vflow/interfaces/edge.interface.mjs +1 -1
- package/esm2022/lib/vflow/math/edge-path/bezier-path.mjs +12 -14
- package/esm2022/lib/vflow/math/edge-path/smooth-step-path.mjs +5 -5
- package/esm2022/lib/vflow/math/edge-path/straigh-path.mjs +7 -9
- package/esm2022/lib/vflow/models/edge.model.mjs +24 -8
- package/esm2022/lib/vflow/services/edge-rendering.service.mjs +3 -1
- package/esm2022/lib/vflow/services/flow-entities.service.mjs +3 -1
- package/esm2022/lib/vflow/services/node-rendering.service.mjs +5 -1
- package/esm2022/lib/vflow/utils/entities-per-frame.mjs +2 -0
- package/esm2022/public-api.mjs +15 -13
- package/esm2022/testing/component-mocks/custom-template-edge-mock.component.mjs +16 -0
- package/esm2022/testing/component-mocks/handle-mock.component.mjs +24 -0
- package/esm2022/{lib/vflow/testing-utils → testing}/component-mocks/minimap-mock.component.mjs +1 -1
- package/esm2022/testing/component-mocks/node-toolbar-mock.component.mjs +23 -0
- package/esm2022/testing/component-mocks/resizable-mock.component.mjs +25 -0
- package/esm2022/testing/component-mocks/vflow-mock.component.mjs +296 -0
- package/esm2022/testing/directive-mocks/connection-controller-mock.directive.mjs +27 -0
- package/esm2022/testing/directive-mocks/drag-handle-mock.directive.mjs +11 -0
- package/esm2022/{lib/vflow/testing-utils → testing}/directive-mocks/selectable-mock.directive.mjs +1 -1
- package/esm2022/{lib/vflow/testing-utils → testing}/directive-mocks/template-mock.directive.mjs +1 -1
- package/esm2022/testing/ngx-vflow-testing.mjs +5 -0
- package/esm2022/testing/provide-custom-node-mocks.mjs +59 -0
- package/esm2022/testing/public-api.mjs +13 -0
- package/esm2022/testing/types.mjs +2 -0
- package/esm2022/testing/vflow-mocks.mjs +28 -0
- package/fesm2022/ngx-vflow-testing.mjs +626 -0
- package/fesm2022/ngx-vflow-testing.mjs.map +1 -0
- package/fesm2022/ngx-vflow.mjs +94 -648
- package/fesm2022/ngx-vflow.mjs.map +1 -1
- package/lib/vflow/components/connection/connection.component.d.ts +4 -2
- package/lib/vflow/components/vflow/vflow.component.d.ts +4 -0
- package/lib/vflow/interfaces/curve-factory.interface.d.ts +44 -0
- package/lib/vflow/interfaces/edge.interface.d.ts +2 -1
- package/lib/vflow/math/edge-path/bezier-path.d.ts +2 -5
- package/lib/vflow/math/edge-path/smooth-step-path.d.ts +2 -3
- package/lib/vflow/math/edge-path/straigh-path.d.ts +2 -4
- package/lib/vflow/models/edge.model.d.ts +6 -4
- package/lib/vflow/services/edge-rendering.service.d.ts +1 -0
- package/lib/vflow/services/flow-entities.service.d.ts +3 -0
- package/lib/vflow/services/node-rendering.service.d.ts +3 -0
- package/lib/vflow/utils/entities-per-frame.d.ts +1 -0
- package/package.json +9 -3
- package/public-api.d.ts +13 -11
- package/testing/component-mocks/custom-template-edge-mock.component.d.ts +7 -0
- package/{lib/vflow/testing-utils → testing}/component-mocks/handle-mock.component.d.ts +2 -3
- package/{lib/vflow/testing-utils → testing}/component-mocks/minimap-mock.component.d.ts +1 -1
- package/{lib/vflow/testing-utils → testing}/component-mocks/node-toolbar-mock.component.d.ts +1 -2
- package/{lib/vflow/testing-utils → testing}/component-mocks/resizable-mock.component.d.ts +1 -1
- package/{lib/vflow/testing-utils → testing}/component-mocks/vflow-mock.component.d.ts +2 -14
- package/{lib/vflow/testing-utils → testing}/directive-mocks/connection-controller-mock.directive.d.ts +2 -3
- package/{lib/vflow/testing-utils → testing}/directive-mocks/drag-handle-mock.directive.d.ts +1 -1
- package/{lib/vflow/testing-utils → testing}/directive-mocks/selectable-mock.directive.d.ts +1 -1
- package/{lib/vflow/testing-utils → testing}/directive-mocks/template-mock.directive.d.ts +1 -1
- package/testing/index.d.ts +5 -0
- package/testing/public-api.d.ts +11 -0
- package/{lib/vflow/testing-utils → testing}/vflow-mocks.d.ts +2 -1
- package/esm2022/lib/vflow/interfaces/path-data.interface.mjs +0 -2
- package/esm2022/lib/vflow/testing-utils/component-mocks/handle-mock.component.mjs +0 -24
- package/esm2022/lib/vflow/testing-utils/component-mocks/node-toolbar-mock.component.mjs +0 -23
- package/esm2022/lib/vflow/testing-utils/component-mocks/resizable-mock.component.mjs +0 -25
- package/esm2022/lib/vflow/testing-utils/component-mocks/vflow-mock.component.mjs +0 -296
- package/esm2022/lib/vflow/testing-utils/directive-mocks/connection-controller-mock.directive.mjs +0 -27
- package/esm2022/lib/vflow/testing-utils/directive-mocks/drag-handle-mock.directive.mjs +0 -11
- package/esm2022/lib/vflow/testing-utils/provide-custom-node-mocks.mjs +0 -68
- package/esm2022/lib/vflow/testing-utils/types.mjs +0 -2
- package/esm2022/lib/vflow/testing-utils/vflow-mocks.mjs +0 -26
- package/esm2022/lib/vflow/types/using-points.type.mjs +0 -2
- package/lib/vflow/interfaces/path-data.interface.d.ts +0 -8
- package/lib/vflow/types/using-points.type.d.ts +0 -5
- /package/{lib/vflow/testing-utils → testing}/provide-custom-node-mocks.d.ts +0 -0
- /package/{lib/vflow/testing-utils → testing}/types.d.ts +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { CustomTemplateEdgeMockComponent } from './component-mocks/custom-template-edge-mock.component';
|
|
2
|
+
import { HandleMockComponent } from './component-mocks/handle-mock.component';
|
|
3
|
+
import { MiniMapMockComponent } from './component-mocks/minimap-mock.component';
|
|
4
|
+
import { NodeToolbarMockComponent } from './component-mocks/node-toolbar-mock.component';
|
|
5
|
+
import { ResizableMockComponent } from './component-mocks/resizable-mock.component';
|
|
6
|
+
import { VflowMockComponent } from './component-mocks/vflow-mock.component';
|
|
7
|
+
import { ConnectionControllerMockDirective } from './directive-mocks/connection-controller-mock.directive';
|
|
8
|
+
import { DragHandleMockDirective } from './directive-mocks/drag-handle-mock.directive';
|
|
9
|
+
import { SelectableMockDirective } from './directive-mocks/selectable-mock.directive';
|
|
10
|
+
import { ConnectionTemplateMockDirective, EdgeLabelHtmlTemplateMockDirective, EdgeTemplateMockDirective, GroupNodeTemplateMockDirective, HandleTemplateMockDirective, NodeHtmlTemplateMockDirective, } from './directive-mocks/template-mock.directive';
|
|
11
|
+
export const VflowMocks = [
|
|
12
|
+
VflowMockComponent,
|
|
13
|
+
HandleMockComponent,
|
|
14
|
+
ResizableMockComponent,
|
|
15
|
+
SelectableMockDirective,
|
|
16
|
+
MiniMapMockComponent,
|
|
17
|
+
NodeToolbarMockComponent,
|
|
18
|
+
DragHandleMockDirective,
|
|
19
|
+
ConnectionControllerMockDirective,
|
|
20
|
+
CustomTemplateEdgeMockComponent,
|
|
21
|
+
NodeHtmlTemplateMockDirective,
|
|
22
|
+
GroupNodeTemplateMockDirective,
|
|
23
|
+
EdgeLabelHtmlTemplateMockDirective,
|
|
24
|
+
EdgeTemplateMockDirective,
|
|
25
|
+
ConnectionTemplateMockDirective,
|
|
26
|
+
HandleTemplateMockDirective,
|
|
27
|
+
];
|
|
28
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmZsb3ctbW9ja3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdmZsb3ctbGliL3Rlc3Rpbmcvc3JjL3ZmbG93LW1vY2tzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSwrQkFBK0IsRUFBRSxNQUFNLHVEQUF1RCxDQUFDO0FBQ3hHLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLHlDQUF5QyxDQUFDO0FBQzlFLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLDBDQUEwQyxDQUFDO0FBQ2hGLE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLCtDQUErQyxDQUFDO0FBQ3pGLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLDRDQUE0QyxDQUFDO0FBQ3BGLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLHdDQUF3QyxDQUFDO0FBQzVFLE9BQU8sRUFBRSxpQ0FBaUMsRUFBRSxNQUFNLHdEQUF3RCxDQUFDO0FBQzNHLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLDhDQUE4QyxDQUFDO0FBQ3ZGLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLDZDQUE2QyxDQUFDO0FBQ3RGLE9BQU8sRUFDTCwrQkFBK0IsRUFDL0Isa0NBQWtDLEVBQ2xDLHlCQUF5QixFQUN6Qiw4QkFBOEIsRUFDOUIsMkJBQTJCLEVBQzNCLDZCQUE2QixHQUM5QixNQUFNLDJDQUEyQyxDQUFDO0FBRW5ELE1BQU0sQ0FBQyxNQUFNLFVBQVUsR0FBRztJQUN4QixrQkFBa0I7SUFDbEIsbUJBQW1CO0lBQ25CLHNCQUFzQjtJQUN0Qix1QkFBdUI7SUFDdkIsb0JBQW9CO0lBQ3BCLHdCQUF3QjtJQUN4Qix1QkFBdUI7SUFDdkIsaUNBQWlDO0lBQ2pDLCtCQUErQjtJQUUvQiw2QkFBNkI7SUFDN0IsOEJBQThCO0lBQzlCLGtDQUFrQztJQUNsQyx5QkFBeUI7SUFDekIsK0JBQStCO0lBQy9CLDJCQUEyQjtDQUNuQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ3VzdG9tVGVtcGxhdGVFZGdlTW9ja0NvbXBvbmVudCB9IGZyb20gJy4vY29tcG9uZW50LW1vY2tzL2N1c3RvbS10ZW1wbGF0ZS1lZGdlLW1vY2suY29tcG9uZW50JztcbmltcG9ydCB7IEhhbmRsZU1vY2tDb21wb25lbnQgfSBmcm9tICcuL2NvbXBvbmVudC1tb2Nrcy9oYW5kbGUtbW9jay5jb21wb25lbnQnO1xuaW1wb3J0IHsgTWluaU1hcE1vY2tDb21wb25lbnQgfSBmcm9tICcuL2NvbXBvbmVudC1tb2Nrcy9taW5pbWFwLW1vY2suY29tcG9uZW50JztcbmltcG9ydCB7IE5vZGVUb29sYmFyTW9ja0NvbXBvbmVudCB9IGZyb20gJy4vY29tcG9uZW50LW1vY2tzL25vZGUtdG9vbGJhci1tb2NrLmNvbXBvbmVudCc7XG5pbXBvcnQgeyBSZXNpemFibGVNb2NrQ29tcG9uZW50IH0gZnJvbSAnLi9jb21wb25lbnQtbW9ja3MvcmVzaXphYmxlLW1vY2suY29tcG9uZW50JztcbmltcG9ydCB7IFZmbG93TW9ja0NvbXBvbmVudCB9IGZyb20gJy4vY29tcG9uZW50LW1vY2tzL3ZmbG93LW1vY2suY29tcG9uZW50JztcbmltcG9ydCB7IENvbm5lY3Rpb25Db250cm9sbGVyTW9ja0RpcmVjdGl2ZSB9IGZyb20gJy4vZGlyZWN0aXZlLW1vY2tzL2Nvbm5lY3Rpb24tY29udHJvbGxlci1tb2NrLmRpcmVjdGl2ZSc7XG5pbXBvcnQgeyBEcmFnSGFuZGxlTW9ja0RpcmVjdGl2ZSB9IGZyb20gJy4vZGlyZWN0aXZlLW1vY2tzL2RyYWctaGFuZGxlLW1vY2suZGlyZWN0aXZlJztcbmltcG9ydCB7IFNlbGVjdGFibGVNb2NrRGlyZWN0aXZlIH0gZnJvbSAnLi9kaXJlY3RpdmUtbW9ja3Mvc2VsZWN0YWJsZS1tb2NrLmRpcmVjdGl2ZSc7XG5pbXBvcnQge1xuICBDb25uZWN0aW9uVGVtcGxhdGVNb2NrRGlyZWN0aXZlLFxuICBFZGdlTGFiZWxIdG1sVGVtcGxhdGVNb2NrRGlyZWN0aXZlLFxuICBFZGdlVGVtcGxhdGVNb2NrRGlyZWN0aXZlLFxuICBHcm91cE5vZGVUZW1wbGF0ZU1vY2tEaXJlY3RpdmUsXG4gIEhhbmRsZVRlbXBsYXRlTW9ja0RpcmVjdGl2ZSxcbiAgTm9kZUh0bWxUZW1wbGF0ZU1vY2tEaXJlY3RpdmUsXG59IGZyb20gJy4vZGlyZWN0aXZlLW1vY2tzL3RlbXBsYXRlLW1vY2suZGlyZWN0aXZlJztcblxuZXhwb3J0IGNvbnN0IFZmbG93TW9ja3MgPSBbXG4gIFZmbG93TW9ja0NvbXBvbmVudCxcbiAgSGFuZGxlTW9ja0NvbXBvbmVudCxcbiAgUmVzaXphYmxlTW9ja0NvbXBvbmVudCxcbiAgU2VsZWN0YWJsZU1vY2tEaXJlY3RpdmUsXG4gIE1pbmlNYXBNb2NrQ29tcG9uZW50LFxuICBOb2RlVG9vbGJhck1vY2tDb21wb25lbnQsXG4gIERyYWdIYW5kbGVNb2NrRGlyZWN0aXZlLFxuICBDb25uZWN0aW9uQ29udHJvbGxlck1vY2tEaXJlY3RpdmUsXG4gIEN1c3RvbVRlbXBsYXRlRWRnZU1vY2tDb21wb25lbnQsXG5cbiAgTm9kZUh0bWxUZW1wbGF0ZU1vY2tEaXJlY3RpdmUsXG4gIEdyb3VwTm9kZVRlbXBsYXRlTW9ja0RpcmVjdGl2ZSxcbiAgRWRnZUxhYmVsSHRtbFRlbXBsYXRlTW9ja0RpcmVjdGl2ZSxcbiAgRWRnZVRlbXBsYXRlTW9ja0RpcmVjdGl2ZSxcbiAgQ29ubmVjdGlvblRlbXBsYXRlTW9ja0RpcmVjdGl2ZSxcbiAgSGFuZGxlVGVtcGxhdGVNb2NrRGlyZWN0aXZlLFxuXSBhcyBjb25zdDtcbiJdfQ==
|
|
@@ -0,0 +1,626 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { signal, inject, TemplateRef, Directive, input, output, contentChild, Component, ChangeDetectionStrategy, Input } from '@angular/core';
|
|
3
|
+
import { ɵNodeModel as _NodeModel, ɵComponentEventBusService as _ComponentEventBusService, ɵNodeAccessorService as _NodeAccessorService, ɵFlowEntitiesService as _FlowEntitiesService, ɵHandleService as _HandleService, ɵRootPointerDirective as _RootPointerDirective, ɵSpacePointContextDirective as _SpacePointContextDirective, ɵSelectionService as _SelectionService, ɵFlowSettingsService as _FlowSettingsService, ɵViewportService as _ViewportService, ɵConnectionModel as _ConnectionModel } from 'ngx-vflow';
|
|
4
|
+
import { of } from 'rxjs';
|
|
5
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
6
|
+
import { toObservable } from '@angular/core/rxjs-interop';
|
|
7
|
+
|
|
8
|
+
const mockModel = () => new _NodeModel({ id: 'mock', type: 'default', point: { x: 0, y: 0 } });
|
|
9
|
+
function provideCustomNodeMocks() {
|
|
10
|
+
return [
|
|
11
|
+
{
|
|
12
|
+
provide: _ComponentEventBusService,
|
|
13
|
+
useValue: {
|
|
14
|
+
pushEvent: () => { },
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
provide: _NodeAccessorService,
|
|
19
|
+
useFactory: () => ({
|
|
20
|
+
model: signal(mockModel()),
|
|
21
|
+
}),
|
|
22
|
+
},
|
|
23
|
+
_FlowEntitiesService,
|
|
24
|
+
// TODO: mocks below should be removed after the major release
|
|
25
|
+
{
|
|
26
|
+
provide: _HandleService,
|
|
27
|
+
useFactory: () => ({
|
|
28
|
+
node: signal(mockModel()),
|
|
29
|
+
createHandle: () => { },
|
|
30
|
+
destroyHandle: () => { },
|
|
31
|
+
}),
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
provide: _RootPointerDirective,
|
|
35
|
+
useValue: {
|
|
36
|
+
pointerMovement$: of({
|
|
37
|
+
x: 0,
|
|
38
|
+
y: 0,
|
|
39
|
+
movementX: 0,
|
|
40
|
+
movementY: 0,
|
|
41
|
+
target: null,
|
|
42
|
+
originalEvent: null,
|
|
43
|
+
}),
|
|
44
|
+
documentPointerEnd$: of(null),
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
provide: _SpacePointContextDirective,
|
|
49
|
+
useValue: {
|
|
50
|
+
documentPointToFlowPoint: (point) => point,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
provide: _SelectionService,
|
|
55
|
+
useValue: {
|
|
56
|
+
select: () => { },
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
_FlowSettingsService,
|
|
60
|
+
_ViewportService,
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
class EdgeTemplateMockDirective {
|
|
65
|
+
constructor() {
|
|
66
|
+
this.templateRef = inject(TemplateRef);
|
|
67
|
+
}
|
|
68
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgeTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
69
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: EdgeTemplateMockDirective, isStandalone: true, selector: "ng-template[edge]", ngImport: i0 }); }
|
|
70
|
+
}
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgeTemplateMockDirective, decorators: [{
|
|
72
|
+
type: Directive,
|
|
73
|
+
args: [{
|
|
74
|
+
standalone: true,
|
|
75
|
+
selector: 'ng-template[edge]',
|
|
76
|
+
}]
|
|
77
|
+
}] });
|
|
78
|
+
class ConnectionTemplateMockDirective {
|
|
79
|
+
constructor() {
|
|
80
|
+
this.templateRef = inject(TemplateRef);
|
|
81
|
+
}
|
|
82
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConnectionTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
83
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: ConnectionTemplateMockDirective, isStandalone: true, selector: "ng-template[connection]", ngImport: i0 }); }
|
|
84
|
+
}
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConnectionTemplateMockDirective, decorators: [{
|
|
86
|
+
type: Directive,
|
|
87
|
+
args: [{
|
|
88
|
+
standalone: true,
|
|
89
|
+
selector: 'ng-template[connection]',
|
|
90
|
+
}]
|
|
91
|
+
}] });
|
|
92
|
+
class EdgeLabelHtmlTemplateMockDirective {
|
|
93
|
+
constructor() {
|
|
94
|
+
this.templateRef = inject(TemplateRef);
|
|
95
|
+
}
|
|
96
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgeLabelHtmlTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
97
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: EdgeLabelHtmlTemplateMockDirective, isStandalone: true, selector: "ng-template[edgeLabelHtml]", ngImport: i0 }); }
|
|
98
|
+
}
|
|
99
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgeLabelHtmlTemplateMockDirective, decorators: [{
|
|
100
|
+
type: Directive,
|
|
101
|
+
args: [{
|
|
102
|
+
standalone: true,
|
|
103
|
+
selector: 'ng-template[edgeLabelHtml]',
|
|
104
|
+
}]
|
|
105
|
+
}] });
|
|
106
|
+
class NodeHtmlTemplateMockDirective {
|
|
107
|
+
constructor() {
|
|
108
|
+
this.templateRef = inject(TemplateRef);
|
|
109
|
+
}
|
|
110
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeHtmlTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
111
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: NodeHtmlTemplateMockDirective, isStandalone: true, selector: "ng-template[nodeHtml]", ngImport: i0 }); }
|
|
112
|
+
}
|
|
113
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeHtmlTemplateMockDirective, decorators: [{
|
|
114
|
+
type: Directive,
|
|
115
|
+
args: [{
|
|
116
|
+
standalone: true,
|
|
117
|
+
selector: 'ng-template[nodeHtml]',
|
|
118
|
+
}]
|
|
119
|
+
}] });
|
|
120
|
+
class NodeSvgTemplateMockDirective {
|
|
121
|
+
constructor() {
|
|
122
|
+
this.templateRef = inject(TemplateRef);
|
|
123
|
+
}
|
|
124
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeSvgTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
125
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: NodeSvgTemplateMockDirective, isStandalone: true, selector: "ng-template[nodeSvg]", ngImport: i0 }); }
|
|
126
|
+
}
|
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeSvgTemplateMockDirective, decorators: [{
|
|
128
|
+
type: Directive,
|
|
129
|
+
args: [{
|
|
130
|
+
standalone: true,
|
|
131
|
+
selector: 'ng-template[nodeSvg]',
|
|
132
|
+
}]
|
|
133
|
+
}] });
|
|
134
|
+
class GroupNodeTemplateMockDirective {
|
|
135
|
+
constructor() {
|
|
136
|
+
this.templateRef = inject(TemplateRef);
|
|
137
|
+
}
|
|
138
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GroupNodeTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
139
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: GroupNodeTemplateMockDirective, isStandalone: true, selector: "ng-template[groupNode]", ngImport: i0 }); }
|
|
140
|
+
}
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GroupNodeTemplateMockDirective, decorators: [{
|
|
142
|
+
type: Directive,
|
|
143
|
+
args: [{
|
|
144
|
+
standalone: true,
|
|
145
|
+
selector: 'ng-template[groupNode]',
|
|
146
|
+
}]
|
|
147
|
+
}] });
|
|
148
|
+
class HandleTemplateMockDirective {
|
|
149
|
+
constructor() {
|
|
150
|
+
this.templateRef = inject(TemplateRef);
|
|
151
|
+
}
|
|
152
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
153
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: HandleTemplateMockDirective, isStandalone: true, selector: "ng-template[handle]", ngImport: i0 }); }
|
|
154
|
+
}
|
|
155
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleTemplateMockDirective, decorators: [{
|
|
156
|
+
type: Directive,
|
|
157
|
+
args: [{
|
|
158
|
+
standalone: true,
|
|
159
|
+
selector: 'ng-template[handle]',
|
|
160
|
+
}]
|
|
161
|
+
}] });
|
|
162
|
+
|
|
163
|
+
class VflowMockComponent {
|
|
164
|
+
constructor() {
|
|
165
|
+
this.view = [400, 400];
|
|
166
|
+
this.minZoom = 0.5;
|
|
167
|
+
this.maxZoom = 3;
|
|
168
|
+
this.background = '#fff';
|
|
169
|
+
this.optimization = input({
|
|
170
|
+
detachedGroupsLayer: false,
|
|
171
|
+
});
|
|
172
|
+
this.entitiesSelectable = true;
|
|
173
|
+
this.keyboardShortcuts = {
|
|
174
|
+
multiSelection: null,
|
|
175
|
+
};
|
|
176
|
+
this.connection = new _ConnectionModel({});
|
|
177
|
+
// eslint-disable-next-line @angular-eslint/no-output-on-prefix
|
|
178
|
+
this.onComponentNodeEvent = output();
|
|
179
|
+
this.nodeTemplateDirective = contentChild(NodeHtmlTemplateMockDirective);
|
|
180
|
+
this.groupNodeTemplateDirective = contentChild(GroupNodeTemplateMockDirective);
|
|
181
|
+
this.edgeTemplateDirective = contentChild(EdgeTemplateMockDirective);
|
|
182
|
+
this.edgeLabelHtmlDirective = contentChild(EdgeLabelHtmlTemplateMockDirective);
|
|
183
|
+
this.connectionTemplateDirective = contentChild(ConnectionTemplateMockDirective);
|
|
184
|
+
this.viewport = signal({
|
|
185
|
+
x: 0,
|
|
186
|
+
y: 0,
|
|
187
|
+
zoom: 1,
|
|
188
|
+
});
|
|
189
|
+
this.nodesChange = signal([]);
|
|
190
|
+
this.edgesChange = signal([]);
|
|
191
|
+
this.viewportChange$ = toObservable(this.viewport);
|
|
192
|
+
this.nodesChange$ = toObservable(this.nodesChange);
|
|
193
|
+
this.edgesChange$ = toObservable(this.edgesChange);
|
|
194
|
+
}
|
|
195
|
+
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
196
|
+
ngOnInit() { }
|
|
197
|
+
viewportTo(viewport) {
|
|
198
|
+
this.viewport.set(viewport);
|
|
199
|
+
}
|
|
200
|
+
zoomTo(zoom) {
|
|
201
|
+
this.viewport.update((prev) => ({ ...prev, zoom }));
|
|
202
|
+
}
|
|
203
|
+
panTo(point) {
|
|
204
|
+
this.viewport.update((prev) => ({ ...prev, x: point.x, y: point.y }));
|
|
205
|
+
}
|
|
206
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
207
|
+
fitView(options) { }
|
|
208
|
+
documentPointToFlowPoint(point, options) {
|
|
209
|
+
if (options?.spaces) {
|
|
210
|
+
return [
|
|
211
|
+
{
|
|
212
|
+
nodeId: null,
|
|
213
|
+
x: point.x,
|
|
214
|
+
y: point.y,
|
|
215
|
+
},
|
|
216
|
+
];
|
|
217
|
+
}
|
|
218
|
+
return point;
|
|
219
|
+
}
|
|
220
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
221
|
+
getIntesectingNodes(nodeId, options) {
|
|
222
|
+
return [];
|
|
223
|
+
}
|
|
224
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
225
|
+
toNodeSpace(nodeId, spaceNodeId) {
|
|
226
|
+
return { x: 0, y: 0 };
|
|
227
|
+
}
|
|
228
|
+
getNode(id) {
|
|
229
|
+
return this.nodes.find((node) => node.id === id);
|
|
230
|
+
}
|
|
231
|
+
getDetachedEdges() {
|
|
232
|
+
return [];
|
|
233
|
+
}
|
|
234
|
+
createSignal(value) {
|
|
235
|
+
return signal(value);
|
|
236
|
+
}
|
|
237
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VflowMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
238
|
+
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 }, elevateEdgesOnSelect: { classPropertyName: "elevateEdgesOnSelect", publicName: "elevateEdgesOnSelect", 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: `
|
|
239
|
+
<ng-content />
|
|
240
|
+
|
|
241
|
+
@for (node of nodes; track $index) {
|
|
242
|
+
@if (node.type === 'html-template') {
|
|
243
|
+
<ng-component
|
|
244
|
+
[ngTemplateOutlet]="nodeTemplateDirective()?.templateRef ?? null"
|
|
245
|
+
[ngTemplateOutletContext]="{
|
|
246
|
+
$implicit: {
|
|
247
|
+
node: node,
|
|
248
|
+
selected: createSignal(false),
|
|
249
|
+
},
|
|
250
|
+
}" />
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@if (node.type === 'template-group') {
|
|
254
|
+
<ng-component
|
|
255
|
+
[ngTemplateOutlet]="groupNodeTemplateDirective()?.templateRef ?? null"
|
|
256
|
+
[ngTemplateOutletContext]="{
|
|
257
|
+
$implicit: {
|
|
258
|
+
node: node,
|
|
259
|
+
selected: createSignal(false),
|
|
260
|
+
width: createSignal(node.width),
|
|
261
|
+
height: createSignal(node.height),
|
|
262
|
+
},
|
|
263
|
+
}" />
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
@for (edge of edges; track $index) {
|
|
268
|
+
@if (edge.type === 'template') {
|
|
269
|
+
<ng-component
|
|
270
|
+
[ngTemplateOutlet]="edgeTemplateDirective()?.templateRef ?? null"
|
|
271
|
+
[ngTemplateOutletContext]="{
|
|
272
|
+
$implicit: {
|
|
273
|
+
edge: edge,
|
|
274
|
+
selected: createSignal(false),
|
|
275
|
+
path: createSignal(''),
|
|
276
|
+
markerStart: createSignal(''),
|
|
277
|
+
markerEnd: createSignal(''),
|
|
278
|
+
},
|
|
279
|
+
}" />
|
|
280
|
+
|
|
281
|
+
@if (edge.edgeLabels?.start) {
|
|
282
|
+
<ng-component
|
|
283
|
+
[ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
|
|
284
|
+
[ngTemplateOutletContext]="{
|
|
285
|
+
$implicit: {
|
|
286
|
+
edge: edge,
|
|
287
|
+
},
|
|
288
|
+
}" />
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
@if (edge.edgeLabels?.center) {
|
|
292
|
+
<ng-component
|
|
293
|
+
[ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
|
|
294
|
+
[ngTemplateOutletContext]="{
|
|
295
|
+
$implicit: {
|
|
296
|
+
edge: edge,
|
|
297
|
+
label: edge.edgeLabels?.center,
|
|
298
|
+
},
|
|
299
|
+
}" />
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
@if (edge.edgeLabels?.end) {
|
|
303
|
+
<ng-component
|
|
304
|
+
[ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
|
|
305
|
+
[ngTemplateOutletContext]="{
|
|
306
|
+
$implicit: {
|
|
307
|
+
edge: edge,
|
|
308
|
+
label: edge.edgeLabels?.end,
|
|
309
|
+
},
|
|
310
|
+
}" />
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
@if (connection.type === 'template') {
|
|
316
|
+
<ng-component
|
|
317
|
+
[ngTemplateOutlet]="connectionTemplateDirective()?.templateRef ?? null"
|
|
318
|
+
[ngTemplateOutletContext]="{
|
|
319
|
+
$implicit: {
|
|
320
|
+
path: createSignal(''),
|
|
321
|
+
marker: createSignal(''),
|
|
322
|
+
},
|
|
323
|
+
}" />
|
|
324
|
+
}
|
|
325
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
326
|
+
}
|
|
327
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VflowMockComponent, decorators: [{
|
|
328
|
+
type: Component,
|
|
329
|
+
args: [{
|
|
330
|
+
selector: 'vflow',
|
|
331
|
+
template: `
|
|
332
|
+
<ng-content />
|
|
333
|
+
|
|
334
|
+
@for (node of nodes; track $index) {
|
|
335
|
+
@if (node.type === 'html-template') {
|
|
336
|
+
<ng-component
|
|
337
|
+
[ngTemplateOutlet]="nodeTemplateDirective()?.templateRef ?? null"
|
|
338
|
+
[ngTemplateOutletContext]="{
|
|
339
|
+
$implicit: {
|
|
340
|
+
node: node,
|
|
341
|
+
selected: createSignal(false),
|
|
342
|
+
},
|
|
343
|
+
}" />
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
@if (node.type === 'template-group') {
|
|
347
|
+
<ng-component
|
|
348
|
+
[ngTemplateOutlet]="groupNodeTemplateDirective()?.templateRef ?? null"
|
|
349
|
+
[ngTemplateOutletContext]="{
|
|
350
|
+
$implicit: {
|
|
351
|
+
node: node,
|
|
352
|
+
selected: createSignal(false),
|
|
353
|
+
width: createSignal(node.width),
|
|
354
|
+
height: createSignal(node.height),
|
|
355
|
+
},
|
|
356
|
+
}" />
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
@for (edge of edges; track $index) {
|
|
361
|
+
@if (edge.type === 'template') {
|
|
362
|
+
<ng-component
|
|
363
|
+
[ngTemplateOutlet]="edgeTemplateDirective()?.templateRef ?? null"
|
|
364
|
+
[ngTemplateOutletContext]="{
|
|
365
|
+
$implicit: {
|
|
366
|
+
edge: edge,
|
|
367
|
+
selected: createSignal(false),
|
|
368
|
+
path: createSignal(''),
|
|
369
|
+
markerStart: createSignal(''),
|
|
370
|
+
markerEnd: createSignal(''),
|
|
371
|
+
},
|
|
372
|
+
}" />
|
|
373
|
+
|
|
374
|
+
@if (edge.edgeLabels?.start) {
|
|
375
|
+
<ng-component
|
|
376
|
+
[ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
|
|
377
|
+
[ngTemplateOutletContext]="{
|
|
378
|
+
$implicit: {
|
|
379
|
+
edge: edge,
|
|
380
|
+
},
|
|
381
|
+
}" />
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
@if (edge.edgeLabels?.center) {
|
|
385
|
+
<ng-component
|
|
386
|
+
[ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
|
|
387
|
+
[ngTemplateOutletContext]="{
|
|
388
|
+
$implicit: {
|
|
389
|
+
edge: edge,
|
|
390
|
+
label: edge.edgeLabels?.center,
|
|
391
|
+
},
|
|
392
|
+
}" />
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
@if (edge.edgeLabels?.end) {
|
|
396
|
+
<ng-component
|
|
397
|
+
[ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
|
|
398
|
+
[ngTemplateOutletContext]="{
|
|
399
|
+
$implicit: {
|
|
400
|
+
edge: edge,
|
|
401
|
+
label: edge.edgeLabels?.end,
|
|
402
|
+
},
|
|
403
|
+
}" />
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
@if (connection.type === 'template') {
|
|
409
|
+
<ng-component
|
|
410
|
+
[ngTemplateOutlet]="connectionTemplateDirective()?.templateRef ?? null"
|
|
411
|
+
[ngTemplateOutletContext]="{
|
|
412
|
+
$implicit: {
|
|
413
|
+
path: createSignal(''),
|
|
414
|
+
marker: createSignal(''),
|
|
415
|
+
},
|
|
416
|
+
}" />
|
|
417
|
+
}
|
|
418
|
+
`,
|
|
419
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
420
|
+
standalone: true,
|
|
421
|
+
imports: [NgTemplateOutlet],
|
|
422
|
+
}]
|
|
423
|
+
}], propDecorators: { nodes: [{
|
|
424
|
+
type: Input,
|
|
425
|
+
args: [{ required: true }]
|
|
426
|
+
}], edges: [{
|
|
427
|
+
type: Input
|
|
428
|
+
}], view: [{
|
|
429
|
+
type: Input
|
|
430
|
+
}], minZoom: [{
|
|
431
|
+
type: Input
|
|
432
|
+
}], maxZoom: [{
|
|
433
|
+
type: Input
|
|
434
|
+
}], background: [{
|
|
435
|
+
type: Input
|
|
436
|
+
}], entitiesSelectable: [{
|
|
437
|
+
type: Input
|
|
438
|
+
}], keyboardShortcuts: [{
|
|
439
|
+
type: Input
|
|
440
|
+
}], connection: [{
|
|
441
|
+
type: Input,
|
|
442
|
+
args: [{
|
|
443
|
+
transform: (settings) => new _ConnectionModel(settings),
|
|
444
|
+
}]
|
|
445
|
+
}], snapGrid: [{
|
|
446
|
+
type: Input
|
|
447
|
+
}], elevateNodesOnSelect: [{
|
|
448
|
+
type: Input
|
|
449
|
+
}], elevateEdgesOnSelect: [{
|
|
450
|
+
type: Input
|
|
451
|
+
}] } });
|
|
452
|
+
|
|
453
|
+
class HandleMockComponent {
|
|
454
|
+
constructor() {
|
|
455
|
+
this.position = input.required();
|
|
456
|
+
this.type = input.required();
|
|
457
|
+
this.id = input();
|
|
458
|
+
this.template = input();
|
|
459
|
+
}
|
|
460
|
+
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
461
|
+
ngOnInit() { }
|
|
462
|
+
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 }); }
|
|
464
|
+
}
|
|
465
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleMockComponent, decorators: [{
|
|
466
|
+
type: Component,
|
|
467
|
+
args: [{
|
|
468
|
+
selector: 'handle',
|
|
469
|
+
template: '',
|
|
470
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
471
|
+
standalone: true,
|
|
472
|
+
}]
|
|
473
|
+
}] });
|
|
474
|
+
|
|
475
|
+
class ResizableMockComponent {
|
|
476
|
+
constructor() {
|
|
477
|
+
this.resizable = input();
|
|
478
|
+
this.resizerColor = input('#2e414c');
|
|
479
|
+
this.gap = input(1.5);
|
|
480
|
+
}
|
|
481
|
+
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
482
|
+
ngOnInit() { }
|
|
483
|
+
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
484
|
+
ngAfterViewInit() { }
|
|
485
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ResizableMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
486
|
+
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 }); }
|
|
487
|
+
}
|
|
488
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ResizableMockComponent, decorators: [{
|
|
489
|
+
type: Component,
|
|
490
|
+
args: [{
|
|
491
|
+
selector: '[resizable]',
|
|
492
|
+
template: '<ng-content />',
|
|
493
|
+
standalone: true,
|
|
494
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
495
|
+
}]
|
|
496
|
+
}] });
|
|
497
|
+
|
|
498
|
+
class MiniMapMockComponent {
|
|
499
|
+
constructor() {
|
|
500
|
+
this.maskColor = input(`rgba(215, 215, 215, 0.6)`);
|
|
501
|
+
this.strokeColor = input(`rgb(200, 200, 200)`);
|
|
502
|
+
this.position = input('bottom-right');
|
|
503
|
+
this.scaleOnHover = input(false);
|
|
504
|
+
}
|
|
505
|
+
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
506
|
+
ngOnInit() { }
|
|
507
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MiniMapMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
508
|
+
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 }); }
|
|
509
|
+
}
|
|
510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MiniMapMockComponent, decorators: [{
|
|
511
|
+
type: Component,
|
|
512
|
+
args: [{
|
|
513
|
+
selector: 'mini-map',
|
|
514
|
+
template: '',
|
|
515
|
+
standalone: true,
|
|
516
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
517
|
+
}]
|
|
518
|
+
}] });
|
|
519
|
+
|
|
520
|
+
class NodeToolbarMockComponent {
|
|
521
|
+
constructor() {
|
|
522
|
+
this.position = input('top');
|
|
523
|
+
}
|
|
524
|
+
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
525
|
+
ngOnInit() { }
|
|
526
|
+
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
527
|
+
ngOnDestroy() { }
|
|
528
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeToolbarMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
529
|
+
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 }); }
|
|
530
|
+
}
|
|
531
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeToolbarMockComponent, decorators: [{
|
|
532
|
+
type: Component,
|
|
533
|
+
args: [{
|
|
534
|
+
selector: 'node-toolbar',
|
|
535
|
+
template: '<ng-content />',
|
|
536
|
+
standalone: true,
|
|
537
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
538
|
+
}]
|
|
539
|
+
}] });
|
|
540
|
+
|
|
541
|
+
class ConnectionControllerMockDirective {
|
|
542
|
+
constructor() {
|
|
543
|
+
// eslint-disable-next-line @angular-eslint/no-output-on-prefix
|
|
544
|
+
this.onConnect = output();
|
|
545
|
+
// eslint-disable-next-line @angular-eslint/no-output-on-prefix
|
|
546
|
+
this.onReconnect = output();
|
|
547
|
+
}
|
|
548
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
549
|
+
startConnection(handle) { }
|
|
550
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
551
|
+
startReconnection(handle) { }
|
|
552
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
553
|
+
validateConnection(handle) { }
|
|
554
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
555
|
+
resetValidateConnection(targetHandle) { }
|
|
556
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
557
|
+
endConnection() { }
|
|
558
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConnectionControllerMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
559
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: ConnectionControllerMockDirective, isStandalone: true, selector: "[onConnect]", outputs: { onConnect: "onConnect", onReconnect: "onReconnect" }, ngImport: i0 }); }
|
|
560
|
+
}
|
|
561
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConnectionControllerMockDirective, decorators: [{
|
|
562
|
+
type: Directive,
|
|
563
|
+
args: [{ selector: '[onConnect]', standalone: true }]
|
|
564
|
+
}] });
|
|
565
|
+
|
|
566
|
+
class DragHandleMockDirective {
|
|
567
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DragHandleMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
568
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: DragHandleMockDirective, isStandalone: true, selector: "[dragHandle]", ngImport: i0 }); }
|
|
569
|
+
}
|
|
570
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DragHandleMockDirective, decorators: [{
|
|
571
|
+
type: Directive,
|
|
572
|
+
args: [{ selector: '[dragHandle]', standalone: true }]
|
|
573
|
+
}] });
|
|
574
|
+
|
|
575
|
+
class SelectableMockDirective {
|
|
576
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectableMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
577
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: SelectableMockDirective, isStandalone: true, selector: "[selectable]", ngImport: i0 }); }
|
|
578
|
+
}
|
|
579
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectableMockDirective, decorators: [{
|
|
580
|
+
type: Directive,
|
|
581
|
+
args: [{
|
|
582
|
+
selector: '[selectable]',
|
|
583
|
+
standalone: true,
|
|
584
|
+
}]
|
|
585
|
+
}] });
|
|
586
|
+
|
|
587
|
+
class CustomTemplateEdgeMockComponent {
|
|
588
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CustomTemplateEdgeMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
589
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: CustomTemplateEdgeMockComponent, isStandalone: true, selector: "g[customTemplateEdge]", ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
590
|
+
}
|
|
591
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: CustomTemplateEdgeMockComponent, decorators: [{
|
|
592
|
+
type: Component,
|
|
593
|
+
args: [{
|
|
594
|
+
selector: 'g[customTemplateEdge]',
|
|
595
|
+
template: '',
|
|
596
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
597
|
+
standalone: true,
|
|
598
|
+
}]
|
|
599
|
+
}] });
|
|
600
|
+
|
|
601
|
+
const VflowMocks = [
|
|
602
|
+
VflowMockComponent,
|
|
603
|
+
HandleMockComponent,
|
|
604
|
+
ResizableMockComponent,
|
|
605
|
+
SelectableMockDirective,
|
|
606
|
+
MiniMapMockComponent,
|
|
607
|
+
NodeToolbarMockComponent,
|
|
608
|
+
DragHandleMockDirective,
|
|
609
|
+
ConnectionControllerMockDirective,
|
|
610
|
+
CustomTemplateEdgeMockComponent,
|
|
611
|
+
NodeHtmlTemplateMockDirective,
|
|
612
|
+
GroupNodeTemplateMockDirective,
|
|
613
|
+
EdgeLabelHtmlTemplateMockDirective,
|
|
614
|
+
EdgeTemplateMockDirective,
|
|
615
|
+
ConnectionTemplateMockDirective,
|
|
616
|
+
HandleTemplateMockDirective,
|
|
617
|
+
];
|
|
618
|
+
|
|
619
|
+
// Testing
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Generated bundle index. Do not edit.
|
|
623
|
+
*/
|
|
624
|
+
|
|
625
|
+
export { ConnectionControllerMockDirective, ConnectionTemplateMockDirective, DragHandleMockDirective, EdgeLabelHtmlTemplateMockDirective, EdgeTemplateMockDirective, GroupNodeTemplateMockDirective, HandleMockComponent, HandleTemplateMockDirective, MiniMapMockComponent, NodeHtmlTemplateMockDirective, NodeSvgTemplateMockDirective, NodeToolbarMockComponent, ResizableMockComponent, SelectableMockDirective, VflowMockComponent, VflowMocks, provideCustomNodeMocks };
|
|
626
|
+
//# sourceMappingURL=ngx-vflow-testing.mjs.map
|