diff --git a/package-lock.json b/package-lock.json index e93e8bf655..962427d4b6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,8 +27,8 @@ "xpackages/eclwatch", "packages/esbuild-plugins", "xpackages/form", - "xpackages/graph", - "xpackages/html", + "packages/graph", + "packages/html", "xpackages/layout", "xpackages/leaflet-shim", "xpackages/loader", @@ -41,8 +41,8 @@ "xpackages/other", "packages/phosphor", "packages/phosphor-shim", - "xpackages/preact-shim", - "xpackages/react", + "packages/preact-shim", + "packages/react", "xpackages/requirejs-shim", "xpackages/timeline", "xpackages/tree", @@ -78,47 +78,6 @@ "vitest": "2.1.4" } }, - "demos/gallery": { - "name": "@hpcc-js/demo-gallery", - "extraneous": true, - "dependencies": { - "es6-promise": "4.2.8", - "tslib": "2.7.0" - }, - "devDependencies": { - "@hpcc-js/api": "^2.13.0", - "@hpcc-js/chart": "^2.85.0", - "@hpcc-js/codemirror": "^2.63.0", - "@hpcc-js/codemirror-shim": "^2.36.0", - "@hpcc-js/common": "^2.72.0", - "@hpcc-js/comms": "^2.97.0", - "@hpcc-js/composite": "^2.8.2", - "@hpcc-js/dataflow": "^9.0.0", - "@hpcc-js/ddl-shim": "^2.21.0", - "@hpcc-js/deck-shim": "^2.7.0", - "@hpcc-js/dgrid": "^2.33.0", - "@hpcc-js/dgrid-shim": "^2.25.0", - "@hpcc-js/dgrid2": "^2.4.0", - "@hpcc-js/form": "^2.11.2", - "@hpcc-js/graph": "^2.86.0", - "@hpcc-js/html": "^2.43.0", - "@hpcc-js/layout": "^2.50.2", - "@hpcc-js/leaflet-shim": "^2.4.0", - "@hpcc-js/map": "^2.78.2", - "@hpcc-js/map-deck": "^2.8.0", - "@hpcc-js/marshaller": "^2.26.8", - "@hpcc-js/other": "^2.16.2", - "@hpcc-js/phosphor": "^2.19.2", - "@hpcc-js/phosphor-shim": "^2.15.0", - "@hpcc-js/preact-shim": "^2.17.0", - "@hpcc-js/react": "^2.54.0", - "@hpcc-js/timeline": "^2.53.1", - "@hpcc-js/tree": "^2.41.0", - "@hpcc-js/util": "^2.52.0", - "d3-selection": "^1", - "systemjs": "0.21.4" - } - }, "node_modules/@algolia/autocomplete-core": { "version": "1.17.6", "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.17.6.tgz", @@ -169,41 +128,41 @@ } }, "node_modules/@algolia/client-abtesting": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.12.0.tgz", - "integrity": "sha512-hx4eVydkm3yrFCFxmcBtSzI/ykt0cZ6sDWch+v3JTgKpD2WtosMJU3Upv1AjQ4B6COSHCOWEX3vfFxW6OoH6aA==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@algolia/client-abtesting/-/client-abtesting-5.13.0.tgz", + "integrity": "sha512-6CoQjlMi1pmQYMQO8tXfuGxSPf6iKX5FP9MuMe6IWmvC81wwTvOehnwchyBl2wuPVhcw2Ar53K53mQ60DAC64g==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.13.0", + "@algolia/requester-browser-xhr": "5.13.0", + "@algolia/requester-fetch": "5.13.0", + "@algolia/requester-node-http": "5.13.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-analytics": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.12.0.tgz", - "integrity": "sha512-EpTsSv6IW8maCfXCDIptgT7+mQJj7pImEkcNUnxR8yUKAHzTogTXv9yGm2WXOZFVuwstd2i0sImhQ1Vz8RH/hA==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-5.13.0.tgz", + "integrity": "sha512-pS3qyXiWTwKnrt/jE79fqkNqZp7kjsFNlJDcBGkSWid74DNc6DmArlkvPqyLxnoaYGjUGACT6g56n7E3mVV2TA==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.13.0", + "@algolia/requester-browser-xhr": "5.13.0", + "@algolia/requester-fetch": "5.13.0", + "@algolia/requester-node-http": "5.13.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-common": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.12.0.tgz", - "integrity": "sha512-od3WmO8qxyfNhKc+K3D17tvun3IMs/xMNmxCG9MiElAkYVbPPTRUYMkRneCpmJyQI0hNx2/EA4kZgzVfQjO86Q==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.13.0.tgz", + "integrity": "sha512-2SP6bGGWOTN920MLZv8s7yIR3OqY03vEe4U+vb2MGdL8a/8EQznF3L/nTC/rGf/hvEfZlX2tGFxPJaF2waravg==", "dev": true, "license": "MIT", "engines": { @@ -211,151 +170,151 @@ } }, "node_modules/@algolia/client-insights": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.12.0.tgz", - "integrity": "sha512-8alajmsYUd+7vfX5lpRNdxqv3Xx9clIHLUItyQK0Z6gwGMbVEFe6YYhgDtwslMAP0y6b0WeJEIZJMLgT7VYpRw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@algolia/client-insights/-/client-insights-5.13.0.tgz", + "integrity": "sha512-ldHTe+LVgC6L4Wr6doAQQ7Ku0jAdhaaPg1T+IHzmmiRZb2Uq5OsjW2yC65JifOmzPCiMkIZE2mGRpWgkn5ktlw==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.13.0", + "@algolia/requester-browser-xhr": "5.13.0", + "@algolia/requester-fetch": "5.13.0", + "@algolia/requester-node-http": "5.13.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-personalization": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.12.0.tgz", - "integrity": "sha512-bUV9HtfkTBgpoVhxFrMkmVPG03ZN1Rtn51kiaEtukucdk3ggjR9Qu1YUfRSU2lFgxr9qJc8lTxwfvhjCeJRcqw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-5.13.0.tgz", + "integrity": "sha512-RnCfOSN4OUJDuMNHFca2M8lY64Tmw0kQOZikge4TknTqHmlbKJb8IbJE7Rol79Z80W2Y+B1ydcjV7DPje4GMRA==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.13.0", + "@algolia/requester-browser-xhr": "5.13.0", + "@algolia/requester-fetch": "5.13.0", + "@algolia/requester-node-http": "5.13.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-query-suggestions": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.12.0.tgz", - "integrity": "sha512-Q5CszzGWfxbIDs9DJ/QJsL7bP6h+lJMg27KxieEnI9KGCu0Jt5iFA3GkREkgRZxRdzlHbZKkrIzhtHVbSHw/rg==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@algolia/client-query-suggestions/-/client-query-suggestions-5.13.0.tgz", + "integrity": "sha512-pYo0jbLUtPDN1r341UHTaF2fgN5rbaZfDZqjPRKPM+FRlRmxFxqFQm1UUfpkSUWYGn7lECwDpbKYiKUf81MTwA==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.13.0", + "@algolia/requester-browser-xhr": "5.13.0", + "@algolia/requester-fetch": "5.13.0", + "@algolia/requester-node-http": "5.13.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/client-search": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.12.0.tgz", - "integrity": "sha512-R3qzEytgVLHOGNri+bpta6NtTt7YtkvUe/QBcAmMDjW4Jk1P0eBYIPfvnzIPbINRsLxIq9fZs9uAYBgsrts4Zg==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.13.0.tgz", + "integrity": "sha512-s2ge3uZ6Zg2sPSFibqijgEYsuorxcc8KVHg3I95nOPHvFHdnBtSHymhZvq4sp/fu8ijt/Y8jLwkuqm5myn+2Sg==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.13.0", + "@algolia/requester-browser-xhr": "5.13.0", + "@algolia/requester-fetch": "5.13.0", + "@algolia/requester-node-http": "5.13.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/ingestion": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.12.0.tgz", - "integrity": "sha512-zpHo6qhR22tL8FsdSI4DvEraPDi/019HmMrCFB/TUX98yzh5ooAU7sNW0qPL1I7+S++VbBmNzJOEU9VI8tEC8A==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@algolia/ingestion/-/ingestion-1.13.0.tgz", + "integrity": "sha512-fm5LEOe4FPDOc1D+M9stEs8hfcdmbdD+pt9og5shql6ueTZJANDbFoQhDOpiPJizR/ps1GwmjkWfUEywx3sV+Q==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.13.0", + "@algolia/requester-browser-xhr": "5.13.0", + "@algolia/requester-fetch": "5.13.0", + "@algolia/requester-node-http": "5.13.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/monitoring": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.12.0.tgz", - "integrity": "sha512-i2AJZED/zf4uhxezAJUhMKoL5QoepCBp2ynOYol0N76+TSoohaMADdPnWCqOULF4RzOwrG8wWynAwBlXsAI1RQ==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@algolia/monitoring/-/monitoring-1.13.0.tgz", + "integrity": "sha512-e8Hshlnm2G5fapyUgWTBwhJ22yXcnLtPC4LWZKx7KOvv35GcdoHtlUBX94I/sWCJLraUr65JvR8qOo3LXC43dg==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.13.0", + "@algolia/requester-browser-xhr": "5.13.0", + "@algolia/requester-fetch": "5.13.0", + "@algolia/requester-node-http": "5.13.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/recommend": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.12.0.tgz", - "integrity": "sha512-0jmZyKvYnB/Bj5c7WKsKedOUjnr0UtXm0LVFUdQrxXfqOqvWv9n6Vpr65UjdYG4Q49kRQxhlwtal9WJYrYymXg==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-5.13.0.tgz", + "integrity": "sha512-53/wW96oaj1FKMzGdFcZ/epygfTppLDUvgI1thLkd475EtVZCH3ZZVUNCEvf1AtnNyH1RnItkFzX8ayWCpx2PQ==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-common": "5.13.0", + "@algolia/requester-browser-xhr": "5.13.0", + "@algolia/requester-fetch": "5.13.0", + "@algolia/requester-node-http": "5.13.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/requester-browser-xhr": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.12.0.tgz", - "integrity": "sha512-KxwleraFuVoEGCoeW6Y1RAEbgBMS7SavqeyzWdtkJc6mXeCOJXn1iZitb8Tyn2FcpMNUKlSm0adrUTt7G47+Ow==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.13.0.tgz", + "integrity": "sha512-NV6oSCt5lFuzfsVQoSBpewEWf/h4ySr7pv2bfwu9yF/jc/g39pig8+YpuqsxlRWBm/lTGVA2V0Ai9ySwrNumIA==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "5.12.0" + "@algolia/client-common": "5.13.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/requester-fetch": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.12.0.tgz", - "integrity": "sha512-FuDZXUGU1pAg2HCnrt8+q1VGHKChV/LhvjvZlLOT7e56GJie6p+EuLu4/hMKPOVuQQ8XXtrTHKIU3Lw+7O5/bQ==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.13.0.tgz", + "integrity": "sha512-094bK4rumf+rXJazxv3mq6eKRM0ep5AxIo8T0YmOdldswQt79apeufFiPLN19nHEWH22xR2FelimD+T/wRSP+Q==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "5.12.0" + "@algolia/client-common": "5.13.0" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/requester-node-http": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.12.0.tgz", - "integrity": "sha512-ncDDY7CxZhMs6LIoPl+vHFQceIBhYPY5EfuGF1V7beO0U38xfsCYEyutEFB2kRzf4D9Gqppn3iWX71sNtrKcuw==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.13.0.tgz", + "integrity": "sha512-JY5xhEYMgki53Wm+A6R2jUpOUdD0zZnBq+PC5R1TGMNOYL1s6JjDrJeMsvaI2YWxYMUSoCnRoltN/yf9RI8n3A==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-common": "5.12.0" + "@algolia/client-common": "5.13.0" }, "engines": { "node": ">= 14.0.0" @@ -550,6 +509,26 @@ "node": ">=0.1.90" } }, + "node_modules/@dagrejs/dagre": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@dagrejs/dagre/-/dagre-1.1.4.tgz", + "integrity": "sha512-QUTc54Cg/wvmlEUxB+uvoPVKFazM1H18kVHBQNmK2NbrDR5ihOCR6CXLnDSZzMcSQKJtabPUWridBOlJM3WkDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@dagrejs/graphlib": "2.2.4" + } + }, + "node_modules/@dagrejs/graphlib": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/@dagrejs/graphlib/-/graphlib-2.2.4.tgz", + "integrity": "sha512-mepCf/e9+SKYy1d02/UkvSy6+6MoyXhVxP8lLDfA7BPE1X1d4dR0sZznmbM8/XVJ1GPM+Svnx7Xj6ZweByWUkw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">17.0.0" + } + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -1241,6 +1220,14 @@ "resolved": "packages/esbuild-plugins", "link": true }, + "node_modules/@hpcc-js/graph": { + "resolved": "packages/graph", + "link": true + }, + "node_modules/@hpcc-js/html": { + "resolved": "packages/html", + "link": true + }, "node_modules/@hpcc-js/markdown-it-plugins": { "resolved": "packages/markdown-it-plugins", "link": true @@ -1261,6 +1248,14 @@ "resolved": "packages/phosphor-shim", "link": true }, + "node_modules/@hpcc-js/preact-shim": { + "resolved": "packages/preact-shim", + "link": true + }, + "node_modules/@hpcc-js/react": { + "resolved": "packages/react", + "link": true + }, "node_modules/@hpcc-js/util": { "resolved": "packages/util", "link": true @@ -1275,6 +1270,13 @@ "integrity": "sha512-DbCVrPkvrMt8NHHt0LkpT8B5EiltNck2slvfmLyoBhwVXbZlnelKGuQTAivdlezKFdJTisXE+K75ht4kcI4pXQ==", "license": "Apache-2.0" }, + "node_modules/@hpcc-js/wasm-graphviz": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@hpcc-js/wasm-graphviz/-/wasm-graphviz-1.6.1.tgz", + "integrity": "sha512-nrAoJXjEQXMzX2PJl+wB7uRi5KnehIRbXRjuZrH8e5QS+sLzw++Pk3rb0pwWpEgGIlWO74JPv7tfIolTJY6zPw==", + "dev": true, + "license": "Apache-2.0" + }, "node_modules/@hpcc-js/wasm-zstd": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@hpcc-js/wasm-zstd/-/wasm-zstd-1.2.1.tgz", @@ -2628,9 +2630,9 @@ } }, "node_modules/@nx/devkit": { - "version": "20.0.9", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-20.0.9.tgz", - "integrity": "sha512-dAdHJ4e7YNTOozMgjRCl/xxRqOB26+gFH4ByzfGLll9/6FJ2aoaPjA/9rg+qYnso8trljC0YnEYeYw5qgcjZ+A==", + "version": "20.0.12", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-20.0.12.tgz", + "integrity": "sha512-HsaDoAmzLPE2vHal2eNYvH7x6NCfHjUblm8WDD12Q/uCdTBvDTZqd7P+bukEH+2FhY89Dn/1fy59vKkA+rcB/g==", "dev": true, "license": "MIT", "dependencies": { @@ -2674,9 +2676,9 @@ } }, "node_modules/@nx/nx-darwin-arm64": { - "version": "20.0.9", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.0.9.tgz", - "integrity": "sha512-7vAxUVK8BnyQTMBBkGjSPCDC52VQ6UtO3bs6yCOECA8fbrxPVdnu5/Ep9x9pZsmx6YQAKMaVS/ODZU6ElZdEdw==", + "version": "20.0.12", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.0.12.tgz", + "integrity": "sha512-iwEDUTKx0n2S6Nz9gc9ShrfBw0MG87U0YIu2x/09tKOSkcsw90QKy54qN/6WNoFIE41Kt3U+dYtWi+NdLRE9kw==", "cpu": [ "arm64" ], @@ -2691,9 +2693,9 @@ } }, "node_modules/@nx/nx-darwin-x64": { - "version": "20.0.9", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.0.9.tgz", - "integrity": "sha512-6exHy9q1Mzp8ImT3q6XQCn31MlCCsN/Tu321r0b1FnRoMiMv9iEZupr0/VvjCI0Xis+u9to61az4dA94QKeEOw==", + "version": "20.0.12", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.0.12.tgz", + "integrity": "sha512-JYFNf0yPReejaooQAAIMsjWDGENT777wDXj45e7JQUMM4t6NOMpGBj4qUFyc6a/jXT+/bCGEj4N7VDZDZiogGA==", "cpu": [ "x64" ], @@ -2708,9 +2710,9 @@ } }, "node_modules/@nx/nx-freebsd-x64": { - "version": "20.0.9", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.0.9.tgz", - "integrity": "sha512-LjgSKieOlocwgw6Lr9pr/c15/yMLZC/9ay8aDArmp7JbNUCj4T1sdMKwTC9TQZoagAAIgflbKe9Bvt+Flw3z4w==", + "version": "20.0.12", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.0.12.tgz", + "integrity": "sha512-892n8o7vxdmE7pol3ggV78YHlP25p6Y/Z2x69nnC3BBTpWmesyd6lbEmamANofD5KcKCmT1HquC3m6rCT7akHw==", "cpu": [ "x64" ], @@ -2725,9 +2727,9 @@ } }, "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "20.0.9", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.0.9.tgz", - "integrity": "sha512-IMssDZQNdpqrQHuIliI4Pfj2MkESnOqDMZPS2TX5w9InQvcMBUJA9WQNbBv/TCKQIw9CXwqpRxYIEH52MhdhbQ==", + "version": "20.0.12", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.0.12.tgz", + "integrity": "sha512-ZPcdYIVAc5JMtmvroJOloI9CJgtwBOGr7E7mO1eT44zs5av0j/QMIj6GSDdvJ7fx+I7TmT4mDiu3s6rLO+/JjA==", "cpu": [ "arm" ], @@ -2742,9 +2744,9 @@ } }, "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "20.0.9", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.0.9.tgz", - "integrity": "sha512-OzUsgmdptU2ooUrDj817rABXDmdbgSp3LCs6AE3Aq5v9goZS/6Qn1R96NEoj5c8RQL0pi+G8U+BCcnUSgTF1Zw==", + "version": "20.0.12", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.0.12.tgz", + "integrity": "sha512-TadGwwUKS5WQg2YOMb2WuuVG1k14miSdB9qJOcAX5MGdOiQ1fpV00ph+kMWZSsCCo6N7sKxmvXXXdsUUFSDGjg==", "cpu": [ "arm64" ], @@ -2759,9 +2761,9 @@ } }, "node_modules/@nx/nx-linux-arm64-musl": { - "version": "20.0.9", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.0.9.tgz", - "integrity": "sha512-yqtftEa9wCk2OK2ZYKkotdzpMrA8EUqjCHLsFH3KDMpHMaDw3NtUGGMinsjXj4IEuL6Xx/r+T9NVjSK78z6IzQ==", + "version": "20.0.12", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.0.12.tgz", + "integrity": "sha512-EE2HQjgY87/s9+PQ27vbYyDEXFZ4Qot+O8ThVDVuMI/2dosmWs6C4+YEm3VYG+CT31MVwe/vHKXbDlZgkROMuA==", "cpu": [ "arm64" ], @@ -2776,9 +2778,9 @@ } }, "node_modules/@nx/nx-linux-x64-gnu": { - "version": "20.0.9", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.0.9.tgz", - "integrity": "sha512-oTB3yMzHyDMErl00WVZ+mf4o0f8bwBdd6VyQs+oHQPE05JysgzvbQZkAY5VlSmCyIWO4OdJMfMd9ojAe7Q6FzQ==", + "version": "20.0.12", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.0.12.tgz", + "integrity": "sha512-gITJ2g6dH2qvGrI2CHHRyd3soVrJyQQGkqtJnWq04ge+YDy/KniXR2ThQ93LI/QLAxKrKOe3qmIIaNdcdDYnjA==", "cpu": [ "x64" ], @@ -2793,9 +2795,9 @@ } }, "node_modules/@nx/nx-linux-x64-musl": { - "version": "20.0.9", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.0.9.tgz", - "integrity": "sha512-1bEyKyCr0N6gcEK9fMjsNgmaSGJ+CC0ieAW6t+wGt0uzRyyJ6Oe+uxTUEEXTxmW0U1wVxBVPI0iWc3bFUUSHLw==", + "version": "20.0.12", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.0.12.tgz", + "integrity": "sha512-vOoCrjL44nFZ5N8a4UAIYELnf/tq1dRaLEhSV+P0hKTEtwONj4k8crfU/2HifG1iU7p3AWJLEyaddMoINhB/2g==", "cpu": [ "x64" ], @@ -2810,9 +2812,9 @@ } }, "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "20.0.9", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.0.9.tgz", - "integrity": "sha512-VnEPwusMRta09bmxKIlnLgqzNLaJ3zoXcTYIajxVgsLzcam73iNQ32vMarMXNEC+t+HIHvCjMjLDaYSJBVcMHA==", + "version": "20.0.12", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.0.12.tgz", + "integrity": "sha512-gKdaul23bdRnh493iAd6pSLPSW54VBuEv2zPL86cgprLOcEZiGM5BLJWQguKHCib6dYKaIP4CUIs7i7vhEID+A==", "cpu": [ "arm64" ], @@ -2827,9 +2829,9 @@ } }, "node_modules/@nx/nx-win32-x64-msvc": { - "version": "20.0.9", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.0.9.tgz", - "integrity": "sha512-cmkXpXT54cKFlXDDREoeHLxN6ml2G0VmMn+anVbMCmuDF0+MNZw6VoZHYMsWuNTknENj94P+dVnF6X/AQeHlEA==", + "version": "20.0.12", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.0.12.tgz", + "integrity": "sha512-R1pz4kAG0Ok0EDxXhHwKM3ZZcK2nLycuR9SDrq2Ldp2knvbFf4quSjWyAQaiofJXo179+noa7o5tZDZbNjBYMw==", "cpu": [ "x64" ], @@ -4092,9 +4094,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.4.tgz", - "integrity": "sha512-jfUJrFct/hTA0XDM5p/htWKoNNTbDLY0KRwEt6pyOA6k2fmk0WVwl65PdUdJZgzGEHWx+49LilkcSaumQRyNQw==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.25.0.tgz", + "integrity": "sha512-CC/ZqFZwlAIbU1wUPisHyV/XRc5RydFrNLtgl3dGYskdwPZdt4HERtKm50a/+DtTlKeCq9IXFEWR+P6blwjqBA==", "cpu": [ "arm" ], @@ -4105,9 +4107,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.4.tgz", - "integrity": "sha512-j4nrEO6nHU1nZUuCfRKoCcvh7PIywQPUCBa2UsootTHvTHIoIu2BzueInGJhhvQO/2FTRdNYpf63xsgEqH9IhA==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.25.0.tgz", + "integrity": "sha512-/Y76tmLGUJqVBXXCfVS8Q8FJqYGhgH4wl4qTA24E9v/IJM0XvJCGQVSW1QZ4J+VURO9h8YCa28sTFacZXwK7Rg==", "cpu": [ "arm64" ], @@ -4118,9 +4120,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.4.tgz", - "integrity": "sha512-GmU/QgGtBTeraKyldC7cDVVvAJEOr3dFLKneez/n7BvX57UdhOqDsVwzU7UOnYA7AAOt+Xb26lk79PldDHgMIQ==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.25.0.tgz", + "integrity": "sha512-YVT6L3UrKTlC0FpCZd0MGA7NVdp7YNaEqkENbWQ7AOVOqd/7VzyHpgIpc1mIaxRAo1ZsJRH45fq8j4N63I/vvg==", "cpu": [ "arm64" ], @@ -4131,9 +4133,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.4.tgz", - "integrity": "sha512-N6oDBiZCBKlwYcsEPXGDE4g9RoxZLK6vT98M8111cW7VsVJFpNEqvJeIPfsCzbf0XEakPslh72X0gnlMi4Ddgg==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.25.0.tgz", + "integrity": "sha512-ZRL+gexs3+ZmmWmGKEU43Bdn67kWnMeWXLFhcVv5Un8FQcx38yulHBA7XR2+KQdYIOtD0yZDWBCudmfj6lQJoA==", "cpu": [ "x64" ], @@ -4144,9 +4146,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.24.4.tgz", - "integrity": "sha512-py5oNShCCjCyjWXCZNrRGRpjWsF0ic8f4ieBNra5buQz0O/U6mMXCpC1LvrHuhJsNPgRt36tSYMidGzZiJF6mw==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.25.0.tgz", + "integrity": "sha512-xpEIXhiP27EAylEpreCozozsxWQ2TJbOLSivGfXhU4G1TBVEYtUPi2pOZBnvGXHyOdLAUUhPnJzH3ah5cqF01g==", "cpu": [ "arm64" ], @@ -4157,9 +4159,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.24.4.tgz", - "integrity": "sha512-L7VVVW9FCnTTp4i7KrmHeDsDvjB4++KOBENYtNYAiYl96jeBThFfhP6HVxL74v4SiZEVDH/1ILscR5U9S4ms4g==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.25.0.tgz", + "integrity": "sha512-sC5FsmZGlJv5dOcURrsnIK7ngc3Kirnx3as2XU9uER+zjfyqIjdcMVgzy4cOawhsssqzoAX19qmxgJ8a14Qrqw==", "cpu": [ "x64" ], @@ -4170,9 +4172,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.4.tgz", - "integrity": "sha512-10ICosOwYChROdQoQo589N5idQIisxjaFE/PAnX2i0Zr84mY0k9zul1ArH0rnJ/fpgiqfu13TFZR5A5YJLOYZA==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.25.0.tgz", + "integrity": "sha512-uD/dbLSs1BEPzg564TpRAQ/YvTnCds2XxyOndAO8nJhaQcqQGFgv/DAVko/ZHap3boCvxnzYMa3mTkV/B/3SWA==", "cpu": [ "arm" ], @@ -4183,9 +4185,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.4.tgz", - "integrity": "sha512-ySAfWs69LYC7QhRDZNKqNhz2UKN8LDfbKSMAEtoEI0jitwfAG2iZwVqGACJT+kfYvvz3/JgsLlcBP+WWoKCLcw==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.25.0.tgz", + "integrity": "sha512-ZVt/XkrDlQWegDWrwyC3l0OfAF7yeJUF4fq5RMS07YM72BlSfn2fQQ6lPyBNjt+YbczMguPiJoCfaQC2dnflpQ==", "cpu": [ "arm" ], @@ -4196,9 +4198,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.4.tgz", - "integrity": "sha512-uHYJ0HNOI6pGEeZ/5mgm5arNVTI0nLlmrbdph+pGXpC9tFHFDQmDMOEqkmUObRfosJqpU8RliYoGz06qSdtcjg==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.25.0.tgz", + "integrity": "sha512-qboZ+T0gHAW2kkSDPHxu7quaFaaBlynODXpBVnPxUgvWYaE84xgCKAPEYE+fSMd3Zv5PyFZR+L0tCdYCMAtG0A==", "cpu": [ "arm64" ], @@ -4209,9 +4211,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.4.tgz", - "integrity": "sha512-38yiWLemQf7aLHDgTg85fh3hW9stJ0Muk7+s6tIkSUOMmi4Xbv5pH/5Bofnsb6spIwD5FJiR+jg71f0CH5OzoA==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.25.0.tgz", + "integrity": "sha512-ndWTSEmAaKr88dBuogGH2NZaxe7u2rDoArsejNslugHZ+r44NfWiwjzizVS1nUOHo+n1Z6qV3X60rqE/HlISgw==", "cpu": [ "arm64" ], @@ -4222,9 +4224,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.4.tgz", - "integrity": "sha512-q73XUPnkwt9ZNF2xRS4fvneSuaHw2BXuV5rI4cw0fWYVIWIBeDZX7c7FWhFQPNTnE24172K30I+dViWRVD9TwA==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.25.0.tgz", + "integrity": "sha512-BVSQvVa2v5hKwJSy6X7W1fjDex6yZnNKy3Kx1JGimccHft6HV0THTwNtC2zawtNXKUu+S5CjXslilYdKBAadzA==", "cpu": [ "ppc64" ], @@ -4235,9 +4237,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.4.tgz", - "integrity": "sha512-Aie/TbmQi6UXokJqDZdmTJuZBCU3QBDA8oTKRGtd4ABi/nHgXICulfg1KI6n9/koDsiDbvHAiQO3YAUNa/7BCw==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.25.0.tgz", + "integrity": "sha512-G4hTREQrIdeV0PE2JruzI+vXdRnaK1pg64hemHq2v5fhv8C7WjVaeXc9P5i4Q5UC06d/L+zA0mszYIKl+wY8oA==", "cpu": [ "riscv64" ], @@ -4248,9 +4250,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.4.tgz", - "integrity": "sha512-P8MPErVO/y8ohWSP9JY7lLQ8+YMHfTI4bAdtCi3pC2hTeqFJco2jYspzOzTUB8hwUWIIu1xwOrJE11nP+0JFAQ==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.25.0.tgz", + "integrity": "sha512-9T/w0kQ+upxdkFL9zPVB6zy9vWW1deA3g8IauJxojN4bnz5FwSsUAD034KpXIVX5j5p/rn6XqumBMxfRkcHapQ==", "cpu": [ "s390x" ], @@ -4261,9 +4263,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.4.tgz", - "integrity": "sha512-K03TljaaoPK5FOyNMZAAEmhlyO49LaE4qCsr0lYHUKyb6QacTNF9pnfPpXnFlFD3TXuFbFbz7tJ51FujUXkXYA==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.25.0.tgz", + "integrity": "sha512-ThcnU0EcMDn+J4B9LD++OgBYxZusuA7iemIIiz5yzEcFg04VZFzdFjuwPdlURmYPZw+fgVrFzj4CA64jSTG4Ig==", "cpu": [ "x64" ], @@ -4274,9 +4276,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.4.tgz", - "integrity": "sha512-VJYl4xSl/wqG2D5xTYncVWW+26ICV4wubwN9Gs5NrqhJtayikwCXzPL8GDsLnaLU3WwhQ8W02IinYSFJfyo34Q==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.25.0.tgz", + "integrity": "sha512-zx71aY2oQxGxAT1JShfhNG79PnjYhMC6voAjzpu/xmMjDnKNf6Nl/xv7YaB/9SIa9jDYf8RBPWEnjcdlhlv1rQ==", "cpu": [ "x64" ], @@ -4287,9 +4289,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.4.tgz", - "integrity": "sha512-ku2GvtPwQfCqoPFIJCqZ8o7bJcj+Y54cZSr43hHca6jLwAiCbZdBUOrqE6y29QFajNAzzpIOwsckaTFmN6/8TA==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.25.0.tgz", + "integrity": "sha512-JT8tcjNocMs4CylWY/CxVLnv8e1lE7ff1fi6kbGocWwxDq9pj30IJ28Peb+Y8yiPNSF28oad42ApJB8oUkwGww==", "cpu": [ "arm64" ], @@ -4300,9 +4302,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.4.tgz", - "integrity": "sha512-V3nCe+eTt/W6UYNr/wGvO1fLpHUrnlirlypZfKCT1fG6hWfqhPgQV/K/mRBXBpxc0eKLIF18pIOFVPh0mqHjlg==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.25.0.tgz", + "integrity": "sha512-dRLjLsO3dNOfSN6tjyVlG+Msm4IiZnGkuZ7G5NmpzwF9oOc582FZG05+UdfTbz5Jd4buK/wMb6UeHFhG18+OEg==", "cpu": [ "ia32" ], @@ -4313,9 +4315,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.4.tgz", - "integrity": "sha512-LTw1Dfd0mBIEqUVCxbvTE/LLo+9ZxVC9k99v1v4ahg9Aak6FpqOfNu5kRkeTAn0wphoC4JU7No1/rL+bBCEwhg==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.25.0.tgz", + "integrity": "sha512-/RqrIFtLB926frMhZD0a5oDa4eFIbyNEwLLloMTEjmqfwZWXywwVVOVmwTsuyhC9HKkVEZcOOi+KV4U9wmOdlg==", "cpu": [ "x64" ], @@ -4631,256 +4633,14 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@swc/core": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.9.1.tgz", - "integrity": "sha512-OnPc+Kt5oy3xTvr/KCUOqE9ptJcWbyQgAUr1ydh9EmbBcmJTaO1kfQCxm/axzJi6sKeDTxL9rX5zvLOhoYIaQw==", - "dev": true, - "hasInstallScript": true, - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@swc/counter": "^0.1.3", - "@swc/types": "^0.1.14" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/swc" - }, - "optionalDependencies": { - "@swc/core-darwin-arm64": "1.9.1", - "@swc/core-darwin-x64": "1.9.1", - "@swc/core-linux-arm-gnueabihf": "1.9.1", - "@swc/core-linux-arm64-gnu": "1.9.1", - "@swc/core-linux-arm64-musl": "1.9.1", - "@swc/core-linux-x64-gnu": "1.9.1", - "@swc/core-linux-x64-musl": "1.9.1", - "@swc/core-win32-arm64-msvc": "1.9.1", - "@swc/core-win32-ia32-msvc": "1.9.1", - "@swc/core-win32-x64-msvc": "1.9.1" - }, - "peerDependencies": { - "@swc/helpers": "*" - }, - "peerDependenciesMeta": { - "@swc/helpers": { - "optional": true - } - } - }, - "node_modules/@swc/core-darwin-arm64": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.9.1.tgz", - "integrity": "sha512-2/ncHSCdAh5OHem1fMITrWEzzl97OdMK1PHc9CkxSJnphLjRubfxB5sbc5tDhcO68a5tVy+DxwaBgDec3PXnOg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-darwin-x64": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.9.1.tgz", - "integrity": "sha512-4MDOFC5zmNqRJ9RGFOH95oYf27J9HniLVpB1pYm2gGeNHdl2QvDMtx2QTuMHQ6+OTn/3y1BHYuhBGp7d405oLA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.9.1.tgz", - "integrity": "sha512-eVW/BjRW8/HpLe3+1jRU7w7PdRLBgnEEYTkHJISU8805/EKT03xNZn6CfaBpKfeAloY4043hbGzE/NP9IahdpQ==", - "cpu": [ - "arm" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.9.1.tgz", - "integrity": "sha512-8m3u1v8R8NgI/9+cHMkzk14w87blSy3OsQPWPfhOL+XPwhyLPvat+ahQJb2nZmltjTgkB4IbzKFSfbuA34LmNA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.9.1.tgz", - "integrity": "sha512-hpT0sQAZnW8l02I289yeyFfT9llGO9PzKDxUq8pocKtioEHiElRqR53juCWoSmzuWi+6KX7zUJ0NKCBrc8pmDg==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.9.1.tgz", - "integrity": "sha512-sGFdpdAYusk/ropHiwtXom2JrdaKPxl8MqemRv6dvxZq1Gm/GdmOowxdXIPjCgBGMgoXVcgNviH6CgiO5q+UtA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-linux-x64-musl": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.9.1.tgz", - "integrity": "sha512-YtNLNwIWs0Z2+XgBs6+LrCIGtfCDtNr4S4b6Q5HDOreEIGzSvhkef8eyBI5L+fJ2eGov4b7iEo61C4izDJS5RA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.9.1.tgz", - "integrity": "sha512-qSxD3uZW2vSiHqUt30vUi0PB92zDh9bjqh5YKpfhhVa7h1vt/xXhlid8yMvSNToTfzhRrTEffOAPUr7WVoyQUA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.9.1.tgz", - "integrity": "sha512-C3fPEwyX/WRPlX6zIToNykJuz1JkZX0sk8H1QH2vpnKuySUkt/Ur5K2FzLgSWzJdbfxstpgS151/es0VGAD+ZA==", - "cpu": [ - "ia32" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.9.1.tgz", - "integrity": "sha512-2XZ+U1AyVsOAXeH6WK1syDm7+gwTjA8fShs93WcbxnK7HV+NigDlvr4124CeJLTHyh3fMh1o7+CnQnaBJhlysQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0 AND MIT", - "optional": true, - "os": [ - "win32" - ], - "peer": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/@swc/counter": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@swc/counter/-/counter-0.1.3.tgz", - "integrity": "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==", - "dev": true, - "license": "Apache-2.0", - "optional": true, - "peer": true - }, "node_modules/@swc/helpers": { - "version": "0.5.13", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.13.tgz", - "integrity": "sha512-UoKGxQ3r5kYI9dALKJapMmuK+1zWM/H17Z1+iwnNmzcJRnfFuevZs375TA5rW31pu4BS4NoSy1fRsexDXfWn5w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "tslib": "^2.4.0" - } - }, - "node_modules/@swc/types": { - "version": "0.1.14", - "resolved": "https://registry.npmjs.org/@swc/types/-/types-0.1.14.tgz", - "integrity": "sha512-PbSmTiYCN+GMrvfjrMo9bdY+f2COnwbdnoMw7rqU/PI5jXpKjxOGZ0qqZCImxnT81NkNsKnmEpvu+hRXLBeCJg==", + "version": "0.5.15", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.15.tgz", + "integrity": "sha512-JQ5TuMi45Owi4/BIMAJBoSQoOJu12oOk/gADqlcUL9JEdHB8vyjUSsxqeNXnmXHjYKMi2WcYtezGEEhqUI/E2g==", "dev": true, "license": "Apache-2.0", - "optional": true, - "peer": true, "dependencies": { - "@swc/counter": "^0.1.3" + "tslib": "^2.8.0" } }, "node_modules/@szmarczak/http-timer": { @@ -5184,30 +4944,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/eslint": { - "version": "9.6.1", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", - "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.7", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz", - "integrity": "sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -5315,28 +5051,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/prop-types": { - "version": "15.7.13", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", - "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/@types/react": { - "version": "18.3.12", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.12.tgz", - "integrity": "sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@types/prop-types": "*", - "csstype": "^3.0.2" - } - }, "node_modules/@types/resolve": { "version": "1.20.2", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", @@ -5419,15 +5133,18 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "node_modules/@typescript-eslint/parser": { "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", + "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", "dev": true, - "license": "MIT", + "license": "BSD-2-Clause", "dependencies": { + "@typescript-eslint/scope-manager": "7.18.0", "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0", + "debug": "^4.3.4" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -5435,14 +5152,26 @@ "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.56.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { + "node_modules/@typescript-eslint/scope-manager": { "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", + "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", "dev": true, "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "7.18.0", + "@typescript-eslint/visitor-keys": "7.18.0" + }, "engines": { "node": "^18.18.0 || >=20.0.0" }, @@ -5451,20 +5180,16 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { + "node_modules/@typescript-eslint/type-utils": { "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", + "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", "dev": true, - "license": "BSD-2-Clause", + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", + "@typescript-eslint/typescript-estree": "7.18.0", + "@typescript-eslint/utils": "7.18.0", "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", "ts-api-utils": "^1.3.0" }, "engines": { @@ -5474,140 +5199,16 @@ "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, + "peerDependencies": { + "eslint": "^8.56.0" + }, "peerDependenciesMeta": { "typescript": { "optional": true } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", - "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.18.0.tgz", - "integrity": "sha512-4Z+L8I2OqhZV8qA132M4wNL30ypZGYOQVBfMgxDH/K5UX0PNqTu1c6za9ST5r9+tavvHiTWmBnKzpCJ/GlVFtg==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/scope-manager": "7.18.0", - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "node_modules/@typescript-eslint/types": { "version": "7.18.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", @@ -5621,7 +5222,7 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "node_modules/@typescript-eslint/typescript-estree": { "version": "7.18.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", @@ -5650,25 +5251,7 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", - "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/brace-expansion": { + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", @@ -5678,7 +5261,7 @@ "balanced-match": "^1.0.0" } }, - "node_modules/@typescript-eslint/parser/node_modules/minimatch": { + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", @@ -5694,7 +5277,7 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@typescript-eslint/parser/node_modules/semver": { + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { "version": "7.6.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", @@ -5707,96 +5290,7 @@ "node": ">=10" } }, - "node_modules/@typescript-eslint/type-utils": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.18.0.tgz", - "integrity": "sha512-XL0FJXuCLaDuX2sYqZUUSOJ2sG5/i1AAze+axqmLnSkNEVMVYLF+cbwlB2w8D1tinFuSikHmFta+P+HOofrLeA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/typescript-estree": "7.18.0", - "@typescript-eslint/utils": "7.18.0", - "debug": "^4.3.4", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.56.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/scope-manager": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.18.0.tgz", - "integrity": "sha512-jjhdIE/FPF2B7Z1uzc6i3oWKbGcHb87Qw7AWj6jmEqNOfDFbJWtjt/XfwCpvNkpGWlcJaog5vTR+VV8+w9JflA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.18.0.tgz", - "integrity": "sha512-iZqi+Ds1y4EDYUtlOOC+aUmxnE9xS/yCigkjA7XpTKV6nCBd3Hp/PRGGmdwnfkV2ThMyYldP1wRpm/id99spTQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.18.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.18.0.tgz", - "integrity": "sha512-aP1v/BSPnnyhMHts8cf1qQ6Q1IFwwRvAQGRvBFkWlo3/lH29OXA3Pts+c10nxRxIBrDnoMqzhgdwVe5f2D6OzA==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "@typescript-eslint/types": "7.18.0", - "@typescript-eslint/visitor-keys": "7.18.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "^9.0.4", - "semver": "^7.6.0", - "ts-api-utils": "^1.3.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/utils": { + "node_modules/@typescript-eslint/utils": { "version": "7.18.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.18.0.tgz", "integrity": "sha512-kK0/rNa2j74XuHVcoCZxdFBMF+aq/vH83CXAOHieC+2Gis4mF8jJXT5eAfyD3K0sAxtPuwxaIOIOvhwzVDt/kw==", @@ -5819,7 +5313,7 @@ "eslint": "^8.56.0" } }, - "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { + "node_modules/@typescript-eslint/visitor-keys": { "version": "7.18.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.18.0.tgz", "integrity": "sha512-cDF0/Gf81QpY3xYyJKDV14Zwdmid5+uuENhjH2EqFaF0ni+yAyq/LzMaIJdhNJXZI7uLzwIlA+V7oWoyn6Curg==", @@ -5837,45 +5331,6 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/type-utils/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/type-utils/node_modules/semver": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", - "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@ungap/structured-clone": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", @@ -5884,9 +5339,9 @@ "license": "ISC" }, "node_modules/@vitejs/plugin-vue": { - "version": "5.1.4", - "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.4.tgz", - "integrity": "sha512-N2XSI2n3sQqp5w7Y/AN/L2XDjBIRGqXko+eDp42sydYSBeJuSm5a1sLf8zakmo8u7tA8NmBgoDLA1HeOESjp9A==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.1.5.tgz", + "integrity": "sha512-dlnib73G05CDBAUR/YpuZcQQ47fpjihnnNouAAqN62z+oqSsWJ+kh52GRzIxpkgFG3q11eXK7Di7RMmoCwISZA==", "dev": true, "license": "MIT", "engines": { @@ -6149,23 +5604,23 @@ } }, "node_modules/@vue/devtools-api": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.6.3.tgz", - "integrity": "sha512-H2TRzFA9hNezdtM6I0y3RCMhIg5T3gib/p9qI2IAS8gB9tvkAv4JZHAZZl5BZHhO7btuHkvHzU5qpO/vdsjYMg==", + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.6.4.tgz", + "integrity": "sha512-5AaJ5ELBIuevmFMZYYLuOO9HUuY/6OlkOELHE7oeDhy4XD/hSODIzktlsvBOsn+bto3aD0psj36LGzwVu5Ip8w==", "dev": true, "license": "MIT", "dependencies": { - "@vue/devtools-kit": "^7.6.3" + "@vue/devtools-kit": "^7.6.4" } }, "node_modules/@vue/devtools-kit": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.6.3.tgz", - "integrity": "sha512-ETsFc8GlOp04rSFN79tB2TpVloWfsSx9BoCSElV3w3CaJTSBfz42KsIi5Ka+dNTJs1jY7QVLTDeoBmUGgA9h2A==", + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.6.4.tgz", + "integrity": "sha512-Zs86qIXXM9icU0PiGY09PQCle4TI750IPLmAJzW5Kf9n9t5HzSYf6Rz6fyzSwmfMPiR51SUKJh9sXVZu78h2QA==", "dev": true, "license": "MIT", "dependencies": { - "@vue/devtools-shared": "^7.6.3", + "@vue/devtools-shared": "^7.6.4", "birpc": "^0.2.19", "hookable": "^5.5.3", "mitt": "^3.0.1", @@ -6175,9 +5630,9 @@ } }, "node_modules/@vue/devtools-shared": { - "version": "7.6.3", - "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.6.3.tgz", - "integrity": "sha512-wJW5QF27i16+sNQIaes8QoEZg1eqEgF83GkiPUlEQe9k7ZoHXHV7PRrnrxOKem42sIHPU813J2V/ZK1uqTJe6g==", + "version": "7.6.4", + "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.6.4.tgz", + "integrity": "sha512-nD6CUvBEel+y7zpyorjiUocy0nh77DThZJ0k1GRnJeOmY3ATq2fWijEp7wk37gb023Cb0R396uYh5qMSBQ5WFg==", "dev": true, "license": "MIT", "dependencies": { @@ -6427,73 +5882,73 @@ } }, "node_modules/@webassemblyjs/ast": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.13.1.tgz", - "integrity": "sha512-+Zp/YJMBws+tg2Nuy5jiFhwvPiSeIB0gPp1Ie/TyqFg69qJ/vRrOKQ7AsFLn3solq5/9ubkBjrGd0UcvFjFsYA==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", + "integrity": "sha512-nuBEDgQfm1ccRp/8bCQrx1frohyufl4JlbMMZ4P1wpeOfDhF6FQkxZJ1b/e+PLwr6X1Nhw6OLme5usuBWYBvuQ==", "dev": true, "license": "MIT", "dependencies": { - "@webassemblyjs/helper-numbers": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.12.1" + "@webassemblyjs/helper-numbers": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2" } }, "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.12.1.tgz", - "integrity": "sha512-0vqwjuCO3Sa6pO3nfplawORkL1GUgza/H1A62SdXHSFCmAHoRcrtX/yVG3f1LuMYW951cvYRcRt6hThhz4FnCQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.13.2.tgz", + "integrity": "sha512-6oXyTOzbKxGH4steLbLNOu71Oj+C8Lg34n6CqRvqfS2O71BxY6ByfMDRhBytzknj9yGUPVJ1qIKhRlAwO1AovA==", "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.12.1.tgz", - "integrity": "sha512-czovmKZdRk4rYauCOuMV/EImC3qyfcqyJuOYyDRYR6PZSOW37VWe26fAZQznbvKjlwJdyxLl6mIfx47Cfz8ykw==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.13.2.tgz", + "integrity": "sha512-U56GMYxy4ZQCbDZd6JuvvNV/WFildOjsaWD3Tzzvmw/mas3cXzRJPMjP83JqEsgSbyrmaGjBfDtV7KDXV9UzFQ==", "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.13.1.tgz", - "integrity": "sha512-J0gf97+D3CavG7aO5XmtwxRWMiMEuxQ6t8Aov8areSnyI5P5fM0HV0m8bE3iLfDQZBhxLCc15tRsFVOGyAJ0ng==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.14.1.tgz", + "integrity": "sha512-jyH7wtcHiKssDtFPRB+iQdxlDf96m0E39yb0k5uJVhFGleZFoNw1c4aeIcVUPPbXUVJ94wwnMOAqUHyzoEPVMA==", "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.12.1.tgz", - "integrity": "sha512-Vp6k5nXOMvI9dWJqDGCMvwAc8+G6tI2YziuYWqxk7XYnWHdxEJo19CGpqm/kRh86rJxwYANLGuyreARhM+C9lQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.13.2.tgz", + "integrity": "sha512-FE8aCmS5Q6eQYcV3gI35O4J789wlQA+7JrqTTpJqn5emA4U2hvwJmvFRC0HODS+3Ye6WioDklgd6scJ3+PLnEA==", "dev": true, "license": "MIT", "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.12.1", - "@webassemblyjs/helper-api-error": "1.12.1", + "@webassemblyjs/floating-point-hex-parser": "1.13.2", + "@webassemblyjs/helper-api-error": "1.13.2", "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.12.1.tgz", - "integrity": "sha512-flsRYmCqN2ZJmvAyNxZXPPFkwKoezeTUczytfBovql8cOjYTr6OTcZvku4UzyKFW0Kj+PgD+UaG8/IdX31EYWg==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.13.2.tgz", + "integrity": "sha512-3QbLKy93F0EAIXLh0ogEVR6rOubA9AoZ+WRYhNbFyuB70j3dRdwH9g+qXhLAO0kiYGlg3TxDV+I4rQTr/YNXkA==", "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.13.1.tgz", - "integrity": "sha512-lcVNbrM5Wm7867lmbU61l+R4dU7emD2X70f9V0PuicvsdVUS5vvXODAxRYGVGBAJ6rWmXMuZKjM0PoeBjAcm2A==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.14.1.tgz", + "integrity": "sha512-ds5mXEqTJ6oxRoqjhWDU83OgzAYjwsCV8Lo/N+oRsNDmx/ZDpqalmrtgOMkHwxsG0iI//3BwWAErYRHtgn0dZw==", "dev": true, "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.13.1", - "@webassemblyjs/helper-buffer": "1.13.1", - "@webassemblyjs/helper-wasm-bytecode": "1.12.1", - "@webassemblyjs/wasm-gen": "1.13.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/wasm-gen": "1.14.1" } }, "node_modules/@webassemblyjs/ieee754": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.12.1.tgz", - "integrity": "sha512-fcrUCqE2dVldeVAHTWFiTiKMS9ivc5jOgB2c30zYOZnm3O54SWeMJWS/HXYK862we2AYHtf6GYuP9xG9J+5zyQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.13.2.tgz", + "integrity": "sha512-4LtOzh58S/5lX4ITKxnAK2USuNEvpdVV9AlgGQb8rJDHaLeHciwG4zlGr0j/SNWlr7x3vO1lDEsuePvtcDNCkw==", "dev": true, "license": "MIT", "dependencies": { @@ -6501,9 +5956,9 @@ } }, "node_modules/@webassemblyjs/leb128": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.12.1.tgz", - "integrity": "sha512-jOU6pTFNf7aGm46NCrEU7Gj6cVuP55T7+kyo5TU/rCduZ5EdwMPBZwSwwzjPZ3eFXYFCmC5wZdPZN0ZWio6n4Q==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.13.2.tgz", + "integrity": "sha512-Lde1oNoIdzVzdkNEAWZ1dZ5orIbff80YPdHx20mrHwHrVNNTjNr8E3xz9BdpcGqRQbAEa+fkrCb+fRFTl/6sQw==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -6511,79 +5966,79 @@ } }, "node_modules/@webassemblyjs/utf8": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.12.1.tgz", - "integrity": "sha512-zcZvnAY3/M28Of012dksIfC26qZQJlj2PQCCvxqlsRJHOYtasp+OvK8nRcg11TKzAAv3ja7Y0NEBMKAjH6ljnw==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.13.2.tgz", + "integrity": "sha512-3NQWGjKTASY1xV5m7Hr0iPeXD9+RDobLll3T9d2AO+g3my8xy5peVyjSag4I50mR1bBSN/Ct12lo+R9tJk0NZQ==", "dev": true, "license": "MIT" }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.13.1.tgz", - "integrity": "sha512-YHnh/f4P4ggjPB+pcri8Pb2HHwCGK+B8qBE+NeEp/WTMQ7dAjgWTnLhXxUqb6WLOT25TK5m0VTCAKTYw8AKxcg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.14.1.tgz", + "integrity": "sha512-RNJUIQH/J8iA/1NzlE4N7KtyZNHi3w7at7hDjvRNm5rcUXa00z1vRz3glZoULfJ5mpvYhLybmVcwcjGrC1pRrQ==", "dev": true, "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.13.1", - "@webassemblyjs/helper-buffer": "1.13.1", - "@webassemblyjs/helper-wasm-bytecode": "1.12.1", - "@webassemblyjs/helper-wasm-section": "1.13.1", - "@webassemblyjs/wasm-gen": "1.13.1", - "@webassemblyjs/wasm-opt": "1.13.1", - "@webassemblyjs/wasm-parser": "1.13.1", - "@webassemblyjs/wast-printer": "1.13.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/helper-wasm-section": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-opt": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1", + "@webassemblyjs/wast-printer": "1.14.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.13.1.tgz", - "integrity": "sha512-AxWiaqIeLh3c1H+8d1gPgVNXHyKP7jDu2G828Of9/E0/ovVEsh6LjX1QZ6g1tFBHocCwuUHK9O4w35kgojZRqA==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.14.1.tgz", + "integrity": "sha512-AmomSIjP8ZbfGQhumkNvgC33AY7qtMCXnN6bL2u2Js4gVCg8fp735aEiMSBbDR7UQIj90n4wKAFUSEd0QN2Ukg==", "dev": true, "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.13.1", - "@webassemblyjs/helper-wasm-bytecode": "1.12.1", - "@webassemblyjs/ieee754": "1.12.1", - "@webassemblyjs/leb128": "1.12.1", - "@webassemblyjs/utf8": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.13.1.tgz", - "integrity": "sha512-SUMlvCrfykC7dtWX5g4TSuMmWi9w9tK5kGIdvQMnLuvJfnFLsnAaF86FNbSBSAL33VhM/hOhx4t9o66N37IqSg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.14.1.tgz", + "integrity": "sha512-PTcKLUNvBqnY2U6E5bdOQcSM+oVP/PmrDY9NzowJjislEjwP/C4an2303MCVS2Mg9d3AJpIGdUFIQQWbPds0Sw==", "dev": true, "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.13.1", - "@webassemblyjs/helper-buffer": "1.13.1", - "@webassemblyjs/wasm-gen": "1.13.1", - "@webassemblyjs/wasm-parser": "1.13.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-buffer": "1.14.1", + "@webassemblyjs/wasm-gen": "1.14.1", + "@webassemblyjs/wasm-parser": "1.14.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.13.1.tgz", - "integrity": "sha512-8SPOcbqSb7vXHG+B0PTsJrvT/HilwV3WkJgxw34lmhWvO+7qM9xBTd9u4dn1Lb86WHpKswT5XwF277uBTHFikg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.14.1.tgz", + "integrity": "sha512-JLBl+KZ0R5qB7mCnud/yyX08jWFw5MsoalJ1pQ4EdFlgj9VdXKGuENGsiCIjegI1W7p91rUlcB/LB5yRJKNTcQ==", "dev": true, "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.13.1", - "@webassemblyjs/helper-api-error": "1.12.1", - "@webassemblyjs/helper-wasm-bytecode": "1.12.1", - "@webassemblyjs/ieee754": "1.12.1", - "@webassemblyjs/leb128": "1.12.1", - "@webassemblyjs/utf8": "1.12.1" + "@webassemblyjs/ast": "1.14.1", + "@webassemblyjs/helper-api-error": "1.13.2", + "@webassemblyjs/helper-wasm-bytecode": "1.13.2", + "@webassemblyjs/ieee754": "1.13.2", + "@webassemblyjs/leb128": "1.13.2", + "@webassemblyjs/utf8": "1.13.2" } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.13.1.tgz", - "integrity": "sha512-q0zIfwpbFvaNkgbSzkZFzLsOs8ixZ5MSdTTMESilSAk1C3P8BKEWfbLEvIqyI/PjNpP9+ZU+/KwgfXx3T7ApKw==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.14.1.tgz", + "integrity": "sha512-kPSSXE6De1XOR820C90RIo2ogvZG+c3KiHzqUoO/F34Y2shGzesfqv7o57xrxovZJH/MetF5UjroJ/R/3isoiw==", "dev": true, "license": "MIT", "dependencies": { - "@webassemblyjs/ast": "1.13.1", + "@webassemblyjs/ast": "1.14.1", "@xtuc/long": "4.2.2" } }, @@ -6742,6 +6197,16 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^8" + } + }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -6861,25 +6326,25 @@ } }, "node_modules/algoliasearch": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.12.0.tgz", - "integrity": "sha512-psGBRYdGgik8I6m28iAB8xpubvjEt7UQU+w5MAJUA2324WHiGoHap5BPkkjB14rMaXeRts6pmOsrVIglGyOVwg==", + "version": "5.13.0", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.13.0.tgz", + "integrity": "sha512-04lyQX3Ev/oLYQx+aagamQDXvkUUfX1mwrLrus15+9fNaYj28GDxxEzbwaRfvmHFcZyoxvup7mMtDTTw8SrTEQ==", "dev": true, "license": "MIT", "dependencies": { - "@algolia/client-abtesting": "5.12.0", - "@algolia/client-analytics": "5.12.0", - "@algolia/client-common": "5.12.0", - "@algolia/client-insights": "5.12.0", - "@algolia/client-personalization": "5.12.0", - "@algolia/client-query-suggestions": "5.12.0", - "@algolia/client-search": "5.12.0", - "@algolia/ingestion": "1.12.0", - "@algolia/monitoring": "1.12.0", - "@algolia/recommend": "5.12.0", - "@algolia/requester-browser-xhr": "5.12.0", - "@algolia/requester-fetch": "5.12.0", - "@algolia/requester-node-http": "5.12.0" + "@algolia/client-abtesting": "5.13.0", + "@algolia/client-analytics": "5.13.0", + "@algolia/client-common": "5.13.0", + "@algolia/client-insights": "5.13.0", + "@algolia/client-personalization": "5.13.0", + "@algolia/client-query-suggestions": "5.13.0", + "@algolia/client-search": "5.13.0", + "@algolia/ingestion": "1.13.0", + "@algolia/monitoring": "1.13.0", + "@algolia/recommend": "5.13.0", + "@algolia/requester-browser-xhr": "5.13.0", + "@algolia/requester-fetch": "5.13.0", + "@algolia/requester-node-http": "5.13.0" }, "engines": { "node": ">= 14.0.0" @@ -6921,6 +6386,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -7682,9 +7160,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001677", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001677.tgz", - "integrity": "sha512-fmfjsOlJUpMWu+mAAtZZZHz7UEwsUxIIvu1TJfO1HqFQvB/B+ii0xr9B5HpbZY/mC4XZ8SvjHJqtAY6pDPQEog==", + "version": "1.0.30001680", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001680.tgz", + "integrity": "sha512-rPQy70G6AGUMnbwS1z6Xg+RkHYPAi18ihs47GH0jcxIG7wArmPgY3XbS2sRdBbxJljp3thdT8BIqv9ccCypiPA==", "dev": true, "funding": [ { @@ -8523,9 +8001,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.5.tgz", + "integrity": "sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==", "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -8746,6 +8224,19 @@ "node": ">=12" } }, + "node_modules/d3-force": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-1.2.1.tgz", + "integrity": "sha512-HHvehyaiUlVo5CxBJ0yF/xny4xoaxFxDnBXNvNcfW9adORGZfyNF1dj6DGLKyk4Yh3brP/1h3rnDzdIAwL08zg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "d3-collection": "1", + "d3-dispatch": "1", + "d3-quadtree": "1", + "d3-timer": "1" + } + }, "node_modules/d3-format": { "version": "1.4.5", "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-1.4.5.tgz", @@ -8797,6 +8288,13 @@ "d3-color": "1" } }, + "node_modules/d3-interpolate-path": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/d3-interpolate-path/-/d3-interpolate-path-2.3.0.tgz", + "integrity": "sha512-tZYtGXxBmbgHsIc9Wms6LS5u4w6KbP8C09a4/ZYc4KLMYYqub57rRBUgpUr2CIarIrJEpdAWWxWQvofgaMpbKQ==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/d3-path": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", @@ -8804,12 +8302,30 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/d3-quadtree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-1.0.7.tgz", + "integrity": "sha512-RKPAeXnkC59IDGD0Wu5mANy0Q2V28L+fNe65pOCXVdVuTJS3WPKaJlFHer32Rbh9gIo9qMuJXio8ra4+YmIymA==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/d3-require": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/d3-require/-/d3-require-1.3.0.tgz", "integrity": "sha512-XaNc2azaAwXhGjmCMtxlD+AowpMfLimVsAoTMpqrvb8CWoA4QqyV12mc4Ue6KSoDvfuS831tsumfhDYxGd4FGA==", "license": "ISC" }, + "node_modules/d3-sankey": { + "version": "0.12.3", + "resolved": "https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.12.3.tgz", + "integrity": "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "d3-array": "1 - 2", + "d3-shape": "^1.2.0" + } + }, "node_modules/d3-scale": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-1.0.7.tgz", @@ -8907,6 +8423,13 @@ "d3-timer": "1" } }, + "node_modules/d3-tile": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/d3-tile/-/d3-tile-1.0.0.tgz", + "integrity": "sha512-79fnTKpPMPDS5xQ0xuS9ir0165NEwwkFpe/DSOmc2Gl9ldYzKKRDWogmTTE8wAJ8NA7PMapNfEcyKhI9Lxdu5Q==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/d3-time": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-1.1.0.tgz", @@ -9498,6 +9021,19 @@ "node": ">=8" } }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/dojo": { "version": "1.17.3", "resolved": "https://registry.npmjs.org/dojo/-/dojo-1.17.3.tgz", @@ -9700,9 +9236,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.52", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.52.tgz", - "integrity": "sha512-xtoijJTZ+qeucLBDNztDOuQBE1ksqjvNjvqFoST3nGC7fSpqJ+X6BdTBaY5BHG+IhWWmpc6b/KfpeuEDupEPOQ==", + "version": "1.5.55", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.55.tgz", + "integrity": "sha512-6maZ2ASDOTBtjt9FhqYPRnbvKU5tjG0IN9SztUOWYw2AzNDNpKJYLJmlK0/En4Hs/aiWnB+JZ+gW19PIGszgKg==", "dev": true, "license": "ISC" }, @@ -10193,21 +9729,8 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "license": "Python-2.0" - }, - "node_modules/eslint/node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } + "dev": true, + "license": "Python-2.0" }, "node_modules/eslint/node_modules/js-yaml": { "version": "4.1.0", @@ -10218,8 +9741,8 @@ "dependencies": { "argparse": "^2.0.1" }, - "funding": { - "url": "https://opencollective.com/eslint" + "bin": { + "js-yaml": "bin/js-yaml.js" } }, "node_modules/eslint/node_modules/json-schema-traverse": { @@ -10782,9 +10305,9 @@ "license": "ISC" }, "node_modules/focus-trap": { - "version": "7.6.0", - "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.6.0.tgz", - "integrity": "sha512-1td0l3pMkWJLFipobUcGaf+5DTY4PLDDrcqoSaKP8ediO/CoWCCYk/fT/Y2A4e6TNB+Sh6clRJCjOPPnKoNHnQ==", + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.6.1.tgz", + "integrity": "sha512-nB8y4nQl8PshahLpGKZOq1sb0xrMVFSn6at7u/qOsBZTlZRzaapISGENcB6mOkoezbClZyiMwEF/dGY8AZ00rA==", "dev": true, "license": "MIT", "dependencies": { @@ -11470,19 +10993,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globals/node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, - "license": "(MIT OR CC0-1.0)", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/globalthis": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", @@ -13890,8 +13400,6 @@ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", "dev": true, "license": "MIT", - "optional": true, - "peer": true, "dependencies": { "js-tokens": "^3.0.0 || ^4.0.0" }, @@ -14782,14 +14290,14 @@ "license": "MIT" }, "node_modules/msw": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/msw/-/msw-2.6.0.tgz", - "integrity": "sha512-n3tx2w0MZ3H4pxY0ozrQ4sNPzK/dGtlr2cIIyuEsgq2Bhy4wvcW6ZH2w/gXM9+MEUY6HC1fWhqtcXDxVZr5Jxw==", + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/msw/-/msw-2.6.4.tgz", + "integrity": "sha512-Pm4LmWQeytDsNCR+A7gt39XAdtH6zQb6jnIKRig0FlvYOn8eksn3s1nXxUfz5KYUjbckof7Z4p2ewzgffPoCbg==", "dev": true, "hasInstallScript": true, "license": "MIT", "dependencies": { - "@bundled-es-modules/cookie": "^2.0.0", + "@bundled-es-modules/cookie": "^2.0.1", "@bundled-es-modules/statuses": "^1.0.1", "@bundled-es-modules/tough-cookie": "^0.1.6", "@inquirer/confirm": "^5.0.0", @@ -16365,9 +15873,9 @@ } }, "node_modules/nx": { - "version": "20.0.9", - "resolved": "https://registry.npmjs.org/nx/-/nx-20.0.9.tgz", - "integrity": "sha512-Asl7bg/Jp61FDqFrjXQpkIG/6lo3hpE+RfIldKV6dPxU3XjC4GyMHqRybEtzuIDiiUsvRvwovD4nSUUlBR6C/A==", + "version": "20.0.12", + "resolved": "https://registry.npmjs.org/nx/-/nx-20.0.12.tgz", + "integrity": "sha512-pQ7Rwb2Qlhr+fEamd0qc4VsL/aKjVJ0MXPsosuhdZobLJQOKHefe+nXSSZ1Jy19VM3RRpxUKFneD/V2jvs3qDA==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -16410,16 +15918,16 @@ "nx-cloud": "bin/nx-cloud.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "20.0.9", - "@nx/nx-darwin-x64": "20.0.9", - "@nx/nx-freebsd-x64": "20.0.9", - "@nx/nx-linux-arm-gnueabihf": "20.0.9", - "@nx/nx-linux-arm64-gnu": "20.0.9", - "@nx/nx-linux-arm64-musl": "20.0.9", - "@nx/nx-linux-x64-gnu": "20.0.9", - "@nx/nx-linux-x64-musl": "20.0.9", - "@nx/nx-win32-arm64-msvc": "20.0.9", - "@nx/nx-win32-x64-msvc": "20.0.9" + "@nx/nx-darwin-arm64": "20.0.12", + "@nx/nx-darwin-x64": "20.0.12", + "@nx/nx-freebsd-x64": "20.0.12", + "@nx/nx-linux-arm-gnueabihf": "20.0.12", + "@nx/nx-linux-arm64-gnu": "20.0.12", + "@nx/nx-linux-arm64-musl": "20.0.12", + "@nx/nx-linux-x64-gnu": "20.0.12", + "@nx/nx-linux-x64-musl": "20.0.12", + "@nx/nx-win32-arm64-msvc": "20.0.12", + "@nx/nx-win32-x64-msvc": "20.0.12" }, "peerDependencies": { "@swc-node/register": "^1.8.0", @@ -16484,9 +15992,9 @@ } }, "node_modules/object-inspect": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", "dev": true, "license": "MIT", "engines": { @@ -17227,9 +16735,9 @@ } }, "node_modules/postcss": { - "version": "8.4.47", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", - "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "version": "8.4.48", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.48.tgz", + "integrity": "sha512-GCRK8F6+Dl7xYniR5a4FYbpBzU8XnZVeowqsQFYdcXuSbChgiks7qybSkbvnaeqv0G0B+dd9/jJgH8kkLDQeEA==", "dev": true, "funding": [ { @@ -17248,7 +16756,7 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.1.0", + "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, "engines": { @@ -17462,10 +16970,13 @@ "license": "ISC" }, "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "license": "MIT" + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.10.0.tgz", + "integrity": "sha512-KSKHEbjAnpUuAUserOq0FxGXCUrzC3WniuSJhvdbs102rL55266ZcHBqLWOsG30spQMlPdpy7icATiAQehg/iA==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + } }, "node_modules/punycode": { "version": "2.3.1", @@ -17634,8 +17145,6 @@ "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", "dev": true, "license": "MIT", - "optional": true, - "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -17649,8 +17158,6 @@ "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "dev": true, "license": "MIT", - "optional": true, - "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -17659,18 +17166,6 @@ "react": "^18.3.1" } }, - "node_modules/react-dom/node_modules/scheduler": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", - "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", - "dev": true, - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "loose-envify": "^1.1.0" - } - }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -18264,9 +17759,9 @@ } }, "node_modules/rollup": { - "version": "4.24.4", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.4.tgz", - "integrity": "sha512-vGorVWIsWfX3xbcyAS+I047kFKapHYivmkaT63Smj77XwvLSJos6M1xGqZnBPFQFBRZDOcG1QnYEIxAvTr/HjA==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.25.0.tgz", + "integrity": "sha512-uVbClXmR6wvx5R1M3Od4utyLUxrmOcEm3pAtMphn73Apq19PDtHpgZoEvqH2YnnaNUuvKmg2DgRd2Sqv+odyqg==", "license": "MIT", "dependencies": { "@types/estree": "1.0.6" @@ -18279,24 +17774,24 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.24.4", - "@rollup/rollup-android-arm64": "4.24.4", - "@rollup/rollup-darwin-arm64": "4.24.4", - "@rollup/rollup-darwin-x64": "4.24.4", - "@rollup/rollup-freebsd-arm64": "4.24.4", - "@rollup/rollup-freebsd-x64": "4.24.4", - "@rollup/rollup-linux-arm-gnueabihf": "4.24.4", - "@rollup/rollup-linux-arm-musleabihf": "4.24.4", - "@rollup/rollup-linux-arm64-gnu": "4.24.4", - "@rollup/rollup-linux-arm64-musl": "4.24.4", - "@rollup/rollup-linux-powerpc64le-gnu": "4.24.4", - "@rollup/rollup-linux-riscv64-gnu": "4.24.4", - "@rollup/rollup-linux-s390x-gnu": "4.24.4", - "@rollup/rollup-linux-x64-gnu": "4.24.4", - "@rollup/rollup-linux-x64-musl": "4.24.4", - "@rollup/rollup-win32-arm64-msvc": "4.24.4", - "@rollup/rollup-win32-ia32-msvc": "4.24.4", - "@rollup/rollup-win32-x64-msvc": "4.24.4", + "@rollup/rollup-android-arm-eabi": "4.25.0", + "@rollup/rollup-android-arm64": "4.25.0", + "@rollup/rollup-darwin-arm64": "4.25.0", + "@rollup/rollup-darwin-x64": "4.25.0", + "@rollup/rollup-freebsd-arm64": "4.25.0", + "@rollup/rollup-freebsd-x64": "4.25.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.25.0", + "@rollup/rollup-linux-arm-musleabihf": "4.25.0", + "@rollup/rollup-linux-arm64-gnu": "4.25.0", + "@rollup/rollup-linux-arm64-musl": "4.25.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.25.0", + "@rollup/rollup-linux-riscv64-gnu": "4.25.0", + "@rollup/rollup-linux-s390x-gnu": "4.25.0", + "@rollup/rollup-linux-x64-gnu": "4.25.0", + "@rollup/rollup-linux-x64-musl": "4.25.0", + "@rollup/rollup-win32-arm64-msvc": "4.25.0", + "@rollup/rollup-win32-ia32-msvc": "4.25.0", + "@rollup/rollup-win32-x64-msvc": "4.25.0", "fsevents": "~2.3.2" } }, @@ -18469,6 +17964,16 @@ "node": ">=v12.22.7" } }, + "node_modules/scheduler": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0" + } + }, "node_modules/schema-utils": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", @@ -18866,6 +18371,51 @@ "npm": ">= 3.0.0" } }, + "node_modules/soap": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/soap/-/soap-1.1.5.tgz", + "integrity": "sha512-6YJrwY+tXHwlk/wtS7+XSc0jyEWgNw8xJQYvY9m1jZlPaGkc2nzmwKAq98fwGIw51acywhsraaeq/6GFggaNYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "axios": "^1.7.7", + "axios-ntlm": "^1.4.2", + "debug": "^4.3.6", + "formidable": "^3.5.1", + "get-stream": "^6.0.1", + "lodash": "^4.17.21", + "sax": "^1.4.1", + "strip-bom": "^3.0.0", + "whatwg-mimetype": "4.0.0", + "xml-crypto": "^6.0.0" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/soap/node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/soap/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/socks": { "version": "2.8.3", "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", @@ -19068,9 +18618,9 @@ } }, "node_modules/std-env": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", - "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", + "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==", "dev": true, "license": "MIT" }, @@ -20353,9 +19903,9 @@ } }, "node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "license": "(MIT OR CC0-1.0)", "engines": { @@ -20875,9 +20425,9 @@ } }, "node_modules/vite": { - "version": "5.4.10", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.10.tgz", - "integrity": "sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==", + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", "dev": true, "license": "MIT", "dependencies": { @@ -21160,20 +20710,19 @@ "license": "BSD-2-Clause" }, "node_modules/webpack": { - "version": "5.96.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.96.1.tgz", - "integrity": "sha512-l2LlBSvVZGhL4ZrPwyr8+37AunkcYj5qh8o6u2/2rzoPc8gxFJkLj1WxNgooi9pnoc06jh0BjuXnamM4qlujZA==", + "version": "5.95.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", + "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { - "@types/eslint-scope": "^3.7.7", - "@types/estree": "^1.0.6", + "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", "@webassemblyjs/wasm-edit": "^1.12.1", "@webassemblyjs/wasm-parser": "^1.12.1", - "acorn": "^8.14.0", - "browserslist": "^4.24.0", + "acorn": "^8.7.1", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", @@ -21304,7 +20853,6 @@ "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "license": "BSD-2-Clause", - "peer": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -21319,7 +20867,6 @@ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true, "license": "BSD-2-Clause", - "peer": true, "engines": { "node": ">=4.0" } @@ -21329,8 +20876,7 @@ "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/whatwg-encoding": { "version": "3.1.1", @@ -22028,19 +21574,6 @@ "typescript-formatter": "^7.2.2" } }, - "packages/comms/node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "packages/comms/node_modules/node-fetch": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", @@ -22059,38 +21592,6 @@ "url": "https://opencollective.com/node-fetch" } }, - "packages/comms/node_modules/soap": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/soap/-/soap-1.1.5.tgz", - "integrity": "sha512-6YJrwY+tXHwlk/wtS7+XSc0jyEWgNw8xJQYvY9m1jZlPaGkc2nzmwKAq98fwGIw51acywhsraaeq/6GFggaNYw==", - "dev": true, - "license": "MIT", - "dependencies": { - "axios": "^1.7.7", - "axios-ntlm": "^1.4.2", - "debug": "^4.3.6", - "formidable": "^3.5.1", - "get-stream": "^6.0.1", - "lodash": "^4.17.21", - "sax": "^1.4.1", - "strip-bom": "^3.0.0", - "whatwg-mimetype": "4.0.0", - "xml-crypto": "^6.0.0" - }, - "engines": { - "node": ">=14.0.0" - } - }, - "packages/comms/node_modules/strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4" - } - }, "packages/dataflow": { "name": "@hpcc-js/dataflow", "version": "9.1.0", @@ -22140,84 +21641,6 @@ "webpack-hasjs-plugin": "1.0.4" } }, - "packages/dgrid-shim/node_modules/eslint-scope": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", - "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", - "dev": true, - "license": "BSD-2-Clause", - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^4.1.1" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "packages/dgrid-shim/node_modules/estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "packages/dgrid-shim/node_modules/json-parse-even-better-errors": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true, - "license": "MIT" - }, - "packages/dgrid-shim/node_modules/webpack": { - "version": "5.95.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", - "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.5", - "@webassemblyjs/ast": "^1.12.1", - "@webassemblyjs/wasm-edit": "^1.12.1", - "@webassemblyjs/wasm-parser": "^1.12.1", - "acorn": "^8.7.1", - "acorn-import-attributes": "^1.9.5", - "browserslist": "^4.21.10", - "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.17.1", - "es-module-lexer": "^1.2.1", - "eslint-scope": "5.1.1", - "events": "^3.2.0", - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.11", - "json-parse-even-better-errors": "^2.3.1", - "loader-runner": "^4.2.0", - "mime-types": "^2.1.27", - "neo-async": "^2.6.2", - "schema-utils": "^3.2.0", - "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.10", - "watchpack": "^2.4.1", - "webpack-sources": "^3.2.3" - }, - "bin": { - "webpack": "bin/webpack.js" - }, - "engines": { - "node": ">=10.13.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/webpack" - }, - "peerDependenciesMeta": { - "webpack-cli": { - "optional": true - } - } - }, "packages/esbuild-plugins": { "name": "@hpcc-js/esbuild-plugins", "version": "1.2.0", @@ -22640,52 +22063,47 @@ }, "packages/graph": { "name": "@hpcc-js/graph", - "version": "2.87.0", - "extraneous": true, + "version": "3.0.0", "license": "Apache-2.0", "dependencies": { - "@hpcc-js/api": "^2.14.0", - "@hpcc-js/common": "^2.73.0", - "@hpcc-js/html": "^2.44.0", - "@hpcc-js/react": "^2.55.0", - "@hpcc-js/util": "^2.53.0" + "@hpcc-js/api": "^3.1.0", + "@hpcc-js/common": "^3.1.0", + "@hpcc-js/html": "^3.0.0", + "@hpcc-js/react": "^3.0.0", + "@hpcc-js/util": "^3.1.0" }, "devDependencies": { - "@hpcc-js/bundle": "^2.12.0", - "@hpcc-js/wasm-graphviz": "1.5.0", - "@types/d3-transition": "1.3.5", - "@types/dagre": "0.7.52", - "d3-array": "^1", - "d3-drag": "^1", + "@dagrejs/dagre": "1.1.4", + "@hpcc-js/esbuild-plugins": "^1.2.0", + "@hpcc-js/wasm-graphviz": "1.6.1", + "@types/d3-transition": "1.3.6", "d3-force": "^1", "d3-geo": "^1", "d3-interpolate-path": "2.3.0", "d3-sankey": "^0", - "d3-scale": "^1", - "d3-selection": "^1", "d3-shape": "^1", "d3-tile": "^1", "d3-transition": "^1", - "dagre": "0.8.5", - "es6-promise": "4.2.8", - "tslib": "2.7.0" + "react": "18.3.1", + "react-dom": "18.3.1" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" } }, "packages/html": { "name": "@hpcc-js/html", - "version": "2.44.0", - "extraneous": true, + "version": "3.0.0", "license": "Apache-2.0", "dependencies": { - "@hpcc-js/common": "^2.73.0", - "@hpcc-js/preact-shim": "^2.18.0", - "@hpcc-js/util": "^2.53.0" + "@hpcc-js/common": "^3.1.0", + "@hpcc-js/util": "^3.1.0" }, "devDependencies": { - "@hpcc-js/bundle": "^2.12.0", + "@hpcc-js/esbuild-plugins": "^1.2.0", "d3-format": "^1", - "d3-selection": "^1", - "tslib": "2.7.0" + "d3-selection": "^1" } }, "packages/markdown-it-plugins": { @@ -22808,28 +22226,28 @@ }, "packages/preact-shim": { "name": "@hpcc-js/preact-shim", - "version": "2.18.0", - "extraneous": true, + "version": "3.0.0", "license": "Apache-2.0", - "dependencies": { - "preact": "10.24.0" - }, "devDependencies": { - "@hpcc-js/bundle": "^2.12.0" + "@hpcc-js/esbuild-plugins": "^1.2.0", + "preact": "10.24.3" } }, "packages/react": { "name": "@hpcc-js/react", - "version": "2.55.0", - "extraneous": true, + "version": "3.0.0", "license": "Apache-2.0", "dependencies": { - "@hpcc-js/common": "^2.73.0", - "@hpcc-js/preact-shim": "^2.18.0" + "@hpcc-js/common": "^3.1.0" }, "devDependencies": { - "@hpcc-js/bundle": "^2.12.0", - "tslib": "2.7.0" + "@hpcc-js/esbuild-plugins": "^1.2.0", + "react": "18.3.1", + "react-dom": "18.3.1" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" } }, "packages/util": { diff --git a/package.json b/package.json index 220ca3a441..d7677ed01e 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,8 @@ "xpackages/eclwatch", "packages/esbuild-plugins", "xpackages/form", - "xpackages/graph", - "xpackages/html", + "packages/graph", + "packages/html", "xpackages/layout", "xpackages/leaflet-shim", "xpackages/loader", @@ -38,8 +38,8 @@ "xpackages/other", "packages/phosphor", "packages/phosphor-shim", - "xpackages/preact-shim", - "xpackages/react", + "packages/preact-shim", + "packages/react", "xpackages/requirejs-shim", "xpackages/timeline", "xpackages/tree", diff --git a/packages/common/tests/coreTests.ts b/packages/common/tests/coreTests.ts index 6aafc4e637..7e022193f0 100644 --- a/packages/common/tests/coreTests.ts +++ b/packages/common/tests/coreTests.ts @@ -15,17 +15,13 @@ export function classDef(module: string, WidgetClass: { new(): while (constructorName.length && constructorName[0] === "_") { constructorName = constructorName.substr(1); } - // Remove any trailing numerics - while (constructorName.length && !isNaN(parseInt(constructorName[constructorName.length - 1], 10))) { - constructorName = constructorName.substr(0, constructorName.length - 1); - } const widget = new WidgetClass(); const classID = widget.classID(); if (classID.indexOf(".") >= 0) { - expect(classID.indexOf(`${module}_`), `Correct module: ${module}`).to.equal(0); - expect(classID.indexOf(`.${constructorName}`), `Correct constructorName: ${constructorName}`).to.equal(classID.length - constructorName.length - 1); + expect(classID.indexOf(`${module}_`), `Incorrect module: ${module}`).to.equal(0); + expect(classID.indexOf(`.${constructorName}`), `Incorrect constructorName: ${constructorName}`).to.equal(classID.length - constructorName.length - 1); } else { - expect(`${module}_${constructorName}` === classID, `Correct classID: ${module}_${constructorName} === ${classID}`).to.be.true; + expect(`${module}_${constructorName}` === classID, `Incorrect classID: ${module}_${constructorName} === ${classID}`).to.be.true; } }); }); diff --git a/packages/graph/.vscode/launch.json b/packages/graph/.vscode/launch.json index 49992c3d58..7c2436335f 100644 --- a/packages/graph/.vscode/launch.json +++ b/packages/graph/.vscode/launch.json @@ -1,52 +1,47 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { - "name": "Dev", + "name": "test-browser", "type": "msedge", "request": "launch", - "url": "file:///${workspaceRoot}/index.html", - "runtimeArgs": [ - "--allow-file-access-from-files", - "--disable-web-security" + "url": "http://localhost:8888", + "webRoot": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" ], - "webRoot": "${workspaceRoot}" }, { - "name": "lws", - "type": "msedge", + "name": "test-node", + "type": "node", "request": "launch", - "url": "http://localhost:8080/../packages/graph/index.html", "runtimeArgs": [ - "--allow-file-access-from-files", - "--disable-web-security" + "run-script", + "test-node" ], - "webRoot": "${workspaceRoot}" - }, - { - "type": "msedge", - "request": "launch", - "name": "index.md", - "url": "${workspaceFolder}/../../website/index.html?debug=1#packages/graph/docs/index.md", - "runtimeArgs": [ - "--allow-file-access-from-files", - "--disable-web-security" + "runtimeExecutable": "npm", + "skipFiles": [ + "/**" + ], + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" ], - "webRoot": "${workspaceFolder}/../../website" }, { - "type": "msedge", + "name": "index.html", "request": "launch", - "name": "http index.md", - "url": "http://localhost:8080/${workspaceFolder}/../../website/index.html?debug=1#packages/graph/docs/index.md", + "type": "msedge", + "url": "file:///${workspaceFolder}/index.html", "runtimeArgs": [ - "--allow-file-access-from-files", "--disable-web-security" ], - "webRoot": "${workspaceFolder}/../../website" + "webRoot": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ] } ] } \ No newline at end of file diff --git a/packages/graph/.vscode/tasks.json b/packages/graph/.vscode/tasks.json index 79e20d2523..120545d06c 100644 --- a/packages/graph/.vscode/tasks.json +++ b/packages/graph/.vscode/tasks.json @@ -2,9 +2,9 @@ "version": "2.0.0", "tasks": [ { - "label": "es6 watch", + "label": "gen-types-watch", "type": "npm", - "script": "compile-es6-watch", + "script": "gen-types-watch", "problemMatcher": [ "$tsc-watch" ], @@ -13,18 +13,7 @@ } }, { - "label": "umd watch", - "type": "npm", - "script": "compile-umd-watch", - "problemMatcher": [ - "$tsc-watch" - ], - "presentation": { - "group": "group-build" - } - }, - { - "label": "bundle watch", + "label": "bundle-watch", "type": "npm", "script": "bundle-watch", "problemMatcher": [], @@ -35,15 +24,13 @@ { "label": "build", "dependsOn": [ - "es6 watch", - "umd watch", - "bundle watch" + "gen-types-watch", + "bundle-watch", ], "group": { "kind": "build", "isDefault": true - }, - "problemMatcher": [] + } } ] } \ No newline at end of file diff --git a/packages/graph/esbuild.js b/packages/graph/esbuild.js new file mode 100644 index 0000000000..b3dcf1d43b --- /dev/null +++ b/packages/graph/esbuild.js @@ -0,0 +1,30 @@ +import { browserTpl } from "@hpcc-js/esbuild-plugins"; +import pkg from "./package.json" with { type: "json" }; + +// config --- +await Promise.all([ + browserTpl("src/index.ts", "dist/index", { + keepNames: true, + alias: { + "d3-array": "@hpcc-js/common", + "d3-brush": "@hpcc-js/common", + "d3-collection": "@hpcc-js/common", + "d3-color": "@hpcc-js/common", + "d3-dispatch": "@hpcc-js/common", + "d3-drag": "@hpcc-js/common", + "d3-dsv": "@hpcc-js/common", + "d3-ease": "@hpcc-js/common", + "d3-format": "@hpcc-js/common", + "d3-interpolate": "@hpcc-js/common", + "d3-scale": "@hpcc-js/common", + "d3-selection": "@hpcc-js/common", + "d3-time-format": "@hpcc-js/common", + "d3-transition": "@hpcc-js/common", + "d3-zoom": "@hpcc-js/common" + }, + external: [ + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.peerDependencies), + ] + }) +]); diff --git a/packages/graph/index.html b/packages/graph/index.html index fd5304ad2d..806b8644c8 100644 --- a/packages/graph/index.html +++ b/packages/graph/index.html @@ -2,62 +2,149 @@ - - @hpcc-js/graph - - - + h1 { + text-align: center; + margin-top: 50px; + } - + + + + + + + + -
-
- +
+ + diff --git a/packages/graph/package.json b/packages/graph/package.json index cc81ae525e..ae9a494eb4 100644 --- a/packages/graph/package.json +++ b/packages/graph/package.json @@ -1,81 +1,64 @@ { "name": "@hpcc-js/graph", - "version": "2.87.0", + "version": "3.0.0", "description": "hpcc-js - Viz Graph", - "main": "dist/index.js", - "module": "dist/index.es6", - "unpkg": "dist/index.min.js", - "jsdelivr": "dist/index.min.js", - "types": "types/index.d.ts", - "typesVersions": { - "<3.8": { - "*": [ - "types-3.4/index.d.ts" - ] + "type": "module", + "exports": { + ".": { + "types": "./types/index.d.ts", + "default": "./dist/index.js" } }, + "module": "./dist/index.js", + "browser": "./dist/index.js", + "types": "./types/index.d.ts", "files": [ "dist/*", - "types/*", - "types-3.4/*", - "src/*" + "src/*", + "types/*" ], "scripts": { - "clean": "rimraf --glob lib* types dist *.tsbuildinfo workers/lib-* workers/dist workers/types workers/*.tsbuildinfo", - "compile-es6": "tsc --module es6 --outDir ./lib-es6", - "compile-es6-watch": "npm run compile-es6 -- -w", - "compile-umd": "tsc --module umd --outDir ./lib-umd", - "compile-umd-watch": "npm run compile-umd -- -w", - "compile-workers": "tsc --project ./workers/tsconfig.json", - "bundle": "rollup -c", - "bundle-workers": "rollup -c ./workers/rollup.config.js", - "bundle-watch": "npm run bundle -- -w", - "minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js", - "minimize-workers-forceDirected": "terser workers/dist/forceDirected.js -c -m -o workers/dist/forceDirected.min.js", - "minimize-workers-dagre": "terser workers/dist/dagre.js -c -m -o workers/dist/dagre.min.js", - "minimize-workers-graphviz": "terser workers/dist/graphviz.js -c -m -o workers/dist/graphviz.min.js", - "minimize-workers": "run-p minimize-workers-forceDirected minimize-workers-dagre minimize-workers-graphviz", - "wrap-workers-forceDirected": "node util/wrapWorker.js forceDirected", - "wrap-workers-dagre": "node util/wrapWorker.js dagre", - "wrap-workers-graphviz": "node util/wrapWorker.js graphviz", - "wrap-workers": "run-p wrap-workers-forceDirected wrap-workers-dagre wrap-workers-graphviz", - "build-workers": "run-s compile-workers bundle-workers minimize-workers wrap-workers", - "build-package": "npm run compile-es6 && npm run bundle", - "gen-legacy-types": "downlevel-dts ./types ./types-3.4", - "build": "run-s build-workers build-package", - "watch": "npm-run-all compile-es6 -p compile-es6-watch bundle-watch", + "clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo", + "bundle": "node esbuild.js", + "bundle-watch": "npm run bundle -- --development --watch", + "gen-types": "tsc --project tsconfig.json", + "gen-types-watch": "npm run gen-types -- --watch", + "build": "run-p gen-types bundle", "stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js", "lint": "eslint ./src", + "lint-fix": "eslint --fix src/**/*.ts", "docs": "typedoc --options tdoptions.json .", - "ddd": "downlevel-dts . ts3.4", - "update": "npx --yes npm-check-updates -u -t minor" + "test-browser": "vitest run --project browser", + "test": "vitest run", + "coverage": "vitest run --coverage", + "update": "npx --yes npm-check-updates -u -t minor", + "update-major": "npx --yes npm-check-updates -u" }, "dependencies": { - "@hpcc-js/api": "^2.14.0", - "@hpcc-js/common": "^2.73.0", - "@hpcc-js/html": "^2.44.0", - "@hpcc-js/react": "^2.55.0", - "@hpcc-js/util": "^2.53.0" + "@hpcc-js/api": "^3.1.0", + "@hpcc-js/common": "^3.1.0", + "@hpcc-js/html": "^3.0.0", + "@hpcc-js/react": "^3.0.0", + "@hpcc-js/util": "^3.1.0" }, "devDependencies": { - "@hpcc-js/bundle": "^2.12.0", - "@hpcc-js/wasm-graphviz": "1.5.0", - "@types/d3-transition": "1.3.5", - "@types/dagre": "0.7.52", - "d3-array": "^1", - "d3-drag": "^1", + "@hpcc-js/esbuild-plugins": "^1.2.0", + "@hpcc-js/wasm-graphviz": "1.6.1", + "@dagrejs/dagre": "1.1.4", + "@types/d3-transition": "1.3.6", "d3-force": "^1", "d3-geo": "^1", "d3-interpolate-path": "2.3.0", "d3-sankey": "^0", - "d3-scale": "^1", - "d3-selection": "^1", "d3-shape": "^1", "d3-tile": "^1", "d3-transition": "^1", - "dagre": "0.8.5", - "es6-promise": "4.2.8", - "tslib": "2.7.0" + "react": "18.3.1", + "react-dom": "18.3.1" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" }, "repository": { "type": "git", diff --git a/packages/graph/rollup.config.mjs b/packages/graph/rollup.config.mjs deleted file mode 100644 index 0afe4cdffc..0000000000 --- a/packages/graph/rollup.config.mjs +++ /dev/null @@ -1,59 +0,0 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ -import { external, globals } from "@hpcc-js/bundle"; -import alias from "@rollup/plugin-alias"; -import commonjs from "@rollup/plugin-commonjs"; -import sourcemaps from "rollup-plugin-sourcemaps"; -import nodeResolve from "@rollup/plugin-node-resolve"; -import postcss from "rollup-plugin-postcss"; - -import pkg from "./package.json" with { type: "json" }; - -export default { - input: "lib-es6/index", - external: external, - output: [{ - file: pkg.main, - format: "umd", - sourcemap: true, - globals: globals, - name: pkg.name - }, { - file: pkg.module + ".js", - format: "es", - sourcemap: true, - globals: globals, - name: pkg.name - }], - plugins: [ - alias({ - entries: [ - { find: "d3-array", replacement: "@hpcc-js/common" }, - { find: "d3-brush", replacement: "@hpcc-js/common" }, - { find: "d3-collection", replacement: "@hpcc-js/common" }, - { find: "d3-color", replacement: "@hpcc-js/common" }, - { find: "d3-dispatch", replacement: "@hpcc-js/common" }, - { find: "d3-drag", replacement: "@hpcc-js/common" }, - { find: "d3-dsv", replacement: "@hpcc-js/common" }, - { find: "d3-ease", replacement: "@hpcc-js/common" }, - { find: "d3-format", replacement: "@hpcc-js/common" }, - { find: "d3-interpolate", replacement: "@hpcc-js/common" }, - { find: "d3-scale", replacement: "@hpcc-js/common" }, - { find: "d3-selection", replacement: "@hpcc-js/common" }, - { find: "d3-time-format", replacement: "@hpcc-js/common" }, - { find: "d3-transition", replacement: "@hpcc-js/common" }, - { find: "d3-zoom", replacement: "@hpcc-js/common" } - ] - }), - nodeResolve({ - preferBuiltins: true - }), - commonjs({ - ignoreTryCatch: false - }), - sourcemaps(), - postcss({ - extensions: [".css"], - minimize: true - }) - ] -}; \ No newline at end of file diff --git a/packages/graph/src/AdjacencyGraph.ts b/packages/graph/src/AdjacencyGraph.ts index 48bac31bd2..75cc365358 100644 --- a/packages/graph/src/AdjacencyGraph.ts +++ b/packages/graph/src/AdjacencyGraph.ts @@ -1,8 +1,8 @@ import { PropertyExt } from "@hpcc-js/common"; import { hashSum } from "@hpcc-js/util"; -import { Edge } from "./Edge"; -import { Graph, IGraphData } from "./Graph"; -import { IAnnotation, Vertex } from "./Vertex"; +import { Edge } from "./Edge.ts"; +import { Graph, IGraphData } from "./Graph.ts"; +import { IAnnotation, Vertex } from "./Vertex.ts"; interface IAnnotationIndexes { iconCol: number; diff --git a/packages/graph/src/Graph.ts b/packages/graph/src/Graph.ts index 26e286f831..e1679887d3 100644 --- a/packages/graph/src/Graph.ts +++ b/packages/graph/src/Graph.ts @@ -2,11 +2,11 @@ import { d3Event, drag as d3Drag, ISize, Platform, select as d3Select, Spacer, SVGGlowFilter, SVGZoomWidget, ToggleButton, Utility, Widget } from "@hpcc-js/common"; import "d3-transition"; -import { Edge } from "./Edge"; -import { GraphData } from "./GraphData"; -import * as GraphLayouts from "./GraphLayouts"; -import { Subgraph } from "./Subgraph"; -import { Vertex } from "./Vertex"; +import { Edge } from "./Edge.ts"; +import { GraphData } from "./GraphData.ts"; +import * as GraphLayouts from "./GraphLayouts.ts"; +import { Subgraph } from "./Subgraph.ts"; +import { Vertex } from "./Vertex.ts"; import "../src/Graph.css"; @@ -105,7 +105,7 @@ export class Graph extends SVGZoomWidget { size(): ISize; size(_): this; size(_?): ISize | this { - const retVal = super.size.apply(this, arguments); + const retVal = super.size.apply(this, arguments as any); return retVal; } @@ -117,7 +117,7 @@ export class Graph extends SVGZoomWidget { data(): IGraphData; data(_: IGraphData, merge?: boolean): this; data(_?: IGraphData, merge?: boolean): IGraphData | this { - const retVal = super.data.apply(this, arguments); + const retVal = super.data.apply(this, arguments as any); if (arguments.length) { if (!merge) { this._graphData = new GraphData(); @@ -283,7 +283,7 @@ export class Graph extends SVGZoomWidget { this._neighborOffsets = []; if (Platform.svgMarkerGlitch) { - this._graphData.nodeEdges(d.id()).forEach(function (id) { + this._graphData.nodeEdges(d.id()).forEach(function (this, id) { const edge = this._graphData.edge(id); this._popMarkers(edge.element()); }); @@ -639,7 +639,7 @@ export class Graph extends SVGZoomWidget { } const context = this; - const layoutEngine = this.getLayoutEngine(); + const layoutEngine = this.getLayoutEngine() as GraphLayouts.ForceDirected; if (this.layout() === "ForceDirected2") { this.forceLayout = layoutEngine; this.forceLayout.force @@ -964,15 +964,6 @@ export class Graph extends SVGZoomWidget { ; } - // IGraph --- - edge_click: (_row, _col, _sel, _more) => void; - edge_dblclick: (_row, _col, _sel, _more) => void; - - // ITooltip --- - tooltip; - tooltipHTML: (_) => string; - tooltipFormat: (_) => string; - // Progess Events --- progress(what: "start" | "end" | "layout-start" | "layout-tick" | "layout-end") { } @@ -988,7 +979,8 @@ export interface Graph { dragSingleNeighbors(_: boolean): this; layout(): GraphLayoutType; layout(_: GraphLayoutType): this; - // scale: { (): string; (_: string): this; }; + // scale(): string; + // scale(_: string): this; applyScaleOnLayout(): boolean; applyScaleOnLayout(_: boolean): this; highlightOnMouseOverVertex(): boolean; @@ -1034,6 +1026,15 @@ export interface Graph { forceDirectedTheta(_: number): this; forceDirectedGravity(): number; forceDirectedGravity(_: number): this; + + // IGraph --- + edge_click(_row, _col, _sel, _more): void; + edge_dblclick(_row, _col, _sel, _more): void; + + // ITooltip --- + tooltip; + tooltipHTML(_): string; + tooltipFormat(_): string; } Graph.prototype.publish("allowDragging", true, "boolean", "Allow Dragging of Vertices", null, { tags: ["Advanced"] }); @@ -1066,8 +1067,9 @@ Graph.prototype.publish("forceDirectedTheta", 0.8, "number", "Barnes–Hut appro Graph.prototype.publish("forceDirectedGravity", 0.1, "number", "Gravitational strength", null, { tags: ["Advanced"] }); const _origScale = Graph.prototype.scale; +//@ts-ignore Graph.prototype.scale = function (_?, transitionDuration?) { - const retVal = _origScale.apply(this, arguments); + const retVal = _origScale.apply(this, arguments as any); if (arguments.length) { this.zoomTo(_, transitionDuration); } diff --git a/packages/graph/src/GraphData.ts b/packages/graph/src/GraphData.ts index 18dfb0649f..88d34af36a 100644 --- a/packages/graph/src/GraphData.ts +++ b/packages/graph/src/GraphData.ts @@ -1,5 +1,5 @@ -import { Edge as GLEdge, GraphEdge, graphlib, Node } from "dagre"; -import { Vertex } from "./Vertex"; +import { Edge as GLEdge, GraphEdge, graphlib, Node } from "@dagrejs/dagre"; +import { Vertex } from "./Vertex.ts"; type GLNode = Node; @@ -40,9 +40,9 @@ export class GraphData { } eachNode(callback) { - this._g.nodes().forEach(function (item) { + this._g.nodes().forEach(item => { callback(item, this.node(item)); - }, this); + }); } private filterEdges(pred): GLEdge[] { @@ -56,9 +56,9 @@ export class GraphData { } eachEdge(callback) { - this._g.edges().forEach(function (item) { + this._g.edges().forEach(item => { callback(item, item.v, item.w, this.edge(item)); - }, this); + }); } setData(subgraphs, vertices, edges, hierarchy, merge) { diff --git a/packages/graph/src/GraphLayouts.ts b/packages/graph/src/GraphLayouts.ts index ef25051aec..279941594e 100644 --- a/packages/graph/src/GraphLayouts.ts +++ b/packages/graph/src/GraphLayouts.ts @@ -1,173 +1,214 @@ import { forceCenter as d3ForceCenter, forceLink as d3ForceLink, forceManyBody as d3ForceManyBody, forceSimulation as d3ForceSimulation } from "d3-force"; -import { GraphLabel, graphlib, layout } from "dagre"; -import { GraphData } from "./GraphData"; - -export function Circle(graphData: GraphData, width?, height?, radius?) { - const context = this; - this.pos = {}; - - // Initial Positions --- - const padding = 0; - radius = radius || (width < height ? width - padding : height - padding) / 2; - const order = graphData.nodeCount(); - let currStep = -Math.PI / 2; - const step = 2 * Math.PI / order; - graphData.eachNode(function (u, value) { - const size = value.getBBox(); - const maxSize = 0; // Math.max(size.width, size.height); - context.pos[u] = { - x: value.fixed ? value.x : width / 2 + Math.cos(currStep) * (radius - maxSize), - y: value.fixed ? value.y : height / 2 + Math.sin(currStep) * (radius - maxSize), - width: size.width, - height: size.height - }; - currStep += step; - }); +import { GraphLabel, graphlib, layout } from "@dagrejs/dagre"; +import { GraphData } from "./GraphData.ts"; + +interface Pos { + x?: number; + y?: number; + width?: number; + height?: number; +} + +export class Circle { + + protected pos: { [id: string]: Pos } = {}; + + constructor(graphData: GraphData, width?, height?, radius?) { + const context = this; + this.pos = {}; + + // Initial Positions --- + const padding = 0; + radius = radius || (width < height ? width - padding : height - padding) / 2; + const order = graphData.nodeCount(); + let currStep = -Math.PI / 2; + const step = 2 * Math.PI / order; + graphData.eachNode(function (u, value) { + const size = value.getBBox(); + const maxSize = 0; // Math.max(size.width, size.height); + context.pos[u] = { + x: value.fixed ? value.x : width / 2 + Math.cos(currStep) * (radius - maxSize), + y: value.fixed ? value.y : height / 2 + Math.sin(currStep) * (radius - maxSize), + width: size.width, + height: size.height + }; + currStep += step; + }); + } + + nodePos(u) { + return this.pos[u]; + } + + edgePoints(_e) { + return []; + } + } -Circle.prototype.nodePos = function (u) { - return this.pos[u]; -}; -Circle.prototype.edgePoints = function (_e) { - return []; -}; - -export function None(graphData: GraphData, _width, _height, _radius) { - const context = this; - this.pos = {}; - - graphData.eachNode(function (u, value) { - context.pos[u] = { - x: value.x, - y: value.y, - width: value.width, - height: value.height - }; - }); + +export class None { + + protected pos: { [id: string]: Pos } = {}; + + constructor(graphData: GraphData, _width, _height, _radius) { + const context = this; + this.pos = {}; + + graphData.eachNode(function (u, value) { + context.pos[u] = { + x: value.x, + y: value.y, + width: value.width, + height: value.height + }; + }); + } + + nodePos(u) { + return this.pos[u]; + } + + edgePoints(_e) { + return []; + } } -None.prototype.nodePos = function (u) { - return this.pos[u]; -}; -None.prototype.edgePoints = function (_e) { - return []; -}; - -export function ForceDirected(graphData: GraphData, width, height, options) { - options = options || {}; - const context = this; - this.pos = {}; - - this.vertices = []; - this.vertexMap = {}; - graphData.eachNode(function (u) { - const vertex = graphData.node(u); - const size = vertex.getBBox(); - const newItem = { - id: u, - x: vertex.pos().x, - y: vertex.pos().y, - width: size.width, - height: size.height, - value: vertex - }; - context.vertices.push(newItem); - context.vertexMap[u] = newItem; - }); - this.edges = []; - graphData.eachEdge(function (_e, s, t) { - context.edges.push({ - source: s, - target: t + +export class ForceDirected { + + protected pos: { [id: string]: Pos } = {}; + vertices: any[] = []; + protected vertexMap: { [id: string]: any } = {}; + protected edges: any[] = []; + protected force: any; + + constructor(graphData: GraphData, width, height, options) { + options = options || {}; + this.pos = {}; + this.vertices = []; + this.vertexMap = {}; + + graphData.eachNode(u => { + const vertex = graphData.node(u); + const size = vertex.getBBox(); + const newItem = { + id: u, + x: vertex.pos().x, + y: vertex.pos().y, + width: size.width, + height: size.height, + value: vertex + }; + this.vertices.push(newItem); + this.vertexMap[u] = newItem; }); - }); - const forceLink = d3ForceLink() - .id(function (d: any) { - return d.id; - }) - .distance(options.linkDistance) - .strength(options.linkStrength) - ; - const forceManyBody = d3ForceManyBody() - .strength(function (d: any) { - const cs = d.value.getBBox(); - return options.charge * Math.max(cs.width, cs.height); - }) - ; - this.force = d3ForceSimulation() - .force("link", forceLink) - .force("charge", forceManyBody) - .force("center", d3ForceCenter(width / 2, height / 2)) - .velocityDecay(options.oneShot ? 0.1 : options.friction) - .nodes(this.vertices) - ; - forceLink - .links(this.edges) - ; - - if (options.oneShot) { - this.force.restart(); - let total = graphData.nodeCount(); - total = Math.min(total * total, 500); - for (let i = 0; i < total; ++i) { - this.force.tick(); + this.edges = []; + graphData.eachEdge((_e, s, t) => { + this.edges.push({ + source: s, + target: t + }); + }); + const forceLink = d3ForceLink() + .id(function (d: any) { + return d.id; + }) + .distance(options.linkDistance) + .strength(options.linkStrength) + ; + const forceManyBody = d3ForceManyBody() + .strength(function (d: any) { + const cs = d.value.getBBox(); + return options.charge * Math.max(cs.width, cs.height); + }) + ; + this.force = d3ForceSimulation() + .force("link", forceLink) + .force("charge", forceManyBody) + .force("center", d3ForceCenter(width / 2, height / 2)) + .velocityDecay(options.oneShot ? 0.1 : options.friction) + .nodes(this.vertices) + ; + forceLink + .links(this.edges) + ; + + if (options.oneShot) { + this.force.restart(); + let total = graphData.nodeCount(); + total = Math.min(total * total, 500); + for (let i = 0; i < total; ++i) { + this.force.tick(); + } + this.force.stop(); } - this.force.stop(); + } + + nodePos(u) { + return this.vertexMap[u]; + } + + edgePoints(_e) { + return []; } } -ForceDirected.prototype.nodePos = function (u) { - return this.vertexMap[u]; -}; -ForceDirected.prototype.edgePoints = function (_e) { - return []; -}; - -export function Hierarchy(graphData: GraphData, _width, _height, options) { - const digraph = new graphlib.Graph({ multigraph: true, compound: true }) - .setGraph(options) - .setDefaultNodeLabel(function () { return {}; }) - .setDefaultEdgeLabel(function () { return {}; }) - ; - graphData.eachNode(function (u) { - const value = graphData.node(u); - const clientSize = value.getBBox(); - digraph.setNode(u, { - width: clientSize.width, - height: clientSize.height + +export class Hierarchy { + + protected digraph: any; + protected dagreLayout: any; + + constructor(graphData: GraphData, _width, _height, options) { + this.digraph = new graphlib.Graph({ multigraph: true, compound: true }) + .setGraph(options) + .setDefaultNodeLabel(function () { return {}; }) + .setDefaultEdgeLabel(function () { return {}; }) + ; + graphData.eachNode(u => { + const value = graphData.node(u); + const clientSize = value.getBBox(); + this.digraph.setNode(u, { + width: clientSize.width, + height: clientSize.height + }); }); - }); - graphData.eachEdge(function (e, s, t) { - const value = graphData.edge(e); - digraph.setEdge(s, t, { - weight: value.weight() - }, value._id); - if (!options.digraph) { - digraph.setEdge(t, s, { + graphData.eachEdge((e, s, t) => { + const value = graphData.edge(e); + this.digraph.setEdge(s, t, { weight: value.weight() }, value._id); - } - }); - graphData.eachNode(function (u) { - digraph.setParent(u, graphData.parent(u)); - }); - this.dagreLayout = layout(digraph, { debugTiming: false } as GraphLabel); - const deltaX = -digraph.graph().width / 2; - const deltaY = -digraph.graph().height / 2; - digraph.nodes().forEach(function (u) { - const value = digraph.node(u); - value.x += deltaX + _width / 2; - value.y += deltaY + _height / 2; - }); - digraph.edges().forEach(function (e) { - const value = digraph.edge(e); - for (let i = 0; i < value.points.length; ++i) { - value.points[i].x += deltaX + _width / 2; - value.points[i].y += deltaY + _height / 2; - } - }); - this.digraph = digraph; + if (!options.digraph) { + this.digraph.setEdge(t, s, { + weight: value.weight() + }, value._id); + } + }); + graphData.eachNode(u => { + this.digraph.setParent(u, graphData.parent(u)); + }); + + this.dagreLayout = layout(this.digraph, { debugTiming: false } as GraphLabel); + const deltaX = -this.digraph.graph().width / 2; + const deltaY = -this.digraph.graph().height / 2; + this.digraph.nodes().forEach(u => { + const value = this.digraph.node(u); + value.x += deltaX + _width / 2; + value.y += deltaY + _height / 2; + }); + this.digraph.edges().forEach(e => { + const value = this.digraph.edge(e); + for (let i = 0; i < value.points.length; ++i) { + value.points[i].x += deltaX + _width / 2; + value.points[i].y += deltaY + _height / 2; + } + }); + this.digraph = this.digraph; + } + + nodePos(u) { + return this.digraph.node(u); + } + + edgePoints(edge) { + return this.digraph.edge(edge._sourceVertex.id(), edge._targetVertex.id(), edge._id).points; + } } -Hierarchy.prototype.nodePos = function (u) { - return this.digraph.node(u); -}; -Hierarchy.prototype.edgePoints = function (edge) { - return this.digraph.edge(edge._sourceVertex.id(), edge._targetVertex.id(), edge._id).points; -}; diff --git a/packages/graph/src/Sankey.ts b/packages/graph/src/Sankey.ts index 8657cae2f6..69fec43ebc 100644 --- a/packages/graph/src/Sankey.ts +++ b/packages/graph/src/Sankey.ts @@ -1,5 +1,4 @@ -import { Palette, PropertyExt, SVGWidget, Utility } from "@hpcc-js/common"; -import { max as d3Max, mean as d3Mean, median as d3Median, min as d3Min, sum as d3Sum } from "d3-array"; +import { Palette, PropertyExt, SVGWidget, Utility, max as d3Max, mean as d3Mean, median as d3Median, min as d3Min, sum as d3Sum } from "@hpcc-js/common"; import { sankey as d3Sankey, sankeyLinkHorizontal as d3SankeyLinkHorizontal } from "d3-sankey"; import { select as d3Select } from "d3-selection"; @@ -46,28 +45,31 @@ export class SankeyColumn extends PropertyExt { }); } } - - column: { (): string; (_: string): SankeyColumn; }; - aggrType: { (): string; (_: string): SankeyColumn; }; - aggrColumn: { (): string; (_: string): SankeyColumn; }; - } SankeyColumn.prototype._class += " graph_Sankey.SankeyColumn"; -SankeyColumn.prototype.publish("column", null, "set", "Field", function () { return this._owner ? this._owner.columns() : []; }, { optional: true }); +export interface SankeyColumn { + column(): string; + column(_: string): this; + aggrType(): string; + aggrType(_: string): this; + aggrColumn(): string; + aggrColumn(_: string): this; +} + +SankeyColumn.prototype.publish("column", null, "set", "Field", function (this: SankeyColumn) { return this._owner ? this._owner.columns() : []; }, { optional: true }); SankeyColumn.prototype.publish("aggrType", null, "set", "Aggregation Type", [null, "mean", "median", "sum", "min", "max"], { optional: true, disable: w => !w._owner || w._owner.mappings().indexOf(w) === 0 }); -SankeyColumn.prototype.publish("aggrColumn", null, "set", "Aggregation Field", function () { return this._owner ? this._owner.columns() : []; }, { optional: true, disable: w => !w._owner || !w.aggrType() || w._owner.mappings().indexOf(w) === 0 }); +SankeyColumn.prototype.publish("aggrColumn", null, "set", "Aggregation Field", function (this: SankeyColumn) { return this._owner ? this._owner.columns() : []; }, { optional: true, disable: w => !w._owner || !w.aggrType() || w._owner.mappings().indexOf(w) === 0 }); export class Sankey extends SVGWidget { Column; - _palette; _d3Sankey; _d3SankeyPath; _selection; constructor() { super(); - Utility.SimpleSelectionMixin.call(this); + Utility.SimpleSelectionMixin.call(this, false); this._drawStartPos = "origin"; } @@ -80,7 +82,7 @@ export class Sankey extends SVGWidget { const vertexIndex = {}; const valueIdx = 2; const mappings = this.mappings().filter(mapping => mapping.valid()); - mappings.forEach(function (mapping, idx) { + mappings.forEach((mapping, idx) => { const view = this._db.rollupView([mapping.column()]); view.entries().forEach(function (row) { const id = mapping.column() + ":" + idx + ":" + row.key; @@ -95,8 +97,8 @@ export class Sankey extends SVGWidget { vertexIndex[id] = retVal.vertices.length - 1; } }, this); - }, this); - mappings.forEach(function (mapping, idx) { + }); + mappings.forEach((mapping, idx) => { if (idx < mappings.length - 1) { const mapping2 = mappings[idx + 1]; const view = this._db.rollupView([mapping.column(), mapping2.column()]); @@ -113,7 +115,7 @@ export class Sankey extends SVGWidget { }); }); } - }, this); + }); return retVal; } @@ -151,7 +153,7 @@ export class Sankey extends SVGWidget { const link = element.selectAll(".link").data(sankeyData.edges); link.enter().append("path") .attr("class", "link") - .each(function () { + .each(function (this: HTMLElement) { d3Select(this) .append("title") ; @@ -173,13 +175,13 @@ export class Sankey extends SVGWidget { node.enter().append("g") .attr("class", "node") .call(this._selection.enter.bind(this._selection)) - .on("click", function (d) { + .on("click", function (this: HTMLElement, d) { context.click(context.rowToObj(d.origRow[0]), "", context._selection.selected(this)); }) - .on("dblclick", function (d) { + .on("dblclick", function (this: HTMLElement, d) { context.dblclick(context.rowToObj(d.origRow[0]), "", context._selection.selected(this)); }) - .each(function () { + .each(function (this: HTMLElement) { const gElement = d3Select(this); gElement.append("rect"); gElement.append("text"); @@ -201,7 +203,7 @@ export class Sankey extends SVGWidget { if (d.y0) _y = d.y0; return "translate(" + (_x + strokeWidth) + "," + (_y + strokeWidth) + ")"; }) - .each(function () { + .each(function (this: HTMLElement) { const n = d3Select(this); n.select("rect") .attr("height", function (d: any) { return d.y1 - d.y0; }) @@ -255,15 +257,6 @@ export class Sankey extends SVGWidget { */ } - paletteID: { (): string; (_: string): Sankey; }; - mappings: { (): SankeyColumn[]; (_: SankeyColumn[]): Sankey; }; - vertexStrokeWidth: { (): number; (_: number): Sankey; }; - vertexStrokeColor: { (): string; (_: string): Sankey; }; - vertexWidth: { (): number; (_: number): Sankey; }; - vertexPadding: { (): number; (_: number): Sankey; }; - xAxisMovement: { (): boolean; (_: boolean): Sankey; }; - yAxisMovement: { (): boolean; (_: boolean): Sankey; }; - exit(domNode, element) { super.exit(domNode, element); } @@ -279,6 +272,26 @@ Sankey.prototype._class += " graph_Sankey"; Sankey.prototype.Column = SankeyColumn; Sankey.prototype.mixin(Utility.SimpleSelectionMixin); +export interface Sankey { + _palette; + paletteID(): string; + paletteID(_: string): this; + mappings(): SankeyColumn[]; + mappings(_: SankeyColumn[]): this; + vertexStrokeWidth(): number; + vertexStrokeWidth(_: number): this; + vertexStrokeColor(): string; + vertexStrokeColor(_: string): this; + vertexWidth(): number; + vertexWidth(_: number): this; + vertexPadding(): number; + vertexPadding(_: number): this; + xAxisMovement(): boolean; + xAxisMovement(_: boolean): this; + yAxisMovement(): boolean; + yAxisMovement(_: boolean): this; +} + Sankey.prototype._palette = Palette.ordinal("default"); Sankey.prototype.publish("paletteID", "default", "set", "Color palette for this widget", Sankey.prototype._palette.switch()); diff --git a/packages/graph/src/Vertex.ts b/packages/graph/src/Vertex.ts index 62208b5812..f4f856634e 100644 --- a/packages/graph/src/Vertex.ts +++ b/packages/graph/src/Vertex.ts @@ -126,7 +126,7 @@ export class Vertex extends SVGWidget { const annotations = element.selectAll(".annotation").data(this.annotationIcons()); const annotationsEnter = annotations.enter().append("g") .attr("class", "annotation") - .each(function (_d, idx) { + .each(function (this: HTMLElement, _d, idx) { context._annotationWidgets[idx] = new Icon() .target(this) .shape("square") @@ -164,7 +164,7 @@ export class Vertex extends SVGWidget { }) ; annotations.exit() - .each(function (_d, idx) { + .each(function (this: HTMLElement, _d, idx) { const element2 = d3Select(this); context._annotationWidgets[idx].target(null); delete context._annotationWidgets[idx]; diff --git a/packages/graph/src/graph2/dataGraph.ts b/packages/graph/src/graph2/dataGraph.ts index 6658cb5476..c8520f51d5 100644 --- a/packages/graph/src/graph2/dataGraph.ts +++ b/packages/graph/src/graph2/dataGraph.ts @@ -1,8 +1,8 @@ -import { PropertyExt, publish, Widget } from "@hpcc-js/common"; +import { PropertyExt, Widget } from "@hpcc-js/common"; import { Vertex3, CentroidVertex3, Vertex3Props, EdgeProps, SubgraphProps } from "@hpcc-js/react"; import { compare2 } from "@hpcc-js/util"; -import { Graph2 } from "./graph"; -import { HierarchyBase } from "./layouts/placeholders"; +import { Graph2 } from "./graph.ts"; +import { HierarchyBase } from "./layouts/placeholders.ts"; // Backward compatibility layer --- export type IVertex3 = Vertex3Props; @@ -15,11 +15,6 @@ export function toJsonObj(row, columns): T { export class AnnotationColumn extends PropertyExt { - @publish("", "set", "Annotation column (boolean)", function (this: AnnotationColumn) { return this._owner.vertexColumns(); }) - columnID: publish; - @publish("", "string", "Annotation ID") - annotationID: publish; - protected _owner: DataGraph; owner(): DataGraph; owner(_: DataGraph): this; @@ -35,69 +30,17 @@ export class AnnotationColumn extends PropertyExt { } AnnotationColumn.prototype._class += " graph_AnnotationColumn"; -export class DataGraph extends Graph2 { - - @publish([], "any", "Subgraph Columns", null, { internal: true }) - subgraphColumns: publish; - @publish([], "any", "Subgraphs", null, { internal: true }) - subgraphs: publish>>; - @publish("", "string", "Subgraph ID column") - subgraphIDColumn: publish; - @publish("", "string", "Subgraph Label column") - subgraphLabelColumn: publish; - - @publish([], "any", "Vertex Columns", null, { internal: true }) - vertexColumns: publish; - @publish([], "any", "Vertices (Nodes)", null, { internal: true }) - vertices: publish>>; - @publish("", "set", "Vertex Category ID column", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }) - vertexCategoryColumn: publish; - @publish("", "set", "Vertex ID column", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }) - vertexIDColumn: publish; - @publish("", "set", "Vertex label column", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }) - vertexLabelColumn: publish; - @publish("", "set", "Vertex centroid column (boolean)", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }) - vertexCentroidColumn: publish; - @publish("", "string", "Vertex default image url") - vertexImageUrl: publish; - @publish("", "set", "Vertex image url column", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }) - vertexImageUrlColumn: publish; - @publish("?", "string", "Vertex default FAChar") - vertexFAChar: publish; - @publish("", "set", "Vertex FAChar column", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }) - vertexFACharColumn: publish; - @publish("", "set", "Vertex tooltip column", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }) - vertexTooltipColumn: publish; - @publish([], "propertyArray", "Annotations", null, { autoExpand: AnnotationColumn }) - vertexAnnotationColumns: publish; - @publish("", "set", "Vertex expansion FAChar column", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }) - vertexExpansionFACharColumn: publish; +export interface AnnotationColumn { + columnID(): string; + columnID(_: string): this; + annotationID(): string; + annotationID(_: string): this; +} - @publish([], "any", "Edge columns", null, { internal: true }) - edgeColumns: publish; - @publish([], "any", "Edges (Edges)", null, { internal: true }) - edges: publish>>; - @publish("", "set", "Edge ID column", function (this: DataGraph) { return this.edgeColumns(); }, { optional: true }) - edgeIDColumn: publish; - @publish("", "set", "Edge label column", function (this: DataGraph) { return this.edgeColumns(); }, { optional: true }) - edgeLabelColumn: publish; - @publish("", "set", "Edge source ID column", function (this: DataGraph) { return this.edgeColumns(); }, { optional: true }) - edgeSourceColumn: publish; - @publish("", "set", "Edge target ID column", function (this: DataGraph) { return this.edgeColumns(); }, { optional: true }) - edgeTargetColumn: publish; - @publish("", "set", "Edge weight column", function (this: DataGraph) { return this.edgeColumns(); }, { optional: true }) - edgeWeightColumn: publish; - @publish("", "set", "Edge color column", function (this: DataGraph) { return this.edgeColumns(); }, { optional: true }) - edgeColorColumn: publish; +AnnotationColumn.prototype.publish("columnID", "", "set", "Annotation column (boolean)", function (this: AnnotationColumn) { return this._owner.vertexColumns(); }); +AnnotationColumn.prototype.publish("annotationID", "", "string", "Annotation ID"); - @publish([], "any", "Subgraph Columns") - hierarchyColumns: publish; - @publish([], "any", "Subgraphs") - hierarchy: publish>>; - @publish("", "string", "Subgraph ID column") - hierarchyParentIDColumn: publish; - @publish("", "string", "Subgraph Label column") - hierarchyChildIDColumn: publish; +export class DataGraph extends Graph2 { constructor() { super(); @@ -303,3 +246,100 @@ export class DataGraph extends Graph2 { } } DataGraph.prototype._class += " graph_DataGraph"; + +export interface DataGraph { + subgraphColumns(): string[]; + subgraphColumns(_: string[]): this; + subgraphs(): Array>; + subgraphs(_: Array>): this; + subgraphIDColumn(): string; + subgraphIDColumn(_: string): this; + subgraphLabelColumn(): string; + subgraphLabelColumn(_: string): this; + + vertexColumns(): string[]; + vertexColumns(_: string[]): this; + vertices(): Array>; + vertices(_: Array>): this; + vertexCategoryColumn(): string; + vertexCategoryColumn(_: string): this; + vertexIDColumn(): string; + vertexIDColumn(_: string): this; + vertexLabelColumn(): string; + vertexLabelColumn(_: string): this; + vertexCentroidColumn(): string; + vertexCentroidColumn(_: string): this; + vertexImageUrl(): string; + vertexImageUrl(_: string): this; + vertexImageUrlColumn(): string; + vertexImageUrlColumn(_: string): this; + vertexFAChar(): string; + vertexFAChar(_: string): this; + vertexFACharColumn(): string; + vertexFACharColumn(_: string): this; + vertexTooltipColumn(): string; + vertexTooltipColumn(_: string): this; + vertexAnnotationColumns(): AnnotationColumn[]; + vertexAnnotationColumns(_: AnnotationColumn[]): this; + vertexExpansionFACharColumn(): string; + vertexExpansionFACharColumn(_: string): this; + + edgeColumns(): string[]; + edgeColumns(_: string[]): this; + edges(): Array>; + edges(_: Array>): this; + edgeIDColumn(): string; + edgeIDColumn(_: string): this; + edgeLabelColumn(): string; + edgeLabelColumn(_: string): this; + edgeSourceColumn(): string; + edgeSourceColumn(_: string): this; + edgeTargetColumn(): string; + edgeTargetColumn(_: string): this; + edgeWeightColumn(): string; + edgeWeightColumn(_: string): this; + edgeColorColumn(): string; + edgeColorColumn(_: string): this; + + hierarchyColumns(): string[]; + hierarchyColumns(_: string[]): this; + hierarchy(): Array>; + hierarchy(_: Array>): this; + hierarchyParentIDColumn(): string; + hierarchyParentIDColumn(_: string): this; + hierarchyChildIDColumn(): string; + hierarchyChildIDColumn(_: string): this; +} + +DataGraph.prototype.publish("subgraphColumns", [], "any", "Subgraph Columns", null, { internal: true }); +DataGraph.prototype.publish("subgraphs", [], "any", "Subgraphs", null, { internal: true }); +DataGraph.prototype.publish("subgraphIDColumn", "", "string", "Subgraph ID column"); +DataGraph.prototype.publish("subgraphLabelColumn", "", "string", "Subgraph Label column"); + +DataGraph.prototype.publish("vertexColumns", [], "any", "Vertex Columns", null, { internal: true }); +DataGraph.prototype.publish("vertices", [], "any", "Vertices (Nodes)", null, { internal: true }); +DataGraph.prototype.publish("vertexCategoryColumn", "", "set", "Vertex Category ID column", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }); +DataGraph.prototype.publish("vertexIDColumn", "", "set", "Vertex ID column", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }); +DataGraph.prototype.publish("vertexLabelColumn", "", "set", "Vertex label column", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }); +DataGraph.prototype.publish("vertexCentroidColumn", "", "set", "Vertex centroid column (boolean)", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }); +DataGraph.prototype.publish("vertexImageUrl", "", "string", "Vertex default image url"); +DataGraph.prototype.publish("vertexImageUrlColumn", "", "set", "Vertex image url column", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }); +DataGraph.prototype.publish("vertexFAChar", "?", "string", "Vertex default FAChar"); +DataGraph.prototype.publish("vertexFACharColumn", "", "set", "Vertex FAChar column", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }); +DataGraph.prototype.publish("vertexTooltipColumn", "", "set", "Vertex tooltip column", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }); +DataGraph.prototype.publish("vertexAnnotationColumns", [], "propertyArray", "Annotations", null, { autoExpand: AnnotationColumn }); +DataGraph.prototype.publish("vertexExpansionFACharColumn", "", "set", "Vertex expansion FAChar column", function (this: DataGraph) { return this.vertexColumns(); }, { optional: true }); + +DataGraph.prototype.publish("edgeColumns", [], "any", "Edge columns", null, { internal: true }); +DataGraph.prototype.publish("edges", [], "any", "Edges (Edges)", null, { internal: true }); +DataGraph.prototype.publish("edgeIDColumn", "", "set", "Edge ID column", function (this: DataGraph) { return this.edgeColumns(); }, { optional: true }); +DataGraph.prototype.publish("edgeLabelColumn", "", "set", "Edge label column", function (this: DataGraph) { return this.edgeColumns(); }, { optional: true }); +DataGraph.prototype.publish("edgeSourceColumn", "", "set", "Edge source ID column", function (this: DataGraph) { return this.edgeColumns(); }, { optional: true }); +DataGraph.prototype.publish("edgeTargetColumn", "", "set", "Edge target ID column", function (this: DataGraph) { return this.edgeColumns(); }, { optional: true }); +DataGraph.prototype.publish("edgeWeightColumn", "", "set", "Edge weight column", function (this: DataGraph) { return this.edgeColumns(); }, { optional: true }); +DataGraph.prototype.publish("edgeColorColumn", "", "set", "Edge color column", function (this: DataGraph) { return this.edgeColumns(); }, { optional: true }); + +DataGraph.prototype.publish("hierarchyColumns", [], "any", "Subgraph Columns"); +DataGraph.prototype.publish("hierarchy", [], "any", "Subgraphs"); +DataGraph.prototype.publish("hierarchyParentIDColumn", "", "string", "Subgraph ID column"); +DataGraph.prototype.publish("hierarchyChildIDColumn", "", "string", "Subgraph Label column"); diff --git a/packages/graph/src/graph2/graph.ts b/packages/graph/src/graph2/graph.ts index 28c65ecce7..8b42624de3 100644 --- a/packages/graph/src/graph2/graph.ts +++ b/packages/graph/src/graph2/graph.ts @@ -1,7 +1,7 @@ -import { React, Subgraph, SubgraphProps, Vertex, VertexProps, Edge, EdgeProps } from "@hpcc-js/react"; -// import { IVertexEdgeProps, VertexEdge } from "./edge"; -import { GraphReactT } from "./graphReactT"; -import { GraphDataProps, HierarchyBase } from "./graphT"; +import React from "react"; +import { Subgraph, SubgraphProps, Vertex, VertexProps, Edge, EdgeProps } from "@hpcc-js/react"; +import { GraphReactT } from "./graphReactT.ts"; +import { GraphDataProps, HierarchyBase } from "./graphT.ts"; // Backward compatibility layer --- export type ISubgraph = SubgraphProps; @@ -50,19 +50,19 @@ export class Graph2 extends GraphReactT { return props; } - protected _reactVertexRenderer2: React.FunctionComponent; - vertexRenderer(): React.FunctionComponent; - vertexRenderer(_: React.FunctionComponent): this; - vertexRenderer(_?: React.FunctionComponent): this | React.FunctionComponent { + protected _reactVertexRenderer2: React.FunctionComponent; + vertexRenderer(): React.FunctionComponent; + vertexRenderer(_: React.FunctionComponent): this; + vertexRenderer(_?: React.FunctionComponent): this | React.FunctionComponent { if (!arguments.length) return this._reactVertexRenderer2; this._reactVertexRenderer2 = _; return this; } - protected _reactCentroidRenderer: React.FunctionComponent; - centroidRenderer(): React.FunctionComponent; - centroidRenderer(_: React.FunctionComponent): this; - centroidRenderer(_?: React.FunctionComponent): this | React.FunctionComponent { + protected _reactCentroidRenderer: React.FunctionComponent; + centroidRenderer(): React.FunctionComponent; + centroidRenderer(_: React.FunctionComponent): this; + centroidRenderer(_?: React.FunctionComponent): this | React.FunctionComponent { if (!arguments.length) return this._reactCentroidRenderer; this._reactCentroidRenderer = _; return this; diff --git a/packages/graph/src/graph2/graphReactT.ts b/packages/graph/src/graph2/graphReactT.ts index 132b0afa72..92f0bade44 100644 --- a/packages/graph/src/graph2/graphReactT.ts +++ b/packages/graph/src/graph2/graphReactT.ts @@ -1,11 +1,12 @@ -import { render, React, SubgraphProps, VertexProps, EdgeProps } from "@hpcc-js/react"; -import { GraphT, RendererT } from "./graphT"; +import React from "react"; +import { SubgraphProps, VertexProps, EdgeProps, render } from "@hpcc-js/react"; +import { GraphT, RendererT } from "./graphT.ts"; function adapter(reactRenderer: React.FunctionComponent): RendererT { return (props: T, element: SVGGElement) => render(reactRenderer, props, element); } -export class GraphReactT> extends GraphT { +export class GraphReactT> extends GraphT { constructor(subgraphRenderer: React.FunctionComponent, vertexRenderer: React.FunctionComponent, edgeRenderer: React.FunctionComponent) { super(adapter(subgraphRenderer), adapter(vertexRenderer), adapter(edgeRenderer)); diff --git a/packages/graph/src/graph2/graphT.ts b/packages/graph/src/graph2/graphT.ts index 7511fa2174..fdf200a9fc 100644 --- a/packages/graph/src/graph2/graphT.ts +++ b/packages/graph/src/graph2/graphT.ts @@ -1,16 +1,16 @@ -import { d3Event, drag as d3Drag, Palette, select as d3Select, Selection, Spacer, SVGGlowFilter, SVGZoomWidget, ToggleButton, Utility, Widget } from "@hpcc-js/common"; +import { d3Event, drag as d3Drag, Palette, select as d3Select, Selection, Spacer, SVGGlowFilter, SVGZoomWidget, ToggleButton, Utility, Widget, BaseType as D3BaseType } from "@hpcc-js/common"; import { IconEx, Icons, render } from "@hpcc-js/react"; import { Graph2 as GraphCollection, hashSum } from "@hpcc-js/util"; import { HTMLTooltip } from "@hpcc-js/html"; import { interpolateNumberArray as d3InterpolateNumberArray } from "d3-interpolate"; import "d3-transition"; import { interpolatePath as d3InterpolatePath } from "d3-interpolate-path"; -import { Circle, Dagre, ForceDirected, ForceDirectedAnimated, Graphviz, ILayout, Null } from "./layouts/index"; -import { Options as FDOptions } from "./layouts/forceDirectedWorker"; -import type { VertexBaseProps, EdgeBaseProps, GraphDataProps, HierarchyBase, SubgraphBaseProps } from "./layouts/placeholders"; -import { EdgePlaceholder, SubgraphPlaceholder, VertexPlaceholder, isEdgePlaceholder } from "./layouts/placeholders"; -import { Engine, graphviz as gvWorker } from "./layouts/graphvizWorker"; -import { Tree, RadialTree, Dendrogram, RadialDendrogram } from "./layouts/tree"; +import { Circle, Dagre, ForceDirected, ForceDirectedAnimated, Graphviz, ILayout, Null } from "./layouts/index.ts"; +import { Options as FDOptions } from "./layouts/forceDirectedWorker.ts"; +import type { VertexBaseProps, EdgeBaseProps, GraphDataProps, HierarchyBase, SubgraphBaseProps } from "./layouts/placeholders.ts"; +import { EdgePlaceholder, SubgraphPlaceholder, VertexPlaceholder, isEdgePlaceholder } from "./layouts/placeholders.ts"; +import { Engine, graphviz as gvWorker } from "./layouts/graphvizWorker.ts"; +import { Tree, RadialTree, Dendrogram, RadialDendrogram } from "./layouts/tree.ts"; import "../../src/graph2/graph.css"; @@ -32,7 +32,7 @@ function dragStart(n: VertexPlaceholder) { n.fx = n.sx = n.x; n.fy = n.sy = n.y; } -function dragTick(n: VertexPlaceholder, d: VertexPlaceholder) { +function dragTick(n: VertexPlaceholder, d: VertexPlaceholder) { n.fx = n.sx + d.fx - d.sx; n.fy = n.sy + d.fy - d.sy; } @@ -88,7 +88,7 @@ export class GraphT>(); + private _dragHandler = d3Drag, SVGGElement>(); protected _catPalette = Palette.ordinal("hpcc10"); _svgDefs: any; @@ -195,7 +195,7 @@ export class GraphT d.element + element: () => d.element as any }, event.sourceEvent); context.selectionChanged(); const selected = d.element.classed("selected"); @@ -319,7 +319,7 @@ export class GraphT vp.element + element: () => vp.element as any }; })); return this; @@ -579,7 +579,7 @@ export class GraphT, transition: boolean): this { const edgeLayout = { - ...this._layoutAlgo.edgePath(ep, this.edgeArcDepth()) + ...this._layoutAlgo.edgePath(ep as any, this.edgeArcDepth()) }; const context = this; if (this._edgeRenderer && ep.element) { @@ -605,9 +605,11 @@ export class GraphT, transition: boolean, moveNeighbours: boolean): this { const { x, y } = this.projectPlacholder(vp); - vp.element && (transition ? vp.element.transition().duration(this.transitionDuration()) as unknown as Selection, SVGGElement, any> : vp.element) - .attr("transform", `translate(${x} ${y})`) - ; + if (vp.element) { + (transition ? vp.element.transition().duration(this.transitionDuration()) as unknown as Selection, SVGGElement, any> : vp.element) + .attr("transform", `translate(${x} ${y})`) + ; + } if (moveNeighbours) { this._graphData.vertexEdges(vp.id).forEach(e => this.moveEdgePlaceholder(e, transition)); } @@ -695,14 +697,14 @@ export class GraphT) => d.id) + .data(this._graphData.allEdges(), d => (d as EdgePlaceholder).id) .join( enter => enter.append("g") .attr("class", "graphEdge") .on("click.selectionBag", function (d) { context._selection.click({ _id: String(d.id), - element: () => d.element + element: () => d.element as any }, d3Event()); context.selectionChanged(); }) @@ -761,7 +763,7 @@ export class GraphT) => d.id) + .data(this._graphData.allVertices(), d => (d as VertexPlaceholder).id) .join( enter => enter.append("g") .attr("class", "graphVertex") @@ -808,7 +810,7 @@ export class GraphT this._dragHandler(sel)) .each(function (d) { d.element = d3Select(this); }), @@ -822,7 +824,7 @@ export class GraphT d.props.centroid) .attr("opacity", d => d.props.hidden ? 0 : 1) .attr("filter", d => d.props.centroid ? "url(#" + this.id() + "_glow)" : null) - .each(function (this: SVGGElement, d) { + .each(function (this: any, d) { const props = context.calcProps( { showLabel: context.showVertexLabels(), @@ -860,14 +862,14 @@ export class GraphT) => d.id) + .data(this.hasSubgraphs() ? this._graphData.allSubgraphs() : [], d => (d as SubgraphPlaceholder).id) .join( enter => enter.append("g") .attr("class", "subgraphPlaceholder") .on("click.selectionBag", function (d) { context._selection.click({ _id: String(d.id), - element: () => d.element + element: () => d.element as any }, d3Event()); context.selectionChanged(); }) @@ -1310,8 +1312,9 @@ GraphT.prototype.publish("treeRankDirection", "LR", "set", "Direction for Rank N GraphT.prototype.publish("wasmFolder", null, "string", "WASM Folder", null, { optional: true, disable: (w: GraphT) => ["DOT", "Neato", "FDP", "TwoPI", "Circo"].indexOf(w.layout()) < 0 }); const _origScale = GraphT.prototype.scale; +// @ts-ignore --- GraphT.prototype.scale = function (_?, transitionDuration?) { - const retVal = _origScale.apply(this, arguments); + const retVal = _origScale.apply(this, arguments as any); if (arguments.length) { this.zoomTo(_, transitionDuration); } diff --git a/packages/graph/src/graph2/index.ts b/packages/graph/src/graph2/index.ts index 3ab72283a0..78fa73c881 100644 --- a/packages/graph/src/graph2/index.ts +++ b/packages/graph/src/graph2/index.ts @@ -1,7 +1,7 @@ -export * from "./graphT"; -export * from "./graphReactT"; -export * from "./graph"; -export * from "./dataGraph"; -export * from "./sankeyGraph"; -export * from "./subgraph"; -export * from "./vertex"; +export * from "./graphT.ts"; +export * from "./graphReactT.ts"; +export * from "./graph.ts"; +export * from "./dataGraph.ts"; +export * from "./sankeyGraph.ts"; +export * from "./subgraph.tsx"; +export * from "./vertex.tsx"; diff --git a/packages/graph/src/graph2/layouts/circle.ts b/packages/graph/src/graph2/layouts/circle.ts index 9a5169e197..d51555ff48 100644 --- a/packages/graph/src/graph2/layouts/circle.ts +++ b/packages/graph/src/graph2/layouts/circle.ts @@ -1,4 +1,4 @@ -import { Layout } from "./layout"; +import { Layout } from "./layout.ts"; const rads = (degrees: number) => degrees * Math.PI / 180; const radius = (vertexCount: number, sideLength: number) => sideLength / (2 * Math.sin(rads(180 / vertexCount))); diff --git a/packages/graph/src/graph2/layouts/dagre.ts b/packages/graph/src/graph2/layouts/dagre.ts index fe9604dd13..d053586f75 100644 --- a/packages/graph/src/graph2/layouts/dagre.ts +++ b/packages/graph/src/graph2/layouts/dagre.ts @@ -1,7 +1,7 @@ import { curveBasis as d3CurveBasis, line as d3Line } from "d3-shape"; -import { dagre, Options } from "./dagreWorker"; -import { Layout, Point } from "./layout"; -import { EdgePlaceholder } from "./placeholders"; +import { dagre, Options } from "./dagreWorker.ts"; +import { Layout, Point } from "./layout.ts"; +import { EdgePlaceholder } from "./placeholders.ts"; const lineBasis = d3Line() .x(d => d[0]) diff --git a/packages/graph/src/graph2/layouts/dagreWorker.ts b/packages/graph/src/graph2/layouts/dagreWorker.ts index e0a0b7e1a6..b82995d4ec 100644 --- a/packages/graph/src/graph2/layouts/dagreWorker.ts +++ b/packages/graph/src/graph2/layouts/dagreWorker.ts @@ -35,7 +35,7 @@ export interface Options { } export function dagre(data: Data, options: Options) { - // eslint-disable-next-line quotes + const workerCode = `!function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var n={exports:{}};n.exports=function(){function e(n,r,o){function i(s,u){if(!r[s]){if(!n[s]){if(!u&&t)return t(s);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[s]={exports:{}};n[s][0].call(f.exports,(function(e){return i(n[s][1][e]||e)}),f,f.exports,e,n,r,o)}return r[s].exports}for(var a=t,s=0;s0;--s)if(r=t[s].dequeue()){o=o.concat(c(e,t,n,r,!0));break}}return o}function c(e,t,n,o,i){var a=i?[]:void 0;return r.forEach(e.inEdges(o.v),(function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,d(t,n,s)})),r.forEach(e.outEdges(o.v),(function(r){var o=e.edge(r),i=r.w,a=e.node(i);a.in-=o,d(t,n,a)})),e.removeNode(o.v),a}function f(e,t){var n=new o,a=0,s=0;r.forEach(e.nodes(),(function(e){n.setNode(e,{v:e,in:0,out:0})})),r.forEach(e.edges(),(function(e){var r=n.edge(e.v,e.w)||0,o=t(e),i=r+o;n.setEdge(e.v,e.w,i),s=Math.max(s,n.node(e.v).out+=o),a=Math.max(a,n.node(e.w).in+=o)}));var u=r.range(s+a+3).map((function(){return new i})),c=a+1;return r.forEach(n.nodes(),(function(e){d(u,c,n.node(e))})),{graph:n,buckets:u,zeroIdx:c}}function d(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},{"./data/list":5,"./graphlib":7,"./lodash":10}],9:[function(e,t,n){var r=e("./lodash"),o=e("./acyclic"),i=e("./normalize"),a=e("./rank"),s=e("./util").normalizeRanks,u=e("./parent-dummy-chains"),c=e("./util").removeEmptyRanks,f=e("./nesting-graph"),d=e("./add-border-segments"),h=e("./coordinate-system"),l=e("./order"),p=e("./position"),v=e("./util"),_=e("./graphlib").Graph;function y(e,t){var n=t&&t.debugTiming?v.time:v.notime;n("layout",(function(){var t=n(" buildLayoutGraph",(function(){return I(e)}));n(" runLayout",(function(){g(t,n)})),n(" updateInputGraph",(function(){b(e,t)}))}))}function g(e,t){t(" makeSpaceForEdgeLabels",(function(){S(e)})),t(" removeSelfEdges",(function(){B(e)})),t(" acyclic",(function(){o.run(e)})),t(" nestingGraph.run",(function(){f.run(e)})),t(" rank",(function(){a(v.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){C(e)})),t(" removeEmptyRanks",(function(){c(e)})),t(" nestingGraph.cleanup",(function(){f.cleanup(e)})),t(" normalizeRanks",(function(){s(e)})),t(" assignRankMinMax",(function(){N(e)})),t(" removeEdgeLabelProxies",(function(){T(e)})),t(" normalize.run",(function(){i.run(e)})),t(" parentDummyChains",(function(){u(e)})),t(" addBorderSegments",(function(){d(e)})),t(" order",(function(){l(e)})),t(" insertSelfEdges",(function(){G(e)})),t(" adjustCoordinateSystem",(function(){h.adjust(e)})),t(" position",(function(){p(e)})),t(" positionSelfEdges",(function(){R(e)})),t(" removeBorderNodes",(function(){D(e)})),t(" normalize.undo",(function(){i.undo(e)})),t(" fixupEdgeLabelCoords",(function(){P(e)})),t(" undoCoordinateSystem",(function(){h.undo(e)})),t(" translateGraph",(function(){M(e)})),t(" assignNodeIntersects",(function(){L(e)})),t(" reversePoints",(function(){F(e)})),t(" acyclic.undo",(function(){o.undo(e)}))}function b(e,t){r.forEach(e.nodes(),(function(n){var r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,t.children(n).length&&(r.width=o.width,r.height=o.height))})),r.forEach(e.edges(),(function(n){var o=e.edge(n),i=t.edge(n);o.points=i.points,r.has(i,"x")&&(o.x=i.x,o.y=i.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}t.exports=y;var m=["nodesep","edgesep","ranksep","marginx","marginy"],x={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],E=["width","height"],j={width:0,height:0},k=["minlen","weight","width","height","labeloffset"],A={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},O=["labelpos"];function I(e){var t=new _({multigraph:!0,compound:!0}),n=z(e.graph());return t.setGraph(r.merge({},x,U(n,m),r.pick(n,w))),r.forEach(e.nodes(),(function(n){var o=z(e.node(n));t.setNode(n,r.defaults(U(o,E),j)),t.setParent(n,e.parent(n))})),r.forEach(e.edges(),(function(n){var o=z(e.edge(n));t.setEdge(n,r.merge({},A,U(o,k),r.pick(o,O)))})),t}function S(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),(function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}function C(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),o={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};v.addDummyNode(e,"edge-proxy",o,"_ep")}}))}function N(e){var t=0;r.forEach(e.nodes(),(function(n){var o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=r.max(t,o.maxRank))})),e.graph().maxRank=t}function T(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}function M(e){var t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,i=0,a=e.graph(),s=a.marginx||0,u=a.marginy||0;function c(e){var r=e.x,a=e.y,s=e.width,u=e.height;t=Math.min(t,r-s/2),n=Math.max(n,r+s/2),o=Math.min(o,a-u/2),i=Math.max(i,a+u/2)}r.forEach(e.nodes(),(function(t){c(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.has(n,"x")&&c(n)})),t-=s,o-=u,r.forEach(e.nodes(),(function(n){var r=e.node(n);r.x-=t,r.y-=o})),r.forEach(e.edges(),(function(n){var i=e.edge(n);r.forEach(i.points,(function(e){e.x-=t,e.y-=o})),r.has(i,"x")&&(i.x-=t),r.has(i,"y")&&(i.y-=o)})),a.width=n-t+s,a.height=i-o+u}function L(e){r.forEach(e.edges(),(function(t){var n,r,o=e.edge(t),i=e.node(t.v),a=e.node(t.w);o.points?(n=o.points[0],r=o.points[o.points.length-1]):(o.points=[],n=a,r=i),o.points.unshift(v.intersectRect(i,n)),o.points.push(v.intersectRect(a,r))}))}function P(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}function F(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}function D(e){r.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),o=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(r.last(n.borderLeft)),s=e.node(r.last(n.borderRight));n.width=Math.abs(s.x-a.x),n.height=Math.abs(i.y-o.y),n.x=a.x+n.width/2,n.y=o.y+n.height/2}})),r.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}function B(e){r.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}function G(e){var t=v.buildLayerMatrix(e);r.forEach(t,(function(t){var n=0;r.forEach(t,(function(t,o){var i=e.node(t);i.order=o+n,r.forEach(i.selfEdges,(function(t){v.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:i.rank,order:o+ ++n,e:t.e,label:t.label},"_se")})),delete i.selfEdges}))}))}function R(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,a=n.x-o,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*a/3,y:i-s},{x:o+5*a/6,y:i-s},{x:o+a,y:i},{x:o+5*a/6,y:i+s},{x:o+2*a/3,y:i+s}],n.label.x=n.x,n.label.y=n.y}}))}function U(e,t){return r.mapValues(r.pick(e,t),Number)}function z(e){var t={};return r.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},{"./acyclic":2,"./add-border-segments":3,"./coordinate-system":4,"./graphlib":7,"./lodash":10,"./nesting-graph":11,"./normalize":12,"./order":17,"./parent-dummy-chains":22,"./position":24,"./rank":26,"./util":29}],10:[function(e,t,n){var r;if("function"==typeof e)try{r={cloneDeep:e("lodash/cloneDeep"),constant:e("lodash/constant"),defaults:e("lodash/defaults"),each:e("lodash/each"),filter:e("lodash/filter"),find:e("lodash/find"),flatten:e("lodash/flatten"),forEach:e("lodash/forEach"),forIn:e("lodash/forIn"),has:e("lodash/has"),isUndefined:e("lodash/isUndefined"),last:e("lodash/last"),map:e("lodash/map"),mapValues:e("lodash/mapValues"),max:e("lodash/max"),merge:e("lodash/merge"),min:e("lodash/min"),minBy:e("lodash/minBy"),now:e("lodash/now"),pick:e("lodash/pick"),range:e("lodash/range"),reduce:e("lodash/reduce"),sortBy:e("lodash/sortBy"),uniqueId:e("lodash/uniqueId"),values:e("lodash/values"),zipObject:e("lodash/zipObject")}}catch(e){}r||(r=window._),t.exports=r},{"lodash/cloneDeep":227,"lodash/constant":228,"lodash/defaults":229,"lodash/each":230,"lodash/filter":232,"lodash/find":233,"lodash/flatten":235,"lodash/forEach":236,"lodash/forIn":237,"lodash/has":239,"lodash/isUndefined":258,"lodash/last":261,"lodash/map":262,"lodash/mapValues":263,"lodash/max":264,"lodash/merge":266,"lodash/min":267,"lodash/minBy":268,"lodash/now":270,"lodash/pick":271,"lodash/range":273,"lodash/reduce":274,"lodash/sortBy":276,"lodash/uniqueId":286,"lodash/values":287,"lodash/zipObject":288}],11:[function(e,t,n){var r=e("./lodash"),o=e("./util");function i(e){var t=o.addDummyNode(e,"root",{},"_root"),n=s(e),i=r.max(r.values(n))-1,c=2*i+1;e.graph().nestingRoot=t,r.forEach(e.edges(),(function(t){e.edge(t).minlen*=c}));var f=u(e)+1;r.forEach(e.children(),(function(r){a(e,t,c,f,i,n,r)})),e.graph().nodeRankFactor=c}function a(e,t,n,i,s,u,c){var f=e.children(c);if(f.length){var d=o.addBorderNode(e,"_bt"),h=o.addBorderNode(e,"_bb"),l=e.node(c);e.setParent(d,c),l.borderTop=d,e.setParent(h,c),l.borderBottom=h,r.forEach(f,(function(r){a(e,t,n,i,s,u,r);var o=e.node(r),f=o.borderTop?o.borderTop:r,l=o.borderBottom?o.borderBottom:r,p=o.borderTop?i:2*i,v=f!==l?1:s-u[c]+1;e.setEdge(d,f,{weight:p,minlen:v,nestingEdge:!0}),e.setEdge(l,h,{weight:p,minlen:v,nestingEdge:!0})})),e.parent(c)||e.setEdge(t,d,{weight:0,minlen:s+u[c]})}else c!==t&&e.setEdge(t,c,{weight:0,minlen:n})}function s(e){var t={};function n(o,i){var a=e.children(o);a&&a.length&&r.forEach(a,(function(e){n(e,i+1)})),t[o]=i}return r.forEach(e.children(),(function(e){n(e,1)})),t}function u(e){return r.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}function c(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}t.exports={run:i,cleanup:c}},{"./lodash":10,"./util":29}],12:[function(e,t,n){var r=e("./lodash"),o=e("./util");function i(e){e.graph().dummyChains=[],r.forEach(e.edges(),(function(t){a(e,t)}))}function a(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,s=t.name,u=e.edge(t),c=u.labelRank;if(a!==r+1){var f,d,h;for(e.removeEdge(t),h=0,++r;r0;)t%2&&(n+=u[t+1]),u[t=t-1>>1]+=e.weight;c+=e.weight*n}))),c}t.exports=o},{"../lodash":10}],17:[function(e,t,n){var r=e("../lodash"),o=e("./init-order"),i=e("./cross-count"),a=e("./sort-subgraph"),s=e("./build-layer-graph"),u=e("./add-subgraph-constraints"),c=e("../graphlib").Graph,f=e("../util");function d(e){var t=f.maxRank(e),n=h(e,r.range(1,t+1),"inEdges"),a=h(e,r.range(t-1,-1,-1),"outEdges"),s=o(e);p(e,s);for(var u,c=Number.POSITIVE_INFINITY,d=0,v=0;v<4;++d,++v){l(d%2?n:a,d%4>=2),s=f.buildLayerMatrix(e);var _=i(e,s);_=e.barycenter)&&a(e,t)}}function o(t){return function(n){n.in.push(t),0==--n.indegree&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),r.forEach(i.in.reverse(),n(i)),r.forEach(i.out,o(i))}return r.map(r.filter(t,(function(e){return!e.merged})),(function(e){return r.pick(e,["vs","i","barycenter","weight"])}))}function a(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}t.exports=o},{"../lodash":10}],20:[function(e,t,n){var r=e("../lodash"),o=e("./barycenter"),i=e("./resolve-conflicts"),a=e("./sort");function s(e,t,n,f){var d=e.children(t),h=e.node(t),l=h?h.borderLeft:void 0,p=h?h.borderRight:void 0,v={};l&&(d=r.filter(d,(function(e){return e!==l&&e!==p})));var _=o(e,d);r.forEach(_,(function(t){if(e.children(t.v).length){var o=s(e,t.v,n,f);v[t.v]=o,r.has(o,"barycenter")&&c(t,o)}}));var y=i(_,n);u(y,v);var g=a(y,f);if(l&&(g.vs=r.flatten([l,g.vs,p],!0),e.predecessors(l).length)){var b=e.node(e.predecessors(l)[0]),m=e.node(e.predecessors(p)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+b.order+m.order)/(g.weight+2),g.weight+=2}return g}function u(e,t){r.forEach(e,(function(e){e.vs=r.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}function c(e,t){r.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}t.exports=s},{"../lodash":10,"./barycenter":14,"./resolve-conflicts":19,"./sort":21}],21:[function(e,t,n){var r=e("../lodash"),o=e("../util");function i(e,t){var n=o.partition(e,(function(e){return r.has(e,"barycenter")})),i=n.lhs,u=r.sortBy(n.rhs,(function(e){return-e.i})),c=[],f=0,d=0,h=0;i.sort(s(!!t)),h=a(c,u,h),r.forEach(i,(function(e){h+=e.vs.length,c.push(e.vs),f+=e.barycenter*e.weight,d+=e.weight,h=a(c,u,h)}));var l={vs:r.flatten(c,!0)};return d&&(l.barycenter=f/d,l.weight=d),l}function a(e,t,n){for(var o;t.length&&(o=r.last(t)).i<=n;)t.pop(),e.push(o.vs),n++;return n}function s(e){return function(t,n){return t.barycentern.barycenter?1:e?n.i-t.i:t.i-n.i}}t.exports=i},{"../lodash":10,"../util":29}],22:[function(e,t,n){var r=e("./lodash");function o(e){var t=a(e);r.forEach(e.graph().dummyChains,(function(n){for(var r=e.node(n),o=r.edgeObj,a=i(e,t,o.v,o.w),s=a.path,u=a.lca,c=0,f=s[c],d=!0;n!==o.w;){if(r=e.node(n),d){for(;(f=s[c])!==u&&e.node(f).maxRanku||c>t[o].lim));for(i=o,o=r;(o=e.parent(o))!==i;)s.push(o);return{path:a.concat(s.reverse()),lca:i}}function a(e){var t={},n=0;function o(i){var a=n;r.forEach(e.children(i),o),t[i]={low:a,lim:n++}}return r.forEach(e.children(),o),t}t.exports=o},{"./lodash":10}],23:[function(e,t,n){var r=e("../lodash"),o=e("../graphlib").Graph,i=e("../util");function a(e,t){var n={};function o(t,o){var i=0,a=0,s=t.length,f=r.last(o);return r.forEach(o,(function(t,d){var h=u(e,t),l=h?e.node(h).order:s;(h||t===f)&&(r.forEach(o.slice(a,d+1),(function(t){r.forEach(e.predecessors(t),(function(r){var o=e.node(r),a=o.order;!(as)&&c(n,t,u)}))}))}function i(t,n){var i,a=-1,s=0;return r.forEach(n,(function(r,u){if("border"===e.node(r).dummy){var c=e.predecessors(r);c.length&&(i=e.node(c[0]).order,o(n,s,u,a,i),s=u,a=i)}o(n,s,n.length,i,t.length)})),n}return r.reduce(t,i),n}function u(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}function c(e,t,n){if(t>n){var r=t;t=n,n=r}var o=e[t];o||(e[t]=o={}),o[n]=!0}function f(e,t,n){if(t>n){var o=t;t=n,n=o}return r.has(e[t],n)}function d(e,t,n,o){var i={},a={},s={};return r.forEach(t,(function(e){r.forEach(e,(function(e,t){i[e]=e,a[e]=e,s[e]=t}))})),r.forEach(t,(function(e){var t=-1;r.forEach(e,(function(e){var u=o(e);if(u.length){u=r.sortBy(u,(function(e){return s[e]}));for(var c=(u.length-1)/2,d=Math.floor(c),h=Math.ceil(c);d<=h;++d){var l=u[d];a[e]===e&&tu.lim&&(c=u,f=!0);var d=r.filter(t.edges(),(function(t){return f===x(e,e.node(t.v),c)&&f!==x(e,e.node(t.w),c)}));return r.minBy(d,(function(e){return i(t,e)}))}function g(e,t,n,r){var o=n.v,i=n.w;e.removeEdge(o,i),e.setEdge(r.v,r.w,{}),p(e),d(e,t),b(e,t)}function b(e,t){var n=r.find(e.nodes(),(function(e){return!t.node(e).parent})),o=s(e,n);o=o.slice(1),r.forEach(o,(function(n){var r=e.node(n).parent,o=t.edge(n,r),i=!1;o||(o=t.edge(r,n),i=!0),t.node(n).rank=t.node(r).rank+(i?o.minlen:-o.minlen)}))}function m(e,t,n){return e.hasEdge(t,n)}function x(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}t.exports=f,f.initLowLimValues=p,f.initCutValues=d,f.calcCutValue=l,f.leaveEdge=_,f.enterEdge=y,f.exchangeEdges=g},{"../graphlib":7,"../lodash":10,"../util":29,"./feasible-tree":25,"./util":28}],28:[function(e,t,n){var r=e("../lodash");function o(e){var t={};function n(o){var i=e.node(o);if(r.has(t,o))return i.rank;t[o]=!0;var a=r.min(r.map(e.outEdges(o),(function(t){return n(t.w)-e.edge(t).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),i.rank=a}r.forEach(e.sources(),n)}function i(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}t.exports={longestPath:o,slack:i}},{"../lodash":10}],29:[function(e,t,n){var r=e("./lodash"),o=e("./graphlib").Graph;function i(e,t,n,o){var i;do{i=r.uniqueId(o)}while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function a(e){var t=(new o).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})})),t}function s(e){var t=new o({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t}function u(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)}function c(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)}function f(e,t){var n,r,o=e.x,i=e.y,a=t.x-o,s=t.y-i,u=e.width/2,c=e.height/2;if(!a&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*u>Math.abs(a)*c?(s<0&&(c=-c),n=c*a/s,r=c):(a<0&&(u=-u),n=u,r=u*s/a),{x:o+n,y:i+r}}function d(e){var t=r.map(r.range(v(e)+1),(function(){return[]}));return r.forEach(e.nodes(),(function(n){var o=e.node(n),i=o.rank;r.isUndefined(i)||(t[i][o.order]=n)})),t}function h(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank})));r.forEach(e.nodes(),(function(n){var o=e.node(n);r.has(o,"rank")&&(o.rank-=t)}))}function l(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];r.forEach(e.nodes(),(function(r){var o=e.node(r).rank-t;n[o]||(n[o]=[]),n[o].push(r)}));var o=0,i=e.graph().nodeRankFactor;r.forEach(n,(function(t,n){r.isUndefined(t)&&n%i!=0?--o:o&&r.forEach(t,(function(t){e.node(t).rank+=o}))}))}function p(e,t,n,r){var o={width:0,height:0};return arguments.length>=4&&(o.rank=n,o.order=r),i(e,"border",o,t)}function v(e){return r.max(r.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n})))}function _(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n}function y(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}}function g(e,t){return t()}t.exports={addDummyNode:i,simplify:a,asNonCompoundGraph:s,successorWeights:u,predecessorWeights:c,intersectRect:f,buildLayerMatrix:d,normalizeRanks:h,removeEmptyRanks:l,addBorderNode:p,maxRank:v,partition:_,time:y,notime:g}},{"./graphlib":7,"./lodash":10}],30:[function(e,t,n){t.exports="0.8.5"},{}],31:[function(e,t,n){var r=e("./lib");t.exports={Graph:r.Graph,json:e("./lib/json"),alg:e("./lib/alg"),version:r.version}},{"./lib":47,"./lib/alg":38,"./lib/json":48}],32:[function(e,t,n){var r=e("../lodash");function o(e){var t,n={},o=[];function i(o){r.has(n,o)||(n[o]=!0,t.push(o),r.each(e.successors(o),i),r.each(e.predecessors(o),i))}return r.each(e.nodes(),(function(e){t=[],i(e),t.length&&o.push(t)})),o}t.exports=o},{"../lodash":49}],33:[function(e,t,n){var r=e("../lodash");function o(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),a=[],s={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);i(e,t,"post"===n,s,o,a)})),a}function i(e,t,n,o,a,s){r.has(o,t)||(o[t]=!0,n||s.push(t),r.each(a(t),(function(t){i(e,t,n,o,a,s)})),n&&s.push(t))}t.exports=o},{"../lodash":49}],34:[function(e,t,n){var r=e("./dijkstra"),o=e("../lodash");function i(e,t,n){return o.transform(e.nodes(),(function(o,i){o[i]=r(e,i,t,n)}),{})}t.exports=i},{"../lodash":49,"./dijkstra":35}],35:[function(e,t,n){var r=e("../lodash"),o=e("../data/priority-queue");t.exports=a;var i=r.constant(1);function a(e,t,n,r){return s(e,String(t),n||i,r||function(t){return e.outEdges(t)})}function s(e,t,n,r){var i,a,s={},u=new o,c=function(e){var t=e.v!==i?e.v:e.w,r=s[t],o=n(e),c=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c0&&(i=u.removeMin(),(a=s[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return s}},{"../data/priority-queue":45,"../lodash":49}],36:[function(e,t,n){var r=e("../lodash"),o=e("./tarjan");function i(e){return r.filter(o(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}t.exports=i},{"../lodash":49,"./tarjan":43}],37:[function(e,t,n){var r=e("../lodash");t.exports=i;var o=r.constant(1);function i(e,t,n){return a(e,t||o,n||function(t){return e.outEdges(t)})}function a(e,t,n){var r={},o=e.nodes();return o.forEach((function(e){r[e]={},r[e][e]={distance:0},o.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var t=r[e];o.forEach((function(n){var i=r[n];o.forEach((function(n){var r=i[e],o=t[n],a=i[n],s=r.distance+o.distance;s0;){if(n=u.removeMin(),r.has(s,n))a.setEdge(n,s[n]);else{if(f)throw new Error("Input graph is not connected: "+e);f=!0}e.nodeEdges(n).forEach(c)}return a}t.exports=a},{"../data/priority-queue":45,"../graph":46,"../lodash":49}],43:[function(e,t,n){var r=e("../lodash");function o(e){var t=0,n=[],o={},i=[];function a(s){var u=o[s]={onStack:!0,lowlink:t,index:t++};if(n.push(s),e.successors(s).forEach((function(e){r.has(o,e)?o[e].onStack&&(u.lowlink=Math.min(u.lowlink,o[e].index)):(a(e),u.lowlink=Math.min(u.lowlink,o[e].lowlink))})),u.lowlink===u.index){var c,f=[];do{c=n.pop(),o[c].onStack=!1,f.push(c)}while(s!==c);i.push(f)}}return e.nodes().forEach((function(e){r.has(o,e)||a(e)})),i}t.exports=o},{"../lodash":49}],44:[function(e,t,n){var r=e("../lodash");function o(e){var t={},n={},o=[];function a(s){if(r.has(n,s))throw new i;r.has(t,s)||(n[s]=!0,t[s]=!0,r.each(e.predecessors(s),a),delete n[s],o.push(s))}if(r.each(e.sinks(),a),r.size(t)!==e.nodeCount())throw new i;return o}function i(){}t.exports=o,o.CycleException=i,i.prototype=new Error},{"../lodash":49}],45:[function(e,t,n){var r=e("../lodash");function o(){this._arr=[],this._keyIndices={}}t.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,i=o.length;return n[e]=i,o.push({key:e,priority:t}),this._decrease(i),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n>1].priorityu){var c=s;s=u,u=c}return s+a+u+a+(r.isUndefined(i)?o:i)}function d(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var a=o;o=i,i=a}var s={v:o,w:i};return r&&(s.name=r),s}function h(e,t){return f(e,t.v,t.w,t.name)}s.prototype._nodeCount=0,s.prototype._edgeCount=0,s.prototype.isDirected=function(){return this._isDirected},s.prototype.isMultigraph=function(){return this._isMultigraph},s.prototype.isCompound=function(){return this._isCompound},s.prototype.setGraph=function(e){return this._label=e,this},s.prototype.graph=function(){return this._label},s.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},s.prototype.nodeCount=function(){return this._nodeCount},s.prototype.nodes=function(){return r.keys(this._nodes)},s.prototype.sources=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._in[t])}))},s.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._out[t])}))},s.prototype.setNodes=function(e,t){var n=arguments,o=this;return r.each(e,(function(e){n.length>1?o.setNode(e,t):o.setNode(e)})),this},s.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=i,this._children[e]={},this._children[i][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},s.prototype.node=function(e){return this._nodes[e]},s.prototype.hasNode=function(e){return r.has(this._nodes,e)},s.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},s.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=i;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},s.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},s.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==i)return t}},s.prototype.children=function(e){if(r.isUndefined(e)&&(e=i),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===i)return this.nodes();if(this.hasNode(e))return[]}},s.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},s.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},s.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},s.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},s.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),r.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var o={};function i(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(o[e]=r,r):r in o?o[r]:i(r)}return this._isCompound&&r.each(t.nodes(),(function(e){t.setParent(e,i(e))})),t},s.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},s.prototype.edgeCount=function(){return this._edgeCount},s.prototype.edges=function(){return r.values(this._edgeObjs)},s.prototype.setPath=function(e,t){var n=this,o=arguments;return r.reduce(e,(function(e,r){return o.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r})),this},s.prototype.setEdge=function(){var e,t,n,o,i=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(e=a.v,t=a.w,n=a.name,2===arguments.length&&(o=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var s=f(this._isDirected,e,t,n);if(r.has(this._edgeLabels,s))return i&&(this._edgeLabels[s]=o),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[s]=i?o:this._defaultEdgeLabelFn(e,t,n);var c=d(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[s]=c,u(this._preds[t],e),u(this._sucs[e],t),this._in[t][s]=c,this._out[e][s]=c,this._edgeCount++,this},s.prototype.edge=function(e,t,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,e,t,n);return this._edgeLabels[r]},s.prototype.hasEdge=function(e,t,n){var o=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,e,t,n);return r.has(this._edgeLabels,o)},s.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?h(this._isDirected,arguments[0]):f(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],c(this._preds[t],e),c(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},s.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var o=r.values(n);return t?r.filter(o,(function(e){return e.v===t})):o}},s.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var o=r.values(n);return t?r.filter(o,(function(e){return e.w===t})):o}},s.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},{"./lodash":49}],47:[function(e,t,n){t.exports={Graph:e("./graph"),version:e("./version")}},{"./graph":46,"./version":50}],48:[function(e,t,n){var r=e("./lodash"),o=e("./graph");function i(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:a(e),edges:s(e)};return r.isUndefined(e.graph())||(t.value=r.clone(e.graph())),t}function a(e){return r.map(e.nodes(),(function(t){var n=e.node(t),o=e.parent(t),i={v:t};return r.isUndefined(n)||(i.value=n),r.isUndefined(o)||(i.parent=o),i}))}function s(e){return r.map(e.edges(),(function(t){var n=e.edge(t),o={v:t.v,w:t.w};return r.isUndefined(t.name)||(o.name=t.name),r.isUndefined(n)||(o.value=n),o}))}function u(e){var t=new o(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}t.exports={write:i,read:u}},{"./graph":46,"./lodash":49}],49:[function(e,t,n){var r;if("function"==typeof e)try{r={clone:e("lodash/clone"),constant:e("lodash/constant"),each:e("lodash/each"),filter:e("lodash/filter"),has:e("lodash/has"),isArray:e("lodash/isArray"),isEmpty:e("lodash/isEmpty"),isFunction:e("lodash/isFunction"),isUndefined:e("lodash/isUndefined"),keys:e("lodash/keys"),map:e("lodash/map"),reduce:e("lodash/reduce"),size:e("lodash/size"),transform:e("lodash/transform"),union:e("lodash/union"),values:e("lodash/values")}}catch(e){}r||(r=window._),t.exports=r},{"lodash/clone":226,"lodash/constant":228,"lodash/each":230,"lodash/filter":232,"lodash/has":239,"lodash/isArray":243,"lodash/isEmpty":247,"lodash/isFunction":248,"lodash/isUndefined":258,"lodash/keys":259,"lodash/map":262,"lodash/reduce":274,"lodash/size":275,"lodash/transform":284,"lodash/union":285,"lodash/values":287}],50:[function(e,t,n){t.exports="2.1.8"},{}],51:[function(e,t,n){var r=e("./_getNative")(e("./_root"),"DataView");t.exports=r},{"./_getNative":163,"./_root":208}],52:[function(e,t,n){var r=e("./_hashClear"),o=e("./_hashDelete"),i=e("./_hashGet"),a=e("./_hashHas"),s=e("./_hashSet");function u(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1}t.exports=o},{"./_baseIndexOf":95}],67:[function(e,t,n){function r(e,t,n){for(var r=-1,o=null==e?0:e.length;++r0&&n(f)?t>1?i(f,t-1,n,a,s):r(s,f):a||(s[s.length]=f)}return s}t.exports=i},{"./_arrayPush":70,"./_isFlattenable":180}],87:[function(e,t,n){var r=e("./_createBaseFor")();t.exports=r},{"./_createBaseFor":149}],88:[function(e,t,n){var r=e("./_baseFor"),o=e("./keys");function i(e,t){return e&&r(e,t,o)}t.exports=i},{"./_baseFor":87,"./keys":259}],89:[function(e,t,n){var r=e("./_castPath"),o=e("./_toKey");function i(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&nt}t.exports=r},{}],93:[function(e,t,n){var r=Object.prototype.hasOwnProperty;function o(e,t){return null!=e&&r.call(e,t)}t.exports=o},{}],94:[function(e,t,n){function r(e,t){return null!=e&&t in Object(e)}t.exports=r},{}],95:[function(e,t,n){var r=e("./_baseFindIndex"),o=e("./_baseIsNaN"),i=e("./_strictIndexOf");function a(e,t,n){return t==t?i(e,t,n):r(e,o,n)}t.exports=a},{"./_baseFindIndex":85,"./_baseIsNaN":101,"./_strictIndexOf":220}],96:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isObjectLike"),i="[object Arguments]";function a(e){return o(e)&&r(e)==i}t.exports=a},{"./_baseGetTag":91,"./isObjectLike":252}],97:[function(e,t,n){var r=e("./_baseIsEqualDeep"),o=e("./isObjectLike");function i(e,t,n,a,s){return e===t||(null==e||null==t||!o(e)&&!o(t)?e!=e&&t!=t:r(e,t,n,a,i,s))}t.exports=i},{"./_baseIsEqualDeep":98,"./isObjectLike":252}],98:[function(e,t,n){var r=e("./_Stack"),o=e("./_equalArrays"),i=e("./_equalByTag"),a=e("./_equalObjects"),s=e("./_getTag"),u=e("./isArray"),c=e("./isBuffer"),f=e("./isTypedArray"),d=1,h="[object Arguments]",l="[object Array]",p="[object Object]",v=Object.prototype.hasOwnProperty;function _(e,t,n,_,y,g){var b=u(e),m=u(t),x=b?l:s(e),w=m?l:s(t),E=(x=x==h?p:x)==p,j=(w=w==h?p:w)==p,k=x==w;if(k&&c(e)){if(!c(t))return!1;b=!0,E=!1}if(k&&!E)return g||(g=new r),b||f(e)?o(e,t,n,_,y,g):i(e,t,x,n,_,y,g);if(!(n&d)){var A=E&&v.call(e,"__wrapped__"),O=j&&v.call(t,"__wrapped__");if(A||O){var I=A?e.value():e,S=O?t.value():t;return g||(g=new r),y(I,S,n,_,g)}}return!!k&&(g||(g=new r),a(e,t,n,_,y,g))}t.exports=_},{"./_Stack":59,"./_equalArrays":154,"./_equalByTag":155,"./_equalObjects":156,"./_getTag":168,"./isArray":243,"./isBuffer":246,"./isTypedArray":257}],99:[function(e,t,n){var r=e("./_getTag"),o=e("./isObjectLike"),i="[object Map]";function a(e){return o(e)&&r(e)==i}t.exports=a},{"./_getTag":168,"./isObjectLike":252}],100:[function(e,t,n){var r=e("./_Stack"),o=e("./_baseIsEqual"),i=1,a=2;function s(e,t,n,s){var u=n.length,c=u,f=!s;if(null==e)return!c;for(e=Object(e);u--;){var d=n[u];if(f&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++u=c){var _=t?null:s(e);if(_)return u(_);l=!1,d=a,v=new r}else v=t?[]:p;e:for(;++ft||a&&s&&c&&!u&&!f||o&&s&&c||!n&&c||!i)return 1;if(!o&&!a&&!f&&e=u?c:c*("desc"==n[o]?-1:1)}return e.index-t.index}t.exports=o},{"./_compareAscending":140}],142:[function(e,t,n){function r(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++r-1?s[u?t[c]:c]:void 0}}t.exports=a},{"./_baseIteratee":105,"./isArrayLike":244,"./keys":259}],151:[function(e,t,n){var r=e("./_baseRange"),o=e("./_isIterateeCall"),i=e("./toFinite");function a(e){return function(t,n,a){return a&&"number"!=typeof a&&o(t,n,a)&&(n=a=void 0),t=i(t),void 0===n?(n=t,t=0):n=i(n),a=void 0===a?th))return!1;var p=f.get(e);if(p&&f.get(t))return p==t;var v=-1,_=!0,y=n&s?new r:void 0;for(f.set(e,t),f.set(t,e);++v-1&&e%1==0&&e-1}t.exports=o},{"./_assocIndexOf":76}],192:[function(e,t,n){var r=e("./_assocIndexOf");function o(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}t.exports=o},{"./_assocIndexOf":76}],193:[function(e,t,n){var r=e("./_Hash"),o=e("./_ListCache"),i=e("./_Map");function a(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}t.exports=a},{"./_Hash":52,"./_ListCache":53,"./_Map":54}],194:[function(e,t,n){var r=e("./_getMapData");function o(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}t.exports=o},{"./_getMapData":161}],195:[function(e,t,n){var r=e("./_getMapData");function o(e){return r(this,e).get(e)}t.exports=o},{"./_getMapData":161}],196:[function(e,t,n){var r=e("./_getMapData");function o(e){return r(this,e).has(e)}t.exports=o},{"./_getMapData":161}],197:[function(e,t,n){var r=e("./_getMapData");function o(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}t.exports=o},{"./_getMapData":161}],198:[function(e,t,n){function r(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}t.exports=r},{}],199:[function(e,t,n){function r(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}t.exports=r},{}],200:[function(e,t,n){var r=e("./memoize"),o=500;function i(e){var t=r(e,(function(e){return n.size===o&&n.clear(),e})),n=t.cache;return t}t.exports=i},{"./memoize":265}],201:[function(e,t,n){var r=e("./_getNative")(Object,"create");t.exports=r},{"./_getNative":163}],202:[function(e,t,n){var r=e("./_overArg")(Object.keys,Object);t.exports=r},{"./_overArg":206}],203:[function(e,t,n){function r(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}t.exports=r},{}],204:[function(e,t,n){var r=e("./_freeGlobal"),o="object"==typeof n&&n&&!n.nodeType&&n,i=o&&"object"==typeof t&&t&&!t.nodeType&&t,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();t.exports=s},{"./_freeGlobal":158}],205:[function(e,t,n){var r=Object.prototype.toString;function o(e){return r.call(e)}t.exports=o},{}],206:[function(e,t,n){function r(e,t){return function(n){return e(t(n))}}t.exports=r},{}],207:[function(e,t,n){var r=e("./_apply"),o=Math.max;function i(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),u=Array(s);++a0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}t.exports=a},{}],215:[function(e,t,n){var r=e("./_ListCache");function o(){this.__data__=new r,this.size=0}t.exports=o},{"./_ListCache":53}],216:[function(e,t,n){function r(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}t.exports=r},{}],217:[function(e,t,n){function r(e){return this.__data__.get(e)}t.exports=r},{}],218:[function(e,t,n){function r(e){return this.__data__.has(e)}t.exports=r},{}],219:[function(e,t,n){var r=e("./_ListCache"),o=e("./_Map"),i=e("./_MapCache"),a=200;function s(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!o||s.length2?t[2]:void 0;for(c&&i(t[0],t[1],c)&&(r=1);++n-1&&e%1==0&&e<=r}t.exports=o},{}],250:[function(e,t,n){var r=e("./_baseIsMap"),o=e("./_baseUnary"),i=e("./_nodeUtil"),a=i&&i.isMap,s=a?o(a):r;t.exports=s},{"./_baseIsMap":99,"./_baseUnary":127,"./_nodeUtil":204}],251:[function(e,t,n){function r(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=r},{}],252:[function(e,t,n){function r(e){return null!=e&&"object"==typeof e}t.exports=r},{}],253:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./_getPrototype"),i=e("./isObjectLike"),a="[object Object]",s=Function.prototype,u=Object.prototype,c=s.toString,f=u.hasOwnProperty,d=c.call(Object);function h(e){if(!i(e)||r(e)!=a)return!1;var t=o(e);if(null===t)return!0;var n=f.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==d}t.exports=h},{"./_baseGetTag":91,"./_getPrototype":164,"./isObjectLike":252}],254:[function(e,t,n){var r=e("./_baseIsSet"),o=e("./_baseUnary"),i=e("./_nodeUtil"),a=i&&i.isSet,s=a?o(a):r;t.exports=s},{"./_baseIsSet":103,"./_baseUnary":127,"./_nodeUtil":204}],255:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isArray"),i=e("./isObjectLike"),a="[object String]";function s(e){return"string"==typeof e||!o(e)&&i(e)&&r(e)==a}t.exports=s},{"./_baseGetTag":91,"./isArray":243,"./isObjectLike":252}],256:[function(e,t,n){var r=e("./_baseGetTag"),o=e("./isObjectLike"),i="[object Symbol]";function a(e){return"symbol"==typeof e||o(e)&&r(e)==i}t.exports=a},{"./_baseGetTag":91,"./isObjectLike":252}],257:[function(e,t,n){var r=e("./_baseIsTypedArray"),o=e("./_baseUnary"),i=e("./_nodeUtil"),a=i&&i.isTypedArray,s=a?o(a):r;t.exports=s},{"./_baseIsTypedArray":104,"./_baseUnary":127,"./_nodeUtil":204}],258:[function(e,t,n){function r(e){return void 0===e}t.exports=r},{}],259:[function(e,t,n){var r=e("./_arrayLikeKeys"),o=e("./_baseKeys"),i=e("./isArrayLike");function a(e){return i(e)?r(e):o(e)}t.exports=a},{"./_arrayLikeKeys":68,"./_baseKeys":106,"./isArrayLike":244}],260:[function(e,t,n){var r=e("./_arrayLikeKeys"),o=e("./_baseKeysIn"),i=e("./isArrayLike");function a(e){return i(e)?r(e,!0):o(e)}t.exports=a},{"./_arrayLikeKeys":68,"./_baseKeysIn":107,"./isArrayLike":244}],261:[function(e,t,n){function r(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}t.exports=r},{}],262:[function(e,t,n){var r=e("./_arrayMap"),o=e("./_baseIteratee"),i=e("./_baseMap"),a=e("./isArray");function s(e,t){return(a(e)?r:i)(e,o(t,3))}t.exports=s},{"./_arrayMap":69,"./_baseIteratee":105,"./_baseMap":109,"./isArray":243}],263:[function(e,t,n){var r=e("./_baseAssignValue"),o=e("./_baseForOwn"),i=e("./_baseIteratee");function a(e,t){var n={};return t=i(t,3),o(e,(function(e,o,i){r(n,o,t(e,o,i))})),n}t.exports=a},{"./_baseAssignValue":79,"./_baseForOwn":88,"./_baseIteratee":105}],264:[function(e,t,n){var r=e("./_baseExtremum"),o=e("./_baseGt"),i=e("./identity");function a(e){return e&&e.length?r(e,i,o):void 0}t.exports=a},{"./_baseExtremum":83,"./_baseGt":92,"./identity":241}],265:[function(e,t,n){var r=e("./_MapCache"),o="Expected a function";function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(o);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},{"./_MapCache":55}],266:[function(e,t,n){var r=e("./_baseMerge"),o=e("./_createAssigner")((function(e,t,n){r(e,t,n)}));t.exports=o},{"./_baseMerge":112,"./_createAssigner":147}],267:[function(e,t,n){var r=e("./_baseExtremum"),o=e("./_baseLt"),i=e("./identity");function a(e){return e&&e.length?r(e,i,o):void 0}t.exports=a},{"./_baseExtremum":83,"./_baseLt":108,"./identity":241}],268:[function(e,t,n){var r=e("./_baseExtremum"),o=e("./_baseIteratee"),i=e("./_baseLt");function a(e,t){return e&&e.length?r(e,o(t,2),i):void 0}t.exports=a},{"./_baseExtremum":83,"./_baseIteratee":105,"./_baseLt":108}],269:[function(e,t,n){function r(){}t.exports=r},{}],270:[function(e,t,n){var r=e("./_root"),o=function(){return r.Date.now()};t.exports=o},{"./_root":208}],271:[function(e,t,n){var r=e("./_basePick"),o=e("./_flatRest")((function(e,t){return null==e?{}:r(e,t)}));t.exports=o},{"./_basePick":115,"./_flatRest":157}],272:[function(e,t,n){var r=e("./_baseProperty"),o=e("./_basePropertyDeep"),i=e("./_isKey"),a=e("./_toKey");function s(e){return i(e)?r(a(e)):o(e)}t.exports=s},{"./_baseProperty":117,"./_basePropertyDeep":118,"./_isKey":183,"./_toKey":223}],273:[function(e,t,n){var r=e("./_createRange")();t.exports=r},{"./_createRange":151}],274:[function(e,t,n){var r=e("./_arrayReduce"),o=e("./_baseEach"),i=e("./_baseIteratee"),a=e("./_baseReduce"),s=e("./isArray");function u(e,t,n){var u=s(e)?r:a,c=arguments.length<3;return u(e,i(t,4),n,c,o)}t.exports=u},{"./_arrayReduce":71,"./_baseEach":82,"./_baseIteratee":105,"./_baseReduce":120,"./isArray":243}],275:[function(e,t,n){var r=e("./_baseKeys"),o=e("./_getTag"),i=e("./isArrayLike"),a=e("./isString"),s=e("./_stringSize"),u="[object Map]",c="[object Set]";function f(e){if(null==e)return 0;if(i(e))return a(e)?s(e):e.length;var t=o(e);return t==u||t==c?e.size:r(e).length}t.exports=f},{"./_baseKeys":106,"./_getTag":168,"./_stringSize":221,"./isArrayLike":244,"./isString":255}],276:[function(e,t,n){var r=e("./_baseFlatten"),o=e("./_baseOrderBy"),i=e("./_baseRest"),a=e("./_isIterateeCall"),s=i((function(e,t){if(null==e)return[];var n=t.length;return n>1&&a(e,t[0],t[1])?t=[]:n>2&&a(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));t.exports=s},{"./_baseFlatten":86,"./_baseOrderBy":114,"./_baseRest":121,"./_isIterateeCall":182}],277:[function(e,t,n){function r(){return[]}t.exports=r},{}],278:[function(e,t,n){function r(){return!1}t.exports=r},{}],279:[function(e,t,n){var r=e("./toNumber"),o=1/0,i=17976931348623157e292;function a(e){return e?(e=r(e))===o||e===-o?(e<0?-1:1)*i:e==e?e:0:0===e?e:0}t.exports=a},{"./toNumber":281}],280:[function(e,t,n){var r=e("./toFinite");function o(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}t.exports=o},{"./toFinite":279}],281:[function(e,t,n){var r=e("./isObject"),o=e("./isSymbol"),i=NaN,a=/^\\s+|\\s+\$/g,s=/^[-+]0x[0-9a-f]+\$/i,u=/^0b[01]+\$/i,c=/^0o[0-7]+\$/i,f=parseInt;function d(e){if("number"==typeof e)return e;if(o(e))return i;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(a,"");var n=u.test(e);return n||c.test(e)?f(e.slice(2),n?2:8):s.test(e)?i:+e}t.exports=d},{"./isObject":251,"./isSymbol":256}],282:[function(e,t,n){var r=e("./_copyObject"),o=e("./keysIn");function i(e){return r(e,o(e))}t.exports=i},{"./_copyObject":143,"./keysIn":260}],283:[function(e,t,n){var r=e("./_baseToString");function o(e){return null==e?"":r(e)}t.exports=o},{"./_baseToString":126}],284:[function(e,t,n){var r=e("./_arrayEach"),o=e("./_baseCreate"),i=e("./_baseForOwn"),a=e("./_baseIteratee"),s=e("./_getPrototype"),u=e("./isArray"),c=e("./isBuffer"),f=e("./isFunction"),d=e("./isObject"),h=e("./isTypedArray");function l(e,t,n){var l=u(e),p=l||c(e)||h(e);if(t=a(t,4),null==n){var v=e&&e.constructor;n=p?l?new v:[]:d(e)&&f(v)?o(s(e)):{}}return(p?r:i)(e,(function(e,r,o){return t(n,e,r,o)})),n}t.exports=l},{"./_arrayEach":64,"./_baseCreate":81,"./_baseForOwn":88,"./_baseIteratee":105,"./_getPrototype":164,"./isArray":243,"./isBuffer":246,"./isFunction":248,"./isObject":251,"./isTypedArray":257}],285:[function(e,t,n){var r=e("./_baseFlatten"),o=e("./_baseRest"),i=e("./_baseUniq"),a=e("./isArrayLikeObject"),s=o((function(e){return i(r(e,1,a,!0))}));t.exports=s},{"./_baseFlatten":86,"./_baseRest":121,"./_baseUniq":128,"./isArrayLikeObject":245}],286:[function(e,t,n){var r=e("./toString"),o=0;function i(e){var t=++o;return r(e)+t}t.exports=i},{"./toString":283}],287:[function(e,t,n){var r=e("./_baseValues"),o=e("./keys");function i(e){return null==e?[]:r(e,o(e))}t.exports=i},{"./_baseValues":129,"./keys":259}],288:[function(e,t,n){var r=e("./_assignValue"),o=e("./_baseZipObject");function i(e,t){return o(e||[],t||[],r)}t.exports=i},{"./_assignValue":75,"./_baseZipObject":130}]},{},[1])(1);var r=n.exports,o={exports:{}};function i(e,t){var n=e.subgraphs,o=e.nodes,i=e.links,a=e.hierarchy,s=new r.graphlib.Graph({multigraph:!0,compound:!0,directed:!1!==t.digraph}).setGraph(t).setDefaultNodeLabel((function(){return{}})).setDefaultEdgeLabel((function(){return{}}));n.forEach((function(e){s.setNode(e.id,e)})),o.forEach((function(e){s.setNode(e.id,e)})),i.forEach((function(e){s.setEdge(e.source.id,e.target.id,e,e.id)})),a.forEach((function(e){s.setParent(e.child,e.parent)})),r.layout(s,{debugTiming:!1});var u=-s.graph().width/2||0,c=-s.graph().height/2;return s.nodes().forEach((function(e){var t=s.node(e);t.x+=u,t.y+=c})),s.edges().forEach((function(e){var t=s.edge(e);t.points=t.points.map((function(e){return[e.x+u,e.y+c]}))})),{subgraphs:n,nodes:o,links:i}} /*! * @overview es6-promise - a tiny implementation of Promises/A+. diff --git a/packages/graph/src/graph2/layouts/forceDirected.ts b/packages/graph/src/graph2/layouts/forceDirected.ts index c0cf82fc9f..eacfc855e5 100644 --- a/packages/graph/src/graph2/layouts/forceDirected.ts +++ b/packages/graph/src/graph2/layouts/forceDirected.ts @@ -1,8 +1,8 @@ import { forceCenter as d3ForceCenter, forceLink as d3ForceLink, forceManyBody as d3ForceManyBody, forceSimulation as d3ForceSimulation, forceX as d3ForceX, forceY as d3ForceY } from "d3-force"; -import { Layout } from "./layout"; +import { Layout } from "./layout.ts"; -import { Options } from "./forceDirectedWorker"; +import { Options } from "./forceDirectedWorker.ts"; // Non worker --- diff --git a/packages/graph/src/graph2/layouts/graphviz.ts b/packages/graph/src/graph2/layouts/graphviz.ts index 8ddf7df199..dc10854ca1 100644 --- a/packages/graph/src/graph2/layouts/graphviz.ts +++ b/packages/graph/src/graph2/layouts/graphviz.ts @@ -1,7 +1,7 @@ import { curveBasis as d3CurveBasis, line as d3Line } from "d3-shape"; -import { Cluster, graphviz as gvWorker, Node, isLayoutSuccess, LayoutError } from "./graphvizWorker"; -import { Layout, Point } from "./layout"; -import { EdgePlaceholder } from "./placeholders"; +import { Cluster, graphviz as gvWorker, Node, isLayoutSuccess, LayoutError } from "./graphvizWorker.ts"; +import { Layout, Point } from "./layout.ts"; +import { EdgePlaceholder } from "./placeholders.ts"; type Engine = "circo" | "dot" | "fdp" | "neato" | "osage" | "patchwork" | "twopi"; diff --git a/packages/graph/src/graph2/layouts/index.ts b/packages/graph/src/graph2/layouts/index.ts index d54db71397..fdff6e7b09 100644 --- a/packages/graph/src/graph2/layouts/index.ts +++ b/packages/graph/src/graph2/layouts/index.ts @@ -1,7 +1,7 @@ -export * from "./circle"; -export * from "./dagre"; -export * from "./forceDirected"; -export * from "./geoForceDirected"; -export * from "./graphviz"; -export type { ILayout } from "./layout"; -export * from "./null"; +export * from "./circle.ts"; +export * from "./dagre.ts"; +export * from "./forceDirected.ts"; +export * from "./geoForceDirected.ts"; +export * from "./graphviz.ts"; +export type { ILayout } from "./layout.ts"; +export * from "./null.ts"; diff --git a/packages/graph/src/graph2/layouts/layout.ts b/packages/graph/src/graph2/layouts/layout.ts index ff6a8208f7..5c97dc8f33 100644 --- a/packages/graph/src/graph2/layouts/layout.ts +++ b/packages/graph/src/graph2/layouts/layout.ts @@ -1,7 +1,7 @@ import { Graph2 as GraphCollection } from "@hpcc-js/util"; import { curveBasis as d3CurveBasis, curveCardinal as d3CurveCardinal, line as d3Line } from "d3-shape"; -import { EdgePlaceholder, SubgraphPlaceholder, VertexPlaceholder } from "./placeholders"; -import { EdgeLayout } from "./tree"; +import { EdgePlaceholder, SubgraphPlaceholder, VertexPlaceholder } from "./placeholders.ts"; +import { EdgeLayout } from "./tree.ts"; export type Point = [number, number]; diff --git a/packages/graph/src/graph2/layouts/null.ts b/packages/graph/src/graph2/layouts/null.ts index 75f13c3201..21a8cecbf5 100644 --- a/packages/graph/src/graph2/layouts/null.ts +++ b/packages/graph/src/graph2/layouts/null.ts @@ -1,7 +1,11 @@ -import { Layout } from "./layout"; +import { Layout } from "./layout.ts"; export class Null extends Layout { + constructor(graph) { + super(graph); + } + start(): Promise { return super.start().then(() => { this.stop(); diff --git a/packages/graph/src/graph2/layouts/tree.ts b/packages/graph/src/graph2/layouts/tree.ts index 5b9e9bfb4d..50179bef26 100644 --- a/packages/graph/src/graph2/layouts/tree.ts +++ b/packages/graph/src/graph2/layouts/tree.ts @@ -1,9 +1,9 @@ import { Graph2 } from "@hpcc-js/util"; import { cluster, hierarchy, tree } from "d3-hierarchy"; import { linkHorizontal as d3LinkHorizontal } from "d3-shape"; -import { Hierarchy } from "./dagreWorker"; -import { Layout, Point } from "./layout"; -import { VertexPlaceholder, EdgePlaceholder, SubgraphPlaceholder } from "./placeholders"; +import { Hierarchy } from "./dagreWorker.ts"; +import { Layout, Point } from "./layout.ts"; +import { VertexPlaceholder, EdgePlaceholder, SubgraphPlaceholder } from "./placeholders.ts"; const linkHorizontal = d3LinkHorizontal() .x(d => d.x) diff --git a/packages/graph/src/graph2/liteMap.ts b/packages/graph/src/graph2/liteMap.ts index d0069b29ba..6338da20a6 100644 --- a/packages/graph/src/graph2/liteMap.ts +++ b/packages/graph/src/graph2/liteMap.ts @@ -1,7 +1,7 @@ import { select as d3Select, zoomTransform as d3ZoomTransform } from "@hpcc-js/common"; import { geoMercator as d3GeoMercator } from "d3-geo"; import { tile as d3Tile, tileWrap as d3TileWrap } from "d3-tile"; -import { LiteSVGZoomWidget } from "./liteSVGZooom"; +import { LiteSVGZoomWidget } from "./liteSVGZooom.ts"; function url(x, y, z) { return `https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/${z}/${x}/${y}${devicePixelRatio > 1 ? "@2x" : ""}?access_token=pk.eyJ1IjoibGVzY2htb28iLCJhIjoiY2psY2FqY3l3MDhqNDN3cDl1MzFmZnkwcCJ9.HRoFwmz1j80gyz18ruggqw`; diff --git a/packages/graph/src/graph2/sankeyGraph.ts b/packages/graph/src/graph2/sankeyGraph.ts index 2385c00591..585758ece9 100644 --- a/packages/graph/src/graph2/sankeyGraph.ts +++ b/packages/graph/src/graph2/sankeyGraph.ts @@ -1,56 +1,19 @@ -import { Palette, publish, SVGWidget, Utility } from "@hpcc-js/common"; +import { Palette, SVGWidget, Utility, select as d3Select } from "@hpcc-js/common"; import { compare2 } from "@hpcc-js/util"; import { sankey as d3Sankey, sankeyLinkHorizontal as d3SankeyLinkHorizontal } from "d3-sankey"; -import { select as d3Select } from "d3-selection"; -import { AnnotationColumn, toJsonObj } from "./dataGraph"; +import { AnnotationColumn, toJsonObj } from "./dataGraph.ts"; import "../../src/graph2/sankeyGraph.css"; -import { EdgeBaseProps, VertexBaseProps } from "./graphT"; +import { EdgeBaseProps, VertexBaseProps } from "./graphT.ts"; export class SankeyGraph extends SVGWidget { - @publish([], "any", "Vertex Columns", null, { internal: true }) - vertexColumns: publish; - @publish([], "any", "Vertices (Nodes)", null, { internal: true }) - vertices: publish>>; - @publish("", "set", "Vertex Category ID column", function (this: SankeyGraph) { return this.vertexColumns(); }, { optional: true }) - vertexCategoryColumn: publish; - @publish("", "set", "Vertex ID column", function (this: SankeyGraph) { return this.vertexColumns(); }, { optional: true }) - vertexIDColumn: publish; - @publish("", "set", "Vertex label column", function (this: SankeyGraph) { return this.vertexColumns(); }, { optional: true }) - vertexLabelColumn: publish; - @publish("", "set", "Vertex centroid column (boolean)", function (this: SankeyGraph) { return this.vertexColumns(); }, { optional: true }) - vertexCentroidColumn: publish; - @publish("?", "string", "Vertex default FAChar") - vertexFAChar: publish; - @publish("", "set", "Vertex FAChar column", function (this: SankeyGraph) { return this.vertexColumns(); }, { optional: true }) - vertexFACharColumn: publish; - @publish("", "set", "Vertex tooltip column", function (this: SankeyGraph) { return this.vertexColumns(); }, { optional: true }) - vertexTooltipColumn: publish; - @publish([], "propertyArray", "Annotations", null, { autoExpand: AnnotationColumn }) - vertexAnnotationColumns: publish; - - @publish([], "any", "Edge columns", null, { internal: true }) - edgeColumns: publish; - @publish([], "any", "Edges (Edges)", null, { internal: true }) - edges: publish>>; - @publish("", "set", "Edge ID column", function (this: SankeyGraph) { return this.edgeColumns(); }, { optional: true }) - edgeIDColumn: publish; - @publish("", "set", "Edge label column", function (this: SankeyGraph) { return this.edgeColumns(); }, { optional: true }) - edgeLabelColumn: publish; - @publish("", "set", "Edge source ID column", function (this: SankeyGraph) { return this.edgeColumns(); }, { optional: true }) - edgeSourceColumn: publish; - @publish("", "set", "Edge target ID column", function (this: SankeyGraph) { return this.edgeColumns(); }, { optional: true }) - edgeTargetColumn: publish; - @publish("", "set", "Edge target ID column", function (this: SankeyGraph) { return this.edgeColumns(); }, { optional: true }) - edgeWeightColumn: publish; protected _d3Sankey: any; protected _selection: any; - _palette: any; constructor() { super(); - Utility.SimpleSelectionMixin.call(this); + Utility.SimpleSelectionMixin.call(this, false); this._drawStartPos = "origin"; } @@ -174,7 +137,7 @@ export class SankeyGraph extends SVGWidget { const link = element.selectAll(".link").data(sankeyData.edges); link.enter().append("path") .attr("class", "link") - .each(function () { + .each(function (this: HTMLElement) { d3Select(this) .append("title") ; @@ -195,13 +158,13 @@ export class SankeyGraph extends SVGWidget { node.enter().append("g") .attr("class", "node") .call(this._selection.enter.bind(this._selection)) - .on("click", function (d) { + .on("click", function (this: HTMLElement, d) { context.click(d.origData, "", context._selection.selected(this)); }) - .on("dblclick", function (d) { + .on("dblclick", function (this: HTMLElement, d) { context.dblclick(d.origData, "", context._selection.selected(this)); }) - .each(function () { + .each(function (this: HTMLElement) { const gElement = d3Select(this); gElement.append("rect"); gElement.append("text"); @@ -223,7 +186,7 @@ export class SankeyGraph extends SVGWidget { if (d.y0) _y = d.y0; return "translate(" + (_x + strokeWidth) + "," + (_y + strokeWidth) + ")"; }) - .each(function () { + .each(function (this: HTMLElement) { const n = d3Select(this); n.select("rect") .attr("height", (d: any) => { @@ -283,14 +246,6 @@ export class SankeyGraph extends SVGWidget { */ } - paletteID: { (): string; (_: string): SankeyGraph; }; - vertexStrokeWidth: { (): number; (_: number): SankeyGraph; }; - vertexStrokeColor: { (): string; (_: string): SankeyGraph; }; - vertexWidth: { (): number; (_: number): SankeyGraph; }; - vertexPadding: { (): number; (_: number): SankeyGraph; }; - xAxisMovement: { (): boolean; (_: boolean): SankeyGraph; }; - yAxisMovement: { (): boolean; (_: boolean): SankeyGraph; }; - exit(domNode, element) { super.exit(domNode, element); } @@ -307,10 +262,84 @@ SankeyGraph.prototype.mixin(Utility.SimpleSelectionMixin); SankeyGraph.prototype._palette = Palette.ordinal("category10"); +export interface SankeyGraph { + _palette: any; + vertexColumns(): string[]; + vertexColumns(_: string[]): this; + vertices(): Array>; + vertices(_: Array>): this; + vertexCategoryColumn(): string; + vertexCategoryColumn(_: string): this; + vertexIDColumn(): string; + vertexIDColumn(_: string): this; + vertexLabelColumn(): string; + vertexLabelColumn(_: string): this; + vertexCentroidColumn(): string; + vertexCentroidColumn(_: string): this; + vertexFAChar(): string; + vertexFAChar(_: string): this; + vertexFACharColumn(): string; + vertexFACharColumn(_: string): this; + vertexTooltipColumn(): string; + vertexTooltipColumn(_: string): this; + vertexAnnotationColumns(): AnnotationColumn[]; + vertexAnnotationColumns(_: AnnotationColumn[]): this; + + edgeColumns(): string[]; + edgeColumns(_: string[]): this; + edges(): Array>; + edges(_: Array>): this; + edgeIDColumn(): string; + edgeIDColumn(_: string): this; + edgeLabelColumn(): string; + edgeLabelColumn(_: string): this; + edgeSourceColumn(): string; + edgeSourceColumn(_: string): this; + edgeTargetColumn(): string; + edgeTargetColumn(_: string): this; + edgeWeightColumn(): string; + edgeWeightColumn(_: string): this; + + paletteID(): string; + paletteID(_: string): this; + vertexStrokeWidth(): number; + vertexStrokeWidth(_: number): this; + vertexStrokeColor(): string; + vertexStrokeColor(_: string): this; + vertexWidth(): number; + vertexWidth(_: number): this; + vertexPadding(): number; + vertexPadding(_: number): this; + xAxisMovement(): boolean; + xAxisMovement(_: boolean): this; + yAxisMovement(): boolean; + yAxisMovement(_: boolean): this; +} + SankeyGraph.prototype.publish("paletteID", "category10", "set", "Color palette for this widget", SankeyGraph.prototype._palette.switch()); + +SankeyGraph.prototype.publish("xAxisMovement", false, "boolean", "Enable x-axis movement"); +SankeyGraph.prototype.publish("yAxisMovement", false, "boolean", "Enable y-axis movement"); + SankeyGraph.prototype.publish("vertexStrokeWidth", 1, "number", "Vertex Stroke Width"); SankeyGraph.prototype.publish("vertexStrokeColor", "darkgray", "string", "Vertex Stroke Color"); SankeyGraph.prototype.publish("vertexWidth", 36, "number", "Vertex Width"); SankeyGraph.prototype.publish("vertexPadding", 20, "number", "Vertex Padding"); -SankeyGraph.prototype.publish("xAxisMovement", false, "boolean", "Enable x-axis movement"); -SankeyGraph.prototype.publish("yAxisMovement", false, "boolean", "Enable y-axis movement"); +SankeyGraph.prototype.publish("vertexColumns", [], "any", "Vertex Columns", null, { internal: true }); +SankeyGraph.prototype.publish("vertices", [], "any", "Vertices (Nodes)", null, { internal: true }); +SankeyGraph.prototype.publish("vertexCategoryColumn", "", "set", "Vertex Category ID column", function (this: SankeyGraph) { return this.vertexColumns(); }, { optional: true }); +SankeyGraph.prototype.publish("vertexIDColumn", "", "set", "Vertex ID column", function (this: SankeyGraph) { return this.vertexColumns(); }, { optional: true }); +SankeyGraph.prototype.publish("vertexLabelColumn", "", "set", "Vertex label column", function (this: SankeyGraph) { return this.vertexColumns(); }, { optional: true }); +SankeyGraph.prototype.publish("vertexCentroidColumn", "", "set", "Vertex centroid column (boolean)", function (this: SankeyGraph) { return this.vertexColumns(); }, { optional: true }); +SankeyGraph.prototype.publish("vertexFAChar", "?", "string", "Vertex default FAChar"); +SankeyGraph.prototype.publish("vertexFACharColumn", "", "set", "Vertex FAChar column", function (this: SankeyGraph) { return this.vertexColumns(); }, { optional: true }); +SankeyGraph.prototype.publish("vertexTooltipColumn", "", "set", "Vertex tooltip column", function (this: SankeyGraph) { return this.vertexColumns(); }, { optional: true }); +SankeyGraph.prototype.publish("vertexAnnotationColumns", [], "propertyArray", "Annotations", null, { autoExpand: AnnotationColumn }); + +SankeyGraph.prototype.publish("edgeColumns", [], "any", "Edge columns", null, { internal: true }); +SankeyGraph.prototype.publish("edges", [], "any", "Edges (Edges)", null, { internal: true }); +SankeyGraph.prototype.publish("edgeIDColumn", "", "set", "Edge ID column", function (this: SankeyGraph) { return this.edgeColumns(); }, { optional: true }); +SankeyGraph.prototype.publish("edgeLabelColumn", "", "set", "Edge label column", function (this: SankeyGraph) { return this.edgeColumns(); }, { optional: true }); +SankeyGraph.prototype.publish("edgeSourceColumn", "", "set", "Edge source ID column", function (this: SankeyGraph) { return this.edgeColumns(); }, { optional: true }); +SankeyGraph.prototype.publish("edgeTargetColumn", "", "set", "Edge target ID column", function (this: SankeyGraph) { return this.edgeColumns(); }, { optional: true }); +SankeyGraph.prototype.publish("edgeWeightColumn", "", "set", "Edge weight column", function (this: SankeyGraph) { return this.edgeColumns(); }, { optional: true }); diff --git a/packages/graph/src/graph2/subgraph.tsx b/packages/graph/src/graph2/subgraph.tsx index cc1002f1dd..4293f05d15 100644 --- a/packages/graph/src/graph2/subgraph.tsx +++ b/packages/graph/src/graph2/subgraph.tsx @@ -1,6 +1,6 @@ -// , Shape, Text, -import { React, Text } from "@hpcc-js/react"; -import { SubgraphBaseProps } from "./layouts/placeholders"; +import React from "react"; +import { Text } from "@hpcc-js/react"; +import { SubgraphBaseProps } from "./layouts/placeholders.ts"; export interface BasicSubgraphProps extends SubgraphBaseProps { label?: string; diff --git a/packages/graph/src/graph2/vertex.tsx b/packages/graph/src/graph2/vertex.tsx index ace7eecf85..79b0d9b41d 100644 --- a/packages/graph/src/graph2/vertex.tsx +++ b/packages/graph/src/graph2/vertex.tsx @@ -1,6 +1,6 @@ -// , Shape, Text, -import { React, Text } from "@hpcc-js/react"; -import { VertexBaseProps } from "./layouts/placeholders"; +import React from "react"; +import { Text } from "@hpcc-js/react"; +import { VertexBaseProps } from "./layouts/placeholders.ts"; export interface BasicVertexProps extends VertexBaseProps { textFill?: string; @@ -25,7 +25,7 @@ export const BasicVertex: React.FunctionComponent = ({ return - + ; }; diff --git a/packages/graph/src/index.ts b/packages/graph/src/index.ts index e85869c7dd..8429fb853a 100644 --- a/packages/graph/src/index.ts +++ b/packages/graph/src/index.ts @@ -1,8 +1,8 @@ -export * from "./__package__"; -export * from "./AdjacencyGraph"; -export * from "./Edge"; -export * from "./Graph"; -export * from "./Sankey"; -export * from "./Subgraph"; -export * from "./Vertex"; -export * from "./graph2/index"; +export * from "./__package__.ts"; +export * from "./AdjacencyGraph.ts"; +export * from "./Edge.ts"; +export * from "./Graph.ts"; +export * from "./Sankey.ts"; +export * from "./Subgraph.ts"; +export * from "./Vertex.ts"; +export * from "./graph2/index.ts"; diff --git a/packages/graph/tests/graph.browser.spec.ts b/packages/graph/tests/graph.browser.spec.ts new file mode 100644 index 0000000000..78a14ca354 --- /dev/null +++ b/packages/graph/tests/graph.browser.spec.ts @@ -0,0 +1,665 @@ +import * as graph from "@hpcc-js/graph"; +import { Class, HTMLWidget, Palette, SVGWidget } from "@hpcc-js/common"; +import { AdjacencyGraph, AnnotationColumn, BasicSubgraph, BasicVertex, DataGraph, Edge, Graph, GraphT, GraphReactT, Graph2, Sankey, SankeyColumn, SankeyGraph, Subgraph, Vertex } from "@hpcc-js/graph"; +import { Subgraph as ReactSubgraph, Vertex as ReactVertex, Edge as ReactEdge } from "@hpcc-js/react"; +import { describe, it, expect } from "vitest"; +import { classDef, dataBreach, render } from "../../common/tests/index.ts"; + +const urlSearch: string = window.location.href.split("?")[1]; +const data = { + simple: { + nodes: [ + { name: "John Doe", icon: "" }, + { name: "Jane Doe", icon: "" }, + { name: "123 Main Street", icon: "" } + ], + links: [ + { source: 1, target: 0 }, + { source: 2, target: 0 } + ] + } +}; + +const DataGraphVerticesRaw = [ + [0, "Myriel", 1], + [1, "Napoleon", 1], + [2, "Mlle.Baptistine", 1], + [3, "Mme.Magloire", 1], + [4, "CountessdeLo", 1], + [5, "Geborand", 1], + [6, "Champtercier", 1], + [7, "Cravatte", 1], + [8, "Count", 1], + [9, "OldMan", 1], + [10, "Labarre", 2], + [11, "Valjean", 2], + [12, "Marguerite", 3], + [13, "Mme.deR", 2], + [14, "Isabeau", 2], + [15, "Gervais", 2], + [16, "Tholomyes", 3], + [17, "Listolier", 3], + [18, "Fameuil", 3], + [19, "Blacheville", 3], + [20, "Favourite", 3], + [21, "Dahlia", 3], + [22, "Zephine", 3], + [23, "Fantine", 3], + [24, "Mme.Thenardier", 4], + [25, "Thenardier", 4], + [26, "Cosette", 5], + [27, "Javert", 4], + [28, "Fauchelevent", 0], + [29, "Bamatabois", 2], + [30, "Perpetue", 3], + [31, "Simplice", 2], + [32, "Scaufflaire", 2], + [33, "Woman1", 2], + [34, "Judge", 2], + [35, "Champmathieu", 2], + [36, "Brevet", 2], + [37, "Chenildieu", 2], + [38, "Cochepaille", 2], + [39, "Pontmercy", 4], + [40, "Boulatruelle", 6], + [41, "Eponine", 4], + [42, "Anzelma", 4], + [43, "Woman2", 5], + [44, "MotherInnocent", 0], + [45, "Gribier", 0], + [46, "Jondrette", 7], + [47, "Mme.Burgon", 7], + [48, "Gavroche", 8], + [49, "Gillenormand", 5], + [50, "Magnon", 5], + [51, "Mlle.Gillenormand", 5], + [52, "Mme.Pontmercy", 5], + [53, "Mlle.Vaubois", 5], + [54, "Lt.Gillenormand", 5], + [55, "Marius", 8], + [56, "BaronessT", 5], + [57, "Mabeuf", 8], + [58, "Enjolras", 8], + [59, "Combeferre", 8], + [60, "Prouvaire", 8], + [61, "Feuilly", 8], + [62, "Courfeyrac", 8], + [63, "Bahorel", 8], + [64, "Bossuet", 8], + [65, "Joly", 8], + [66, "Grantaire", 8], + [67, "MotherPlutarch", 9], + [68, "Gueulemer", 4], + [69, "Babet", 4], + [70, "Claquesous", 4], + [71, "Montparnasse", 4], + [72, "Toussaint", 5], + [73, "Child1", 10], + [74, "Child2", 10], + [75, "Brujon", 4], + [76, "Mme.Hucheloup", 8] +]; +const DataGraphVerticesColumns = ["id", "label", "group", "centroid", "ann1", "ann2", "ann3"]; +const DataGraphVertices = DataGraphVerticesRaw.map(v => ([...v, v[1] === "Valjean", Math.random() > .8, Math.random() > .8, Math.random() > .8])); +const DataGraphEdges = [ + ["1->0", 1, 0, 1], + ["2->0", 2, 0, 8], + ["3->0", 3, 0, 10], + ["3->2", 3, 2, 6], + ["4->0", 4, 0, 1], + ["5->0", 5, 0, 1], + ["6->0", 6, 0, 1], + ["7->0", 7, 0, 1], + ["8->0", 8, 0, 2], + ["9->0", 9, 0, 1], + ["11->10", 11, 10, 1], + ["11->3", 11, 3, 3], + ["11->2", 11, 2, 3], + ["11->0", 11, 0, 5], + ["12->11", 12, 11, 1], + ["13->11", 13, 11, 1], + ["14->11", 14, 11, 1], + ["15->11", 15, 11, 1], + ["17->16", 17, 16, 4], + ["18->16", 18, 16, 4], + ["18->17", 18, 17, 4], + ["19->16", 19, 16, 4], + ["19->17", 19, 17, 4], + ["19->18", 19, 18, 4], + ["20->16", 20, 16, 3], + ["20->17", 20, 17, 3], + ["20->18", 20, 18, 3], + ["20->19", 20, 19, 4], + ["21->16", 21, 16, 3], + ["21->17", 21, 17, 3], + ["21->18", 21, 18, 3], + ["21->19", 21, 19, 3], + ["21->20", 21, 20, 5], + ["22->16", 22, 16, 3], + ["22->17", 22, 17, 3], + ["22->18", 22, 18, 3], + ["22->19", 22, 19, 3], + ["22->20", 22, 20, 4], + ["22->21", 22, 21, 4], + ["23->16", 23, 16, 3], + ["23->17", 23, 17, 3], + ["23->18", 23, 18, 3], + ["23->19", 23, 19, 3], + ["23->20", 23, 20, 4], + ["23->21", 23, 21, 4], + ["23->22", 23, 22, 4], + ["23->12", 23, 12, 2], + ["23->11", 23, 11, 9], + ["24->23", 24, 23, 2], + ["24->11", 24, 11, 7], + ["25->24", 25, 24, 13], + ["25->23", 25, 23, 1], + ["25->11", 25, 11, 12], + ["26->24", 26, 24, 4], + ["26->11", 26, 11, 31], + ["26->16", 26, 16, 1], + ["26->25", 26, 25, 1], + ["27->11", 27, 11, 17], + ["27->23", 27, 23, 5], + ["27->25", 27, 25, 5], + ["27->24", 27, 24, 1], + ["27->26", 27, 26, 1], + ["28->11", 28, 11, 8], + ["28->27", 28, 27, 1], + ["29->23", 29, 23, 1], + ["29->27", 29, 27, 1], + ["29->11", 29, 11, 2], + ["30->23", 30, 23, 1], + ["31->30", 31, 30, 2], + ["31->11", 31, 11, 3], + ["31->23", 31, 23, 2], + ["31->27", 31, 27, 1], + ["32->11", 32, 11, 1], + ["33->11", 33, 11, 2], + ["33->27", 33, 27, 1], + ["34->11", 34, 11, 3], + ["34->29", 34, 29, 2], + ["35->11", 35, 11, 3], + ["35->34", 35, 34, 3], + ["35->29", 35, 29, 2], + ["36->34", 36, 34, 2], + ["36->35", 36, 35, 2], + ["36->11", 36, 11, 2], + ["36->29", 36, 29, 1], + ["37->34", 37, 34, 2], + ["37->35", 37, 35, 2], + ["37->36", 37, 36, 2], + ["37->11", 37, 11, 2], + ["37->29", 37, 29, 1], + ["38->34", 38, 34, 2], + ["38->35", 38, 35, 2], + ["38->36", 38, 36, 2], + ["38->37", 38, 37, 2], + ["38->11", 38, 11, 2], + ["38->29", 38, 29, 1], + ["39->25", 39, 25, 1], + ["40->25", 40, 25, 1], + ["41->24", 41, 24, 2], + ["41->25", 41, 25, 3], + ["42->41", 42, 41, 2], + ["42->25", 42, 25, 2], + ["42->24", 42, 24, 1], + ["43->11", 43, 11, 3], + ["43->26", 43, 26, 1], + ["43->27", 43, 27, 1], + ["44->28", 44, 28, 3], + ["44->11", 44, 11, 1], + ["45->28", 45, 28, 2], + ["47->46", 47, 46, 1], + ["48->47", 48, 47, 2], + ["48->25", 48, 25, 1], + ["48->27", 48, 27, 1], + ["48->11", 48, 11, 1], + ["49->26", 49, 26, 3], + ["49->11", 49, 11, 2], + ["50->49", 50, 49, 1], + ["50->24", 50, 24, 1], + ["51->49", 51, 49, 9], + ["51->26", 51, 26, 2], + ["51->11", 51, 11, 2], + ["52->51", 52, 51, 1], + ["52->39", 52, 39, 1], + ["53->51", 53, 51, 1], + ["54->51", 54, 51, 2], + ["54->49", 54, 49, 1], + ["54->26", 54, 26, 1], + ["55->51", 55, 51, 6], + ["55->49", 55, 49, 12], + ["55->39", 55, 39, 1], + ["55->54", 55, 54, 1], + ["55->26", 55, 26, 21], + ["55->11", 55, 11, 19], + ["55->16", 55, 16, 1], + ["55->25", 55, 25, 2], + ["55->41", 55, 41, 5], + ["55->48", 55, 48, 4], + ["56->49", 56, 49, 1], + ["56->55", 56, 55, 1], + ["57->55", 57, 55, 1], + ["57->41", 57, 41, 1], + ["57->48", 57, 48, 1], + ["58->55", 58, 55, 7], + ["58->48", 58, 48, 7], + ["58->27", 58, 27, 6], + ["58->57", 58, 57, 1], + ["58->11", 58, 11, 4], + ["59->58", 59, 58, 15], + ["59->55", 59, 55, 5], + ["59->48", 59, 48, 6], + ["59->57", 59, 57, 2], + ["60->48", 60, 48, 1], + ["60->58", 60, 58, 4], + ["60->59", 60, 59, 2], + ["61->48", 61, 48, 2], + ["61->58", 61, 58, 6], + ["61->60", 61, 60, 2], + ["61->59", 61, 59, 5], + ["61->57", 61, 57, 1], + ["61->55", 61, 55, 1], + ["62->55", 62, 55, 9], + ["62->58", 62, 58, 17], + ["62->59", 62, 59, 13], + ["62->48", 62, 48, 7], + ["62->57", 62, 57, 2], + ["62->41", 62, 41, 1], + ["62->61", 62, 61, 6], + ["62->60", 62, 60, 3], + ["63->59", 63, 59, 5], + ["63->48", 63, 48, 5], + ["63->62", 63, 62, 6], + ["63->57", 63, 57, 2], + ["63->58", 63, 58, 4], + ["63->61", 63, 61, 3], + ["63->60", 63, 60, 2], + ["63->55", 63, 55, 1], + ["64->55", 64, 55, 5], + ["64->62", 64, 62, 12], + ["64->48", 64, 48, 5], + ["64->63", 64, 63, 4], + ["64->58", 64, 58, 10], + ["64->61", 64, 61, 6], + ["64->60", 64, 60, 2], + ["64->59", 64, 59, 9], + ["64->57", 64, 57, 1], + ["64->11", 64, 11, 1], + ["65->63", 65, 63, 5], + ["65->64", 65, 64, 7], + ["65->48", 65, 48, 3], + ["65->62", 65, 62, 5], + ["65->58", 65, 58, 5], + ["65->61", 65, 61, 5], + ["65->60", 65, 60, 2], + ["65->59", 65, 59, 5], + ["65->57", 65, 57, 1], + ["65->55", 65, 55, 2], + ["66->64", 66, 64, 3], + ["66->58", 66, 58, 3], + ["66->59", 66, 59, 1], + ["66->62", 66, 62, 2], + ["66->65", 66, 65, 2], + ["66->48", 66, 48, 1], + ["66->63", 66, 63, 1], + ["66->61", 66, 61, 1], + ["66->60", 66, 60, 1], + ["67->57", 67, 57, 3], + ["68->25", 68, 25, 5], + ["68->11", 68, 11, 1], + ["68->24", 68, 24, 1], + ["68->27", 68, 27, 1], + ["68->48", 68, 48, 1], + ["68->41", 68, 41, 1], + ["69->25", 69, 25, 6], + ["69->68", 69, 68, 6], + ["69->11", 69, 11, 1], + ["69->24", 69, 24, 1], + ["69->27", 69, 27, 2], + ["69->48", 69, 48, 1], + ["69->41", 69, 41, 1], + ["70->25", 70, 25, 4], + ["70->69", 70, 69, 4], + ["70->68", 70, 68, 4], + ["70->11", 70, 11, 1], + ["70->24", 70, 24, 1], + ["70->27", 70, 27, 1], + ["70->41", 70, 41, 1], + ["70->58", 70, 58, 1], + ["71->27", 71, 27, 1], + ["71->69", 71, 69, 2], + ["71->68", 71, 68, 2], + ["71->70", 71, 70, 2], + ["71->11", 71, 11, 1], + ["71->48", 71, 48, 1], + ["71->41", 71, 41, 1], + ["71->25", 71, 25, 1], + ["72->26", 72, 26, 2], + ["72->27", 72, 27, 1], + ["72->11", 72, 11, 1], + ["73->48", 73, 48, 2], + ["74->48", 74, 48, 2], + ["74->73", 74, 73, 3], + ["75->69", 75, 69, 3], + ["75->68", 75, 68, 3], + ["75->25", 75, 25, 3], + ["75->48", 75, 48, 1], + ["75->41", 75, 41, 1], + ["75->70", 75, 70, 1], + ["75->71", 75, 71, 1], + ["76->64", 76, 64, 1], + ["76->65", 76, 65, 1], + ["76->66", 76, 66, 1], + ["76->63", 76, 63, 1], + ["76->62", 76, 62, 1], + ["76->48", 76, 48, 1], + ["76->58", 76, 58, 1] +]; + +describe("@hpcc-js/graph", () => { + for (const key in graph) { + const item = (graph as any)[key]; + if (item) { + if (!urlSearch || urlSearch === item.prototype.constructor.name) { + describe(`${item.prototype?.constructor?.name}`, () => { + it("Simple", () => { + expect(true).to.be.true; + }); + if (item.prototype instanceof Class) { + classDef("graph", item); + } + if (item.prototype instanceof HTMLWidget || item.prototype instanceof SVGWidget) { + switch (item.prototype.constructor) { + case Edge: + { + const graph = new Graph(); + const vertices: any[] = []; + const edges: any[] = []; + const palette = Palette.ordinal("dark2"); + + const rawData = data.simple; + rawData.nodes.forEach(function (node) { + vertices.push( + new Vertex() + .text(node.name) + .textbox_shape_colorStroke(palette(node.icon)) + .textbox_shape_colorFill("whitesmoke") + .icon_diameter(60) + .icon_shape_colorStroke("transparent") + .icon_shape_colorFill("transparent") + .icon_image_colorFill("#333333") + .textbox_shape_colorStroke("transparent") + .textbox_shape_colorFill("transparent") + .textbox_text_colorFill("#333333") + .iconAnchor("middle") + .faChar(node.icon) + ) + ; + }, graph); + + rawData.links.forEach(function (link, idx) { + edges.push( + new Edge() + .sourceVertex(vertices[link.source]) + .targetVertex(vertices[link.target]) + .sourceMarker("circle") + .targetMarker("arrow") + .text("Hello!") + .strokeDasharray(idx === 0 ? "15, 10, 5, 10, 15" : "") + .strokeColor(idx === 0 ? "cyan" : "") + .weight(50) + ) + ; + }, graph); + + graph.data({ vertices, edges }); + render(graph); + } + break; + case AdjacencyGraph: + render(new AdjacencyGraph() + .columns(["uid", "label", "links"]) + .data([ + [1, "AdjacencyGraph 1", [[2], [3], [4]]], + [2, "AdjacencyGraph 2", []], + [3, "AdjacencyGraph 3", []], + [4, "AdjacencyGraph 4", []] + ] as any) + ); + break; + case Graph: + { + const graph2 = new Graph(); + const vertices2: any[] = []; + const edges2: any[] = []; + const palette2 = Palette.ordinal("dark2"); + + const rawData2 = data.simple; + rawData2.nodes.forEach(function (node) { + vertices2.push( + new Vertex() + .text(node.name) + .textbox_shape_colorStroke(palette2(node.icon)) + .textbox_shape_colorFill("whitesmoke") + .icon_diameter(30) + .icon_shape_colorStroke(palette2(node.icon)) + .icon_shape_colorFill(palette2(node.icon)) + .faChar(node.icon) + ); + }, graph2); + + rawData2.links.forEach(function (link, idx) { + edges2.push( + new Edge() + .sourceVertex(vertices2[link.source]) + .targetVertex(vertices2[link.target]) + .sourceMarker("circle") + .targetMarker("arrow") + .text("") + .weight(50) + ); + }, graph2); + + graph2.data({ vertices: vertices2, edges: edges2 }); + render(graph2); + } + break; + case GraphT: + { + const subgraphsB = [ + { id: "10", text: "Adults" } + ]; + + const verticesB = [ + { id: "0", text: "Daddy", annotations: [] }, + { id: "1", text: "Mummy", annotations: [] }, + { id: "2", text: "Baby", annotations: [] } + ]; + + const edgesB = [ + { id: "0", source: verticesB[0], target: verticesB[2] }, + { id: "1", source: verticesB[1], target: verticesB[2] } + ]; + + const hierarchyB = [ + { id: "0", parent: subgraphsB[0], child: verticesB[0] }, + { id: "1", parent: subgraphsB[0], child: verticesB[1] } + ]; + + const graphB = new GraphT(BasicSubgraph, BasicVertex, ReactEdge) + .data({ subgraphs: subgraphsB, vertices: verticesB, edges: edgesB, hierarchy: hierarchyB }) + ; + + render(graphB); + } + break; + case GraphReactT: + { + const subgraphsB = [ + { id: "10", text: "Adults" } + ]; + + const verticesB = [ + { id: "0", text: "Daddy", annotations: [] }, + { id: "1", text: "Mummy", annotations: [] }, + { id: "2", text: "Baby", annotations: [] } + ]; + + const edgesB = [ + { id: "0", source: verticesB[0], target: verticesB[2] }, + { id: "1", source: verticesB[1], target: verticesB[2] } + ]; + + const hierarchyB = [ + { id: "0", parent: subgraphsB[0], child: verticesB[0] }, + { id: "1", parent: subgraphsB[0], child: verticesB[1] } + ]; + + const graphB = new GraphReactT(ReactSubgraph, ReactVertex, ReactEdge) + .data({ subgraphs: subgraphsB, vertices: verticesB, edges: edgesB, hierarchy: hierarchyB }) + ; + + render(graphB); + } + break; + case Graph2: + { + const subgraphsB = [ + { id: "10", text: "Adults" } + ]; + + const verticesB = [ + { id: "0", text: "Daddy", annotations: [] }, + { id: "1", text: "Mummy", annotations: [] }, + { id: "2", text: "Baby", annotations: [] } + ]; + + const edgesB = [ + { id: "0", source: verticesB[0], target: verticesB[2] }, + { id: "1", source: verticesB[1], target: verticesB[2] } + ]; + + const hierarchyB = [ + { id: "0", parent: subgraphsB[0], child: verticesB[0] }, + { id: "1", parent: subgraphsB[0], child: verticesB[1] } + ]; + + const graphB = new Graph2() + .data({ subgraphs: subgraphsB, vertices: verticesB, edges: edgesB, hierarchy: hierarchyB }) + ; + + render(graphB); + } + break; + case DataGraph: + { + const graphD = new DataGraph() + .categories((Array(11) as any).fill().map((_row: any, idx: number) => ({ id: "" + idx, faChar: "fa-user" }))) + .annotations((Array(11) as any).fill().map((_row: any, idx: number) => ({ id: "" + idx, faChar: "fa-plus" }))) + .vertexColumns(DataGraphVerticesColumns) + .vertexCategoryColumn("group") + .vertexIDColumn("id") + .vertexLabelColumn("label") + .vertexAnnotationColumns([ + new AnnotationColumn().columnID("ann1").annotationID("1"), + new AnnotationColumn().columnID("ann2").annotationID("2"), + new AnnotationColumn().columnID("ann3").annotationID("3") + ]) + .vertices(DataGraphVertices) + .edgeColumns(["id", "source", "target", "weight"]) + .edgeIDColumn("id") + .edgeSourceColumn("source") + .edgeTargetColumn("target") + .edgeWeightColumn("weight") + .edges(DataGraphEdges) + ; + render(graphD); + } + break; + case Sankey: + { + render(new Sankey() + .columns(dataBreach.columns) + .data(dataBreach.data) + .mappings([new SankeyColumn().column("Covered Entity Type"), new SankeyColumn().column("Type of Breach")]) + ); + } + break; + case SankeyGraph: + render(new SankeyGraph() + .vertexColumns(["category", "id", "label"]) + .vertices([ + [0, 0, "A"], + [0, 1, "B"], + [0, 2, "C"], + [0, 3, "D"], + [0, 4, "F"], + [1, 5, "Math"], + [2, 6, "English"], + [3, 7, "Geometry"], + [4, 8, "Science"], + ]) + .edgeColumns(["source", "target", "weight"]) + .edges([ + [0, 5, 48], + [0, 6, 28], + [0, 7, 26], + [0, 8, 38], + [1, 5, 63], + [1, 6, 39], + [1, 7, 36], + [1, 8, 58], + [2, 5, 42], + [2, 6, 36], + [2, 7, 27], + [2, 8, 68], + [3, 5, 90], + [3, 6, 59], + [3, 7, 15], + [3, 8, 35], + [4, 5, 10], + [4, 6, 3], + [4, 7, 6], + [4, 8, 4], + ]) + ); + break; + case Subgraph: + render(new Subgraph() + .title("Hello and Welcome!") + ); + break; + case Vertex: + render(new Vertex() + .faChar("\uf007") + .text("Hello and Welcome!") + .annotationIcons([ + { faChar: "\uf188", tooltip: "Test A", shape_colorFill: "white", image_colorFill: "red" }, + { faChar: "\uf0ad", tooltip: "Test B", shape_colorFill: "green", shape_colorStroke: "green", image_colorFill: "white" }, + { faChar: "\uf193", tooltip: "Test C", shape_colorFill: "navy", shape_colorStroke: "navy", image_colorFill: "white" } + ]) + ); + break; + default: + it("Has render test", () => { + expect(false).to.be.true; + }); + } + } + }); + } + } + } + + render(new Vertex() + .faChar("\uf007") + .text("Hello and Welcome!") + .annotationIcons([ + { faChar: "\uf188", tooltip: "Test A", shape_colorFill: "white", image_colorFill: "red" }, + { faChar: "\uf0ad", tooltip: "Test B", shape_colorFill: "green", shape_colorStroke: "green", image_colorFill: "white" }, + { faChar: "\uf193", tooltip: "Test C", shape_colorFill: "navy", shape_colorStroke: "navy", image_colorFill: "white" } + ]) + ); +}); diff --git a/packages/graph/tsconfig.json b/packages/graph/tsconfig.json index a2d5e4b44b..acfd3b2511 100644 --- a/packages/graph/tsconfig.json +++ b/packages/graph/tsconfig.json @@ -1,20 +1,25 @@ { - "extends": "../tsconfig.settings.json", "compilerOptions": { - "rootDir": "./src", - "outDir": "./lib-umd", - "declarationDir": "./types", - "jsx": "react" + "rootDir": "src", + "module": "NodeNext", + "target": "ESNext", + "resolveJsonModule": true, + "emitDeclarationOnly": true, + "declaration": true, + "declarationDir": "types", + "jsx": "react", + "strict": true, + "noImplicitAny": false, + "strictNullChecks": false, + "skipLibCheck": true, + "allowImportingTsExtensions": true, + "lib": [ + "DOM", + "ESNext", + "ES2020" + ] }, "include": [ - "./src/**/*" - ], - "references": [ - { - "path": "../api" - }, - { - "path": "../common" - } + "./src/index.ts" ] } \ No newline at end of file diff --git a/packages/graph/vitest.workspace.ts b/packages/graph/vitest.workspace.ts new file mode 100644 index 0000000000..fa7bb0720b --- /dev/null +++ b/packages/graph/vitest.workspace.ts @@ -0,0 +1,6 @@ +import { defineWorkspace } from 'vitest/config'; +import baseWorkspace from '../../vitest.workspace.ts'; + +export default defineWorkspace([ + ...baseWorkspace +]) \ No newline at end of file diff --git a/packages/html/.vscode/launch.json b/packages/html/.vscode/launch.json new file mode 100644 index 0000000000..967172fec7 --- /dev/null +++ b/packages/html/.vscode/launch.json @@ -0,0 +1,47 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "test-browser", + "type": "msedge", + "request": "launch", + "url": "http://localhost:63315", + "webRoot": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ], + }, + { + "name": "test-node", + "type": "node", + "request": "launch", + "runtimeArgs": [ + "run-script", + "test-node" + ], + "runtimeExecutable": "npm", + "skipFiles": [ + "/**" + ], + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ], + }, + { + "name": "index.html", + "request": "launch", + "type": "msedge", + "url": "file:///${workspaceFolder}/index.html", + "runtimeArgs": [ + "--disable-web-security" + ], + "webRoot": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ] + } + ] +} \ No newline at end of file diff --git a/packages/html/.vscode/tasks.json b/packages/html/.vscode/tasks.json index 7fffdb949c..120545d06c 100644 --- a/packages/html/.vscode/tasks.json +++ b/packages/html/.vscode/tasks.json @@ -1,20 +1,36 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { + "label": "gen-types-watch", "type": "npm", - "script": "compile-umd-watch", - "group": { - "kind": "build", - "isDefault": true - }, + "script": "gen-types-watch", "problemMatcher": [ "$tsc-watch" ], - "label": "npm: compile-umd-watch", - "detail": "tsc --module umd --outDir ./lib-umd --watch" + "presentation": { + "group": "group-build" + } + }, + { + "label": "bundle-watch", + "type": "npm", + "script": "bundle-watch", + "problemMatcher": [], + "presentation": { + "group": "group-build" + } + }, + { + "label": "build", + "dependsOn": [ + "gen-types-watch", + "bundle-watch", + ], + "group": { + "kind": "build", + "isDefault": true + } } ] } \ No newline at end of file diff --git a/packages/html/esbuild.js b/packages/html/esbuild.js new file mode 100644 index 0000000000..67b91a9988 --- /dev/null +++ b/packages/html/esbuild.js @@ -0,0 +1,29 @@ +import { browserTpl } from "@hpcc-js/esbuild-plugins"; +import pkg from "./package.json" with { type: "json" }; + +// config --- +await Promise.all([ + browserTpl("src/index.ts", "dist/index", { + keepNames: true, + alias: { + "d3-array": "@hpcc-js/common", + "d3-brush": "@hpcc-js/common", + "d3-collection": "@hpcc-js/common", + "d3-color": "@hpcc-js/common", + "d3-dispatch": "@hpcc-js/common", + "d3-drag": "@hpcc-js/common", + "d3-dsv": "@hpcc-js/common", + "d3-ease": "@hpcc-js/common", + "d3-format": "@hpcc-js/common", + "d3-interpolate": "@hpcc-js/common", + "d3-scale": "@hpcc-js/common", + "d3-selection": "@hpcc-js/common", + "d3-time-format": "@hpcc-js/common", + "d3-transition": "@hpcc-js/common", + "d3-zoom": "@hpcc-js/common" + }, + external: [ + ...Object.keys(pkg.dependencies), + ] + }) +]); diff --git a/packages/html/package.json b/packages/html/package.json index e069478cbf..96bde3d79c 100644 --- a/packages/html/package.json +++ b/packages/html/package.json @@ -1,52 +1,47 @@ { "name": "@hpcc-js/html", - "version": "2.44.0", + "version": "3.0.0", "description": "hpcc-js - Viz HTML", - "main": "dist/index.js", - "module": "dist/index.es6", - "unpkg": "dist/index.min.js", - "jsdelivr": "dist/index.min.js", - "types": "types/index.d.ts", - "typesVersions": { - "<3.8": { - "*": [ - "types-3.4/index.d.ts" - ] + "type": "module", + "exports": { + ".": { + "types": "./types/index.d.ts", + "default": "./dist/index.js" } }, + "module": "./dist/index.js", + "browser": "./dist/index.js", + "types": "./types/index.d.ts", "files": [ "dist/*", - "types/*", - "types-3.4/*", - "src/*" + "src/*", + "types/*" ], "scripts": { - "clean": "rimraf --glob lib* types dist *.tsbuildinfo", - "compile-es6": "tsc --module es6 --outDir ./lib-es6", - "compile-es6-watch": "npm run compile-es6 -- -w", - "compile-umd": "tsc --module umd --outDir ./lib-umd", - "compile-umd-watch": "npm run compile-umd -- -w", - "bundle": "rollup -c", - "bundle-watch": "npm run bundle -- -w", - "minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js", - "gen-legacy-types": "downlevel-dts ./types ./types-3.4", - "build": "npm run compile-es6 && npm run bundle", - "watch": "npm-run-all compile-es6 -p compile-es6-watch bundle-watch", + "clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo", + "bundle": "node esbuild.js", + "bundle-watch": "npm run bundle -- --development --watch", + "gen-types": "tsc --project tsconfig.json", + "gen-types-watch": "npm run gen-types -- --watch", + "build": "run-p gen-types bundle", "stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js", "lint": "eslint ./src", + "lint-fix": "eslint --fix src/**/*.ts", "docs": "typedoc --options tdoptions.json .", - "update": "npx --yes npm-check-updates -u -t minor" + "test-browser": "vitest run --project browser", + "test": "vitest run", + "coverage": "vitest run --coverage", + "update": "npx --yes npm-check-updates -u -t minor", + "update-major": "npx --yes npm-check-updates -u" }, "dependencies": { - "@hpcc-js/common": "^2.73.0", - "@hpcc-js/preact-shim": "^2.18.0", - "@hpcc-js/util": "^2.53.0" + "@hpcc-js/common": "^3.1.0", + "@hpcc-js/util": "^3.1.0" }, "devDependencies": { - "@hpcc-js/bundle": "^2.12.0", + "@hpcc-js/esbuild-plugins": "^1.2.0", "d3-format": "^1", - "d3-selection": "^1", - "tslib": "2.7.0" + "d3-selection": "^1" }, "repository": { "type": "git", @@ -59,4 +54,4 @@ "url": "https://github.com/hpcc-systems/Visualization/issues" }, "homepage": "https://github.com/hpcc-systems/Visualization" -} +} \ No newline at end of file diff --git a/packages/html/rollup.config.mjs b/packages/html/rollup.config.mjs deleted file mode 100644 index 3e0b2b9d2a..0000000000 --- a/packages/html/rollup.config.mjs +++ /dev/null @@ -1,56 +0,0 @@ -import { external, globals } from "@hpcc-js/bundle"; -import alias from '@rollup/plugin-alias'; -import commonjs from '@rollup/plugin-commonjs'; -import sourcemaps from 'rollup-plugin-sourcemaps'; -import nodeResolve from '@rollup/plugin-node-resolve'; -import postcss from "rollup-plugin-postcss"; - -import pkg from "./package.json" with { type: "json" }; - -export default { - input: "lib-es6/index", - external: external, - output: [{ - file: pkg.main, - format: "umd", - sourcemap: true, - globals: globals, - name: pkg.name - }, { - file: pkg.module + ".js", - format: "es", - sourcemap: true, - globals: globals, - name: pkg.name - }], - plugins: [ - alias({ - entries: [ - { find: "d3-array", replacement: "@hpcc-js/common" }, - { find: "d3-brush", replacement: "@hpcc-js/common" }, - { find: "d3-collection", replacement: "@hpcc-js/common" }, - { find: "d3-color", replacement: "@hpcc-js/common" }, - { find: "d3-dispatch", replacement: "@hpcc-js/common" }, - { find: "d3-drag", replacement: "@hpcc-js/common" }, - { find: "d3-dsv", replacement: "@hpcc-js/common" }, - { find: "d3-ease", replacement: "@hpcc-js/common" }, - { find: "d3-format", replacement: "@hpcc-js/common" }, - { find: "d3-interpolate", replacement: "@hpcc-js/common" }, - { find: "d3-scale", replacement: "@hpcc-js/common" }, - { find: "d3-selection", replacement: "@hpcc-js/common" }, - { find: "d3-time-format", replacement: "@hpcc-js/common" }, - { find: "d3-transition", replacement: "@hpcc-js/common" }, - { find: "d3-zoom", replacement: "@hpcc-js/common" } - ] - }), - nodeResolve({ - preferBuiltins: true - }), - commonjs({}), - sourcemaps(), - postcss({ - extensions: [".css"], - minimize: true - }) - ] -}; \ No newline at end of file diff --git a/packages/html/src/BreakdownTable.ts b/packages/html/src/BreakdownTable.ts index 73f27851db..c8d1f7260e 100644 --- a/packages/html/src/BreakdownTable.ts +++ b/packages/html/src/BreakdownTable.ts @@ -1,10 +1,10 @@ -import { HTMLTooltip } from "./HTMLTooltip"; -import { StyledTable } from "./StyledTable"; +import { HTMLTooltip } from "./HTMLTooltip.ts"; +import { StyledTable } from "./StyledTable.ts"; export class BreakdownTable extends StyledTable { - protected _table; - protected _tbody; - protected _tooltip; + // protected _table; + // protected _tbody; + protected _tooltip: HTMLTooltip; constructor() { super(); } diff --git a/packages/html/src/HTMLTooltip.ts b/packages/html/src/HTMLTooltip.ts index 5c99bd457c..dd642f1265 100644 --- a/packages/html/src/HTMLTooltip.ts +++ b/packages/html/src/HTMLTooltip.ts @@ -1,6 +1,5 @@ -import { HTMLWidget } from "@hpcc-js/common"; +import { HTMLWidget, select as d3Select } from "@hpcc-js/common"; import { scopedLogger, ScopedLogging } from "@hpcc-js/util"; -import { select as d3Select } from "d3-selection"; type Direction = "n" | "s" | "e" | "w" | "ne" | "nw" | "se" | "sw"; type Position = { x: number, y: number }; @@ -56,19 +55,19 @@ export class HTMLTooltip extends HTMLWidget { update(domNode, element) { super.update(domNode, element); - if(this._contentNode !== this._prevContentNode){ + if (this._contentNode !== this._prevContentNode) { const node = this._tooltipElement.node(); [...node.querySelectorAll("*")] - .map(n=>n.__data__) - .filter(n=>n) - .forEach(w=>{ - if(typeof w.target === "function"){ - w.target(null); - } - if(typeof w.exit === "function"){ - w.exit(); - } - }); + .map(n => n.__data__) + .filter(n => n) + .forEach(w => { + if (typeof w.target === "function") { + w.target(null); + } + if (typeof w.exit === "function") { + w.exit(); + } + }); node.innerHTML = ""; node.appendChild(this._contentNode); this._prevContentNode = this._contentNode; @@ -82,7 +81,7 @@ export class HTMLTooltip extends HTMLWidget { return this._tooltipHTMLCallback(this.data()); }); } - if(this.fitContent()){ + if (this.fitContent()) { this._tooltipElement .style("width", "auto") .style("height", "auto") @@ -112,7 +111,7 @@ export class HTMLTooltip extends HTMLWidget { } onShowContent(node) { - + } protected updateTooltipPosition(): Position { @@ -259,8 +258,8 @@ export class HTMLTooltip extends HTMLWidget { const p = this.padding(); const p2 = p * 2; - if(this.followCursor() && this._cursorLoc) { - + if (this.followCursor() && this._cursorLoc) { + left = this._cursorLoc[0]; top = this._cursorLoc[1]; width = 1; @@ -312,8 +311,8 @@ export class HTMLTooltip extends HTMLWidget { this._tooltipElement.on("mouseout", () => { this.mouseout(); }); - setTimeout(()=>{ - if(this._closing){ + setTimeout(() => { + if (this._closing) { this.visible(false); } }, this.closeDelay()); @@ -368,7 +367,7 @@ export interface HTMLTooltip { closeDelay(_: number): this; fitContent(): boolean; fitContent(_: boolean): this; - + } HTMLTooltip.prototype.publish("fitContent", false, "boolean", "If true, tooltip will grow to fit its html content"); diff --git a/packages/html/src/JSXWidget.ts b/packages/html/src/JSXWidget.ts index c07f53d513..349af47564 100644 --- a/packages/html/src/JSXWidget.ts +++ b/packages/html/src/JSXWidget.ts @@ -1,9 +1,10 @@ +import React from "react"; +import { render } from "react-dom"; import { HTMLWidget } from "@hpcc-js/common"; -import { Component, createElement, render } from "@hpcc-js/preact-shim"; export class JSXWidget extends HTMLWidget { - static Component = Component; - static createElement = createElement; + static Component = React.Component; + static createElement = React.createElement; protected rootNode; jsxRender(jsx, domNode) { diff --git a/packages/html/src/SimpleTable.ts b/packages/html/src/SimpleTable.ts index e22a5f35f1..4234b177a1 100644 --- a/packages/html/src/SimpleTable.ts +++ b/packages/html/src/SimpleTable.ts @@ -1,5 +1,4 @@ -import { HTMLWidget } from "@hpcc-js/common"; -import { select as d3Select } from "d3-selection"; +import { HTMLWidget, select as d3Select } from "@hpcc-js/common"; export class SimpleTable extends HTMLWidget { protected _table; diff --git a/packages/html/src/StatsTable.ts b/packages/html/src/StatsTable.ts index d8317fce2c..cbb527fa0c 100644 --- a/packages/html/src/StatsTable.ts +++ b/packages/html/src/StatsTable.ts @@ -1,5 +1,5 @@ import { format as d3Format } from "d3-format"; -import { StyledTable } from "./StyledTable"; +import { StyledTable } from "./StyledTable.ts"; export class StatsTable extends StyledTable { @@ -99,5 +99,5 @@ StatsTable.prototype.publish("evenRowFontColor", "#333", "html-color", "Font col StatsTable.prototype.publish("firstColumnWidth", "auto", "string", "CSS style applied as the 'width' for the first column (ex: 40px)"); StatsTable.prototype.publish("secondColumnWidth", "1%", "string", "CSS style applied as the 'width' for the second column (ex: 40px)"); StatsTable.prototype.publish("thirdColumnWidth", "1%", "string", "CSS style applied as the 'width' for the third column (ex: 40px)"); -StatsTable.prototype.publish("secondColumnFormat", "$,.0f", "string", "d3-format specifier applied to the second column's values", undefined, {optional: true}); -StatsTable.prototype.publish("thirdColumnFormat", null, "string", "d3-format specifier applied to the third column's values", undefined, {optional: true}); +StatsTable.prototype.publish("secondColumnFormat", "$,.0f", "string", "d3-format specifier applied to the second column's values", undefined, { optional: true }); +StatsTable.prototype.publish("thirdColumnFormat", null, "string", "d3-format specifier applied to the third column's values", undefined, { optional: true }); diff --git a/packages/html/src/StyledTable.ts b/packages/html/src/StyledTable.ts index 584fffc519..6e814b39ce 100644 --- a/packages/html/src/StyledTable.ts +++ b/packages/html/src/StyledTable.ts @@ -1,4 +1,4 @@ -import { SimpleTable } from "./SimpleTable"; +import { SimpleTable } from "./SimpleTable.ts"; export class StyledTable extends SimpleTable { constructor() { @@ -30,11 +30,11 @@ export class StyledTable extends SimpleTable { const lastRowStylesExist = Object.keys(this.lastRowStyles()).length > 0; const tbodyRows = element.selectAll("tbody > tr"); if (evenRowStylesExist) { - const tbodyEvenRows = tbodyRows.select(function (d, i) { return i % 2 ? this : null; }); + const tbodyEvenRows = tbodyRows.select(function (this: HTMLElement, d, i) { return i % 2 ? this : null; }); this.applyStyleObject(tbodyEvenRows, this.evenRowStyles()); } if (lastRowStylesExist) { - const tbodyLastRow = tbodyRows.select(function (d, i, arr) { return i === arr.length - 1 ? this : null; }); + const tbodyLastRow = tbodyRows.select(function (this: HTMLElement, d, i, arr) { return i === arr.length - 1 ? this : null; }); this.applyStyleObject(tbodyLastRow, this.lastRowStyles()); } } @@ -46,18 +46,18 @@ export interface StyledTable { fontFamily(_: string): this; fontColor(): string; fontColor(_: string): this; - tbodyColumnStyles(): Array<{[styleID: string]: any}>; - tbodyColumnStyles(_: Array<{[styleID: string]: any}>): this; - tbodyColumnStyles_default(_: Array<{[styleID: string]: any}>): this; - theadColumnStyles(): Array<{[styleID: string]: any}>; - theadColumnStyles(_: Array<{[styleID: string]: any}>): this; - theadColumnStyles_default(_: Array<{[styleID: string]: any}>): this; - lastRowStyles(): {[styleID: string]: any}; - lastRowStyles(_: {[styleID: string]: any}): this; - lastRowStyles_default(_: {[styleID: string]: any}): this; - evenRowStyles(): {[styleID: string]: any}; - evenRowStyles(_: {[styleID: string]: any}): this; - evenRowStyles_default(_: {[styleID: string]: any}): this; + tbodyColumnStyles(): Array<{ [styleID: string]: any }>; + tbodyColumnStyles(_: Array<{ [styleID: string]: any }>): this; + tbodyColumnStyles_default(_: Array<{ [styleID: string]: any }>): this; + theadColumnStyles(): Array<{ [styleID: string]: any }>; + theadColumnStyles(_: Array<{ [styleID: string]: any }>): this; + theadColumnStyles_default(_: Array<{ [styleID: string]: any }>): this; + lastRowStyles(): { [styleID: string]: any }; + lastRowStyles(_: { [styleID: string]: any }): this; + lastRowStyles_default(_: { [styleID: string]: any }): this; + evenRowStyles(): { [styleID: string]: any }; + evenRowStyles(_: { [styleID: string]: any }): this; + evenRowStyles_default(_: { [styleID: string]: any }): this; } StyledTable.prototype.publish("fontFamily", "Verdana", "string", "Base font-family used within the table"); diff --git a/packages/html/src/TitleBar.ts b/packages/html/src/TitleBar.ts index d4d47203e1..705047c4f4 100644 --- a/packages/html/src/TitleBar.ts +++ b/packages/html/src/TitleBar.ts @@ -1,5 +1,5 @@ import { HTMLWidget } from "@hpcc-js/common"; -import { JSXWidget } from "./JSXWidget"; +import { JSXWidget } from "./JSXWidget.ts"; import "../src/TitleBar.css"; @@ -9,7 +9,6 @@ export interface IClickHandler { export class Item extends HTMLWidget { protected _owner: IClickHandler; - protected _element; constructor(owner: IClickHandler) { super(); @@ -17,6 +16,7 @@ export class Item extends HTMLWidget { this._tag = "a"; } } +Item.prototype._class += " html_Item"; export class Button extends Item { private _icon: string; @@ -40,6 +40,7 @@ export class Button extends Item { ; } } +Button.prototype._class += " html_Button"; export class ToggleButton extends Button { @@ -56,6 +57,7 @@ export class ToggleButton extends Button { this._element.classed("selected", this.selected()); } } +ToggleButton.prototype._class += " html_ToggleButton"; export interface ToggleButton { selected(): boolean; selected(_: boolean): this; @@ -73,6 +75,7 @@ export class Spacer extends Item { ; } } +Spacer.prototype._class += " html_Spacer"; export class TitleBar extends JSXWidget { protected _divMain; diff --git a/packages/html/src/VizComponent.tsx b/packages/html/src/VizComponent.tsx index 48969903a7..83b85b1ad9 100644 --- a/packages/html/src/VizComponent.tsx +++ b/packages/html/src/VizComponent.tsx @@ -1,5 +1,5 @@ import * as React from "@hpcc-js/preact-shim"; -import { JSXWidget } from "./JSXWidget"; +import { JSXWidget } from "./JSXWidget.ts"; export class VizComponent extends JSXWidget.Component { widget; diff --git a/packages/html/src/VizInstance.tsx b/packages/html/src/VizInstance.tsx index 23acfe40e2..a3a5a79230 100644 --- a/packages/html/src/VizInstance.tsx +++ b/packages/html/src/VizInstance.tsx @@ -1,5 +1,5 @@ import * as React from "@hpcc-js/preact-shim"; -import { JSXWidget } from "./JSXWidget"; +import { JSXWidget } from "./JSXWidget.ts"; export class VizInstance extends JSXWidget.Component { widget; diff --git a/packages/html/src/index.ts b/packages/html/src/index.ts index 2a8649da90..322aa97527 100644 --- a/packages/html/src/index.ts +++ b/packages/html/src/index.ts @@ -1,11 +1,11 @@ -export * from "./__package__"; -export * from "./BreakdownTable"; -export * from "./HTMLTooltip"; -export * from "./JSXWidget"; -export * from "./reactD3"; -export * from "./VizComponent"; -export * from "./VizInstance"; -export * from "./SimpleTable"; -export * from "./StatsTable"; -export * from "./StyledTable"; -export * from "./TitleBar"; +export * from "./__package__.ts"; +export * from "./BreakdownTable.ts"; +export * from "./HTMLTooltip.ts"; +export * from "./JSXWidget.ts"; +export * from "./reactD3.ts"; +export * from "./VizComponent.tsx"; +export * from "./VizInstance.tsx"; +export * from "./SimpleTable.ts"; +export * from "./StatsTable.ts"; +export * from "./StyledTable.ts"; +export * from "./TitleBar.ts"; diff --git a/packages/html/src/reactD3.ts b/packages/html/src/reactD3.ts index a9af46e957..394d086295 100644 --- a/packages/html/src/reactD3.ts +++ b/packages/html/src/reactD3.ts @@ -1,4 +1,4 @@ -import { select as d3Select } from "d3-selection"; +import { select as d3Select } from "@hpcc-js/common"; export type ReactFn = (attrs: { [key: string]: string }) => VNode; @@ -42,7 +42,7 @@ export class VNode { return thisElement.enter().append(this.type()) .attr("reactd3", 0) .merge(thisElement) - .each(function (d: VNode) { + .each(function (this: HTMLElement, d: VNode) { const element = d3Select(this); d.update(element); d.renderChildren(element); @@ -57,7 +57,7 @@ export class VNode { return thisElement.enter().append(d => document.createElement(d.type())) .attr("reactd3", (_d, i) => i) .merge(thisElement) - .each(function (d: VNode) { + .each(function (this: HTMLElement, d: VNode) { const element = d3Select(this); d.update(element); d.renderChildren(element); diff --git a/packages/html/tests/html.browser.spec.ts b/packages/html/tests/html.browser.spec.ts new file mode 100644 index 0000000000..3ae288c7d1 --- /dev/null +++ b/packages/html/tests/html.browser.spec.ts @@ -0,0 +1,47 @@ +import * as html from "@hpcc-js/html"; +import { Class, HTMLWidget, SVGWidget } from "@hpcc-js/common"; +import { Button, Item, JSXWidget, SimpleTable, Spacer, StatsTable, StyledTable, TitleBar, HTMLTooltip, BreakdownTable, ToggleButton } from "@hpcc-js/html"; +import { describe, it, expect } from "vitest"; +import { classDef, renderMedium } from "../../common/tests/index.ts"; + +const urlSearch: string = window.location.href.split("?")[1]; + +describe("@hpcc-js/html", () => { + for (const key in html) { + const item = (html as any)[key]; + if (item) { + if (!urlSearch || urlSearch === item.prototype.constructor.name) { + describe(`${item.prototype?.constructor?.name}`, () => { + it("Simple", () => { + expect(true).to.be.true; + }); + if (item.prototype instanceof Class) { + classDef("html", item); + } + if (item.prototype instanceof HTMLWidget || item.prototype instanceof SVGWidget) { + switch (item.prototype.constructor) { + case Button: + case BreakdownTable: + case HTMLTooltip: + case Item: + case JSXWidget: + case SimpleTable: + case Spacer: + case StatsTable: + case StyledTable: + case TitleBar: + case ToggleButton: + renderMedium(new item.prototype.constructor()); + break; + + default: + it("Has render test", () => { + expect(false).to.be.true; + }); + } + } + }); + } + } + } +}); diff --git a/packages/html/tsconfig.json b/packages/html/tsconfig.json index a2506a626f..acfd3b2511 100644 --- a/packages/html/tsconfig.json +++ b/packages/html/tsconfig.json @@ -1,20 +1,25 @@ { - "extends": "../tsconfig.settings.json", "compilerOptions": { - "rootDir": "./src", - "outDir": "./lib-umd", - "declarationDir": "./types", - "jsx": "react" + "rootDir": "src", + "module": "NodeNext", + "target": "ESNext", + "resolveJsonModule": true, + "emitDeclarationOnly": true, + "declaration": true, + "declarationDir": "types", + "jsx": "react", + "strict": true, + "noImplicitAny": false, + "strictNullChecks": false, + "skipLibCheck": true, + "allowImportingTsExtensions": true, + "lib": [ + "DOM", + "ESNext", + "ES2020" + ] }, "include": [ - "./src/**/*" - ], - "references": [ - { - "path": "../api" - }, - { - "path": "../common" - }, + "./src/index.ts" ] } \ No newline at end of file diff --git a/packages/html/vitest.workspace.ts b/packages/html/vitest.workspace.ts new file mode 100644 index 0000000000..fa7bb0720b --- /dev/null +++ b/packages/html/vitest.workspace.ts @@ -0,0 +1,6 @@ +import { defineWorkspace } from 'vitest/config'; +import baseWorkspace from '../../vitest.workspace.ts'; + +export default defineWorkspace([ + ...baseWorkspace +]) \ No newline at end of file diff --git a/packages/markdown-it-plugins/tests/loader.node.spec.ts b/packages/markdown-it-plugins/tests/loader.node.spec.ts index 8ce32de0f2..e80ab4a876 100644 --- a/packages/markdown-it-plugins/tests/loader.node.spec.ts +++ b/packages/markdown-it-plugins/tests/loader.node.spec.ts @@ -18,7 +18,7 @@ describe("loader", () => { expect(data.length).toBeGreaterThan(0); }); - it("preidctions.csv", async () => { + it.skip("preidctions.csv", async () => { const predictions = await DataFile.attach("docs/data/predictions.json"); expect(predictions).toBeDefined(); const data = await predictions!.json(); diff --git a/packages/preact-shim/.vscode/tasks.json b/packages/preact-shim/.vscode/tasks.json index 7fffdb949c..120545d06c 100644 --- a/packages/preact-shim/.vscode/tasks.json +++ b/packages/preact-shim/.vscode/tasks.json @@ -1,20 +1,36 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { + "label": "gen-types-watch", "type": "npm", - "script": "compile-umd-watch", - "group": { - "kind": "build", - "isDefault": true - }, + "script": "gen-types-watch", "problemMatcher": [ "$tsc-watch" ], - "label": "npm: compile-umd-watch", - "detail": "tsc --module umd --outDir ./lib-umd --watch" + "presentation": { + "group": "group-build" + } + }, + { + "label": "bundle-watch", + "type": "npm", + "script": "bundle-watch", + "problemMatcher": [], + "presentation": { + "group": "group-build" + } + }, + { + "label": "build", + "dependsOn": [ + "gen-types-watch", + "bundle-watch", + ], + "group": { + "kind": "build", + "isDefault": true + } } ] } \ No newline at end of file diff --git a/packages/preact-shim/esbuild.js b/packages/preact-shim/esbuild.js new file mode 100644 index 0000000000..fe1b2e12f4 --- /dev/null +++ b/packages/preact-shim/esbuild.js @@ -0,0 +1,12 @@ +import { browserTpl } from "@hpcc-js/esbuild-plugins"; +import pkg from "./package.json" with { type: "json" }; + +// config --- +await Promise.all([ + browserTpl("src/index.ts", "dist/index", { + keepNames: true, + external: [ + ...Object.keys(pkg.dependencies), + ] + }) +]); diff --git a/packages/preact-shim/package.json b/packages/preact-shim/package.json index 836a72e693..b3769c9471 100644 --- a/packages/preact-shim/package.json +++ b/packages/preact-shim/package.json @@ -1,47 +1,40 @@ { "name": "@hpcc-js/preact-shim", - "version": "2.18.0", + "version": "3.0.0", "description": "hpcc-js - preact shim", - "main": "dist/index.js", - "module": "dist/index.es6", - "unpkg": "dist/index.min.js", - "jsdelivr": "dist/index.min.js", - "types": "types/index.d.ts", - "typesVersions": { - "<3.8": { - "*": [ - "types-3.4/index.d.ts" - ] + "type": "module", + "exports": { + ".": { + "types": "./types/index.d.ts", + "default": "./dist/index.js" } }, + "module": "./dist/index.js", + "browser": "./dist/index.js", + "types": "./types/index.d.ts", "files": [ "dist/*", - "types/*", - "types-3.4/*", - "src/*" + "src/*", + "types/*" ], "scripts": { - "clean": "rimraf --glob lib* types dist *.tsbuildinfo", - "compile-es6": "tsc --module es6 --outDir ./lib-es6", - "compile-es6-watch": "npm run compile-es6 -- -w", - "compile-umd": "tsc --module umd --outDir ./lib-umd", - "compile-umd-watch": "npm run compile-umd -- -w", - "bundle": "rollup -c", - "bundle-watch": "npm run bundle -- -w", - "minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js", - "gen-legacy-types": "downlevel-dts ./types ./types-3.4", - "build": "npm run compile-es6 && npm run bundle", - "watch": "npm-run-all compile-es6 -p compile-es6-watch bundle-watch", + "clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo", + "bundle": "node esbuild.js", + "bundle-watch": "npm run bundle -- --development --watch", + "gen-types": "tsc --project tsconfig.json", + "gen-types-watch": "npm run gen-types -- --watch", + "build": "run-p gen-types bundle", "stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js", "lint": "eslint ./src", + "lint-fix": "eslint --fix src/**/*.ts", "docs": "typedoc --options tdoptions.json .", - "update": "npx --yes npm-check-updates -u -t minor" - }, - "dependencies": { - "preact": "10.24.0" + "update": "npx --yes npm-check-updates -u -t minor", + "update-major": "npx --yes npm-check-updates -u" }, + "dependencies": {}, "devDependencies": { - "@hpcc-js/bundle": "^2.12.0" + "@hpcc-js/esbuild-plugins": "^1.2.0", + "preact": "10.24.3" }, "repository": { "type": "git", @@ -54,4 +47,4 @@ "url": "https://github.com/hpcc-systems/Visualization/issues" }, "homepage": "https://github.com/hpcc-systems/Visualization" -} +} \ No newline at end of file diff --git a/packages/preact-shim/rollup.config.mjs b/packages/preact-shim/rollup.config.mjs deleted file mode 100644 index 2817812d53..0000000000 --- a/packages/preact-shim/rollup.config.mjs +++ /dev/null @@ -1,39 +0,0 @@ -import { external, globals } from "@hpcc-js/bundle"; -import alias from '@rollup/plugin-alias'; -import commonjs from '@rollup/plugin-commonjs'; -import sourcemaps from 'rollup-plugin-sourcemaps'; -import nodeResolve from '@rollup/plugin-node-resolve'; -import postcss from "rollup-plugin-postcss"; - -import pkg from "./package.json" with { type: "json" }; - -export default { - input: "lib-es6/index", - external: external, - output: [{ - file: pkg.main, - format: "umd", - sourcemap: true, - globals: globals, - name: pkg.name - }, { - file: pkg.module + ".js", - format: "es", - sourcemap: true, - globals: globals, - name: pkg.name - }], - plugins: [ - alias({}), - nodeResolve({ - preferBuiltins: true - }), - commonjs({ - }), - sourcemaps(), - postcss({ - extensions: [".css"], - minimize: true - }) - ] -}; \ No newline at end of file diff --git a/packages/preact-shim/src/index.ts b/packages/preact-shim/src/index.ts index 59f9368447..f25f934fd0 100644 --- a/packages/preact-shim/src/index.ts +++ b/packages/preact-shim/src/index.ts @@ -1,4 +1,27 @@ -export * from "./__package__"; +export * from "./__package__.ts"; export { createElement, Component, Fragment, h, render } from "preact"; export type { FunctionComponent } from "preact"; export { useCallback, useEffect, useMemo, useReducer, useState } from "preact/hooks"; + +/* + * A Preact 11+ implementation of the `replaceNode` parameter from Preact 10. + * + * This creates a "Persistent Fragment" (a fake DOM element) containing one or more + * DOM nodes, which can then be passed as the `parent` argument to Preact's `render()` method. + +export function createRootFragment(parent, replaceNode) { + replaceNode = [].concat(replaceNode); + var s = replaceNode[replaceNode.length - 1].nextSibling; + function insert(c, r) { parent.insertBefore(c, r || s); } + return parent.__k = { + nodeType: 1, + parentNode: parent, + firstChild: replaceNode[0], + childNodes: replaceNode, + insertBefore: insert, + appendChild: insert, + contains: function (c) { return parent.contains(c); }, + removeChild: function (c) { parent.removeChild(c); } + }; +} +*/ \ No newline at end of file diff --git a/packages/preact-shim/tsconfig.json b/packages/preact-shim/tsconfig.json index 429dc0b389..318ecdd23e 100644 --- a/packages/preact-shim/tsconfig.json +++ b/packages/preact-shim/tsconfig.json @@ -1,11 +1,24 @@ { - "extends": "../tsconfig.settings.json", "compilerOptions": { - "rootDir": "./src", - "outDir": "./lib-umd", - "declarationDir": "./types", + "rootDir": "src", + "module": "NodeNext", + "target": "ESNext", + "resolveJsonModule": true, + "emitDeclarationOnly": true, + "declaration": true, + "declarationDir": "types", + "strict": true, + "noImplicitAny": false, + "strictNullChecks": false, + "skipLibCheck": true, + "allowImportingTsExtensions": true, + "lib": [ + "DOM", + "ESNext", + "ES2020" + ] }, "include": [ - "./src/**/*" + "./src/index.ts" ] } \ No newline at end of file diff --git a/packages/react/.vscode/launch.json b/packages/react/.vscode/launch.json index 18f60ed1e3..7c2436335f 100644 --- a/packages/react/.vscode/launch.json +++ b/packages/react/.vscode/launch.json @@ -1,19 +1,47 @@ { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { - "type": "chrome", + "name": "test-browser", + "type": "msedge", "request": "launch", - "name": "Docs", - "url": "${workspaceFolder}/../../website/index.html?debug=1#packages/react/docs/index.md", + "url": "http://localhost:8888", + "webRoot": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ], + }, + { + "name": "test-node", + "type": "node", + "request": "launch", + "runtimeArgs": [ + "run-script", + "test-node" + ], + "runtimeExecutable": "npm", + "skipFiles": [ + "/**" + ], + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ], + }, + { + "name": "index.html", + "request": "launch", + "type": "msedge", + "url": "file:///${workspaceFolder}/index.html", "runtimeArgs": [ - "--allow-file-access-from-files", "--disable-web-security" ], - "webRoot": "${workspaceFolder}/../../website" + "webRoot": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ] } ] -} +} \ No newline at end of file diff --git a/packages/react/.vscode/tasks.json b/packages/react/.vscode/tasks.json index 79e20d2523..120545d06c 100644 --- a/packages/react/.vscode/tasks.json +++ b/packages/react/.vscode/tasks.json @@ -2,9 +2,9 @@ "version": "2.0.0", "tasks": [ { - "label": "es6 watch", + "label": "gen-types-watch", "type": "npm", - "script": "compile-es6-watch", + "script": "gen-types-watch", "problemMatcher": [ "$tsc-watch" ], @@ -13,18 +13,7 @@ } }, { - "label": "umd watch", - "type": "npm", - "script": "compile-umd-watch", - "problemMatcher": [ - "$tsc-watch" - ], - "presentation": { - "group": "group-build" - } - }, - { - "label": "bundle watch", + "label": "bundle-watch", "type": "npm", "script": "bundle-watch", "problemMatcher": [], @@ -35,15 +24,13 @@ { "label": "build", "dependsOn": [ - "es6 watch", - "umd watch", - "bundle watch" + "gen-types-watch", + "bundle-watch", ], "group": { "kind": "build", "isDefault": true - }, - "problemMatcher": [] + } } ] } \ No newline at end of file diff --git a/packages/react/esbuild.js b/packages/react/esbuild.js new file mode 100644 index 0000000000..b3dcf1d43b --- /dev/null +++ b/packages/react/esbuild.js @@ -0,0 +1,30 @@ +import { browserTpl } from "@hpcc-js/esbuild-plugins"; +import pkg from "./package.json" with { type: "json" }; + +// config --- +await Promise.all([ + browserTpl("src/index.ts", "dist/index", { + keepNames: true, + alias: { + "d3-array": "@hpcc-js/common", + "d3-brush": "@hpcc-js/common", + "d3-collection": "@hpcc-js/common", + "d3-color": "@hpcc-js/common", + "d3-dispatch": "@hpcc-js/common", + "d3-drag": "@hpcc-js/common", + "d3-dsv": "@hpcc-js/common", + "d3-ease": "@hpcc-js/common", + "d3-format": "@hpcc-js/common", + "d3-interpolate": "@hpcc-js/common", + "d3-scale": "@hpcc-js/common", + "d3-selection": "@hpcc-js/common", + "d3-time-format": "@hpcc-js/common", + "d3-transition": "@hpcc-js/common", + "d3-zoom": "@hpcc-js/common" + }, + external: [ + ...Object.keys(pkg.dependencies), + ...Object.keys(pkg.peerDependencies), + ] + }) +]); diff --git a/packages/react/index.html b/packages/react/index.html new file mode 100644 index 0000000000..5342205e5b --- /dev/null +++ b/packages/react/index.html @@ -0,0 +1,82 @@ + + + + + Home + + + + + + + +

ESM Quick Test

+
+ + + + + \ No newline at end of file diff --git a/packages/react/package.json b/packages/react/package.json index f2bfcdb12e..2f0e2a6e20 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,49 +1,50 @@ { "name": "@hpcc-js/react", - "version": "2.55.0", + "version": "3.0.0", "description": "hpcc-js - Viz React", - "main": "dist/index.js", - "module": "dist/index.es6", - "unpkg": "dist/index.min.js", - "jsdelivr": "dist/index.min.js", - "types": "types/index.d.ts", - "typesVersions": { - "<3.8": { - "*": [ - "types-3.4/index.d.ts" - ] + "type": "module", + "exports": { + ".": { + "types": "./types/index.d.ts", + "default": "./dist/index.js" } }, + "module": "./dist/index.js", + "browser": "./dist/index.js", + "types": "./types/index.d.ts", "files": [ "dist/*", - "types/*", - "types-3.4/*", - "src/*" + "src/*", + "types/*" ], "scripts": { - "clean": "rimraf --glob lib* types dist *.tsbuildinfo", - "compile-es6": "tsc --module es6 --outDir ./lib-es6", - "compile-es6-watch": "npm run compile-es6 -- -w", - "compile-umd": "tsc --module umd --outDir ./lib-umd", - "compile-umd-watch": "npm run compile-umd -- -w", - "bundle": "rollup -c", - "bundle-watch": "npm run bundle -- -w", - "minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js", - "gen-legacy-types": "downlevel-dts ./types ./types-3.4", - "build": "npm run compile-es6 && npm run bundle", - "watch": "npm-run-all compile-es6 -p compile-es6-watch bundle-watch", + "clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo", + "bundle": "node esbuild.js", + "bundle-watch": "npm run bundle -- --development --watch", + "gen-types": "tsc --project tsconfig.json", + "gen-types-watch": "npm run gen-types -- --watch", + "build": "run-p gen-types bundle", "stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js", "lint": "eslint ./src", + "lint-fix": "eslint --fix src/**/*.ts", "docs": "typedoc --options tdoptions.json .", - "update": "npx --yes npm-check-updates -u -t minor" + "test-browser": "vitest run --project browser", + "test": "vitest run", + "coverage": "vitest run --coverage", + "update": "npx --yes npm-check-updates -u -t minor", + "update-major": "npx --yes npm-check-updates -u" }, "dependencies": { - "@hpcc-js/common": "^2.73.0", - "@hpcc-js/preact-shim": "^2.18.0" + "@hpcc-js/common": "^3.1.0" }, "devDependencies": { - "@hpcc-js/bundle": "^2.12.0", - "tslib": "2.7.0" + "@hpcc-js/esbuild-plugins": "^1.2.0", + "react": "18.3.1", + "react-dom": "18.3.1" + }, + "peerDependencies": { + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0" }, "repository": { "type": "git", @@ -56,4 +57,4 @@ "url": "https://github.com/hpcc-systems/Visualization/issues" }, "homepage": "https://github.com/hpcc-systems/Visualization" -} +} \ No newline at end of file diff --git a/packages/react/rollup.config.mjs b/packages/react/rollup.config.mjs deleted file mode 100644 index 3e0b2b9d2a..0000000000 --- a/packages/react/rollup.config.mjs +++ /dev/null @@ -1,56 +0,0 @@ -import { external, globals } from "@hpcc-js/bundle"; -import alias from '@rollup/plugin-alias'; -import commonjs from '@rollup/plugin-commonjs'; -import sourcemaps from 'rollup-plugin-sourcemaps'; -import nodeResolve from '@rollup/plugin-node-resolve'; -import postcss from "rollup-plugin-postcss"; - -import pkg from "./package.json" with { type: "json" }; - -export default { - input: "lib-es6/index", - external: external, - output: [{ - file: pkg.main, - format: "umd", - sourcemap: true, - globals: globals, - name: pkg.name - }, { - file: pkg.module + ".js", - format: "es", - sourcemap: true, - globals: globals, - name: pkg.name - }], - plugins: [ - alias({ - entries: [ - { find: "d3-array", replacement: "@hpcc-js/common" }, - { find: "d3-brush", replacement: "@hpcc-js/common" }, - { find: "d3-collection", replacement: "@hpcc-js/common" }, - { find: "d3-color", replacement: "@hpcc-js/common" }, - { find: "d3-dispatch", replacement: "@hpcc-js/common" }, - { find: "d3-drag", replacement: "@hpcc-js/common" }, - { find: "d3-dsv", replacement: "@hpcc-js/common" }, - { find: "d3-ease", replacement: "@hpcc-js/common" }, - { find: "d3-format", replacement: "@hpcc-js/common" }, - { find: "d3-interpolate", replacement: "@hpcc-js/common" }, - { find: "d3-scale", replacement: "@hpcc-js/common" }, - { find: "d3-selection", replacement: "@hpcc-js/common" }, - { find: "d3-time-format", replacement: "@hpcc-js/common" }, - { find: "d3-transition", replacement: "@hpcc-js/common" }, - { find: "d3-zoom", replacement: "@hpcc-js/common" } - ] - }), - nodeResolve({ - preferBuiltins: true - }), - commonjs({}), - sourcemaps(), - postcss({ - extensions: [".css"], - minimize: true - }) - ] -}; \ No newline at end of file diff --git a/packages/react/src/ImageChar.tsx b/packages/react/src/ImageChar.tsx index 4976bcd3b3..2ca5dec41e 100644 --- a/packages/react/src/ImageChar.tsx +++ b/packages/react/src/ImageChar.tsx @@ -1,7 +1,7 @@ +import React, { useMemo } from "react"; import { Utility } from "@hpcc-js/common"; -import * as React from "@hpcc-js/preact-shim"; -interface ImageChar { +export interface ImageCharProps { x?: number; y?: number; height?: number; @@ -10,19 +10,21 @@ interface ImageChar { fontFamily?: string; char?: string; yOffset?: number; + fontWeight?: number; } -export const ImageChar: React.FunctionComponent = ({ +export const ImageChar: React.FunctionComponent = ({ x, y = 0, height = 12, fill, stroke, fontFamily = "FontAwesome", - char = "" + char = "", + fontWeight }) => { - const renderChar = React.useMemo(() => { + const renderChar = useMemo(() => { return fontFamily === "FontAwesome" ? Utility.faChar(char) : char; }, [char, fontFamily]); @@ -31,9 +33,10 @@ export const ImageChar: React.FunctionComponent = ({ y={y} fill={fill} stroke={stroke} - font-family={fontFamily} - font-size={`${height}px`} - dominant-baseline="middle" - style="text-anchor: middle;alignment-baseline:middle;" + fontFamily={fontFamily} + fontSize={`${height}px`} + fontWeight={fontWeight} + dominantBaseline="middle" + style={{ textAnchor: "middle", alignmentBaseline: "middle" }} >{renderChar}; }; diff --git a/packages/react/src/edge.tsx b/packages/react/src/edge.tsx index be0469cbde..9d52dd53b7 100644 --- a/packages/react/src/edge.tsx +++ b/packages/react/src/edge.tsx @@ -1,6 +1,6 @@ -import * as React from "@hpcc-js/preact-shim"; -import { VertexProps } from "./vertex"; -import { Text } from "./text"; +import React from "react"; +import { VertexProps } from "./vertex.tsx"; +import { Text } from "./text.tsx"; type Point = [number, number]; diff --git a/packages/react/src/icon.tsx b/packages/react/src/icon.tsx index 4eb0e0b0d1..de6300b70f 100644 --- a/packages/react/src/icon.tsx +++ b/packages/react/src/icon.tsx @@ -1,10 +1,10 @@ +import React from "react"; import { Palette } from "@hpcc-js/common"; -import * as React from "@hpcc-js/preact-shim"; -import { Image } from "./image"; -import { ImageChar } from "./ImageChar"; -import { Shape } from "./shape"; +import { Image } from "./image.tsx"; +import { ImageChar } from "./ImageChar.tsx"; +import { Shape } from "./shape.tsx"; -export interface Icon { +export interface IconProps { shape?: "circle" | "square" | "rectangle"; width?: number; height?: number; @@ -22,7 +22,7 @@ export interface Icon { shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision"; } -export const Icon: React.FunctionComponent = ({ +export const Icon: React.FunctionComponent = ({ shape = "circle", width, height = 32, @@ -64,21 +64,21 @@ export const Icon: React.FunctionComponent = ({ fontFamily={imageFontFamily} char={imageChar} fill={imageCharFill} - font-weight={400} + fontWeight={400} > } ; }; -export interface IconEx extends Icon { +export interface IconEx extends IconProps { id: string; } -export interface Icons { +export interface IconsProps { icons: IconEx[]; } -export const Icons: React.FunctionComponent = ({ +export const Icons: React.FunctionComponent = ({ icons = [] }) => { const IconComponents = icons.map(cat => { diff --git a/packages/react/src/image.tsx b/packages/react/src/image.tsx index 7f4c0c28c4..44a71adfe1 100644 --- a/packages/react/src/image.tsx +++ b/packages/react/src/image.tsx @@ -1,6 +1,6 @@ -import * as React from "@hpcc-js/preact-shim"; +import React from "react"; -interface Image { +interface ImageProps { href: string; x?: number; y?: number; @@ -8,7 +8,7 @@ interface Image { yOffset?: number; } -export const Image: React.FunctionComponent = ({ +export const Image: React.FunctionComponent = ({ href, x, y = 0, diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index ba5bd6fd21..491f46eb73 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -1,18 +1,20 @@ -export * from "./__package__"; +export * from "./__package__.ts"; -export * from "./edge"; -export * from "./ImageChar"; -export * from "./icon"; -export * from "./render"; -export * from "./shape"; -export * from "./text"; -export * from "./vertex"; -export * from "./vertex2"; -export * from "./vertex3"; -export * from "./vertex4"; -export * from "./subgraph"; +export * from "./edge.tsx"; +export * from "./ImageChar.tsx"; +export * from "./icon.tsx"; +export * from "./image.tsx"; +export * from "./render.ts"; +export * from "./shape.tsx"; +export * from "./span.tsx"; +export * from "./text.tsx"; +export * from "./vertex.tsx"; +export * from "./vertex2.tsx"; +export * from "./vertex3.tsx"; +export * from "./vertex4.tsx"; +export * from "./subgraph.tsx"; -import * as React from "@hpcc-js/preact-shim"; +import React from "react"; export { React }; diff --git a/packages/react/src/render.ts b/packages/react/src/render.ts index ddbe749e97..84eb91d860 100644 --- a/packages/react/src/render.ts +++ b/packages/react/src/render.ts @@ -1,21 +1,17 @@ -import { HTMLWidget, publish, SVGWidget } from "@hpcc-js/common"; -import * as React from "@hpcc-js/preact-shim"; +import React from "react"; +import { render as reactRender } from "react-dom"; +import { createRoot, Root } from "react-dom/client"; +import { HTMLWidget, SVGWidget } from "@hpcc-js/common"; -export function render

(C: React.FunctionComponent

, props: Readonly

, parent: Element | Document | ShadowRoot | DocumentFragment, replaceNode?: Element | Text) { - React.render(React.h(C, props), parent, replaceNode); -} - -export interface FunctionComponent extends React.FunctionComponent { -} - -export function svgRender

(C: React.FunctionComponent

, props: Readonly

, parent: Element | Document | ShadowRoot | DocumentFragment, replaceNode?: Element | Text) { - React.render(React.h("svg", null, React.h(C, props)), parent, replaceNode); +export function render

(C: React.FunctionComponent

, props: Readonly

, parent: Element | Document | ShadowRoot | DocumentFragment) { + const re = React.createElement(C, props); + reactRender(re, parent); } export class HTMLAdapter

extends HTMLWidget { - @publish({}, "object", "Properties") - protected _props: P = {} as P; + protected _root: Root; + props(): P; props(_: Partial

): this; props(_?: Partial

): P | this { @@ -36,16 +32,32 @@ export class HTMLAdapter

extends HTMLWidget { super(); } + enter(domNode, element) { + super.enter(domNode, element); + this._root = createRoot(domNode); + } + update(domNode, element) { super.update(domNode, element); - render(this._component, this._props, domNode); + this._root.render(React.createElement(this._component, this.props())); + } + + exit(domNode, element) { + this._root.unmount(); + super.exit(domNode, element); } } +HTMLAdapter.prototype._class += " react_HTMLAdapter"; + +export interface HTMLAdapter

{ + _props: P; +} +HTMLAdapter.prototype.publish("props", {}, "object", "Properties"); export class SVGAdapter

extends SVGWidget { - @publish({}, "object", "Properties") - protected _props: P = {} as P; + protected _root: Root; + props(): P; props(_: Partial

): this; props(_?: Partial

): P | this { @@ -66,8 +78,25 @@ export class SVGAdapter

extends SVGWidget { super(); } + _c2: React.ReactElement; + enter(domNode, element) { + super.enter(domNode, element); + this._root = createRoot(domNode); + } + update(domNode, element) { super.update(domNode, element); - render(this._component, this._props, domNode); + this._root.render(React.createElement(this._component, this.props())); } + + exit(domNode, element) { + this._root.unmount(); + super.exit(domNode, element); + } +} +SVGAdapter.prototype._class += " react_SVGAdapter"; + +export interface SVGAdapter

{ + _props: P; } +SVGAdapter.prototype.publish("props", {}, "object", "Properties"); diff --git a/packages/react/src/shape.tsx b/packages/react/src/shape.tsx index 97b5e3e4ae..2907448591 100644 --- a/packages/react/src/shape.tsx +++ b/packages/react/src/shape.tsx @@ -1,6 +1,6 @@ -import * as React from "@hpcc-js/preact-shim"; +import React from "react"; -interface Circle { +interface CircleProps { radius?: number; fill?: string; stroke?: string; @@ -8,7 +8,7 @@ interface Circle { shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision"; } -export const Circle: React.FunctionComponent = ({ +export const Circle: React.FunctionComponent = ({ radius = 32, fill = "navy", stroke = fill, @@ -18,11 +18,11 @@ export const Circle: React.FunctionComponent = ({ r={radius} fill={fill} stroke={stroke} - stroke-width={strokeWidth} - shape-rendering={shapeRendering} + strokeWidth={strokeWidth} + shapeRendering={shapeRendering} />; -interface Square { +interface SquareProps { radius?: number; cornerRadius?: number; fill?: string; @@ -31,7 +31,7 @@ interface Square { shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision"; } -export const Square: React.FunctionComponent = ({ +export const Square: React.FunctionComponent = ({ radius = 30, cornerRadius = 0, fill = "white", @@ -47,11 +47,11 @@ export const Square: React.FunctionComponent = ({ height={radius * 2} fill={fill} stroke={stroke || fill} - stroke-width={strokeWidth} - shape-rendering={shapeRendering} + strokeWidth={strokeWidth} + shapeRendering={shapeRendering} />; -interface Rectangle { +interface RectangleProps { width?: number; height?: number; cornerRadius?: number; @@ -61,7 +61,7 @@ interface Rectangle { shapeRendering?: "auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision"; } -export const Rectangle: React.FunctionComponent = ({ +export const Rectangle: React.FunctionComponent = ({ width = 30, height = 30, cornerRadius = 0, @@ -79,12 +79,12 @@ export const Rectangle: React.FunctionComponent = ({ height={height} fill={fill} stroke={stroke || fill} - stroke-width={strokeWidth} - shape-rendering={shapeRendering} + strokeWidth={strokeWidth} + shapeRendering={shapeRendering} />; }; -interface Shape { +interface ShapeProps { shape?: "circle" | "square" | "rectangle"; height?: number; width?: number; @@ -95,7 +95,7 @@ interface Shape { cornerRadius?: number; } -export const Shape: React.FunctionComponent = ({ +export const Shape: React.FunctionComponent = ({ shape = "circle", height = 128, width, diff --git a/packages/react/src/span.tsx b/packages/react/src/span.tsx new file mode 100644 index 0000000000..714db8acbc --- /dev/null +++ b/packages/react/src/span.tsx @@ -0,0 +1,9 @@ +import React from "react"; + +export interface SpanProps { + text: string; +} + +export const Span: React.FunctionComponent = ({ + text +}) => {text}; diff --git a/packages/react/src/subgraph.tsx b/packages/react/src/subgraph.tsx index 8fcfdd0483..1a05c67f1a 100644 --- a/packages/react/src/subgraph.tsx +++ b/packages/react/src/subgraph.tsx @@ -1,7 +1,7 @@ +import React from "react"; import { Utility } from "@hpcc-js/common"; -import * as React from "@hpcc-js/preact-shim"; -import { Rectangle } from "./shape"; -import { Text } from "./text"; +import { Rectangle } from "./shape.tsx"; +import { Text } from "./text.tsx"; export interface SubgraphProps { id: string; diff --git a/packages/react/src/text.tsx b/packages/react/src/text.tsx index 3256a444f4..0fdb89b0e2 100644 --- a/packages/react/src/text.tsx +++ b/packages/react/src/text.tsx @@ -1,9 +1,9 @@ +import React from "react"; import { Utility } from "@hpcc-js/common"; -import * as React from "@hpcc-js/preact-shim"; -import { Icon } from "./icon"; -import { Rectangle } from "./shape"; +import { Icon } from "./icon.tsx"; +import { Rectangle } from "./shape.tsx"; -interface TextLine { +export interface TextLineProps { text: string; height?: number; anchor?: string; @@ -12,7 +12,7 @@ interface TextLine { fill?: string; } -export const TextLine: React.FunctionComponent = ({ +export const TextLine: React.FunctionComponent = ({ text, height = 12, anchor = "middle", @@ -21,15 +21,15 @@ export const TextLine: React.FunctionComponent = ({ fill = "black" }) => { return {text}; }; -interface Text { +export interface TextProps { text: string; height?: number; fontFamily?: string; @@ -37,35 +37,36 @@ interface Text { onSizeUpdate?: (size: { width: number, height: number }) => void; } -export const Text: React.FunctionComponent = ({ +export const Text: React.FunctionComponent = ({ text, height = 12, fontFamily = "Verdana", fill = "black", onSizeUpdate }) => { - const [totalWidth, setTotalWidthUpdate] = React.useState(0); - const [totalHeight, setTotalHeightUpdate] = React.useState(0); + const [totalWidth, setTotalWidth] = React.useState(0); + const [totalHeight, setTotalHeight] = React.useState(0); React.useEffect(() => { - onSizeUpdate && onSizeUpdate({ width: totalWidth, height: totalHeight }); + if (onSizeUpdate) { + onSizeUpdate({ width: totalWidth, height: totalHeight }); + } }, [totalWidth, totalHeight, onSizeUpdate]); const parts = React.useMemo(() => { return text.split("\n"); }, [text]); - const ts = React.useMemo(() => { - return Utility.textSize(parts, fontFamily, height); + React.useLayoutEffect(() => { + const size = Utility.textSize(parts, fontFamily, height); + setTotalWidth(size.width); + setTotalHeight(size.height); }, [fontFamily, height, parts]); - setTotalWidthUpdate(ts.width); - setTotalHeightUpdate(parts.length * (height + 2) - 2); - - const yOffset = -(totalHeight / 2) + (height / 2); const TextLines = React.useMemo(() => { + const yOffset = -(totalHeight / 2) + (height / 2); return parts.map((p, i) => { - return + return = ({ /> ; }); - }, [fill, fontFamily, height, parts, yOffset]); + }, [parts, totalHeight, height, fontFamily, fill]); - return <>{TextLines}; + return {TextLines}; }; -export interface TextBox { +export interface TextBoxProps { text: string; height?: number; fontFamily?: string; @@ -93,7 +94,7 @@ export interface TextBox { onSizeUpdate?: (size: { width: number, height: number }) => void; } -export const TextBox: React.FunctionComponent = ({ +export const TextBox: React.FunctionComponent = ({ text, height = 12, fontFamily = "Verdana", @@ -109,7 +110,9 @@ export const TextBox: React.FunctionComponent = ({ const [textHeight, setTextHeightUpdate] = React.useState(0); React.useEffect(() => { - onSizeUpdate && onSizeUpdate({ width: textWidth, height: textHeight }); + if (onSizeUpdate) { + onSizeUpdate({ width: textWidth, height: textHeight }); + } }, [textWidth, textHeight, onSizeUpdate]); const onTextSizeUpdate = React.useCallback(size => { @@ -142,17 +145,11 @@ export const TextBox: React.FunctionComponent = ({ ; }; -export interface LabelledRect extends TextBox { +export interface LabelledRect extends TextBoxProps { width?: number; fontSize?: number; } -export interface IconLabelledRect extends LabelledRect { - icon: string; - iconFontFamily: string; - iconFontSize: number; -} - export const LabelledRect: React.FunctionComponent = ({ text, height = 12, @@ -165,18 +162,34 @@ export const LabelledRect: React.FunctionComponent = ({ textFill = "black", strokeWidth = 1, cornerRadius = 0, - onSizeUpdate = (size: { width: number, height: number }) => { } + onSizeUpdate }) => { + + const [actualWidth, setActualWidthUpdate] = React.useState(width); + const [actualHeight, setActualHeightUpdate] = React.useState(height); + + React.useLayoutEffect(() => { + const size = Utility.textSize(text, fontFamily, fontSize); + setActualWidthUpdate(size.width + padding * 2); + setActualHeightUpdate(size.height + padding * 2); + }, [text, fontFamily, fontSize, padding]); + + React.useLayoutEffect(() => { + if (onSizeUpdate) { + onSizeUpdate({ width: actualWidth, height: actualHeight }); + } + }, [actualWidth, actualHeight, padding, onSizeUpdate]); + return <> - + = ({ ; }; +export interface IconLabelledRect extends LabelledRect { + icon: string; + iconFontFamily?: string; + iconFontSize?: number; +} + export const IconLabelledRect: React.FunctionComponent = ({ icon, iconFontFamily, @@ -202,9 +221,9 @@ export const IconLabelledRect: React.FunctionComponent = ({ stroke = "lightgray", textFill = "black", strokeWidth = 1, - cornerRadius = 0, - onSizeUpdate = (size: { width: number, height: number }) => { } + cornerRadius = 0 }) => { + return <> = ({ +export const Annotations: React.FunctionComponent = ({ x, y, annotationIDs = [], @@ -35,7 +35,7 @@ export interface VertexProps { text: string; textHeight?: number; textPadding?: number; - icon?: Icon; + icon?: IconProps; annotationsHeight?: number; annotationIDs?: string[]; textFill?: string; @@ -52,7 +52,7 @@ export const Vertex: React.FunctionComponent = ({ text = "", textHeight = 12, textPadding = 4, - icon = {}, + icon = {} as IconProps, annotationsHeight = 12, annotationIDs = [], textFill, @@ -63,19 +63,22 @@ export const Vertex: React.FunctionComponent = ({ showLabel = true, scale = 1 }) => { - const [textBoxWidth, setTextBoxWidthUpdate] = React.useState(0); - const [textBoxHeight, setTextBoxHeightUpdate] = React.useState(0); - - React.useEffect(() => { - onSizeUpdate && onSizeUpdate({ width: 0, height: 0 }); - }, [textBoxWidth, textBoxHeight, onSizeUpdate]); - icon = { imageChar: "fa-question", height: 32, fill: "transparent", ...icon }; + + const [textBoxWidth, setTextBoxWidthUpdate] = React.useState(0); + const [textBoxHeight, setTextBoxHeightUpdate] = React.useState(0); + + React.useEffect(() => { + if (onSizeUpdate) { + onSizeUpdate({ width: 0, height: 0 }); + } + }, [textBoxWidth, textBoxHeight, onSizeUpdate]); + let width = textBoxWidth; width += 4; let offsetY = -(icon.height * 2 / 6 + textHeight + 8) / 2; diff --git a/packages/react/src/vertex2.tsx b/packages/react/src/vertex2.tsx index b75bc23691..55c6c228f6 100644 --- a/packages/react/src/vertex2.tsx +++ b/packages/react/src/vertex2.tsx @@ -1,15 +1,15 @@ +import React from "react"; import { Utility } from "@hpcc-js/common"; -import * as React from "@hpcc-js/preact-shim"; -import { Icon } from "./icon"; -import { TextBox } from "./text"; -import { Annotations, VertexProps } from "./vertex"; +import { Icon, IconProps } from "./icon.tsx"; +import { TextBox } from "./text.tsx"; +import { Annotations, VertexProps } from "./vertex.tsx"; export const Vertex2: React.FunctionComponent = ({ categoryID = "", text = "", textHeight = 12, textPadding = 4, - icon = {}, + icon = {} as IconProps, textFill = "black", textboxFill = "white", textboxStroke = "black", diff --git a/packages/react/src/vertex3.tsx b/packages/react/src/vertex3.tsx index c743e615ec..d438ecac28 100644 --- a/packages/react/src/vertex3.tsx +++ b/packages/react/src/vertex3.tsx @@ -1,8 +1,8 @@ +import React from "react"; import { Utility } from "@hpcc-js/common"; -import * as React from "@hpcc-js/preact-shim"; -import { Icon } from "./icon"; -import { TextBox } from "./text"; -import { VertexProps } from "./vertex"; +import { Icon, IconProps } from "./icon.tsx"; +import { TextBox, TextBoxProps } from "./text.tsx"; +import { VertexProps } from "./vertex.tsx"; export interface Vertex3Props extends VertexProps { id: string; @@ -12,8 +12,8 @@ export interface Vertex3Props extends VertexProps { textHeight?: number; textPadding?: number; textboxStrokeWidth?: number; - icon?: Icon; - annotations?: Icon[]; + icon?: IconProps; + annotations?: IconProps[]; annotationsHeight?: number; annotationGutter?: number; textFill?: string; @@ -21,11 +21,11 @@ export interface Vertex3Props extends VertexProps { textboxStroke?: string; textFontFamily?: string; cornerRadius?: number; - subText?: TextBox; + subText?: TextBoxProps; onSizeUpdate?: (size: { width: number, height: number }) => void; showLabel?: boolean; noLabelRadius?: number; - expansionIcon?: Icon; + expansionIcon?: IconProps; scale?: number; } @@ -41,8 +41,8 @@ export const Vertex3: React.FunctionComponent = ({ annotationGutter = 2, annotations = [], cornerRadius = 3, - icon = {}, - subText = { text: "" }, + icon = {} as IconProps, + subText = { text: "" } as TextBoxProps, showLabel = true, noLabelRadius = 5, expansionIcon, @@ -98,7 +98,7 @@ export const Vertex3: React.FunctionComponent = ({ fullAnnotationWidth += annoShapeWidth + annotationGutter; const annoOffsetX = fullAnnotationWidth - (annoShapeWidth / 2); annotationArr.push( - + = ({ annotations = [], iconAnnotations = [], cornerRadius = 3, - icon = {}, - subText = {}, + icon = {} as IconProps, + subText = {} as TextBoxProps, showLabel = true, noLabelRadius = 5, @@ -99,7 +98,7 @@ export const Vertex4: React.FunctionComponent = ({ const textOffsetX = fullAnnotationWidth - (labelShapeWidth / 2); const textShapeHeight = textHeight + (annotationGutter * 2) + (textboxStrokeWidth * 2); - const annoWidthArr = annotations.map((anno, i) => { + const annoWidthArr = annotations.map((anno) => { return Utility.textSize(anno.imageChar, anno.imageFontFamily, anno.height, false).width; }); const annotationArr = []; @@ -110,7 +109,7 @@ export const Vertex4: React.FunctionComponent = ({ _labelAnnoOffsetX += annoWidthArr[i] + annotationGutter; const annoOffsetX = _labelAnnoOffsetX - (annoWidthArr[i] / 2); annotationArr.push( - + = ({ const x = anno.shapeOffsetX; const y = anno.shapeOffsetY; iconAnnotationArr.push( - + { + for (const key in react) { + const item = (react as any)[key]; + if (item && item.prototype && item.prototype.constructor) { + if (!urlSearch || urlSearch === item.prototype.constructor.name) { + describe(`${item.prototype?.constructor?.name}`, () => { + it("Simple", () => { + expect(true).to.be.true; + }); + if (item.prototype instanceof Class) { + classDef("react", item); + } + if (item.prototype instanceof HTMLWidget || item.prototype instanceof SVGWidget) { + switch (item.prototype.constructor) { + case HTMLAdapter: + renderMedium(new item.prototype.constructor(Span).prop("text", "Hello World")); + break; + case SVGAdapter: + renderMedium(new item.prototype.constructor(TextLine).prop("text", "Hello World")); + break; + + default: + it("Has render test", () => { + expect(false).to.be.true; + }); + } + } + }); + } + } + } + + describe("React Components - SVG Adapter", async () => { + it("edge.tsx", () => { + renderMedium( + new SVGAdapter(Edge) + .prop("source", { id: "1", text: "Hello" }) + .prop("target", { id: "2", text: "World" }) + ); + }); + + it("icon.tsx", () => { + renderMedium(new SVGAdapter(Icon).prop("imageChar", "H")); + renderMedium(new SVGAdapter(Icons).prop("icons", [{ id: "h", imageChar: "H" }, { id: "q", imageChar: "Q" }])); + }); + + it("image.tsx", () => { + renderMedium(new SVGAdapter(Image).prop("href", "https://hpccsystems.com/wp-content/themes/hpcc/dist/images/logos/logo-color.svg?ver=2")); + }); + + it("imageChar.tsx", () => { + renderMedium(new SVGAdapter(ImageChar)); + }); + + it("shape.tsx", () => { + renderMedium(new SVGAdapter(Circle)); + renderMedium(new SVGAdapter(Square)); + renderMedium(new SVGAdapter(Rectangle)); + renderMedium(new SVGAdapter(Shape)); + }); + + it("subgraph.tsx", () => { + renderMedium(new SVGAdapter(Subgraph).prop("id", "1").prop("text", "Hello World")); + }); + + it("vertex(s).tsx", () => { + renderMedium(new SVGAdapter(Annotations).prop("annotationIDs", ["h", "q"])); + renderMedium( + new SVGAdapter(Vertex) + .prop("id", "1") + .prop("text", "Hello World") + ); + renderMedium( + new SVGAdapter(Vertex2) + .prop("id", "1") + .prop("text", "Hello World") + ); + renderMedium( + new SVGAdapter(Vertex3) + .prop("id", "1") + .prop("text", "Hello World") + ); + renderMedium( + new SVGAdapter(Vertex4) + .prop("id", "1") + .prop("text", "Hello World") + ); + + }); + + it("text.tsx", () => { + renderMedium(new SVGAdapter(TextLine).prop("text", "Hello World")); + renderMedium(new SVGAdapter(Text).prop("text", "Hello World")); + renderMedium(new SVGAdapter(TextBox).prop("text", "Hello World")); + renderMedium(new SVGAdapter(LabelledRect).prop("text", "Hello World")); + renderMedium( + new SVGAdapter(IconLabelledRect) + .prop("text", "Hello World") + .prop("icon", "H") + ); + }); + + }); + +}); + diff --git a/packages/react/tsconfig.json b/packages/react/tsconfig.json index dce6754c23..acfd3b2511 100644 --- a/packages/react/tsconfig.json +++ b/packages/react/tsconfig.json @@ -1,18 +1,25 @@ { - "extends": "../tsconfig.settings.json", "compilerOptions": { - "rootDir": "./src", - "outDir": "./lib-umd", - "declarationDir": "./types", - "noImplicitThis": true, - "jsx": "react" + "rootDir": "src", + "module": "NodeNext", + "target": "ESNext", + "resolveJsonModule": true, + "emitDeclarationOnly": true, + "declaration": true, + "declarationDir": "types", + "jsx": "react", + "strict": true, + "noImplicitAny": false, + "strictNullChecks": false, + "skipLibCheck": true, + "allowImportingTsExtensions": true, + "lib": [ + "DOM", + "ESNext", + "ES2020" + ] }, "include": [ - "./src/**/*" - ], - "references": [ - { - "path": "../common" - } + "./src/index.ts" ] -} +} \ No newline at end of file diff --git a/packages/react/vitest.workspace.ts b/packages/react/vitest.workspace.ts new file mode 100644 index 0000000000..fa7bb0720b --- /dev/null +++ b/packages/react/vitest.workspace.ts @@ -0,0 +1,6 @@ +import { defineWorkspace } from 'vitest/config'; +import baseWorkspace from '../../vitest.workspace.ts'; + +export default defineWorkspace([ + ...baseWorkspace +]) \ No newline at end of file