@memberjunction/ng-graph-view 0.0.0 → 6.1.0-edge.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.
@@ -0,0 +1,132 @@
1
+ /**
2
+ * @fileoverview Domain models and configuration interfaces for `@memberjunction/ng-graph-view`.
3
+ *
4
+ * Provides strongly-typed data structures for representing entities as graph nodes,
5
+ * directed/undirected relationship edges, layout configurations, and viewport telemetry.
6
+ *
7
+ * @module @memberjunction/ng-graph-view
8
+ */
9
+ /**
10
+ * Standard semantic category of a graph node, or any custom category key defined by the consumer.
11
+ */
12
+ export type GraphNodeCategory = 'person' | 'organization' | 'committee' | 'account' | 'asset' | 'group' | 'custom' | (string & {});
13
+ /**
14
+ * Configuration for a graph node category defining its visual appearance in the canvas,
15
+ * dynamic legend, and inspector drawer.
16
+ */
17
+ export interface GraphCategoryConfig {
18
+ /** Unique category key matching GraphNode.Category (e.g. 'person', 'organization', 'vendor', 'role') */
19
+ Category: string;
20
+ /** Human-readable display label shown in the legend and node inspector */
21
+ Label: string;
22
+ /** Hex code, HSL, or CSS color variable (e.g. '#10b981' or 'var(--mj-brand-primary)') */
23
+ Color: string;
24
+ /** Font Awesome icon class (e.g. 'fa-solid fa-user') */
25
+ IconClass?: string;
26
+ /** Optional secondary stroke / accent color */
27
+ StrokeColor?: string;
28
+ }
29
+ /**
30
+ * Directional behavior of an edge in the network graph.
31
+ */
32
+ export type GraphEdgeDirection = 'directed' | 'undirected' | 'bidirectional';
33
+ /**
34
+ * Visual styling pattern for relationship edge lines.
35
+ */
36
+ export type GraphEdgeStyle = 'solid' | 'dashed' | 'dotted';
37
+ /**
38
+ * Layout simulation mode for graph positioning.
39
+ */
40
+ export type GraphLayoutMode = 'force' | 'circular' | 'hierarchy' | 'grid';
41
+ /**
42
+ * Represents a single node entity in the network graph.
43
+ */
44
+ export interface GraphNode<TData = Record<string, unknown>> {
45
+ /** Unique identifier for the node */
46
+ ID: string;
47
+ /** Primary display label (e.g. Person Name, Organization Name) */
48
+ Label: string;
49
+ /** Secondary descriptive sublabel (e.g. Job Title, Industry) */
50
+ Sublabel?: string;
51
+ /** Semantic category defining the default icon and palette */
52
+ Category: GraphNodeCategory;
53
+ /** Optional Font Awesome icon class override (e.g. 'fa-solid fa-user') */
54
+ IconClass?: string;
55
+ /** Optional custom hex/HSL color or CSS color variable override */
56
+ Color?: string;
57
+ /** Node radius / diameter scale (default is 28) */
58
+ Radius?: number;
59
+ /** Optional small badge text or status indicator */
60
+ Badge?: string;
61
+ /** Distance from root/selected focus node in hops (0 = focal center) */
62
+ HopDistance?: number;
63
+ /** Current 2D simulation coordinates (uppercase for MJ models, lowercase for D3 compatibility) */
64
+ X?: number;
65
+ Y?: number;
66
+ VX?: number;
67
+ VY?: number;
68
+ FX?: number | null;
69
+ FY?: number | null;
70
+ x?: number;
71
+ y?: number;
72
+ vx?: number;
73
+ vy?: number;
74
+ fx?: number | null;
75
+ fy?: number | null;
76
+ index?: number;
77
+ /** Underlying business entity reference / data payload */
78
+ Data?: TData;
79
+ }
80
+ /**
81
+ * Represents a relationship edge between two nodes.
82
+ */
83
+ export interface GraphEdge<TData = Record<string, unknown>> {
84
+ /** Unique identifier for the relationship edge */
85
+ ID: string;
86
+ /** Source node identifier */
87
+ SourceID: string;
88
+ /** Target node identifier */
89
+ TargetID: string;
90
+ /** D3 simulation link object references */
91
+ source?: string | GraphNode;
92
+ target?: string | GraphNode;
93
+ index?: number;
94
+ /** Relationship semantic label (e.g. 'Employed By', 'Board Member', 'Subsidiary Of') */
95
+ Label: string;
96
+ /** Directionality of the relationship */
97
+ Direction?: GraphEdgeDirection;
98
+ /** Edge thickness / weight (default is 2) */
99
+ Weight?: number;
100
+ /** Line style pattern */
101
+ Style?: GraphEdgeStyle;
102
+ /** Optional stroke color override */
103
+ Color?: string;
104
+ /** Whether to render an animated particle flow along the edge */
105
+ Animated?: boolean;
106
+ /** Underlying relationship entity reference / data payload */
107
+ Data?: TData;
108
+ }
109
+ /**
110
+ * Viewport zoom and pan transformation state.
111
+ */
112
+ export interface GraphViewportTransform {
113
+ Scale: number;
114
+ PanX: number;
115
+ PanY: number;
116
+ }
117
+ /**
118
+ * Options for configuring graph layout physics simulation.
119
+ */
120
+ export interface GraphPhysicsConfig {
121
+ /** Node repulsion charge strength (negative number, default -400) */
122
+ Repulsion: number;
123
+ /** Ideal spring link distance between connected nodes (default 120) */
124
+ LinkDistance: number;
125
+ /** Centering gravity force strength (default 0.05) */
126
+ Gravity: number;
127
+ /** Velocity damping coefficient between 0 and 1 (default 0.85) */
128
+ Damping: number;
129
+ /** Maximum simulation iterations before settling (default 300) */
130
+ MaxIterations: number;
131
+ }
132
+ //# sourceMappingURL=graph-models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph-models.d.ts","sourceRoot":"","sources":["../../../src/lib/models/graph-models.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACvB,QAAQ,GACR,cAAc,GACd,WAAW,GACX,SAAS,GACT,OAAO,GACP,OAAO,GACP,QAAQ,GACR,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAEpB;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAChC,wGAAwG;IACxG,QAAQ,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,yFAAyF;IACzF,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GACxB,UAAU,GACV,YAAY,GACZ,eAAe,CAAC;AAEtB;;GAEG;AACH,MAAM,MAAM,cAAc,GACpB,OAAO,GACP,QAAQ,GACR,QAAQ,CAAC;AAEf;;GAEG;AACH,MAAM,MAAM,eAAe,GACrB,OAAO,GACP,UAAU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AO,CAAC;IACtD,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IAEX,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IAEjB,6BAA6B;IAC7B,QAAQ,EAAE,MAAM,CAAC;IAEjB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,wFAAwF;IACxF,KAAK,EAAE,MAAM,CAAC;IAEd,yCAAyC;IACzC,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAE/B,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,yBAAyB;IACzB,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,iEAAiE;IACjE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,8DAA8D;IAC9D,IAAI,CAAC,EAAE,KAAK,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,qEAAqE;IACrE,SAAS,EAAE,MAAM,CAAC;IAElB,uEAAuE;IACvE,YAAY,EAAE,MAAM,CAAC;IAErB,sDAAsD;IACtD,OAAO,EAAE,MAAM,CAAC;IAEhB,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAEhB,kEAAkE;IAClE,aAAa,EAAE,MAAM,CAAC;CACzB"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @fileoverview Domain models and configuration interfaces for `@memberjunction/ng-graph-view`.
3
+ *
4
+ * Provides strongly-typed data structures for representing entities as graph nodes,
5
+ * directed/undirected relationship edges, layout configurations, and viewport telemetry.
6
+ *
7
+ * @module @memberjunction/ng-graph-view
8
+ */
9
+ export {};
10
+ //# sourceMappingURL=graph-models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph-models.js","sourceRoot":"","sources":["../../../src/lib/models/graph-models.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG","sourcesContent":["/**\n * @fileoverview Domain models and configuration interfaces for `@memberjunction/ng-graph-view`.\n *\n * Provides strongly-typed data structures for representing entities as graph nodes,\n * directed/undirected relationship edges, layout configurations, and viewport telemetry.\n *\n * @module @memberjunction/ng-graph-view\n */\n\n/**\n * Standard semantic category of a graph node, or any custom category key defined by the consumer.\n */\nexport type GraphNodeCategory =\n | 'person'\n | 'organization'\n | 'committee'\n | 'account'\n | 'asset'\n | 'group'\n | 'custom'\n | (string & {});\n\n/**\n * Configuration for a graph node category defining its visual appearance in the canvas,\n * dynamic legend, and inspector drawer.\n */\nexport interface GraphCategoryConfig {\n /** Unique category key matching GraphNode.Category (e.g. 'person', 'organization', 'vendor', 'role') */\n Category: string;\n /** Human-readable display label shown in the legend and node inspector */\n Label: string;\n /** Hex code, HSL, or CSS color variable (e.g. '#10b981' or 'var(--mj-brand-primary)') */\n Color: string;\n /** Font Awesome icon class (e.g. 'fa-solid fa-user') */\n IconClass?: string;\n /** Optional secondary stroke / accent color */\n StrokeColor?: string;\n}\n\n/**\n * Directional behavior of an edge in the network graph.\n */\nexport type GraphEdgeDirection =\n | 'directed'\n | 'undirected'\n | 'bidirectional';\n\n/**\n * Visual styling pattern for relationship edge lines.\n */\nexport type GraphEdgeStyle =\n | 'solid'\n | 'dashed'\n | 'dotted';\n\n/**\n * Layout simulation mode for graph positioning.\n */\nexport type GraphLayoutMode =\n | 'force'\n | 'circular'\n | 'hierarchy'\n | 'grid';\n\n/**\n * Represents a single node entity in the network graph.\n */\nexport interface GraphNode<TData = Record<string, unknown>> {\n /** Unique identifier for the node */\n ID: string;\n\n /** Primary display label (e.g. Person Name, Organization Name) */\n Label: string;\n\n /** Secondary descriptive sublabel (e.g. Job Title, Industry) */\n Sublabel?: string;\n\n /** Semantic category defining the default icon and palette */\n Category: GraphNodeCategory;\n\n /** Optional Font Awesome icon class override (e.g. 'fa-solid fa-user') */\n IconClass?: string;\n\n /** Optional custom hex/HSL color or CSS color variable override */\n Color?: string;\n\n /** Node radius / diameter scale (default is 28) */\n Radius?: number;\n\n /** Optional small badge text or status indicator */\n Badge?: string;\n\n /** Distance from root/selected focus node in hops (0 = focal center) */\n HopDistance?: number;\n\n /** Current 2D simulation coordinates (uppercase for MJ models, lowercase for D3 compatibility) */\n X?: number;\n Y?: number;\n VX?: number;\n VY?: number;\n FX?: number | null;\n FY?: number | null;\n\n x?: number;\n y?: number;\n vx?: number;\n vy?: number;\n fx?: number | null;\n fy?: number | null;\n index?: number;\n\n /** Underlying business entity reference / data payload */\n Data?: TData;\n}\n\n/**\n * Represents a relationship edge between two nodes.\n */\nexport interface GraphEdge<TData = Record<string, unknown>> {\n /** Unique identifier for the relationship edge */\n ID: string;\n\n /** Source node identifier */\n SourceID: string;\n\n /** Target node identifier */\n TargetID: string;\n\n /** D3 simulation link object references */\n source?: string | GraphNode;\n target?: string | GraphNode;\n index?: number;\n\n /** Relationship semantic label (e.g. 'Employed By', 'Board Member', 'Subsidiary Of') */\n Label: string;\n\n /** Directionality of the relationship */\n Direction?: GraphEdgeDirection;\n\n /** Edge thickness / weight (default is 2) */\n Weight?: number;\n\n /** Line style pattern */\n Style?: GraphEdgeStyle;\n\n /** Optional stroke color override */\n Color?: string;\n\n /** Whether to render an animated particle flow along the edge */\n Animated?: boolean;\n\n /** Underlying relationship entity reference / data payload */\n Data?: TData;\n}\n\n/**\n * Viewport zoom and pan transformation state.\n */\nexport interface GraphViewportTransform {\n Scale: number;\n PanX: number;\n PanY: number;\n}\n\n/**\n * Options for configuring graph layout physics simulation.\n */\nexport interface GraphPhysicsConfig {\n /** Node repulsion charge strength (negative number, default -400) */\n Repulsion: number;\n\n /** Ideal spring link distance between connected nodes (default 120) */\n LinkDistance: number;\n\n /** Centering gravity force strength (default 0.05) */\n Gravity: number;\n\n /** Velocity damping coefficient between 0 and 1 (default 0.85) */\n Damping: number;\n\n /** Maximum simulation iterations before settling (default 300) */\n MaxIterations: number;\n}\n"]}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Public API Surface of `@memberjunction/ng-graph-view`
3
+ */
4
+ export * from './lib/components/graph-view.component';
5
+ export * from './lib/graph-view.module';
6
+ export * from './lib/models/graph-models';
7
+ export * from './lib/events/graph-events';
8
+ //# sourceMappingURL=public-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,uCAAuC,CAAC;AACtD,cAAc,yBAAyB,CAAC;AAGxC,cAAc,2BAA2B,CAAC;AAG1C,cAAc,2BAA2B,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Public API Surface of `@memberjunction/ng-graph-view`
3
+ */
4
+ // Component & Module
5
+ export * from './lib/components/graph-view.component';
6
+ export * from './lib/graph-view.module';
7
+ // Models
8
+ export * from './lib/models/graph-models';
9
+ // Events
10
+ export * from './lib/events/graph-events';
11
+ //# sourceMappingURL=public-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,qBAAqB;AACrB,cAAc,uCAAuC,CAAC;AACtD,cAAc,yBAAyB,CAAC;AAExC,SAAS;AACT,cAAc,2BAA2B,CAAC;AAE1C,SAAS;AACT,cAAc,2BAA2B,CAAC","sourcesContent":["/**\n * Public API Surface of `@memberjunction/ng-graph-view`\n */\n\n// Component & Module\nexport * from './lib/components/graph-view.component';\nexport * from './lib/graph-view.module';\n\n// Models\nexport * from './lib/models/graph-models';\n\n// Events\nexport * from './lib/events/graph-events';\n"]}
package/package.json CHANGED
@@ -1,10 +1,47 @@
1
1
  {
2
2
  "name": "@memberjunction/ng-graph-view",
3
- "version": "0.0.0",
4
- "description": "OIDC trusted publishing setup package for @memberjunction/ng-graph-view",
3
+ "version": "6.1.0-edge.3",
4
+ "description": "MemberJunction: Generic interactive network and relationship graph viewer with force-directed physics, Before/After cancelable events, and MJ design tokens",
5
+ "main": "./dist/public-api.js",
6
+ "typings": "./dist/public-api.d.ts",
7
+ "files": [
8
+ "/dist"
9
+ ],
5
10
  "keywords": [
6
- "oidc",
7
- "trusted-publishing",
8
- "setup"
9
- ]
10
- }
11
+ "angular",
12
+ "graph",
13
+ "network",
14
+ "force-directed",
15
+ "relationships",
16
+ "visualization",
17
+ "memberjunction"
18
+ ],
19
+ "author": "",
20
+ "license": "BUSL-1.1",
21
+ "devDependencies": {
22
+ "@angular/compiler": "21.1.3",
23
+ "@angular/compiler-cli": "21.1.3"
24
+ },
25
+ "peerDependencies": {
26
+ "@angular/common": "^21.1.3",
27
+ "@angular/core": "^21.1.3",
28
+ "@angular/forms": "^21.1.3"
29
+ },
30
+ "dependencies": {
31
+ "@memberjunction/ng-ui-components": "6.1.0-edge.3",
32
+ "@memberjunction/global": "6.1.0-edge.3",
33
+ "@types/d3": "^7.4.3",
34
+ "d3": "^7.9.0",
35
+ "tslib": "^2.8.1",
36
+ "rxjs": "^7.8.2"
37
+ },
38
+ "sideEffects": false,
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "https://github.com/MemberJunction/MJ"
42
+ },
43
+ "mjUILayer": "widgets",
44
+ "scripts": {
45
+ "build": "ngc"
46
+ }
47
+ }