ngx-vflow 0.13.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/vflow/components/background/background.component.mjs +7 -16
- package/esm2022/lib/vflow/components/default-node/default-node.component.mjs +18 -0
- package/esm2022/lib/vflow/components/defs/defs.component.mjs +1 -1
- package/esm2022/lib/vflow/components/node/node.component.mjs +8 -7
- package/esm2022/lib/vflow/components/vflow/vflow.component.mjs +11 -7
- package/esm2022/lib/vflow/math/edge-path/bezier-path.mjs +14 -17
- package/esm2022/lib/vflow/math/edge-path/straigh-path.mjs +2 -6
- package/esm2022/lib/vflow/models/handle.model.mjs +3 -2
- package/esm2022/lib/vflow/models/minimap.model.mjs +7 -0
- package/esm2022/lib/vflow/public-components/minimap/minimap.component.mjs +119 -0
- package/esm2022/lib/vflow/services/flow-entities.service.mjs +6 -5
- package/esm2022/lib/vflow/services/flow-settings.service.mjs +2 -1
- package/esm2022/lib/vflow/utils/transform-background.mjs +6 -0
- package/esm2022/lib/vflow/vflow.module.mjs +15 -7
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/ngx-vflow.mjs +189 -56
- package/fesm2022/ngx-vflow.mjs.map +1 -1
- package/lib/vflow/components/background/background.component.d.ts +3 -6
- package/lib/vflow/components/default-node/default-node.component.d.ts +6 -0
- package/lib/vflow/components/vflow/vflow.component.d.ts +2 -1
- package/lib/vflow/models/handle.model.d.ts +1 -0
- package/lib/vflow/models/minimap.model.d.ts +4 -0
- package/lib/vflow/public-components/minimap/minimap.component.d.ts +49 -0
- package/lib/vflow/services/flow-entities.service.d.ts +7 -5
- package/lib/vflow/services/flow-settings.service.d.ts +2 -0
- package/lib/vflow/utils/transform-background.d.ts +2 -0
- package/lib/vflow/vflow.module.d.ts +21 -19
- package/package.json +1 -3
- package/public-api.d.ts +1 -0
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { Background } from '../../types/background.type';
|
|
2
1
|
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "../../types/background.type";
|
|
4
2
|
export declare class BackgroundComponent {
|
|
5
3
|
private viewportService;
|
|
6
4
|
private rootSvg;
|
|
7
|
-
|
|
8
|
-
protected backgroundSignal: import("@angular/core").WritableSignal<Background>;
|
|
5
|
+
private settingsService;
|
|
6
|
+
protected backgroundSignal: import("@angular/core").WritableSignal<import("ngx-vflow").Background>;
|
|
9
7
|
protected scaledGap: import("@angular/core").Signal<number>;
|
|
10
8
|
protected x: import("@angular/core").Signal<number>;
|
|
11
9
|
protected y: import("@angular/core").Signal<number>;
|
|
@@ -15,6 +13,5 @@ export declare class BackgroundComponent {
|
|
|
15
13
|
protected patternUrl: string;
|
|
16
14
|
constructor();
|
|
17
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<BackgroundComponent, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BackgroundComponent, "g[background]", never, {
|
|
19
|
-
static ngAcceptInputType_background: i1.Background | string;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BackgroundComponent, "g[background]", never, {}, {}, never, never, false, never>;
|
|
20
17
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class DefaultNodeComponent {
|
|
3
|
+
selected: boolean;
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultNodeComponent, never>;
|
|
5
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DefaultNodeComponent, "default-node", never, { "selected": { "alias": "selected"; "required": false; }; }, {}, never, ["*"], false, never>;
|
|
6
|
+
}
|
|
@@ -61,7 +61,7 @@ export declare class VflowComponent implements OnInit {
|
|
|
61
61
|
/**
|
|
62
62
|
* Background for flow
|
|
63
63
|
*/
|
|
64
|
-
background: Background | string;
|
|
64
|
+
set background(value: Background | string);
|
|
65
65
|
optimization: Optimization;
|
|
66
66
|
/**
|
|
67
67
|
* Global rule if you can or can't select entities
|
|
@@ -123,6 +123,7 @@ export declare class VflowComponent implements OnInit {
|
|
|
123
123
|
*/
|
|
124
124
|
readonly edgesChange$: import("rxjs").Observable<EdgeChange[]>;
|
|
125
125
|
protected markers: Signal<Map<number, import("ngx-vflow").Marker>>;
|
|
126
|
+
protected minimap: import("@angular/core").WritableSignal<import("../../models/minimap.model").MinimapModel | null>;
|
|
126
127
|
ngOnInit(): void;
|
|
127
128
|
/**
|
|
128
129
|
* Change viewport to specified state
|
|
@@ -50,6 +50,7 @@ export declare class HandleModel {
|
|
|
50
50
|
y: number;
|
|
51
51
|
}>;
|
|
52
52
|
state: import("@angular/core").WritableSignal<HandleState>;
|
|
53
|
+
node: import("ngx-vflow").Node<unknown> | import("ngx-vflow").DynamicNode<unknown>;
|
|
53
54
|
};
|
|
54
55
|
};
|
|
55
56
|
constructor(rawHandle: NodeHandle, parentNode: NodeModel);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Injector, OnInit } from '@angular/core';
|
|
2
|
+
import { FlowEntitiesService } from '../../services/flow-entities.service';
|
|
3
|
+
import { NodeModel } from '../../models/node.model';
|
|
4
|
+
import { FlowSettingsService } from '../../services/flow-settings.service';
|
|
5
|
+
import { ViewportService } from '../../services/viewport.service';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export type MiniMapPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
8
|
+
export declare class MiniMapComponent implements OnInit {
|
|
9
|
+
protected entitiesService: FlowEntitiesService;
|
|
10
|
+
protected flowSettingsService: FlowSettingsService;
|
|
11
|
+
protected viewportService: ViewportService;
|
|
12
|
+
protected injector: Injector;
|
|
13
|
+
/**
|
|
14
|
+
* The corner of the flow where to render a mini-map
|
|
15
|
+
*/
|
|
16
|
+
set position(value: MiniMapPosition);
|
|
17
|
+
/**
|
|
18
|
+
* The color outside the viewport (invisible area)
|
|
19
|
+
*/
|
|
20
|
+
maskColor: string;
|
|
21
|
+
/**
|
|
22
|
+
* The minimap stroke color
|
|
23
|
+
*/
|
|
24
|
+
strokeColor: string;
|
|
25
|
+
/**
|
|
26
|
+
* Make a minimap bigger on hover
|
|
27
|
+
*/
|
|
28
|
+
set scaleOnHover(value: boolean);
|
|
29
|
+
private minimap;
|
|
30
|
+
private readonly minimapOffset;
|
|
31
|
+
private readonly minimapScale;
|
|
32
|
+
protected viewportColor: import("@angular/core").Signal<string>;
|
|
33
|
+
protected hovered: import("@angular/core").WritableSignal<boolean>;
|
|
34
|
+
protected minimapPoint: import("@angular/core").Signal<{
|
|
35
|
+
x: number;
|
|
36
|
+
y: number;
|
|
37
|
+
}>;
|
|
38
|
+
protected minimapWidth: import("@angular/core").Signal<number>;
|
|
39
|
+
protected minimapHeight: import("@angular/core").Signal<number>;
|
|
40
|
+
protected viewportTransform: import("@angular/core").Signal<string>;
|
|
41
|
+
protected boundsViewport: import("@angular/core").Signal<import("ngx-vflow").ViewportState>;
|
|
42
|
+
protected minimapTransform: import("@angular/core").Signal<string>;
|
|
43
|
+
private minimapPosition;
|
|
44
|
+
private scaleOnHoverSignal;
|
|
45
|
+
ngOnInit(): void;
|
|
46
|
+
protected trackNodes(idx: number, { node }: NodeModel): import("ngx-vflow").Node<unknown> | import("ngx-vflow").DynamicNode<unknown>;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MiniMapComponent, never>;
|
|
48
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MiniMapComponent, "mini-map", never, { "position": { "alias": "position"; "required": false; }; "maskColor": { "alias": "maskColor"; "required": false; }; "strokeColor": { "alias": "strokeColor"; "required": false; }; "scaleOnHover": { "alias": "scaleOnHover"; "required": false; }; }, {}, never, never, false, never>;
|
|
49
|
+
}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
import { Signal } from '@angular/core';
|
|
1
|
+
import { Signal, WritableSignal } from '@angular/core';
|
|
2
2
|
import { NodeModel } from '../models/node.model';
|
|
3
3
|
import { EdgeModel } from '../models/edge.model';
|
|
4
4
|
import { ConnectionModel } from '../models/connection.model';
|
|
5
5
|
import { Marker } from '../interfaces/marker.interface';
|
|
6
6
|
import { FlowEntity } from '../interfaces/flow-entity.interface';
|
|
7
|
+
import { MinimapModel } from '../models/minimap.model';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class FlowEntitiesService {
|
|
9
|
-
readonly nodes:
|
|
10
|
-
readonly edges:
|
|
11
|
-
readonly connection: import("@angular/core").WritableSignal<ConnectionModel>;
|
|
12
|
-
readonly markers: Signal<Map<number, Marker>>;
|
|
10
|
+
readonly nodes: WritableSignal<NodeModel<unknown>[]>;
|
|
11
|
+
readonly edges: WritableSignal<EdgeModel[]>;
|
|
13
12
|
readonly validEdges: Signal<EdgeModel[]>;
|
|
13
|
+
readonly connection: WritableSignal<ConnectionModel>;
|
|
14
|
+
readonly markers: Signal<Map<number, Marker>>;
|
|
14
15
|
entities: Signal<FlowEntity[]>;
|
|
16
|
+
minimap: WritableSignal<MinimapModel | null>;
|
|
15
17
|
getNode<T>(id: string): NodeModel<T> | undefined;
|
|
16
18
|
getDetachedEdges(): EdgeModel[];
|
|
17
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowEntitiesService, never>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { WritableSignal } from '@angular/core';
|
|
2
2
|
import { HandlePositions } from '../interfaces/handle-positions.interface';
|
|
3
|
+
import { Background } from '../types/background.type';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class FlowSettingsService {
|
|
5
6
|
entitiesSelectable: WritableSignal<boolean>;
|
|
@@ -23,6 +24,7 @@ export declare class FlowSettingsService {
|
|
|
23
24
|
computedFlowHeight: WritableSignal<number>;
|
|
24
25
|
minZoom: WritableSignal<number>;
|
|
25
26
|
maxZoom: WritableSignal<number>;
|
|
27
|
+
background: WritableSignal<Background>;
|
|
26
28
|
static ɵfac: i0.ɵɵFactoryDeclaration<FlowSettingsService, never>;
|
|
27
29
|
static ɵprov: i0.ɵɵInjectableDeclaration<FlowSettingsService>;
|
|
28
30
|
}
|
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./components/vflow/vflow.component";
|
|
3
3
|
import * as i2 from "./components/node/node.component";
|
|
4
|
-
import * as i3 from "./components/
|
|
5
|
-
import * as i4 from "./components/edge
|
|
6
|
-
import * as i5 from "./components/
|
|
7
|
-
import * as i6 from "./components/
|
|
8
|
-
import * as i7 from "./components/
|
|
9
|
-
import * as i8 from "./components/
|
|
10
|
-
import * as i9 from "./
|
|
11
|
-
import * as i10 from "./
|
|
12
|
-
import * as i11 from "./
|
|
13
|
-
import * as i12 from "./directives/
|
|
14
|
-
import * as i13 from "./directives/
|
|
15
|
-
import * as i14 from "./directives/
|
|
16
|
-
import * as i15 from "./directives/
|
|
17
|
-
import * as i16 from "./directives/
|
|
18
|
-
import * as i17 from "./directives/
|
|
19
|
-
import * as i18 from "./directives/
|
|
20
|
-
import * as i19 from "./directives/
|
|
21
|
-
import * as i20 from "
|
|
4
|
+
import * as i3 from "./components/default-node/default-node.component";
|
|
5
|
+
import * as i4 from "./components/edge/edge.component";
|
|
6
|
+
import * as i5 from "./components/edge-label/edge-label.component";
|
|
7
|
+
import * as i6 from "./components/connection/connection.component";
|
|
8
|
+
import * as i7 from "./components/handle/handle.component";
|
|
9
|
+
import * as i8 from "./components/defs/defs.component";
|
|
10
|
+
import * as i9 from "./components/background/background.component";
|
|
11
|
+
import * as i10 from "./public-components/resizable/resizable.component";
|
|
12
|
+
import * as i11 from "./public-components/minimap/minimap.component";
|
|
13
|
+
import * as i12 from "./directives/space-point-context.directive";
|
|
14
|
+
import * as i13 from "./directives/map-context.directive";
|
|
15
|
+
import * as i14 from "./directives/reference.directive";
|
|
16
|
+
import * as i15 from "./directives/root-svg-context.directive";
|
|
17
|
+
import * as i16 from "./directives/handle-size-controller.directive";
|
|
18
|
+
import * as i17 from "./directives/selectable.directive";
|
|
19
|
+
import * as i18 from "./directives/pointer.directive";
|
|
20
|
+
import * as i19 from "./directives/root-pointer.directive";
|
|
21
|
+
import * as i20 from "./directives/flow-size-controller.directive";
|
|
22
|
+
import * as i21 from "./directives/template.directive";
|
|
23
|
+
import * as i22 from "@angular/common";
|
|
22
24
|
export declare class VflowModule {
|
|
23
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<VflowModule, never>;
|
|
24
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<VflowModule, [typeof i1.VflowComponent, typeof i2.NodeComponent, typeof i3.
|
|
26
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<VflowModule, [typeof i1.VflowComponent, typeof i2.NodeComponent, typeof i3.DefaultNodeComponent, typeof i4.EdgeComponent, typeof i5.EdgeLabelComponent, typeof i6.ConnectionComponent, typeof i7.HandleComponent, typeof i8.DefsComponent, typeof i9.BackgroundComponent, typeof i10.ResizableComponent, typeof i11.MiniMapComponent, typeof i12.SpacePointContextDirective, typeof i13.MapContextDirective, typeof i14.RootSvgReferenceDirective, typeof i15.RootSvgContextDirective, typeof i16.HandleSizeControllerDirective, typeof i17.SelectableDirective, typeof i18.PointerDirective, typeof i19.RootPointerDirective, typeof i20.FlowSizeControllerDirective, typeof i21.NodeHtmlTemplateDirective, typeof i21.GroupNodeTemplateDirective, typeof i21.EdgeLabelHtmlTemplateDirective, typeof i21.EdgeTemplateDirective, typeof i21.ConnectionTemplateDirective, typeof i21.HandleTemplateDirective], [typeof i22.NgIf, typeof i22.NgForOf, typeof i22.NgTemplateOutlet, typeof i22.NgComponentOutlet, typeof i22.KeyValuePipe], [typeof i1.VflowComponent, typeof i7.HandleComponent, typeof i10.ResizableComponent, typeof i17.SelectableDirective, typeof i11.MiniMapComponent, typeof i21.NodeHtmlTemplateDirective, typeof i21.GroupNodeTemplateDirective, typeof i21.EdgeLabelHtmlTemplateDirective, typeof i21.EdgeTemplateDirective, typeof i21.ConnectionTemplateDirective, typeof i21.HandleTemplateDirective]>;
|
|
25
27
|
static ɵinj: i0.ɵɵInjectorDeclaration<VflowModule>;
|
|
26
28
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-vflow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://www.ngx-vflow.org/",
|
|
6
6
|
"author": "Artem Mangilev",
|
|
@@ -19,11 +19,9 @@
|
|
|
19
19
|
"@angular/common": "^16.2.0 || 17.x || 18.x",
|
|
20
20
|
"@angular/core": "^16.2.0 || 17.x || 18.x",
|
|
21
21
|
"d3-drag": "^3.0.0",
|
|
22
|
-
"d3-path": "^3.1.0",
|
|
23
22
|
"d3-selection": "^3.0.0",
|
|
24
23
|
"d3-zoom": "^3.0.0",
|
|
25
24
|
"@types/d3-drag": "^3.0.7",
|
|
26
|
-
"@types/d3-path": "^3.0.2",
|
|
27
25
|
"@types/d3-selection": "^3.0.10",
|
|
28
26
|
"@types/d3-zoom": "^3.0.8"
|
|
29
27
|
},
|
package/public-api.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export * from './lib/vflow/components/handle/handle.component';
|
|
|
23
23
|
export * from './lib/vflow/public-components/custom-node/custom-node.component';
|
|
24
24
|
export * from './lib/vflow/public-components/custom-dynamic-node/custom-dynamic-node.component';
|
|
25
25
|
export * from './lib/vflow/public-components/resizable/resizable.component';
|
|
26
|
+
export * from './lib/vflow/public-components/minimap/minimap.component';
|
|
26
27
|
export * from './lib/vflow/directives/template.directive';
|
|
27
28
|
export * from './lib/vflow/directives/connection-controller.directive';
|
|
28
29
|
export * from './lib/vflow/directives/changes-controller.directive';
|