diff --git a/packages/dgrid-shim/src/gridHelper.ts b/packages/dgrid-shim/src/gridHelper.ts index d1fc93cbdc..adea1d8237 100644 --- a/packages/dgrid-shim/src/gridHelper.ts +++ b/packages/dgrid-shim/src/gridHelper.ts @@ -133,8 +133,8 @@ export const Pagination = declare([DGridPagination], { }); }, - _updateNavigation: function (total) { - this.inherited(arguments); + _updateNavigation: function _updateNavigation(total) { + this.inherited(_updateNavigation, arguments); if (total >= UNKNOWN_NUM_ROWS) { query(".dgrid-page-link:last-child", this.paginationNavigationNode).forEach(function (link) { diff --git a/packages/dgrid/.vscode/launch.json b/packages/dgrid/.vscode/launch.json index c5cfcf1c82..6a0f985a13 100644 --- a/packages/dgrid/.vscode/launch.json +++ b/packages/dgrid/.vscode/launch.json @@ -33,7 +33,7 @@ "name": "index.html", "request": "launch", "type": "msedge", - "url": "http://localhost:5506/index.html", + "url": "http://localhost:5506/dgrid/index.html", "runtimeArgs": [ "--disable-web-security" ], diff --git a/packages/dgrid/index.html b/packages/dgrid/index.html index 32c2d30cb6..3e067fedec 100644 --- a/packages/dgrid/index.html +++ b/packages/dgrid/index.html @@ -24,7 +24,7 @@ } - + @@ -42,6 +42,7 @@

ESM Quick Test

["Jill", "Marcus", [], [["Flappy", "parrot"], ["Stinky", "cat"], ["Rolf", "dog"]]], ["Susan", "Robert", [["Jack", "m", 4], ["Alice", "f", 6]], []] ]) + .pagination(true) .render() ; diff --git a/packages/dgrid/package.json b/packages/dgrid/package.json index 1f676d45e5..ccf4b1a1a4 100644 --- a/packages/dgrid/package.json +++ b/packages/dgrid/package.json @@ -38,9 +38,11 @@ }, "dependencies": { "@hpcc-js/common": "^3.3.0", - "@hpcc-js/dgrid-shim": "^3.1.0", "@hpcc-js/util": "^3.3.0" }, + "peerDependencies": { + "@hpcc-js/dgrid-shim": "^3.1.0" + }, "devDependencies": { "@hpcc-js/esbuild-plugins": "^1.4.0", "@hpcc-js/ddl-shim": "^3.0.0", diff --git a/packages/dgrid/src/dgrid-shim.ts b/packages/dgrid/src/dgrid-shim.ts index 3784fce208..f5ed354a49 100644 --- a/packages/dgrid/src/dgrid-shim.ts +++ b/packages/dgrid/src/dgrid-shim.ts @@ -1,7 +1,7 @@ -import type * as dgrid_shim from "@hpcc-js/dgrid-shim"; +import * as dgrid_shim from "@hpcc-js/dgrid-shim"; if (!globalThis["@hpcc-js/dgrid-shim"]) { - console.error("dgrid-shim not loaded, please add `` or similar to your HTML file"); + console.error("dgrid-shim not loaded, please add `` or similar to your HTML file"); } export const Deferred = globalThis["@hpcc-js/dgrid-shim"].Deferred as typeof dgrid_shim.Deferred; diff --git a/packages/dgrid/vite.config.ts b/packages/dgrid/vite.config.ts index 0c0d753250..59902fcbe8 100644 --- a/packages/dgrid/vite.config.ts +++ b/packages/dgrid/vite.config.ts @@ -7,7 +7,10 @@ import pkg from "./package.json" with { type: "json" }; const { alias, external, globals } = hpccBundleNames(pkg); export default defineConfig({ + // Setting root to the `Visualizations/packages` folder to simplify debugging of dgrid-shim + root: resolve(__dirname, ".."), build: { + outDir: resolve(__dirname, "dist"), lib: { entry: resolve(__dirname, "src/index.ts"), name: pkg.name, diff --git a/packages/eclwatch/index-preview.html b/packages/eclwatch/index-preview.html index df35123236..1f84fe69bb 100644 --- a/packages/eclwatch/index-preview.html +++ b/packages/eclwatch/index-preview.html @@ -23,6 +23,7 @@ margin-top: 20px; } + -

ESM Quick Test