@linkurious/ogma-linkurious-parser 4.2.2 → 4.2.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/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +820 -916
- package/dist/index.mjs.map +1 -1
- package/dist/ogma/features/nodeGrouping.d.ts +2 -29
- package/dist/ogma/features/reactive.d.ts +2 -2
- package/dist/ogma/features/selectors.d.ts +2 -2
- package/dist/ogma/features/styles.d.ts +5 -3
- package/dist/ogma/index.d.ts +5 -5
- package/dist/tools/ogmaTool.d.ts +1 -0
- package/package.json +6 -5
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
import type { NodeList,
|
|
1
|
+
import type { NodeList, Transformation } from '@linkurious/ogma';
|
|
2
2
|
import { IVizNodeGroupInfo, LkEdgeData, LkNodeData, NodeGroupingRule } from '@linkurious/rest-client';
|
|
3
3
|
import { LKOgma } from '../index';
|
|
4
4
|
export declare const LKE_NODE_GROUPING_EDGE = "LKE_NODE_GROUPING_EDGE";
|
|
5
|
-
interface CircularLayoutOptions {
|
|
6
|
-
radii: PixelSize[] | number[];
|
|
7
|
-
cx?: number;
|
|
8
|
-
cy?: number;
|
|
9
|
-
startAngle?: number;
|
|
10
|
-
clockwise?: boolean;
|
|
11
|
-
getRadius?: (radius: PixelSize) => number;
|
|
12
|
-
distanceRatio?: number;
|
|
13
|
-
}
|
|
14
5
|
export declare class NodeGroupingTransformation {
|
|
15
6
|
transformation?: Transformation<LkNodeData, LkEdgeData>;
|
|
16
7
|
groupRule?: NodeGroupingRule;
|
|
@@ -41,11 +32,6 @@ export declare class NodeGroupingTransformation {
|
|
|
41
32
|
*/
|
|
42
33
|
initNodeGroupingStyle(): void;
|
|
43
34
|
refreshNodeGroupingStyle(): Promise<void>;
|
|
44
|
-
/**
|
|
45
|
-
* Run the layout on the subnodes of the virtual node
|
|
46
|
-
* @param subNodes nodes part of a virtual node
|
|
47
|
-
*/
|
|
48
|
-
runSubNodesLayout(subNodes: NodeList<LkNodeData, LkEdgeData>): Promise<Point[] | undefined | void>;
|
|
49
35
|
/**
|
|
50
36
|
* Get the virtual nodes of the transformation
|
|
51
37
|
* @private
|
|
@@ -67,19 +53,9 @@ export declare class NodeGroupingTransformation {
|
|
|
67
53
|
private _getNodeGroupingCaption;
|
|
68
54
|
private _getAdjacentEdgeNodeGroupingCaption;
|
|
69
55
|
private _getPropertyValueNodeGroupingCaption;
|
|
70
|
-
/**
|
|
71
|
-
* Run the circle pack layout on the subnodes
|
|
72
|
-
* @param subNodes
|
|
73
|
-
*/
|
|
74
|
-
private _runCirclePack;
|
|
75
|
-
/**
|
|
76
|
-
* return a grid layout when nodes are represented by multiple chains (a)-(b)-(c)-(d)
|
|
77
|
-
*/
|
|
78
|
-
private _runChainLayout;
|
|
79
|
-
private _runForceLayout;
|
|
80
56
|
private _isRuleNotApplicableToNode;
|
|
81
57
|
private _isRelationshipRuleNotApplicableToNode;
|
|
82
|
-
private
|
|
58
|
+
private _hasEdgeOfType;
|
|
83
59
|
private _isPropertyRuleNotApplicableToNode;
|
|
84
60
|
/**
|
|
85
61
|
* Unpin list of nodes
|
|
@@ -101,8 +77,6 @@ export declare class NodeGroupingTransformation {
|
|
|
101
77
|
* For a relation type grouping rule, return the central node from one of the nodes in the group
|
|
102
78
|
*/
|
|
103
79
|
private static _getGroupCentralNode;
|
|
104
|
-
_runCircularLayout({ radii, clockwise, cx, cy, startAngle, getRadius, distanceRatio }: CircularLayoutOptions): Point[];
|
|
105
|
-
private _runTwoNodesLayout;
|
|
106
80
|
private _getPropertyValueGroupId;
|
|
107
81
|
private _getAdjacentEdgeGroupId;
|
|
108
82
|
/**
|
|
@@ -116,4 +90,3 @@ export declare class NodeGroupingTransformation {
|
|
|
116
90
|
*/
|
|
117
91
|
private _setSubSelectedClass;
|
|
118
92
|
}
|
|
119
|
-
export {};
|
|
@@ -11,7 +11,7 @@ export interface OgmaState {
|
|
|
11
11
|
changes: {
|
|
12
12
|
entityType: 'node' | 'edge';
|
|
13
13
|
input: string | string[] | null;
|
|
14
|
-
value:
|
|
14
|
+
value: unknown;
|
|
15
15
|
} | undefined;
|
|
16
16
|
/**
|
|
17
17
|
* Indicates whether the positions of nodes or edges are currently transitioning.
|
|
@@ -21,7 +21,7 @@ export interface OgmaState {
|
|
|
21
21
|
export declare class RxViz {
|
|
22
22
|
private _ogma;
|
|
23
23
|
private _store;
|
|
24
|
-
private _animationThrottle
|
|
24
|
+
private _animationThrottle?;
|
|
25
25
|
constructor(ogma: LKOgma);
|
|
26
26
|
get store(): OgmaStore;
|
|
27
27
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EntityType, LkEdgeData, LkNodeData } from '@linkurious/rest-client';
|
|
1
|
+
import { EntityType, LkEdgeData, LkNodeData, LkProperty } from '@linkurious/rest-client';
|
|
2
2
|
import type { Edge, Node } from '@linkurious/ogma';
|
|
3
3
|
import { OgmaState } from './reactive';
|
|
4
4
|
export type SelectionState = 'selection' | 'multiSelection' | 'noSelection';
|
|
@@ -31,7 +31,7 @@ export declare const getUniqSelectionEntity: (state: OgmaState) => "node" | "edg
|
|
|
31
31
|
*/
|
|
32
32
|
export declare const getSelectionProperties: (state: OgmaState) => Array<{
|
|
33
33
|
key: string;
|
|
34
|
-
value:
|
|
34
|
+
value: LkProperty;
|
|
35
35
|
}>;
|
|
36
36
|
/**
|
|
37
37
|
* Return true if the current selection has properties
|
|
@@ -29,6 +29,7 @@ export declare class StylesViz {
|
|
|
29
29
|
private _ogmaEdgeWidth;
|
|
30
30
|
private _ogmaEdgeShape;
|
|
31
31
|
private _defaultConfiguration;
|
|
32
|
+
private _pinnedIndicatorRule?;
|
|
32
33
|
constructor(ogma: LKOgma, configuration: {
|
|
33
34
|
node: {
|
|
34
35
|
nodeRadius?: number;
|
|
@@ -91,9 +92,10 @@ export declare class StylesViz {
|
|
|
91
92
|
*/
|
|
92
93
|
setBadgeRule(): void;
|
|
93
94
|
/**
|
|
94
|
-
*
|
|
95
|
+
* Used in other repos to refresh the pin badge style rule
|
|
96
|
+
* LKE-13639: we are using a style rule instead of an Ogma class to get the right size of the nodes when calling _findPinBadgeScale
|
|
95
97
|
*/
|
|
96
|
-
|
|
98
|
+
refreshPinBadgeStyleRule(): Promise<void>;
|
|
97
99
|
/**
|
|
98
100
|
* set text overlap to true or false
|
|
99
101
|
*
|
|
@@ -163,7 +165,7 @@ export declare class StylesViz {
|
|
|
163
165
|
private _findPinBadgeScale;
|
|
164
166
|
/**
|
|
165
167
|
* Get node radius
|
|
166
|
-
* This is a workaround for an ogma issue where the radius of virtual nodes is always set to 5.
|
|
168
|
+
* This is a workaround for an ogma issue where the radius of virtual nodes is always set to 5.x
|
|
167
169
|
* The issue is still present in Ogma 5.2
|
|
168
170
|
*/
|
|
169
171
|
private _getNodeRadius;
|
package/dist/ogma/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ForceLayoutMode, HierarchicalLayoutMode, IOgmaConfig, LkEdgeData, LkNodeData, PopulatedVisualization, VizEdge, VizNode } from '@linkurious/rest-client';
|
|
2
|
-
import type { EdgeList, ForceLayoutOptions, HierarchicalLayoutOptions, NodeId, NodeList, NonObjectPropertyWatcher, RadialLayoutOptions, RawEdge, RawGraph } from '@linkurious/ogma';
|
|
3
|
-
import
|
|
2
|
+
import type { Edge, EdgeList, Filter, ForceLayoutOptions, HierarchicalLayoutOptions, NodeId, NodeList, NonObjectPropertyWatcher, RadialLayoutOptions, RawEdge, RawGraph } from '@linkurious/ogma';
|
|
3
|
+
import OgmaLib from '@linkurious/ogma';
|
|
4
4
|
import { StylesViz } from './features/styles';
|
|
5
5
|
import { TransformationsViz } from './features/transformations';
|
|
6
6
|
import { CaptionsViz } from './features/captions';
|
|
@@ -12,7 +12,7 @@ interface AddItemOptions {
|
|
|
12
12
|
batchSize?: number;
|
|
13
13
|
virtual?: boolean;
|
|
14
14
|
}
|
|
15
|
-
export declare class LKOgma extends
|
|
15
|
+
export declare class LKOgma extends OgmaLib<LkNodeData, LkEdgeData> {
|
|
16
16
|
private _configuration;
|
|
17
17
|
LKStyles: StylesViz;
|
|
18
18
|
LKCaptions: CaptionsViz;
|
|
@@ -75,11 +75,11 @@ export declare class LKOgma extends Ogma<LkNodeData, LkEdgeData> {
|
|
|
75
75
|
/**
|
|
76
76
|
* Return the list of non filtered edges
|
|
77
77
|
*/
|
|
78
|
-
getNonFilteredEdges(items?: Array<
|
|
78
|
+
getNonFilteredEdges(items?: Array<string> | Filter | Edge<LkEdgeData, LkNodeData>[] | EdgeList<LkEdgeData, LkNodeData>): EdgeList<LkEdgeData, LkNodeData>;
|
|
79
79
|
/**
|
|
80
80
|
* Return the list of filtered edges
|
|
81
81
|
*/
|
|
82
|
-
getFilteredEdges(items?: Array<
|
|
82
|
+
getFilteredEdges(items?: Array<string> | Filter | Edge<LkEdgeData, LkNodeData>[] | EdgeList<LkEdgeData, LkNodeData>, filter?: 'visible' | 'raw' | 'all'): EdgeList<LkEdgeData, LkNodeData>;
|
|
83
83
|
/**
|
|
84
84
|
* Do a full reset on ogma and streams of ogma
|
|
85
85
|
*/
|
package/dist/tools/ogmaTool.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linkurious/ogma-linkurious-parser",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.4",
|
|
4
4
|
"author": "Linkurious SAS",
|
|
5
5
|
"description": "Parse and load a Linkurious visualization in Ogma with one line of code ",
|
|
6
6
|
"files": [
|
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
"module": "./dist/index.mjs",
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
17
17
|
"engines": {
|
|
18
|
-
"node": "22.
|
|
18
|
+
"node": "22.19.0",
|
|
19
|
+
"npm": "^10.9.0"
|
|
19
20
|
},
|
|
20
21
|
"exports": {
|
|
21
22
|
".": {
|
|
@@ -58,11 +59,11 @@
|
|
|
58
59
|
"sha1": "1.1.1"
|
|
59
60
|
},
|
|
60
61
|
"peerDependencies": {
|
|
61
|
-
"@linkurious/ogma": "5.2
|
|
62
|
+
"@linkurious/ogma": "5.3.2"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
|
-
"@linkurious/ogma": "5.2
|
|
65
|
-
"@linkurious/rest-client": "4.2.
|
|
65
|
+
"@linkurious/ogma": "5.3.2",
|
|
66
|
+
"@linkurious/rest-client": "4.2.4",
|
|
66
67
|
"@types/chai": "4.2.17",
|
|
67
68
|
"@types/lodash": "4.14.182",
|
|
68
69
|
"@types/mocha": "5.2.7",
|