From 726a0873d6f089a2b97dd137e31d52c4922ff54f Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Thu, 23 Jan 2025 15:57:56 +0000 Subject: [PATCH] feat: Add lit-html enabled graph Signed-off-by: Gordon Smith --- package-lock.json | 27 +++- packages/graph/index.html | 117 ++++++++++++++++++ packages/graph/package.json | 3 +- packages/graph/src/graph2/dataGraph.ts | 4 +- packages/graph/src/graph2/graph.css | 23 ++-- packages/graph/src/graph2/graphHtmlT.ts | 22 ++++ .../src/graph2/{graph.ts => graphReact.ts} | 39 +++--- packages/graph/src/graph2/index.ts | 3 +- 8 files changed, 200 insertions(+), 38 deletions(-) create mode 100644 packages/graph/src/graph2/graphHtmlT.ts rename packages/graph/src/graph2/{graph.ts => graphReact.ts} (76%) diff --git a/package-lock.json b/package-lock.json index 3234e7e9d8..0abbaa9a33 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6186,6 +6186,13 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/trusted-types": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", + "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/unist": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz", @@ -13669,6 +13676,16 @@ "uc.micro": "^2.0.0" } }, + "node_modules/lit-html": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.2.1.tgz", + "integrity": "sha512-qI/3lziaPMSKsrwlxH/xMgikhQ0EGOX2ICU73Bi/YHFvz2j/yMCIrw4+puF2IpQ4+upd3EWbvnHM9+PnJn48YA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@types/trusted-types": "^2.0.2" + } + }, "node_modules/load-json-file": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-6.2.0.tgz", @@ -20828,7 +20845,6 @@ "license": "Apache-2.0", "dependencies": { "@hpcc-js/common": "^3.3.0", - "@hpcc-js/dgrid-shim": "^3.1.1", "@hpcc-js/util": "^3.3.0" }, "devDependencies": { @@ -20837,6 +20853,9 @@ "@testing-library/dom": "10.4.0", "d3-format": "^1", "d3-selection": "^1" + }, + "peerDependencies": { + "@hpcc-js/dgrid-shim": "^3.1.0" } }, "packages/dgrid-shim": { @@ -20865,11 +20884,12 @@ "license": "Apache-2.0", "dependencies": { "@hpcc-js/common": "^3.3.0", - "@hpcc-js/react": "^3.2.0", "@hpcc-js/util": "^3.3.0" }, "devDependencies": { "@hpcc-js/esbuild-plugins": "^1.4.0", + "@preact/preset-vite": "2.9.2", + "preact": "10.25.0", "react-data-grid": "7.0.0-beta.47" } }, @@ -20949,7 +20969,8 @@ "d3-shape": "^1", "d3-tile": "^1", "d3-transition": "^1", - "dagre": "0.8.5" + "dagre": "0.8.5", + "lit-html": "3.2.1" } }, "packages/html": { diff --git a/packages/graph/index.html b/packages/graph/index.html index 6e2052755c..2c8ab9e4b3 100644 --- a/packages/graph/index.html +++ b/packages/graph/index.html @@ -17,6 +17,7 @@ } #placeholder, + #placeholder1, #placeholder2 { width: 100%; height: 500px; @@ -29,6 +30,86 @@ +

ESM Quick Test

+
+

ESM Quick Test

+
+