@hpcc-js/graph 2.87.3 → 2.87.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.
Files changed (60) hide show
  1. package/LICENSE +43 -43
  2. package/README.md +256 -256
  3. package/dist/index.es6.js +3 -3
  4. package/dist/index.es6.js.map +1 -1
  5. package/dist/index.js +3 -3
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.min.js +1 -1
  8. package/dist/index.min.js.map +1 -1
  9. package/package.json +8 -8
  10. package/src/AdjacencyGraph.ts +224 -224
  11. package/src/Edge.css +23 -23
  12. package/src/Edge.ts +257 -257
  13. package/src/Graph.css +18 -18
  14. package/src/Graph.ts +1075 -1075
  15. package/src/GraphData.ts +187 -187
  16. package/src/GraphLayouts.ts +173 -173
  17. package/src/Sankey.css +46 -46
  18. package/src/Sankey.ts +291 -291
  19. package/src/Subgraph.css +10 -10
  20. package/src/Subgraph.ts +165 -165
  21. package/src/Vertex.css +3 -3
  22. package/src/Vertex.ts +282 -282
  23. package/src/__package__.ts +3 -3
  24. package/src/__tests__/data.ts +444 -444
  25. package/src/__tests__/index.ts +1 -1
  26. package/src/__tests__/test1.ts +18 -18
  27. package/src/__tests__/test2.ts +80 -80
  28. package/src/__tests__/test3.ts +46 -46
  29. package/src/__tests__/test4.ts +66 -66
  30. package/src/__tests__/test5.ts +85 -85
  31. package/src/graph2/dataGraph.ts +305 -305
  32. package/src/graph2/graph.css +34 -34
  33. package/src/graph2/graph.ts +135 -135
  34. package/src/graph2/graphReactT.ts +44 -44
  35. package/src/graph2/graphT.ts +1330 -1330
  36. package/src/graph2/index.ts +7 -7
  37. package/src/graph2/layouts/circle.ts +37 -37
  38. package/src/graph2/layouts/dagre.ts +132 -132
  39. package/src/graph2/layouts/dagreWorker.ts +35 -35
  40. package/src/graph2/layouts/forceDirected.ts +117 -117
  41. package/src/graph2/layouts/forceDirectedWorker.ts +30 -30
  42. package/src/graph2/layouts/geoForceDirected.ts +112 -112
  43. package/src/graph2/layouts/graphviz.ts +124 -124
  44. package/src/graph2/layouts/graphvizWorker.ts +71 -71
  45. package/src/graph2/layouts/index.ts +7 -7
  46. package/src/graph2/layouts/layout.ts +105 -105
  47. package/src/graph2/layouts/null.ts +35 -35
  48. package/src/graph2/layouts/placeholders.ts +103 -103
  49. package/src/graph2/layouts/tree.ts +328 -328
  50. package/src/graph2/liteMap.ts +72 -72
  51. package/src/graph2/liteSVGZooom.ts +61 -61
  52. package/src/graph2/sankeyGraph.css +45 -45
  53. package/src/graph2/sankeyGraph.ts +316 -316
  54. package/src/graph2/subgraph.tsx +30 -30
  55. package/src/graph2/vertex.tsx +31 -31
  56. package/src/index.ts +8 -8
  57. package/src/test.ts +649 -649
  58. package/types/__package__.d.ts +2 -2
  59. package/types/__package__.d.ts.map +1 -1
  60. package/types-3.4/__package__.d.ts +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hpcc-js/graph",
3
- "version": "2.87.3",
3
+ "version": "2.87.4",
4
4
  "description": "hpcc-js - Viz Graph",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es6",
@@ -51,17 +51,17 @@
51
51
  "update": "npx --yes npm-check-updates -u -t minor"
52
52
  },
