@memberjunction/ng-graph-view 0.0.0 → 6.1.0-edge.4
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/LICENSE +183 -0
- package/README.md +76 -31
- package/dist/lib/components/graph-view.component.d.ts +108 -0
- package/dist/lib/components/graph-view.component.d.ts.map +1 -0
- package/dist/lib/components/graph-view.component.js +1285 -0
- package/dist/lib/components/graph-view.component.js.map +1 -0
- package/dist/lib/events/graph-events.d.ts +117 -0
- package/dist/lib/events/graph-events.d.ts.map +1 -0
- package/dist/lib/events/graph-events.js +178 -0
- package/dist/lib/events/graph-events.js.map +1 -0
- package/dist/lib/graph-view.module.d.ts +10 -0
- package/dist/lib/graph-view.module.d.ts.map +1 -0
- package/dist/lib/graph-view.module.js +29 -0
- package/dist/lib/graph-view.module.js.map +1 -0
- package/dist/lib/models/graph-models.d.ts +132 -0
- package/dist/lib/models/graph-models.d.ts.map +1 -0
- package/dist/lib/models/graph-models.js +10 -0
- package/dist/lib/models/graph-models.js.map +1 -0
- package/dist/public-api.d.ts +8 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +11 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +44 -7
package/LICENSE
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
License text copyright (c) 2024 MariaDB plc, All Rights Reserved.
|
|
4
|
+
"Business Source License" is a trademark of MariaDB plc.
|
|
5
|
+
|
|
6
|
+
-----------------------------------------------------------------------------
|
|
7
|
+
|
|
8
|
+
Parameters
|
|
9
|
+
|
|
10
|
+
Licensor: Blue Cypress, Inc.
|
|
11
|
+
|
|
12
|
+
Licensed Work: MemberJunction.
|
|
13
|
+
The Licensed Work is (c) 2023-2026 Blue Cypress, Inc.
|
|
14
|
+
|
|
15
|
+
Additional Use Grant: Subject to the terms of this License, Licensor grants
|
|
16
|
+
you the following additional rights to make Production
|
|
17
|
+
Use of the Licensed Work.
|
|
18
|
+
|
|
19
|
+
1. Internal Use
|
|
20
|
+
|
|
21
|
+
You may make production use of the Licensed Work for
|
|
22
|
+
your own internal business or organizational operations.
|
|
23
|
+
|
|
24
|
+
2. Nonprofit Use
|
|
25
|
+
|
|
26
|
+
If you are a Nonprofit, you may make production use of
|
|
27
|
+
the Licensed Work for the operations and activities of
|
|
28
|
+
your Organizational Family.
|
|
29
|
+
|
|
30
|
+
3. MemberJunction Certified Program Use
|
|
31
|
+
|
|
32
|
+
If you are authorized by Licensor under the
|
|
33
|
+
MemberJunction Certified Program to provide professional
|
|
34
|
+
services using the Licensed Work, you may make
|
|
35
|
+
production use of the Licensed Work in providing such
|
|
36
|
+
professional services to a client, provided that:
|
|
37
|
+
|
|
38
|
+
(a) the Licensed Work is deployed in, and the applicable
|
|
39
|
+
production use occurs within, an environment owned,
|
|
40
|
+
leased, licensed, subscribed to, or otherwise controlled
|
|
41
|
+
by that client; and
|
|
42
|
+
|
|
43
|
+
(b) the production use is for that client's own internal
|
|
44
|
+
business or organizational operations or is otherwise
|
|
45
|
+
independently permitted to that client under this
|
|
46
|
+
Additional Use Grant.
|
|
47
|
+
|
|
48
|
+
4. Definitions Applicable to the Additional Use Grant
|
|
49
|
+
|
|
50
|
+
"Affiliate" means, with respect to a specified Person,
|
|
51
|
+
any other Person that directly or indirectly Controls,
|
|
52
|
+
is Controlled by, or is under common Control with such
|
|
53
|
+
specified Person.
|
|
54
|
+
|
|
55
|
+
"Control" (including the terms "Controls," "Controlled
|
|
56
|
+
by," and "under common Control with") means the direct
|
|
57
|
+
or indirect possession of the power to direct or cause
|
|
58
|
+
the direction of the management and policies of a
|
|
59
|
+
Person, whether through ownership of voting interests,
|
|
60
|
+
by contract, or otherwise.
|
|
61
|
+
|
|
62
|
+
"Organizational Family" means, with respect to a Person,
|
|
63
|
+
(a) such Person and its Affiliates, and (b) any
|
|
64
|
+
nonprofit organization, governmental entity, chapter,
|
|
65
|
+
division, local affiliate, regional affiliate, state
|
|
66
|
+
affiliate, national affiliate, or other entity that is
|
|
67
|
+
formally affiliated with such Person through governing
|
|
68
|
+
documents, a charter, bylaws, a membership agreement, or
|
|
69
|
+
another written organizational instrument, and is
|
|
70
|
+
recognized under such documents as part of the same
|
|
71
|
+
organizational structure.
|
|
72
|
+
|
|
73
|
+
"Nonprofit" means a Person recognized by the Internal
|
|
74
|
+
Revenue Service as exempt from federal income taxation
|
|
75
|
+
under Section 501(c)(3), 501(c)(4), 501(c)(5), or
|
|
76
|
+
501(c)(6) of the Internal Revenue Code, or a foreign
|
|
77
|
+
organization recognized under substantially equivalent
|
|
78
|
+
laws.
|
|
79
|
+
|
|
80
|
+
A Person claiming eligibility as a Nonprofit shall, upon
|
|
81
|
+
Licensor's reasonable request, provide documentation
|
|
82
|
+
reasonably sufficient to demonstrate that it qualifies
|
|
83
|
+
as a Nonprofit. If such Person materially misrepresents,
|
|
84
|
+
or is unable to demonstrate, its qualification as a
|
|
85
|
+
Nonprofit, the rights granted to such Person under
|
|
86
|
+
Section 2 of this Additional Use Grant shall terminate.
|
|
87
|
+
|
|
88
|
+
"MemberJunction Certified Program" means Licensor's
|
|
89
|
+
then-current program for certifying and authorizing a
|
|
90
|
+
Person to provide professional services using the
|
|
91
|
+
Licensed Work.
|
|
92
|
+
|
|
93
|
+
"Person" means any individual, corporation, limited
|
|
94
|
+
liability company, partnership, association, nonprofit
|
|
95
|
+
organization, governmental entity, or other legal or
|
|
96
|
+
organizational entity.
|
|
97
|
+
|
|
98
|
+
Change Date: Four (4) years from the date the Licensed Work is first
|
|
99
|
+
made available.
|
|
100
|
+
|
|
101
|
+
Change License: MIT License.
|
|
102
|
+
|
|
103
|
+
For information about alternative licensing arrangements for the Licensed
|
|
104
|
+
Work, please contact Blue Cypress, Inc.
|
|
105
|
+
|
|
106
|
+
-----------------------------------------------------------------------------
|
|
107
|
+
|
|
108
|
+
Terms
|
|
109
|
+
|
|
110
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
111
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
112
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
113
|
+
production use.
|
|
114
|
+
|
|
115
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
116
|
+
available distribution of a specific version of the Licensed Work under this
|
|
117
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
118
|
+
the terms of the Change License, and the rights granted in the paragraph
|
|
119
|
+
above terminate.
|
|
120
|
+
|
|
121
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
122
|
+
currently in effect as described in this License, you must purchase a
|
|
123
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
124
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
125
|
+
|
|
126
|
+
All copies of the original and modified Licensed Work, and derivative works
|
|
127
|
+
of the Licensed Work, are subject to this License. This License applies
|
|
128
|
+
separately for each version of the Licensed Work and the Change Date may vary
|
|
129
|
+
for each version of the Licensed Work released by Licensor.
|
|
130
|
+
|
|
131
|
+
You must conspicuously display this License on each original or modified copy
|
|
132
|
+
of the Licensed Work. If you receive the Licensed Work in original or
|
|
133
|
+
modified form from a third party, the terms and conditions set forth in this
|
|
134
|
+
License apply to your use of that work.
|
|
135
|
+
|
|
136
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
137
|
+
terminate your rights under this License for the current and all other
|
|
138
|
+
versions of the Licensed Work.
|
|
139
|
+
|
|
140
|
+
This License does not grant you any right in any trademark or logo of
|
|
141
|
+
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
142
|
+
Licensor as expressly required by this License).
|
|
143
|
+
|
|
144
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
145
|
+
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
146
|
+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
147
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
148
|
+
TITLE.
|
|
149
|
+
|
|
150
|
+
MariaDB hereby grants you permission to use this License's text to license
|
|
151
|
+
your works, and to refer to it using the trademark "Business Source License",
|
|
152
|
+
as long as you comply with the Covenants of Licensor below.
|
|
153
|
+
|
|
154
|
+
-----------------------------------------------------------------------------
|
|
155
|
+
|
|
156
|
+
Covenants of Licensor
|
|
157
|
+
|
|
158
|
+
In consideration of the right to use this License's text and the "Business
|
|
159
|
+
Source License" name and trademark, Licensor covenants to MariaDB, and to all
|
|
160
|
+
other recipients of the licensed work to be provided by Licensor:
|
|
161
|
+
|
|
162
|
+
1. To specify as the Change License the GPL Version 2.0 or any later version,
|
|
163
|
+
or a license that is compatible with GPL Version 2.0 or a later version,
|
|
164
|
+
where "compatible" means that software provided under the Change License
|
|
165
|
+
can be included in a program with software provided under GPL Version 2.0
|
|
166
|
+
or a later version. Licensor may specify additional Change Licenses without
|
|
167
|
+
limitation.
|
|
168
|
+
|
|
169
|
+
2. To either: (a) specify an additional grant of rights to use that does not
|
|
170
|
+
impose any additional restriction on the right granted in this License, as
|
|
171
|
+
the Additional Use Grant; or (b) insert the text "None".
|
|
172
|
+
|
|
173
|
+
3. To specify a Change Date.
|
|
174
|
+
|
|
175
|
+
4. Not to modify this License in any other way.
|
|
176
|
+
|
|
177
|
+
-----------------------------------------------------------------------------
|
|
178
|
+
|
|
179
|
+
Notice
|
|
180
|
+
|
|
181
|
+
The Business Source License (this document, or the "License") is not an Open
|
|
182
|
+
Source license. However, the Licensed Work will eventually be made available
|
|
183
|
+
under an Open Source License, as stated in this License.
|
package/README.md
CHANGED
|
@@ -1,45 +1,90 @@
|
|
|
1
1
|
# @memberjunction/ng-graph-view
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An interactive, high-performance network and relationship graph visualization component for MemberJunction and Angular applications.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## ✨ Features
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- 🌐 **Force-Directed Physics Simulation**: Smooth Spring-Charge layout with repulsion, link elasticity, and velocity damping.
|
|
8
|
+
- 📐 **Multiple Layout Modes**: Switch between `force` (organic cluster network) and `circular` topology.
|
|
9
|
+
- 🏷️ **Categorized Entity Node Badges**: Native palette support for People, Organizations, Committees, Accounts, and Custom entities.
|
|
10
|
+
- 🔍 **Interactive Search & Degree Filter**: Node keyword filtering and hop-distance neighborhood expansion.
|
|
11
|
+
- 🎯 **Cancelable Before/After Event System**: Full control over user interactions (`BeforeNodeSelect`, `BeforeEdgeSelect`, `BeforeHopExpand`, `BeforeLayoutChange`).
|
|
12
|
+
- 🎨 **MemberJunction Design Tokens**: Seamless integration with MJ dark/light themes and typography.
|
|
13
|
+
- 🔎 **Selected Node Inspector Pane**: Built-in side drawer. Navigation is an intent event (`NodeNavigated`) so the host opens the record.
|
|
8
14
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
This package exists to:
|
|
12
|
-
1. Configure OIDC trusted publishing for the package name `@memberjunction/ng-graph-view`
|
|
13
|
-
2. Enable secure, token-less publishing from CI/CD workflows
|
|
14
|
-
3. Establish provenance for packages published under this name
|
|
15
|
-
|
|
16
|
-
## What is OIDC Trusted Publishing?
|
|
17
|
-
|
|
18
|
-
OIDC trusted publishing allows package maintainers to publish packages directly from their CI/CD workflows without needing to manage npm access tokens. Instead, it uses OpenID Connect to establish trust between the CI/CD provider (like GitHub Actions) and npm.
|
|
15
|
+
---
|
|
19
16
|
|
|
20
|
-
## Setup
|
|
17
|
+
## 📦 Installation & Setup
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import { GraphViewComponent } from '@memberjunction/ng-graph-view';
|
|
21
|
+
|
|
22
|
+
@Component({
|
|
23
|
+
standalone: true,
|
|
24
|
+
imports: [GraphViewComponent],
|
|
25
|
+
template: `
|
|
26
|
+
<mj-graph-view
|
|
27
|
+
[Nodes]="graphNodes"
|
|
28
|
+
[Edges]="graphEdges"
|
|
29
|
+
[LayoutMode]="'force'"
|
|
30
|
+
(NodeSelected)="onNodeSelected($event)">
|
|
31
|
+
</mj-graph-view>
|
|
32
|
+
`
|
|
33
|
+
})
|
|
34
|
+
export class MyFeatureComponent {
|
|
35
|
+
public graphNodes: GraphNode[] = [...];
|
|
36
|
+
public graphEdges: GraphEdge[] = [...];
|
|
37
|
+
|
|
38
|
+
public onNodeSelected(event: NodeSelectedEventArgs): void {
|
|
39
|
+
console.log('Selected node:', event.Node.Label);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
```
|
|
21
43
|
|
|
22
|
-
|
|
44
|
+
---
|
|
23
45
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
46
|
+
## 🎛️ Component Inputs (Props)
|
|
47
|
+
|
|
48
|
+
| Property | Type | Default | Description |
|
|
49
|
+
| :--- | :--- | :--- | :--- |
|
|
50
|
+
| `Nodes` | `GraphNode[]` | `[]` | Array of graph node entities to render. |
|
|
51
|
+
| `Edges` | `GraphEdge[]` | `[]` | Array of relationship edges connecting nodes. |
|
|
52
|
+
| `LayoutMode` | `'force' \| 'circular'` | `'force'` | Active layout algorithm. |
|
|
53
|
+
| `MaxHopDistance`| `number` | `2` | Max hop depth for neighborhood traversals. |
|
|
54
|
+
| `SelectedNodeId`| `string` | `undefined` | ID of the node to initially select/highlight. |
|
|
55
|
+
| `ShowToolbar` | `boolean` | `true` | Show floating controls toolbar. |
|
|
56
|
+
| `ShowLegend` | `boolean` | `true` | Show category color legend. |
|
|
57
|
+
| `ShowInspector` | `boolean` | `true` | Show slide-in selected node inspector drawer. |
|
|
58
|
+
| `Searchable` | `boolean` | `true` | Enable keyword search input in toolbar. |
|
|
59
|
+
| `Physics` | `GraphPhysicsConfig` | `DEFAULT` | Physics parameters (repulsion, linkDistance, damping). |
|
|
28
60
|
|
|
29
|
-
|
|
61
|
+
---
|
|
30
62
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
63
|
+
## ⚡ Cancelable Before/After Event System
|
|
64
|
+
|
|
65
|
+
| Event | Payload Type | Cancelable | Description |
|
|
66
|
+
| :--- | :--- | :--- | :--- |
|
|
67
|
+
| `BeforeNodeSelect` | `BeforeNodeSelectEventArgs` | ✅ Yes | Fired before a node is selected. Set `event.Cancel = true` to abort. |
|
|
68
|
+
| `NodeSelected` | `NodeSelectedEventArgs` | ❌ No | Fired after node selection completes. |
|
|
69
|
+
| `BeforeEdgeSelect` | `BeforeEdgeSelectEventArgs` | ✅ Yes | Fired before an edge relationship is selected. |
|
|
70
|
+
| `EdgeSelected` | `EdgeSelectedEventArgs` | ❌ No | Fired after edge selection completes. |
|
|
71
|
+
| `BeforeHopExpand` | `BeforeHopExpandEventArgs` | ✅ Yes | Fired before expanding neighbors for incremental data loading. |
|
|
72
|
+
| `HopExpanded` | `HopExpandedEventArgs` | ❌ No | Fired after hop expansion executes. |
|
|
73
|
+
| `BeforeLayoutChange` | `BeforeLayoutChangeEventArgs` | ✅ Yes | Fired before layout mode changes. |
|
|
74
|
+
| `LayoutChanged` | `LayoutChangedEventArgs` | ❌ No | Fired after layout algorithm recalculates. |
|
|
75
|
+
| `BeforeNodeNavigate` | `BeforeNodeNavigateEventArgs` | ✅ Yes | Fired before opening full entity record form. |
|
|
76
|
+
| `NodeNavigated` | `NodeNavigatedEventArgs` | ❌ No | Fired after the user asks to open a record. The host owns navigation. |
|
|
36
77
|
|
|
37
|
-
|
|
78
|
+
---
|
|
38
79
|
|
|
39
|
-
|
|
40
|
-
- [npm Trusted Publishing Documentation](https://docs.npmjs.com/generating-provenance-statements)
|
|
41
|
-
- [GitHub Actions OIDC Documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
|
|
80
|
+
## 🛠️ Programmatic Methods
|
|
42
81
|
|
|
43
|
-
|
|
82
|
+
Call these directly via `@ViewChild(GraphViewComponent)`:
|
|
44
83
|
|
|
45
|
-
|
|
84
|
+
- `ZoomIn()` / `ZoomOut()`: Step viewport scale in or out.
|
|
85
|
+
- `FitToView()`: Reset zoom and center the network graph.
|
|
86
|
+
- `Rearrange()`: Re-seed positions and re-run physics relaxation.
|
|
87
|
+
- `SetLayoutMode(mode)`: Change between `'force'` and `'circular'`.
|
|
88
|
+
- `SelectNode(id)`: Select a node programmatically.
|
|
89
|
+
- `ClearSelection()`: Deselect currently active node or edge.
|
|
90
|
+
- `ExpandHops(nodeId, depth)`: Request incremental neighbor loading.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { EventEmitter, OnInit, OnChanges, OnDestroy, SimpleChanges, ElementRef } from '@angular/core';
|
|
2
|
+
import type { GraphNode, GraphEdge, GraphLayoutMode, GraphCategoryConfig, GraphPhysicsConfig } from '../models/graph-models';
|
|
3
|
+
import { BeforeNodeSelectEventArgs, NodeSelectedEventArgs, BeforeEdgeSelectEventArgs, EdgeSelectedEventArgs, BeforeHopExpandEventArgs, HopExpandedEventArgs, BeforeLayoutChangeEventArgs, LayoutChangedEventArgs, BeforeNodeNavigateEventArgs, NodeNavigatedEventArgs, ViewportTransformEventArgs } from '../events/graph-events';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare const DEFAULT_GRAPH_CATEGORIES: GraphCategoryConfig[];
|
|
6
|
+
/**
|
|
7
|
+
* `<mj-graph-view>` — Interactive network and entity relationship graph visualization.
|
|
8
|
+
*
|
|
9
|
+
* Supports force-directed dynamic layout, multi-category entity badges, hop-expansion,
|
|
10
|
+
* zoom/pan controls, inspector drawer, search filters, and cancelable Before/After event pairs.
|
|
11
|
+
*/
|
|
12
|
+
export declare class GraphViewComponent implements OnInit, OnChanges, OnDestroy {
|
|
13
|
+
private cdr;
|
|
14
|
+
WrapperRef: ElementRef<HTMLDivElement>;
|
|
15
|
+
CanvasRef: ElementRef<SVGSVGElement>;
|
|
16
|
+
Nodes: GraphNode[];
|
|
17
|
+
Edges: GraphEdge[];
|
|
18
|
+
Categories: GraphCategoryConfig[];
|
|
19
|
+
LayoutMode: GraphLayoutMode;
|
|
20
|
+
MaxHopDistance: number;
|
|
21
|
+
SelectedNodeId?: string;
|
|
22
|
+
FocalNodeId?: string;
|
|
23
|
+
AutoOpenInspector: boolean;
|
|
24
|
+
ShowToolbar: boolean;
|
|
25
|
+
ShowLegend: boolean;
|
|
26
|
+
ShowInspector: boolean;
|
|
27
|
+
Searchable: boolean;
|
|
28
|
+
AutoFitOnLoad: boolean;
|
|
29
|
+
Physics: GraphPhysicsConfig;
|
|
30
|
+
BeforeNodeSelect: EventEmitter<BeforeNodeSelectEventArgs>;
|
|
31
|
+
NodeSelected: EventEmitter<NodeSelectedEventArgs>;
|
|
32
|
+
BeforeEdgeSelect: EventEmitter<BeforeEdgeSelectEventArgs>;
|
|
33
|
+
EdgeSelected: EventEmitter<EdgeSelectedEventArgs>;
|
|
34
|
+
BeforeHopExpand: EventEmitter<BeforeHopExpandEventArgs>;
|
|
35
|
+
HopExpanded: EventEmitter<HopExpandedEventArgs>;
|
|
36
|
+
BeforeLayoutChange: EventEmitter<BeforeLayoutChangeEventArgs>;
|
|
37
|
+
LayoutChanged: EventEmitter<LayoutChangedEventArgs>;
|
|
38
|
+
BeforeNodeNavigate: EventEmitter<BeforeNodeNavigateEventArgs>;
|
|
39
|
+
NodeNavigated: EventEmitter<NodeNavigatedEventArgs>;
|
|
40
|
+
ViewportTransform: EventEmitter<ViewportTransformEventArgs>;
|
|
41
|
+
FilteredNodes: GraphNode[];
|
|
42
|
+
SelectedNode: GraphNode | null;
|
|
43
|
+
SelectedEdge: GraphEdge | null;
|
|
44
|
+
SearchQuery: string;
|
|
45
|
+
Scale: number;
|
|
46
|
+
PanX: number;
|
|
47
|
+
PanY: number;
|
|
48
|
+
IsPanning: boolean;
|
|
49
|
+
private panStartX;
|
|
50
|
+
private panStartY;
|
|
51
|
+
private draggedNode;
|
|
52
|
+
private simulation;
|
|
53
|
+
ngOnInit(): void;
|
|
54
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
55
|
+
ngOnDestroy(): void;
|
|
56
|
+
private InitializePositions;
|
|
57
|
+
SimulatePhysics(): void;
|
|
58
|
+
private SyncCoordinates;
|
|
59
|
+
private ApplyCircularLayout;
|
|
60
|
+
ZoomIn(): void;
|
|
61
|
+
ZoomOut(): void;
|
|
62
|
+
FitToView(): void;
|
|
63
|
+
AutoFitToView(padding?: number): void;
|
|
64
|
+
Rearrange(): void;
|
|
65
|
+
SetLayoutMode(mode: GraphLayoutMode): void;
|
|
66
|
+
SelectNode(id: string): void;
|
|
67
|
+
ClearSelection(): void;
|
|
68
|
+
SearchNodes(query: string): void;
|
|
69
|
+
ExpandHops(nodeId: string, depth: number): void;
|
|
70
|
+
OnNodeClick(node: GraphNode, event: MouseEvent): void;
|
|
71
|
+
OnEdgeClick(edge: GraphEdge, event: MouseEvent): void;
|
|
72
|
+
NavigateToEntity(node: GraphNode): void;
|
|
73
|
+
OnCanvasMouseDown(event: MouseEvent): void;
|
|
74
|
+
OnCanvasMouseMove(event: MouseEvent): void;
|
|
75
|
+
OnCanvasMouseUp(_event: MouseEvent): void;
|
|
76
|
+
OnCanvasWheel(event: WheelEvent): void;
|
|
77
|
+
OnNodeMouseDown(node: GraphNode, event: MouseEvent): void;
|
|
78
|
+
private EmitViewport;
|
|
79
|
+
private GetCanvasRelativeCoords;
|
|
80
|
+
private GetContainerWidth;
|
|
81
|
+
private GetContainerHeight;
|
|
82
|
+
ApplyFilters(): void;
|
|
83
|
+
GetNodeX(id: string): number;
|
|
84
|
+
GetNodeY(id: string): number;
|
|
85
|
+
GetCategoryConfig(category?: string): GraphCategoryConfig;
|
|
86
|
+
get ActiveCategories(): GraphCategoryConfig[];
|
|
87
|
+
GetCategoryLabel(category?: string): string;
|
|
88
|
+
GetNodeColor(node: GraphNode): string;
|
|
89
|
+
GetNodeIcon(node: GraphNode): string;
|
|
90
|
+
GetNodeEdgeCount(id: string): number;
|
|
91
|
+
IsEdgeHighlighted(edge: GraphEdge): boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Whether this node is the selected one. Exists as a method because the template cannot call
|
|
94
|
+
* an imported function directly, and the comparison must go through UUIDsEqual rather than ===.
|
|
95
|
+
*/
|
|
96
|
+
IsNodeSelected(node: GraphNode): boolean;
|
|
97
|
+
TruncateLabel(text: string, maxLen: number): string;
|
|
98
|
+
IsFocalNode(node: GraphNode): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Hosts prefix node IDs with `{category}:`. Categories are dynamic
|
|
101
|
+
* (`organization`, `asset`, `group`, plus caller keys), so strip any
|
|
102
|
+
* known-category prefix rather than a hardcoded subset.
|
|
103
|
+
*/
|
|
104
|
+
private stripCategoryPrefix;
|
|
105
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GraphViewComponent, never>;
|
|
106
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GraphViewComponent, "mj-graph-view", never, { "Nodes": { "alias": "Nodes"; "required": false; }; "Edges": { "alias": "Edges"; "required": false; }; "Categories": { "alias": "Categories"; "required": false; }; "LayoutMode": { "alias": "LayoutMode"; "required": false; }; "MaxHopDistance": { "alias": "MaxHopDistance"; "required": false; }; "SelectedNodeId": { "alias": "SelectedNodeId"; "required": false; }; "FocalNodeId": { "alias": "FocalNodeId"; "required": false; }; "AutoOpenInspector": { "alias": "AutoOpenInspector"; "required": false; }; "ShowToolbar": { "alias": "ShowToolbar"; "required": false; }; "ShowLegend": { "alias": "ShowLegend"; "required": false; }; "ShowInspector": { "alias": "ShowInspector"; "required": false; }; "Searchable": { "alias": "Searchable"; "required": false; }; "AutoFitOnLoad": { "alias": "AutoFitOnLoad"; "required": false; }; "Physics": { "alias": "Physics"; "required": false; }; }, { "BeforeNodeSelect": "BeforeNodeSelect"; "NodeSelected": "NodeSelected"; "BeforeEdgeSelect": "BeforeEdgeSelect"; "EdgeSelected": "EdgeSelected"; "BeforeHopExpand": "BeforeHopExpand"; "HopExpanded": "HopExpanded"; "BeforeLayoutChange": "BeforeLayoutChange"; "LayoutChanged": "LayoutChanged"; "BeforeNodeNavigate": "BeforeNodeNavigate"; "NodeNavigated": "NodeNavigated"; "ViewportTransform": "ViewportTransform"; }, never, never, true, never>;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=graph-view.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-view.component.d.ts","sourceRoot":"","sources":["../../../src/lib/components/graph-view.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIH,YAAY,EACZ,MAAM,EACN,SAAS,EACT,SAAS,EACT,aAAa,EAGb,UAAU,EAGb,MAAM,eAAe,CAAC;AAKvB,OAAO,KAAK,EACR,SAAS,EACT,SAAS,EACT,eAAe,EAEf,mBAAmB,EAEnB,kBAAkB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACH,yBAAyB,EACzB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,2BAA2B,EAC3B,sBAAsB,EACtB,2BAA2B,EAC3B,sBAAsB,EACtB,0BAA0B,EAC7B,MAAM,wBAAwB,CAAC;;AAEhC,eAAO,MAAM,wBAAwB,EAAE,mBAAmB,EAQzD,CAAC;AA4QF;;;;;GAKG;AACH,qBAiNa,kBAAmB,YAAW,MAAM,EAAE,SAAS,EAAE,SAAS;IACnE,OAAO,CAAC,GAAG,CAA6B;IAEO,UAAU,EAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IACtC,SAAS,EAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAGvE,KAAK,EAAE,SAAS,EAAE,CAAM;IACxB,KAAK,EAAE,SAAS,EAAE,CAAM;IACxB,UAAU,EAAE,mBAAmB,EAAE,CAA4B;IAC7D,UAAU,EAAE,eAAe,CAAW;IACtC,cAAc,SAAK;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,UAAS;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