ngx-relationship-visualiser 2.1.1 → 2.1.3
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/README.md +1 -1
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/db/graphDatabase.mjs +4 -1
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/ngx-relationship-visualiser.module.mjs +2 -6
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/visualiser/context-menus/context-menus.component.mjs +44 -35
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/visualiser/modals/abstract-modal-form-handler.mjs +8 -16
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/visualiser/modals/modals.component.mjs +10 -5
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/visualiser/services/visualiser-graph.service.mjs +28 -22
- package/esm2022/projects/ngx-relationship-visualiser-lib/lib/visualiser/visualiser-graph/visualiser-graph.component.mjs +24 -29
- package/fesm2022/ngx-relationship-visualiser.mjs +111 -103
- package/fesm2022/ngx-relationship-visualiser.mjs.map +1 -1
- package/package.json +1 -2
- package/projects/ngx-relationship-visualiser-lib/lib/db/graphDatabase.d.ts +1 -0
- package/projects/ngx-relationship-visualiser-lib/lib/ngx-relationship-visualiser.module.d.ts +2 -3
- package/projects/ngx-relationship-visualiser-lib/lib/visualiser/context-menus/context-menus.component.d.ts +15 -9
- package/projects/ngx-relationship-visualiser-lib/lib/visualiser/modals/abstract-modal-form-handler.d.ts +0 -1
- package/projects/ngx-relationship-visualiser-lib/lib/visualiser/visualiser-graph/visualiser-graph.component.d.ts +2 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ngx-relationship-visualiser",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A D3 force-directed-graph, implemented in Typescript for Angular, generates a visualisation graph with customisable link lengths and multiple labels between nodes. The graph can handle new data that will update lines, nodes, links, and path labels. Whenever new nodes are added, they will be animated with a pulse effect. Additionally, the graph includes features such as brushing (multiple select and drag), zoom, and panning capabilities. Additional features include the ability to make multiple selections in sync with the brushing functionality by using Ctrl + click and drag the cursor.",
|
|
6
6
|
"keywords": [
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@dagrejs/dagre": "^1.1.8",
|
|
24
|
-
"@kreash/ngx-contextmenu": "~18.1.0",
|
|
25
24
|
"@ng-select/ng-select": "^13.9.1",
|
|
26
25
|
"bootstrap": "4.6.2",
|
|
27
26
|
"d3": "5.16.0",
|
|
@@ -7,6 +7,7 @@ export declare class DexieService extends Dexie {
|
|
|
7
7
|
saveGraphData(data: Data): Promise<void>;
|
|
8
8
|
getGraphData(dataId: string): Promise<Data>;
|
|
9
9
|
deleteGraphData(dataId: string): Promise<void>;
|
|
10
|
+
findGraphData(dataId: string): Promise<Data | undefined>;
|
|
10
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<DexieService, never>;
|
|
11
12
|
static ɵprov: i0.ɵɵInjectableDeclaration<DexieService>;
|
|
12
13
|
}
|
package/projects/ngx-relationship-visualiser-lib/lib/ngx-relationship-visualiser.module.d.ts
CHANGED
|
@@ -5,10 +5,9 @@ import * as i3 from "./visualiser/modals/modals.component";
|
|
|
5
5
|
import * as i4 from "@angular/platform-browser";
|
|
6
6
|
import * as i5 from "@angular/forms";
|
|
7
7
|
import * as i6 from "ngx-bootstrap/modal";
|
|
8
|
-
import * as i7 from "@
|
|
9
|
-
import * as i8 from "@ng-select/ng-select";
|
|
8
|
+
import * as i7 from "@ng-select/ng-select";
|
|
10
9
|
export declare class NgxRelationshipVisualiserModule {
|
|
11
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxRelationshipVisualiserModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxRelationshipVisualiserModule, [typeof i1.VisualiserGraphComponent, typeof i2.ContextMenusComponent, typeof i3.ModalsComponent], [typeof i4.BrowserModule, typeof i5.ReactiveFormsModule, typeof i6.ModalModule, typeof i7.
|
|
11
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxRelationshipVisualiserModule, [typeof i1.VisualiserGraphComponent, typeof i2.ContextMenusComponent, typeof i3.ModalsComponent], [typeof i4.BrowserModule, typeof i5.ReactiveFormsModule, typeof i6.ModalModule, typeof i7.NgSelectModule, typeof i5.FormsModule], [typeof i1.VisualiserGraphComponent]>;
|
|
13
12
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxRelationshipVisualiserModule>;
|
|
14
13
|
}
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { ContextMenuComponent } from '@kreash/ngx-contextmenu';
|
|
3
2
|
import { Data, Link, Node } from '../../models/data.interface';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
interface ContextMenuGraphData {
|
|
6
5
|
graphData: Data;
|
|
7
6
|
selectedNodes: Node[];
|
|
8
7
|
}
|
|
8
|
+
type ContextMenuType = 'node' | 'background' | 'links' | 'link-label';
|
|
9
9
|
export declare class ContextMenusComponent {
|
|
10
|
-
editNodeContextMenu: ContextMenuComponent;
|
|
11
|
-
findCreateNodesContextMenu: ContextMenuComponent;
|
|
12
|
-
createEditLinkContextMenu: ContextMenuComponent;
|
|
13
|
-
editLinkLabelContextMenu: ContextMenuComponent;
|
|
14
10
|
editNodeContextMenuEvent: EventEmitter<boolean>;
|
|
15
11
|
findCreateNodesContextMenuEvent: EventEmitter<"findNodes" | "createNode">;
|
|
16
12
|
createLinkContextMenuEvent: EventEmitter<{
|
|
@@ -22,14 +18,24 @@ export declare class ContextMenusComponent {
|
|
|
22
18
|
open: boolean;
|
|
23
19
|
data: Link;
|
|
24
20
|
}>;
|
|
21
|
+
menuType: ContextMenuType | null;
|
|
22
|
+
menuPosition: {
|
|
23
|
+
left: number;
|
|
24
|
+
top: number;
|
|
25
|
+
};
|
|
26
|
+
menuItem: ContextMenuGraphData | null;
|
|
27
|
+
openMenu(menuType: ContextMenuType, event: MouseEvent, item?: ContextMenuGraphData): void;
|
|
28
|
+
closeMenu(): void;
|
|
29
|
+
onDocumentClick(): void;
|
|
30
|
+
onEscape(): void;
|
|
25
31
|
editNode(): void;
|
|
26
32
|
findNodes(): void;
|
|
27
33
|
createNode(): void;
|
|
28
|
-
createLink(item: ContextMenuGraphData): void;
|
|
34
|
+
createLink(item: ContextMenuGraphData | null): void;
|
|
29
35
|
editLinkLabel(): void;
|
|
30
|
-
editLinks(item: ContextMenuGraphData): void;
|
|
31
|
-
linksExist
|
|
32
|
-
linksDoNotExist
|
|
36
|
+
editLinks(item: ContextMenuGraphData | null): void;
|
|
37
|
+
linksExist(): boolean;
|
|
38
|
+
linksDoNotExist(): boolean;
|
|
33
39
|
private checkLinkBetweenSelectedNodes;
|
|
34
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<ContextMenusComponent, never>;
|
|
35
41
|
static ɵcmp: i0.ɵɵComponentDeclaration<ContextMenusComponent, "app-context-menus", never, {}, { "editNodeContextMenuEvent": "editNodeContextMenuEvent"; "findCreateNodesContextMenuEvent": "findCreateNodesContextMenuEvent"; "createLinkContextMenuEvent": "createLinkContextMenuEvent"; "editLinkLabelContextMenuEvent": "editLinkLabelContextMenuEvent"; "editLinksContextMenuEvent": "editLinksContextMenuEvent"; }, never, never, false, never>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ElementRef, EventEmitter, OnInit, AfterViewInit } from '@angular/core';
|
|
2
2
|
import { VisualiserGraphService } from '../services/visualiser-graph.service';
|
|
3
3
|
import { DagreNodesOnlyLayout } from '../services/dagre-layout.service';
|
|
4
|
-
import { ContextMenuService } from '@kreash/ngx-contextmenu';
|
|
5
4
|
import { ContextMenusComponent } from '../context-menus/context-menus.component';
|
|
6
5
|
import { Data, EditLinksData, Link, Node } from '../../models/data.interface';
|
|
7
6
|
import { ModalsComponent } from '../modals/modals.component';
|
|
@@ -16,7 +15,6 @@ interface SelectedVisualiserLink {
|
|
|
16
15
|
}
|
|
17
16
|
export declare class VisualiserGraphComponent implements OnInit, AfterViewInit {
|
|
18
17
|
readonly visualiserGraphService: VisualiserGraphService;
|
|
19
|
-
readonly contextMenuService: ContextMenuService;
|
|
20
18
|
readonly dagreNodesOnlyLayout: DagreNodesOnlyLayout;
|
|
21
19
|
private dexieService;
|
|
22
20
|
graphElement: ElementRef<SVGSVGElement>;
|
|
@@ -39,14 +37,14 @@ export declare class VisualiserGraphComponent implements OnInit, AfterViewInit {
|
|
|
39
37
|
controls: boolean;
|
|
40
38
|
zoomToFit: boolean;
|
|
41
39
|
modalsComponent: ModalsComponent;
|
|
42
|
-
constructor(visualiserGraphService: VisualiserGraphService,
|
|
40
|
+
constructor(visualiserGraphService: VisualiserGraphService, dagreNodesOnlyLayout: DagreNodesOnlyLayout, dexieService: DexieService);
|
|
43
41
|
set data(data: Data);
|
|
44
42
|
ngOnInit(): void;
|
|
45
43
|
toggleSearch(): void;
|
|
46
44
|
onResize(): void;
|
|
47
45
|
updateWidth(): void;
|
|
48
46
|
visualiserContextMenus(event: MouseEvent): Promise<void>;
|
|
49
|
-
dismissContextMenu(
|
|
47
|
+
dismissContextMenu(): void;
|
|
50
48
|
findCreateNodesEvent(action: string): void;
|
|
51
49
|
private opencreateNodeModal;
|
|
52
50
|
onConfirmSave(): Promise<void>;
|