ngx-vflow 1.8.1 → 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.
- package/esm2022/lib/vflow/components/vflow/vflow.component.mjs +5 -3
- package/esm2022/lib/vflow/directives/lazy-for.directive.mjs +243 -0
- package/esm2022/public-api.mjs +14 -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 +245 -601
- package/fesm2022/ngx-vflow.mjs.map +1 -1
- package/lib/vflow/directives/lazy-for.directive.d.ts +94 -0
- package/lib/vflow/models/edge.model.d.ts +2 -2
- package/package.json +9 -3
- package/public-api.d.ts +12 -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/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/{lib/vflow/testing-utils → testing}/provide-custom-node-mocks.d.ts +0 -0
- /package/{lib/vflow/testing-utils → testing}/types.d.ts +0 -0
package/fesm2022/ngx-vflow.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, computed, Injectable, inject, ElementRef, Directive, effect, untracked, TemplateRef, DestroyRef, EventEmitter, OutputEmitterRef, input, NgZone, viewChild, Component, ChangeDetectionStrategy, output, HostListener, Injector, runInInjectionContext,
|
|
2
|
+
import { signal, computed, Injectable, inject, ElementRef, Directive, effect, untracked, TemplateRef, DestroyRef, EventEmitter, OutputEmitterRef, input, NgZone, viewChild, Component, ChangeDetectionStrategy, output, HostListener, Injector, runInInjectionContext, isDevMode, ViewContainerRef, IterableDiffers, ChangeDetectorRef, Input, contentChild, forwardRef } from '@angular/core';
|
|
3
3
|
import { select } from 'd3-selection';
|
|
4
4
|
import { zoomIdentity, zoom } from 'd3-zoom';
|
|
5
|
-
import { switchMap, merge, fromEvent, tap, Subject, Observable, skip, map, pairwise, filter, distinctUntilChanged, observeOn, asyncScheduler, zip, animationFrameScheduler, share, startWith, of } from 'rxjs';
|
|
5
|
+
import { switchMap, merge, fromEvent, tap, Subject, Observable, skip, map, pairwise, filter, distinctUntilChanged, observeOn, asyncScheduler, zip, animationFrameScheduler, share, startWith, from, bufferCount, concatMap, of, delayWhen, animationFrames, take, takeUntil, finalize } from 'rxjs';
|
|
6
6
|
import { toObservable, takeUntilDestroyed, outputFromObservable, toSignal } from '@angular/core/rxjs-interop';
|
|
7
7
|
import { drag } from 'd3-drag';
|
|
8
8
|
import { __decorate } from 'tslib';
|
|
@@ -3232,6 +3232,245 @@ function getSpacePoints(point, groups) {
|
|
|
3232
3232
|
return result;
|
|
3233
3233
|
}
|
|
3234
3234
|
|
|
3235
|
+
/** Enum with lazy render directive state */
|
|
3236
|
+
var LazyForState;
|
|
3237
|
+
(function (LazyForState) {
|
|
3238
|
+
/** Directive is in idle state */
|
|
3239
|
+
LazyForState["idle"] = "idle";
|
|
3240
|
+
/** Directive is rendering */
|
|
3241
|
+
LazyForState["rendering"] = "rendering";
|
|
3242
|
+
})(LazyForState || (LazyForState = {}));
|
|
3243
|
+
/**
|
|
3244
|
+
* Context for an element in lazyFor
|
|
3245
|
+
*/
|
|
3246
|
+
class LazyForContextModel {
|
|
3247
|
+
/** Whether the element is first */
|
|
3248
|
+
get first() {
|
|
3249
|
+
return this.index === 0;
|
|
3250
|
+
}
|
|
3251
|
+
/** Whether the element is last */
|
|
3252
|
+
get last() {
|
|
3253
|
+
return this.index === this.count - 1;
|
|
3254
|
+
}
|
|
3255
|
+
/** Whether the element is even */
|
|
3256
|
+
get even() {
|
|
3257
|
+
return this.index % 2 === 0;
|
|
3258
|
+
}
|
|
3259
|
+
/** Whether the element is odd */
|
|
3260
|
+
get odd() {
|
|
3261
|
+
return !this.even;
|
|
3262
|
+
}
|
|
3263
|
+
constructor($implicit, lazyFor, index, count) {
|
|
3264
|
+
this.$implicit = $implicit;
|
|
3265
|
+
this.lazyFor = lazyFor;
|
|
3266
|
+
this.index = index;
|
|
3267
|
+
this.count = count;
|
|
3268
|
+
}
|
|
3269
|
+
}
|
|
3270
|
+
class LazyForDirective {
|
|
3271
|
+
/**
|
|
3272
|
+
* Asserts the correct type of the context for the template that `lazyFor` will render.
|
|
3273
|
+
*
|
|
3274
|
+
* The presence of this method is a signal to the Ivy template type-check compiler that the
|
|
3275
|
+
* `lazyFor` structural directive renders its template with a specific context type.
|
|
3276
|
+
*/
|
|
3277
|
+
static ngTemplateContextGuard(dir, ctx) {
|
|
3278
|
+
return true;
|
|
3279
|
+
}
|
|
3280
|
+
//#region INPUTS
|
|
3281
|
+
/** Setter for the array to be rendered by the directive */
|
|
3282
|
+
set lazyForOf(lazyFor) {
|
|
3283
|
+
this._lazyFor = lazyFor;
|
|
3284
|
+
this._lazyForDirty = true;
|
|
3285
|
+
}
|
|
3286
|
+
/**
|
|
3287
|
+
* Input - setter for TrackBy function
|
|
3288
|
+
* @description is required
|
|
3289
|
+
*/
|
|
3290
|
+
set lazyForTrackBy(fn) {
|
|
3291
|
+
if (isDevMode() && fn !== null && typeof fn !== 'function') {
|
|
3292
|
+
console.warn(`trackBy must be a function, but received ${JSON.stringify(fn)}. ` +
|
|
3293
|
+
`See https://angular.io/api/common/NgForOf#change-propagation for more information.`);
|
|
3294
|
+
}
|
|
3295
|
+
this._trackByFn = fn;
|
|
3296
|
+
}
|
|
3297
|
+
/**
|
|
3298
|
+
* Setter for the number of items that will be rendered per frame
|
|
3299
|
+
* @param value number of items that will be rendered per frame
|
|
3300
|
+
*/
|
|
3301
|
+
set lazyForItemsPerFrame(value) {
|
|
3302
|
+
if (value <= 0) {
|
|
3303
|
+
if (isDevMode()) {
|
|
3304
|
+
console.warn('Items per frame parameter cannot be lower than 0! Input value was ignored');
|
|
3305
|
+
}
|
|
3306
|
+
return;
|
|
3307
|
+
}
|
|
3308
|
+
this._itemsPerFrame = value;
|
|
3309
|
+
}
|
|
3310
|
+
/** Setter for array item template */
|
|
3311
|
+
set lazyForTemplate(value) {
|
|
3312
|
+
if (value) {
|
|
3313
|
+
this._template = value;
|
|
3314
|
+
}
|
|
3315
|
+
}
|
|
3316
|
+
/** Getter for TrackBy function */
|
|
3317
|
+
get lazyForTrackBy() {
|
|
3318
|
+
return this._trackByFn;
|
|
3319
|
+
}
|
|
3320
|
+
//#endregion
|
|
3321
|
+
constructor() {
|
|
3322
|
+
this._template = inject(TemplateRef);
|
|
3323
|
+
this._viewContainer = inject(ViewContainerRef);
|
|
3324
|
+
this._differs = inject(IterableDiffers);
|
|
3325
|
+
this._cdr = inject(ChangeDetectorRef);
|
|
3326
|
+
this._destroyRef$ = inject(DestroyRef);
|
|
3327
|
+
//#region PROPERTIES
|
|
3328
|
+
/** Array for rendering */
|
|
3329
|
+
this._lazyFor = null;
|
|
3330
|
+
/** lazyFor initialization flag */
|
|
3331
|
+
this._lazyForDirty = true;
|
|
3332
|
+
/** Differ for tracking changes in input array */
|
|
3333
|
+
this._differ = null;
|
|
3334
|
+
/** Number of items to be rendered per frame */
|
|
3335
|
+
this._itemsPerFrame = 5;
|
|
3336
|
+
/** Directive state */
|
|
3337
|
+
this._lazyForState = LazyForState.idle;
|
|
3338
|
+
//#endregion
|
|
3339
|
+
//#region RXJS
|
|
3340
|
+
/** Private subject for stopping dynamic render process */
|
|
3341
|
+
this._rerenderUnsub$ = new Subject();
|
|
3342
|
+
this._destroyRef$.onDestroy(() => this._viewContainer.clear());
|
|
3343
|
+
}
|
|
3344
|
+
/** ngDoCheck hook */
|
|
3345
|
+
ngDoCheck() {
|
|
3346
|
+
if (this._lazyForDirty) {
|
|
3347
|
+
this._lazyForDirty = false;
|
|
3348
|
+
const value = this._lazyFor;
|
|
3349
|
+
if (!this._differ && value) {
|
|
3350
|
+
this._differ = this._differs.find(value).create(this.lazyForTrackBy);
|
|
3351
|
+
}
|
|
3352
|
+
}
|
|
3353
|
+
if (this._differ) {
|
|
3354
|
+
let changes = this._differ.diff(this._lazyFor);
|
|
3355
|
+
if (changes) {
|
|
3356
|
+
if (this._lazyForState === LazyForState.rendering) {
|
|
3357
|
+
/**
|
|
3358
|
+
* If the array changed during an active render process
|
|
3359
|
+
* Need to clear container of all views
|
|
3360
|
+
* And restart rendering from the beginning.
|
|
3361
|
+
*/
|
|
3362
|
+
this._rerenderUnsub$.next();
|
|
3363
|
+
changes = this._differ.diff([]);
|
|
3364
|
+
changes = this._differ.diff(this._lazyFor);
|
|
3365
|
+
this._viewContainer.clear();
|
|
3366
|
+
if (changes) {
|
|
3367
|
+
this.applyChanges(changes);
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
3370
|
+
else {
|
|
3371
|
+
this.applyChanges(changes);
|
|
3372
|
+
}
|
|
3373
|
+
}
|
|
3374
|
+
}
|
|
3375
|
+
}
|
|
3376
|
+
/**
|
|
3377
|
+
* Apply changes detected by differ
|
|
3378
|
+
* @param changes changes
|
|
3379
|
+
*/
|
|
3380
|
+
applyChanges(changes) {
|
|
3381
|
+
const itemDataListToRender = [];
|
|
3382
|
+
changes.forEachOperation((item, adjustedPreviousIndex, currentIndex) => {
|
|
3383
|
+
const itemToPush = {
|
|
3384
|
+
item: { ...item },
|
|
3385
|
+
adjustedPreviousIndex,
|
|
3386
|
+
currentIndex,
|
|
3387
|
+
};
|
|
3388
|
+
itemDataListToRender.push(itemToPush);
|
|
3389
|
+
});
|
|
3390
|
+
this.performLazyRender(itemDataListToRender, changes);
|
|
3391
|
+
}
|
|
3392
|
+
/**
|
|
3393
|
+
* Perform lazy rendering
|
|
3394
|
+
* @param itemDataListToRender list of items to render
|
|
3395
|
+
* @param changes changes
|
|
3396
|
+
*/
|
|
3397
|
+
performLazyRender(itemDataListToRender, changes) {
|
|
3398
|
+
this.updateLazyForState(LazyForState.rendering);
|
|
3399
|
+
this._rerenderUnsub$.next();
|
|
3400
|
+
from(itemDataListToRender)
|
|
3401
|
+
.pipe(bufferCount(this._itemsPerFrame), concatMap((itemList) => of(itemList).pipe(delayWhen(() => animationFrames()))), tap((itemList) => {
|
|
3402
|
+
for (let i = 0; i < itemList.length; i++) {
|
|
3403
|
+
const data = itemList[i];
|
|
3404
|
+
if (data.item.previousIndex === null) {
|
|
3405
|
+
this._viewContainer.createEmbeddedView(this._template, new LazyForContextModel(data.item.item, this._lazyFor, -1, -1), data.currentIndex === null ? undefined : data.currentIndex);
|
|
3406
|
+
}
|
|
3407
|
+
else if (data.currentIndex === null) {
|
|
3408
|
+
this._viewContainer.remove(data.adjustedPreviousIndex === null ? undefined : data.adjustedPreviousIndex);
|
|
3409
|
+
}
|
|
3410
|
+
else if (data.adjustedPreviousIndex !== null) {
|
|
3411
|
+
const view = this._viewContainer.get(data.adjustedPreviousIndex);
|
|
3412
|
+
this._viewContainer.move(view, data.currentIndex);
|
|
3413
|
+
this.applyViewChange(view, data.item);
|
|
3414
|
+
}
|
|
3415
|
+
}
|
|
3416
|
+
this.updateViewContext();
|
|
3417
|
+
this._cdr.markForCheck();
|
|
3418
|
+
}),
|
|
3419
|
+
/** Using take we automatically unsubscribe from the stream when rendering is complete */
|
|
3420
|
+
take(Math.ceil(itemDataListToRender.length / this._itemsPerFrame)), takeUntil(this._rerenderUnsub$), takeUntilDestroyed(this._destroyRef$), finalize(() => {
|
|
3421
|
+
changes.forEachIdentityChange((record) => {
|
|
3422
|
+
const viewRef = (this._viewContainer.get(record.currentIndex));
|
|
3423
|
+
this.applyViewChange(viewRef, record);
|
|
3424
|
+
});
|
|
3425
|
+
this.updateLazyForState(LazyForState.idle);
|
|
3426
|
+
}))
|
|
3427
|
+
.subscribe();
|
|
3428
|
+
}
|
|
3429
|
+
/** Update context (without implicit$) for elements inside view */
|
|
3430
|
+
updateViewContext() {
|
|
3431
|
+
for (let i = 0, ilen = this._viewContainer.length; i < ilen; i++) {
|
|
3432
|
+
const viewRef = (this._viewContainer.get(i));
|
|
3433
|
+
const context = viewRef.context;
|
|
3434
|
+
context.index = i;
|
|
3435
|
+
context.count = ilen;
|
|
3436
|
+
context.lazyFor = this._lazyFor;
|
|
3437
|
+
}
|
|
3438
|
+
}
|
|
3439
|
+
/**
|
|
3440
|
+
* Apply implicit$ context
|
|
3441
|
+
* @param view view
|
|
3442
|
+
* @param record data
|
|
3443
|
+
*/
|
|
3444
|
+
applyViewChange(view, record) {
|
|
3445
|
+
view.context.$implicit = record.item;
|
|
3446
|
+
}
|
|
3447
|
+
/**
|
|
3448
|
+
* Update directive state
|
|
3449
|
+
* @param stateToSet state to set
|
|
3450
|
+
*/
|
|
3451
|
+
updateLazyForState(stateToSet) {
|
|
3452
|
+
this._lazyForState = stateToSet;
|
|
3453
|
+
}
|
|
3454
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LazyForDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3455
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: LazyForDirective, isStandalone: true, selector: "[lazyFor][lazyForOf]", inputs: { lazyForOf: "lazyForOf", lazyForTrackBy: "lazyForTrackBy", lazyForItemsPerFrame: "lazyForItemsPerFrame", lazyForTemplate: "lazyForTemplate" }, ngImport: i0 }); }
|
|
3456
|
+
}
|
|
3457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LazyForDirective, decorators: [{
|
|
3458
|
+
type: Directive,
|
|
3459
|
+
args: [{
|
|
3460
|
+
selector: '[lazyFor][lazyForOf]',
|
|
3461
|
+
standalone: true,
|
|
3462
|
+
}]
|
|
3463
|
+
}], ctorParameters: () => [], propDecorators: { lazyForOf: [{
|
|
3464
|
+
type: Input
|
|
3465
|
+
}], lazyForTrackBy: [{
|
|
3466
|
+
type: Input,
|
|
3467
|
+
args: [{ required: true }]
|
|
3468
|
+
}], lazyForItemsPerFrame: [{
|
|
3469
|
+
type: Input
|
|
3470
|
+
}], lazyForTemplate: [{
|
|
3471
|
+
type: Input
|
|
3472
|
+
}] } });
|
|
3473
|
+
|
|
3235
3474
|
const changesControllerHostDirective = {
|
|
3236
3475
|
directive: ChangesControllerDirective,
|
|
3237
3476
|
outputs: [
|
|
@@ -3546,7 +3785,7 @@ class VflowComponent {
|
|
|
3546
3785
|
ComponentEventBusService,
|
|
3547
3786
|
KeyboardService,
|
|
3548
3787
|
OverlaysService,
|
|
3549
|
-
], queries: [{ propertyName: "nodeTemplateDirective", first: true, predicate: NodeHtmlTemplateDirective, descendants: true, isSignal: true }, { propertyName: "nodeSvgTemplateDirective", first: true, predicate: NodeSvgTemplateDirective, descendants: true, isSignal: true }, { propertyName: "groupNodeTemplateDirective", first: true, predicate: GroupNodeTemplateDirective, descendants: true, isSignal: true }, { propertyName: "edgeTemplateDirective", first: true, predicate: EdgeTemplateDirective, descendants: true, isSignal: true }, { propertyName: "edgeLabelHtmlDirective", first: true, predicate: EdgeLabelHtmlTemplateDirective, descendants: true, isSignal: true }, { propertyName: "connectionTemplateDirective", first: true, predicate: ConnectionTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "mapContext", first: true, predicate: MapContextDirective, descendants: true, isSignal: true }, { propertyName: "spacePointContext", first: true, predicate: SpacePointContextDirective, descendants: true, isSignal: true }], hostDirectives: [{ directive: ChangesControllerDirective, outputs: ["onNodesChange", "onNodesChange", "onNodesChange.position", "onNodesChange.position", "onNodesChange.position.single", "onNodesChange.position.single", "onNodesChange.position.many", "onNodesChange.position.many", "onNodesChange.size", "onNodesChange.size", "onNodesChange.size.single", "onNodesChange.size.single", "onNodesChange.size.many", "onNodesChange.size.many", "onNodesChange.add", "onNodesChange.add", "onNodesChange.add.single", "onNodesChange.add.single", "onNodesChange.add.many", "onNodesChange.add.many", "onNodesChange.remove", "onNodesChange.remove", "onNodesChange.remove.single", "onNodesChange.remove.single", "onNodesChange.remove.many", "onNodesChange.remove.many", "onNodesChange.select", "onNodesChange.select", "onNodesChange.select.single", "onNodesChange.select.single", "onNodesChange.select.many", "onNodesChange.select.many", "onEdgesChange", "onEdgesChange", "onEdgesChange.detached", "onEdgesChange.detached", "onEdgesChange.detached.single", "onEdgesChange.detached.single", "onEdgesChange.detached.many", "onEdgesChange.detached.many", "onEdgesChange.add", "onEdgesChange.add", "onEdgesChange.add.single", "onEdgesChange.add.single", "onEdgesChange.add.many", "onEdgesChange.add.many", "onEdgesChange.remove", "onEdgesChange.remove", "onEdgesChange.remove.single", "onEdgesChange.remove.single", "onEdgesChange.remove.many", "onEdgesChange.remove.many", "onEdgesChange.select", "onEdgesChange.select", "onEdgesChange.select.single", "onEdgesChange.select.single", "onEdgesChange.select.many", "onEdgesChange.select.many"] }], ngImport: i0, template: "<svg:svg #flow rootSvgRef rootSvgContext rootPointer flowSizeController class=\"root-svg\">\n <defs flowDefs [markers]=\"markers()\" />\n\n <g background />\n\n <svg:g mapContext spacePointContext>\n <!-- Connection -->\n <svg:g connection [model]=\"connection\" [template]=\"connectionTemplateDirective()?.templateRef\" />\n\n @if (optimization().detachedGroupsLayer) {\n <!-- Groups -->\n
|
|
3788
|
+
], queries: [{ propertyName: "nodeTemplateDirective", first: true, predicate: NodeHtmlTemplateDirective, descendants: true, isSignal: true }, { propertyName: "nodeSvgTemplateDirective", first: true, predicate: NodeSvgTemplateDirective, descendants: true, isSignal: true }, { propertyName: "groupNodeTemplateDirective", first: true, predicate: GroupNodeTemplateDirective, descendants: true, isSignal: true }, { propertyName: "edgeTemplateDirective", first: true, predicate: EdgeTemplateDirective, descendants: true, isSignal: true }, { propertyName: "edgeLabelHtmlDirective", first: true, predicate: EdgeLabelHtmlTemplateDirective, descendants: true, isSignal: true }, { propertyName: "connectionTemplateDirective", first: true, predicate: ConnectionTemplateDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "mapContext", first: true, predicate: MapContextDirective, descendants: true, isSignal: true }, { propertyName: "spacePointContext", first: true, predicate: SpacePointContextDirective, descendants: true, isSignal: true }], hostDirectives: [{ directive: ChangesControllerDirective, outputs: ["onNodesChange", "onNodesChange", "onNodesChange.position", "onNodesChange.position", "onNodesChange.position.single", "onNodesChange.position.single", "onNodesChange.position.many", "onNodesChange.position.many", "onNodesChange.size", "onNodesChange.size", "onNodesChange.size.single", "onNodesChange.size.single", "onNodesChange.size.many", "onNodesChange.size.many", "onNodesChange.add", "onNodesChange.add", "onNodesChange.add.single", "onNodesChange.add.single", "onNodesChange.add.many", "onNodesChange.add.many", "onNodesChange.remove", "onNodesChange.remove", "onNodesChange.remove.single", "onNodesChange.remove.single", "onNodesChange.remove.many", "onNodesChange.remove.many", "onNodesChange.select", "onNodesChange.select", "onNodesChange.select.single", "onNodesChange.select.single", "onNodesChange.select.many", "onNodesChange.select.many", "onEdgesChange", "onEdgesChange", "onEdgesChange.detached", "onEdgesChange.detached", "onEdgesChange.detached.single", "onEdgesChange.detached.single", "onEdgesChange.detached.many", "onEdgesChange.detached.many", "onEdgesChange.add", "onEdgesChange.add", "onEdgesChange.add.single", "onEdgesChange.add.single", "onEdgesChange.add.many", "onEdgesChange.add.many", "onEdgesChange.remove", "onEdgesChange.remove", "onEdgesChange.remove.single", "onEdgesChange.remove.single", "onEdgesChange.remove.many", "onEdgesChange.remove.many", "onEdgesChange.select", "onEdgesChange.select", "onEdgesChange.select.single", "onEdgesChange.select.single", "onEdgesChange.select.many", "onEdgesChange.select.many"] }], ngImport: i0, template: "<svg:svg #flow rootSvgRef rootSvgContext rootPointer flowSizeController class=\"root-svg\">\n <defs flowDefs [markers]=\"markers()\" />\n\n <g background />\n\n <svg:g mapContext spacePointContext>\n <!-- Connection -->\n <svg:g connection [model]=\"connection\" [template]=\"connectionTemplateDirective()?.templateRef\" />\n\n @if (optimization().detachedGroupsLayer) {\n <!-- Groups -->\n <svg:g\n *lazyFor=\"let model of groups(); trackBy: trackNodes\"\n node\n [model]=\"model\"\n [groupNodeTemplate]=\"groupNodeTemplateDirective()?.templateRef\"\n [attr.transform]=\"model.pointTransform()\" />\n\n <!-- Edges -->\n <svg:g\n *lazyFor=\"let model of edgeModels(); trackBy: trackEdges\"\n edge\n [model]=\"model\"\n [edgeTemplate]=\"edgeTemplateDirective()?.templateRef\"\n [edgeLabelHtmlTemplate]=\"edgeLabelHtmlDirective()?.templateRef\" />\n\n <!-- Nodes -->\n <svg:g\n *lazyFor=\"let model of nonGroups(); trackBy: trackNodes\"\n node\n [model]=\"model\"\n [nodeTemplate]=\"nodeTemplateDirective()?.templateRef\"\n [nodeSvgTemplate]=\"nodeSvgTemplateDirective()?.templateRef\"\n [attr.transform]=\"model.pointTransform()\" />\n }\n\n @if (!optimization().detachedGroupsLayer) {\n <!-- Edges -->\n <svg:g\n *lazyFor=\"let model of edgeModels(); trackBy: trackEdges\"\n edge\n [model]=\"model\"\n [edgeTemplate]=\"edgeTemplateDirective()?.templateRef\"\n [edgeLabelHtmlTemplate]=\"edgeLabelHtmlDirective()?.templateRef\" />\n\n <!-- Nodes -->\n <svg:g\n *lazyFor=\"let model of nodeModels(); trackBy: trackNodes\"\n node\n [model]=\"model\"\n [nodeTemplate]=\"nodeTemplateDirective()?.templateRef\"\n [nodeSvgTemplate]=\"nodeSvgTemplateDirective()?.templateRef\"\n [groupNodeTemplate]=\"groupNodeTemplateDirective()?.templateRef\"\n [attr.transform]=\"model.pointTransform()\" />\n }\n </svg:g>\n\n <!-- Minimap -->\n @if (minimap(); as minimap) {\n <ng-container [ngTemplateOutlet]=\"minimap.template()\" />\n }\n</svg:svg>\n", styles: [":host{display:block;width:100%;height:100%;-webkit-user-select:none;user-select:none}:host ::ng-deep *{box-sizing:border-box}\n"], dependencies: [{ kind: "directive", type: RootSvgReferenceDirective, selector: "svg[rootSvgRef]" }, { kind: "directive", type: RootSvgContextDirective, selector: "svg[rootSvgContext]" }, { kind: "directive", type: RootPointerDirective, selector: "svg[rootPointer]" }, { kind: "directive", type: FlowSizeControllerDirective, selector: "svg[flowSizeController]" }, { kind: "component", type: DefsComponent, selector: "defs[flowDefs]", inputs: ["markers"] }, { kind: "component", type: BackgroundComponent, selector: "g[background]" }, { kind: "directive", type: MapContextDirective, selector: "g[mapContext]" }, { kind: "directive", type: SpacePointContextDirective, selector: "g[spacePointContext]" }, { kind: "component", type: ConnectionComponent, selector: "g[connection]", inputs: ["model", "template"] }, { kind: "component", type: NodeComponent, selector: "g[node]", inputs: ["model", "nodeTemplate", "nodeSvgTemplate", "groupNodeTemplate"] }, { kind: "component", type: EdgeComponent, selector: "g[edge]", inputs: ["model", "edgeTemplate", "edgeLabelHtmlTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: LazyForDirective, selector: "[lazyFor][lazyForOf]", inputs: ["lazyForOf", "lazyForTrackBy", "lazyForItemsPerFrame", "lazyForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3550
3789
|
}
|
|
3551
3790
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VflowComponent, decorators: [{
|
|
3552
3791
|
type: Component,
|
|
@@ -3577,7 +3816,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
3577
3816
|
NodeComponent,
|
|
3578
3817
|
EdgeComponent,
|
|
3579
3818
|
NgTemplateOutlet,
|
|
3580
|
-
|
|
3819
|
+
LazyForDirective,
|
|
3820
|
+
], template: "<svg:svg #flow rootSvgRef rootSvgContext rootPointer flowSizeController class=\"root-svg\">\n <defs flowDefs [markers]=\"markers()\" />\n\n <g background />\n\n <svg:g mapContext spacePointContext>\n <!-- Connection -->\n <svg:g connection [model]=\"connection\" [template]=\"connectionTemplateDirective()?.templateRef\" />\n\n @if (optimization().detachedGroupsLayer) {\n <!-- Groups -->\n <svg:g\n *lazyFor=\"let model of groups(); trackBy: trackNodes\"\n node\n [model]=\"model\"\n [groupNodeTemplate]=\"groupNodeTemplateDirective()?.templateRef\"\n [attr.transform]=\"model.pointTransform()\" />\n\n <!-- Edges -->\n <svg:g\n *lazyFor=\"let model of edgeModels(); trackBy: trackEdges\"\n edge\n [model]=\"model\"\n [edgeTemplate]=\"edgeTemplateDirective()?.templateRef\"\n [edgeLabelHtmlTemplate]=\"edgeLabelHtmlDirective()?.templateRef\" />\n\n <!-- Nodes -->\n <svg:g\n *lazyFor=\"let model of nonGroups(); trackBy: trackNodes\"\n node\n [model]=\"model\"\n [nodeTemplate]=\"nodeTemplateDirective()?.templateRef\"\n [nodeSvgTemplate]=\"nodeSvgTemplateDirective()?.templateRef\"\n [attr.transform]=\"model.pointTransform()\" />\n }\n\n @if (!optimization().detachedGroupsLayer) {\n <!-- Edges -->\n <svg:g\n *lazyFor=\"let model of edgeModels(); trackBy: trackEdges\"\n edge\n [model]=\"model\"\n [edgeTemplate]=\"edgeTemplateDirective()?.templateRef\"\n [edgeLabelHtmlTemplate]=\"edgeLabelHtmlDirective()?.templateRef\" />\n\n <!-- Nodes -->\n <svg:g\n *lazyFor=\"let model of nodeModels(); trackBy: trackNodes\"\n node\n [model]=\"model\"\n [nodeTemplate]=\"nodeTemplateDirective()?.templateRef\"\n [nodeSvgTemplate]=\"nodeSvgTemplateDirective()?.templateRef\"\n [groupNodeTemplate]=\"groupNodeTemplateDirective()?.templateRef\"\n [attr.transform]=\"model.pointTransform()\" />\n }\n </svg:g>\n\n <!-- Minimap -->\n @if (minimap(); as minimap) {\n <ng-container [ngTemplateOutlet]=\"minimap.template()\" />\n }\n</svg:svg>\n", styles: [":host{display:block;width:100%;height:100%;-webkit-user-select:none;user-select:none}:host ::ng-deep *{box-sizing:border-box}\n"] }]
|
|
3581
3821
|
}], propDecorators: { view: [{
|
|
3582
3822
|
type: Input
|
|
3583
3823
|
}], minZoom: [{
|
|
@@ -3920,607 +4160,11 @@ const Vflow = [
|
|
|
3920
4160
|
HandleTemplateDirective,
|
|
3921
4161
|
];
|
|
3922
4162
|
|
|
3923
|
-
const mockModel = () => new NodeModel({ id: 'mock', type: 'default', point: { x: 0, y: 0 } });
|
|
3924
|
-
function provideCustomNodeMocks() {
|
|
3925
|
-
return [
|
|
3926
|
-
{
|
|
3927
|
-
provide: ComponentEventBusService,
|
|
3928
|
-
useValue: {
|
|
3929
|
-
pushEvent: () => { },
|
|
3930
|
-
},
|
|
3931
|
-
},
|
|
3932
|
-
{
|
|
3933
|
-
provide: NodeAccessorService,
|
|
3934
|
-
useFactory: () => ({
|
|
3935
|
-
model: signal(mockModel()),
|
|
3936
|
-
}),
|
|
3937
|
-
},
|
|
3938
|
-
FlowEntitiesService,
|
|
3939
|
-
// TODO: mocks below should be removed after the major release
|
|
3940
|
-
{
|
|
3941
|
-
provide: HandleService,
|
|
3942
|
-
useFactory: () => ({
|
|
3943
|
-
node: signal(mockModel()),
|
|
3944
|
-
createHandle: () => { },
|
|
3945
|
-
destroyHandle: () => { },
|
|
3946
|
-
}),
|
|
3947
|
-
},
|
|
3948
|
-
{
|
|
3949
|
-
provide: RootPointerDirective,
|
|
3950
|
-
useValue: {
|
|
3951
|
-
pointerMovement$: of({
|
|
3952
|
-
x: 0,
|
|
3953
|
-
y: 0,
|
|
3954
|
-
movementX: 0,
|
|
3955
|
-
movementY: 0,
|
|
3956
|
-
target: null,
|
|
3957
|
-
originalEvent: null,
|
|
3958
|
-
}),
|
|
3959
|
-
documentPointerEnd$: of(null),
|
|
3960
|
-
},
|
|
3961
|
-
},
|
|
3962
|
-
{
|
|
3963
|
-
provide: SpacePointContextDirective,
|
|
3964
|
-
useValue: {
|
|
3965
|
-
documentPointToFlowPoint: (point) => point,
|
|
3966
|
-
},
|
|
3967
|
-
},
|
|
3968
|
-
{
|
|
3969
|
-
provide: SelectionService,
|
|
3970
|
-
useValue: {
|
|
3971
|
-
select: () => { },
|
|
3972
|
-
},
|
|
3973
|
-
},
|
|
3974
|
-
FlowSettingsService,
|
|
3975
|
-
ViewportService,
|
|
3976
|
-
];
|
|
3977
|
-
}
|
|
3978
|
-
|
|
3979
|
-
class EdgeTemplateMockDirective {
|
|
3980
|
-
constructor() {
|
|
3981
|
-
this.templateRef = inject(TemplateRef);
|
|
3982
|
-
}
|
|
3983
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgeTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3984
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: EdgeTemplateMockDirective, isStandalone: true, selector: "ng-template[edge]", ngImport: i0 }); }
|
|
3985
|
-
}
|
|
3986
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgeTemplateMockDirective, decorators: [{
|
|
3987
|
-
type: Directive,
|
|
3988
|
-
args: [{
|
|
3989
|
-
standalone: true,
|
|
3990
|
-
selector: 'ng-template[edge]',
|
|
3991
|
-
}]
|
|
3992
|
-
}] });
|
|
3993
|
-
class ConnectionTemplateMockDirective {
|
|
3994
|
-
constructor() {
|
|
3995
|
-
this.templateRef = inject(TemplateRef);
|
|
3996
|
-
}
|
|
3997
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConnectionTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3998
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: ConnectionTemplateMockDirective, isStandalone: true, selector: "ng-template[connection]", ngImport: i0 }); }
|
|
3999
|
-
}
|
|
4000
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConnectionTemplateMockDirective, decorators: [{
|
|
4001
|
-
type: Directive,
|
|
4002
|
-
args: [{
|
|
4003
|
-
standalone: true,
|
|
4004
|
-
selector: 'ng-template[connection]',
|
|
4005
|
-
}]
|
|
4006
|
-
}] });
|
|
4007
|
-
class EdgeLabelHtmlTemplateMockDirective {
|
|
4008
|
-
constructor() {
|
|
4009
|
-
this.templateRef = inject(TemplateRef);
|
|
4010
|
-
}
|
|
4011
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgeLabelHtmlTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4012
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: EdgeLabelHtmlTemplateMockDirective, isStandalone: true, selector: "ng-template[edgeLabelHtml]", ngImport: i0 }); }
|
|
4013
|
-
}
|
|
4014
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: EdgeLabelHtmlTemplateMockDirective, decorators: [{
|
|
4015
|
-
type: Directive,
|
|
4016
|
-
args: [{
|
|
4017
|
-
standalone: true,
|
|
4018
|
-
selector: 'ng-template[edgeLabelHtml]',
|
|
4019
|
-
}]
|
|
4020
|
-
}] });
|
|
4021
|
-
class NodeHtmlTemplateMockDirective {
|
|
4022
|
-
constructor() {
|
|
4023
|
-
this.templateRef = inject(TemplateRef);
|
|
4024
|
-
}
|
|
4025
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeHtmlTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4026
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: NodeHtmlTemplateMockDirective, isStandalone: true, selector: "ng-template[nodeHtml]", ngImport: i0 }); }
|
|
4027
|
-
}
|
|
4028
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeHtmlTemplateMockDirective, decorators: [{
|
|
4029
|
-
type: Directive,
|
|
4030
|
-
args: [{
|
|
4031
|
-
standalone: true,
|
|
4032
|
-
selector: 'ng-template[nodeHtml]',
|
|
4033
|
-
}]
|
|
4034
|
-
}] });
|
|
4035
|
-
class NodeSvgTemplateMockDirective {
|
|
4036
|
-
constructor() {
|
|
4037
|
-
this.templateRef = inject(TemplateRef);
|
|
4038
|
-
}
|
|
4039
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeSvgTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4040
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: NodeSvgTemplateMockDirective, isStandalone: true, selector: "ng-template[nodeSvg]", ngImport: i0 }); }
|
|
4041
|
-
}
|
|
4042
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeSvgTemplateMockDirective, decorators: [{
|
|
4043
|
-
type: Directive,
|
|
4044
|
-
args: [{
|
|
4045
|
-
standalone: true,
|
|
4046
|
-
selector: 'ng-template[nodeSvg]',
|
|
4047
|
-
}]
|
|
4048
|
-
}] });
|
|
4049
|
-
class GroupNodeTemplateMockDirective {
|
|
4050
|
-
constructor() {
|
|
4051
|
-
this.templateRef = inject(TemplateRef);
|
|
4052
|
-
}
|
|
4053
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GroupNodeTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4054
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: GroupNodeTemplateMockDirective, isStandalone: true, selector: "ng-template[groupNode]", ngImport: i0 }); }
|
|
4055
|
-
}
|
|
4056
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: GroupNodeTemplateMockDirective, decorators: [{
|
|
4057
|
-
type: Directive,
|
|
4058
|
-
args: [{
|
|
4059
|
-
standalone: true,
|
|
4060
|
-
selector: 'ng-template[groupNode]',
|
|
4061
|
-
}]
|
|
4062
|
-
}] });
|
|
4063
|
-
class HandleTemplateMockDirective {
|
|
4064
|
-
constructor() {
|
|
4065
|
-
this.templateRef = inject(TemplateRef);
|
|
4066
|
-
}
|
|
4067
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleTemplateMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4068
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: HandleTemplateMockDirective, isStandalone: true, selector: "ng-template[handle]", ngImport: i0 }); }
|
|
4069
|
-
}
|
|
4070
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleTemplateMockDirective, decorators: [{
|
|
4071
|
-
type: Directive,
|
|
4072
|
-
args: [{
|
|
4073
|
-
standalone: true,
|
|
4074
|
-
selector: 'ng-template[handle]',
|
|
4075
|
-
}]
|
|
4076
|
-
}] });
|
|
4077
|
-
|
|
4078
|
-
class VflowMockComponent {
|
|
4079
|
-
constructor() {
|
|
4080
|
-
this.view = [400, 400];
|
|
4081
|
-
this.minZoom = 0.5;
|
|
4082
|
-
this.maxZoom = 3;
|
|
4083
|
-
this.background = '#fff';
|
|
4084
|
-
this.optimization = input({
|
|
4085
|
-
detachedGroupsLayer: false,
|
|
4086
|
-
});
|
|
4087
|
-
this.entitiesSelectable = true;
|
|
4088
|
-
this.keyboardShortcuts = {
|
|
4089
|
-
multiSelection: null,
|
|
4090
|
-
};
|
|
4091
|
-
this.connection = new ConnectionModel({});
|
|
4092
|
-
// eslint-disable-next-line @angular-eslint/no-output-on-prefix
|
|
4093
|
-
this.onComponentNodeEvent = output();
|
|
4094
|
-
this.nodeTemplateDirective = contentChild(NodeHtmlTemplateMockDirective);
|
|
4095
|
-
this.groupNodeTemplateDirective = contentChild(GroupNodeTemplateMockDirective);
|
|
4096
|
-
this.edgeTemplateDirective = contentChild(EdgeTemplateMockDirective);
|
|
4097
|
-
this.edgeLabelHtmlDirective = contentChild(EdgeLabelHtmlTemplateMockDirective);
|
|
4098
|
-
this.connectionTemplateDirective = contentChild(ConnectionTemplateMockDirective);
|
|
4099
|
-
this.viewport = signal({
|
|
4100
|
-
x: 0,
|
|
4101
|
-
y: 0,
|
|
4102
|
-
zoom: 1,
|
|
4103
|
-
});
|
|
4104
|
-
this.nodesChange = signal([]);
|
|
4105
|
-
this.edgesChange = signal([]);
|
|
4106
|
-
this.viewportChange$ = toObservable(this.viewport);
|
|
4107
|
-
this.nodesChange$ = toObservable(this.nodesChange);
|
|
4108
|
-
this.edgesChange$ = toObservable(this.edgesChange);
|
|
4109
|
-
}
|
|
4110
|
-
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
4111
|
-
ngOnInit() { }
|
|
4112
|
-
viewportTo(viewport) {
|
|
4113
|
-
this.viewport.set(viewport);
|
|
4114
|
-
}
|
|
4115
|
-
zoomTo(zoom) {
|
|
4116
|
-
this.viewport.update((prev) => ({ ...prev, zoom }));
|
|
4117
|
-
}
|
|
4118
|
-
panTo(point) {
|
|
4119
|
-
this.viewport.update((prev) => ({ ...prev, x: point.x, y: point.y }));
|
|
4120
|
-
}
|
|
4121
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4122
|
-
fitView(options) { }
|
|
4123
|
-
documentPointToFlowPoint(point, options) {
|
|
4124
|
-
if (options?.spaces) {
|
|
4125
|
-
return [
|
|
4126
|
-
{
|
|
4127
|
-
nodeId: null,
|
|
4128
|
-
x: point.x,
|
|
4129
|
-
y: point.y,
|
|
4130
|
-
},
|
|
4131
|
-
];
|
|
4132
|
-
}
|
|
4133
|
-
return point;
|
|
4134
|
-
}
|
|
4135
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4136
|
-
getIntesectingNodes(nodeId, options) {
|
|
4137
|
-
return [];
|
|
4138
|
-
}
|
|
4139
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4140
|
-
toNodeSpace(nodeId, spaceNodeId) {
|
|
4141
|
-
return { x: 0, y: 0 };
|
|
4142
|
-
}
|
|
4143
|
-
getNode(id) {
|
|
4144
|
-
return this.nodes.find((node) => node.id === id);
|
|
4145
|
-
}
|
|
4146
|
-
getDetachedEdges() {
|
|
4147
|
-
return [];
|
|
4148
|
-
}
|
|
4149
|
-
createSignal(value) {
|
|
4150
|
-
return signal(value);
|
|
4151
|
-
}
|
|
4152
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VflowMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4153
|
-
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: `
|
|
4154
|
-
<ng-content />
|
|
4155
|
-
|
|
4156
|
-
@for (node of nodes; track $index) {
|
|
4157
|
-
@if (node.type === 'html-template') {
|
|
4158
|
-
<ng-component
|
|
4159
|
-
[ngTemplateOutlet]="nodeTemplateDirective()?.templateRef ?? null"
|
|
4160
|
-
[ngTemplateOutletContext]="{
|
|
4161
|
-
$implicit: {
|
|
4162
|
-
node: node,
|
|
4163
|
-
selected: createSignal(false),
|
|
4164
|
-
},
|
|
4165
|
-
}" />
|
|
4166
|
-
}
|
|
4167
|
-
|
|
4168
|
-
@if (node.type === 'template-group') {
|
|
4169
|
-
<ng-component
|
|
4170
|
-
[ngTemplateOutlet]="groupNodeTemplateDirective()?.templateRef ?? null"
|
|
4171
|
-
[ngTemplateOutletContext]="{
|
|
4172
|
-
$implicit: {
|
|
4173
|
-
node: node,
|
|
4174
|
-
selected: createSignal(false),
|
|
4175
|
-
width: createSignal(node.width),
|
|
4176
|
-
height: createSignal(node.height),
|
|
4177
|
-
},
|
|
4178
|
-
}" />
|
|
4179
|
-
}
|
|
4180
|
-
}
|
|
4181
|
-
|
|
4182
|
-
@for (edge of edges; track $index) {
|
|
4183
|
-
@if (edge.type === 'template') {
|
|
4184
|
-
<ng-component
|
|
4185
|
-
[ngTemplateOutlet]="edgeTemplateDirective()?.templateRef ?? null"
|
|
4186
|
-
[ngTemplateOutletContext]="{
|
|
4187
|
-
$implicit: {
|
|
4188
|
-
edge: edge,
|
|
4189
|
-
selected: createSignal(false),
|
|
4190
|
-
path: createSignal(''),
|
|
4191
|
-
markerStart: createSignal(''),
|
|
4192
|
-
markerEnd: createSignal(''),
|
|
4193
|
-
},
|
|
4194
|
-
}" />
|
|
4195
|
-
|
|
4196
|
-
@if (edge.edgeLabels?.start) {
|
|
4197
|
-
<ng-component
|
|
4198
|
-
[ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
|
|
4199
|
-
[ngTemplateOutletContext]="{
|
|
4200
|
-
$implicit: {
|
|
4201
|
-
edge: edge,
|
|
4202
|
-
},
|
|
4203
|
-
}" />
|
|
4204
|
-
}
|
|
4205
|
-
|
|
4206
|
-
@if (edge.edgeLabels?.center) {
|
|
4207
|
-
<ng-component
|
|
4208
|
-
[ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
|
|
4209
|
-
[ngTemplateOutletContext]="{
|
|
4210
|
-
$implicit: {
|
|
4211
|
-
edge: edge,
|
|
4212
|
-
label: edge.edgeLabels?.center,
|
|
4213
|
-
},
|
|
4214
|
-
}" />
|
|
4215
|
-
}
|
|
4216
|
-
|
|
4217
|
-
@if (edge.edgeLabels?.end) {
|
|
4218
|
-
<ng-component
|
|
4219
|
-
[ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
|
|
4220
|
-
[ngTemplateOutletContext]="{
|
|
4221
|
-
$implicit: {
|
|
4222
|
-
edge: edge,
|
|
4223
|
-
label: edge.edgeLabels?.end,
|
|
4224
|
-
},
|
|
4225
|
-
}" />
|
|
4226
|
-
}
|
|
4227
|
-
}
|
|
4228
|
-
}
|
|
4229
|
-
|
|
4230
|
-
@if (connection.type === 'template') {
|
|
4231
|
-
<ng-component
|
|
4232
|
-
[ngTemplateOutlet]="connectionTemplateDirective()?.templateRef ?? null"
|
|
4233
|
-
[ngTemplateOutletContext]="{
|
|
4234
|
-
$implicit: {
|
|
4235
|
-
path: createSignal(''),
|
|
4236
|
-
marker: createSignal(''),
|
|
4237
|
-
},
|
|
4238
|
-
}" />
|
|
4239
|
-
}
|
|
4240
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4241
|
-
}
|
|
4242
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: VflowMockComponent, decorators: [{
|
|
4243
|
-
type: Component,
|
|
4244
|
-
args: [{
|
|
4245
|
-
selector: 'vflow',
|
|
4246
|
-
template: `
|
|
4247
|
-
<ng-content />
|
|
4248
|
-
|
|
4249
|
-
@for (node of nodes; track $index) {
|
|
4250
|
-
@if (node.type === 'html-template') {
|
|
4251
|
-
<ng-component
|
|
4252
|
-
[ngTemplateOutlet]="nodeTemplateDirective()?.templateRef ?? null"
|
|
4253
|
-
[ngTemplateOutletContext]="{
|
|
4254
|
-
$implicit: {
|
|
4255
|
-
node: node,
|
|
4256
|
-
selected: createSignal(false),
|
|
4257
|
-
},
|
|
4258
|
-
}" />
|
|
4259
|
-
}
|
|
4260
|
-
|
|
4261
|
-
@if (node.type === 'template-group') {
|
|
4262
|
-
<ng-component
|
|
4263
|
-
[ngTemplateOutlet]="groupNodeTemplateDirective()?.templateRef ?? null"
|
|
4264
|
-
[ngTemplateOutletContext]="{
|
|
4265
|
-
$implicit: {
|
|
4266
|
-
node: node,
|
|
4267
|
-
selected: createSignal(false),
|
|
4268
|
-
width: createSignal(node.width),
|
|
4269
|
-
height: createSignal(node.height),
|
|
4270
|
-
},
|
|
4271
|
-
}" />
|
|
4272
|
-
}
|
|
4273
|
-
}
|
|
4274
|
-
|
|
4275
|
-
@for (edge of edges; track $index) {
|
|
4276
|
-
@if (edge.type === 'template') {
|
|
4277
|
-
<ng-component
|
|
4278
|
-
[ngTemplateOutlet]="edgeTemplateDirective()?.templateRef ?? null"
|
|
4279
|
-
[ngTemplateOutletContext]="{
|
|
4280
|
-
$implicit: {
|
|
4281
|
-
edge: edge,
|
|
4282
|
-
selected: createSignal(false),
|
|
4283
|
-
path: createSignal(''),
|
|
4284
|
-
markerStart: createSignal(''),
|
|
4285
|
-
markerEnd: createSignal(''),
|
|
4286
|
-
},
|
|
4287
|
-
}" />
|
|
4288
|
-
|
|
4289
|
-
@if (edge.edgeLabels?.start) {
|
|
4290
|
-
<ng-component
|
|
4291
|
-
[ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
|
|
4292
|
-
[ngTemplateOutletContext]="{
|
|
4293
|
-
$implicit: {
|
|
4294
|
-
edge: edge,
|
|
4295
|
-
},
|
|
4296
|
-
}" />
|
|
4297
|
-
}
|
|
4298
|
-
|
|
4299
|
-
@if (edge.edgeLabels?.center) {
|
|
4300
|
-
<ng-component
|
|
4301
|
-
[ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
|
|
4302
|
-
[ngTemplateOutletContext]="{
|
|
4303
|
-
$implicit: {
|
|
4304
|
-
edge: edge,
|
|
4305
|
-
label: edge.edgeLabels?.center,
|
|
4306
|
-
},
|
|
4307
|
-
}" />
|
|
4308
|
-
}
|
|
4309
|
-
|
|
4310
|
-
@if (edge.edgeLabels?.end) {
|
|
4311
|
-
<ng-component
|
|
4312
|
-
[ngTemplateOutlet]="edgeLabelHtmlDirective()?.templateRef ?? null"
|
|
4313
|
-
[ngTemplateOutletContext]="{
|
|
4314
|
-
$implicit: {
|
|
4315
|
-
edge: edge,
|
|
4316
|
-
label: edge.edgeLabels?.end,
|
|
4317
|
-
},
|
|
4318
|
-
}" />
|
|
4319
|
-
}
|
|
4320
|
-
}
|
|
4321
|
-
}
|
|
4322
|
-
|
|
4323
|
-
@if (connection.type === 'template') {
|
|
4324
|
-
<ng-component
|
|
4325
|
-
[ngTemplateOutlet]="connectionTemplateDirective()?.templateRef ?? null"
|
|
4326
|
-
[ngTemplateOutletContext]="{
|
|
4327
|
-
$implicit: {
|
|
4328
|
-
path: createSignal(''),
|
|
4329
|
-
marker: createSignal(''),
|
|
4330
|
-
},
|
|
4331
|
-
}" />
|
|
4332
|
-
}
|
|
4333
|
-
`,
|
|
4334
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4335
|
-
standalone: true,
|
|
4336
|
-
imports: [NgTemplateOutlet],
|
|
4337
|
-
}]
|
|
4338
|
-
}], propDecorators: { nodes: [{
|
|
4339
|
-
type: Input,
|
|
4340
|
-
args: [{ required: true }]
|
|
4341
|
-
}], edges: [{
|
|
4342
|
-
type: Input
|
|
4343
|
-
}], view: [{
|
|
4344
|
-
type: Input
|
|
4345
|
-
}], minZoom: [{
|
|
4346
|
-
type: Input
|
|
4347
|
-
}], maxZoom: [{
|
|
4348
|
-
type: Input
|
|
4349
|
-
}], background: [{
|
|
4350
|
-
type: Input
|
|
4351
|
-
}], entitiesSelectable: [{
|
|
4352
|
-
type: Input
|
|
4353
|
-
}], keyboardShortcuts: [{
|
|
4354
|
-
type: Input
|
|
4355
|
-
}], connection: [{
|
|
4356
|
-
type: Input,
|
|
4357
|
-
args: [{
|
|
4358
|
-
transform: (settings) => new ConnectionModel(settings),
|
|
4359
|
-
}]
|
|
4360
|
-
}], snapGrid: [{
|
|
4361
|
-
type: Input
|
|
4362
|
-
}], elevateNodesOnSelect: [{
|
|
4363
|
-
type: Input
|
|
4364
|
-
}], elevateEdgesOnSelect: [{
|
|
4365
|
-
type: Input
|
|
4366
|
-
}] } });
|
|
4367
|
-
|
|
4368
|
-
class HandleMockComponent {
|
|
4369
|
-
constructor() {
|
|
4370
|
-
this.position = input.required();
|
|
4371
|
-
this.type = input.required();
|
|
4372
|
-
this.id = input();
|
|
4373
|
-
this.template = input();
|
|
4374
|
-
}
|
|
4375
|
-
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
4376
|
-
ngOnInit() { }
|
|
4377
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4378
|
-
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 }); }
|
|
4379
|
-
}
|
|
4380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: HandleMockComponent, decorators: [{
|
|
4381
|
-
type: Component,
|
|
4382
|
-
args: [{
|
|
4383
|
-
selector: 'handle',
|
|
4384
|
-
template: '',
|
|
4385
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4386
|
-
standalone: true,
|
|
4387
|
-
}]
|
|
4388
|
-
}] });
|
|
4389
|
-
|
|
4390
|
-
class ResizableMockComponent {
|
|
4391
|
-
constructor() {
|
|
4392
|
-
this.resizable = input();
|
|
4393
|
-
this.resizerColor = input('#2e414c');
|
|
4394
|
-
this.gap = input(1.5);
|
|
4395
|
-
}
|
|
4396
|
-
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
4397
|
-
ngOnInit() { }
|
|
4398
|
-
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
4399
|
-
ngAfterViewInit() { }
|
|
4400
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ResizableMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4401
|
-
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 }); }
|
|
4402
|
-
}
|
|
4403
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ResizableMockComponent, decorators: [{
|
|
4404
|
-
type: Component,
|
|
4405
|
-
args: [{
|
|
4406
|
-
selector: '[resizable]',
|
|
4407
|
-
template: '<ng-content />',
|
|
4408
|
-
standalone: true,
|
|
4409
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4410
|
-
}]
|
|
4411
|
-
}] });
|
|
4412
|
-
|
|
4413
|
-
class MiniMapMockComponent {
|
|
4414
|
-
constructor() {
|
|
4415
|
-
this.maskColor = input(`rgba(215, 215, 215, 0.6)`);
|
|
4416
|
-
this.strokeColor = input(`rgb(200, 200, 200)`);
|
|
4417
|
-
this.position = input('bottom-right');
|
|
4418
|
-
this.scaleOnHover = input(false);
|
|
4419
|
-
}
|
|
4420
|
-
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
4421
|
-
ngOnInit() { }
|
|
4422
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MiniMapMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4423
|
-
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 }); }
|
|
4424
|
-
}
|
|
4425
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: MiniMapMockComponent, decorators: [{
|
|
4426
|
-
type: Component,
|
|
4427
|
-
args: [{
|
|
4428
|
-
selector: 'mini-map',
|
|
4429
|
-
template: '',
|
|
4430
|
-
standalone: true,
|
|
4431
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4432
|
-
}]
|
|
4433
|
-
}] });
|
|
4434
|
-
|
|
4435
|
-
class NodeToolbarMockComponent {
|
|
4436
|
-
constructor() {
|
|
4437
|
-
this.position = input('top');
|
|
4438
|
-
}
|
|
4439
|
-
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
4440
|
-
ngOnInit() { }
|
|
4441
|
-
// eslint-disable-next-line @angular-eslint/no-empty-lifecycle-method
|
|
4442
|
-
ngOnDestroy() { }
|
|
4443
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeToolbarMockComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4444
|
-
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 }); }
|
|
4445
|
-
}
|
|
4446
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NodeToolbarMockComponent, decorators: [{
|
|
4447
|
-
type: Component,
|
|
4448
|
-
args: [{
|
|
4449
|
-
selector: 'node-toolbar',
|
|
4450
|
-
template: '<ng-content />',
|
|
4451
|
-
standalone: true,
|
|
4452
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4453
|
-
}]
|
|
4454
|
-
}] });
|
|
4455
|
-
|
|
4456
|
-
class ConnectionControllerMockDirective {
|
|
4457
|
-
constructor() {
|
|
4458
|
-
// eslint-disable-next-line @angular-eslint/no-output-on-prefix
|
|
4459
|
-
this.onConnect = output();
|
|
4460
|
-
// eslint-disable-next-line @angular-eslint/no-output-on-prefix
|
|
4461
|
-
this.onReconnect = output();
|
|
4462
|
-
}
|
|
4463
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4464
|
-
startConnection(handle) { }
|
|
4465
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4466
|
-
startReconnection(handle) { }
|
|
4467
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4468
|
-
validateConnection(handle) { }
|
|
4469
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4470
|
-
resetValidateConnection(targetHandle) { }
|
|
4471
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4472
|
-
endConnection() { }
|
|
4473
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConnectionControllerMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4474
|
-
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 }); }
|
|
4475
|
-
}
|
|
4476
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ConnectionControllerMockDirective, decorators: [{
|
|
4477
|
-
type: Directive,
|
|
4478
|
-
args: [{ selector: '[onConnect]', standalone: true }]
|
|
4479
|
-
}] });
|
|
4480
|
-
|
|
4481
|
-
class DragHandleMockDirective {
|
|
4482
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DragHandleMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4483
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: DragHandleMockDirective, isStandalone: true, selector: "[dragHandle]", ngImport: i0 }); }
|
|
4484
|
-
}
|
|
4485
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: DragHandleMockDirective, decorators: [{
|
|
4486
|
-
type: Directive,
|
|
4487
|
-
args: [{ selector: '[dragHandle]', standalone: true }]
|
|
4488
|
-
}] });
|
|
4489
|
-
|
|
4490
|
-
class SelectableMockDirective {
|
|
4491
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectableMockDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4492
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: SelectableMockDirective, isStandalone: true, selector: "[selectable]", ngImport: i0 }); }
|
|
4493
|
-
}
|
|
4494
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectableMockDirective, decorators: [{
|
|
4495
|
-
type: Directive,
|
|
4496
|
-
args: [{
|
|
4497
|
-
selector: '[selectable]',
|
|
4498
|
-
standalone: true,
|
|
4499
|
-
}]
|
|
4500
|
-
}] });
|
|
4501
|
-
|
|
4502
|
-
const VflowMocks = [
|
|
4503
|
-
VflowMockComponent,
|
|
4504
|
-
HandleMockComponent,
|
|
4505
|
-
ResizableMockComponent,
|
|
4506
|
-
SelectableMockDirective,
|
|
4507
|
-
MiniMapMockComponent,
|
|
4508
|
-
NodeToolbarMockComponent,
|
|
4509
|
-
DragHandleMockDirective,
|
|
4510
|
-
ConnectionControllerMockDirective,
|
|
4511
|
-
NodeHtmlTemplateMockDirective,
|
|
4512
|
-
GroupNodeTemplateMockDirective,
|
|
4513
|
-
EdgeLabelHtmlTemplateMockDirective,
|
|
4514
|
-
EdgeTemplateMockDirective,
|
|
4515
|
-
ConnectionTemplateMockDirective,
|
|
4516
|
-
HandleTemplateMockDirective,
|
|
4517
|
-
];
|
|
4518
|
-
|
|
4519
4163
|
// Standalone Util
|
|
4520
4164
|
|
|
4521
4165
|
/**
|
|
4522
4166
|
* Generated bundle index. Do not edit.
|
|
4523
4167
|
*/
|
|
4524
4168
|
|
|
4525
|
-
export { ChangesControllerDirective, ConnectionControllerDirective,
|
|
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 };
|
|
4526
4170
|
//# sourceMappingURL=ngx-vflow.mjs.map
|