Skip to content

Commit 3e1d0be

Browse files
committed
feat: Add lit-html enabled graph
Signed-off-by: Gordon Smith <[email protected]>
1 parent 348b5e0 commit 3e1d0be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+1171
-3280
lines changed

package-lock.json

+24-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/comms/package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
"module": "./dist/index.browser.js",
88
"exports": {
99
".": {
10-
"types": "./types/index.browser.d.ts",
10+
"types": {
11+
"node": "./types/index.node.d.ts",
12+
"default": "./types/index.browser.d.ts"
13+
},
1114
"node": "./dist/index.node.js",
1215
"import": "./dist/index.browser.js",
1316
"require": "./dist/index.browser.umd.cjs"

packages/graph/index.html

+42
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
}
1818

1919
#placeholder,
20+
#placeholder1,
2021
#placeholder2 {
2122
width: 100%;
2223
height: 500px;
@@ -29,6 +30,11 @@
2930
</head>
3031

3132
<body onresize="doResize()">
33+
<h1>ESM Quick Test</h1>
34+
<div id="placeholder1"></div>
35+
<script type="module">
36+
import "./tests/index.ts";
37+
</script>
3238
<h1>ESM Quick Test</h1>
3339
<div id="placeholder2"></div>
3440
<script type="module">
@@ -120,6 +126,42 @@ <h1>ESM Quick Test</h1>
120126
.render()
121127
;
122128
</script>
129+
<div id="placeholder"></div>
130+
<script type="module">
131+
import { SankeyGraph } from "./src/index.ts";
132+
133+
import "@hpcc-js/common/font-awesome/css/font-awesome.min.css";
134+
135+
new SankeyGraph()
136+
.target("placeholder")
137+
.vertexColumns(["category", "id", "label"])
138+
.vertices([
139+
[0, 0, "Year 1"],
140+
[0, 1, "Year 2"],
141+
[0, 2, "Year 3"],
142+
[0, 3, "Year 4"],
143+
[1, 4, "Math"],
144+
[1, 5, "English"],
145+
[1, 6, "Geometry"],
146+
[1, 7, "Science"],
147+
])
148+
.edgeColumns(["source", "target", "weight"])
149+
.edges([
150+
[0, 4, 1],
151+
[1, 4, 1],
152+
[2, 4, 1],
153+
[3, 4, 1],
154+
[0, 5, 1],
155+
[1, 5, 1],
156+
[2, 6, 1],
157+
[3, 6, 1],
158+
[1, 7, 1],
159+
[2, 7, 1],
160+
[3, 7, 1],
161+
])
162+
.render()
163+
;
164+
</script>
123165
<script>
124166
function doResize() {
125167
window.__widget?.resize()?.render();

packages/graph/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
"d3-shape": "^1",
5757
"d3-tile": "^1",
5858
"d3-transition": "^1",
59-
"dagre": "0.8.5"
59+
"dagre": "0.8.5",
60+
"lit-html": "3.2.1"
6061
},
6162
"peerDependencies": {},
6263
"repository": {

packages/graph/src/AdjacencyGraph.ts

-224
This file was deleted.

0 commit comments

Comments
 (0)