ngx-vflow 1.8.2 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/esm2022/public-api.mjs +14 -13
  2. package/esm2022/testing/component-mocks/custom-template-edge-mock.component.mjs +16 -0
  3. package/esm2022/testing/component-mocks/handle-mock.component.mjs +24 -0
  4. package/esm2022/{lib/vflow/testing-utils → testing}/component-mocks/minimap-mock.component.mjs +1 -1
  5. package/esm2022/testing/component-mocks/node-toolbar-mock.component.mjs +23 -0
  6. package/esm2022/testing/component-mocks/resizable-mock.component.mjs +25 -0
  7. package/esm2022/testing/component-mocks/vflow-mock.component.mjs +296 -0
  8. package/esm2022/testing/directive-mocks/connection-controller-mock.directive.mjs +27 -0
  9. package/esm2022/testing/directive-mocks/drag-handle-mock.directive.mjs +11 -0
  10. package/esm2022/{lib/vflow/testing-utils → testing}/directive-mocks/selectable-mock.directive.mjs +1 -1
  11. package/esm2022/{lib/vflow/testing-utils → testing}/directive-mocks/template-mock.directive.mjs +1 -1
  12. package/esm2022/testing/ngx-vflow-testing.mjs +5 -0
  13. package/esm2022/testing/provide-custom-node-mocks.mjs +59 -0
  14. package/esm2022/testing/public-api.mjs +13 -0
  15. package/esm2022/testing/types.mjs +2 -0
  16. package/esm2022/testing/vflow-mocks.mjs +28 -0
  17. package/fesm2022/ngx-vflow-testing.mjs +626 -0
  18. package/fesm2022/ngx-vflow-testing.mjs.map +1 -0
  19. package/fesm2022/ngx-vflow.mjs +1 -597
  20. package/fesm2022/ngx-vflow.mjs.map +1 -1
  21. package/lib/vflow/models/edge.model.d.ts +2 -2
  22. package/package.json +9 -3
  23. package/public-api.d.ts +12 -11
  24. package/testing/component-mocks/custom-template-edge-mock.component.d.ts +7 -0
  25. package/{lib/vflow/testing-utils → testing}/component-mocks/handle-mock.component.d.ts +2 -3
  26. package/{lib/vflow/testing-utils → testing}/component-mocks/minimap-mock.component.d.ts +1 -1
  27. package/{lib/vflow/testing-utils → testing}/component-mocks/node-toolbar-mock.component.d.ts +1 -2
  28. package/{lib/vflow/testing-utils → testing}/component-mocks/resizable-mock.component.d.ts +1 -1
  29. package/{lib/vflow/testing-utils → testing}/component-mocks/vflow-mock.component.d.ts +2 -14
  30. package/{lib/vflow/testing-utils → testing}/directive-mocks/connection-controller-mock.directive.d.ts +2 -3
  31. package/{lib/vflow/testing-utils → testing}/directive-mocks/drag-handle-mock.directive.d.ts +1 -1
  32. package/{lib/vflow/testing-utils → testing}/directive-mocks/selectable-mock.directive.d.ts +1 -1
  33. package/{lib/vflow/testing-utils → testing}/directive-mocks/template-mock.directive.d.ts +1 -1
  34. package/testing/index.d.ts +5 -0
  35. package/testing/public-api.d.ts +11 -0
  36. package/{lib/vflow/testing-utils → testing}/vflow-mocks.d.ts +2 -1
  37. package/esm2022/lib/vflow/testing-utils/component-mocks/handle-mock.component.mjs +0 -24
  38. package/esm2022/lib/vflow/testing-utils/component-mocks/node-toolbar-mock.component.mjs +0 -23
  39. package/esm2022/lib/vflow/testing-utils/component-mocks/resizable-mock.component.mjs +0 -25
  40. package/esm2022/lib/vflow/testing-utils/component-mocks/vflow-mock.component.mjs +0 -296
  41. package/esm2022/lib/vflow/testing-utils/directive-mocks/connection-controller-mock.directive.mjs +0 -27
  42. package/esm2022/lib/vflow/testing-utils/directive-mocks/drag-handle-mock.directive.mjs +0 -11
  43. package/esm2022/lib/vflow/testing-utils/provide-custom-node-mocks.mjs +0 -68
  44. package/esm2022/lib/vflow/testing-utils/types.mjs +0 -2
  45. package/esm2022/lib/vflow/testing-utils/vflow-mocks.mjs +0 -26
  46. /package/{lib/vflow/testing-utils → testing}/provide-custom-node-mocks.d.ts +0 -0
  47. /package/{lib/vflow/testing-utils → testing}/types.d.ts +0 -0
