apexsankey 1.1.2 → 1.2.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/README.md +80 -75
- package/apexsankey.es.min.js +6101 -15848
- package/apexsankey.min.js +1 -9
- package/demo/basic-sankey.html +40 -29
- package/demo/sankey-alternate-node.html +102 -0
- package/demo/sankey-custom-fonts.html +4 -3
- package/demo/sankey-edge-options.html +4 -3
- package/demo/sankey-node-customization.html +5 -4
- package/demo/sankey-node-overlapping.html +428 -0
- package/lib/layout/edgePositioning/linkLayout.d.ts +1 -5
- package/lib/layout/edgePositioning/utils.d.ts +1 -0
- package/lib/layout/layout.d.ts +12 -17
- package/lib/layout/nodeOrdering/addDummyNodes.d.ts +1 -0
- package/lib/layout/nodeOrdering/index.d.ts +1 -1
- package/lib/layout/nodePositioning/justified.d.ts +2 -2
- package/lib/layout/rankAssignment/groupedGraph.d.ts +1 -0
- package/lib/layout/rankAssignment/makeAcyclic.d.ts +2 -1
- package/lib/layout/utils.d.ts +1 -0
- package/lib/models/Edge.d.ts +2 -1
- package/lib/models/Graph.d.ts +9 -10
- package/lib/models/Node.d.ts +3 -2
- package/lib/models/Options.d.ts +15 -12
- package/lib/models/Paper.d.ts +10 -6
- package/lib/sankey.d.ts +4 -3
- package/package.json +13 -6
- package/lib/models/GraphUtils.d.ts +0 -5
- package/lib/models/svgUtils.d.ts +0 -37
package/lib/sankey.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { SankeyGraph, Graph } from './models/Graph';
|
|
2
1
|
import { SankeyOptions } from './models/Options';
|
|
2
|
+
import { GraphData, SankeyGraph } from './models/Graph';
|
|
3
|
+
|
|
3
4
|
export declare class ApexSankey {
|
|
4
5
|
element: HTMLElement;
|
|
5
|
-
graph: SankeyGraph;
|
|
6
6
|
options: SankeyOptions;
|
|
7
|
+
graph: SankeyGraph;
|
|
7
8
|
constructor(element: HTMLElement, options: SankeyOptions);
|
|
8
|
-
render(data:
|
|
9
|
+
render(data: GraphData): SankeyGraph;
|
|
9
10
|
}
|
package/package.json
CHANGED
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apexsankey",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@svgdotjs/svg.js": "^3.2.0",
|
|
6
|
-
"@svgdotjs/svg.panzoom.js": "^2.1.2",
|
|
7
5
|
"defined": "^1.0.1",
|
|
8
6
|
"graphlib": "~2.1.0",
|
|
9
7
|
"lodash": "^4.17.21"
|
|
10
8
|
},
|
|
9
|
+
"peerDependencies": {
|
|
10
|
+
"@apex/graph-utils": "*"
|
|
11
|
+
},
|
|
11
12
|
"type": "module",
|
|
12
13
|
"main": "./apexsankey.min.js",
|
|
13
14
|
"module": "./apexsankey.es.min.js",
|
|
14
|
-
"
|
|
15
|
+
"types": "./index.d.ts",
|
|
15
16
|
"exports": {
|
|
16
17
|
".": {
|
|
17
|
-
"import":
|
|
18
|
-
|
|
18
|
+
"import": {
|
|
19
|
+
"types": "./index.d.ts",
|
|
20
|
+
"default": "./apexsankey.es.min.js"
|
|
21
|
+
},
|
|
22
|
+
"require": {
|
|
23
|
+
"types": "./index.d.ts",
|
|
24
|
+
"default": "./apexsankey.min.js"
|
|
25
|
+
}
|
|
19
26
|
}
|
|
20
27
|
}
|
|
21
28
|
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const getTooltip: (tooltipId?: string) => HTMLElement;
|
|
2
|
-
export declare const updateTooltip: (id?: string, styles?: string | undefined, content?: string) => void;
|
|
3
|
-
export declare const getTooltipStyles: (x: number, y: number, borderColor: string, bgColor: string) => ReadonlyArray<string>;
|
|
4
|
-
export declare const generateStyles: (styleObject?: Record<string, number | string>) => string;
|
|
5
|
-
export declare const camelToKebabCase: (str: string) => string;
|
package/lib/models/svgUtils.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { CircleAttr } from '@svgdotjs/svg.js';
|
|
2
|
-
import { Text } from '@svgdotjs/svg.js';
|
|
3
|
-
import { Path } from '@svgdotjs/svg.js';
|
|
4
|
-
import { Gradient } from '@svgdotjs/svg.js';
|
|
5
|
-
import { G } from '@svgdotjs/svg.js';
|
|
6
|
-
import { Line } from '@svgdotjs/svg.js';
|
|
7
|
-
import { ForeignObject } from '@svgdotjs/svg.js';
|
|
8
|
-
import { Circle } from '@svgdotjs/svg.js';
|
|
9
|
-
import { Rect } from '@svgdotjs/svg.js';
|
|
10
|
-
export declare function drawRect({ x, y, width, height, radius, color, borderColor, opacity, }?: {
|
|
11
|
-
x?: number;
|
|
12
|
-
y?: number;
|
|
13
|
-
width?: number;
|
|
14
|
-
height?: number;
|
|
15
|
-
radius?: number;
|
|
16
|
-
color?: string;
|
|
17
|
-
borderColor?: string;
|
|
18
|
-
opacity?: number;
|
|
19
|
-
}): Rect;
|
|
20
|
-
export declare function drawCircle(attributes?: CircleAttr): Circle;
|
|
21
|
-
export declare function drawText(text: string, { x, y, fontColor, textAnchor, pointerEvents }: any): Text;
|
|
22
|
-
export declare function drawTemplate(template: string, { nodeWidth, nodeHeight }?: any): ForeignObject;
|
|
23
|
-
export declare function drawGroup(x?: number, y?: number, id?: string, parent?: string): G;
|
|
24
|
-
export declare function drawPath(pathString: string, { id, edgeColor, opacity }?: Partial<{
|
|
25
|
-
readonly id: string;
|
|
26
|
-
readonly edgeColor: Gradient;
|
|
27
|
-
readonly opacity: number;
|
|
28
|
-
}>): Path;
|
|
29
|
-
export declare function drawLine({ className, x1, x2, y1, y2, borderSize, borderColor, }?: {
|
|
30
|
-
className?: string;
|
|
31
|
-
x1?: number;
|
|
32
|
-
x2?: number;
|
|
33
|
-
y1?: number;
|
|
34
|
-
y2?: number;
|
|
35
|
-
borderSize?: number;
|
|
36
|
-
borderColor?: string;
|
|
37
|
-
}): Line;
|