@hpcc-js/util 2.37.0 → 2.41.0
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/dist/index.js +30 -8
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/lib-es6/__package__.js +2 -2
- package/lib-es6/graph2.js.map +1 -1
- package/lib-es6/url.js +28 -7
- package/lib-es6/url.js.map +1 -1
- package/package.json +7 -6
- package/src/__package__.ts +2 -2
- package/src/graph2.ts +36 -34
- package/src/url.ts +25 -6
- package/types/__package__.d.ts +2 -2
- package/types/graph2.d.ts +29 -28
- package/types/graph2.d.ts.map +1 -1
- package/types/url.d.ts +2 -1
- package/types/url.d.ts.map +1 -1
- package/types-3.4/__package__.d.ts +2 -2
- package/types-3.4/graph2.d.ts +29 -28
- package/types-3.4/url.d.ts +2 -1
package/types-3.4/graph2.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
declare type ID = string | number;
|
|
1
2
|
declare class GraphItem<T = any> {
|
|
2
3
|
protected _graph: Graph2;
|
|
3
4
|
_: T;
|
|
4
|
-
id():
|
|
5
|
+
id(): ID;
|
|
5
6
|
constructor(g: Graph2, _: T);
|
|
6
7
|
}
|
|
7
8
|
declare class ChildGraphItem<S = any> extends GraphItem<S> {
|
|
@@ -26,10 +27,10 @@ declare class Vertex<V = any> extends ChildGraphItem<V> {
|
|
|
26
27
|
edgeCount(): number;
|
|
27
28
|
inEdges(): Edge<any>[];
|
|
28
29
|
addInEdge(e: Edge): void;
|
|
29
|
-
removeInEdge(id:
|
|
30
|
+
removeInEdge(id: ID): void;
|
|
30
31
|
outEdges(): Edge<any>[];
|
|
31
32
|
addOutEdge(e: Edge): void;
|
|
32
|
-
removeOutEdge(id:
|
|
33
|
+
removeOutEdge(id: ID): void;
|
|
33
34
|
}
|
|
34
35
|
declare class Edge<E = any> extends ChildGraphItem<E> {
|
|
35
36
|
_source: Vertex;
|
|
@@ -48,57 +49,57 @@ export declare class Graph2<V = any, E = any, S = any> {
|
|
|
48
49
|
isDirected(): boolean;
|
|
49
50
|
_idFunc: (_: any) => string;
|
|
50
51
|
idFunc(_: (_: S | V | E) => string): this;
|
|
51
|
-
_sourceFunc: (_: any) =>
|
|
52
|
-
sourceFunc(_: (_: E) =>
|
|
53
|
-
_targetFunc: (_: any) =>
|
|
54
|
-
targetFunc(_: (_: E) =>
|
|
52
|
+
_sourceFunc: (_: any) => ID;
|
|
53
|
+
sourceFunc(_: (_: E) => ID): this;
|
|
54
|
+
_targetFunc: (_: any) => ID;
|
|
55
|
+
targetFunc(_: (_: E) => ID): this;
|
|
55
56
|
_updateFunc: (before: S | V | E, after: S | V | E) => S | V | E;
|
|
56
57
|
updateFunc(_: (before: S | V | E, after: S | V | E) => S | V | E): this;
|
|
57
58
|
id(_: S | V | E): string;
|
|
58
|
-
type(id:
|
|
59
|
+
type(id: ID): "S" | "V" | "E" | "";
|
|
59
60
|
isSubgraph(_: S | V | E): _ is S;
|
|
60
61
|
isVertex(_: S | V | E): _ is V;
|
|
61
62
|
isEdge(_: S | V | E): _ is E;
|
|
62
63
|
allItems(): Array<S | V | E>;
|
|
63
|
-
item(id:
|
|
64
|
-
itemExists(id:
|
|
64
|
+
item(id: ID): S | V | E | undefined;
|
|
65
|
+
itemExists(id: ID): boolean;
|
|
65
66
|
allSubgraphs(): S[];
|
|
66
67
|
subgraphs(): S[];
|
|
67
|
-
subgraphExists(id:
|
|
68
|
-
subgraph(id:
|
|
69
|
-
subgraphSubgraphs(id:
|
|
70
|
-
subgraphVertices(id:
|
|
71
|
-
subgraphEdges(id:
|
|
68
|
+
subgraphExists(id: ID): boolean;
|
|
69
|
+
subgraph(id: ID): S;
|
|
70
|
+
subgraphSubgraphs(id: ID): S[];
|
|
71
|
+
subgraphVertices(id: ID): V[];
|
|
72
|
+
subgraphEdges(id: ID): E[];
|
|
72
73
|
addSubgraph(s: S, parent?: S): this;
|
|
73
74
|
mergeSubgraphs(_subgraphs?: S[]): this;
|
|
74
75
|
updateSubgraph(sg: S): this;
|
|
75
|
-
removeSubgraph(id:
|
|
76
|
-
subgraphParent(id:
|
|
77
|
-
subgraphParent(id:
|
|
76
|
+
removeSubgraph(id: ID, promoteChildren?: boolean): this;
|
|
77
|
+
subgraphParent(id: ID): S | undefined;
|
|
78
|
+
subgraphParent(id: ID, parentID: ID): this;
|
|
78
79
|
allVertices(): V[];
|
|
79
80
|
vertices(): V[];
|
|
80
|
-
vertexExists(id:
|
|
81
|
-
vertex(id:
|
|
81
|
+
vertexExists(id: ID): boolean;
|
|
82
|
+
vertex(id: ID): V;
|
|
82
83
|
allEdges(): E[];
|
|
83
84
|
edges(): E[];
|
|
84
85
|
vertexEdges(vertexID: string): E[];
|
|
85
86
|
inEdges(vertexID: string): E[];
|
|
86
87
|
outEdges(vertexID: string): E[];
|
|
87
88
|
private _neighbors;
|
|
88
|
-
neighbors(id:
|
|
89
|
-
singleNeighbors(id:
|
|
89
|
+
neighbors(id: ID): V[];
|
|
90
|
+
singleNeighbors(id: ID): V[];
|
|
90
91
|
addVertex(v: V, parent?: S): this;
|
|
91
92
|
mergeVertices(_vertices: V[]): this;
|
|
92
93
|
updateVertex(v: V): this;
|
|
93
|
-
removeVertex(id:
|
|
94
|
-
vertexParent(id:
|
|
95
|
-
vertexParent(id:
|
|
96
|
-
edgeExists(id:
|
|
97
|
-
edge(id:
|
|
94
|
+
removeVertex(id: ID): this;
|
|
95
|
+
vertexParent(id: ID): S | undefined;
|
|
96
|
+
vertexParent(id: ID, parentID: ID): this;
|
|
97
|
+
edgeExists(id: ID): boolean;
|
|
98
|
+
edge(id: ID): E;
|
|
98
99
|
addEdge(e: E, parent?: S): this;
|
|
99
100
|
mergeEdges(_edges: E[]): this;
|
|
100
101
|
updateEdge(e: E): this;
|
|
101
|
-
removeEdge(id:
|
|
102
|
+
removeEdge(id: ID): this;
|
|
102
103
|
protected _hwalk(item: Subgraph<S> | Vertex<V>, formatter: HierarchyFormatter<V, S>): object;
|
|
103
104
|
hierarchy(formatter: HierarchyFormatter<V, S>): object[];
|
|
104
105
|
dijkstra(source: string, target: string): {
|
package/types-3.4/url.d.ts
CHANGED