@@ -4160,607 +4160,11 @@ const Vflow = [
4160
4160
  HandleTemplateDirective,
4161
4161
  ];
4162
4162
 
4163
- const mockModel = () => new NodeModel({ id: 'mock', type: 'default', point: { x: 0, y: 0 } });
4164
- function provideCustomNodeMocks() {
4165
- return [
4166
- {
4167
- provide: ComponentEventBusService,
4168
- useValue: {
4169
- pushEvent: () => { },
4170
- },
4171
- },
4172
- {
4173
- provide: NodeAccessorService,
4174
- useFactory: () => ({
4175
- model: signal(mockModel()),
4176
- }),
4177
- },
4178
- FlowEntitiesService,
4179
- // TODO: mocks below should be removed after the major release
4180
- {
4181
- provide: HandleService,
4182
- useFactory: () => ({
4183
- node: signal(mockModel()),
4184
- createHandle: () => { },
4185
- destroyHandle: () => { },
4186
- }),
4187
- },
4188
- {
4189
- provide: RootPointerDirective,
4190
- useValue: {
4191
- pointerMovement$: of({
4192
- x: 0,
4193
- y: 0,
4194
- movementX: 0,
4195
- movementY: 0,
4196
- target: null,
4197
- originalEvent: null,
4198
- }),
4199
- documentPointerEnd$: of(null),
4200
- },
4201
- },
4202
- {
4203
- provide: SpacePointContextDirective,
4204
- useValue: {
4205
- documentPointToFlowPoint: (point) => point,
4206
- },
4207
- },
4208
- {
4209
- provide: SelectionService,
4210
- useValue: {
4211
- select: () => { },
4212
- },
4213
- },
4214
- FlowSettingsService,
4215
- ViewportService,
4216
- ];
4217
- }
4218
-
4219
- class EdgeTemplateMockDirective {
4220
- constructor() {
4221
- this.templateRef = inject(TemplateRef);
4222
- }
4223
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgeTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4224
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: EdgeTemplateMockDirective, isStandalone: true, selector: "ng-template[edge]", ngImport: i0 }); }
4225
- }
4226
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgeTemplateMockDirective, decorators: [{
4227
- type: Directive,
4228
- args: [{
4229
- standalone: true,
4230
- selector: 'ng-template[edge]',
4231
- }]
4232
- }] });
4233
- class ConnectionTemplateMockDirective {
4234
- constructor() {
4235
- this.templateRef = inject(TemplateRef);
4236
- }
4237
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConnectionTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4238
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: ConnectionTemplateMockDirective, isStandalone: true, selector: "ng-template[connection]", ngImport: i0 }); }
4239
- }
4240
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConnectionTemplateMockDirective, decorators: [{
4241
- type: Directive,
4242
- args: [{
4243
- standalone: true,
4244
- selector: 'ng-template[connection]',
4245
- }]
4246
- }] });
4247
- class EdgeLabelHtmlTemplateMockDirective {
4248
- constructor() {
4249
- this.templateRef = inject(TemplateRef);
4250
- }
4251
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgeLabelHtmlTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4252
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: EdgeLabelHtmlTemplateMockDirective, isStandalone: true, selector: "ng-template[edgeLabelHtml]", ngImport: i0 }); }
4253
- }
4254
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgeLabelHtmlTemplateMockDirective, decorators: [{
4255
- type: Directive,
4256
- args: [{
4257
- standalone: true,
4258
- selector: 'ng-template[edgeLabelHtml]',
4259
- }]
4260
- }] });
4261
- class NodeHtmlTemplateMockDirective {
4262
- constructor() {
4263
- this.templateRef = inject(TemplateRef);
4264
- }
4265
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeHtmlTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4266
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: NodeHtmlTemplateMockDirective, isStandalone: true, selector: "ng-template[nodeHtml]", ngImport: i0 }); }
4267
- }
4268
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeHtmlTemplateMockDirective, decorators: [{
4269
- type: Directive,
4270
- args: [{
4271
- standalone: true,
4272
- selector: 'ng-template[nodeHtml]',
4273
- }]
4274
- }] });
4275
- class NodeSvgTemplateMockDirective {
4276
- constructor() {
4277
- this.templateRef = inject(TemplateRef);
4278
- }
4279
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeSvgTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4280
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: NodeSvgTemplateMockDirective, isStandalone: true, selector: "ng-template[nodeSvg]", ngImport: i0 }); }
4281
- }
4282
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeSvgTemplateMockDirective, decorators: [{
4283
- type: Directive,
4284
- args: [{
4285
- standalone: true,
4286
- selector: 'ng-template[nodeSvg]',
4287
- }]
4288
- }] });
4289
- class GroupNodeTemplateMockDirective {
4290
- constructor() {
4291
- this.templateRef = inject(TemplateRef);
4292
- }
4293
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GroupNodeTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4294
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: GroupNodeTemplateMockDirective, isStandalone: true, selector: "ng-template[groupNode]", ngImport: i0 }); }
4295
- }
4296
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GroupNodeTemplateMockDirective, decorators: [{
4297
- type: Directive,
4298
- args: [{
4299
- standalone: true,
4300
- selector: 'ng-template[groupNode]',
4301
- }]
4302
- }] });
4303
- class HandleTemplateMockDirective {
4304
- constructor() {
4305
- this.templateRef = inject(TemplateRef);
4306
- }
4307
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4308
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: HandleTemplateMockDirective, isStandalone: true, selector: "ng-template[handle]", ngImport: i0 }); }
4309
- }
4310
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleTemplateMockDirective, decorators: [{
4311
- type: Directive,
4312
- args: [{
4313
- standalone: true,
4314
- selector: 'ng-template[handle]',
4315
- }]
4316
- }] });
4317
-
4318
- class VflowMockComponent {
4319
- constructor() {
4320
- this.view = [400, 400];
4321
- this.minZoom = 0.5;
4322
- this.maxZoom = 3;
4323
- this.background = '#fff';
4324
- this.optimization = input({
4325
- detachedGroupsLayer: false,
4326
- });
4327
- this.entitiesSelectable = true;
4328
- this.keyboardShortcuts = {
4329
- multiSelection: null,
4330
- };
4331
- this.connection = new ConnectionModel({});
4332
- // eslint-disable-next-line @angular-eslint/no-output-on-prefix
4333
- this.onComponentNodeEvent = output();
4334
- this.nodeTemplateDirective = contentChild(NodeHtmlTemplateMockDirective);
4335
- this.groupNodeTemplateDirective = contentChild(GroupNodeTemplateMockDirective);
4336
- this.edgeTemplateDirective = contentChild(EdgeTemplateMockDirective);
4337
- this.edgeLabelHtmlDirective = contentChild(EdgeLabelHtmlTemplateMockDirective);
4338
- this.connectionTemplateDirective = contentChild(ConnectionTemplateMockDirective);
4339
- this.viewport = signal({
4340
- x: 0,
4341
- y: 0,
4342
- zoom: 1,
4343
- });
4344
- this.nodesChange = signal([]);
4345
- this.edgesChange = signal([]);
4346
- this.viewportChange$ = toObservable(this.viewport);
4347
- this.nodesChange$ = toObservable(this.nodesChange);
4348
- this.edgesChange$ = toObservable(this.edgesChange);
4349
- }
4350
- // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
4351
- ngOnInit() { }
4352
- viewportTo(viewport) {
4353
- this.viewport.set(viewport);
4354
- }
4355
- zoomTo(zoom) {
4356
- this.viewport.update((prev) => ({ ...prev, zoom }));
4357
- }
4358
- panTo(point) {
4359
- this.viewport.update((prev) => ({ ...prev, x: point.x, y: point.y }));
4360
- }
4361
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4362
- fitView(options) { }
4363
- documentPointToFlowPoint(point, options) {
4364
- if (options?.spaces) {
4365
- return [
4366
- {
4367
- nodeId: null,
4368
- x: point.x,
4369
- y: point.y,
4370
- },
4371
- ];
4372
- }
4373
- return point;
4374
- }
4375
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4376
- getIntesectingNodes(nodeId, options) {
4377
- return [];
4378
- }
4379
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4380
- toNodeSpace(nodeId, spaceNodeId) {
4381
- return { x: 0, y: 0 };
4382
- }
4383
- getNode(id) {
4384
- return this.nodes.find((node) => node.id === id);
4385
- }
4386
- getDetachedEdges() {
4387
- return [];
4388
- }
4389
- createSignal(value) {
4390
- return signal(value);
4391
- }
4392
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VflowMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4393
- 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: `
4394
- <ng-content />
4395
-
4396
- @for (node of nodes; track $index) {
4397
- @if (node.type === 'html-template') {
4398
- <ng-component
4399
- [ngTemplateOutlet]="nodeTemplateDirective()?.templateRef ?? null"
4400
- [ngTemplateOutletContext]="{
4401
- $implicit: {
4402
- node: node,
4403
- selected: createSignal(false),
4404
- },
4405
- }" />
4406
- }
4407
-
4408
- @if (node.type === 'template-group') {
4409
- <ng-component
4410
- [ngTemplateOutlet]="groupNodeTemplateDirective()?.templateRef ?? null"
4411
- [ngTemplateOutletContext]="{
4412
- $implicit: {
4413
- node: node,
4414
- selected: createSignal(false),
4415
- width: createSignal(node.width),
4416
- height: createSignal(node.height),
4417
- },
4418
- }" />
4419
- }
4420
- }
4421
-
4422
- @for (edge of edges; track $index) {
4423
- @if (edge.type === 'template') {
4424
- <ng-component
4425
- [ngTemplateOutlet]="edgeTemplateDirective()?.templateRef ?? null"
4426
- [ngTemplateOutletContext]="{
4427
- $implicit: {
4428
- edge: edge,
4429
- selected: createSignal(false),
4430
- path: createSignal(''),
4431
- markerStart: createSignal(''),
4432
- markerEnd: createSignal(''),
4433
- },
4434
- }" />
4435
-
4436
- @if (edge.edgeLabels?.start) {
4437
- <ng-component
4438
- [ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
4439
- [ngTemplateOutletContext]="{
4440
- $implicit: {
4441
- edge: edge,
4442
- },
4443
- }" />
4444
- }
4445
-
4446
- @if (edge.edgeLabels?.center) {
4447
- <ng-component
4448
- [ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
4449
- [ngTemplateOutletContext]="{
4450
- $implicit: {
4451
- edge: edge,
4452
- label: edge.edgeLabels?.center,
4453
- },
4454
- }" />
4455
- }
4456
-
4457
- @if (edge.edgeLabels?.end) {
4458
- <ng-component
4459
- [ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
4460
- [ngTemplateOutletContext]="{
4461
- $implicit: {
4462
- edge: edge,
4463
- label: edge.edgeLabels?.end,
4464
- },
4465
- }" />
4466
- }
4467
- }
4468
- }
4469
-
4470
- @if (connection.type === 'template') {
4471
- <ng-component
4472
- [ngTemplateOutlet]="connectionTemplateDirective()?.templateRef ?? null"
4473
- [ngTemplateOutletContext]="{
4474
- $implicit: {
4475
- path: createSignal(''),
4476
- marker: createSignal(''),
4477
- },
4478
- }" />
4479
- }
4480
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4481
- }
4482
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VflowMockComponent, decorators: [{
4483
- type: Component,
4484
- args: [{
4485
- selector: 'vflow',
4486
- template: `
4487
- <ng-content />
4488
-
4489
- @for (node of nodes; track $index) {
4490
- @if (node.type === 'html-template') {
4491
- <ng-component
4492
- [ngTemplateOutlet]="nodeTemplateDirective()?.templateRef ?? null"
4493
- [ngTemplateOutletContext]="{
4494
- $implicit: {
4495
- node: node,
4496
- selected: createSignal(false),
4497
- },
4498
- }" />
4499
- }
4500
-
4501
- @if (node.type === 'template-group') {
4502
- <ng-component
4503
- [ngTemplateOutlet]="groupNodeTemplateDirective()?.templateRef ?? null"
4504
- [ngTemplateOutletContext]="{
4505
- $implicit: {
4506
- node: node,
4507
- selected: createSignal(false),
4508
- width: createSignal(node.width),
4509
- height: createSignal(node.height),
4510
- },
4511
- }" />
4512
- }
4513
- }
4514
-
4515
- @for (edge of edges; track $index) {
4516
- @if (edge.type === 'template') {
4517
- <ng-component
4518
- [ngTemplateOutlet]="edgeTemplateDirective()?.templateRef ?? null"
4519
- [ngTemplateOutletContext]="{
4520
- $implicit: {
4521
- edge: edge,
4522
- selected: createSignal(false),
4523
- path: createSignal(''),
4524
- markerStart: createSignal(''),
4525
- markerEnd: createSignal(''),
4526
- },
4527
- }" />
4528
-
4529
- @if (edge.edgeLabels?.start) {
4530
- <ng-component
4531
- [ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
4532
- [ngTemplateOutletContext]="{
4533
- $implicit: {
4534
- edge: edge,
4535
- },
4536
- }" />
4537
- }
4538
-
4539
- @if (edge.edgeLabels?.center) {
4540
- <ng-component
4541
- [ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
4542
- [ngTemplateOutletContext]="{
4543
- $implicit: {
4544
- edge: edge,
4545
- label: edge.edgeLabels?.center,
4546
- },
4547
- }" />
4548
- }
4549
-
4550
- @if (edge.edgeLabels?.end) {
4551
- <ng-component
4552
- [ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
4553
- [ngTemplateOutletContext]="{
4554
- $implicit: {
4555
- edge: edge,
4556
- label: edge.edgeLabels?.end,
4557
- },
4558
- }" />
4559
- }
4560
- }
4561
- }
4562
-
4563
- @if (connection.type === 'template') {
4564
- <ng-component
4565
- [ngTemplateOutlet]="connectionTemplateDirective()?.templateRef ?? null"
4566
- [ngTemplateOutletContext]="{
4567
- $implicit: {
4568
- path: createSignal(''),
4569
- marker: createSignal(''),
4570
- },
4571
- }" />
4572
- }
4573
- `,
4574
- changeDetection: ChangeDetectionStrategy.OnPush,
4575
- standalone: true,
4576
- imports: [NgTemplateOutlet],
4577
- }]
4578
- }], propDecorators: { nodes: [{
4579
- type: Input,
4580
- args: [{ required: true }]
4581
- }], edges: [{
4582
- type: Input
4583
- }], view: [{
4584
- type: Input
4585
- }], minZoom: [{
4586
- type: Input
4587
- }], maxZoom: [{
4588
- type: Input
4589
- }], background: [{
4590
- type: Input
4591
- }], entitiesSelectable: [{
4592
- type: Input
4593
- }], keyboardShortcuts: [{
4594
- type: Input
4595
- }], connection: [{
4596
- type: Input,
4597
- args: [{
4598
- transform: (settings) => new ConnectionModel(settings),
4599
- }]
4600
- }], snapGrid: [{
4601
- type: Input
4602
- }], elevateNodesOnSelect: [{
4603
- type: Input
4604
- }], elevateEdgesOnSelect: [{
4605
- type: Input
4606
- }] } });
4607
-
4608
- class HandleMockComponent {
4609
- constructor() {
4610
- this.position = input.required();
4611
- this.type = input.required();
4612
- this.id = input();
4613
- this.template = input();
4614
- }
4615
- // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
4616
- ngOnInit() { }
4617
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4618
- 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 }); }
4619
- }
4620
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleMockComponent, decorators: [{
4621
- type: Component,
4622
- args: [{
4623
- selector: 'handle',
4624
- template: '',
4625
- changeDetection: ChangeDetectionStrategy.OnPush,
4626
- standalone: true,
4627
- }]
4628
- }] });
4629
-
4630
- class ResizableMockComponent {
4631
- constructor() {
4632
- this.resizable = input();
4633
- this.resizerColor = input('#2e414c');
4634
- this.gap = input(1.5);
4635
- }
4636
- // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
4637
- ngOnInit() { }
4638
- // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
4639
- ngAfterViewInit() { }
4640
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ResizableMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4641
- 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 }); }
4642
- }
4643
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ResizableMockComponent, decorators: [{
4644
- type: Component,
4645
- args: [{
4646
- selector: '[resizable]',
4647
- template: '<ng-content />',
4648
- standalone: true,
4649
- changeDetection: ChangeDetectionStrategy.OnPush,
4650
- }]
4651
- }] });
4652
-
4653
- class MiniMapMockComponent {
4654
- constructor() {
4655
- this.maskColor = input(`rgba(215, 215, 215, 0.6)`);
4656
- this.strokeColor = input(`rgb(200, 200, 200)`);
4657
- this.position = input('bottom-right');
4658
- this.scaleOnHover = input(false);
4659
- }
4660
- // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
4661
- ngOnInit() { }
4662
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MiniMapMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4663
- 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 }); }
4664
- }
4665
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MiniMapMockComponent, decorators: [{
4666
- type: Component,
4667
- args: [{
4668
- selector: 'mini-map',
4669
- template: '',
4670
- standalone: true,
4671
- changeDetection: ChangeDetectionStrategy.OnPush,
4672
- }]
4673
- }] });
4674
-
4675
- class NodeToolbarMockComponent {
4676
- constructor() {
4677
- this.position = input('top');
4678
- }
4679
- // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
4680
- ngOnInit() { }
4681
- // eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
4682
- ngOnDestroy() { }
4683
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeToolbarMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4684
- 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 }); }
4685
- }
4686
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeToolbarMockComponent, decorators: [{
4687
- type: Component,
4688
- args: [{
4689
- selector: 'node-toolbar',
4690
- template: '<ng-content />',
4691
- standalone: true,
4692
- changeDetection: ChangeDetectionStrategy.OnPush,
4693
- }]
4694
- }] });
4695
-
4696
- class ConnectionControllerMockDirective {
4697
- constructor() {
4698
- // eslint-disable-next-line @angular-eslint/no-output-on-prefix
4699
- this.onConnect = output();
4700
- // eslint-disable-next-line @angular-eslint/no-output-on-prefix
4701
- this.onReconnect = output();
4702
- }
4703
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4704
- startConnection(handle) { }
4705
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4706
- startReconnection(handle) { }
4707
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4708
- validateConnection(handle) { }
4709
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4710
- resetValidateConnection(targetHandle) { }
4711
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
4712
- endConnection() { }
4713
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConnectionControllerMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4714
- 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 }); }
4715
- }
4716
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConnectionControllerMockDirective, decorators: [{
4717
- type: Directive,
4718
- args: [{ selector: '[onConnect]', standalone: true }]
4719
- }] });
4720
-
4721
- class DragHandleMockDirective {
4722
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DragHandleMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4723
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: DragHandleMockDirective, isStandalone: true, selector: "[dragHandle]", ngImport: i0 }); }
4724
- }
4725
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DragHandleMockDirective, decorators: [{
4726
- type: Directive,
4727
- args: [{ selector: '[dragHandle]', standalone: true }]
4728
- }] });
4729
-
4730
- class SelectableMockDirective {
4731
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectableMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
4732
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: SelectableMockDirective, isStandalone: true, selector: "[selectable]", ngImport: i0 }); }
4733
- }
4734
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectableMockDirective, decorators: [{
4735
- type: Directive,
4736
- args: [{
4737
- selector: '[selectable]',
4738
- standalone: true,
4739
- }]
4740
- }] });
4741
-
4742
- const VflowMocks = [
4743
- VflowMockComponent,
4744
- HandleMockComponent,
4745
- ResizableMockComponent,
4746
- SelectableMockDirective,
4747
- MiniMapMockComponent,
4748
- NodeToolbarMockComponent,
4749
- DragHandleMockDirective,
4750
- ConnectionControllerMockDirective,
4751
- NodeHtmlTemplateMockDirective,
4752
- GroupNodeTemplateMockDirective,
4753
- EdgeLabelHtmlTemplateMockDirective,
4754
- EdgeTemplateMockDirective,
4755
- ConnectionTemplateMockDirective,
4756
- HandleTemplateMockDirective,
4757
- ];
4758
-
4759
4163
  // Standalone Util
4760
4164
 
4761
4165
  /**
4762
4166
  * Generated bundle index. Do not edit.
4763
4167
  */
4764
4168
 
4765
- export { ChangesControllerDirective, ConnectionControllerDirective, ConnectionControllerMockDirective, ConnectionTemplateDirective, ConnectionTemplateMockDirective, CustomDynamicNodeComponent, CustomNodeComponent, CustomTemplateEdgeComponent, DragHandleDirective, DragHandleMockDirective, EdgeLabelHtmlTemplateDirective, EdgeLabelHtmlTemplateMockDirective, EdgeTemplateDirective, EdgeTemplateMockDirective, GroupNodeTemplateDirective, GroupNodeTemplateMockDirective, HandleComponent, HandleMockComponent, HandleTemplateDirective, HandleTemplateMockDirective, MiniMapComponent, MiniMapMockComponent, NodeHtmlTemplateDirective, NodeHtmlTemplateMockDirective, NodeSvgTemplateDirective, NodeSvgTemplateMockDirective, NodeToolbarComponent, NodeToolbarMockComponent, NodeToolbarWrapperDirective, ResizableComponent, ResizableMockComponent, SelectableDirective, SelectableMockDirective, Vflow, VflowComponent, VflowMockComponent, VflowMocks, isComponentDynamicNode, isComponentStaticNode, isDefaultDynamicGroupNode, isDefaultDynamicNode, isDefaultStaticGroupNode, isDefaultStaticNode, isDynamicNode, isStaticNode, isSvgTemplateDynamicNode, isSvgTemplateStaticNode, isTemplateDynamicGroupNode, isTemplateDynamicNode, isTemplateStaticGroupNode, isTemplateStaticNode, provideCustomNodeMocks };
4169
+ export { ChangesControllerDirective, ConnectionControllerDirective, ConnectionTemplateDirective, CustomDynamicNodeComponent, CustomNodeComponent, CustomTemplateEdgeComponent, DragHandleDirective, EdgeLabelHtmlTemplateDirective, EdgeTemplateDirective, GroupNodeTemplateDirective, HandleComponent, HandleTemplateDirective, MiniMapComponent, NodeHtmlTemplateDirective, NodeSvgTemplateDirective, NodeToolbarComponent, NodeToolbarWrapperDirective, ResizableComponent, SelectableDirective, Vflow, VflowComponent, isComponentDynamicNode, isComponentStaticNode, isDefaultDynamicGroupNode, isDefaultDynamicNode, isDefaultStaticGroupNode, isDefaultStaticNode, isDynamicNode, isStaticNode, isSvgTemplateDynamicNode, isSvgTemplateStaticNode, isTemplateDynamicGroupNode, isTemplateDynamicNode, isTemplateStaticGroupNode, isTemplateStaticNode, ComponentEventBusService as ɵComponentEventBusService, ConnectionModel as ɵConnectionModel, FlowEntitiesService as ɵFlowEntitiesService, FlowSettingsService as ɵFlowSettingsService, HandleModel as ɵHandleModel, HandleService as ɵHandleService, NodeAccessorService as ɵNodeAccessorService, NodeModel as ɵNodeModel, RootPointerDirective as ɵRootPointerDirective, SelectionService as ɵSelectionService, SpacePointContextDirective as ɵSpacePointContextDirective, ViewportService as ɵViewportService };
4766
4170
  //# sourceMappingURL=ngx-vflow.mjs.map