apexsankey 1.2.4 → 1.2.5

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.
@@ -1,93 +1,84 @@
1
- <!DOCTYPE html>
1
+ <!doctype html>
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Document</title>
7
- <link
8
- href="https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600&display=swap"
9
- rel="stylesheet"
10
- />
7
+ <link href="https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600&display=swap" rel="stylesheet" />
11
8
  <script src="https://cdn.jsdelivr.net/npm/@svgdotjs/svg.js"></script>
12
9
  <script src="../apexsankey.min.js"></script>
13
10
  </head>
14
11
  <body>
15
- <div
16
- id="svg-sankey"
17
- style="margin: 0 auto; width: 800px; height: 600px"
18
- ></div>
12
+ <div id="svg-sankey" style="margin: 0 auto; width: 800px; height: 600px"></div>
19
13
  <script>
20
14
  const data = {
21
15
  nodes: [
22
16
  {
23
- id: "Oil",
24
- title: "Oil",
17
+ id: 'Oil',
18
+ title: 'Oil',
25
19
  },
26
20
  {
27
- id: "Natural Gas",
28
- title: "Natural Gas",
21
+ id: 'Natural Gas',
22
+ title: 'Natural Gas',
29
23
  },
30
24
  {
31
- id: "Coal",
32
- title: "Coal",
25
+ id: 'Coal',
26
+ title: 'Coal',
33
27
  },
34
28
  {
35
- id: "Fossil Fuels",
36
- title: "Fossil Fuels",
29
+ id: 'Fossil Fuels',
30
+ title: 'Fossil Fuels',
37
31
  },
38
32
  {
39
- id: "Electricity",
40
- title: "Electricity",
33
+ id: 'Electricity',
34
+ title: 'Electricity',
41
35
  },
42
36
  {
43
- id: "Energy",
44
- title: "Energy",
37
+ id: 'Energy',
38
+ title: 'Energy',
45
39
  },
46
40
  ],
47
41
  edges: [
48
42
  {
49
- source: "Oil",
50
- target: "Fossil Fuels",
43
+ source: 'Oil',
44
+ target: 'Fossil Fuels',
51
45
  value: 15,
52
46
  },
53
47
  {
54
- source: "Natural Gas",
55
- target: "Fossil Fuels",
48
+ source: 'Natural Gas',
49
+ target: 'Fossil Fuels',
56
50
  value: 20,
57
51
  },
58
52
  {
59
- source: "Coal",
60
- target: "Fossil Fuels",
53
+ source: 'Coal',
54
+ target: 'Fossil Fuels',
61
55
  value: 25,
62
56
  },
63
57
  {
64
- source: "Coal",
65
- target: "Electricity",
58
+ source: 'Coal',
59
+ target: 'Electricity',
66
60
  value: 25,
67
61
  },
68
62
  {
69
- source: "Fossil Fuels",
70
- target: "Energy",
63
+ source: 'Fossil Fuels',
64
+ target: 'Energy',
71
65
  value: 60,
72
66
  },
73
67
  {
74
- source: "Electricity",
75
- target: "Energy",
68
+ source: 'Electricity',
69
+ target: 'Energy',
76
70
  value: 25,
77
71
  },
78
72
  ],
79
73
  };
80
74
  const graphOptions = {
81
75
  nodeWidth: 20,
82
- fontFamily: "Quicksand, sans-serif",
83
- fontWeight: "600",
76
+ fontFamily: 'Quicksand, sans-serif',
77
+ fontWeight: '600',
84
78
  height: 600,
85
79
  enableToolbar: true,
86
80
  };
87
- const s = new ApexSankey(
88
- document.getElementById("svg-sankey"),
89
- graphOptions
90
- );
81
+ const s = new ApexSankey(document.getElementById('svg-sankey'), graphOptions);
91
82
  s.render(data);
92
83
  </script>
93
84
  </body>
package/index.d.ts CHANGED
@@ -1 +1,4 @@
1
- export { ApexSankey as default } from './lib/sankey';
1
+ import { ApexSankey } from './lib/sankey';
2
+
3
+ export { ApexSankey as default };
4
+ export { ApexSankey };
package/lib/sankey.d.ts CHANGED
@@ -6,5 +6,10 @@ export declare class ApexSankey {
6
6
  options: SankeyOptions;
7
7
  graph: SankeyGraph;
8
8
  constructor(element: HTMLElement, options: SankeyOptions);
9
+ static setLicense(key: string): void;
10
+ /**
11
+ * Handle watermark display based on license validation
12
+ */
13
+ private handleWatermark;
9
14
  render(data: GraphData): SankeyGraph;
10
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apexsankey",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "dependencies": {
5
5
  "defined": "^1.0.1",
6
6
  "graphlib": "~2.1.0",
@@ -10,7 +10,7 @@
10
10
  "main": "./apexsankey.min.js",
11
11
  "module": "./apexsankey.es.min.js",
12
12
  "types": "./index.d.ts",
13
- "license": "See License in LICENSE",
13
+ "license": "See LICENSE in LICENSE",
14
14
  "exports": {
15
15
  ".": {
16
16
  "import": {
@@ -22,21 +22,5 @@
22
22
  "default": "./apexsankey.min.js"
23
23
  }
24
24
  }
25
- },
26
- "devDependencies": {
27
- "@commitlint/cli": "^19.8.1",
28
- "@commitlint/config-conventional": "^19.8.1",
29
- "commitlint": "^19.8.1",
30
- "husky": "^9.1.7",
31
- "standard-version": "^9.5.0"
32
- },
33
- "scripts": {
34
- "prepare": "husky",
35
- "release": "standard-version --no-tag"
36
- },
37
- "standard-version": {
38
- "skip": {
39
- "tag": true
40
- }
41
25
  }
42
26
  }
package/.husky/commit-msg DELETED
@@ -1 +0,0 @@
1
- npx --no -- commitlint --edit "$1"
package/.husky/pre-push DELETED
@@ -1 +0,0 @@
1
- npm run release && git push --no-verify
@@ -1,5 +0,0 @@
1
- const Configuration = {
2
- extends: ["@commitlint/config-conventional"],
3
- };
4
-
5
- export default Configuration;