53
53
  "dependencies": {
54
- "@hpcc-js/api": "^2.14.3",
55
- "@hpcc-js/common": "^2.73.3",
56
- "@hpcc-js/html": "^2.44.3",
57
- "@hpcc-js/react": "^2.55.3",
54
+ "@hpcc-js/api": "^2.14.5",
55
+ "@hpcc-js/common": "^2.73.5",
56
+ "@hpcc-js/html": "^2.44.5",
57
+ "@hpcc-js/react": "^2.55.5",
58
58
  "@hpcc-js/util": "^2.53.3"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@hpcc-js/bundle": "^2.12.0",
62
- "@hpcc-js/wasm-graphviz": "1.21.0",
62
+ "@hpcc-js/wasm-graphviz": "1.21.2",
63
63
  "@types/d3-transition": "1.3.6",
64
- "@types/dagre": "0.7.53",
64
+ "@types/dagre": "0.7.54",
65
65
  "d3-array": "^1",
66
66
  "d3-drag": "^1",
67
67
  "d3-force": "^1",
@@ -88,5 +88,5 @@
88
88
  "url": "https://github.com/hpcc-systems/Visualization/issues"
89
89
  },
90
90
  "homepage": "https://github.com/hpcc-systems/Visualization",
91
- "gitHead": "0907b8d15d369c89483954a1d96e2247ba020cb6"
91
+ "gitHead": "e9d09185b7cd29dce187ab524d6f03ad0e6abd0e"
92
92
  }
@@ -1,224 +1,224 @@
1
- import { PropertyExt } from "@hpcc-js/common";
2
- import { hashSum } from "@hpcc-js/util";
3
- import { Edge } from "./Edge";
4
- import { Graph, IGraphData } from "./Graph";
5
- import { IAnnotation, Vertex } from "./Vertex";
6
-
7
- interface IAnnotationIndexes {
8
- iconCol: number;
9
- iconFillCol: number;
10
- tooltipCol: number;
11
- shapeStrokeCol: number;
12
- shapeFillCol: number;
13
- }
14
-
15
- export class Annotation extends PropertyExt {
16
- protected _owner: AdjacencyGraph;
17
-
18
- owner(): AdjacencyGraph;
19
- owner(_: AdjacencyGraph): this;
20
- owner(_?: AdjacencyGraph): AdjacencyGraph | this {
21
- if (!arguments.length) return this._owner;
22
- this._owner = _;
23
- return this;
24
- }
25
-
26
- valid(): boolean {
27
- return !!this.iconColumn();
28
- }
29
-
30
- indexes(): IAnnotationIndexes {
31
- const columns = this._owner.columns();
32
- return {
33
- iconCol: columns.indexOf(this.iconColumn()),
34
- iconFillCol: columns.indexOf(this.iconFillColumn()),
35
- tooltipCol: columns.indexOf(this.tooltipColumn()),
36
- shapeStrokeCol: columns.indexOf(this.shapeStrokeColumn()),
37
- shapeFillCol: columns.indexOf(this.shapeFillColumn())
38
- };
39
- }
40
-
41
- mapper(): (row) => IAnnotation {
42
- const indexes = this.indexes();
43
- return (row) => ({
44
- faChar: row[indexes.iconCol],
45
- tooltip: row[indexes.tooltipCol],
46
- shape_colorFill: row[indexes.shapeFillCol] || this.shapeFillDefault(),
47
- shape_colorStroke: row[indexes.shapeStrokeCol] || this.shapeStrokeDefault(),
48
- image_colorFill: row[indexes.iconFillCol] || this.iconFillDefault()
49
- });
50
- }
51
- }
52
- Annotation.prototype._class += " graph_Annotation";
53
- export interface Annotation {
54
- iconColumn(): string;
55
- iconColumn(_: string): this;
56
- iconFillDefault(): string;
57
- iconFillDefault(_: string): this;
58
- iconFillColumn(): string;
59
- iconFillColumn(_: string): this;
60
- tooltipColumn(): string;
61
- tooltipColumn(_: string): this;
62
- shapeStrokeDefault(): string;
63
- shapeStrokeDefault(_: string): this;
64
- shapeStrokeColumn(): string;
65
- shapeStrokeColumn(_: string): this;
66
- shapeFillDefault(): string;
67
- shapeFillDefault(_: string): this;
68
- shapeFillColumn(): string;
69
- shapeFillColumn(_: string): this;
70
- }
71
- Annotation.prototype.publish("iconColumn", "", "set", "Icon column", function (this: Annotation) { return this._owner.columns(); }, { optional: true });
72
- Annotation.prototype.publish("iconFillDefault", "white", "html-color", "Icon fill default color");
73
- Annotation.prototype.publish("iconFillColumn", "", "set", "Icon fill color column", function (this: Annotation) { return this._owner.columns(); }, { optional: true });
74
- Annotation.prototype.publish("tooltipColumn", "", "set", "Tooltip column", function (this: Annotation) { return this._owner.columns(); }, { optional: true });
75
- Annotation.prototype.publish("shapeStrokeDefault", "darkred", "html-color", "Shape stroke default color");
76
- Annotation.prototype.publish("shapeStrokeColumn", "", "set", "Shape stroke color column", function (this: Annotation) { return this._owner.columns(); }, { optional: true });
77
- Annotation.prototype.publish("shapeFillDefault", "red", "html-color", "Shape fill default color");
78
- Annotation.prototype.publish("shapeFillColumn", "", "set", "Shape fill color column", function (this: Annotation) { return this._owner.columns(); }, { optional: true });
79
-
80
- export class AdjacencyGraph extends Graph {
81
-
82
- private _vertexMap: { [key: string]: Vertex } = {};
83
- private _edgeMap: { [key: string]: Edge } = {};
84
- private _prevAdjacencyDataHash: string;
85
- private _merge: boolean = false;
86
- private _adjacencyData: object[] = [];
87
-
88
- constructor() {
89
- super();
90
- }
91
-
92
- linksColumns(): string[] {
93
- const linksCol: number = this.columns().indexOf(this.linksColumn());
94
- const linksField = this._db.field(linksCol);
95
- if (linksField) {
96
- return linksField.children().map(field => field.label());
97
- }
98
- return [];
99
- }
100
-
101
- validAnnotations() {
102
- return this.annotations().filter(a => a.valid());
103
- }
104
-
105
- updateData() {
106
- const prevAdjacencyDataHash = hashSum([this._adjacencyData, this.uidColumn(), this.labelColumn(), this.iconColumn(), this.linksColumn(), this.linkUidColumn(), this.linkLabelColumn(), this.validAnnotations().map(a => a.hashSum())]);
107
- if (this._prevAdjacencyDataHash !== prevAdjacencyDataHash) {
108
- this._prevAdjacencyDataHash = prevAdjacencyDataHash;
109
-
110
- const columns = this.columns();
111
- const uidCol: number = columns.indexOf(this.uidColumn());
112
- const labelCol: number = columns.indexOf(this.labelColumn());
113
- const iconCol: number = columns.indexOf(this.iconColumn());
114
- const linksCol: number = columns.indexOf(this.linksColumn());
115
-
116
- const linksColumns = this.linksColumns();
117
- const linksUidCol: number = linksColumns.indexOf(this.linkUidColumn());
118
- const linksLabelCol: number = linksColumns.indexOf(this.linkLabelColumn());
119
-
120
- const annotationMappers = this.validAnnotations().map(a => a.mapper());
121
-
122
- const vertexMap: { [key: string]: Vertex } = {};
123
- const edgeMap: { [key: string]: Edge } = {};
124
- const graphData: IGraphData = {
125
- vertices: this._adjacencyData.map(row => {
126
- const uid = row[uidCol];
127
- if (uid !== undefined) {
128
- let retVal = vertexMap[uid] || this._vertexMap[uid];
129
- if (!retVal) {
130
- retVal = new Vertex();
131
- }
132
- vertexMap[uid] = retVal;
133
-
134
- retVal
135
- .text(row[labelCol])
136
- .data(row)
137
- .faChar(row[iconCol])
138
- .annotationIcons(annotationMappers.map(am => am(row)))
139
- ;
140
-
141
- return retVal;
142
- }
143
- }).filter(v => !!v),
144
- edges: []
145
- };
146
- for (const row of this._adjacencyData) {
147
- const uid = row[uidCol];
148
- const links = row[linksCol];
149
- if (uid !== undefined && links !== undefined) {
150
- for (const childRow of links) {
151
- const linkUid = childRow[linksUidCol];
152
- const linkLabel = childRow[linksLabelCol];
153
- const edgeID = `${uid}->${linkUid}`;
154
- let retVal = edgeMap[edgeID] || this._edgeMap[edgeID];
155
- if (!retVal) {
156
- if (vertexMap[uid] && vertexMap[linkUid]) {
157
- retVal = new Edge()
158
- .sourceVertex(vertexMap[uid])
159
- .targetVertex(vertexMap[linkUid])
160
- .data(childRow)
161
- ;
162
- } else {
163
- console.warn("Missing vertices for edge: " + edgeID);
164
- }
165
- }
166
- if (retVal) {
167
- retVal.text(linkLabel);
168
- edgeMap[edgeID] = retVal;
169
- graphData.edges.push(retVal);
170
- }
171
- }
172
- }
173
- }
174
- this._vertexMap = vertexMap;
175
- this._edgeMap = edgeMap;
176
- super.data(graphData, this._merge);
177
- }
178
- }
179
-
180
- data(): IGraphData;
181
- data(_: IGraphData, merge?: boolean): this;
182
- data(_?: IGraphData | object[], merge?: boolean): IGraphData | object[] | this {
183
- if (!arguments.length) return this._adjacencyData;
184
- if (_ instanceof Array) {
185
- this._merge = merge;
186
- this._adjacencyData = _;
187
- return this;
188
- }
189
- throw new Error("Invalid data shape.");
190
- }
191
-
192
- update(domNode, element) {
193
- this.updateData();
194
- super.update(domNode, element);
195
- }
196
-
197
- click(row, col, sel) {
198
- }
199
- }
200
- AdjacencyGraph.prototype._class += " graph_AdjacencyGraph";
201
-
202
- export interface AdjacencyGraph {
203
- uidColumn(): string;
204
- uidColumn(_: string): this;
205
- labelColumn(): string;
206
- labelColumn(_: string): this;
207
- iconColumn(): string;
208
- iconColumn(_: string): this;
209
- linksColumn(): string;
210
- linksColumn(_: string): this;
211
- linkUidColumn(): string;
212
- linkUidColumn(_: string): this;
213
- linkLabelColumn(): string;
214
- linkLabelColumn(_: string): this;
215
- annotations(): Annotation[];
216
- annotations(_: Annotation[]): this;
217
- }
218
- AdjacencyGraph.prototype.publish("uidColumn", "", "set", "UID column", function (this: AdjacencyGraph) { return this.columns(); }, { optional: true });
219
- AdjacencyGraph.prototype.publish("labelColumn", "", "set", "Label column", function (this: AdjacencyGraph) { return this.columns(); }, { optional: true });
220
- AdjacencyGraph.prototype.publish("iconColumn", "", "set", "Icon column", function (this: AdjacencyGraph) { return this.columns(); }, { optional: true });
221
- AdjacencyGraph.prototype.publish("linksColumn", "", "set", "Links column", function (this: AdjacencyGraph) { return this.columns(); }, { optional: true });
222
- AdjacencyGraph.prototype.publish("linkUidColumn", "", "set", "Link UID column", function (this: AdjacencyGraph) { return this.linksColumns(); }, { optional: true });
223
- AdjacencyGraph.prototype.publish("linkLabelColumn", "", "set", "Link Label column", function (this: AdjacencyGraph) { return this.linksColumns(); }, { optional: true });
224
- AdjacencyGraph.prototype.publish("annotations", [], "propertyArray", "Annotations", null, { autoExpand: Annotation });
1
+ import { PropertyExt } from "@hpcc-js/common";
2
+ import { hashSum } from "@hpcc-js/util";
3
+ import { Edge } from "./Edge";
4
+ import { Graph, IGraphData } from "./Graph";
5
+ import { IAnnotation, Vertex } from "./Vertex";
6
+
7
+ interface IAnnotationIndexes {
8
+ iconCol: number;
9
+ iconFillCol: number;
10
+ tooltipCol: number;
11
+ shapeStrokeCol: number;
12
+ shapeFillCol: number;
13
+ }
14
+
15
+ export class Annotation extends PropertyExt {
16
+ protected _owner: AdjacencyGraph;
17
+
18
+ owner(): AdjacencyGraph;
19
+ owner(_: AdjacencyGraph): this;
20
+ owner(_?: AdjacencyGraph): AdjacencyGraph | this {
21
+ if (!arguments.length) return this._owner;
22
+ this._owner = _;
23
+ return this;
24
+ }
25
+
26
+ valid(): boolean {
27
+ return !!this.iconColumn();
28
+ }
29
+
30
+ indexes(): IAnnotationIndexes {
31
+ const columns = this._owner.columns();
32
+ return {
33
+ iconCol: columns.indexOf(this.iconColumn()),
34
+ iconFillCol: columns.indexOf(this.iconFillColumn()),
35
+ tooltipCol: columns.indexOf(this.tooltipColumn()),
36
+ shapeStrokeCol: columns.indexOf(this.shapeStrokeColumn()),
37
+ shapeFillCol: columns.indexOf(this.shapeFillColumn())
38
+ };
39
+ }
40
+
41
+ mapper(): (row) => IAnnotation {
42
+ const indexes = this.indexes();
43
+ return (row) => ({
44
+ faChar: row[indexes.iconCol],
45
+ tooltip: row[indexes.tooltipCol],
46
+ shape_colorFill: row[indexes.shapeFillCol] || this.shapeFillDefault(),
47
+ shape_colorStroke: row[indexes.shapeStrokeCol] || this.shapeStrokeDefault(),
48
+ image_colorFill: row[indexes.iconFillCol] || this.iconFillDefault()
49
+ });
50
+ }
51
+ }
52
+ Annotation.prototype._class += " graph_Annotation";
53
+ export interface Annotation {
54
+ iconColumn(): string;
55
+ iconColumn(_: string): this;
56
+ iconFillDefault(): string;
57
+ iconFillDefault(_: string): this;
58
+ iconFillColumn(): string;
59
+ iconFillColumn(_: string): this;
60
+ tooltipColumn(): string;
61
+ tooltipColumn(_: string): this;
62
+ shapeStrokeDefault(): string;
63
+ shapeStrokeDefault(_: string): this;
64
+ shapeStrokeColumn(): string;
65
+ shapeStrokeColumn(_: string): this;
66
+ shapeFillDefault(): string;
67
+ shapeFillDefault(_: string): this;
68
+ shapeFillColumn(): string;
69
+ shapeFillColumn(_: string): this;
70
+ }
71
+ Annotation.prototype.publish("iconColumn", "", "set", "Icon column", function (this: Annotation) { return this._owner.columns(); }, { optional: true });
72
+ Annotation.prototype.publish("iconFillDefault", "white", "html-color", "Icon fill default color");
73
+ Annotation.prototype.publish("iconFillColumn", "", "set", "Icon fill color column", function (this: Annotation) { return this._owner.columns(); }, { optional: true });
74
+ Annotation.prototype.publish("tooltipColumn", "", "set", "Tooltip column", function (this: Annotation) { return this._owner.columns(); }, { optional: true });
75
+ Annotation.prototype.publish("shapeStrokeDefault", "darkred", "html-color", "Shape stroke default color");
76
+ Annotation.prototype.publish("shapeStrokeColumn", "", "set", "Shape stroke color column", function (this: Annotation) { return this._owner.columns(); }, { optional: true });
77
+ Annotation.prototype.publish("shapeFillDefault", "red", "html-color", "Shape fill default color");
78
+ Annotation.prototype.publish("shapeFillColumn", "", "set", "Shape fill color column", function (this: Annotation) { return this._owner.columns(); }, { optional: true });
79
+
80
+ export class AdjacencyGraph extends Graph {
81
+
82
+ private _vertexMap: { [key: string]: Vertex } = {};
83
+ private _edgeMap: { [key: string]: Edge } = {};
84
+ private _prevAdjacencyDataHash: string;
85
+ private _merge: boolean = false;
86
+ private _adjacencyData: object[] = [];
87
+
88
+ constructor() {
89
+ super();
90
+ }
91
+
92
+ linksColumns(): string[] {
93
+ const linksCol: number = this.columns().indexOf(this.linksColumn());
94
+ const linksField = this._db.field(linksCol);
95
+ if (linksField) {
96
+ return linksField.children().map(field => field.label());
97
+ }
98
+ return [];
99
+ }
100
+
101
+ validAnnotations() {
102
+ return this.annotations().filter(a => a.valid());
103
+ }
104
+
105
+ updateData() {
106
+ const prevAdjacencyDataHash = hashSum([this._adjacencyData, this.uidColumn(), this.labelColumn(), this.iconColumn(), this.linksColumn(), this.linkUidColumn(), this.linkLabelColumn(), this.validAnnotations().map(a => a.hashSum())]);
107
+ if (this._prevAdjacencyDataHash !== prevAdjacencyDataHash) {
108
+ this._prevAdjacencyDataHash = prevAdjacencyDataHash;
109
+
110
+ const columns = this.columns();
111
+ const uidCol: number = columns.indexOf(this.uidColumn());
112
+ const labelCol: number = columns.indexOf(this.labelColumn());
113
+ const iconCol: number = columns.indexOf(this.iconColumn());
114
+ const linksCol: number = columns.indexOf(this.linksColumn());
115
+
116
+ const linksColumns = this.linksColumns();
117
+ const linksUidCol: number = linksColumns.indexOf(this.linkUidColumn());
118
+ const linksLabelCol: number = linksColumns.indexOf(this.linkLabelColumn());
119
+
120
+ const annotationMappers = this.validAnnotations().map(a => a.mapper());
121
+
122
+ const vertexMap: { [key: string]: Vertex } = {};
123
+ const edgeMap: { [key: string]: Edge } = {};
124
+ const graphData: IGraphData = {
125
+ vertices: this._adjacencyData.map(row => {
126
+ const uid = row[uidCol];
127
+ if (uid !== undefined) {
128
+ let retVal = vertexMap[uid] || this._vertexMap[uid];
129
+ if (!retVal) {
130
+ retVal = new Vertex();
131
+ }
132
+ vertexMap[uid] = retVal;
133
+
134
+ retVal
135
+ .text(row[labelCol])
136
+ .data(row)
137
+ .faChar(row[iconCol])
138
+ .annotationIcons(annotationMappers.map(am => am(row)))
139
+ ;
140
+
141
+ return retVal;
142
+ }
143
+ }).filter(v => !!v),
144
+ edges: []
145
+ };
146
+ for (const row of this._adjacencyData) {
147
+ const uid = row[uidCol];
148
+ const links = row[linksCol];
149
+ if (uid !== undefined && links !== undefined) {
150
+ for (const childRow of links) {
151
+ const linkUid = childRow[linksUidCol];
152
+ const linkLabel = childRow[linksLabelCol];
153
+ const edgeID = `${uid}->${linkUid}`;
154
+ let retVal = edgeMap[edgeID] || this._edgeMap[edgeID];
155
+ if (!retVal) {
156
+ if (vertexMap[uid] && vertexMap[linkUid]) {
157
+ retVal = new Edge()
158
+ .sourceVertex(vertexMap[uid])
159
+ .targetVertex(vertexMap[linkUid])
160
+ .data(childRow)
161
+ ;
162
+ } else {
163
+ console.warn("Missing vertices for edge: " + edgeID);
164
+ }
165
+ }
166
+ if (retVal) {
167
+ retVal.text(linkLabel);
168
+ edgeMap[edgeID] = retVal;
169
+ graphData.edges.push(retVal);
170
+ }
171
+ }
172
+ }
173
+ }
174
+ this._vertexMap = vertexMap;
175
+ this._edgeMap = edgeMap;
176
+ super.data(graphData, this._merge);
177
+ }
178
+ }
179
+
180
+ data(): IGraphData;
181
+ data(_: IGraphData, merge?: boolean): this;
182
+ data(_?: IGraphData | object[], merge?: boolean): IGraphData | object[] | this {
183
+ if (!arguments.length) return this._adjacencyData;
184
+ if (_ instanceof Array) {
185
+ this._merge = merge;
186
+ this._adjacencyData = _;
187
+ return this;
188
+ }
189
+ throw new Error("Invalid data shape.");
190
+ }
191
+
192
+ update(domNode, element) {
193
+ this.updateData();
194
+ super.update(domNode, element);
195
+ }
196
+
197
+ click(row, col, sel) {
198
+ }
199
+ }
200
+ AdjacencyGraph.prototype._class += " graph_AdjacencyGraph";
201
+
202
+ export interface AdjacencyGraph {
203
+ uidColumn(): string;
204
+ uidColumn(_: string): this;
205
+ labelColumn(): string;
206
+ labelColumn(_: string): this;
207
+ iconColumn(): string;
208
+ iconColumn(_: string): this;
209
+ linksColumn(): string;
210
+ linksColumn(_: string): this;
211
+ linkUidColumn(): string;
212
+ linkUidColumn(_: string): this;
213
+ linkLabelColumn(): string;
214
+ linkLabelColumn(_: string): this;
215
+ annotations(): Annotation[];
216
+ annotations(_: Annotation[]): this;
217
+ }
218
+ AdjacencyGraph.prototype.publish("uidColumn", "", "set", "UID column", function (this: AdjacencyGraph) { return this.columns(); }, { optional: true });
219
+ AdjacencyGraph.prototype.publish("labelColumn", "", "set", "Label column", function (this: AdjacencyGraph) { return this.columns(); }, { optional: true });
220
+ AdjacencyGraph.prototype.publish("iconColumn", "", "set", "Icon column", function (this: AdjacencyGraph) { return this.columns(); }, { optional: true });
221
+ AdjacencyGraph.prototype.publish("linksColumn", "", "set", "Links column", function (this: AdjacencyGraph) { return this.columns(); }, { optional: true });
222
+ AdjacencyGraph.prototype.publish("linkUidColumn", "", "set", "Link UID column", function (this: AdjacencyGraph) { return this.linksColumns(); }, { optional: true });
223
+ AdjacencyGraph.prototype.publish("linkLabelColumn", "", "set", "Link Label column", function (this: AdjacencyGraph) { return this.linksColumns(); }, { optional: true });
224
+ AdjacencyGraph.prototype.publish("annotations", [], "propertyArray", "Annotations", null, { autoExpand: Annotation });
package/src/Edge.css CHANGED
@@ -1,23 +1,23 @@
1
- .graph_Edge {
2
- fill: none;
3
- stroke: #656565;
4
- stroke-width: 1.0px;
5
- }
6
-
7
- .graph_Edge .common_TextBox .common_Text {
8
- fill: black;
9
- stroke: none;
10
- }
11
-
12
- .graph_Edge .common_TextBox .common_Shape {
13
- fill: white;
14
- stroke: none;
15
- }
16
-
17
- .graph_Edge.selected {
18
- stroke:red !important;
19
- }
20
-
21
- .graph_Edge.selected .common_Text {
22
- fill:red !important;
23
- }
1
+ .graph_Edge {
2
+ fill: none;
3
+ stroke: #656565;
4
+ stroke-width: 1.0px;
5
+ }
6
+
7
+ .graph_Edge .common_TextBox .common_Text {
8
+ fill: black;
9
+ stroke: none;
10
+ }
11
+
12
+ .graph_Edge .common_TextBox .common_Shape {
13
+ fill: white;
14
+ stroke: none;
15
+ }
16
+
17
+ .graph_Edge.selected {
18
+ stroke:red !important;
19
+ }
20
+
21
+ .graph_Edge.selected .common_Text {
22
+ fill:red !important;
23
+ }